From 6a320264c2de3d6dd8cc1d1327b3c30df4c8cb26 Mon Sep 17 00:00:00 2001 From: Siddhesh Wani Date: Mon, 25 May 2015 14:46:31 +0530 Subject: Original Version --- .../auxiliaryFunctions/mainfunctionAbs.sci | 20 + .../auxiliaryFunctions/mainfunctionConj.sci | 31 + .../auxiliaryFunctions/mainfunctionFind.sci | 20 + .../auxiliaryFunctions/mainfunctionFind2d.sci | 32 + .../auxiliaryFunctions/mainfunctionIsEmpty.sci | 18 + .../auxiliaryFunctions/mainfunctionIsNan.sci | 20 + .../auxiliaryFunctions/mainfunctionLength.sci | 17 + .../auxiliaryFunctions/mainfunctionSign.sci | 28 + .../auxiliaryFunctions/mainfunctionSize.sci | 27 + .../auxiliaryFunctions/mainfunctionType.sci | 16 + .../elementary Functions/mainfunctionACos.sci | 17 + .../elementary Functions/mainfunctionACosh.sci | 17 + .../elementary Functions/mainfunctionASin.sci | 17 + .../elementary Functions/mainfunctionASinh.sci | 17 + .../elementary Functions/mainfunctionATan.sci | 17 + .../elementary Functions/mainfunctionATan2.sci | 14 + .../elementary Functions/mainfunctionATanh.sci | 17 + .../mainfunctionCeil_Fix_Floor_Int_Round.sci | 48 + .../elementary Functions/mainfunctionCos.sci | 17 + .../elementary Functions/mainfunctionCosh.sci | 17 + .../elementary Functions/mainfunctionExp_Expm.sci | 30 + .../elementary Functions/mainfunctionLog.sci | 17 + .../elementary Functions/mainfunctionLog10.sci | 17 + .../elementary Functions/mainfunctionLog1p.sci | 17 + .../elementary Functions/mainfunctionPow0.sci | 27 + .../mainfunctionPow_MatrixPow.sci | 50 + .../elementary Functions/mainfunctionSin.sci | 16 + .../elementary Functions/mainfunctionSinh.sci | 16 + .../elementary Functions/mainfunctionSqrt.sci | 16 + .../elementary Functions/mainfunctionTan.sci | 16 + .../elementary Functions/mainfunctionTanh.sci | 16 + .../implicitList/mainfunctionImplicitList.sci | 36 + .../SCI2CTests/Mes_tests/mainfunctionOpIns.sci | 136 + .../SCI2CTests/Mes_tests/mainfunctionOpLogEq.sci | 32 + .../SCI2CTests/Mes_tests/mainfunctionOpLogNe.sci | 32 + .../SCI2CTests/Mes_tests/mainfunctionOpLogNot.sci | 29 + .../matrixOperations/mainfunctionChol.sci | 24 + .../Mes_tests/matrixOperations/mainfunctionDet.sci | 28 + .../Mes_tests/matrixOperations/mainfunctionEye.sci | 37 + .../matrixOperations/mainfunctionInversion.sci | 21 + .../matrixOperations/mainfunctionOnes.sci | 37 + .../mainfunctionOpApex_OpDotApex.sci | 29 + .../matrixOperations/mainfunctionSpec_Spec2.sci | 66 + .../matrixOperations/mainfunctionZeros.sci | 37 + .../Mes_tests/operations/mainfunctionOpMinus.sci | 50 + .../Mes_tests/operations/mainfunctionOpPlus.sci | 47 + .../operations/mainfunctionOpSlash_OpDotSlash.sci | 67 + .../operations/mainfunctionOpStar_OpDotStar.sci | 58 + .../signalProcessing/mainfunctionConvol.sci | 47 + .../Mes_tests/signalProcessing/mainfunctionFft.sci | 38 + .../signalProcessing/mainfunctionFftShift.sci | 30 + .../signalProcessing/mainfunctionIfft.sci | 24 + .../Mes_tests/signalProcessing/mainfunctionLev.sci | 38 + .../statistic Functions/mainfunctionMean.sci | 21 + .../statistic Functions/mainfunctionSum.sci | 20 + .../statistic Functions/mainfunctionVariance.sci | 20 + .../Mes_tests/type/mainfunctionReal_Imag.sci | 20 + .../SCI2CInputParameters.sce | 89 + .../scilabcode/mainfunction.sci | 30 + .../SCI2CInputParameters.sce | 89 + .../scilabcode/mainfunction.sci | 55 + .../test999_WorkingDir/SCI2CInputParameters.sce | 89 + .../test999_WorkingDir/scilabcode/mainfunction.sci | 30 + 2.3-1/src/c/auxiliaryFunctions/Makefile.am | 25 + 2.3-1/src/c/auxiliaryFunctions/Makefile.in | 573 ++++ 2.3-1/src/c/auxiliaryFunctions/abs/Makefile.am | 65 + 2.3-1/src/c/auxiliaryFunctions/abs/Makefile.in | 800 +++++ 2.3-1/src/c/auxiliaryFunctions/abs/cabsa.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/cabss.c | 30 + 2.3-1/src/c/auxiliaryFunctions/abs/dabsa.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/dabss.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/sabsa.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/sabss.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/testAbs.h | 39 + 2.3-1/src/c/auxiliaryFunctions/abs/testDoubleAbs.c | 93 + 2.3-1/src/c/auxiliaryFunctions/abs/testFloatAbs.c | 93 + .../abs/test_DoubleAbs/testDoubleAbs.vcxproj | 181 + .../test_DoubleAbs/testDoubleAbs.vcxproj.filters | 27 + .../abs/test_FloatAbs/testFloatAbs.vcxproj | 181 + .../abs/test_FloatAbs/testFloatAbs.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/abs/zabsa.c | 20 + 2.3-1/src/c/auxiliaryFunctions/abs/zabss.c | 31 + .../auxiliaryFunctions/auxiliaryFunctions.vcxproj | 507 +++ .../auxiliaryFunctions.vcxproj.filters | 284 ++ 2.3-1/src/c/auxiliaryFunctions/conj/Makefile.am | 44 + 2.3-1/src/c/auxiliaryFunctions/conj/Makefile.in | 710 ++++ 2.3-1/src/c/auxiliaryFunctions/conj/cconja.c | 22 + 2.3-1/src/c/auxiliaryFunctions/conj/cconjs.c | 18 + 2.3-1/src/c/auxiliaryFunctions/conj/testConj.c | 139 + .../conj/test_Conj/testConj.vcxproj | 178 + .../conj/test_Conj/testConj.vcxproj.filters | 22 + 2.3-1/src/c/auxiliaryFunctions/conj/zconja.c | 22 + 2.3-1/src/c/auxiliaryFunctions/conj/zconjs.c | 18 + 2.3-1/src/c/auxiliaryFunctions/find/Makefile.am | 49 + 2.3-1/src/c/auxiliaryFunctions/find/Makefile.in | 691 ++++ 2.3-1/src/c/auxiliaryFunctions/find/cfinda.c | 37 + 2.3-1/src/c/auxiliaryFunctions/find/dfinda.c | 40 + 2.3-1/src/c/auxiliaryFunctions/find/sfinda.c | 41 + 2.3-1/src/c/auxiliaryFunctions/find/testFind.c | 217 ++ 2.3-1/src/c/auxiliaryFunctions/find/testFind.h | 42 + .../find/test_Find/testFind.vcxproj | 181 + .../find/test_Find/testFind.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/find/zfinda.c | 37 + 2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.am | 48 + 2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.in | 689 ++++ 2.3-1/src/c/auxiliaryFunctions/find2d/cfind2da.c | 36 + 2.3-1/src/c/auxiliaryFunctions/find2d/dfind2da.c | 40 + 2.3-1/src/c/auxiliaryFunctions/find2d/sfind2da.c | 36 + 2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.c | 532 +++ 2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.h | 41 + .../find2d/test_Find2d/testFind2d.vcxproj | 181 + .../find2d/test_Find2d/testFind2d.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/find2d/zfind2da.c | 36 + 2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.am | 66 + 2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.in | 716 ++++ 2.3-1/src/c/auxiliaryFunctions/frexp/dfrexps.c | 22 + 2.3-1/src/c/auxiliaryFunctions/frexp/sfrexps.c | 22 + 2.3-1/src/c/auxiliaryFunctions/frexp/testFrexp.c | 162 + .../frexp/test_frexp/frexp.vcxproj | 187 + .../frexp/test_frexp/frexp.vcxproj.filters | 22 + 2.3-1/src/c/auxiliaryFunctions/includes/abs.h | 93 + 2.3-1/src/c/auxiliaryFunctions/includes/conj.h | 37 + .../includes/dynlib_auxiliaryfunctions.h | 26 + 2.3-1/src/c/auxiliaryFunctions/includes/find.h | 52 + 2.3-1/src/c/auxiliaryFunctions/includes/find2d.h | 52 + 2.3-1/src/c/auxiliaryFunctions/includes/frexp.h | 33 + 2.3-1/src/c/auxiliaryFunctions/includes/isempty.h | 64 + 2.3-1/src/c/auxiliaryFunctions/includes/isnan.h | 71 + 2.3-1/src/c/auxiliaryFunctions/includes/length.h | 98 + 2.3-1/src/c/auxiliaryFunctions/includes/max.h | 22 + 2.3-1/src/c/auxiliaryFunctions/includes/min.h | 20 + 2.3-1/src/c/auxiliaryFunctions/includes/pythag.h | 50 + 2.3-1/src/c/auxiliaryFunctions/includes/rand.h | 79 + 2.3-1/src/c/auxiliaryFunctions/includes/sign.h | 99 + 2.3-1/src/c/auxiliaryFunctions/includes/size.h | 25 + 2.3-1/src/c/auxiliaryFunctions/includes/type.h | 72 + .../src/c/auxiliaryFunctions/interfaces/int_abs.h | 34 + .../src/c/auxiliaryFunctions/interfaces/int_conj.h | 36 + .../src/c/auxiliaryFunctions/interfaces/int_find.h | 125 + .../c/auxiliaryFunctions/interfaces/int_frexp.h | 22 + .../c/auxiliaryFunctions/interfaces/int_isempty.h | 34 + .../c/auxiliaryFunctions/interfaces/int_isnan.h | 34 + .../c/auxiliaryFunctions/interfaces/int_length.h | 70 + .../src/c/auxiliaryFunctions/interfaces/int_max.h | 53 + .../src/c/auxiliaryFunctions/interfaces/int_min.h | 53 + .../c/auxiliaryFunctions/interfaces/int_pythag.h | 27 + .../src/c/auxiliaryFunctions/interfaces/int_rand.h | 53 + .../src/c/auxiliaryFunctions/interfaces/int_sign.h | 34 + .../src/c/auxiliaryFunctions/interfaces/int_size.h | 72 + .../src/c/auxiliaryFunctions/interfaces/int_type.h | 34 + 2.3-1/src/c/auxiliaryFunctions/isempty/Makefile.am | 37 + 2.3-1/src/c/auxiliaryFunctions/isempty/Makefile.in | 611 ++++ .../src/c/auxiliaryFunctions/isempty/testIsEmpty.c | 159 + .../src/c/auxiliaryFunctions/isempty/testIsEmpty.h | 32 + .../isempty/test_IsEmpty/testIsEmpty.vcxproj | 181 + .../test_IsEmpty/testIsEmpty.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.am | 48 + 2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.in | 721 ++++ 2.3-1/src/c/auxiliaryFunctions/isnan/cisnana.c | 22 + 2.3-1/src/c/auxiliaryFunctions/isnan/cisnans.c | 26 + 2.3-1/src/c/auxiliaryFunctions/isnan/disnana.c | 22 + 2.3-1/src/c/auxiliaryFunctions/isnan/disnans.c | 23 + 2.3-1/src/c/auxiliaryFunctions/isnan/sisnana.c | 22 + 2.3-1/src/c/auxiliaryFunctions/isnan/sisnans.c | 23 + 2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.c | 157 + 2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.h | 40 + .../isnan/test_IsNan/testIsNan.vcxproj | 185 + .../isnan/test_IsNan/testIsNan.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/isnan/zisnana.c | 22 + 2.3-1/src/c/auxiliaryFunctions/isnan/zisnans.c | 22 + 2.3-1/src/c/auxiliaryFunctions/length/Makefile.am | 37 + 2.3-1/src/c/auxiliaryFunctions/length/Makefile.in | 611 ++++ 2.3-1/src/c/auxiliaryFunctions/length/testLength.c | 106 + 2.3-1/src/c/auxiliaryFunctions/length/testLength.h | 33 + .../length/test_Length/testLength.vcxproj | 177 + .../length/test_Length/testLength.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.am | 58 + 2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.in | 737 ++++ 2.3-1/src/c/auxiliaryFunctions/pythag/cpythags.c | 18 + 2.3-1/src/c/auxiliaryFunctions/pythag/dpythags.c | 18 + 2.3-1/src/c/auxiliaryFunctions/pythag/spythags.c | 17 + 2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.c | 52 + 2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.h | 27 + .../pythag/test_Pythag/testPythag.vcxproj | 177 + .../pythag/test_Pythag/testPythag.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/pythag/zpythags.c | 18 + 2.3-1/src/c/auxiliaryFunctions/rand/Makefile.am | 52 + 2.3-1/src/c/auxiliaryFunctions/rand/Makefile.in | 758 ++++ 2.3-1/src/c/auxiliaryFunctions/rand/cranda.c | 20 + 2.3-1/src/c/auxiliaryFunctions/rand/crands.c | 18 + 2.3-1/src/c/auxiliaryFunctions/rand/dranda.c | 20 + 2.3-1/src/c/auxiliaryFunctions/rand/drands.c | 71 + 2.3-1/src/c/auxiliaryFunctions/rand/sranda.c | 20 + 2.3-1/src/c/auxiliaryFunctions/rand/srands.c | 18 + 2.3-1/src/c/auxiliaryFunctions/rand/testRand.c | 101 + 2.3-1/src/c/auxiliaryFunctions/rand/testRand.h | 32 + .../rand/test_Rand/testRand.vcxproj | 177 + .../rand/test_Rand/testRand.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/rand/zranda.c | 25 + 2.3-1/src/c/auxiliaryFunctions/rand/zrands.c | 22 + 2.3-1/src/c/auxiliaryFunctions/sign/Makefile.am | 60 + 2.3-1/src/c/auxiliaryFunctions/sign/Makefile.in | 772 +++++ 2.3-1/src/c/auxiliaryFunctions/sign/csigna.c | 21 + 2.3-1/src/c/auxiliaryFunctions/sign/csigns.c | 19 + 2.3-1/src/c/auxiliaryFunctions/sign/dsigna.c | 22 + 2.3-1/src/c/auxiliaryFunctions/sign/dsigns.c | 24 + 2.3-1/src/c/auxiliaryFunctions/sign/ssigna.c | 21 + 2.3-1/src/c/auxiliaryFunctions/sign/ssigns.c | 24 + 2.3-1/src/c/auxiliaryFunctions/sign/testSign.c | 106 + 2.3-1/src/c/auxiliaryFunctions/sign/testSign.h | 30 + .../sign/test_Sign/testSign.vcxproj | 185 + .../sign/test_Sign/testSign.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/sign/zsigna.c | 21 + 2.3-1/src/c/auxiliaryFunctions/sign/zsigns.c | 19 + 2.3-1/src/c/auxiliaryFunctions/size/Makefile.am | 37 + 2.3-1/src/c/auxiliaryFunctions/size/Makefile.in | 611 ++++ 2.3-1/src/c/auxiliaryFunctions/size/dallsizea.c | 34 + 2.3-1/src/c/auxiliaryFunctions/size/testSize.c | 106 + 2.3-1/src/c/auxiliaryFunctions/size/testSize.h | 33 + .../size/test_Size/testSize.vcxproj | 177 + .../size/test_Size/testSize.vcxproj.filters | 27 + 2.3-1/src/c/auxiliaryFunctions/type/Makefile.am | 37 + 2.3-1/src/c/auxiliaryFunctions/type/Makefile.in | 611 ++++ 2.3-1/src/c/auxiliaryFunctions/type/testType.c | 155 + 2.3-1/src/c/auxiliaryFunctions/type/testType.h | 41 + .../type/test_Type/testType.vcxproj | 181 + .../type/test_Type/testType.vcxproj.filters | 27 + 2.3-1/src/c/elementaryFunctions/Makefile.am | 40 + 2.3-1/src/c/elementaryFunctions/Makefile.in | 587 ++++ 2.3-1/src/c/elementaryFunctions/acos/Makefile.am | 73 + 2.3-1/src/c/elementaryFunctions/acos/Makefile.in | 813 +++++ 2.3-1/src/c/elementaryFunctions/acos/cacosa.c | 20 + 2.3-1/src/c/elementaryFunctions/acos/cacoss.c | 147 + 2.3-1/src/c/elementaryFunctions/acos/dacosa.c | 20 + 2.3-1/src/c/elementaryFunctions/acos/dacoss.c | 19 + 2.3-1/src/c/elementaryFunctions/acos/sacosa.c | 20 + 2.3-1/src/c/elementaryFunctions/acos/sacoss.c | 18 + 2.3-1/src/c/elementaryFunctions/acos/testAcos.h | 38 + .../src/c/elementaryFunctions/acos/testCplxAcos.c | 681 ++++ .../src/c/elementaryFunctions/acos/testRealsAcos.c | 647 ++++ .../acos/test_cplxacos/test_cplxacos.vcxproj | 182 + .../test_cplxacos/test_cplxacos.vcxproj.filters | 27 + .../acos/test_realsacos/testrealsacos.vcxproj | 174 + .../test_realsacos/testrealsacos.vcxproj.filters | 22 + 2.3-1/src/c/elementaryFunctions/acos/zacosa.c | 20 + 2.3-1/src/c/elementaryFunctions/acos/zacoss.c | 147 + 2.3-1/src/c/elementaryFunctions/acosh/Makefile.am | 72 + 2.3-1/src/c/elementaryFunctions/acosh/Makefile.in | 816 +++++ 2.3-1/src/c/elementaryFunctions/acosh/cacosha.c | 20 + 2.3-1/src/c/elementaryFunctions/acosh/cacoshs.c | 33 + 2.3-1/src/c/elementaryFunctions/acosh/dacosha.c | 20 + 2.3-1/src/c/elementaryFunctions/acosh/dacoshs.c | 25 + 2.3-1/src/c/elementaryFunctions/acosh/sacosha.c | 20 + 2.3-1/src/c/elementaryFunctions/acosh/sacoshs.c | 25 + 2.3-1/src/c/elementaryFunctions/acosh/testAcosh.h | 39 + .../c/elementaryFunctions/acosh/testDoubleAcosh.c | 512 +++ .../c/elementaryFunctions/acosh/testFloatAcosh.c | 510 +++ .../acosh/test_FloatAcosh/testFloatAcosh.vcxproj | 178 + .../test_FloatAcosh/testFloatAcosh.vcxproj.filters | 22 + .../test_doubleacosh/test_doubleacosh.vcxproj | 179 + .../test_doubleacosh.vcxproj.filters | 22 + 2.3-1/src/c/elementaryFunctions/acosh/zacosha.c | 20 + 2.3-1/src/c/elementaryFunctions/acosh/zacoshs.c | 33 + 2.3-1/src/c/elementaryFunctions/asin/Makefile.am | 72 + 2.3-1/src/c/elementaryFunctions/asin/Makefile.in | 812 +++++ 2.3-1/src/c/elementaryFunctions/asin/casina.c | 20 + 2.3-1/src/c/elementaryFunctions/asin/casins.c | 146 + 2.3-1/src/c/elementaryFunctions/asin/dasina.c | 20 + 2.3-1/src/c/elementaryFunctions/asin/dasins.c | 18 + 2.3-1/src/c/elementaryFunctions/asin/sasina.c | 20 + 2.3-1/src/c/elementaryFunctions/asin/sasins.c | 18 + 2.3-1/src/c/elementaryFunctions/asin/testAsin.h | 41 + .../c/elementaryFunctions/asin/testDoubleAsin.c | 495 +++ .../src/c/elementaryFunctions/asin/testFloatAsin.c | 497 +++ 2.3-1/src/c/elementaryFunctions/asin/zasina.c | 20 + 2.3-1/src/c/elementaryFunctions/asin/zasins.c | 146 + 2.3-1/src/c/elementaryFunctions/asinh/Makefile.am | 69 + 2.3-1/src/c/elementaryFunctions/asinh/Makefile.in | 812 +++++ 2.3-1/src/c/elementaryFunctions/asinh/casinha.c | 20 + 2.3-1/src/c/elementaryFunctions/asinh/casinhs.c | 26 + 2.3-1/src/c/elementaryFunctions/asinh/dasinha.c | 20 + 2.3-1/src/c/elementaryFunctions/asinh/dasinhs.c | 24 + 2.3-1/src/c/elementaryFunctions/asinh/sasinha.c | 20 + 2.3-1/src/c/elementaryFunctions/asinh/sasinhs.c | 24 + 2.3-1/src/c/elementaryFunctions/asinh/testAsinh.h | 41 + .../c/elementaryFunctions/asinh/testDoubleAsinh.c | 497 +++ .../c/elementaryFunctions/asinh/testFloatAsinh.c | 497 +++ 2.3-1/src/c/elementaryFunctions/asinh/zasinha.c | 20 + 2.3-1/src/c/elementaryFunctions/asinh/zasinhs.c | 26 + 2.3-1/src/c/elementaryFunctions/atan/Makefile.am | 67 + 2.3-1/src/c/elementaryFunctions/atan/Makefile.in | 803 +++++ 2.3-1/src/c/elementaryFunctions/atan/catana.c | 20 + 2.3-1/src/c/elementaryFunctions/atan/catans.c | 249 ++ 2.3-1/src/c/elementaryFunctions/atan/datana.c | 20 + 2.3-1/src/c/elementaryFunctions/atan/datans.c | 18 + 2.3-1/src/c/elementaryFunctions/atan/satana.c | 20 + 2.3-1/src/c/elementaryFunctions/atan/satans.c | 18 + 2.3-1/src/c/elementaryFunctions/atan/testAtan.h | 40 + .../c/elementaryFunctions/atan/testDoubleAtan.c | 496 +++ .../src/c/elementaryFunctions/atan/testFloatAtan.c | 502 +++ 2.3-1/src/c/elementaryFunctions/atan/zatana.c | 20 + 2.3-1/src/c/elementaryFunctions/atan/zatans.c | 242 ++ 2.3-1/src/c/elementaryFunctions/atan2/Makefile.am | 58 + 2.3-1/src/c/elementaryFunctions/atan2/Makefile.in | 726 ++++ 2.3-1/src/c/elementaryFunctions/atan2/datan2a.c | 26 + 2.3-1/src/c/elementaryFunctions/atan2/datan2s.c | 18 + 2.3-1/src/c/elementaryFunctions/atan2/satan2a.c | 26 + 2.3-1/src/c/elementaryFunctions/atan2/satan2s.c | 18 + 2.3-1/src/c/elementaryFunctions/atan2/testAtan2.c | 429 +++ 2.3-1/src/c/elementaryFunctions/atanh/Makefile.am | 68 + 2.3-1/src/c/elementaryFunctions/atanh/Makefile.in | 809 +++++ 2.3-1/src/c/elementaryFunctions/atanh/catanha.c | 20 + 2.3-1/src/c/elementaryFunctions/atanh/catanhs.c | 20 + 2.3-1/src/c/elementaryFunctions/atanh/datanha.c | 20 + 2.3-1/src/c/elementaryFunctions/atanh/datanhs.c | 23 + 2.3-1/src/c/elementaryFunctions/atanh/satanha.c | 20 + 2.3-1/src/c/elementaryFunctions/atanh/satanhs.c | 18 + 2.3-1/src/c/elementaryFunctions/atanh/testAtanh.h | 40 + .../c/elementaryFunctions/atanh/testDoubleAtanh.c | 605 ++++ .../c/elementaryFunctions/atanh/testFloatAtanh.c | 600 ++++ 2.3-1/src/c/elementaryFunctions/atanh/zatanha.c | 20 + 2.3-1/src/c/elementaryFunctions/atanh/zatanhs.c | 25 + .../auxiliaryFunctions_Import.def | 8 + 2.3-1/src/c/elementaryFunctions/ceil/Makefile.am | 60 + 2.3-1/src/c/elementaryFunctions/ceil/Makefile.in | 788 +++++ 2.3-1/src/c/elementaryFunctions/ceil/cceila.c | 19 + 2.3-1/src/c/elementaryFunctions/ceil/cceils.c | 21 + 2.3-1/src/c/elementaryFunctions/ceil/dceila.c | 19 + 2.3-1/src/c/elementaryFunctions/ceil/dceils.c | 18 + 2.3-1/src/c/elementaryFunctions/ceil/sceila.c | 19 + 2.3-1/src/c/elementaryFunctions/ceil/sceils.c | 18 + .../c/elementaryFunctions/ceil/testDoubleCeil.c | 153 + .../src/c/elementaryFunctions/ceil/testFloatCeil.c | 149 + 2.3-1/src/c/elementaryFunctions/ceil/zceila.c | 19 + 2.3-1/src/c/elementaryFunctions/ceil/zceils.c | 21 + 2.3-1/src/c/elementaryFunctions/cos/Makefile.am | 71 + 2.3-1/src/c/elementaryFunctions/cos/Makefile.in | 810 +++++ 2.3-1/src/c/elementaryFunctions/cos/ccosa.c | 20 + 2.3-1/src/c/elementaryFunctions/cos/ccoss.c | 24 + 2.3-1/src/c/elementaryFunctions/cos/dcosa.c | 20 + 2.3-1/src/c/elementaryFunctions/cos/dcoss.c | 18 + 2.3-1/src/c/elementaryFunctions/cos/scosa.c | 20 + 2.3-1/src/c/elementaryFunctions/cos/scoss.c | 18 + 2.3-1/src/c/elementaryFunctions/cos/testCos.h | 41 + .../src/c/elementaryFunctions/cos/testDoubleCos.c | 496 +++ 2.3-1/src/c/elementaryFunctions/cos/testFloatCos.c | 494 +++ 2.3-1/src/c/elementaryFunctions/cos/zcosa.c | 20 + 2.3-1/src/c/elementaryFunctions/cos/zcoss.c | 24 + 2.3-1/src/c/elementaryFunctions/cosh/Makefile.am | 70 + 2.3-1/src/c/elementaryFunctions/cosh/Makefile.in | 811 +++++ 2.3-1/src/c/elementaryFunctions/cosh/ccosha.c | 20 + 2.3-1/src/c/elementaryFunctions/cosh/ccoshs.c | 20 + 2.3-1/src/c/elementaryFunctions/cosh/dcosha.c | 20 + 2.3-1/src/c/elementaryFunctions/cosh/dcoshs.c | 26 + 2.3-1/src/c/elementaryFunctions/cosh/scosha.c | 20 + 2.3-1/src/c/elementaryFunctions/cosh/scoshs.c | 26 + 2.3-1/src/c/elementaryFunctions/cosh/testCosh.h | 40 + .../c/elementaryFunctions/cosh/testDoubleCosh.c | 507 +++ .../src/c/elementaryFunctions/cosh/testFloatCosh.c | 497 +++ 2.3-1/src/c/elementaryFunctions/cosh/zcosha.c | 20 + 2.3-1/src/c/elementaryFunctions/cosh/zcoshs.c | 21 + .../elementaryFunctions.vcxproj | 1562 +++++++++ .../elementaryFunctions.vcxproj.filters | 857 +++++ 2.3-1/src/c/elementaryFunctions/exp/Makefile.am | 65 + 2.3-1/src/c/elementaryFunctions/exp/Makefile.in | 804 +++++ 2.3-1/src/c/elementaryFunctions/exp/cexpa.c | 20 + 2.3-1/src/c/elementaryFunctions/exp/cexps.c | 23 + 2.3-1/src/c/elementaryFunctions/exp/dexpa.c | 20 + 2.3-1/src/c/elementaryFunctions/exp/dexps.c | 18 + 2.3-1/src/c/elementaryFunctions/exp/sexpa.c | 20 + 2.3-1/src/c/elementaryFunctions/exp/sexps.c | 18 + .../src/c/elementaryFunctions/exp/testDoubleExp.c | 499 +++ 2.3-1/src/c/elementaryFunctions/exp/testExp.h | 41 + 2.3-1/src/c/elementaryFunctions/exp/testFloatExp.c | 514 +++ 2.3-1/src/c/elementaryFunctions/exp/zexpa.c | 20 + 2.3-1/src/c/elementaryFunctions/exp/zexps.c | 23 + 2.3-1/src/c/elementaryFunctions/exp10/Makefile.am | 71 + 2.3-1/src/c/elementaryFunctions/exp10/Makefile.in | 817 +++++ 2.3-1/src/c/elementaryFunctions/exp10/cexp10a.c | 20 + 2.3-1/src/c/elementaryFunctions/exp10/cexp10s.c | 18 + 2.3-1/src/c/elementaryFunctions/exp10/dexp10a.c | 20 + 2.3-1/src/c/elementaryFunctions/exp10/dexp10s.c | 18 + 2.3-1/src/c/elementaryFunctions/exp10/sexp10a.c | 20 + 2.3-1/src/c/elementaryFunctions/exp10/sexp10s.c | 18 + .../c/elementaryFunctions/exp10/testDoubleExp10.c | 496 +++ 2.3-1/src/c/elementaryFunctions/exp10/testExp10.h | 41 + .../c/elementaryFunctions/exp10/testFloatExp10.c | 495 +++ 2.3-1/src/c/elementaryFunctions/exp10/zexp10a.c | 20 + 2.3-1/src/c/elementaryFunctions/exp10/zexp10s.c | 18 + 2.3-1/src/c/elementaryFunctions/fix/Makefile.am | 60 + 2.3-1/src/c/elementaryFunctions/fix/Makefile.in | 788 +++++ 2.3-1/src/c/elementaryFunctions/fix/cfixa.c | 18 + 2.3-1/src/c/elementaryFunctions/fix/cfixs.c | 26 + 2.3-1/src/c/elementaryFunctions/fix/dfixa.c | 19 + 2.3-1/src/c/elementaryFunctions/fix/dfixs.c | 19 + 2.3-1/src/c/elementaryFunctions/fix/sfixa.c | 19 + 2.3-1/src/c/elementaryFunctions/fix/sfixs.c | 19 + .../src/c/elementaryFunctions/fix/testDoubleFix.c | 150 + 2.3-1/src/c/elementaryFunctions/fix/testFloatFix.c | 148 + 2.3-1/src/c/elementaryFunctions/fix/zfixa.c | 19 + 2.3-1/src/c/elementaryFunctions/fix/zfixs.c | 26 + 2.3-1/src/c/elementaryFunctions/floor/Makefile.am | 60 + 2.3-1/src/c/elementaryFunctions/floor/Makefile.in | 790 +++++ 2.3-1/src/c/elementaryFunctions/floor/cfloora.c | 19 + 2.3-1/src/c/elementaryFunctions/floor/cfloors.c | 21 + 2.3-1/src/c/elementaryFunctions/floor/dfloora.c | 19 + 2.3-1/src/c/elementaryFunctions/floor/dfloors.c | 18 + 2.3-1/src/c/elementaryFunctions/floor/sfloora.c | 19 + 2.3-1/src/c/elementaryFunctions/floor/sfloors.c | 18 + .../c/elementaryFunctions/floor/testDoubleFloor.c | 152 + .../c/elementaryFunctions/floor/testFloatFloor.c | 147 + 2.3-1/src/c/elementaryFunctions/floor/zfloora.c | 19 + 2.3-1/src/c/elementaryFunctions/floor/zfloors.c | 21 + 2.3-1/src/c/elementaryFunctions/includes/acos.h | 89 + 2.3-1/src/c/elementaryFunctions/includes/acosh.h | 91 + 2.3-1/src/c/elementaryFunctions/includes/asin.h | 90 + 2.3-1/src/c/elementaryFunctions/includes/asinh.h | 90 + 2.3-1/src/c/elementaryFunctions/includes/atan.h | 90 + 2.3-1/src/c/elementaryFunctions/includes/atan2.h | 57 + 2.3-1/src/c/elementaryFunctions/includes/atanh.h | 91 + 2.3-1/src/c/elementaryFunctions/includes/ceil.h | 50 + 2.3-1/src/c/elementaryFunctions/includes/cos.h | 88 + 2.3-1/src/c/elementaryFunctions/includes/cosh.h | 90 + .../includes/dynlib_elementaryfunctions.h | 26 + 2.3-1/src/c/elementaryFunctions/includes/exp.h | 90 + 2.3-1/src/c/elementaryFunctions/includes/exp10.h | 90 + 2.3-1/src/c/elementaryFunctions/includes/fix.h | 52 + 2.3-1/src/c/elementaryFunctions/includes/floor.h | 49 + 2.3-1/src/c/elementaryFunctions/includes/int.h | 49 + 2.3-1/src/c/elementaryFunctions/includes/lnp1m1.h | 46 + 2.3-1/src/c/elementaryFunctions/includes/log.h | 89 + 2.3-1/src/c/elementaryFunctions/includes/log10.h | 89 + 2.3-1/src/c/elementaryFunctions/includes/log1p.h | 88 + 2.3-1/src/c/elementaryFunctions/includes/pow.h | 43 + 2.3-1/src/c/elementaryFunctions/includes/round.h | 48 + 2.3-1/src/c/elementaryFunctions/includes/sin.h | 89 + 2.3-1/src/c/elementaryFunctions/includes/sinh.h | 88 + 2.3-1/src/c/elementaryFunctions/includes/sqrt.h | 88 + 2.3-1/src/c/elementaryFunctions/includes/tan.h | 89 + 2.3-1/src/c/elementaryFunctions/includes/tanh.h | 88 + 2.3-1/src/c/elementaryFunctions/int/Makefile.am | 61 + 2.3-1/src/c/elementaryFunctions/int/Makefile.in | 790 +++++ 2.3-1/src/c/elementaryFunctions/int/cinta.c | 18 + 2.3-1/src/c/elementaryFunctions/int/cints.c | 19 + 2.3-1/src/c/elementaryFunctions/int/dinta.c | 19 + 2.3-1/src/c/elementaryFunctions/int/dints.c | 19 + 2.3-1/src/c/elementaryFunctions/int/sinta.c | 19 + 2.3-1/src/c/elementaryFunctions/int/sints.c | 19 + .../src/c/elementaryFunctions/int/testDoubleInt.c | 160 + 2.3-1/src/c/elementaryFunctions/int/testFloatInt.c | 149 + 2.3-1/src/c/elementaryFunctions/int/zinta.c | 18 + 2.3-1/src/c/elementaryFunctions/int/zints.c | 19 + .../elementaryFunctions/interfaces/int_OpDotHat.h | 139 + .../c/elementaryFunctions/interfaces/int_OpHat.h | 110 + .../c/elementaryFunctions/interfaces/int_acos.h | 42 + .../c/elementaryFunctions/interfaces/int_acosh.h | 42 + .../c/elementaryFunctions/interfaces/int_asin.h | 42 + .../c/elementaryFunctions/interfaces/int_asinh.h | 34 + .../c/elementaryFunctions/interfaces/int_atan.h | 44 + .../c/elementaryFunctions/interfaces/int_atanh.h | 42 + .../c/elementaryFunctions/interfaces/int_ceil.h | 34 + .../src/c/elementaryFunctions/interfaces/int_cos.h | 34 + .../c/elementaryFunctions/interfaces/int_cosh.h | 34 + .../src/c/elementaryFunctions/interfaces/int_exp.h | 34 + .../c/elementaryFunctions/interfaces/int_exp10.h | 34 + .../src/c/elementaryFunctions/interfaces/int_fix.h | 34 + .../c/elementaryFunctions/interfaces/int_floor.h | 34 + .../src/c/elementaryFunctions/interfaces/int_int.h | 34 + .../c/elementaryFunctions/interfaces/int_lnp1m1.h | 26 + .../src/c/elementaryFunctions/interfaces/int_log.h | 42 + .../c/elementaryFunctions/interfaces/int_log10.h | 42 + .../c/elementaryFunctions/interfaces/int_log1p.h | 41 + .../src/c/elementaryFunctions/interfaces/int_pow.h | 34 + .../c/elementaryFunctions/interfaces/int_round.h | 34 + .../src/c/elementaryFunctions/interfaces/int_sin.h | 34 + .../c/elementaryFunctions/interfaces/int_sinh.h | 34 + .../c/elementaryFunctions/interfaces/int_sqrt.h | 59 + .../src/c/elementaryFunctions/interfaces/int_tan.h | 34 + .../c/elementaryFunctions/interfaces/int_tanh.h | 34 + 2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.am | 56 + 2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.in | 743 ++++ 2.3-1/src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c | 77 + 2.3-1/src/c/elementaryFunctions/lnp1m1/slnp1m1s.c | 77 + .../elementaryFunctions/lnp1m1/testDoubleLnp1m1.c | 36 + .../c/elementaryFunctions/lnp1m1/testFloatLnp1m1.c | 36 + .../src/c/elementaryFunctions/lnp1m1/testLnp1m1.h | 26 + 2.3-1/src/c/elementaryFunctions/log/Makefile.am | 65 + 2.3-1/src/c/elementaryFunctions/log/Makefile.in | 802 +++++ 2.3-1/src/c/elementaryFunctions/log/cloga.c | 20 + 2.3-1/src/c/elementaryFunctions/log/clogs.c | 65 + 2.3-1/src/c/elementaryFunctions/log/dloga.c | 20 + 2.3-1/src/c/elementaryFunctions/log/dlogs.c | 18 + 2.3-1/src/c/elementaryFunctions/log/sloga.c | 20 + 2.3-1/src/c/elementaryFunctions/log/slogs.c | 18 + .../src/c/elementaryFunctions/log/testDoubleLog.c | 956 ++++++ 2.3-1/src/c/elementaryFunctions/log/testFloatLog.c | 958 ++++++ 2.3-1/src/c/elementaryFunctions/log/testLog.h | 39 + 2.3-1/src/c/elementaryFunctions/log/zloga.c | 20 + 2.3-1/src/c/elementaryFunctions/log/zlogs.c | 65 + 2.3-1/src/c/elementaryFunctions/log10/Makefile.am | 67 + 2.3-1/src/c/elementaryFunctions/log10/Makefile.in | 808 +++++ 2.3-1/src/c/elementaryFunctions/log10/clog10a.c | 20 + 2.3-1/src/c/elementaryFunctions/log10/clog10s.c | 19 + 2.3-1/src/c/elementaryFunctions/log10/dlog10a.c | 20 + 2.3-1/src/c/elementaryFunctions/log10/dlog10s.c | 18 + 2.3-1/src/c/elementaryFunctions/log10/slog10a.c | 20 + 2.3-1/src/c/elementaryFunctions/log10/slog10s.c | 18 + .../c/elementaryFunctions/log10/testDoubleLog10.c | 495 +++ .../c/elementaryFunctions/log10/testFloatLog10.c | 495 +++ 2.3-1/src/c/elementaryFunctions/log10/testLog10.h | 39 + 2.3-1/src/c/elementaryFunctions/log10/zlog10a.c | 20 + 2.3-1/src/c/elementaryFunctions/log10/zlog10s.c | 19 + 2.3-1/src/c/elementaryFunctions/log1p/Makefile.am | 66 + 2.3-1/src/c/elementaryFunctions/log1p/Makefile.in | 806 +++++ 2.3-1/src/c/elementaryFunctions/log1p/clog1pa.c | 20 + 2.3-1/src/c/elementaryFunctions/log1p/clog1ps.c | 18 + 2.3-1/src/c/elementaryFunctions/log1p/dlog1pa.c | 20 + 2.3-1/src/c/elementaryFunctions/log1p/dlog1ps.c | 34 + 2.3-1/src/c/elementaryFunctions/log1p/slog1pa.c | 20 + 2.3-1/src/c/elementaryFunctions/log1p/slog1ps.c | 35 + .../c/elementaryFunctions/log1p/testDoubleLog1p.c | 1255 +++++++ .../c/elementaryFunctions/log1p/testFloatLog1p.c | 966 ++++++ 2.3-1/src/c/elementaryFunctions/log1p/testLog1p.h | 38 + 2.3-1/src/c/elementaryFunctions/log1p/zlog1pa.c | 20 + 2.3-1/src/c/elementaryFunctions/log1p/zlog1ps.c | 18 + 2.3-1/src/c/elementaryFunctions/pow/Makefile.am | 71 + 2.3-1/src/c/elementaryFunctions/pow/Makefile.in | 815 +++++ 2.3-1/src/c/elementaryFunctions/pow/cpowa.c | 25 + 2.3-1/src/c/elementaryFunctions/pow/cpows.c | 28 + 2.3-1/src/c/elementaryFunctions/pow/dpowa.c | 25 + 2.3-1/src/c/elementaryFunctions/pow/dpows.c | 18 + 2.3-1/src/c/elementaryFunctions/pow/spowa.c | 25 + 2.3-1/src/c/elementaryFunctions/pow/spows.c | 18 + .../src/c/elementaryFunctions/pow/testDoublePow.c | 519 +++ 2.3-1/src/c/elementaryFunctions/pow/testFloatPow.c | 521 +++ 2.3-1/src/c/elementaryFunctions/pow/testPow.h | 41 + 2.3-1/src/c/elementaryFunctions/pow/zpowa.c | 25 + 2.3-1/src/c/elementaryFunctions/pow/zpows.c | 28 + 2.3-1/src/c/elementaryFunctions/round/Makefile.am | 59 + 2.3-1/src/c/elementaryFunctions/round/Makefile.in | 786 +++++ 2.3-1/src/c/elementaryFunctions/round/crounda.c | 19 + 2.3-1/src/c/elementaryFunctions/round/crounds.c | 29 + 2.3-1/src/c/elementaryFunctions/round/drounda.c | 20 + 2.3-1/src/c/elementaryFunctions/round/drounds.c | 22 + 2.3-1/src/c/elementaryFunctions/round/srounda.c | 20 + 2.3-1/src/c/elementaryFunctions/round/srounds.c | 23 + .../c/elementaryFunctions/round/testDoubleRound.c | 152 + .../c/elementaryFunctions/round/testFloatRound.c | 148 + 2.3-1/src/c/elementaryFunctions/round/zrounda.c | 20 + 2.3-1/src/c/elementaryFunctions/round/zrounds.c | 29 + 2.3-1/src/c/elementaryFunctions/sin/Makefile.am | 68 + 2.3-1/src/c/elementaryFunctions/sin/Makefile.in | 808 +++++ 2.3-1/src/c/elementaryFunctions/sin/csina.c | 20 + 2.3-1/src/c/elementaryFunctions/sin/csins.c | 23 + 2.3-1/src/c/elementaryFunctions/sin/dsina.c | 20 + 2.3-1/src/c/elementaryFunctions/sin/dsins.c | 18 + 2.3-1/src/c/elementaryFunctions/sin/ssina.c | 20 + 2.3-1/src/c/elementaryFunctions/sin/ssins.c | 18 + .../src/c/elementaryFunctions/sin/testDoubleSin.c | 498 +++ 2.3-1/src/c/elementaryFunctions/sin/testFloatSin.c | 494 +++ 2.3-1/src/c/elementaryFunctions/sin/testSin.h | 40 + 2.3-1/src/c/elementaryFunctions/sin/zsina.c | 20 + 2.3-1/src/c/elementaryFunctions/sin/zsins.c | 23 + 2.3-1/src/c/elementaryFunctions/sinh/Makefile.am | 68 + 2.3-1/src/c/elementaryFunctions/sinh/Makefile.in | 808 +++++ 2.3-1/src/c/elementaryFunctions/sinh/csinha.c | 20 + 2.3-1/src/c/elementaryFunctions/sinh/csinhs.c | 22 + 2.3-1/src/c/elementaryFunctions/sinh/dsinha.c | 20 + 2.3-1/src/c/elementaryFunctions/sinh/dsinhs.c | 18 + 2.3-1/src/c/elementaryFunctions/sinh/ssinha.c | 20 + 2.3-1/src/c/elementaryFunctions/sinh/ssinhs.c | 18 + .../c/elementaryFunctions/sinh/testDoubleSinh.c | 511 +++ .../src/c/elementaryFunctions/sinh/testFloatSinh.c | 495 +++ 2.3-1/src/c/elementaryFunctions/sinh/testSinh.h | 40 + 2.3-1/src/c/elementaryFunctions/sinh/zsinha.c | 20 + 2.3-1/src/c/elementaryFunctions/sinh/zsinhs.c | 22 + 2.3-1/src/c/elementaryFunctions/sqrt/Makefile.am | 65 + 2.3-1/src/c/elementaryFunctions/sqrt/Makefile.in | 800 +++++ 2.3-1/src/c/elementaryFunctions/sqrt/csqrta.c | 20 + 2.3-1/src/c/elementaryFunctions/sqrt/csqrts.c | 111 + 2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c | 20 + 2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c | 18 + 2.3-1/src/c/elementaryFunctions/sqrt/ssqrta.c | 20 + 2.3-1/src/c/elementaryFunctions/sqrt/ssqrts.c | 18 + .../c/elementaryFunctions/sqrt/testDoubleSqrt.c | 497 +++ .../src/c/elementaryFunctions/sqrt/testFloatSqrt.c | 496 +++ 2.3-1/src/c/elementaryFunctions/sqrt/testSqrt.h | 40 + 2.3-1/src/c/elementaryFunctions/sqrt/zsqrta.c | 20 + 2.3-1/src/c/elementaryFunctions/sqrt/zsqrts.c | 111 + 2.3-1/src/c/elementaryFunctions/tan/Makefile.am | 73 + 2.3-1/src/c/elementaryFunctions/tan/Makefile.in | 818 +++++ 2.3-1/src/c/elementaryFunctions/tan/ctana.c | 20 + 2.3-1/src/c/elementaryFunctions/tan/ctans.c | 45 + 2.3-1/src/c/elementaryFunctions/tan/dtana.c | 20 + 2.3-1/src/c/elementaryFunctions/tan/dtans.c | 18 + 2.3-1/src/c/elementaryFunctions/tan/stana.c | 20 + 2.3-1/src/c/elementaryFunctions/tan/stans.c | 18 + .../src/c/elementaryFunctions/tan/testDoubleTan.c | 497 +++ 2.3-1/src/c/elementaryFunctions/tan/testFloatTan.c | 495 +++ 2.3-1/src/c/elementaryFunctions/tan/testTan.h | 36 + 2.3-1/src/c/elementaryFunctions/tan/ztana.c | 20 + 2.3-1/src/c/elementaryFunctions/tan/ztans.c | 104 + 2.3-1/src/c/elementaryFunctions/tanh/Makefile.am | 73 + 2.3-1/src/c/elementaryFunctions/tanh/Makefile.in | 819 +++++ 2.3-1/src/c/elementaryFunctions/tanh/ctanha.c | 20 + 2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c | 22 + 2.3-1/src/c/elementaryFunctions/tanh/dtanha.c | 20 + 2.3-1/src/c/elementaryFunctions/tanh/dtanhs.c | 18 + 2.3-1/src/c/elementaryFunctions/tanh/stanha.c | 20 + 2.3-1/src/c/elementaryFunctions/tanh/stanhs.c | 18 + .../c/elementaryFunctions/tanh/testDoubleTanh.c | 496 +++ .../src/c/elementaryFunctions/tanh/testFloatTanh.c | 494 +++ 2.3-1/src/c/elementaryFunctions/tanh/testTanh.h | 40 + 2.3-1/src/c/elementaryFunctions/tanh/ztanha.c | 20 + 2.3-1/src/c/elementaryFunctions/tanh/ztanhs.c | 22 + 2.3-1/src/c/implicitList/Makefile.am | 47 + 2.3-1/src/c/implicitList/Makefile.in | 749 ++++ 2.3-1/src/c/implicitList/cimplicitLists.c | 18 + 2.3-1/src/c/implicitList/dimplicitLists.c | 42 + 2.3-1/src/c/implicitList/dynlib_implicitlist.h | 26 + 2.3-1/src/c/implicitList/implicitList.h | 42 + 2.3-1/src/c/implicitList/implicitList.vcxproj | 204 ++ .../c/implicitList/implicitList.vcxproj.filters | 45 + 2.3-1/src/c/implicitList/int_OpColon.h | 101 + 2.3-1/src/c/implicitList/simplicitLists.c | 42 + 2.3-1/src/c/implicitList/testDoubleImplicitList.c | 142 + 2.3-1/src/c/implicitList/testFloatImplicitList.c | 65 + .../testDoubleImplicitList.vcxproj | 178 + .../testDoubleImplicitList.vcxproj.filters | 22 + .../testFloatImplicitList.vcxproj | 174 + .../testFloatImplicitList.vcxproj.filters | 22 + 2.3-1/src/c/implicitList/zimplicitLists.c | 18 + 2.3-1/src/c/matrixOperations/Makefile.am | 38 + 2.3-1/src/c/matrixOperations/Makefile.in | 583 ++++ 2.3-1/src/c/matrixOperations/cat/Makefile.am | 52 + 2.3-1/src/c/matrixOperations/cat/Makefile.in | 792 +++++ 2.3-1/src/c/matrixOperations/cat/ccata.c | 54 + 2.3-1/src/c/matrixOperations/cat/ccats.c | 23 + 2.3-1/src/c/matrixOperations/cat/dcata.c | 55 + 2.3-1/src/c/matrixOperations/cat/dcats.c | 23 + 2.3-1/src/c/matrixOperations/cat/scata.c | 55 + 2.3-1/src/c/matrixOperations/cat/scats.c | 23 + .../cat/testDoubleMatrixConcatenation.c | 342 ++ .../cat/testFloatMatrixConcatenation.c | 341 ++ .../testDoubleMatrixConcatenation.vcxproj | 178 + .../testDoubleMatrixConcatenation.vcxproj.filters | 22 + .../testFloatMatrixConcatenation.vcxproj | 178 + .../testFloatMatrixConcatenation.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/cat/zcata.c | 54 + 2.3-1/src/c/matrixOperations/cat/zcats.c | 24 + 2.3-1/src/c/matrixOperations/chol/Makefile.am | 71 + 2.3-1/src/c/matrixOperations/chol/Makefile.in | 772 +++++ 2.3-1/src/c/matrixOperations/chol/cchola.c | 91 + 2.3-1/src/c/matrixOperations/chol/dchola.c | 69 + 2.3-1/src/c/matrixOperations/chol/dchols.c | 22 + 2.3-1/src/c/matrixOperations/chol/schola.c | 80 + 2.3-1/src/c/matrixOperations/chol/schols.c | 23 + 2.3-1/src/c/matrixOperations/chol/testDoubleChol.c | 152 + 2.3-1/src/c/matrixOperations/chol/testFloatChol.c | 97 + .../chol/test_DoubleChol/testDoubleChol.vcxproj | 178 + .../test_DoubleChol/testDoubleChol.vcxproj.filters | 22 + .../chol/test_FloatChol/testFloatChol.vcxproj | 178 + .../test_FloatChol/testFloatChol.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/chol/zchola.c | 80 + 2.3-1/src/c/matrixOperations/determ/Makefile.am | 64 + 2.3-1/src/c/matrixOperations/determ/Makefile.in | 750 ++++ 2.3-1/src/c/matrixOperations/determ/cdeterma.c | 150 + 2.3-1/src/c/matrixOperations/determ/ddeterma.c | 92 + 2.3-1/src/c/matrixOperations/determ/sdeterma.c | 97 + .../c/matrixOperations/determ/testDoubleDeterm.c | 451 +++ .../c/matrixOperations/determ/testFloatDeterm.c | 453 +++ .../test_DoubleDeterm/testDoubleDeterm.vcxproj | 186 + .../testDoubleDeterm.vcxproj.filters | 22 + .../determ/test_DoubleDist/testDoubleDist.vcxproj | 178 + .../test_DoubleDist/testDoubleDist.vcxproj.filters | 22 + .../test_FloatDeterm/testFloatDeterm.vcxproj | 178 + .../testFloatDeterm.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/determ/zdeterma.c | 138 + 2.3-1/src/c/matrixOperations/dist/Makefile.am | 87 + 2.3-1/src/c/matrixOperations/dist/Makefile.in | 803 +++++ 2.3-1/src/c/matrixOperations/dist/cdista.c | 54 + 2.3-1/src/c/matrixOperations/dist/cdists.c | 25 + 2.3-1/src/c/matrixOperations/dist/ddista.c | 53 + 2.3-1/src/c/matrixOperations/dist/ddists.c | 21 + 2.3-1/src/c/matrixOperations/dist/sdista.c | 53 + 2.3-1/src/c/matrixOperations/dist/sdists.c | 20 + 2.3-1/src/c/matrixOperations/dist/testDoubleDist.c | 116 + 2.3-1/src/c/matrixOperations/dist/testFloatDist.c | 116 + .../dist/test_FloatDist/testFloatDist.vcxproj | 178 + .../test_FloatDist/testFloatDist.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/dist/zdista.c | 54 + 2.3-1/src/c/matrixOperations/dist/zdists.c | 25 + 2.3-1/src/c/matrixOperations/division/Makefile.am | 73 + 2.3-1/src/c/matrixOperations/division/Makefile.in | 880 +++++ 2.3-1/src/c/matrixOperations/division/cldivma.c | 65 + 2.3-1/src/c/matrixOperations/division/crdivcsv.c | 23 + 2.3-1/src/c/matrixOperations/division/crdivma.c | 62 + 2.3-1/src/c/matrixOperations/division/crdivscv.c | 23 + 2.3-1/src/c/matrixOperations/division/crdivv.c | 24 + 2.3-1/src/c/matrixOperations/division/dldivma.c | 111 + 2.3-1/src/c/matrixOperations/division/drdivma.c | 129 + 2.3-1/src/c/matrixOperations/division/drdivv.c | 24 + 2.3-1/src/c/matrixOperations/division/sldivma.c | 61 + 2.3-1/src/c/matrixOperations/division/srdivma.c | 63 + 2.3-1/src/c/matrixOperations/division/srdivv.c | 24 + .../division/testMatrixLDivision.c | 456 +++ .../division/testMatrixRDivision.c | 504 +++ .../testMatrixLDivision.vcxproj | 178 + .../testMatrixLDivision.vcxproj.filters | 22 + .../testMatrixRDivision.vcxproj | 178 + .../testMatrixRDivision.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/division/zldivma.c | 125 + 2.3-1/src/c/matrixOperations/division/zrdivdzv.c | 23 + 2.3-1/src/c/matrixOperations/division/zrdivma.c | 165 + 2.3-1/src/c/matrixOperations/division/zrdivv.c | 24 + 2.3-1/src/c/matrixOperations/division/zrdivzdv.c | 23 + 2.3-1/src/c/matrixOperations/expm/Makefile.am | 79 + 2.3-1/src/c/matrixOperations/expm/Makefile.in | 753 ++++ 2.3-1/src/c/matrixOperations/expm/cexpma.c | 173 + 2.3-1/src/c/matrixOperations/expm/dexpma.c | 163 + 2.3-1/src/c/matrixOperations/expm/sexpma.c | 167 + .../matrixOperations/expm/testMatrixExponential.c | 570 ++++ .../testMatrixExponential.vcxproj | 178 + .../testMatrixExponential.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/expm/zexpma.c | 178 + 2.3-1/src/c/matrixOperations/eye/Makefile.am | 46 + 2.3-1/src/c/matrixOperations/eye/Makefile.in | 712 ++++ 2.3-1/src/c/matrixOperations/eye/ceyea.c | 24 + 2.3-1/src/c/matrixOperations/eye/deyea.c | 23 + 2.3-1/src/c/matrixOperations/eye/seyea.c | 23 + 2.3-1/src/c/matrixOperations/eye/testMatrixEye.c | 348 ++ .../eye/test_MatrixEye/testMatrixEye.vcxproj | 178 + .../test_MatrixEye/testMatrixEye.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/eye/zeyea.c | 24 + 2.3-1/src/c/matrixOperations/fill/Makefile.am | 55 + 2.3-1/src/c/matrixOperations/fill/Makefile.in | 739 ++++ 2.3-1/src/c/matrixOperations/fill/cfilla.c | 21 + 2.3-1/src/c/matrixOperations/fill/dfilla.c | 22 + 2.3-1/src/c/matrixOperations/fill/sfilla.c | 22 + 2.3-1/src/c/matrixOperations/fill/testDoubleFill.c | 49 + 2.3-1/src/c/matrixOperations/fill/testFloatFill.c | 47 + .../fill/test_DoubleFill/testDoubleFill.vcxproj | 178 + .../test_DoubleFill/testDoubleFill.vcxproj.filters | 22 + .../fill/test_FloatFill/testFloatFill.vcxproj | 178 + .../test_FloatFill/testFloatFill.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/fill/zfilla.c | 22 + 2.3-1/src/c/matrixOperations/hilb/Makefile.am | 37 + 2.3-1/src/c/matrixOperations/hilb/Makefile.in | 688 ++++ 2.3-1/src/c/matrixOperations/hilb/dhilba.c | 43 + 2.3-1/src/c/matrixOperations/hilb/shilba.c | 44 + 2.3-1/src/c/matrixOperations/hilb/testHilbert.c | 112 + .../hilb/test_Hilbert/testHilbert.vcxproj | 174 + .../hilb/test_Hilbert/testHilbert.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/includes/cat.h | 105 + 2.3-1/src/c/matrixOperations/includes/chol.h | 43 + 2.3-1/src/c/matrixOperations/includes/determ.h | 39 + 2.3-1/src/c/matrixOperations/includes/dist.h | 48 + .../includes/dynlib_matrixoperations.h | 26 + 2.3-1/src/c/matrixOperations/includes/eye.h | 69 + 2.3-1/src/c/matrixOperations/includes/fill.h | 40 + 2.3-1/src/c/matrixOperations/includes/hilb.h | 46 + .../src/c/matrixOperations/includes/infiniteNorm.h | 67 + 2.3-1/src/c/matrixOperations/includes/jmat.h | 29 + 2.3-1/src/c/matrixOperations/includes/logm.h | 37 + .../c/matrixOperations/includes/matrixDivision.h | 102 + .../matrixOperations/includes/matrixExponential.h | 51 + .../c/matrixOperations/includes/matrixInversion.h | 66 + .../c/matrixOperations/includes/matrixMagnitude.h | 41 + .../includes/matrixMultiplication.h | 91 + 2.3-1/src/c/matrixOperations/includes/matrixPow.h | 43 + .../includes/matrixSquaredMagnitude.h | 41 + .../src/c/matrixOperations/includes/matrixTrace.h | 70 + .../c/matrixOperations/includes/matrixTranspose.h | 61 + 2.3-1/src/c/matrixOperations/includes/ones.h | 69 + 2.3-1/src/c/matrixOperations/includes/spec.h | 56 + 2.3-1/src/c/matrixOperations/includes/zeros.h | 74 + .../c/matrixOperations/infiniteNorm/Makefile.am | 58 + .../c/matrixOperations/infiniteNorm/Makefile.in | 734 ++++ .../c/matrixOperations/infiniteNorm/cinfnorma.c | 36 + .../c/matrixOperations/infiniteNorm/dinfnorma.c | 35 + .../c/matrixOperations/infiniteNorm/sinfnorma.c | 37 + .../infiniteNorm/testMatrixInfiniteNorm.c | 316 ++ .../testMatrixInfiniteNorm.vcxproj | 178 + .../testMatrixInfiniteNorm.vcxproj.filters | 22 + .../c/matrixOperations/infiniteNorm/zinfnorma.c | 34 + .../src/c/matrixOperations/interfaces/int_OpApex.h | 34 + .../matrixOperations/interfaces/int_OpBackSlash.h | 37 + 2.3-1/src/c/matrixOperations/interfaces/int_OpCc.h | 134 + .../c/matrixOperations/interfaces/int_OpDotApex.h | 34 + 2.3-1/src/c/matrixOperations/interfaces/int_OpRc.h | 139 + .../c/matrixOperations/interfaces/int_OpSlash.h | 38 + .../src/c/matrixOperations/interfaces/int_OpStar.h | 37 + 2.3-1/src/c/matrixOperations/interfaces/int_chol.h | 34 + 2.3-1/src/c/matrixOperations/interfaces/int_det.h | 34 + 2.3-1/src/c/matrixOperations/interfaces/int_dist.h | 34 + 2.3-1/src/c/matrixOperations/interfaces/int_expm.h | 26 + 2.3-1/src/c/matrixOperations/interfaces/int_eye.h | 53 + 2.3-1/src/c/matrixOperations/interfaces/int_fill.h | 51 + .../src/c/matrixOperations/interfaces/int_invert.h | 34 + 2.3-1/src/c/matrixOperations/interfaces/int_ones.h | 53 + 2.3-1/src/c/matrixOperations/interfaces/int_spec.h | 71 + .../src/c/matrixOperations/interfaces/int_trace.h | 34 + .../c/matrixOperations/interfaces/int_transpose.h | 34 + .../src/c/matrixOperations/interfaces/int_v2magn.h | 34 + .../src/c/matrixOperations/interfaces/int_vmagn.h | 35 + .../src/c/matrixOperations/interfaces/int_zeros.h | 54 + .../src/c/matrixOperations/interfaces/interface.sh | 6 + 2.3-1/src/c/matrixOperations/inversion/Makefile.am | 56 + 2.3-1/src/c/matrixOperations/inversion/Makefile.in | 731 ++++ 2.3-1/src/c/matrixOperations/inversion/cinverma.c | 53 + 2.3-1/src/c/matrixOperations/inversion/dinverma.c | 38 + 2.3-1/src/c/matrixOperations/inversion/sinverma.c | 55 + .../inversion/testMatrixInversion.c | 581 ++++ .../testMatrixInversion.vcxproj | 178 + .../testMatrixInversion.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/inversion/zinverma.c | 36 + 2.3-1/src/c/matrixOperations/jmat/Makefile.am | 35 + 2.3-1/src/c/matrixOperations/jmat/Makefile.in | 684 ++++ 2.3-1/src/c/matrixOperations/jmat/djmata.c | 22 + 2.3-1/src/c/matrixOperations/jmat/sjmata.c | 22 + 2.3-1/src/c/matrixOperations/jmat/testJmat.c | 20 + .../jmat/test_Jmat/testJmat.vcxproj | 178 + .../jmat/test_Jmat/testJmat.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/logm/Makefile.am | 81 + 2.3-1/src/c/matrixOperations/logm/Makefile.in | 763 +++++ 2.3-1/src/c/matrixOperations/logm/clogma.c | 37 + 2.3-1/src/c/matrixOperations/logm/dlogma.c | 31 + 2.3-1/src/c/matrixOperations/logm/slogma.c | 32 + 2.3-1/src/c/matrixOperations/logm/testDoubleLogm.c | 185 + 2.3-1/src/c/matrixOperations/logm/testFloatLogm.c | 185 + .../logm/test_DoubleLogm/testDoubleLogm.vcxproj | 178 + .../test_DoubleLogm/testDoubleLogm.vcxproj.filters | 22 + .../logm/test_FloatLogm/testFloatLogm.vcxproj | 178 + .../test_FloatLogm/testFloatLogm.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/logm/zlogma.c | 100 + 2.3-1/src/c/matrixOperations/magnitude/Makefile.am | 66 + 2.3-1/src/c/matrixOperations/magnitude/Makefile.in | 805 +++++ 2.3-1/src/c/matrixOperations/magnitude/cmagna.c | 44 + 2.3-1/src/c/matrixOperations/magnitude/cmagns.c | 23 + 2.3-1/src/c/matrixOperations/magnitude/dmagna.c | 43 + 2.3-1/src/c/matrixOperations/magnitude/dmagns.c | 23 + 2.3-1/src/c/matrixOperations/magnitude/smagna.c | 45 + 2.3-1/src/c/matrixOperations/magnitude/smagns.c | 23 + .../magnitude/testDoubleMagnitude.c | 192 ++ .../magnitude/testFloatMagnitude.c | 183 + .../testDoubleMagnitude.vcxproj | 178 + .../testDoubleMagnitude.vcxproj.filters | 22 + .../test_FloatMagnitude/testFloatMagnitude.vcxproj | 178 + .../testFloatMagnitude.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/magnitude/zmagna.c | 46 + 2.3-1/src/c/matrixOperations/magnitude/zmagns.c | 23 + .../c/matrixOperations/matrixOperations.vcxproj | 934 +++++ .../matrixOperations.vcxproj.filters | 576 ++++ .../c/matrixOperations/multiplication/Makefile.am | 49 + .../c/matrixOperations/multiplication/Makefile.in | 756 ++++ .../src/c/matrixOperations/multiplication/cmulma.c | 44 + .../src/c/matrixOperations/multiplication/dmulma.c | 67 + .../src/c/matrixOperations/multiplication/smulma.c | 49 + .../testDoubleMatrixMultiplication.c | 354 ++ .../multiplication/testFloatMatrixMultiplication.c | 213 ++ .../testDoubleMatrixMultiplication.vcxproj | 178 + .../testDoubleMatrixMultiplication.vcxproj.filters | 22 + .../testFloatMatrixMultiplication.vcxproj | 178 + .../testFloatMatrixMultiplication.vcxproj.filters | 22 + .../src/c/matrixOperations/multiplication/zmulma.c | 103 + 2.3-1/src/c/matrixOperations/ones/Makefile.am | 42 + 2.3-1/src/c/matrixOperations/ones/Makefile.in | 710 ++++ 2.3-1/src/c/matrixOperations/ones/conesa.c | 25 + 2.3-1/src/c/matrixOperations/ones/donesa.c | 26 + 2.3-1/src/c/matrixOperations/ones/sonesa.c | 28 + 2.3-1/src/c/matrixOperations/ones/testMatrixOnes.c | 160 + .../ones/test_MatrixOnes/testMatrixOnes.vcxproj | 178 + .../test_MatrixOnes/testMatrixOnes.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/ones/zonesa.c | 25 + 2.3-1/src/c/matrixOperations/powm/Makefile.am | 86 + 2.3-1/src/c/matrixOperations/powm/Makefile.in | 784 +++++ 2.3-1/src/c/matrixOperations/powm/cpowma.c | 64 + 2.3-1/src/c/matrixOperations/powm/dpowma.c | 72 + 2.3-1/src/c/matrixOperations/powm/spowma.c | 72 + 2.3-1/src/c/matrixOperations/powm/testDoublePowm.c | 138 + 2.3-1/src/c/matrixOperations/powm/testFloatPowm.c | 136 + .../powm/test_DoublePowm/testDoublePowm.vcxproj | 178 + .../test_DoublePowm/testDoublePowm.vcxproj.filters | 22 + .../powm/test_FloatPowm/testFloatPowm.vcxproj | 178 + .../test_FloatPowm/testFloatPowm.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/powm/zpowma.c | 64 + 2.3-1/src/c/matrixOperations/spec/Makefile.am | 70 + 2.3-1/src/c/matrixOperations/spec/Makefile.in | 755 ++++ 2.3-1/src/c/matrixOperations/spec/cspeca.c | 34 + 2.3-1/src/c/matrixOperations/spec/dspeca.c | 71 + 2.3-1/src/c/matrixOperations/spec/sspeca.c | 34 + 2.3-1/src/c/matrixOperations/spec/testDoubleSpec.c | 116 + 2.3-1/src/c/matrixOperations/spec/testFloatSpec.c | 110 + .../spec/test_DoubleSpec/testDoubleSpec.vcxproj | 178 + .../test_DoubleSpec/testDoubleSpec.vcxproj.filters | 22 + .../spec/test_FloatSpec/testFloatSpec.vcxproj | 178 + .../test_FloatSpec/testFloatSpec.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/spec/zspeca.c | 80 + 2.3-1/src/c/matrixOperations/spec2/Makefile.am | 70 + 2.3-1/src/c/matrixOperations/spec2/Makefile.in | 757 ++++ 2.3-1/src/c/matrixOperations/spec2/cspec2a.c | 36 + 2.3-1/src/c/matrixOperations/spec2/dspec2a.c | 113 + 2.3-1/src/c/matrixOperations/spec2/sspec2a.c | 36 + .../src/c/matrixOperations/spec2/testDoubleSpec2.c | 261 ++ .../src/c/matrixOperations/spec2/testFloatSpec2.c | 134 + .../spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj | 178 + .../testDoubleSpec2.vcxproj.filters | 22 + .../spec2/test_FloatSpec2/testFloatSpec2.vcxproj | 178 + .../test_FloatSpec2/testFloatSpec2.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/spec2/zspec2a.c | 96 + .../matrixOperations/squaredMagnitude/Makefile.am | 61 + .../matrixOperations/squaredMagnitude/Makefile.in | 799 +++++ .../matrixOperations/squaredMagnitude/csquMagna.c | 25 + .../matrixOperations/squaredMagnitude/csquMagns.c | 22 + .../matrixOperations/squaredMagnitude/dsquMagna.c | 25 + .../matrixOperations/squaredMagnitude/dsquMagns.c | 22 + .../matrixOperations/squaredMagnitude/ssquMagna.c | 25 + .../matrixOperations/squaredMagnitude/ssquMagns.c | 22 + .../squaredMagnitude/testDoubleSquaredMagnitude.c | 67 + .../squaredMagnitude/testFloatSquaredMagnitude.c | 52 + .../testDoubleSquaredMagnitude.vcxproj | 178 + .../testDoubleSquaredMagnitude.vcxproj.filters | 22 + .../testFloatSquaredMagnitude.vcxproj | 178 + .../testFloatSquaredMagnitude.vcxproj.filters | 22 + .../matrixOperations/squaredMagnitude/zsquMagna.c | 25 + .../matrixOperations/squaredMagnitude/zsquMagns.c | 22 + 2.3-1/src/c/matrixOperations/trace/Makefile.am | 41 + 2.3-1/src/c/matrixOperations/trace/Makefile.in | 712 ++++ 2.3-1/src/c/matrixOperations/trace/ctracea.c | 32 + 2.3-1/src/c/matrixOperations/trace/dtracea.c | 27 + 2.3-1/src/c/matrixOperations/trace/stracea.c | 27 + .../src/c/matrixOperations/trace/testMatrixTrace.c | 237 ++ .../trace/test_MatrixTrace/testMatrixTrace.vcxproj | 178 + .../testMatrixTrace.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/trace/ztracea.c | 31 + 2.3-1/src/c/matrixOperations/transpose/Makefile.am | 42 + 2.3-1/src/c/matrixOperations/transpose/Makefile.in | 718 ++++ .../src/c/matrixOperations/transpose/ctransposea.c | 27 + .../src/c/matrixOperations/transpose/dtransposea.c | 28 + .../src/c/matrixOperations/transpose/stransposea.c | 26 + .../transpose/testMatrixTranspose.c | 519 +++ .../testMatrixTranspose.vcxproj | 178 + .../testMatrixTranspose.vcxproj.filters | 22 + .../src/c/matrixOperations/transpose/ztransposea.c | 27 + 2.3-1/src/c/matrixOperations/zeros/Makefile.am | 42 + 2.3-1/src/c/matrixOperations/zeros/Makefile.in | 712 ++++ 2.3-1/src/c/matrixOperations/zeros/czerosa.c | 25 + 2.3-1/src/c/matrixOperations/zeros/dzerosa.c | 26 + 2.3-1/src/c/matrixOperations/zeros/dzerosh.c | 26 + 2.3-1/src/c/matrixOperations/zeros/szerosa.c | 28 + .../src/c/matrixOperations/zeros/testMatrixZeros.c | 137 + .../zeros/test_MatrixZeros/testMatrixZeros.vcxproj | 178 + .../testMatrixZeros.vcxproj.filters | 22 + 2.3-1/src/c/matrixOperations/zeros/zzerosa.c | 25 + 2.3-1/src/c/operations/Makefile.am | 18 + 2.3-1/src/c/operations/Makefile.in | 565 +++ 2.3-1/src/c/operations/addition/Makefile.am | 45 + 2.3-1/src/c/operations/addition/Makefile.in | 748 ++++ 2.3-1/src/c/operations/addition/cadda.c | 20 + 2.3-1/src/c/operations/addition/cadds.c | 18 + 2.3-1/src/c/operations/addition/dadda.c | 20 + 2.3-1/src/c/operations/addition/dadds.c | 18 + 2.3-1/src/c/operations/addition/sadda.c | 20 + 2.3-1/src/c/operations/addition/sadds.c | 18 + 2.3-1/src/c/operations/addition/testAddition.c | 128 + .../addition/test_Addition/testAddition.vcxproj | 178 + .../test_Addition/testAddition.vcxproj.filters | 22 + 2.3-1/src/c/operations/addition/zadda.c | 20 + 2.3-1/src/c/operations/addition/zadds.c | 18 + .../src/c/operations/auxiliaryFunctions_Import.def | 6 + 2.3-1/src/c/operations/division/Makefile.am | 66 + 2.3-1/src/c/operations/division/Makefile.in | 858 +++++ 2.3-1/src/c/operations/division/cldiva.c | 21 + 2.3-1/src/c/operations/division/cldivs.c | 27 + 2.3-1/src/c/operations/division/crdiva.c | 21 + 2.3-1/src/c/operations/division/crdivs.c | 38 + 2.3-1/src/c/operations/division/dldiva.c | 21 + 2.3-1/src/c/operations/division/dldivs.c | 19 + 2.3-1/src/c/operations/division/drdiva.c | 21 + 2.3-1/src/c/operations/division/drdivs.c | 19 + 2.3-1/src/c/operations/division/sldiva.c | 21 + 2.3-1/src/c/operations/division/sldivs.c | 19 + 2.3-1/src/c/operations/division/srdiva.c | 22 + 2.3-1/src/c/operations/division/srdivs.c | 19 + 2.3-1/src/c/operations/division/testLDivision.c | 1440 ++++++++ 2.3-1/src/c/operations/division/testRDivision.c | 1434 ++++++++ .../division/test_LDivision/testLDivision.vcxproj | 178 + .../test_LDivision/testLDivision.vcxproj.filters | 22 + .../division/test_RDivision/testRDivision.vcxproj | 178 + .../test_RDivision/testRDivision.vcxproj.filters | 22 + 2.3-1/src/c/operations/division/zldiva.c | 21 + 2.3-1/src/c/operations/division/zldivs.c | 27 + 2.3-1/src/c/operations/division/zrdiva.c | 21 + 2.3-1/src/c/operations/division/zrdivs.c | 39 + 2.3-1/src/c/operations/includes/addition.h | 115 + 2.3-1/src/c/operations/includes/division.h | 181 + .../src/c/operations/includes/dynlib_operations.h | 26 + 2.3-1/src/c/operations/includes/multiplication.h | 147 + 2.3-1/src/c/operations/includes/subtraction.h | 114 + .../src/c/operations/interfaces/int_OpBackSlash.h | 109 + .../c/operations/interfaces/int_OpDotBackSlash.h | 109 + 2.3-1/src/c/operations/interfaces/int_OpDotSlash.h | 131 + 2.3-1/src/c/operations/interfaces/int_OpDotStar.h | 111 + 2.3-1/src/c/operations/interfaces/int_OpEqual.h | 39 + 2.3-1/src/c/operations/interfaces/int_OpExt.h | 109 + 2.3-1/src/c/operations/interfaces/int_OpIns.h | 364 ++ 2.3-1/src/c/operations/interfaces/int_OpLogAnd.h | 122 + 2.3-1/src/c/operations/interfaces/int_OpLogEq.h | 94 + 2.3-1/src/c/operations/interfaces/int_OpLogGe.h | 50 + 2.3-1/src/c/operations/interfaces/int_OpLogGt.h | 50 + 2.3-1/src/c/operations/interfaces/int_OpLogLe.h | 50 + 2.3-1/src/c/operations/interfaces/int_OpLogLt.h | 50 + 2.3-1/src/c/operations/interfaces/int_OpLogNe.h | 98 + 2.3-1/src/c/operations/interfaces/int_OpLogNot.h | 42 + 2.3-1/src/c/operations/interfaces/int_OpLogOr.h | 116 + 2.3-1/src/c/operations/interfaces/int_OpMinus.h | 173 + 2.3-1/src/c/operations/interfaces/int_OpPlus.h | 144 + 2.3-1/src/c/operations/interfaces/int_OpSlash.h | 168 + 2.3-1/src/c/operations/interfaces/int_OpStar.h | 151 + 2.3-1/src/c/operations/matrixOperations_Import.def | 7 + 2.3-1/src/c/operations/multiplication/Makefile.am | 58 + 2.3-1/src/c/operations/multiplication/Makefile.in | 835 +++++ 2.3-1/src/c/operations/multiplication/cmula.c | 21 + 2.3-1/src/c/operations/multiplication/cmulcsv.c | 24 + 2.3-1/src/c/operations/multiplication/cmuls.c | 41 + 2.3-1/src/c/operations/multiplication/cmulscv.c | 24 + 2.3-1/src/c/operations/multiplication/cmulv.c | 26 + 2.3-1/src/c/operations/multiplication/dmula.c | 21 + 2.3-1/src/c/operations/multiplication/dmuls.c | 18 + 2.3-1/src/c/operations/multiplication/dmulv.c | 26 + 2.3-1/src/c/operations/multiplication/smula.c | 23 + 2.3-1/src/c/operations/multiplication/smuls.c | 18 + 2.3-1/src/c/operations/multiplication/smulv.c | 27 + .../operations/multiplication/testMultiplication.c | 1407 ++++++++ .../test_Multiplication/testMultiplication.vcxproj | 178 + .../testMultiplication.vcxproj.filters | 22 + 2.3-1/src/c/operations/multiplication/zmula.c | 21 + 2.3-1/src/c/operations/multiplication/zmuldzv.c | 24 + 2.3-1/src/c/operations/multiplication/zmuls.c | 40 + 2.3-1/src/c/operations/multiplication/zmulv.c | 27 + 2.3-1/src/c/operations/multiplication/zmulzdv.c | 24 + 2.3-1/src/c/operations/operations.vcxproj | 495 +++ 2.3-1/src/c/operations/operations.vcxproj.filters | 203 ++ 2.3-1/src/c/operations/subtraction/Makefile.am | 45 + 2.3-1/src/c/operations/subtraction/Makefile.in | 750 ++++ 2.3-1/src/c/operations/subtraction/cdiffa.c | 20 + 2.3-1/src/c/operations/subtraction/cdiffs.c | 18 + 2.3-1/src/c/operations/subtraction/ddiffa.c | 20 + 2.3-1/src/c/operations/subtraction/ddiffs.c | 18 + 2.3-1/src/c/operations/subtraction/sdiffa.c | 20 + 2.3-1/src/c/operations/subtraction/sdiffs.c | 18 + .../src/c/operations/subtraction/testSubtraction.c | 132 + .../test_Subtraction/testSubtraction.vcxproj | 178 + .../testSubtraction.vcxproj.filters | 22 + 2.3-1/src/c/operations/subtraction/zdiffa.c | 20 + 2.3-1/src/c/operations/subtraction/zdiffs.c | 18 + 2.3-1/src/c/signalProcessing/Makefile.am | 22 + 2.3-1/src/c/signalProcessing/Makefile.in | 570 ++++ 2.3-1/src/c/signalProcessing/conv/Makefile.am | 74 + 2.3-1/src/c/signalProcessing/conv/Makefile.in | 754 ++++ 2.3-1/src/c/signalProcessing/conv/cconva.c | 53 + 2.3-1/src/c/signalProcessing/conv/dconva.c | 39 + 2.3-1/src/c/signalProcessing/conv/sconva.c | 44 + 2.3-1/src/c/signalProcessing/conv/testDoubleConv.c | 135 + 2.3-1/src/c/signalProcessing/conv/testFloatConv.c | 134 + .../conv/test_DoubleConv/testDoubleConv.vcxproj | 178 + .../test_DoubleConv/testDoubleConv.vcxproj.filters | 22 + .../conv/test_FloatConv/testFloatConv.vcxproj | 178 + .../test_FloatConv/testFloatConv.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/conv/zconva.c | 51 + 2.3-1/src/c/signalProcessing/conv2d/Makefile.am | 64 + 2.3-1/src/c/signalProcessing/conv2d/Makefile.in | 749 ++++ 2.3-1/src/c/signalProcessing/conv2d/cconv2da.c | 37 + 2.3-1/src/c/signalProcessing/conv2d/dconv2da.c | 35 + 2.3-1/src/c/signalProcessing/conv2d/sconv2da.c | 36 + .../c/signalProcessing/conv2d/testDoubleConv2d.c | 119 + .../c/signalProcessing/conv2d/testFloatConv2d.c | 106 + .../test_DoubleConv2d/testDoubleConv2d.vcxproj | 178 + .../testDoubleConv2d.vcxproj.filters | 22 + .../test_FloatConv2d/testFloatConv2d.vcxproj | 178 + .../testFloatConv2d.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/conv2d/zconv2da.c | 37 + 2.3-1/src/c/signalProcessing/crossCorr/Makefile.am | 66 + 2.3-1/src/c/signalProcessing/crossCorr/Makefile.in | 754 ++++ .../src/c/signalProcessing/crossCorr/ccrossCorra.c | 33 + .../src/c/signalProcessing/crossCorr/dcrossCorra.c | 37 + .../src/c/signalProcessing/crossCorr/scrossCorra.c | 31 + .../crossCorr/testDoubleCrossCorr.c | 62 + .../crossCorr/testFloatCrossCorr.c | 48 + .../testDoubleCrossCorr.vcxproj | 178 + .../testDoubleCrossCorr.vcxproj.filters | 22 + .../test_FloatCrossCorr/testFloatCrossCorr.vcxproj | 178 + .../testFloatCrossCorr.vcxproj.filters | 22 + .../src/c/signalProcessing/crossCorr/zcrossCorra.c | 34 + 2.3-1/src/c/signalProcessing/fft/Makefile.am | 83 + 2.3-1/src/c/signalProcessing/fft/Makefile.in | 865 +++++ 2.3-1/src/c/signalProcessing/fft/cfftma.c | 52 + 2.3-1/src/c/signalProcessing/fft/dfft2.c | 24 + 2.3-1/src/c/signalProcessing/fft/dfftbi.c | 322 ++ 2.3-1/src/c/signalProcessing/fft/dfftma.c | 31 + 2.3-1/src/c/signalProcessing/fft/dfftmx.c | 1211 +++++++ 2.3-1/src/c/signalProcessing/fft/fft842.c | 173 + 2.3-1/src/c/signalProcessing/fft/fft_internal.h | 42 + 2.3-1/src/c/signalProcessing/fft/r2tx.c | 46 + 2.3-1/src/c/signalProcessing/fft/r4tx.c | 49 + 2.3-1/src/c/signalProcessing/fft/r8tx.c | 169 + 2.3-1/src/c/signalProcessing/fft/sfftma.c | 34 + 2.3-1/src/c/signalProcessing/fft/testDoubleFft.c | 470 +++ 2.3-1/src/c/signalProcessing/fft/testFloatFft.c | 1238 +++++++ 2.3-1/src/c/signalProcessing/fft/testMatFft.c | 297 ++ .../fft/test_DoubleFft/testDoubleFft.vcxproj | 178 + .../test_DoubleFft/testDoubleFft.vcxproj.filters | 22 + .../fft/test_FloatFft/testFloatFft.vcxproj | 178 + .../fft/test_FloatFft/testFloatFft.vcxproj.filters | 22 + .../fft/test_MatFft/testMatFft.vcxproj | 178 + .../fft/test_MatFft/testMatFft.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/fft/zfftma.c | 156 + 2.3-1/src/c/signalProcessing/fftshift/Makefile.am | 68 + 2.3-1/src/c/signalProcessing/fftshift/Makefile.in | 828 +++++ .../c/signalProcessing/fftshift/ccolumnfftshifta.c | 48 + 2.3-1/src/c/signalProcessing/fftshift/cfftshifta.c | 26 + .../c/signalProcessing/fftshift/crowfftshifta.c | 48 + .../c/signalProcessing/fftshift/dcolumnfftshifta.c | 45 + 2.3-1/src/c/signalProcessing/fftshift/dfftshifta.c | 26 + .../c/signalProcessing/fftshift/drowfftshifta.c | 46 + .../c/signalProcessing/fftshift/scolumnfftshifta.c | 49 + 2.3-1/src/c/signalProcessing/fftshift/sfftshifta.c | 26 + .../c/signalProcessing/fftshift/srowfftshifta.c | 48 + .../signalProcessing/fftshift/testDoubleFftShift.c | 162 + .../signalProcessing/fftshift/testFloatFftShift.c | 159 + .../test_DoubleFftShift/testDoubleFftShift.vcxproj | 178 + .../testDoubleFftShift.vcxproj.filters | 22 + .../test_FloatFftShift/testFloatFftShift.vcxproj | 178 + .../testFloatFftShift.vcxproj.filters | 22 + .../c/signalProcessing/fftshift/zcolumnfftshifta.c | 46 + 2.3-1/src/c/signalProcessing/fftshift/zfftshifta.c | 26 + .../c/signalProcessing/fftshift/zrowfftshifta.c | 45 + 2.3-1/src/c/signalProcessing/hilbert/Makefile.am | 67 + 2.3-1/src/c/signalProcessing/hilbert/Makefile.in | 726 ++++ 2.3-1/src/c/signalProcessing/hilbert/dhilberta.c | 37 + 2.3-1/src/c/signalProcessing/hilbert/dhilberts.c | 18 + 2.3-1/src/c/signalProcessing/hilbert/shilberta.c | 32 + 2.3-1/src/c/signalProcessing/hilbert/shilberts.c | 18 + 2.3-1/src/c/signalProcessing/hilbert/testHilbert.c | 851 +++++ .../hilbert/test_Hilbert/testHilbert.vcxproj | 178 + .../test_Hilbert/testHilbert.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/ifft/Makefile.am | 84 + 2.3-1/src/c/signalProcessing/ifft/Makefile.in | 866 +++++ 2.3-1/src/c/signalProcessing/ifft/cifftma.c | 51 + 2.3-1/src/c/signalProcessing/ifft/diffbi_lavraie.c | 243 ++ 2.3-1/src/c/signalProcessing/ifft/difft2.c | 24 + 2.3-1/src/c/signalProcessing/ifft/difftbi.c | 321 ++ 2.3-1/src/c/signalProcessing/ifft/difftma.c | 32 + 2.3-1/src/c/signalProcessing/ifft/difftmx.c | 1253 +++++++ 2.3-1/src/c/signalProcessing/ifft/ifft842.c | 163 + 2.3-1/src/c/signalProcessing/ifft/ifft_internal.h | 44 + 2.3-1/src/c/signalProcessing/ifft/ir2tx.c | 46 + 2.3-1/src/c/signalProcessing/ifft/ir4tx.c | 49 + 2.3-1/src/c/signalProcessing/ifft/ir8tx.c | 169 + 2.3-1/src/c/signalProcessing/ifft/sifftma.c | 34 + 2.3-1/src/c/signalProcessing/ifft/testDoubleIfft.c | 1301 +++++++ 2.3-1/src/c/signalProcessing/ifft/testFloatIfft.c | 1269 +++++++ 2.3-1/src/c/signalProcessing/ifft/testMatIfft.c | 289 ++ .../ifft/test_DoubleIfft/testDoubleIfft.vcxproj | 178 + .../test_DoubleIfft/testDoubleIfft.vcxproj.filters | 22 + .../ifft/test_FloatIfft/testFloatIfft.vcxproj | 178 + .../test_FloatIfft/testFloatIfft.vcxproj.filters | 22 + .../ifft/test_MatIfft/testMatIfft.vcxproj | 178 + .../ifft/test_MatIfft/testMatIfft.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/ifft/zifftma.c | 160 + 2.3-1/src/c/signalProcessing/includes/conv.h | 41 + 2.3-1/src/c/signalProcessing/includes/conv2d.h | 38 + 2.3-1/src/c/signalProcessing/includes/crossCorr.h | 37 + .../includes/dynlib_signalprocessing.h | 26 + 2.3-1/src/c/signalProcessing/includes/fft.h | 57 + 2.3-1/src/c/signalProcessing/includes/fftshift.h | 76 + 2.3-1/src/c/signalProcessing/includes/hilbert.h | 43 + 2.3-1/src/c/signalProcessing/includes/ifft.h | 59 + 2.3-1/src/c/signalProcessing/includes/lev.h | 50 + 2.3-1/src/c/signalProcessing/includes/levin.h | 31 + 2.3-1/src/c/signalProcessing/includes/lpc2cep.h | 44 + .../c/signalProcessing/interfaces/int_cepstrum.h | 34 + .../src/c/signalProcessing/interfaces/int_convol.h | 153 + 2.3-1/src/c/signalProcessing/interfaces/int_fft.h | 71 + .../c/signalProcessing/interfaces/int_fftshift.h | 51 + .../c/signalProcessing/interfaces/int_hilbert.h | 26 + 2.3-1/src/c/signalProcessing/interfaces/int_ifft.h | 52 + 2.3-1/src/c/signalProcessing/interfaces/int_lev.h | 53 + .../src/c/signalProcessing/interfaces/int_levin.h | 60 + .../c/signalProcessing/interfaces/int_lpc2cep.h | 27 + .../src/c/signalProcessing/interfaces/int_xcorr.h | 176 + 2.3-1/src/c/signalProcessing/lev/Makefile.am | 76 + 2.3-1/src/c/signalProcessing/lev/Makefile.in | 773 +++++ 2.3-1/src/c/signalProcessing/lev/cleva.c | 85 + 2.3-1/src/c/signalProcessing/lev/cleva2.c | 83 + 2.3-1/src/c/signalProcessing/lev/dleva.c | 67 + 2.3-1/src/c/signalProcessing/lev/dleva2.c | 65 + 2.3-1/src/c/signalProcessing/lev/sleva.c | 66 + 2.3-1/src/c/signalProcessing/lev/sleva2.c | 64 + 2.3-1/src/c/signalProcessing/lev/testDoubleLev.c | 199 ++ 2.3-1/src/c/signalProcessing/lev/testFloatLev.c | 198 ++ .../lev/test_DoubleLev/testDoubleLev.vcxproj | 178 + .../test_DoubleLev/testDoubleLev.vcxproj.filters | 22 + .../lev/test_FloatLev/testFloatLev.vcxproj | 178 + .../lev/test_FloatLev/testFloatLev.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/lev/zleva.c | 86 + 2.3-1/src/c/signalProcessing/lev/zleva2.c | 83 + 2.3-1/src/c/signalProcessing/levin/Makefile.am | 76 + 2.3-1/src/c/signalProcessing/levin/Makefile.in | 759 +++++ 2.3-1/src/c/signalProcessing/levin/dlevina.c | 185 + 2.3-1/src/c/signalProcessing/levin/levinUtils.c | 270 ++ 2.3-1/src/c/signalProcessing/levin/levinUtils.h | 71 + 2.3-1/src/c/signalProcessing/levin/slevina.c | 185 + .../src/c/signalProcessing/levin/testDoubleLevin.c | 103 + .../src/c/signalProcessing/levin/testFloatLevin.c | 103 + .../levin/test_DoubleLevin/testDoubleLevin.vcxproj | 178 + .../testDoubleLevin.vcxproj.filters | 22 + .../levin/test_FloatLevin/testFloatLevin.vcxproj | 178 + .../test_FloatLevin/testFloatLevin.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/lpc2cep/Makefile.am | 89 + 2.3-1/src/c/signalProcessing/lpc2cep/Makefile.in | 796 +++++ 2.3-1/src/c/signalProcessing/lpc2cep/clpc2cepa.c | 32 + 2.3-1/src/c/signalProcessing/lpc2cep/dlpc2cepa.c | 38 + 2.3-1/src/c/signalProcessing/lpc2cep/slpc2cepa.c | 39 + .../c/signalProcessing/lpc2cep/testDoubleLpc2cep.c | 39 + .../c/signalProcessing/lpc2cep/testFloatLpc2cep.c | 40 + .../test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj | 178 + .../testDoubleLpc2cep.vcxproj.filters | 22 + .../test_FloatLpc2cep/testFloatLpc2cep.vcxproj | 178 + .../testFloatLpc2cep.vcxproj.filters | 22 + 2.3-1/src/c/signalProcessing/lpc2cep/zlpc2cepa.c | 34 + .../c/signalProcessing/signalProcessing.vcxproj | 607 ++++ .../signalProcessing.vcxproj.filters | 320 ++ 2.3-1/src/c/statisticsFunctions/Makefile.am | 21 + 2.3-1/src/c/statisticsFunctions/Makefile.in | 569 ++++ .../includes/dynlib_statisticsfunctions.h | 26 + 2.3-1/src/c/statisticsFunctions/includes/mean.h | 99 + 2.3-1/src/c/statisticsFunctions/includes/meanf.h | 106 + 2.3-1/src/c/statisticsFunctions/includes/prod.h | 100 + 2.3-1/src/c/statisticsFunctions/includes/statMax.h | 63 + 2.3-1/src/c/statisticsFunctions/includes/statMin.h | 63 + 2.3-1/src/c/statisticsFunctions/includes/stdevf.h | 129 + 2.3-1/src/c/statisticsFunctions/includes/sum.h | 102 + .../src/c/statisticsFunctions/includes/variance.h | 117 + .../src/c/statisticsFunctions/includes/variancef.h | 117 + .../c/statisticsFunctions/interfaces/int_mean.h | 71 + .../c/statisticsFunctions/interfaces/int_meanf.h | 183 + .../c/statisticsFunctions/interfaces/int_prod.h | 71 + .../c/statisticsFunctions/interfaces/int_stdevf.h | 188 + .../src/c/statisticsFunctions/interfaces/int_sum.h | 70 + .../statisticsFunctions/interfaces/int_variance.h | 71 + .../statisticsFunctions/interfaces/int_variancef.h | 58 + 2.3-1/src/c/statisticsFunctions/max/Makefile.am | 51 + 2.3-1/src/c/statisticsFunctions/max/Makefile.in | 759 +++++ 2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c | 24 + 2.3-1/src/c/statisticsFunctions/max/dmaxa.c | 25 + 2.3-1/src/c/statisticsFunctions/max/drowmaxa.c | 23 + 2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c | 24 + 2.3-1/src/c/statisticsFunctions/max/smaxa.c | 25 + 2.3-1/src/c/statisticsFunctions/max/srowmaxa.c | 23 + .../src/c/statisticsFunctions/max/testDoubleMax.c | 93 + 2.3-1/src/c/statisticsFunctions/max/testFloatMax.c | 92 + .../max/test_DoubleMax/testDoubleMax.vcxproj | 178 + .../test_DoubleMax/testDoubleMax.vcxproj.filters | 22 + .../max/test_FloatMax/testFloatMax.vcxproj | 178 + .../max/test_FloatMax/testFloatMax.vcxproj.filters | 22 + 2.3-1/src/c/statisticsFunctions/mean/Makefile.am | 69 + 2.3-1/src/c/statisticsFunctions/mean/Makefile.in | 839 +++++ .../src/c/statisticsFunctions/mean/ccolumnmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/cmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/crowmeana.c | 24 + .../src/c/statisticsFunctions/mean/dcolumnmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/dmeana.c | 25 + 2.3-1/src/c/statisticsFunctions/mean/drowmeana.c | 24 + .../src/c/statisticsFunctions/mean/scolumnmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/smeana.c | 25 + 2.3-1/src/c/statisticsFunctions/mean/srowmeana.c | 24 + .../c/statisticsFunctions/mean/testDoubleMean.c | 498 +++ .../src/c/statisticsFunctions/mean/testFloatMean.c | 481 +++ .../mean/test_DoubleMean/testDoubleMean.vcxproj | 178 + .../test_DoubleMean/testDoubleMean.vcxproj.filters | 22 + .../mean/test_FloatMean/testFloatMean.vcxproj | 178 + .../test_FloatMean/testFloatMean.vcxproj.filters | 22 + .../src/c/statisticsFunctions/mean/zcolumnmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/zmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c | 24 + 2.3-1/src/c/statisticsFunctions/meanf/Makefile.am | 74 + 2.3-1/src/c/statisticsFunctions/meanf/Makefile.in | 879 +++++ .../c/statisticsFunctions/meanf/ccolumnmeanfa.c | 39 + 2.3-1/src/c/statisticsFunctions/meanf/cmeanfa.c | 30 + 2.3-1/src/c/statisticsFunctions/meanf/cmeanfcs.c | 23 + 2.3-1/src/c/statisticsFunctions/meanf/cmeanfsc.c | 23 + 2.3-1/src/c/statisticsFunctions/meanf/crowmeanfa.c | 36 + .../c/statisticsFunctions/meanf/dcolumnmeanfa.c | 40 + 2.3-1/src/c/statisticsFunctions/meanf/dmeanfa.c | 28 + 2.3-1/src/c/statisticsFunctions/meanf/drowmeanfa.c | 36 + .../c/statisticsFunctions/meanf/scolumnmeanfa.c | 40 + 2.3-1/src/c/statisticsFunctions/meanf/smeanfa.c | 27 + 2.3-1/src/c/statisticsFunctions/meanf/srowmeanfa.c | 37 + .../c/statisticsFunctions/meanf/testDoubleMeanf.c | 409 +++ .../c/statisticsFunctions/meanf/testFloatMeanf.c | 383 +++ .../c/statisticsFunctions/meanf/zcolumnmeanfa.c | 39 + 2.3-1/src/c/statisticsFunctions/meanf/zmeanfa.c | 29 + 2.3-1/src/c/statisticsFunctions/meanf/zmeanfdz.c | 23 + 2.3-1/src/c/statisticsFunctions/meanf/zmeanfzd.c | 23 + 2.3-1/src/c/statisticsFunctions/meanf/zrowmeanfa.c | 36 + 2.3-1/src/c/statisticsFunctions/min/Makefile.am | 51 + 2.3-1/src/c/statisticsFunctions/min/Makefile.in | 759 +++++ 2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c | 24 + 2.3-1/src/c/statisticsFunctions/min/dmina.c | 25 + 2.3-1/src/c/statisticsFunctions/min/drowmina.c | 23 + 2.3-1/src/c/statisticsFunctions/min/scolumnmina.c | 24 + 2.3-1/src/c/statisticsFunctions/min/smina.c | 25 + 2.3-1/src/c/statisticsFunctions/min/srowmina.c | 23 + .../src/c/statisticsFunctions/min/testDoubleMin.c | 93 + 2.3-1/src/c/statisticsFunctions/min/testFloatMin.c | 92 + .../min/test_DoubleMin/testDoubleMin.vcxproj | 178 + .../test_DoubleMin/testDoubleMin.vcxproj.filters | 22 + .../min/test_FloatMin/testFloatMin.vcxproj | 178 + .../min/test_FloatMin/testFloatMin.vcxproj.filters | 22 + 2.3-1/src/c/statisticsFunctions/prod/Makefile.am | 66 + 2.3-1/src/c/statisticsFunctions/prod/Makefile.in | 833 +++++ .../src/c/statisticsFunctions/prod/ccolumnproda.c | 36 + 2.3-1/src/c/statisticsFunctions/prod/cproda.c | 30 + 2.3-1/src/c/statisticsFunctions/prod/crowproda.c | 37 + .../src/c/statisticsFunctions/prod/dcolumnproda.c | 35 + 2.3-1/src/c/statisticsFunctions/prod/dproda.c | 29 + 2.3-1/src/c/statisticsFunctions/prod/drowproda.c | 35 + .../src/c/statisticsFunctions/prod/scolumnproda.c | 35 + 2.3-1/src/c/statisticsFunctions/prod/sproda.c | 29 + 2.3-1/src/c/statisticsFunctions/prod/srowproda.c | 35 + .../c/statisticsFunctions/prod/testDoubleProd.c | 519 +++ .../src/c/statisticsFunctions/prod/testFloatProd.c | 527 +++ .../prod/test_DoubleProd/testDoubleProd.vcxproj | 178 + .../test_DoubleProd/testDoubleProd.vcxproj.filters | 22 + .../prod/test_FloatProd/testFloatProd.vcxproj | 178 + .../test_FloatProd/testFloatProd.vcxproj.filters | 22 + .../src/c/statisticsFunctions/prod/zcolumnproda.c | 36 + 2.3-1/src/c/statisticsFunctions/prod/zproda.c | 30 + 2.3-1/src/c/statisticsFunctions/prod/zrowproda.c | 37 + .../statisticsFunctions.vcxproj | 661 ++++ .../statisticsFunctions.vcxproj.filters | 311 ++ 2.3-1/src/c/statisticsFunctions/stdevf/Makefile.am | 88 + 2.3-1/src/c/statisticsFunctions/stdevf/Makefile.in | 875 +++++ .../c/statisticsFunctions/stdevf/ccolumnstdevfa.c | 58 + .../src/c/statisticsFunctions/stdevf/crowstdevfa.c | 59 + 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfa.c | 43 + 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfcs.c | 41 + 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfsc.c | 23 + .../c/statisticsFunctions/stdevf/dcolumnstdevfa.c | 69 + .../src/c/statisticsFunctions/stdevf/drowstdevfa.c | 53 + 2.3-1/src/c/statisticsFunctions/stdevf/dstdevfa.c | 43 + .../c/statisticsFunctions/stdevf/scolumnstdevfa.c | 69 + .../src/c/statisticsFunctions/stdevf/srowstdevfa.c | 53 + 2.3-1/src/c/statisticsFunctions/stdevf/sstdevfa.c | 68 + .../statisticsFunctions/stdevf/testDoubleStdevf.c | 509 +++ .../c/statisticsFunctions/stdevf/testFloatStdevf.c | 389 +++ .../c/statisticsFunctions/stdevf/zcolumnstdevfa.c | 59 + .../src/c/statisticsFunctions/stdevf/zrowstdevfa.c | 63 + 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfa.c | 46 + 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfdz.c | 23 + 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfzd.c | 41 + 2.3-1/src/c/statisticsFunctions/sum/Makefile.am | 65 + 2.3-1/src/c/statisticsFunctions/sum/Makefile.in | 831 +++++ 2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c | 33 + 2.3-1/src/c/statisticsFunctions/sum/crowsuma.c | 34 + 2.3-1/src/c/statisticsFunctions/sum/csuma.c | 24 + 2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c | 33 + 2.3-1/src/c/statisticsFunctions/sum/drowsuma.c | 33 + 2.3-1/src/c/statisticsFunctions/sum/dsuma.c | 25 + 2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c | 33 + 2.3-1/src/c/statisticsFunctions/sum/srowsuma.c | 34 + 2.3-1/src/c/statisticsFunctions/sum/ssuma.c | 25 + .../src/c/statisticsFunctions/sum/testDoubleSum.c | 493 +++ 2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c | 481 +++ .../sum/test_DoubleSum/testDoubleSum.vcxproj | 178 + .../test_DoubleSum/testDoubleSum.vcxproj.filters | 22 + .../sum/test_FloatSum/testFloatSum.vcxproj | 178 + .../sum/test_FloatSum/testFloatSum.vcxproj.filters | 22 + 2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c | 33 + 2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c | 34 + 2.3-1/src/c/statisticsFunctions/sum/zsuma.c | 24 + .../src/c/statisticsFunctions/variance/Makefile.am | 89 + .../src/c/statisticsFunctions/variance/Makefile.in | 884 +++++ .../variance/ccolumnvariancea.c | 34 + .../c/statisticsFunctions/variance/crowvariancea.c | 22 + .../c/statisticsFunctions/variance/cvariancea.c | 36 + .../variance/dcolumnvariancea.c | 32 + .../c/statisticsFunctions/variance/drowvariancea.c | 23 + .../c/statisticsFunctions/variance/dvariancea.c | 35 + .../variance/scolumnvariancea.c | 34 + .../c/statisticsFunctions/variance/srowvariancea.c | 21 + .../c/statisticsFunctions/variance/svariancea.c | 34 + .../c/statisticsFunctions/variance/svn-prop.tmp | 12 + .../variance/testDoubleVariance.c | 335 ++ .../variance/testDoubleVarianceNono.c | 363 ++ .../variance/testFloatVariance.c | 329 ++ .../variance/testFloatVarianceNono.c | 364 ++ .../test_DoubleVariance/testDoubleVariance.vcxproj | 178 + .../testDoubleVariance.vcxproj.filters | 22 + .../testDoubleVarianceNono.vcxproj | 178 + .../testDoubleVarianceNono.vcxproj.filters | 22 + .../test_FloatVariance/testFloatVariance.vcxproj | 178 + .../testFloatVariance.vcxproj.filters | 22 + .../testFloatVarianceNono.vcxproj | 178 + .../testFloatVarianceNono.vcxproj.filters | 22 + .../variance/zcolumnvariancea.c | 34 + .../c/statisticsFunctions/variance/zrowvariancea.c | 21 + .../c/statisticsFunctions/variance/zvariancea.c | 35 + .../c/statisticsFunctions/variancef/Makefile.am | 89 + .../c/statisticsFunctions/variancef/Makefile.in | 886 +++++ .../variancef/ccolumnvariancefa.c | 35 + .../statisticsFunctions/variancef/crowvariancefa.c | 22 + .../c/statisticsFunctions/variancef/cvariancefa.c | 35 + .../variancef/dcolumnvariancefa.c | 33 + .../statisticsFunctions/variancef/drowvariancefa.c | 23 + .../c/statisticsFunctions/variancef/dvariancefa.c | 35 + .../variancef/scolumnvariancefa.c | 47 + .../statisticsFunctions/variancef/srowvariancefa.c | 21 + .../c/statisticsFunctions/variancef/svariancefa.c | 46 + .../variancef/testDoubleVariance.c | 335 ++ .../variancef/testDoubleVariancef.c | 373 ++ .../variancef/testFloatVariance.c | 329 ++ .../variancef/testFloatVariancef.c | 381 +++ .../variancef/zcolumnvariancefa.c | 35 + .../statisticsFunctions/variancef/zrowvariancefa.c | 21 + .../c/statisticsFunctions/variancef/zvariancefa.c | 35 + 2.3-1/src/c/string/Makefile.am | 17 + 2.3-1/src/c/string/Makefile.in | 562 +++ 2.3-1/src/c/string/disp/Makefile.am | 52 + 2.3-1/src/c/string/disp/Makefile.in | 754 ++++ 2.3-1/src/c/string/disp/cdispa.c | 23 + 2.3-1/src/c/string/disp/cdisps.c | 20 + 2.3-1/src/c/string/disp/ddispa.c | 23 + 2.3-1/src/c/string/disp/ddisph.c | 32 + 2.3-1/src/c/string/disp/ddisps.c | 18 + 2.3-1/src/c/string/disp/sdispa.c | 23 + 2.3-1/src/c/string/disp/sdisps.c | 18 + 2.3-1/src/c/string/disp/testDisp.c | 107 + 2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj | 178 + .../string/disp/test_Disp/testDisp.vcxproj.filters | 22 + 2.3-1/src/c/string/disp/zdispa.c | 23 + 2.3-1/src/c/string/disp/zdisps.c | 19 + 2.3-1/src/c/string/includes/disp.h | 83 + 2.3-1/src/c/string/includes/dynlib_string.h | 27 + 2.3-1/src/c/string/includes/str.h | 88 + 2.3-1/src/c/string/interfaces/int_disp.h | 44 + 2.3-1/src/c/string/string.vcxproj | 276 ++ 2.3-1/src/c/string/string.vcxproj.filters | 89 + 2.3-1/src/c/string/string/Makefile.am | 52 + 2.3-1/src/c/string/string/Makefile.am.bak | 3 + 2.3-1/src/c/string/string/Makefile.in | 755 ++++ 2.3-1/src/c/string/string/cstringa.c | 23 + 2.3-1/src/c/string/string/cstrings.c | 22 + 2.3-1/src/c/string/string/dstringa.c | 22 + 2.3-1/src/c/string/string/dstrings.c | 19 + 2.3-1/src/c/string/string/sstringa.c | 22 + 2.3-1/src/c/string/string/sstrings.c | 19 + 2.3-1/src/c/string/string/testString.c | 238 ++ .../c/string/string/test_String/testString.vcxproj | 178 + .../string/test_String/testString.vcxproj.filters | 22 + 2.3-1/src/c/string/string/zstringa.c | 23 + 2.3-1/src/c/string/string/zstrings.c | 22 + 2.3-1/src/c/type/Makefile.am | 37 + 2.3-1/src/c/type/Makefile.in | 669 ++++ 2.3-1/src/c/type/doubleComplex.c | 138 + 2.3-1/src/c/type/doubleComplex.h | 78 + 2.3-1/src/c/type/dynlib_type.h | 26 + 2.3-1/src/c/type/floatComplex.c | 139 + 2.3-1/src/c/type/floatComplex.h | 79 + 2.3-1/src/c/type/int_imag.h | 34 + 2.3-1/src/c/type/int_real.h | 38 + 2.3-1/src/c/type/testDoubleComplex.c | 61 + 2.3-1/src/c/type/testFloatComplex.c | 62 + .../test_doubleComplex/test_doubleComplex.vcxproj | 171 + .../test_doubleComplex.vcxproj.filters | 22 + .../test_floatComplex/test_floatComplex.vcxproj | 175 + .../test_floatComplex.vcxproj.filters | 22 + 2.3-1/src/c/type/type.vcxproj | 182 + 2.3-1/src/c/type/type.vcxproj.filters | 39 + 2.3-1/src/fortran/blas/Makefile.am | 86 + 2.3-1/src/fortran/blas/Makefile.in | 601 ++++ 2.3-1/src/fortran/blas/README | 6 + 2.3-1/src/fortran/blas/blas_f/blasplus.def | 74 + 2.3-1/src/fortran/blas/blas_f/blasplusAtlas.def | 144 + 2.3-1/src/fortran/blas/blas_f/blasplus_DLL.suo | Bin 0 -> 3072 bytes 2.3-1/src/fortran/blas/blas_f/blasplus_DLL.vfproj | 124 + .../fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj | 370 ++ .../blas/blas_f/blasplus_DLL_f2c.vcxproj.filters | 463 +++ 2.3-1/src/fortran/blas/dasum.f | 43 + 2.3-1/src/fortran/blas/daxpy.f | 48 + 2.3-1/src/fortran/blas/dcabs1.f | 8 + 2.3-1/src/fortran/blas/dcopy.f | 50 + 2.3-1/src/fortran/blas/ddot.f | 49 + 2.3-1/src/fortran/blas/dgbmv.f | 300 ++ 2.3-1/src/fortran/blas/dgemm.f | 315 ++ 2.3-1/src/fortran/blas/dgemv.f | 261 ++ 2.3-1/src/fortran/blas/dger.f | 157 + 2.3-1/src/fortran/blas/dnrm2.f | 60 + 2.3-1/src/fortran/blas/drot.f | 37 + 2.3-1/src/fortran/blas/drotg.f | 27 + 2.3-1/src/fortran/blas/dsbmv.f | 303 ++ 2.3-1/src/fortran/blas/dscal.f | 43 + 2.3-1/src/fortran/blas/dspmv.f | 262 ++ 2.3-1/src/fortran/blas/dspr.f | 198 ++ 2.3-1/src/fortran/blas/dspr2.f | 229 ++ 2.3-1/src/fortran/blas/dswap.f | 56 + 2.3-1/src/fortran/blas/dsymm.f | 294 ++ 2.3-1/src/fortran/blas/dsymv.f | 262 ++ 2.3-1/src/fortran/blas/dsyr.f | 197 ++ 2.3-1/src/fortran/blas/dsyr2.f | 230 ++ 2.3-1/src/fortran/blas/dsyr2k.f | 327 ++ 2.3-1/src/fortran/blas/dsyrk.f | 294 ++ 2.3-1/src/fortran/blas/dtbmv.f | 342 ++ 2.3-1/src/fortran/blas/dtbsv.f | 346 ++ 2.3-1/src/fortran/blas/dtpmv.f | 299 ++ 2.3-1/src/fortran/blas/dtpsv.f | 302 ++ 2.3-1/src/fortran/blas/dtrmm.f | 355 ++ 2.3-1/src/fortran/blas/dtrmv.f | 286 ++ 2.3-1/src/fortran/blas/dtrsm.f | 378 ++ 2.3-1/src/fortran/blas/dtrsv.f | 289 ++ 2.3-1/src/fortran/blas/dzasum.f | 34 + 2.3-1/src/fortran/blas/dznrm2.f | 67 + 2.3-1/src/fortran/blas/idamax.f | 39 + 2.3-1/src/fortran/blas/izamax.f | 41 + 2.3-1/src/fortran/blas/license.txt | 6 + 2.3-1/src/fortran/blas/lsame.f | 87 + 2.3-1/src/fortran/blas/xerbla.f | 46 + 2.3-1/src/fortran/blas/zaxpy.f | 34 + 2.3-1/src/fortran/blas/zcopy.f | 33 + 2.3-1/src/fortran/blas/zdotc.f | 36 + 2.3-1/src/fortran/blas/zdotu.f | 36 + 2.3-1/src/fortran/blas/zdscal.f | 30 + 2.3-1/src/fortran/blas/zgbmv.f | 322 ++ 2.3-1/src/fortran/blas/zgemm.f | 415 +++ 2.3-1/src/fortran/blas/zgemv.f | 281 ++ 2.3-1/src/fortran/blas/zgerc.f | 157 + 2.3-1/src/fortran/blas/zgeru.f | 157 + 2.3-1/src/fortran/blas/zhbmv.f | 309 ++ 2.3-1/src/fortran/blas/zhemm.f | 304 ++ 2.3-1/src/fortran/blas/zhemv.f | 266 ++ 2.3-1/src/fortran/blas/zher.f | 212 ++ 2.3-1/src/fortran/blas/zher2.f | 249 ++ 2.3-1/src/fortran/blas/zher2k.f | 372 ++ 2.3-1/src/fortran/blas/zherk.f | 330 ++ 2.3-1/src/fortran/blas/zhpmv.f | 270 ++ 2.3-1/src/fortran/blas/zhpr.f | 217 ++ 2.3-1/src/fortran/blas/zhpr2.f | 251 ++ 2.3-1/src/fortran/blas/zrotg.f | 21 + 2.3-1/src/fortran/blas/zscal.f | 29 + 2.3-1/src/fortran/blas/zswap.f | 36 + 2.3-1/src/fortran/blas/zsymm.f | 296 ++ 2.3-1/src/fortran/blas/zsyr2k.f | 324 ++ 2.3-1/src/fortran/blas/zsyrk.f | 293 ++ 2.3-1/src/fortran/blas/ztbmv.f | 377 ++ 2.3-1/src/fortran/blas/ztbsv.f | 381 +++ 2.3-1/src/fortran/blas/ztpmv.f | 338 ++ 2.3-1/src/fortran/blas/ztpsv.f | 341 ++ 2.3-1/src/fortran/blas/ztrmm.f | 392 +++ 2.3-1/src/fortran/blas/ztrmv.f | 321 ++ 2.3-1/src/fortran/blas/ztrsm.f | 414 +++ 2.3-1/src/fortran/blas/ztrsv.f | 324 ++ 2.3-1/src/fortran/lapack/Makefile.am | 322 ++ 2.3-1/src/fortran/lapack/Makefile.in | 894 +++++ 2.3-1/src/fortran/lapack/README | 5 + 2.3-1/src/fortran/lapack/dbdsqr.f | 742 ++++ 2.3-1/src/fortran/lapack/dgebak.f | 188 + 2.3-1/src/fortran/lapack/dgebal.f | 322 ++ 2.3-1/src/fortran/lapack/dgebd2.f | 239 ++ 2.3-1/src/fortran/lapack/dgebrd.f | 268 ++ 2.3-1/src/fortran/lapack/dgecon.f | 185 + 2.3-1/src/fortran/lapack/dgeequ.f | 225 ++ 2.3-1/src/fortran/lapack/dgees.f | 434 +++ 2.3-1/src/fortran/lapack/dgeesx.f | 527 +++ 2.3-1/src/fortran/lapack/dgeev.f | 423 +++ 2.3-1/src/fortran/lapack/dgegs.f | 438 +++ 2.3-1/src/fortran/lapack/dgehd2.f | 149 + 2.3-1/src/fortran/lapack/dgehrd.f | 273 ++ 2.3-1/src/fortran/lapack/dgelq2.f | 121 + 2.3-1/src/fortran/lapack/dgelqf.f | 195 ++ 2.3-1/src/fortran/lapack/dgels.f | 422 +++ 2.3-1/src/fortran/lapack/dgelss.f | 617 ++++ 2.3-1/src/fortran/lapack/dgelsx.f | 349 ++ 2.3-1/src/fortran/lapack/dgelsy.f | 391 +++ 2.3-1/src/fortran/lapack/dgeql2.f | 122 + 2.3-1/src/fortran/lapack/dgeqlf.f | 213 ++ 2.3-1/src/fortran/lapack/dgeqp3.f | 287 ++ 2.3-1/src/fortran/lapack/dgeqpf.f | 231 ++ 2.3-1/src/fortran/lapack/dgeqr2.f | 121 + 2.3-1/src/fortran/lapack/dgeqrf.f | 196 ++ 2.3-1/src/fortran/lapack/dgerfs.f | 336 ++ 2.3-1/src/fortran/lapack/dgerq2.f | 122 + 2.3-1/src/fortran/lapack/dgerqf.f | 213 ++ 2.3-1/src/fortran/lapack/dgesc2.f | 132 + 2.3-1/src/fortran/lapack/dgesv.f | 107 + 2.3-1/src/fortran/lapack/dgesvd.f | 3401 ++++++++++++++++++ 2.3-1/src/fortran/lapack/dgesvx.f | 479 +++ 2.3-1/src/fortran/lapack/dgetc2.f | 146 + 2.3-1/src/fortran/lapack/dgetf2.f | 147 + 2.3-1/src/fortran/lapack/dgetrf.f | 159 + 2.3-1/src/fortran/lapack/dgetri.f | 192 ++ 2.3-1/src/fortran/lapack/dgetrs.f | 149 + 2.3-1/src/fortran/lapack/dggbak.f | 220 ++ 2.3-1/src/fortran/lapack/dggbal.f | 469 +++ 2.3-1/src/fortran/lapack/dgges.f | 550 +++ 2.3-1/src/fortran/lapack/dggev.f | 489 +++ 2.3-1/src/fortran/lapack/dgghrd.f | 264 ++ 2.3-1/src/fortran/lapack/dhgeqz.f | 1243 +++++++ 2.3-1/src/fortran/lapack/dhseqr.f | 407 +++ 2.3-1/src/fortran/lapack/disnan.f | 33 + 2.3-1/src/fortran/lapack/dlabad.f | 55 + 2.3-1/src/fortran/lapack/dlabrd.f | 290 ++ 2.3-1/src/fortran/lapack/dlacn2.f | 214 ++ 2.3-1/src/fortran/lapack/dlacon.f | 205 ++ 2.3-1/src/fortran/lapack/dlacpy.f | 87 + 2.3-1/src/fortran/lapack/dladiv.f | 62 + 2.3-1/src/fortran/lapack/dlae2.f | 123 + 2.3-1/src/fortran/lapack/dlaev2.f | 169 + 2.3-1/src/fortran/lapack/dlaexc.f | 354 ++ 2.3-1/src/fortran/lapack/dlag2.f | 300 ++ 2.3-1/src/fortran/lapack/dlagv2.f | 287 ++ 2.3-1/src/fortran/lapack/dlahqr.f | 501 +++ 2.3-1/src/fortran/lapack/dlahr2.f | 238 ++ 2.3-1/src/fortran/lapack/dlahrd.f | 207 ++ 2.3-1/src/fortran/lapack/dlaic1.f | 292 ++ 2.3-1/src/fortran/lapack/dlaisnan.f | 41 + 2.3-1/src/fortran/lapack/dlaln2.f | 507 +++ 2.3-1/src/fortran/lapack/dlamch.f | 857 +++++ 2.3-1/src/fortran/lapack/dlange.f | 144 + 2.3-1/src/fortran/lapack/dlanhs.f | 141 + 2.3-1/src/fortran/lapack/dlansp.f | 196 ++ 2.3-1/src/fortran/lapack/dlanst.f | 124 + 2.3-1/src/fortran/lapack/dlansy.f | 173 + 2.3-1/src/fortran/lapack/dlantr.f | 276 ++ 2.3-1/src/fortran/lapack/dlanv2.f | 205 ++ 2.3-1/src/fortran/lapack/dlapmt.f | 136 + 2.3-1/src/fortran/lapack/dlapy2.f | 53 + 2.3-1/src/fortran/lapack/dlapy3.f | 56 + 2.3-1/src/fortran/lapack/dlaqge.f | 154 + 2.3-1/src/fortran/lapack/dlaqp2.f | 175 + 2.3-1/src/fortran/lapack/dlaqps.f | 259 ++ 2.3-1/src/fortran/lapack/dlaqr0.f | 642 ++++ 2.3-1/src/fortran/lapack/dlaqr1.f | 97 + 2.3-1/src/fortran/lapack/dlaqr2.f | 551 +++ 2.3-1/src/fortran/lapack/dlaqr3.f | 561 +++ 2.3-1/src/fortran/lapack/dlaqr4.f | 640 ++++ 2.3-1/src/fortran/lapack/dlaqr5.f | 812 +++++ 2.3-1/src/fortran/lapack/dlarf.f | 115 + 2.3-1/src/fortran/lapack/dlarfb.f | 587 ++++ 2.3-1/src/fortran/lapack/dlarfg.f | 137 + 2.3-1/src/fortran/lapack/dlarft.f | 217 ++ 2.3-1/src/fortran/lapack/dlarfx.f | 638 ++++ 2.3-1/src/fortran/lapack/dlartg.f | 145 + 2.3-1/src/fortran/lapack/dlarz.f | 152 + 2.3-1/src/fortran/lapack/dlarzb.f | 220 ++ 2.3-1/src/fortran/lapack/dlarzt.f | 184 + 2.3-1/src/fortran/lapack/dlas2.f | 121 + 2.3-1/src/fortran/lapack/dlascl.f | 267 ++ 2.3-1/src/fortran/lapack/dlaset.f | 114 + 2.3-1/src/fortran/lapack/dlasq1.f | 148 + 2.3-1/src/fortran/lapack/dlasq2.f | 448 +++ 2.3-1/src/fortran/lapack/dlasq3.f | 295 ++ 2.3-1/src/fortran/lapack/dlasq4.f | 329 ++ 2.3-1/src/fortran/lapack/dlasq5.f | 195 ++ 2.3-1/src/fortran/lapack/dlasq6.f | 175 + 2.3-1/src/fortran/lapack/dlasr.f | 361 ++ 2.3-1/src/fortran/lapack/dlasrt.f | 243 ++ 2.3-1/src/fortran/lapack/dlassq.f | 88 + 2.3-1/src/fortran/lapack/dlasv2.f | 249 ++ 2.3-1/src/fortran/lapack/dlaswp.f | 119 + 2.3-1/src/fortran/lapack/dlasy2.f | 381 +++ 2.3-1/src/fortran/lapack/dlasyf.f | 587 ++++ 2.3-1/src/fortran/lapack/dlatdf.f | 237 ++ 2.3-1/src/fortran/lapack/dlatrd.f | 258 ++ 2.3-1/src/fortran/lapack/dlatrs.f | 701 ++++ 2.3-1/src/fortran/lapack/dlatrz.f | 127 + 2.3-1/src/fortran/lapack/dlatzm.f | 142 + 2.3-1/src/fortran/lapack/dlazq3.f | 302 ++ 2.3-1/src/fortran/lapack/dlazq4.f | 330 ++ 2.3-1/src/fortran/lapack/dopgtr.f | 160 + 2.3-1/src/fortran/lapack/dorg2l.f | 127 + 2.3-1/src/fortran/lapack/dorg2r.f | 129 + 2.3-1/src/fortran/lapack/dorgbr.f | 244 ++ 2.3-1/src/fortran/lapack/dorghr.f | 164 + 2.3-1/src/fortran/lapack/dorgl2.f | 133 + 2.3-1/src/fortran/lapack/dorglq.f | 215 ++ 2.3-1/src/fortran/lapack/dorgql.f | 222 ++ 2.3-1/src/fortran/lapack/dorgqr.f | 216 ++ 2.3-1/src/fortran/lapack/dorgr2.f | 131 + 2.3-1/src/fortran/lapack/dorgrq.f | 222 ++ 2.3-1/src/fortran/lapack/dorgtr.f | 183 + 2.3-1/src/fortran/lapack/dorm2l.f | 193 ++ 2.3-1/src/fortran/lapack/dorm2r.f | 197 ++ 2.3-1/src/fortran/lapack/dormbr.f | 281 ++ 2.3-1/src/fortran/lapack/dormhr.f | 201 ++ 2.3-1/src/fortran/lapack/dorml2.f | 197 ++ 2.3-1/src/fortran/lapack/dormlq.f | 267 ++ 2.3-1/src/fortran/lapack/dormql.f | 261 ++ 2.3-1/src/fortran/lapack/dormqr.f | 260 ++ 2.3-1/src/fortran/lapack/dormr2.f | 193 ++ 2.3-1/src/fortran/lapack/dormr3.f | 206 ++ 2.3-1/src/fortran/lapack/dormrq.f | 268 ++ 2.3-1/src/fortran/lapack/dormrz.f | 292 ++ 2.3-1/src/fortran/lapack/dpocon.f | 177 + 2.3-1/src/fortran/lapack/dpotf2.f | 167 + 2.3-1/src/fortran/lapack/dpotrf.f | 183 + 2.3-1/src/fortran/lapack/dpotrs.f | 132 + 2.3-1/src/fortran/lapack/dpptrf.f | 177 + 2.3-1/src/fortran/lapack/drscl.f | 114 + 2.3-1/src/fortran/lapack/dspev.f | 187 + 2.3-1/src/fortran/lapack/dspgst.f | 208 ++ 2.3-1/src/fortran/lapack/dspgv.f | 195 ++ 2.3-1/src/fortran/lapack/dsptrd.f | 228 ++ 2.3-1/src/fortran/lapack/dsptrf.f | 547 +++ 2.3-1/src/fortran/lapack/dsteqr.f | 500 +++ 2.3-1/src/fortran/lapack/dsterf.f | 364 ++ 2.3-1/src/fortran/lapack/dsycon.f | 165 + 2.3-1/src/fortran/lapack/dsyev.f | 211 ++ 2.3-1/src/fortran/lapack/dsysv.f | 174 + 2.3-1/src/fortran/lapack/dsytd2.f | 248 ++ 2.3-1/src/fortran/lapack/dsytf2.f | 521 +++ 2.3-1/src/fortran/lapack/dsytrd.f | 294 ++ 2.3-1/src/fortran/lapack/dsytrf.f | 287 ++ 2.3-1/src/fortran/lapack/dsytri.f | 312 ++ 2.3-1/src/fortran/lapack/dsytrs.f | 369 ++ 2.3-1/src/fortran/lapack/dtgevc.f | 1147 +++++++ 2.3-1/src/fortran/lapack/dtgex2.f | 581 ++++ 2.3-1/src/fortran/lapack/dtgexc.f | 440 +++ 2.3-1/src/fortran/lapack/dtgsen.f | 723 ++++ 2.3-1/src/fortran/lapack/dtgsy2.f | 956 ++++++ 2.3-1/src/fortran/lapack/dtgsyl.f | 556 +++ 2.3-1/src/fortran/lapack/dtrcon.f | 197 ++ 2.3-1/src/fortran/lapack/dtrevc.f | 980 ++++++ 2.3-1/src/fortran/lapack/dtrexc.f | 345 ++ 2.3-1/src/fortran/lapack/dtrsen.f | 459 +++ 2.3-1/src/fortran/lapack/dtrsyl.f | 913 +++++ 2.3-1/src/fortran/lapack/dtrti2.f | 146 + 2.3-1/src/fortran/lapack/dtrtri.f | 176 + 2.3-1/src/fortran/lapack/dtrtrs.f | 147 + 2.3-1/src/fortran/lapack/dtzrqf.f | 164 + 2.3-1/src/fortran/lapack/dtzrzf.f | 244 ++ 2.3-1/src/fortran/lapack/dzsum1.f | 81 + 2.3-1/src/fortran/lapack/ieeeck.f | 147 + 2.3-1/src/fortran/lapack/ilaenv.f | 552 +++ 2.3-1/src/fortran/lapack/iparmq.f | 253 ++ 2.3-1/src/fortran/lapack/izmax1.f | 95 + 2.3-1/src/fortran/lapack/lapack_f/lapack.def | 306 ++ 2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.suo | Bin 0 -> 3072 bytes .../src/fortran/lapack/lapack_f/lapack_DLL.vfproj | 352 ++ .../fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj | 837 +++++ .../lapack/lapack_f/lapack_DLL_f2c.vcxproj.filters | 1782 ++++++++++ 2.3-1/src/fortran/lapack/lsame.f | 87 + 2.3-1/src/fortran/lapack/slamch.f | 857 +++++ 2.3-1/src/fortran/lapack/xerbla.f | 45 + 2.3-1/src/fortran/lapack/zbdsqr.f | 742 ++++ 2.3-1/src/fortran/lapack/zdrot.f | 96 + 2.3-1/src/fortran/lapack/zdrscl.f | 114 + 2.3-1/src/fortran/lapack/zgebak.f | 189 + 2.3-1/src/fortran/lapack/zgebal.f | 330 ++ 2.3-1/src/fortran/lapack/zgebd2.f | 250 ++ 2.3-1/src/fortran/lapack/zgebrd.f | 268 ++ 2.3-1/src/fortran/lapack/zgecon.f | 193 ++ 2.3-1/src/fortran/lapack/zgees.f | 324 ++ 2.3-1/src/fortran/lapack/zgeev.f | 396 +++ 2.3-1/src/fortran/lapack/zgehd2.f | 148 + 2.3-1/src/fortran/lapack/zgehrd.f | 273 ++ 2.3-1/src/fortran/lapack/zgelq2.f | 123 + 2.3-1/src/fortran/lapack/zgelqf.f | 195 ++ 2.3-1/src/fortran/lapack/zgelsy.f | 385 +++ 2.3-1/src/fortran/lapack/zgeqp3.f | 293 ++ 2.3-1/src/fortran/lapack/zgeqpf.f | 234 ++ 2.3-1/src/fortran/lapack/zgeqr2.f | 121 + 2.3-1/src/fortran/lapack/zgeqrf.f | 196 ++ 2.3-1/src/fortran/lapack/zgesc2.f | 133 + 2.3-1/src/fortran/lapack/zgesvd.f | 3602 ++++++++++++++++++++ 2.3-1/src/fortran/lapack/zgetc2.f | 145 + 2.3-1/src/fortran/lapack/zgetf2.f | 148 + 2.3-1/src/fortran/lapack/zgetrf.f | 159 + 2.3-1/src/fortran/lapack/zgetri.f | 193 ++ 2.3-1/src/fortran/lapack/zgetrs.f | 149 + 2.3-1/src/fortran/lapack/zggbak.f | 220 ++ 2.3-1/src/fortran/lapack/zggbal.f | 482 +++ 2.3-1/src/fortran/lapack/zgges.f | 477 +++ 2.3-1/src/fortran/lapack/zggev.f | 454 +++ 2.3-1/src/fortran/lapack/zgghrd.f | 264 ++ 2.3-1/src/fortran/lapack/zheev.f | 218 ++ 2.3-1/src/fortran/lapack/zhetd2.f | 258 ++ 2.3-1/src/fortran/lapack/zhetrd.f | 296 ++ 2.3-1/src/fortran/lapack/zhgeqz.f | 759 +++++ 2.3-1/src/fortran/lapack/zhseqr.f | 395 +++ 2.3-1/src/fortran/lapack/zlabrd.f | 328 ++ 2.3-1/src/fortran/lapack/zlacgv.f | 60 + 2.3-1/src/fortran/lapack/zlacn2.f | 221 ++ 2.3-1/src/fortran/lapack/zlacon.f | 212 ++ 2.3-1/src/fortran/lapack/zlacpy.f | 90 + 2.3-1/src/fortran/lapack/zladiv.f | 46 + 2.3-1/src/fortran/lapack/zlahqr.f | 470 +++ 2.3-1/src/fortran/lapack/zlahr2.f | 240 ++ 2.3-1/src/fortran/lapack/zlahrd.f | 213 ++ 2.3-1/src/fortran/lapack/zlaic1.f | 295 ++ 2.3-1/src/fortran/lapack/zlange.f | 145 + 2.3-1/src/fortran/lapack/zlanhe.f | 187 + 2.3-1/src/fortran/lapack/zlanhs.f | 142 + 2.3-1/src/fortran/lapack/zlaqp2.f | 179 + 2.3-1/src/fortran/lapack/zlaqps.f | 266 ++ 2.3-1/src/fortran/lapack/zlaqr0.f | 601 ++++ 2.3-1/src/fortran/lapack/zlaqr1.f | 97 + 2.3-1/src/fortran/lapack/zlaqr2.f | 437 +++ 2.3-1/src/fortran/lapack/zlaqr3.f | 448 +++ 2.3-1/src/fortran/lapack/zlaqr4.f | 602 ++++ 2.3-1/src/fortran/lapack/zlaqr5.f | 809 +++++ 2.3-1/src/fortran/lapack/zlarf.f | 120 + 2.3-1/src/fortran/lapack/zlarfb.f | 608 ++++ 2.3-1/src/fortran/lapack/zlarfg.f | 145 + 2.3-1/src/fortran/lapack/zlarft.f | 224 ++ 2.3-1/src/fortran/lapack/zlarfx.f | 641 ++++ 2.3-1/src/fortran/lapack/zlartg.f | 195 ++ 2.3-1/src/fortran/lapack/zlarz.f | 157 + 2.3-1/src/fortran/lapack/zlarzb.f | 234 ++ 2.3-1/src/fortran/lapack/zlarzt.f | 186 + 2.3-1/src/fortran/lapack/zlascl.f | 267 ++ 2.3-1/src/fortran/lapack/zlaset.f | 114 + 2.3-1/src/fortran/lapack/zlasr.f | 363 ++ 2.3-1/src/fortran/lapack/zlassq.f | 101 + 2.3-1/src/fortran/lapack/zlaswp.f | 119 + 2.3-1/src/fortran/lapack/zlatdf.f | 241 ++ 2.3-1/src/fortran/lapack/zlatrd.f | 279 ++ 2.3-1/src/fortran/lapack/zlatrs.f | 879 +++++ 2.3-1/src/fortran/lapack/zlatrz.f | 133 + 2.3-1/src/fortran/lapack/zpotf2.f | 174 + 2.3-1/src/fortran/lapack/zpotrf.f | 186 + 2.3-1/src/fortran/lapack/zrot.f | 91 + 2.3-1/src/fortran/lapack/zsteqr.f | 503 +++ 2.3-1/src/fortran/lapack/ztgevc.f | 633 ++++ 2.3-1/src/fortran/lapack/ztgex2.f | 265 ++ 2.3-1/src/fortran/lapack/ztgexc.f | 206 ++ 2.3-1/src/fortran/lapack/ztgsen.f | 652 ++++ 2.3-1/src/fortran/lapack/ztgsy2.f | 361 ++ 2.3-1/src/fortran/lapack/ztgsyl.f | 575 ++++ 2.3-1/src/fortran/lapack/ztrevc.f | 386 +++ 2.3-1/src/fortran/lapack/ztrexc.f | 162 + 2.3-1/src/fortran/lapack/ztrsen.f | 359 ++ 2.3-1/src/fortran/lapack/ztrsyl.f | 365 ++ 2.3-1/src/fortran/lapack/ztrti2.f | 146 + 2.3-1/src/fortran/lapack/ztrtri.f | 177 + 2.3-1/src/fortran/lapack/ztzrzf.f | 244 ++ 2.3-1/src/fortran/lapack/zung2l.f | 128 + 2.3-1/src/fortran/lapack/zung2r.f | 130 + 2.3-1/src/fortran/lapack/zungbr.f | 245 ++ 2.3-1/src/fortran/lapack/zunghr.f | 165 + 2.3-1/src/fortran/lapack/zungl2.f | 136 + 2.3-1/src/fortran/lapack/zunglq.f | 215 ++ 2.3-1/src/fortran/lapack/zungql.f | 222 ++ 2.3-1/src/fortran/lapack/zungqr.f | 216 ++ 2.3-1/src/fortran/lapack/zungtr.f | 184 + 2.3-1/src/fortran/lapack/zunm2r.f | 201 ++ 2.3-1/src/fortran/lapack/zunmbr.f | 288 ++ 2.3-1/src/fortran/lapack/zunml2.f | 205 ++ 2.3-1/src/fortran/lapack/zunmlq.f | 267 ++ 2.3-1/src/fortran/lapack/zunmqr.f | 260 ++ 2.3-1/src/fortran/lapack/zunmr3.f | 212 ++ 2.3-1/src/fortran/lapack/zunmrz.f | 296 ++ 1862 files changed, 314929 insertions(+) create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionAbs.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionConj.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind2d.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsEmpty.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsNan.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionLength.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSign.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSize.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionType.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACos.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACosh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASin.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASinh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan2.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATanh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCeil_Fix_Floor_Int_Round.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCos.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCosh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionExp_Expm.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog10.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog1p.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow0.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow_MatrixPow.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSin.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSinh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSqrt.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTan.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTanh.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/implicitList/mainfunctionImplicitList.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpIns.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogEq.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNe.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNot.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionChol.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionDet.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionEye.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionInversion.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOnes.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOpApex_OpDotApex.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionSpec_Spec2.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionZeros.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpMinus.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpPlus.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpSlash_OpDotSlash.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpStar_OpDotStar.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionConvol.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFft.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFftShift.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionIfft.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionLev.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionMean.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionSum.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionVariance.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/type/mainfunctionReal_Imag.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/SCI2CInputParameters.sce create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/scilabcode/mainfunction.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/SCI2CInputParameters.sce create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/scilabcode/mainfunction.sci create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/SCI2CInputParameters.sce create mode 100644 2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci create mode 100644 2.3-1/src/c/auxiliaryFunctions/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/cabsa.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/cabss.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/dabsa.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/dabss.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/sabsa.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/sabss.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/testAbs.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/testDoubleAbs.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/testFloatAbs.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/zabsa.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/abs/zabss.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/cconja.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/cconjs.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/testConj.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/zconja.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/conj/zconjs.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/cfinda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/dfinda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/sfinda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/testFind.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/testFind.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/find/zfinda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/cfind2da.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/dfind2da.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/sfind2da.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/find2d/zfind2da.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/dfrexps.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/sfrexps.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/testFrexp.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/abs.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/conj.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/find.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/find2d.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/frexp.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/isempty.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/isnan.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/length.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/max.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/min.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/pythag.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/rand.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/sign.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/size.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/includes/type.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_find.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_frexp.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_isempty.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_isnan.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_length.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_max.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_min.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_pythag.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_rand.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_sign.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_size.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/interfaces/int_type.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/testIsEmpty.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/testIsEmpty.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/cisnana.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/cisnans.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/disnana.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/disnans.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/sisnana.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/sisnans.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/zisnana.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/isnan/zisnans.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/testLength.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/testLength.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/cpythags.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/dpythags.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/spythags.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/pythag/zpythags.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/cranda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/crands.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/dranda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/drands.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/sranda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/srands.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/testRand.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/testRand.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/zranda.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/rand/zrands.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/csigna.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/csigns.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/dsigna.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/dsigns.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/ssigna.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/ssigns.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/testSign.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/testSign.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/zsigna.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/sign/zsigns.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/dallsizea.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/testSize.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/testSize.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj.filters create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/Makefile.am create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/Makefile.in create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/testType.c create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/testType.h create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj create mode 100644 2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/acos/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/acos/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/acos/cacosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/cacoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/dacosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/dacoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/sacosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/sacoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/testAcos.h create mode 100644 2.3-1/src/c/elementaryFunctions/acos/testCplxAcos.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/testRealsAcos.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj create mode 100644 2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj create mode 100644 2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/acos/zacosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/acos/zacoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/cacosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/cacoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/dacosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/dacoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/sacosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/sacoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/testAcosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/testDoubleAcosh.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/testFloatAcosh.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/zacosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/acosh/zacoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/asin/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/asin/casina.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/casins.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/dasina.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/dasins.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/sasina.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/sasins.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/testAsin.h create mode 100644 2.3-1/src/c/elementaryFunctions/asin/testDoubleAsin.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/testFloatAsin.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/zasina.c create mode 100644 2.3-1/src/c/elementaryFunctions/asin/zasins.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/casinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/casinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/dasinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/dasinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/sasinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/sasinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/testAsinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/testDoubleAsinh.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/testFloatAsinh.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/zasinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/asinh/zasinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/atan/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/atan/catana.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/catans.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/datana.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/datans.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/satana.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/satans.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/testAtan.h create mode 100644 2.3-1/src/c/elementaryFunctions/atan/testDoubleAtan.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/testFloatAtan.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/zatana.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan/zatans.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/datan2a.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/datan2s.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/satan2a.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/satan2s.c create mode 100644 2.3-1/src/c/elementaryFunctions/atan2/testAtan2.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/catanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/catanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/datanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/datanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/satanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/satanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/testAtanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/testDoubleAtanh.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/testFloatAtanh.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/zatanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/atanh/zatanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/auxiliaryFunctions_Import.def create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/cceila.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/cceils.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/dceila.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/dceils.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/sceila.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/sceils.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/testDoubleCeil.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/testFloatCeil.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/zceila.c create mode 100644 2.3-1/src/c/elementaryFunctions/ceil/zceils.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/cos/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/cos/ccosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/ccoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/dcosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/dcoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/scosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/scoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/testCos.h create mode 100644 2.3-1/src/c/elementaryFunctions/cos/testDoubleCos.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/testFloatCos.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/zcosa.c create mode 100644 2.3-1/src/c/elementaryFunctions/cos/zcoss.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/ccosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/ccoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/dcosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/dcoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/scosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/scoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/testCosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/testDoubleCosh.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/testFloatCosh.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/zcosha.c create mode 100644 2.3-1/src/c/elementaryFunctions/cosh/zcoshs.c create mode 100644 2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj create mode 100644 2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj.filters create mode 100644 2.3-1/src/c/elementaryFunctions/exp/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/exp/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/exp/cexpa.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/cexps.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/dexpa.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/dexps.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/sexpa.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/sexps.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/testDoubleExp.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/testExp.h create mode 100644 2.3-1/src/c/elementaryFunctions/exp/testFloatExp.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/zexpa.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp/zexps.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/cexp10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/cexp10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/dexp10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/dexp10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/sexp10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/sexp10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/testDoubleExp10.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/testExp10.h create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/testFloatExp10.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/zexp10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/exp10/zexp10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/fix/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/fix/cfixa.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/cfixs.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/dfixa.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/dfixs.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/sfixa.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/sfixs.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/testDoubleFix.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/testFloatFix.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/zfixa.c create mode 100644 2.3-1/src/c/elementaryFunctions/fix/zfixs.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/floor/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/floor/cfloora.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/cfloors.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/dfloora.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/dfloors.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/sfloora.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/sfloors.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/testDoubleFloor.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/testFloatFloor.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/zfloora.c create mode 100644 2.3-1/src/c/elementaryFunctions/floor/zfloors.c create mode 100644 2.3-1/src/c/elementaryFunctions/includes/acos.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/acosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/asin.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/asinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/atan.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/atan2.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/atanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/ceil.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/cos.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/cosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/dynlib_elementaryfunctions.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/exp.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/exp10.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/fix.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/floor.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/int.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/lnp1m1.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/log.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/log10.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/log1p.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/pow.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/round.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/sin.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/sinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/sqrt.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/tan.h create mode 100644 2.3-1/src/c/elementaryFunctions/includes/tanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/int/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/int/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/int/cinta.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/cints.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/dinta.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/dints.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/sinta.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/sints.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/testDoubleInt.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/testFloatInt.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/zinta.c create mode 100644 2.3-1/src/c/elementaryFunctions/int/zints.c create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_OpHat.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_acos.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_acosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_asin.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_asinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_atan.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_atanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_ceil.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_cos.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_cosh.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_exp.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_exp10.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_fix.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_floor.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_int.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_lnp1m1.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_log.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_log10.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_log1p.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_pow.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_round.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_sin.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_sinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_sqrt.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_tan.h create mode 100644 2.3-1/src/c/elementaryFunctions/interfaces/int_tanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/slnp1m1s.c create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/testDoubleLnp1m1.c create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/testFloatLnp1m1.c create mode 100644 2.3-1/src/c/elementaryFunctions/lnp1m1/testLnp1m1.h create mode 100644 2.3-1/src/c/elementaryFunctions/log/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/log/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/log/cloga.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/clogs.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/dloga.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/dlogs.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/sloga.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/slogs.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/testDoubleLog.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/testFloatLog.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/testLog.h create mode 100644 2.3-1/src/c/elementaryFunctions/log/zloga.c create mode 100644 2.3-1/src/c/elementaryFunctions/log/zlogs.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/log10/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/log10/clog10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/clog10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/dlog10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/dlog10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/slog10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/slog10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/testDoubleLog10.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/testFloatLog10.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/testLog10.h create mode 100644 2.3-1/src/c/elementaryFunctions/log10/zlog10a.c create mode 100644 2.3-1/src/c/elementaryFunctions/log10/zlog10s.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/clog1pa.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/clog1ps.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/dlog1pa.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/dlog1ps.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/slog1pa.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/slog1ps.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/testDoubleLog1p.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/testFloatLog1p.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/testLog1p.h create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/zlog1pa.c create mode 100644 2.3-1/src/c/elementaryFunctions/log1p/zlog1ps.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/pow/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/pow/cpowa.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/cpows.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/dpowa.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/dpows.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/spowa.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/spows.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/testDoublePow.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/testFloatPow.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/testPow.h create mode 100644 2.3-1/src/c/elementaryFunctions/pow/zpowa.c create mode 100644 2.3-1/src/c/elementaryFunctions/pow/zpows.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/round/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/round/crounda.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/crounds.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/drounda.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/drounds.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/srounda.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/srounds.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/testDoubleRound.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/testFloatRound.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/zrounda.c create mode 100644 2.3-1/src/c/elementaryFunctions/round/zrounds.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/sin/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/sin/csina.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/csins.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/dsina.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/dsins.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/ssina.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/ssins.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/testDoubleSin.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/testFloatSin.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/testSin.h create mode 100644 2.3-1/src/c/elementaryFunctions/sin/zsina.c create mode 100644 2.3-1/src/c/elementaryFunctions/sin/zsins.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/csinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/csinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/dsinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/dsinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/ssinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/ssinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/testDoubleSinh.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/testFloatSinh.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/testSinh.h create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/zsinha.c create mode 100644 2.3-1/src/c/elementaryFunctions/sinh/zsinhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/csqrta.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/csqrts.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/ssqrta.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/ssqrts.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/testDoubleSqrt.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/testFloatSqrt.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/testSqrt.h create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/zsqrta.c create mode 100644 2.3-1/src/c/elementaryFunctions/sqrt/zsqrts.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/tan/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/tan/ctana.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/ctans.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/dtana.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/dtans.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/stana.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/stans.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/testDoubleTan.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/testFloatTan.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/testTan.h create mode 100644 2.3-1/src/c/elementaryFunctions/tan/ztana.c create mode 100644 2.3-1/src/c/elementaryFunctions/tan/ztans.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/Makefile.am create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/Makefile.in create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/ctanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/dtanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/dtanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/stanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/stanhs.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/testDoubleTanh.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/testFloatTanh.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/testTanh.h create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/ztanha.c create mode 100644 2.3-1/src/c/elementaryFunctions/tanh/ztanhs.c create mode 100644 2.3-1/src/c/implicitList/Makefile.am create mode 100644 2.3-1/src/c/implicitList/Makefile.in create mode 100644 2.3-1/src/c/implicitList/cimplicitLists.c create mode 100644 2.3-1/src/c/implicitList/dimplicitLists.c create mode 100644 2.3-1/src/c/implicitList/dynlib_implicitlist.h create mode 100644 2.3-1/src/c/implicitList/implicitList.h create mode 100644 2.3-1/src/c/implicitList/implicitList.vcxproj create mode 100644 2.3-1/src/c/implicitList/implicitList.vcxproj.filters create mode 100644 2.3-1/src/c/implicitList/int_OpColon.h create mode 100644 2.3-1/src/c/implicitList/simplicitLists.c create mode 100644 2.3-1/src/c/implicitList/testDoubleImplicitList.c create mode 100644 2.3-1/src/c/implicitList/testFloatImplicitList.c create mode 100644 2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj create mode 100644 2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj.filters create mode 100644 2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj create mode 100644 2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj.filters create mode 100644 2.3-1/src/c/implicitList/zimplicitLists.c create mode 100644 2.3-1/src/c/matrixOperations/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/cat/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/cat/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/cat/ccata.c create mode 100644 2.3-1/src/c/matrixOperations/cat/ccats.c create mode 100644 2.3-1/src/c/matrixOperations/cat/dcata.c create mode 100644 2.3-1/src/c/matrixOperations/cat/dcats.c create mode 100644 2.3-1/src/c/matrixOperations/cat/scata.c create mode 100644 2.3-1/src/c/matrixOperations/cat/scats.c create mode 100644 2.3-1/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c create mode 100644 2.3-1/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c create mode 100644 2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/cat/zcata.c create mode 100644 2.3-1/src/c/matrixOperations/cat/zcats.c create mode 100644 2.3-1/src/c/matrixOperations/chol/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/chol/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/chol/cchola.c create mode 100644 2.3-1/src/c/matrixOperations/chol/dchola.c create mode 100644 2.3-1/src/c/matrixOperations/chol/dchols.c create mode 100644 2.3-1/src/c/matrixOperations/chol/schola.c create mode 100644 2.3-1/src/c/matrixOperations/chol/schols.c create mode 100644 2.3-1/src/c/matrixOperations/chol/testDoubleChol.c create mode 100644 2.3-1/src/c/matrixOperations/chol/testFloatChol.c create mode 100644 2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/chol/zchola.c create mode 100644 2.3-1/src/c/matrixOperations/determ/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/determ/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/determ/cdeterma.c create mode 100644 2.3-1/src/c/matrixOperations/determ/ddeterma.c create mode 100644 2.3-1/src/c/matrixOperations/determ/sdeterma.c create mode 100644 2.3-1/src/c/matrixOperations/determ/testDoubleDeterm.c create mode 100644 2.3-1/src/c/matrixOperations/determ/testFloatDeterm.c create mode 100644 2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/determ/zdeterma.c create mode 100644 2.3-1/src/c/matrixOperations/dist/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/dist/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/dist/cdista.c create mode 100644 2.3-1/src/c/matrixOperations/dist/cdists.c create mode 100644 2.3-1/src/c/matrixOperations/dist/ddista.c create mode 100644 2.3-1/src/c/matrixOperations/dist/ddists.c create mode 100644 2.3-1/src/c/matrixOperations/dist/sdista.c create mode 100644 2.3-1/src/c/matrixOperations/dist/sdists.c create mode 100644 2.3-1/src/c/matrixOperations/dist/testDoubleDist.c create mode 100644 2.3-1/src/c/matrixOperations/dist/testFloatDist.c create mode 100644 2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/dist/zdista.c create mode 100644 2.3-1/src/c/matrixOperations/dist/zdists.c create mode 100644 2.3-1/src/c/matrixOperations/division/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/division/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/division/cldivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/crdivcsv.c create mode 100644 2.3-1/src/c/matrixOperations/division/crdivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/crdivscv.c create mode 100644 2.3-1/src/c/matrixOperations/division/crdivv.c create mode 100644 2.3-1/src/c/matrixOperations/division/dldivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/drdivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/drdivv.c create mode 100644 2.3-1/src/c/matrixOperations/division/sldivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/srdivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/srdivv.c create mode 100644 2.3-1/src/c/matrixOperations/division/testMatrixLDivision.c create mode 100644 2.3-1/src/c/matrixOperations/division/testMatrixRDivision.c create mode 100644 2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/division/zldivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/zrdivdzv.c create mode 100644 2.3-1/src/c/matrixOperations/division/zrdivma.c create mode 100644 2.3-1/src/c/matrixOperations/division/zrdivv.c create mode 100644 2.3-1/src/c/matrixOperations/division/zrdivzdv.c create mode 100644 2.3-1/src/c/matrixOperations/expm/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/expm/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/expm/cexpma.c create mode 100644 2.3-1/src/c/matrixOperations/expm/dexpma.c create mode 100644 2.3-1/src/c/matrixOperations/expm/sexpma.c create mode 100644 2.3-1/src/c/matrixOperations/expm/testMatrixExponential.c create mode 100644 2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/expm/zexpma.c create mode 100644 2.3-1/src/c/matrixOperations/eye/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/eye/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/eye/ceyea.c create mode 100644 2.3-1/src/c/matrixOperations/eye/deyea.c create mode 100644 2.3-1/src/c/matrixOperations/eye/seyea.c create mode 100644 2.3-1/src/c/matrixOperations/eye/testMatrixEye.c create mode 100644 2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/eye/zeyea.c create mode 100644 2.3-1/src/c/matrixOperations/fill/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/fill/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/fill/cfilla.c create mode 100644 2.3-1/src/c/matrixOperations/fill/dfilla.c create mode 100644 2.3-1/src/c/matrixOperations/fill/sfilla.c create mode 100644 2.3-1/src/c/matrixOperations/fill/testDoubleFill.c create mode 100644 2.3-1/src/c/matrixOperations/fill/testFloatFill.c create mode 100644 2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/fill/zfilla.c create mode 100644 2.3-1/src/c/matrixOperations/hilb/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/hilb/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/hilb/dhilba.c create mode 100644 2.3-1/src/c/matrixOperations/hilb/shilba.c create mode 100644 2.3-1/src/c/matrixOperations/hilb/testHilbert.c create mode 100644 2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/includes/cat.h create mode 100644 2.3-1/src/c/matrixOperations/includes/chol.h create mode 100644 2.3-1/src/c/matrixOperations/includes/determ.h create mode 100644 2.3-1/src/c/matrixOperations/includes/dist.h create mode 100644 2.3-1/src/c/matrixOperations/includes/dynlib_matrixoperations.h create mode 100644 2.3-1/src/c/matrixOperations/includes/eye.h create mode 100644 2.3-1/src/c/matrixOperations/includes/fill.h create mode 100644 2.3-1/src/c/matrixOperations/includes/hilb.h create mode 100644 2.3-1/src/c/matrixOperations/includes/infiniteNorm.h create mode 100644 2.3-1/src/c/matrixOperations/includes/jmat.h create mode 100644 2.3-1/src/c/matrixOperations/includes/logm.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixDivision.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixExponential.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixInversion.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixMagnitude.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixMultiplication.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixPow.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixSquaredMagnitude.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixTrace.h create mode 100644 2.3-1/src/c/matrixOperations/includes/matrixTranspose.h create mode 100644 2.3-1/src/c/matrixOperations/includes/ones.h create mode 100644 2.3-1/src/c/matrixOperations/includes/spec.h create mode 100644 2.3-1/src/c/matrixOperations/includes/zeros.h create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/cinfnorma.c create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/dinfnorma.c create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/sinfnorma.c create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/infiniteNorm/zinfnorma.c create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpApex.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpBackSlash.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpCc.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpDotApex.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpRc.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpSlash.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_OpStar.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_chol.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_det.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_dist.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_expm.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_eye.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_fill.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_invert.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_ones.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_spec.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_trace.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_transpose.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_v2magn.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_vmagn.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/int_zeros.h create mode 100644 2.3-1/src/c/matrixOperations/interfaces/interface.sh create mode 100644 2.3-1/src/c/matrixOperations/inversion/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/inversion/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/inversion/cinverma.c create mode 100644 2.3-1/src/c/matrixOperations/inversion/dinverma.c create mode 100644 2.3-1/src/c/matrixOperations/inversion/sinverma.c create mode 100644 2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c create mode 100644 2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/inversion/zinverma.c create mode 100644 2.3-1/src/c/matrixOperations/jmat/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/jmat/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/jmat/djmata.c create mode 100644 2.3-1/src/c/matrixOperations/jmat/sjmata.c create mode 100644 2.3-1/src/c/matrixOperations/jmat/testJmat.c create mode 100644 2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/logm/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/logm/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/logm/clogma.c create mode 100644 2.3-1/src/c/matrixOperations/logm/dlogma.c create mode 100644 2.3-1/src/c/matrixOperations/logm/slogma.c create mode 100644 2.3-1/src/c/matrixOperations/logm/testDoubleLogm.c create mode 100644 2.3-1/src/c/matrixOperations/logm/testFloatLogm.c create mode 100644 2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/logm/zlogma.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/magnitude/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/magnitude/cmagna.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/cmagns.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/dmagna.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/dmagns.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/smagna.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/smagns.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/testDoubleMagnitude.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/testFloatMagnitude.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/magnitude/zmagna.c create mode 100644 2.3-1/src/c/matrixOperations/magnitude/zmagns.c create mode 100644 2.3-1/src/c/matrixOperations/matrixOperations.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/matrixOperations.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/multiplication/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/multiplication/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/multiplication/cmulma.c create mode 100644 2.3-1/src/c/matrixOperations/multiplication/dmulma.c create mode 100644 2.3-1/src/c/matrixOperations/multiplication/smulma.c create mode 100644 2.3-1/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c create mode 100644 2.3-1/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c create mode 100644 2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/multiplication/zmulma.c create mode 100644 2.3-1/src/c/matrixOperations/ones/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/ones/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/ones/conesa.c create mode 100644 2.3-1/src/c/matrixOperations/ones/donesa.c create mode 100644 2.3-1/src/c/matrixOperations/ones/sonesa.c create mode 100644 2.3-1/src/c/matrixOperations/ones/testMatrixOnes.c create mode 100644 2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/ones/zonesa.c create mode 100644 2.3-1/src/c/matrixOperations/powm/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/powm/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/powm/cpowma.c create mode 100644 2.3-1/src/c/matrixOperations/powm/dpowma.c create mode 100644 2.3-1/src/c/matrixOperations/powm/spowma.c create mode 100644 2.3-1/src/c/matrixOperations/powm/testDoublePowm.c create mode 100644 2.3-1/src/c/matrixOperations/powm/testFloatPowm.c create mode 100644 2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/powm/zpowma.c create mode 100644 2.3-1/src/c/matrixOperations/spec/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/spec/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/spec/cspeca.c create mode 100644 2.3-1/src/c/matrixOperations/spec/dspeca.c create mode 100644 2.3-1/src/c/matrixOperations/spec/sspeca.c create mode 100644 2.3-1/src/c/matrixOperations/spec/testDoubleSpec.c create mode 100644 2.3-1/src/c/matrixOperations/spec/testFloatSpec.c create mode 100644 2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/spec/zspeca.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/spec2/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/spec2/cspec2a.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/dspec2a.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/sspec2a.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/testDoubleSpec2.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/testFloatSpec2.c create mode 100644 2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/spec2/zspec2a.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/csquMagna.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/csquMagns.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/dsquMagna.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/dsquMagns.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/ssquMagna.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/ssquMagns.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/testDoubleSquaredMagnitude.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagna.c create mode 100644 2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagns.c create mode 100644 2.3-1/src/c/matrixOperations/trace/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/trace/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/trace/ctracea.c create mode 100644 2.3-1/src/c/matrixOperations/trace/dtracea.c create mode 100644 2.3-1/src/c/matrixOperations/trace/stracea.c create mode 100644 2.3-1/src/c/matrixOperations/trace/testMatrixTrace.c create mode 100644 2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/trace/ztracea.c create mode 100644 2.3-1/src/c/matrixOperations/transpose/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/transpose/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/transpose/ctransposea.c create mode 100644 2.3-1/src/c/matrixOperations/transpose/dtransposea.c create mode 100644 2.3-1/src/c/matrixOperations/transpose/stransposea.c create mode 100644 2.3-1/src/c/matrixOperations/transpose/testMatrixTranspose.c create mode 100644 2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/transpose/ztransposea.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/Makefile.am create mode 100644 2.3-1/src/c/matrixOperations/zeros/Makefile.in create mode 100644 2.3-1/src/c/matrixOperations/zeros/czerosa.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/dzerosa.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/dzerosh.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/szerosa.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/testMatrixZeros.c create mode 100644 2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj create mode 100644 2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters create mode 100644 2.3-1/src/c/matrixOperations/zeros/zzerosa.c create mode 100644 2.3-1/src/c/operations/Makefile.am create mode 100644 2.3-1/src/c/operations/Makefile.in create mode 100644 2.3-1/src/c/operations/addition/Makefile.am create mode 100644 2.3-1/src/c/operations/addition/Makefile.in create mode 100644 2.3-1/src/c/operations/addition/cadda.c create mode 100644 2.3-1/src/c/operations/addition/cadds.c create mode 100644 2.3-1/src/c/operations/addition/dadda.c create mode 100644 2.3-1/src/c/operations/addition/dadds.c create mode 100644 2.3-1/src/c/operations/addition/sadda.c create mode 100644 2.3-1/src/c/operations/addition/sadds.c create mode 100644 2.3-1/src/c/operations/addition/testAddition.c create mode 100644 2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj create mode 100644 2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj.filters create mode 100644 2.3-1/src/c/operations/addition/zadda.c create mode 100644 2.3-1/src/c/operations/addition/zadds.c create mode 100644 2.3-1/src/c/operations/auxiliaryFunctions_Import.def create mode 100644 2.3-1/src/c/operations/division/Makefile.am create mode 100644 2.3-1/src/c/operations/division/Makefile.in create mode 100644 2.3-1/src/c/operations/division/cldiva.c create mode 100644 2.3-1/src/c/operations/division/cldivs.c create mode 100644 2.3-1/src/c/operations/division/crdiva.c create mode 100644 2.3-1/src/c/operations/division/crdivs.c create mode 100644 2.3-1/src/c/operations/division/dldiva.c create mode 100644 2.3-1/src/c/operations/division/dldivs.c create mode 100644 2.3-1/src/c/operations/division/drdiva.c create mode 100644 2.3-1/src/c/operations/division/drdivs.c create mode 100644 2.3-1/src/c/operations/division/sldiva.c create mode 100644 2.3-1/src/c/operations/division/sldivs.c create mode 100644 2.3-1/src/c/operations/division/srdiva.c create mode 100644 2.3-1/src/c/operations/division/srdivs.c create mode 100644 2.3-1/src/c/operations/division/testLDivision.c create mode 100644 2.3-1/src/c/operations/division/testRDivision.c create mode 100644 2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj create mode 100644 2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj.filters create mode 100644 2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj create mode 100644 2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj.filters create mode 100644 2.3-1/src/c/operations/division/zldiva.c create mode 100644 2.3-1/src/c/operations/division/zldivs.c create mode 100644 2.3-1/src/c/operations/division/zrdiva.c create mode 100644 2.3-1/src/c/operations/division/zrdivs.c create mode 100644 2.3-1/src/c/operations/includes/addition.h create mode 100644 2.3-1/src/c/operations/includes/division.h create mode 100644 2.3-1/src/c/operations/includes/dynlib_operations.h create mode 100644 2.3-1/src/c/operations/includes/multiplication.h create mode 100644 2.3-1/src/c/operations/includes/subtraction.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpBackSlash.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpDotBackSlash.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpDotSlash.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpDotStar.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpEqual.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpExt.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpIns.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogAnd.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogEq.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogGe.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogGt.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogLe.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogLt.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogNe.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogNot.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpLogOr.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpMinus.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpPlus.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpSlash.h create mode 100644 2.3-1/src/c/operations/interfaces/int_OpStar.h create mode 100644 2.3-1/src/c/operations/matrixOperations_Import.def create mode 100644 2.3-1/src/c/operations/multiplication/Makefile.am create mode 100644 2.3-1/src/c/operations/multiplication/Makefile.in create mode 100644 2.3-1/src/c/operations/multiplication/cmula.c create mode 100644 2.3-1/src/c/operations/multiplication/cmulcsv.c create mode 100644 2.3-1/src/c/operations/multiplication/cmuls.c create mode 100644 2.3-1/src/c/operations/multiplication/cmulscv.c create mode 100644 2.3-1/src/c/operations/multiplication/cmulv.c create mode 100644 2.3-1/src/c/operations/multiplication/dmula.c create mode 100644 2.3-1/src/c/operations/multiplication/dmuls.c create mode 100644 2.3-1/src/c/operations/multiplication/dmulv.c create mode 100644 2.3-1/src/c/operations/multiplication/smula.c create mode 100644 2.3-1/src/c/operations/multiplication/smuls.c create mode 100644 2.3-1/src/c/operations/multiplication/smulv.c create mode 100644 2.3-1/src/c/operations/multiplication/testMultiplication.c create mode 100644 2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj create mode 100644 2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj.filters create mode 100644 2.3-1/src/c/operations/multiplication/zmula.c create mode 100644 2.3-1/src/c/operations/multiplication/zmuldzv.c create mode 100644 2.3-1/src/c/operations/multiplication/zmuls.c create mode 100644 2.3-1/src/c/operations/multiplication/zmulv.c create mode 100644 2.3-1/src/c/operations/multiplication/zmulzdv.c create mode 100644 2.3-1/src/c/operations/operations.vcxproj create mode 100644 2.3-1/src/c/operations/operations.vcxproj.filters create mode 100644 2.3-1/src/c/operations/subtraction/Makefile.am create mode 100644 2.3-1/src/c/operations/subtraction/Makefile.in create mode 100644 2.3-1/src/c/operations/subtraction/cdiffa.c create mode 100644 2.3-1/src/c/operations/subtraction/cdiffs.c create mode 100644 2.3-1/src/c/operations/subtraction/ddiffa.c create mode 100644 2.3-1/src/c/operations/subtraction/ddiffs.c create mode 100644 2.3-1/src/c/operations/subtraction/sdiffa.c create mode 100644 2.3-1/src/c/operations/subtraction/sdiffs.c create mode 100644 2.3-1/src/c/operations/subtraction/testSubtraction.c create mode 100644 2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj create mode 100644 2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj.filters create mode 100644 2.3-1/src/c/operations/subtraction/zdiffa.c create mode 100644 2.3-1/src/c/operations/subtraction/zdiffs.c create mode 100644 2.3-1/src/c/signalProcessing/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/conv/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/conv/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/conv/cconva.c create mode 100644 2.3-1/src/c/signalProcessing/conv/dconva.c create mode 100644 2.3-1/src/c/signalProcessing/conv/sconva.c create mode 100644 2.3-1/src/c/signalProcessing/conv/testDoubleConv.c create mode 100644 2.3-1/src/c/signalProcessing/conv/testFloatConv.c create mode 100644 2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/conv/zconva.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/conv2d/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/conv2d/cconv2da.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/dconv2da.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/sconv2da.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/testDoubleConv2d.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/testFloatConv2d.c create mode 100644 2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/conv2d/zconv2da.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/ccrossCorra.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/dcrossCorra.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/scrossCorra.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/testDoubleCrossCorr.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/testFloatCrossCorr.c create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/crossCorr/zcrossCorra.c create mode 100644 2.3-1/src/c/signalProcessing/fft/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/fft/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/fft/cfftma.c create mode 100644 2.3-1/src/c/signalProcessing/fft/dfft2.c create mode 100644 2.3-1/src/c/signalProcessing/fft/dfftbi.c create mode 100644 2.3-1/src/c/signalProcessing/fft/dfftma.c create mode 100644 2.3-1/src/c/signalProcessing/fft/dfftmx.c create mode 100644 2.3-1/src/c/signalProcessing/fft/fft842.c create mode 100644 2.3-1/src/c/signalProcessing/fft/fft_internal.h create mode 100644 2.3-1/src/c/signalProcessing/fft/r2tx.c create mode 100644 2.3-1/src/c/signalProcessing/fft/r4tx.c create mode 100644 2.3-1/src/c/signalProcessing/fft/r8tx.c create mode 100644 2.3-1/src/c/signalProcessing/fft/sfftma.c create mode 100644 2.3-1/src/c/signalProcessing/fft/testDoubleFft.c create mode 100644 2.3-1/src/c/signalProcessing/fft/testFloatFft.c create mode 100644 2.3-1/src/c/signalProcessing/fft/testMatFft.c create mode 100644 2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/fft/zfftma.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/fftshift/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/fftshift/ccolumnfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/cfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/crowfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/dcolumnfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/dfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/drowfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/scolumnfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/sfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/srowfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/testDoubleFftShift.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/testFloatFftShift.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/fftshift/zcolumnfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/zfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/fftshift/zrowfftshifta.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/hilbert/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/hilbert/dhilberta.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/dhilberts.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/shilberta.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/shilberts.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/testHilbert.c create mode 100644 2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/ifft/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/ifft/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/ifft/cifftma.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/diffbi_lavraie.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/difft2.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/difftbi.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/difftma.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/difftmx.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/ifft842.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/ifft_internal.h create mode 100644 2.3-1/src/c/signalProcessing/ifft/ir2tx.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/ir4tx.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/ir8tx.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/sifftma.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/testDoubleIfft.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/testFloatIfft.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/testMatIfft.c create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/ifft/zifftma.c create mode 100644 2.3-1/src/c/signalProcessing/includes/conv.h create mode 100644 2.3-1/src/c/signalProcessing/includes/conv2d.h create mode 100644 2.3-1/src/c/signalProcessing/includes/crossCorr.h create mode 100644 2.3-1/src/c/signalProcessing/includes/dynlib_signalprocessing.h create mode 100644 2.3-1/src/c/signalProcessing/includes/fft.h create mode 100644 2.3-1/src/c/signalProcessing/includes/fftshift.h create mode 100644 2.3-1/src/c/signalProcessing/includes/hilbert.h create mode 100644 2.3-1/src/c/signalProcessing/includes/ifft.h create mode 100644 2.3-1/src/c/signalProcessing/includes/lev.h create mode 100644 2.3-1/src/c/signalProcessing/includes/levin.h create mode 100644 2.3-1/src/c/signalProcessing/includes/lpc2cep.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_cepstrum.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_convol.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_fft.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_fftshift.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_hilbert.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_ifft.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_lev.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_levin.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_lpc2cep.h create mode 100644 2.3-1/src/c/signalProcessing/interfaces/int_xcorr.h create mode 100644 2.3-1/src/c/signalProcessing/lev/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/lev/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/lev/cleva.c create mode 100644 2.3-1/src/c/signalProcessing/lev/cleva2.c create mode 100644 2.3-1/src/c/signalProcessing/lev/dleva.c create mode 100644 2.3-1/src/c/signalProcessing/lev/dleva2.c create mode 100644 2.3-1/src/c/signalProcessing/lev/sleva.c create mode 100644 2.3-1/src/c/signalProcessing/lev/sleva2.c create mode 100644 2.3-1/src/c/signalProcessing/lev/testDoubleLev.c create mode 100644 2.3-1/src/c/signalProcessing/lev/testFloatLev.c create mode 100644 2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/lev/zleva.c create mode 100644 2.3-1/src/c/signalProcessing/lev/zleva2.c create mode 100644 2.3-1/src/c/signalProcessing/levin/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/levin/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/levin/dlevina.c create mode 100644 2.3-1/src/c/signalProcessing/levin/levinUtils.c create mode 100644 2.3-1/src/c/signalProcessing/levin/levinUtils.h create mode 100644 2.3-1/src/c/signalProcessing/levin/slevina.c create mode 100644 2.3-1/src/c/signalProcessing/levin/testDoubleLevin.c create mode 100644 2.3-1/src/c/signalProcessing/levin/testFloatLevin.c create mode 100644 2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/Makefile.am create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/Makefile.in create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/clpc2cepa.c create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/dlpc2cepa.c create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/slpc2cepa.c create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/testDoubleLpc2cep.c create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/testFloatLpc2cep.c create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj.filters create mode 100644 2.3-1/src/c/signalProcessing/lpc2cep/zlpc2cepa.c create mode 100644 2.3-1/src/c/signalProcessing/signalProcessing.vcxproj create mode 100644 2.3-1/src/c/signalProcessing/signalProcessing.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/includes/dynlib_statisticsfunctions.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/mean.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/meanf.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/prod.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/statMax.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/statMin.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/stdevf.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/sum.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/variance.h create mode 100644 2.3-1/src/c/statisticsFunctions/includes/variancef.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_mean.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_meanf.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_prod.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_stdevf.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_sum.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_variance.h create mode 100644 2.3-1/src/c/statisticsFunctions/interfaces/int_variancef.h create mode 100644 2.3-1/src/c/statisticsFunctions/max/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/max/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/dmaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/drowmaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/smaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/srowmaxa.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/testFloatMax.c create mode 100644 2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/mean/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/mean/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/cmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/crowmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/dmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/drowmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/smeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/srowmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/zmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/ccolumnmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/cmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/cmeanfcs.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/cmeanfsc.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/crowmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/dcolumnmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/dmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/drowmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/scolumnmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/smeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/srowmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/testDoubleMeanf.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/testFloatMeanf.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/zcolumnmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/zmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/zmeanfdz.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/zmeanfzd.c create mode 100644 2.3-1/src/c/statisticsFunctions/meanf/zrowmeanfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/min/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/dmina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/drowmina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/scolumnmina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/smina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/srowmina.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/testDoubleMin.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/testFloatMin.c create mode 100644 2.3-1/src/c/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/prod/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/prod/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/prod/ccolumnproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/cproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/crowproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/dcolumnproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/dproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/drowproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/scolumnproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/sproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/srowproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/testDoubleProd.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/testFloatProd.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/prod/zcolumnproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/zproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/prod/zrowproda.c create mode 100644 2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/ccolumnstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/crowstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfcs.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/cstdevfsc.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/dcolumnstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/drowstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/dstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/scolumnstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/srowstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/sstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/testDoubleStdevf.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/testFloatStdevf.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/zcolumnstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/zrowstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfa.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfdz.c create mode 100644 2.3-1/src/c/statisticsFunctions/stdevf/zstdevfzd.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/sum/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/crowsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/csuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/drowsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/dsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/srowsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/ssuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/sum/zsuma.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/variance/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/variance/ccolumnvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/crowvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/cvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/dcolumnvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/drowvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/dvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/scolumnvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/srowvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/svariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/svn-prop.tmp create mode 100644 2.3-1/src/c/statisticsFunctions/variance/testDoubleVariance.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/testDoubleVarianceNono.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/testFloatVariance.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/testFloatVarianceNono.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj create mode 100644 2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj.filters create mode 100644 2.3-1/src/c/statisticsFunctions/variance/zcolumnvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/zrowvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variance/zvariancea.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/Makefile.am create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/Makefile.in create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/ccolumnvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/crowvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/cvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/dcolumnvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/drowvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/dvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/scolumnvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/srowvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/svariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariance.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariancef.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/testFloatVariance.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/testFloatVariancef.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/zcolumnvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/zrowvariancefa.c create mode 100644 2.3-1/src/c/statisticsFunctions/variancef/zvariancefa.c create mode 100644 2.3-1/src/c/string/Makefile.am create mode 100644 2.3-1/src/c/string/Makefile.in create mode 100644 2.3-1/src/c/string/disp/Makefile.am create mode 100644 2.3-1/src/c/string/disp/Makefile.in create mode 100644 2.3-1/src/c/string/disp/cdispa.c create mode 100644 2.3-1/src/c/string/disp/cdisps.c create mode 100644 2.3-1/src/c/string/disp/ddispa.c create mode 100644 2.3-1/src/c/string/disp/ddisph.c create mode 100644 2.3-1/src/c/string/disp/ddisps.c create mode 100644 2.3-1/src/c/string/disp/sdispa.c create mode 100644 2.3-1/src/c/string/disp/sdisps.c create mode 100644 2.3-1/src/c/string/disp/testDisp.c create mode 100644 2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj create mode 100644 2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj.filters create mode 100644 2.3-1/src/c/string/disp/zdispa.c create mode 100644 2.3-1/src/c/string/disp/zdisps.c create mode 100644 2.3-1/src/c/string/includes/disp.h create mode 100644 2.3-1/src/c/string/includes/dynlib_string.h create mode 100644 2.3-1/src/c/string/includes/str.h create mode 100644 2.3-1/src/c/string/interfaces/int_disp.h create mode 100644 2.3-1/src/c/string/string.vcxproj create mode 100644 2.3-1/src/c/string/string.vcxproj.filters create mode 100644 2.3-1/src/c/string/string/Makefile.am create mode 100644 2.3-1/src/c/string/string/Makefile.am.bak create mode 100644 2.3-1/src/c/string/string/Makefile.in create mode 100644 2.3-1/src/c/string/string/cstringa.c create mode 100644 2.3-1/src/c/string/string/cstrings.c create mode 100644 2.3-1/src/c/string/string/dstringa.c create mode 100644 2.3-1/src/c/string/string/dstrings.c create mode 100644 2.3-1/src/c/string/string/sstringa.c create mode 100644 2.3-1/src/c/string/string/sstrings.c create mode 100644 2.3-1/src/c/string/string/testString.c create mode 100644 2.3-1/src/c/string/string/test_String/testString.vcxproj create mode 100644 2.3-1/src/c/string/string/test_String/testString.vcxproj.filters create mode 100644 2.3-1/src/c/string/string/zstringa.c create mode 100644 2.3-1/src/c/string/string/zstrings.c create mode 100644 2.3-1/src/c/type/Makefile.am create mode 100644 2.3-1/src/c/type/Makefile.in create mode 100644 2.3-1/src/c/type/doubleComplex.c create mode 100644 2.3-1/src/c/type/doubleComplex.h create mode 100644 2.3-1/src/c/type/dynlib_type.h create mode 100644 2.3-1/src/c/type/floatComplex.c create mode 100644 2.3-1/src/c/type/floatComplex.h create mode 100644 2.3-1/src/c/type/int_imag.h create mode 100644 2.3-1/src/c/type/int_real.h create mode 100644 2.3-1/src/c/type/testDoubleComplex.c create mode 100644 2.3-1/src/c/type/testFloatComplex.c create mode 100644 2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj create mode 100644 2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj.filters create mode 100644 2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj create mode 100644 2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj.filters create mode 100644 2.3-1/src/c/type/type.vcxproj create mode 100644 2.3-1/src/c/type/type.vcxproj.filters create mode 100644 2.3-1/src/fortran/blas/Makefile.am create mode 100644 2.3-1/src/fortran/blas/Makefile.in create mode 100644 2.3-1/src/fortran/blas/README create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplus.def create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplusAtlas.def create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplus_DLL.suo create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplus_DLL.vfproj create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj create mode 100644 2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj.filters create mode 100644 2.3-1/src/fortran/blas/dasum.f create mode 100644 2.3-1/src/fortran/blas/daxpy.f create mode 100644 2.3-1/src/fortran/blas/dcabs1.f create mode 100644 2.3-1/src/fortran/blas/dcopy.f create mode 100644 2.3-1/src/fortran/blas/ddot.f create mode 100644 2.3-1/src/fortran/blas/dgbmv.f create mode 100644 2.3-1/src/fortran/blas/dgemm.f create mode 100644 2.3-1/src/fortran/blas/dgemv.f create mode 100644 2.3-1/src/fortran/blas/dger.f create mode 100644 2.3-1/src/fortran/blas/dnrm2.f create mode 100644 2.3-1/src/fortran/blas/drot.f create mode 100644 2.3-1/src/fortran/blas/drotg.f create mode 100644 2.3-1/src/fortran/blas/dsbmv.f create mode 100644 2.3-1/src/fortran/blas/dscal.f create mode 100644 2.3-1/src/fortran/blas/dspmv.f create mode 100644 2.3-1/src/fortran/blas/dspr.f create mode 100644 2.3-1/src/fortran/blas/dspr2.f create mode 100644 2.3-1/src/fortran/blas/dswap.f create mode 100644 2.3-1/src/fortran/blas/dsymm.f create mode 100644 2.3-1/src/fortran/blas/dsymv.f create mode 100644 2.3-1/src/fortran/blas/dsyr.f create mode 100644 2.3-1/src/fortran/blas/dsyr2.f create mode 100644 2.3-1/src/fortran/blas/dsyr2k.f create mode 100644 2.3-1/src/fortran/blas/dsyrk.f create mode 100644 2.3-1/src/fortran/blas/dtbmv.f create mode 100644 2.3-1/src/fortran/blas/dtbsv.f create mode 100644 2.3-1/src/fortran/blas/dtpmv.f create mode 100644 2.3-1/src/fortran/blas/dtpsv.f create mode 100644 2.3-1/src/fortran/blas/dtrmm.f create mode 100644 2.3-1/src/fortran/blas/dtrmv.f create mode 100644 2.3-1/src/fortran/blas/dtrsm.f create mode 100644 2.3-1/src/fortran/blas/dtrsv.f create mode 100644 2.3-1/src/fortran/blas/dzasum.f create mode 100644 2.3-1/src/fortran/blas/dznrm2.f create mode 100644 2.3-1/src/fortran/blas/idamax.f create mode 100644 2.3-1/src/fortran/blas/izamax.f create mode 100644 2.3-1/src/fortran/blas/license.txt create mode 100644 2.3-1/src/fortran/blas/lsame.f create mode 100644 2.3-1/src/fortran/blas/xerbla.f create mode 100644 2.3-1/src/fortran/blas/zaxpy.f create mode 100644 2.3-1/src/fortran/blas/zcopy.f create mode 100644 2.3-1/src/fortran/blas/zdotc.f create mode 100644 2.3-1/src/fortran/blas/zdotu.f create mode 100644 2.3-1/src/fortran/blas/zdscal.f create mode 100644 2.3-1/src/fortran/blas/zgbmv.f create mode 100644 2.3-1/src/fortran/blas/zgemm.f create mode 100644 2.3-1/src/fortran/blas/zgemv.f create mode 100644 2.3-1/src/fortran/blas/zgerc.f create mode 100644 2.3-1/src/fortran/blas/zgeru.f create mode 100644 2.3-1/src/fortran/blas/zhbmv.f create mode 100644 2.3-1/src/fortran/blas/zhemm.f create mode 100644 2.3-1/src/fortran/blas/zhemv.f create mode 100644 2.3-1/src/fortran/blas/zher.f create mode 100644 2.3-1/src/fortran/blas/zher2.f create mode 100644 2.3-1/src/fortran/blas/zher2k.f create mode 100644 2.3-1/src/fortran/blas/zherk.f create mode 100644 2.3-1/src/fortran/blas/zhpmv.f create mode 100644 2.3-1/src/fortran/blas/zhpr.f create mode 100644 2.3-1/src/fortran/blas/zhpr2.f create mode 100644 2.3-1/src/fortran/blas/zrotg.f create mode 100644 2.3-1/src/fortran/blas/zscal.f create mode 100644 2.3-1/src/fortran/blas/zswap.f create mode 100644 2.3-1/src/fortran/blas/zsymm.f create mode 100644 2.3-1/src/fortran/blas/zsyr2k.f create mode 100644 2.3-1/src/fortran/blas/zsyrk.f create mode 100644 2.3-1/src/fortran/blas/ztbmv.f create mode 100644 2.3-1/src/fortran/blas/ztbsv.f create mode 100644 2.3-1/src/fortran/blas/ztpmv.f create mode 100644 2.3-1/src/fortran/blas/ztpsv.f create mode 100644 2.3-1/src/fortran/blas/ztrmm.f create mode 100644 2.3-1/src/fortran/blas/ztrmv.f create mode 100644 2.3-1/src/fortran/blas/ztrsm.f create mode 100644 2.3-1/src/fortran/blas/ztrsv.f create mode 100644 2.3-1/src/fortran/lapack/Makefile.am create mode 100644 2.3-1/src/fortran/lapack/Makefile.in create mode 100644 2.3-1/src/fortran/lapack/README create mode 100644 2.3-1/src/fortran/lapack/dbdsqr.f create mode 100644 2.3-1/src/fortran/lapack/dgebak.f create mode 100644 2.3-1/src/fortran/lapack/dgebal.f create mode 100644 2.3-1/src/fortran/lapack/dgebd2.f create mode 100644 2.3-1/src/fortran/lapack/dgebrd.f create mode 100644 2.3-1/src/fortran/lapack/dgecon.f create mode 100644 2.3-1/src/fortran/lapack/dgeequ.f create mode 100644 2.3-1/src/fortran/lapack/dgees.f create mode 100644 2.3-1/src/fortran/lapack/dgeesx.f create mode 100644 2.3-1/src/fortran/lapack/dgeev.f create mode 100644 2.3-1/src/fortran/lapack/dgegs.f create mode 100644 2.3-1/src/fortran/lapack/dgehd2.f create mode 100644 2.3-1/src/fortran/lapack/dgehrd.f create mode 100644 2.3-1/src/fortran/lapack/dgelq2.f create mode 100644 2.3-1/src/fortran/lapack/dgelqf.f create mode 100644 2.3-1/src/fortran/lapack/dgels.f create mode 100644 2.3-1/src/fortran/lapack/dgelss.f create mode 100644 2.3-1/src/fortran/lapack/dgelsx.f create mode 100644 2.3-1/src/fortran/lapack/dgelsy.f create mode 100644 2.3-1/src/fortran/lapack/dgeql2.f create mode 100644 2.3-1/src/fortran/lapack/dgeqlf.f create mode 100644 2.3-1/src/fortran/lapack/dgeqp3.f create mode 100644 2.3-1/src/fortran/lapack/dgeqpf.f create mode 100644 2.3-1/src/fortran/lapack/dgeqr2.f create mode 100644 2.3-1/src/fortran/lapack/dgeqrf.f create mode 100644 2.3-1/src/fortran/lapack/dgerfs.f create mode 100644 2.3-1/src/fortran/lapack/dgerq2.f create mode 100644 2.3-1/src/fortran/lapack/dgerqf.f create mode 100644 2.3-1/src/fortran/lapack/dgesc2.f create mode 100644 2.3-1/src/fortran/lapack/dgesv.f create mode 100644 2.3-1/src/fortran/lapack/dgesvd.f create mode 100644 2.3-1/src/fortran/lapack/dgesvx.f create mode 100644 2.3-1/src/fortran/lapack/dgetc2.f create mode 100644 2.3-1/src/fortran/lapack/dgetf2.f create mode 100644 2.3-1/src/fortran/lapack/dgetrf.f create mode 100644 2.3-1/src/fortran/lapack/dgetri.f create mode 100644 2.3-1/src/fortran/lapack/dgetrs.f create mode 100644 2.3-1/src/fortran/lapack/dggbak.f create mode 100644 2.3-1/src/fortran/lapack/dggbal.f create mode 100644 2.3-1/src/fortran/lapack/dgges.f create mode 100644 2.3-1/src/fortran/lapack/dggev.f create mode 100644 2.3-1/src/fortran/lapack/dgghrd.f create mode 100644 2.3-1/src/fortran/lapack/dhgeqz.f create mode 100644 2.3-1/src/fortran/lapack/dhseqr.f create mode 100644 2.3-1/src/fortran/lapack/disnan.f create mode 100644 2.3-1/src/fortran/lapack/dlabad.f create mode 100644 2.3-1/src/fortran/lapack/dlabrd.f create mode 100644 2.3-1/src/fortran/lapack/dlacn2.f create mode 100644 2.3-1/src/fortran/lapack/dlacon.f create mode 100644 2.3-1/src/fortran/lapack/dlacpy.f create mode 100644 2.3-1/src/fortran/lapack/dladiv.f create mode 100644 2.3-1/src/fortran/lapack/dlae2.f create mode 100644 2.3-1/src/fortran/lapack/dlaev2.f create mode 100644 2.3-1/src/fortran/lapack/dlaexc.f create mode 100644 2.3-1/src/fortran/lapack/dlag2.f create mode 100644 2.3-1/src/fortran/lapack/dlagv2.f create mode 100644 2.3-1/src/fortran/lapack/dlahqr.f create mode 100644 2.3-1/src/fortran/lapack/dlahr2.f create mode 100644 2.3-1/src/fortran/lapack/dlahrd.f create mode 100644 2.3-1/src/fortran/lapack/dlaic1.f create mode 100644 2.3-1/src/fortran/lapack/dlaisnan.f create mode 100644 2.3-1/src/fortran/lapack/dlaln2.f create mode 100644 2.3-1/src/fortran/lapack/dlamch.f create mode 100644 2.3-1/src/fortran/lapack/dlange.f create mode 100644 2.3-1/src/fortran/lapack/dlanhs.f create mode 100644 2.3-1/src/fortran/lapack/dlansp.f create mode 100644 2.3-1/src/fortran/lapack/dlanst.f create mode 100644 2.3-1/src/fortran/lapack/dlansy.f create mode 100644 2.3-1/src/fortran/lapack/dlantr.f create mode 100644 2.3-1/src/fortran/lapack/dlanv2.f create mode 100644 2.3-1/src/fortran/lapack/dlapmt.f create mode 100644 2.3-1/src/fortran/lapack/dlapy2.f create mode 100644 2.3-1/src/fortran/lapack/dlapy3.f create mode 100644 2.3-1/src/fortran/lapack/dlaqge.f create mode 100644 2.3-1/src/fortran/lapack/dlaqp2.f create mode 100644 2.3-1/src/fortran/lapack/dlaqps.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr0.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr1.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr2.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr3.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr4.f create mode 100644 2.3-1/src/fortran/lapack/dlaqr5.f create mode 100644 2.3-1/src/fortran/lapack/dlarf.f create mode 100644 2.3-1/src/fortran/lapack/dlarfb.f create mode 100644 2.3-1/src/fortran/lapack/dlarfg.f create mode 100644 2.3-1/src/fortran/lapack/dlarft.f create mode 100644 2.3-1/src/fortran/lapack/dlarfx.f create mode 100644 2.3-1/src/fortran/lapack/dlartg.f create mode 100644 2.3-1/src/fortran/lapack/dlarz.f create mode 100644 2.3-1/src/fortran/lapack/dlarzb.f create mode 100644 2.3-1/src/fortran/lapack/dlarzt.f create mode 100644 2.3-1/src/fortran/lapack/dlas2.f create mode 100644 2.3-1/src/fortran/lapack/dlascl.f create mode 100644 2.3-1/src/fortran/lapack/dlaset.f create mode 100644 2.3-1/src/fortran/lapack/dlasq1.f create mode 100644 2.3-1/src/fortran/lapack/dlasq2.f create mode 100644 2.3-1/src/fortran/lapack/dlasq3.f create mode 100644 2.3-1/src/fortran/lapack/dlasq4.f create mode 100644 2.3-1/src/fortran/lapack/dlasq5.f create mode 100644 2.3-1/src/fortran/lapack/dlasq6.f create mode 100644 2.3-1/src/fortran/lapack/dlasr.f create mode 100644 2.3-1/src/fortran/lapack/dlasrt.f create mode 100644 2.3-1/src/fortran/lapack/dlassq.f create mode 100644 2.3-1/src/fortran/lapack/dlasv2.f create mode 100644 2.3-1/src/fortran/lapack/dlaswp.f create mode 100644 2.3-1/src/fortran/lapack/dlasy2.f create mode 100644 2.3-1/src/fortran/lapack/dlasyf.f create mode 100644 2.3-1/src/fortran/lapack/dlatdf.f create mode 100644 2.3-1/src/fortran/lapack/dlatrd.f create mode 100644 2.3-1/src/fortran/lapack/dlatrs.f create mode 100644 2.3-1/src/fortran/lapack/dlatrz.f create mode 100644 2.3-1/src/fortran/lapack/dlatzm.f create mode 100644 2.3-1/src/fortran/lapack/dlazq3.f create mode 100644 2.3-1/src/fortran/lapack/dlazq4.f create mode 100644 2.3-1/src/fortran/lapack/dopgtr.f create mode 100644 2.3-1/src/fortran/lapack/dorg2l.f create mode 100644 2.3-1/src/fortran/lapack/dorg2r.f create mode 100644 2.3-1/src/fortran/lapack/dorgbr.f create mode 100644 2.3-1/src/fortran/lapack/dorghr.f create mode 100644 2.3-1/src/fortran/lapack/dorgl2.f create mode 100644 2.3-1/src/fortran/lapack/dorglq.f create mode 100644 2.3-1/src/fortran/lapack/dorgql.f create mode 100644 2.3-1/src/fortran/lapack/dorgqr.f create mode 100644 2.3-1/src/fortran/lapack/dorgr2.f create mode 100644 2.3-1/src/fortran/lapack/dorgrq.f create mode 100644 2.3-1/src/fortran/lapack/dorgtr.f create mode 100644 2.3-1/src/fortran/lapack/dorm2l.f create mode 100644 2.3-1/src/fortran/lapack/dorm2r.f create mode 100644 2.3-1/src/fortran/lapack/dormbr.f create mode 100644 2.3-1/src/fortran/lapack/dormhr.f create mode 100644 2.3-1/src/fortran/lapack/dorml2.f create mode 100644 2.3-1/src/fortran/lapack/dormlq.f create mode 100644 2.3-1/src/fortran/lapack/dormql.f create mode 100644 2.3-1/src/fortran/lapack/dormqr.f create mode 100644 2.3-1/src/fortran/lapack/dormr2.f create mode 100644 2.3-1/src/fortran/lapack/dormr3.f create mode 100644 2.3-1/src/fortran/lapack/dormrq.f create mode 100644 2.3-1/src/fortran/lapack/dormrz.f create mode 100644 2.3-1/src/fortran/lapack/dpocon.f create mode 100644 2.3-1/src/fortran/lapack/dpotf2.f create mode 100644 2.3-1/src/fortran/lapack/dpotrf.f create mode 100644 2.3-1/src/fortran/lapack/dpotrs.f create mode 100644 2.3-1/src/fortran/lapack/dpptrf.f create mode 100644 2.3-1/src/fortran/lapack/drscl.f create mode 100644 2.3-1/src/fortran/lapack/dspev.f create mode 100644 2.3-1/src/fortran/lapack/dspgst.f create mode 100644 2.3-1/src/fortran/lapack/dspgv.f create mode 100644 2.3-1/src/fortran/lapack/dsptrd.f create mode 100644 2.3-1/src/fortran/lapack/dsptrf.f create mode 100644 2.3-1/src/fortran/lapack/dsteqr.f create mode 100644 2.3-1/src/fortran/lapack/dsterf.f create mode 100644 2.3-1/src/fortran/lapack/dsycon.f create mode 100644 2.3-1/src/fortran/lapack/dsyev.f create mode 100644 2.3-1/src/fortran/lapack/dsysv.f create mode 100644 2.3-1/src/fortran/lapack/dsytd2.f create mode 100644 2.3-1/src/fortran/lapack/dsytf2.f create mode 100644 2.3-1/src/fortran/lapack/dsytrd.f create mode 100644 2.3-1/src/fortran/lapack/dsytrf.f create mode 100644 2.3-1/src/fortran/lapack/dsytri.f create mode 100644 2.3-1/src/fortran/lapack/dsytrs.f create mode 100644 2.3-1/src/fortran/lapack/dtgevc.f create mode 100644 2.3-1/src/fortran/lapack/dtgex2.f create mode 100644 2.3-1/src/fortran/lapack/dtgexc.f create mode 100644 2.3-1/src/fortran/lapack/dtgsen.f create mode 100644 2.3-1/src/fortran/lapack/dtgsy2.f create mode 100644 2.3-1/src/fortran/lapack/dtgsyl.f create mode 100644 2.3-1/src/fortran/lapack/dtrcon.f create mode 100644 2.3-1/src/fortran/lapack/dtrevc.f create mode 100644 2.3-1/src/fortran/lapack/dtrexc.f create mode 100644 2.3-1/src/fortran/lapack/dtrsen.f create mode 100644 2.3-1/src/fortran/lapack/dtrsyl.f create mode 100644 2.3-1/src/fortran/lapack/dtrti2.f create mode 100644 2.3-1/src/fortran/lapack/dtrtri.f create mode 100644 2.3-1/src/fortran/lapack/dtrtrs.f create mode 100644 2.3-1/src/fortran/lapack/dtzrqf.f create mode 100644 2.3-1/src/fortran/lapack/dtzrzf.f create mode 100644 2.3-1/src/fortran/lapack/dzsum1.f create mode 100644 2.3-1/src/fortran/lapack/ieeeck.f create mode 100644 2.3-1/src/fortran/lapack/ilaenv.f create mode 100644 2.3-1/src/fortran/lapack/iparmq.f create mode 100644 2.3-1/src/fortran/lapack/izmax1.f create mode 100644 2.3-1/src/fortran/lapack/lapack_f/lapack.def create mode 100644 2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.suo create mode 100644 2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.vfproj create mode 100644 2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj create mode 100644 2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj.filters create mode 100644 2.3-1/src/fortran/lapack/lsame.f create mode 100644 2.3-1/src/fortran/lapack/slamch.f create mode 100644 2.3-1/src/fortran/lapack/xerbla.f create mode 100644 2.3-1/src/fortran/lapack/zbdsqr.f create mode 100644 2.3-1/src/fortran/lapack/zdrot.f create mode 100644 2.3-1/src/fortran/lapack/zdrscl.f create mode 100644 2.3-1/src/fortran/lapack/zgebak.f create mode 100644 2.3-1/src/fortran/lapack/zgebal.f create mode 100644 2.3-1/src/fortran/lapack/zgebd2.f create mode 100644 2.3-1/src/fortran/lapack/zgebrd.f create mode 100644 2.3-1/src/fortran/lapack/zgecon.f create mode 100644 2.3-1/src/fortran/lapack/zgees.f create mode 100644 2.3-1/src/fortran/lapack/zgeev.f create mode 100644 2.3-1/src/fortran/lapack/zgehd2.f create mode 100644 2.3-1/src/fortran/lapack/zgehrd.f create mode 100644 2.3-1/src/fortran/lapack/zgelq2.f create mode 100644 2.3-1/src/fortran/lapack/zgelqf.f create mode 100644 2.3-1/src/fortran/lapack/zgelsy.f create mode 100644 2.3-1/src/fortran/lapack/zgeqp3.f create mode 100644 2.3-1/src/fortran/lapack/zgeqpf.f create mode 100644 2.3-1/src/fortran/lapack/zgeqr2.f create mode 100644 2.3-1/src/fortran/lapack/zgeqrf.f create mode 100644 2.3-1/src/fortran/lapack/zgesc2.f create mode 100644 2.3-1/src/fortran/lapack/zgesvd.f create mode 100644 2.3-1/src/fortran/lapack/zgetc2.f create mode 100644 2.3-1/src/fortran/lapack/zgetf2.f create mode 100644 2.3-1/src/fortran/lapack/zgetrf.f create mode 100644 2.3-1/src/fortran/lapack/zgetri.f create mode 100644 2.3-1/src/fortran/lapack/zgetrs.f create mode 100644 2.3-1/src/fortran/lapack/zggbak.f create mode 100644 2.3-1/src/fortran/lapack/zggbal.f create mode 100644 2.3-1/src/fortran/lapack/zgges.f create mode 100644 2.3-1/src/fortran/lapack/zggev.f create mode 100644 2.3-1/src/fortran/lapack/zgghrd.f create mode 100644 2.3-1/src/fortran/lapack/zheev.f create mode 100644 2.3-1/src/fortran/lapack/zhetd2.f create mode 100644 2.3-1/src/fortran/lapack/zhetrd.f create mode 100644 2.3-1/src/fortran/lapack/zhgeqz.f create mode 100644 2.3-1/src/fortran/lapack/zhseqr.f create mode 100644 2.3-1/src/fortran/lapack/zlabrd.f create mode 100644 2.3-1/src/fortran/lapack/zlacgv.f create mode 100644 2.3-1/src/fortran/lapack/zlacn2.f create mode 100644 2.3-1/src/fortran/lapack/zlacon.f create mode 100644 2.3-1/src/fortran/lapack/zlacpy.f create mode 100644 2.3-1/src/fortran/lapack/zladiv.f create mode 100644 2.3-1/src/fortran/lapack/zlahqr.f create mode 100644 2.3-1/src/fortran/lapack/zlahr2.f create mode 100644 2.3-1/src/fortran/lapack/zlahrd.f create mode 100644 2.3-1/src/fortran/lapack/zlaic1.f create mode 100644 2.3-1/src/fortran/lapack/zlange.f create mode 100644 2.3-1/src/fortran/lapack/zlanhe.f create mode 100644 2.3-1/src/fortran/lapack/zlanhs.f create mode 100644 2.3-1/src/fortran/lapack/zlaqp2.f create mode 100644 2.3-1/src/fortran/lapack/zlaqps.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr0.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr1.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr2.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr3.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr4.f create mode 100644 2.3-1/src/fortran/lapack/zlaqr5.f create mode 100644 2.3-1/src/fortran/lapack/zlarf.f create mode 100644 2.3-1/src/fortran/lapack/zlarfb.f create mode 100644 2.3-1/src/fortran/lapack/zlarfg.f create mode 100644 2.3-1/src/fortran/lapack/zlarft.f create mode 100644 2.3-1/src/fortran/lapack/zlarfx.f create mode 100644 2.3-1/src/fortran/lapack/zlartg.f create mode 100644 2.3-1/src/fortran/lapack/zlarz.f create mode 100644 2.3-1/src/fortran/lapack/zlarzb.f create mode 100644 2.3-1/src/fortran/lapack/zlarzt.f create mode 100644 2.3-1/src/fortran/lapack/zlascl.f create mode 100644 2.3-1/src/fortran/lapack/zlaset.f create mode 100644 2.3-1/src/fortran/lapack/zlasr.f create mode 100644 2.3-1/src/fortran/lapack/zlassq.f create mode 100644 2.3-1/src/fortran/lapack/zlaswp.f create mode 100644 2.3-1/src/fortran/lapack/zlatdf.f create mode 100644 2.3-1/src/fortran/lapack/zlatrd.f create mode 100644 2.3-1/src/fortran/lapack/zlatrs.f create mode 100644 2.3-1/src/fortran/lapack/zlatrz.f create mode 100644 2.3-1/src/fortran/lapack/zpotf2.f create mode 100644 2.3-1/src/fortran/lapack/zpotrf.f create mode 100644 2.3-1/src/fortran/lapack/zrot.f create mode 100644 2.3-1/src/fortran/lapack/zsteqr.f create mode 100644 2.3-1/src/fortran/lapack/ztgevc.f create mode 100644 2.3-1/src/fortran/lapack/ztgex2.f create mode 100644 2.3-1/src/fortran/lapack/ztgexc.f create mode 100644 2.3-1/src/fortran/lapack/ztgsen.f create mode 100644 2.3-1/src/fortran/lapack/ztgsy2.f create mode 100644 2.3-1/src/fortran/lapack/ztgsyl.f create mode 100644 2.3-1/src/fortran/lapack/ztrevc.f create mode 100644 2.3-1/src/fortran/lapack/ztrexc.f create mode 100644 2.3-1/src/fortran/lapack/ztrsen.f create mode 100644 2.3-1/src/fortran/lapack/ztrsyl.f create mode 100644 2.3-1/src/fortran/lapack/ztrti2.f create mode 100644 2.3-1/src/fortran/lapack/ztrtri.f create mode 100644 2.3-1/src/fortran/lapack/ztzrzf.f create mode 100644 2.3-1/src/fortran/lapack/zung2l.f create mode 100644 2.3-1/src/fortran/lapack/zung2r.f create mode 100644 2.3-1/src/fortran/lapack/zungbr.f create mode 100644 2.3-1/src/fortran/lapack/zunghr.f create mode 100644 2.3-1/src/fortran/lapack/zungl2.f create mode 100644 2.3-1/src/fortran/lapack/zunglq.f create mode 100644 2.3-1/src/fortran/lapack/zungql.f create mode 100644 2.3-1/src/fortran/lapack/zungqr.f create mode 100644 2.3-1/src/fortran/lapack/zungtr.f create mode 100644 2.3-1/src/fortran/lapack/zunm2r.f create mode 100644 2.3-1/src/fortran/lapack/zunmbr.f create mode 100644 2.3-1/src/fortran/lapack/zunml2.f create mode 100644 2.3-1/src/fortran/lapack/zunmlq.f create mode 100644 2.3-1/src/fortran/lapack/zunmqr.f create mode 100644 2.3-1/src/fortran/lapack/zunmr3.f create mode 100644 2.3-1/src/fortran/lapack/zunmrz.f (limited to '2.3-1/src') diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionAbs.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionAbs.sci new file mode 100644 index 00000000..8bbbf644 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionAbs.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +disp(abs(7)) +disp(abs(-3)) + + +disp(abs(7-%i)) +disp(abs(7+%i)) +disp(abs(-3-2*%i)) +disp(abs(-3+2*%i)) + +a=[-1 -5 4 -7; -8 3 -74 -5; 141 -3 4 45] +b=[1+%i*7 2 5+%i*4; 4+%i*21 8+%i 6; 3-%i*7 4-%i*2 78 ] +disp(abs(a)) +disp(abs(b)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionConj.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionConj.sci new file mode 100644 index 00000000..3cceb0d1 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionConj.sci @@ -0,0 +1,31 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT + +function mainfunction() + +s1=[1+%i*3 1-%i*7;-1+5*%i 1-%i*7;-1+5*%i -1-6*%i] +s2=conj(s1); +disp(s2); + +s3=[1 1;-1+5*%i 1-%i*7;-1+5*%i -1-6*%i] +s4=conj(s3); +disp(s4); + +s5=1+%i*3 +s6=conj(s5); +disp(s6); + + +s7=1-%i*3 +s8=conj(s7); +disp(s8); + +s9=[1+%i*3 1-%i*7;-1 7;-1+5*%i -1-6*%i] +s10=conj(s9); +disp(s10); + +s11=[1+%i*3 1;-1+5*%i 1;-1 -1-6*%i] +s12=conj(s11); +disp(s12); + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind.sci new file mode 100644 index 00000000..2a093e9c --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +a = 1 +disp(find(a==0)) +disp(find(a==1)) + +b = 1+3*%i +disp(find(b==2-%i)) +disp(find(b==1+3*%i)) + +c=[2 5 4 7; 36 4 1 5; 1 2 54 7; 9 6 3 1] +disp(find(c==1)) + + +d=[1 2+%i 5 9; 7+%i 5+%i 4+%i 1+%i; 1+%i 5+%i 6+%i 3+%i; 2+%i 2+%i 2+%i 2+%i*3] +disp(find(d==2+%i)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind2d.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind2d.sci new file mode 100644 index 00000000..2857b80b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionFind2d.sci @@ -0,0 +1,32 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +a = 1 +[u1,v1]=find(a==0); +[u2,v2]=find(a==1); + +disp(u1);disp(v1); +disp(u2);disp(v2); + +b = 1+3*%i +[u3,v3]=find(b==0); +[u4,v4]=find(b==1+3*%i); + +disp(u3);disp(v3); +disp(u4);disp(v4); + +c=[2 5 4 7; 36 4 1 5; 1 2 54 7; 9 6 3 1] +[u5,v5]=find(c==0); +[u6,v6]=find(c==1); + +disp(u5);disp(v5); +disp(u6);disp(v6); + +d=[1 2+%i 5 9; 7+%i 5+%i 4+%i 1+%i; 1+%i 5+%i 6+%i 3+%i; 2+%i 2+%i 2-%i 2+%i*3] +[u7,v7]=find(d==0); +[u8,v8]=find(d==2+%i); + +disp(u7);disp(v7); +disp(u8);disp(v8); +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsEmpty.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsEmpty.sci new file mode 100644 index 00000000..9c975ad7 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsEmpty.sci @@ -0,0 +1,18 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test isempty + + +disp(isempty(4)); +disp(isempty(3+%i*4)); + +c=[1 5 4 8; 2 9 4 5; 3 6 4 7] +d=[1 5+%i*4 4 8+%i; 2-%i*3 9+%i*7 4+%i*2 5; 3 6 4 7-%i] +e=[0,0] +disp(isempty(c)); +disp(isempty(d)); +disp(isempty(e)); +disp(isempty(e+%i*0)); +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsNan.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsNan.sci new file mode 100644 index 00000000..9d4eac4f --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionIsNan.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test isnan + + +disp(isnan(4)); +disp(isnan(3+%i*4)); + +c=[1 5 4 8; 2 9 4 5; 3 6 4 7] +d=[1 5+%i*4 4 8+%i; 2-%i*3 9+%i*7 4+%i*2 5; 3 6 4 7-%i] +e=[0,0] +//disp(isnan([1 0.01 -%nan %inf-%inf])); +disp(isnan([1 0.01 %inf-%inf])); +disp(isnan(c)); +disp(isnan(d)); +disp(isnan(e)); +disp(isnan(e+%i*0)); +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionLength.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionLength.sci new file mode 100644 index 00000000..7509073c --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionLength.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test length + + +disp(length(4)); +disp(length(3+%i*4)); + +c=[1 5 4 8; 2 9 4 5; 3 6 4 7] +d=[1 5+%i*4 4 8+%i; 2-%i*3 9+%i*7 4+%i*2 5; 3 6 4 7-%i; 3 6 4 7-%i] + +disp(length(c)); +disp(length(d)); + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSign.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSign.sci new file mode 100644 index 00000000..6a1ce45c --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSign.sci @@ -0,0 +1,28 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sign + +//real +disp (sign(4)) +disp (sign(0)) +disp (sign(-2)) + +a=[1 0 5 4; -2 4 0 5 ; -4 -2 -1 4] +disp (sign(a)) + + +//complex +disp (sign(4-2*%i)) +disp (sign(4+2*%i)) +disp (sign(0+%i*0)) +disp (sign(3+%i*0)) +disp (sign(0+%i*3)) +disp (sign(-2 - 2*%i)) +disp (sign(-2 + 2*%i)) + +b=[1+%i 0+0*%i 5-2*%i 4+0*%i; -2+%i 4 0+2*%i 5 ; -4-3*%i -2 -1-3*%i 4+2*%i] +disp (sign(b)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSize.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSize.sci new file mode 100644 index 00000000..067365db --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionSize.sci @@ -0,0 +1,27 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sign + +//real +disp (size(4)) +disp (size(4,1)) +disp (size(4,2)) + +a=[1 0 5 4; -2 4 0 5 ; -4 -2 -1 4] +disp (size(a)) +disp (size(a,1)) +disp (size(a,2)) + +//complex +disp (size(4-2*%i)) +disp (size(4-2*%i,1)) +disp (size(4-2*%i,2)) + +b=[1+%i 0+0*%i 5-2*%i 4+0*%i; -2+%i 4 0+2*%i 5 ] +disp (size(b)) +disp (size(b,1)) +disp (size(b,2)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionType.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionType.sci new file mode 100644 index 00000000..db837346 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/auxiliaryFunctions/mainfunctionType.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test type + +disp (type(4)) +disp (type(2+3*%i)) + +a=[1 2 4 ; 2 5 3] +disp (type(a)) + +b=[1-%i 2+3*%i 4 ; 2-2*%i 5 3+2*%i] +disp (type(b)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACos.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACos.sci new file mode 100644 index 00000000..e0225554 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACos.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test acos + + +disp (acos(0.5)); +disp (acos(0.2+0.1*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5]/10 +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5]/10 + +disp (acos(c)) +disp (acos(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACosh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACosh.sci new file mode 100644 index 00000000..08739198 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionACosh.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test acos + + +disp (acosh(7)); +disp (acosh(2+11*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5]; +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5]; + +disp (acosh(c)) +disp (acosh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASin.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASin.sci new file mode 100644 index 00000000..83fdef40 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASin.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT + +function mainfunction() + +//test asin + + +disp (asin(.7)); +disp (asin(.2+.11*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5]/10 +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5]/10 + +disp (asin(c)) +disp (asin(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASinh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASinh.sci new file mode 100644 index 00000000..967341ef --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionASinh.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test asinh + + +disp (asinh(7)); +disp (asinh(2+11*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (asinh(c)) +disp (asinh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan.sci new file mode 100644 index 00000000..ae5e83db --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test atan + + +disp (atan(7)); +disp (atan(2+11*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (atan(c)) +disp (atan(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan2.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan2.sci new file mode 100644 index 00000000..fa8d0a16 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATan2.sci @@ -0,0 +1,14 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test atan2 + + +disp (atan(7,2)); + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[2 3 7 ;2 4 4; 1 3 4] +disp (atan(c,d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATanh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATanh.sci new file mode 100644 index 00000000..d81af8d7 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionATanh.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test atanh + + +disp (atanh(7/10)); +disp (atanh((2+11*%i)/10)) + +c=[4 2 3 ;8 8 4; 3 4 5]/10 +d=[4 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5]/10 + +disp (atanh(c)) +disp (atanh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCeil_Fix_Floor_Int_Round.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCeil_Fix_Floor_Int_Round.sci new file mode 100644 index 00000000..a5930c21 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCeil_Fix_Floor_Int_Round.sci @@ -0,0 +1,48 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test ceil/fix/floor/int/round + +disp(ceil(4.2)) +disp(fix(4.2)) +disp(floor(4.2)) +disp(int(4.2)) +disp(round(4.2)) + +disp(ceil(-4.2)) +disp(fix(-4.2)) +disp(floor(-4.2)) +disp(int(-4.2)) +disp(round(-4.2)) + + +disp(ceil(4.2 - 2.5*%i)) +disp(fix(4.2 - 2.5*%i)) +disp(floor(4.2 - 2.5*%i)) +disp(int(4.2 - 2.5*%i)) +disp(round(4.2 - 2.5*%i)) + +disp(ceil(-4.2 + 2.5*%i)) +disp(fix(-4.2 + 2.5*%i)) +disp(floor(-4.2 + 2.5*%i)) +disp(int(-4.2 + 2.5*%i)) +disp(round(-4.2 + 2.5*%i)) + +a=[12.5 1.3 1.74 ; -2.4 -3.8 1.000001 ; 1.23 1.99999 0.035; 0 2 -4.5]; + +disp(ceil(a)) +disp(fix(a)) +disp(floor(a)) +disp(int(a)) +disp(round(a)) + +b=a+[1.2 3.8 -3.9; 7 2.7 1.5; 0 -9.5 2.0001; 2.35 -1. 5.49]*%i; +disp(ceil(b)) +disp(fix(b)) +disp(floor(b)) +disp(int(b)) +disp(round(b)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCos.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCos.sci new file mode 100644 index 00000000..d86406b1 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCos.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test cos + + +disp (cos(7/10)); +disp (cos((2+11*%i)/10)) + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (cos(c)) +disp (cos(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCosh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCosh.sci new file mode 100644 index 00000000..915396ff --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionCosh.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test cosh + + +disp (cosh(7/10)); +disp (cosh((2+11*%i)/10)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (cosh(c)) +disp (cosh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionExp_Expm.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionExp_Expm.sci new file mode 100644 index 00000000..d56328d1 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionExp_Expm.sci @@ -0,0 +1,30 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE +function mainfunction() + +//test exp and expm + +//d0 +disp (exp(3)) + +//z0 +disp (exp(3+%i*4)) + + +a=[1 2 3; 5 5 6] +c=[4 2 3 ;8 8 4; 3 4 5] +b=[1+%i,2+4*%i 3+1*%i; 4 5 6+2*%i] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + +//d2 +disp (exp(a)) +disp (exp(c)) +disp (expm(c)) + +//z2 +disp (exp(b)) +disp (exp(d)) +disp (expm(d)) + + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog.sci new file mode 100644 index 00000000..925182cb --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test log + + +disp (log(7/10)); +disp (log(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (log(c)) +disp (log(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog10.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog10.sci new file mode 100644 index 00000000..c8b48552 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog10.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test log10 + + +disp (log10(7/10)); +disp (log10(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (log10(c)) +disp (log10(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog1p.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog1p.sci new file mode 100644 index 00000000..3c929e80 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionLog1p.sci @@ -0,0 +1,17 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test log1p + + +disp (log1p(7/10)); +//disp (log1p(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +//d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (log1p(c)) +//disp (log1p(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow0.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow0.sci new file mode 100644 index 00000000..0a19a9b9 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow0.sci @@ -0,0 +1,27 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT + +function mainfunction() + +//test pow0 + + +disp(0^0); +disp(0^4); + +disp(0^(0+0*%i)); +disp(0^(0+%i)); +disp(0^(3+0*%i)); +disp(0^(2+%i)); + +disp((0+0*%i)^0); +disp((0+0*%i)^2); + +disp((0+0*%i)^(0+0*%i)); +//disp((0+0*%i)^(0+3*%i)); +disp((0+0*%i)^(2+0*%i)); +//disp((0+0*%i)^(2+1*%i)); + + + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow_MatrixPow.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow_MatrixPow.sci new file mode 100644 index 00000000..3706353b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionPow_MatrixPow.sci @@ -0,0 +1,50 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test Hat_DotHat + +disp(4.1^3.5); +disp(4.1.^3.5); + +disp(4.4^(3.2+%i*1.1)); +disp(4.4.^(3.2+%i*1.1)); + +disp((3.2+%i*1.1)^4.4); +disp((3.2+%i*1.1).^4.4); + +disp((3.2+%i*1.1)^(4.4+2.6*%i)); +disp((3.2+%i*1.1).^(4.4+2.6*%i)); + +a=[1.2 4.1 3.9; 3.7 2.6 8.1]; +b=a+[2.5 3.9 8.7; 2.5 0.2 3.3]*%i; + +disp(1.2^a) +disp(1.2.^a) + +disp(1.2^b) +disp(1.2.^b) + +disp((1.2+%i*1.1)^a) +disp((1.2+%i*1.1).^a) + +disp((1.2+%i*1.1)^b) +disp((1.2+%i*1.1).^b) + +disp(a.^a) +disp(a.^b) + +disp(b.^a) +disp(b.^b) + +c=[1.2 1.3; 1.4 5.1]; + +disp(c^2.1); +disp(c^(2.1+%i*4.6)); + +d=c+[4.1 2.1; 4.6 5.1]*%i; + +disp(d^2.1); +disp(d^(2.1+%i*4.6)); + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSin.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSin.sci new file mode 100644 index 00000000..db01d7bd --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSin.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sin + +disp (sin(7/10)); +disp (sin(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (sin(c)) +disp (sin(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSinh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSinh.sci new file mode 100644 index 00000000..c16af3e7 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSinh.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sinh + +disp (sinh(7/10)); +disp (sinh(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (sinh(c)) +disp (sinh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSqrt.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSqrt.sci new file mode 100644 index 00000000..ba64d189 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionSqrt.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sqrt + +disp (sqrt(7/10)); +disp (sqrt(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (sqrt(c)) +disp (sqrt(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTan.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTan.sci new file mode 100644 index 00000000..67572f08 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTan.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test tan + +disp (tan(7/10)); +disp (tan(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (tan(c)) +disp (tan(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTanh.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTanh.sci new file mode 100644 index 00000000..b282d6d9 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/elementary Functions/mainfunctionTanh.sci @@ -0,0 +1,16 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test tanh + +disp (tanh(7/10)); +disp (tanh(2+11*%i)) + +c=[1 2 3 ;8 8 4; 3 4 5] +d=[1 2 3+3*%i ;8 8-1*%i 4; 3+4*%i 4 5] + +disp (tanh(c)) +disp (tanh(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/implicitList/mainfunctionImplicitList.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/implicitList/mainfunctionImplicitList.sci new file mode 100644 index 00000000..8d7c6912 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/implicitList/mainfunctionImplicitList.sci @@ -0,0 +1,36 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test OpColon + +//reals + +disp(2:2) + +disp(1:6) + +disp(2:1:2) + +disp(2:1:5) + +disp(1:2:1) + +disp(1:3:10) + + +//complexe + +2+%i:2-%i + +1+%i:6+%i*5 + +2+%i*3:1-%i*4:2+%i*2 + +2+%i:1+%i:5+%i + +1+%i:2+%i:1+%i + +1+%i:3+%i:10+%i + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpIns.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpIns.sci new file mode 100644 index 00000000..37c7375e --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpIns.sci @@ -0,0 +1,136 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test OpIns + +//reals +a=[1 2 3; 4 5 6] + +a(3)=-2 +disp(a); + +a(3)=-4+%i +disp(a); + +a(1,3)=-12; +disp(a); + +a(1,3)=-5+%i; +disp(a); + +a([1,2],1)=-12; +disp(a); + +a([1,2],1)=-5+%i; +disp(a); + +a(2,[2,3])=-12; +disp(a); + +a(2,[2,3])=-5+%i; +disp(a); + +a([1 2],[1,2,3])=4; +disp(a); + +a([1 2],[1,2,3])=3+%i; +disp(a); + +a([1,3])=7; +disp(a); + +a([1,3])=2+%i; +disp(a); + +a([1,3])=[1,0]; +disp(a); + +a([1,3])=[3-%i,1+%i]; +disp(a); + +a(2,[1,3])=[-2,-7]; +disp(a); + +a(2,[1,3])=[-4+%i,-5+%i]; +disp(a); + +a([1,2],3)=[-9;-1]; +disp(a); + +a([1,2],3)=[-4+%i;-5+%i]; +disp(a); + +a([1,2],[2,3])=[-31 -45;-29 -51]; +disp(a); + +a([1,2],[2,3])=[-4+%i,-5+%i;-4+%i,-5+%i]; +disp(a); + + +//complexes + +b=[1-3*%i 2+%i 3+2*%i; 4 5+4*%i 6] + +b(3)=-2 +disp(b); + +b(3)=-4+%i +disp(b); + +b(1,3)=-12; +disp(b); + +b(1,3)=-5+%i; +disp(b); + +b([1,2],1)=-12; +disp(b); + +b([1,2],1)=-5+%i; +disp(b); + +b(2,[2,3])=-12; +disp(b); + +b(2,[2,3])=-5+%i; +disp(b); + +b([1 2],[1,2,3])=4; +disp(b); + +b([1 2],[1,2,3])=3+%i; +disp(b); + +b([1,3])=7; +disp(b); + +b([1,3])=2+%i; +disp(b); + +b([1,3])=[1,0]; +disp(b); + +b([1,3])=[3-%i,1+%i]; +disp(b); + +b(2,[1,3])=[-2,-7]; +disp(b); + +b(2,[1,3])=[-4+%i,-5+%i]; +disp(b); + +b([1,2],3)=[-9;-1]; +disp(b); + +b([1,2],3)=[-4+%i;-5+%i]; +disp(b); + +b([1,2],[2,3])=[-31 -45;-29 -51]; +disp(b); + +b([1,2],[2,3])=[-4+%i,-5+%i;-4+%i,-5+%i]; +disp(b); + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogEq.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogEq.sci new file mode 100644 index 00000000..86ab7251 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogEq.sci @@ -0,0 +1,32 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test OpEqual +disp(1==1) +disp(1==2) +disp(1==2+%i) +disp(1+%i==2) +disp(1+%i==2+%i) + +a=[1 2 ; 3 4] +b=[5 2 ; 6+%i 1-%i] + +disp(a==a) +disp(a==b) +disp(b==a) +disp(b==b) + + +disp(3==a) +disp(5==b) +disp(a==4) +disp(b==2) + +disp(1+%i==a) +disp(1-%i==b) +disp(a==6+%i) +disp(b==6+%i) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNe.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNe.sci new file mode 100644 index 00000000..d1212dac --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNe.sci @@ -0,0 +1,32 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test OpEqual +disp(1<>1) +disp(1<>2) +disp(1<>2+%i) +disp(1+%i<>2) +disp(1+%i<>2+%i) + +a=[1 2 ; 3 4] +b=[5 2 ; 6+%i 1-%i] + +disp(a<>a) +disp(a<>b) +disp(b<>a) +disp(b<>b) + + +disp(3<>a) +disp(5<>b) +disp(a<>4) +disp(b<>2) + +disp(1+%i<>a) +disp(1-%i<>b) +disp(a<>6+%i) +disp(b<>6+%i) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNot.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNot.sci new file mode 100644 index 00000000..6f17a306 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/mainfunctionOpLogNot.sci @@ -0,0 +1,29 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test OpLogNot + +disp(~(-2)) +disp(~(0)) +disp(~(3)) + +disp(~(0-2*%i)) +disp(~(0+0*%i)) +disp(~(0+3*%i)) +disp(~(3-5*%i)) +disp(~(3+0*%i)) +disp(~(3+6*%i)) + +a=[-1 2 3; 0 -1 4; 2 -0 5]; + +disp(~(a)) + +b=[0+3*%i 2-%i 1 ; 0-2*%i 2+2*%i 1-%i; 0+0*%i 4+0*%i 5-0*%i] + +disp(~(b)) + + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionChol.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionChol.sci new file mode 100644 index 00000000..46f8c409 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionChol.sci @@ -0,0 +1,24 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test chol + +//real +disp (chol(4)) + +a=[1 0 5; -2 4 0 ; -4 -2 -1] +a2=a*a' +disp (chol(a2)) + + +//complex +disp (chol(4-2*%i)) + + +b=[1+%i 0+0*%i; 5-2*%i 4+0*%i] +b2=b*b' +disp (chol(b2)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionDet.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionDet.sci new file mode 100644 index 00000000..fbd59649 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionDet.sci @@ -0,0 +1,28 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE +function mainfunction() + +//test det + +//d0 +disp (det(3)) + +//z0 +disp (det(3+%i*4)) + + +c=[4 2 3 ;8 8 4; 3 4 5] +e=[4 2 3 1;8 8 4 4; 3 4 5 7; 12 2 3 4] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] +f=[4+%i 2 3 1*%i ;3+4*%i 8-2*%i 8+4*%i 4+2*%i ; 3 4+2*%i 5 7; 12+2*%i 2 3 4] + +//d2 +disp (det(c)) +disp (det(e)) + +//z2 +disp (det(d)) +disp (det(f)) + + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionEye.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionEye.sci new file mode 100644 index 00000000..b077c9f4 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionEye.sci @@ -0,0 +1,37 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test eye + +//reals + + +disp(eye()) + +disp(eye(1)) + +disp(eye(4)) + +disp(eye(1,1)) + +disp(eye(1,4)) + +disp(eye(4,4)) + +disp(eye(4,1)) + +a=[1 2 3; 4 5 6; 7 8 9] + +disp(eye(a)) + +//complexe + +disp(eye(2+%i)) + +b=a+%i + +disp(eye(b)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionInversion.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionInversion.sci new file mode 100644 index 00000000..71645901 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionInversion.sci @@ -0,0 +1,21 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test inversion + + +disp (inv(3)) + + +disp (inv(3+2*%i)) + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + + +disp (inv(c)) + +disp (inv(d)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOnes.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOnes.sci new file mode 100644 index 00000000..15b57b61 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOnes.sci @@ -0,0 +1,37 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test ones + +//reals + + +//disp(ones()) + +disp(ones(1)) + +disp(ones(4)) + +disp(ones(1,1)) + +disp(ones(1,4)) + +disp(ones(4,4)) + +disp(ones(4,1)) + +a=[1 2 3; 4 5 6; 7 8 9] + +disp(ones(a)) + +//complexe + +disp(ones(2+%i)) + +b=a+%i + +disp(ones(b)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOpApex_OpDotApex.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOpApex_OpDotApex.sci new file mode 100644 index 00000000..3f3822ea --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionOpApex_OpDotApex.sci @@ -0,0 +1,29 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test OpApex(transpose&conj) & OpDotApex(transpose) + +//reals + +disp(3') + +disp(3.') + +a=[4 2 4 8;3 4 5 1;1 4 5 6; 7 4 5 3] + +disp(a') +disp(a.') + +//complexes + +disp((3+%i)') + +disp((3+%i).') + +b=2.5*a+a*%i; + +disp(b') +disp(b.') + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionSpec_Spec2.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionSpec_Spec2.sci new file mode 100644 index 00000000..36b63d7f --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionSpec_Spec2.sci @@ -0,0 +1,66 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test spec + +//reals + +disp(spec(4)) + +[u,v]=spec(4) +disp(u) +disp(v) + +a=[4 2 4 8;3 4 5 1;1 4 5 6; 7 4 5 3] + +disp(spec(a)) + +[x,y]=spec(a) +disp(x) +disp(y) + +b=[1 1;1 3] +disp(spec(b)) + +[s,t]=spec(b) +disp(s) +disp(t) + +c=[1 -2;1 3] +disp(spec(c)) + +[m,n]=spec(c) +disp(m) +disp(n) + + +//complexes + +disp(spec(3-%i)) + +[i,j]=spec(3-%i) +disp(i) +disp(j) + +d=[1 4 2 5; 2 5 4 7; 3 4 2 4;1 4 7 5]+[1 4 5 7;2 3 6 9;2 4 1 5; 7 8 5 4]*%i; + +disp(spec(d)) + +[k,l]=spec(d) +disp(k) +disp(l) + +e=[1 2; 2 7]+[0 4;-4 0]*%i +disp(spec(e)) + +[o,p]=spec(e) +disp(o) +disp(p) + +disp(spec(a+0*%i)) +[q,qq]=spec(a+0*%i) +disp(q) +disp(qq) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionZeros.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionZeros.sci new file mode 100644 index 00000000..7b4b0f9d --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/matrixOperations/mainfunctionZeros.sci @@ -0,0 +1,37 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test zeros + +//reals + + +//disp(zeros()) + +disp(zeros(1)) + +disp(zeros(4)) + +disp(zeros(1,1)) + +disp(zeros(1,4)) + +disp(zeros(4,4)) + +disp(zeros(4,1)) + +a=[1 2 3; 4 5 6; 7 8 9] + +disp(zeros(a)) + +//complexe + +disp(zeros(2+%i)) + +b=a+%i + +disp(zeros(b)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpMinus.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpMinus.sci new file mode 100644 index 00000000..4445143b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpMinus.sci @@ -0,0 +1,50 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE +function mainfunction() + +//test soustraction + +//d0d0 +disp (5-3) +//d0z0 +disp (1-%i) +//z0d0 +disp (%i-1) +//z0z0 +disp (%i-3*%i) + +a=[1 2 3; 4 5 6] +c=[1 5 3; 7 0 5] +b=[1+%i,2+4*%i 3+1*%i; 4 5 6+2*%i] +d=[1+%i,5+%i 3; 7+3*%i 0 5] + +//d2d2 +disp(a-c) +disp(a-a) +//d2z2 +disp(a-d) +//z2d2 +disp(d-a) +//z2z2 +disp(b-b) +disp(b-d) + +//d2d0 +disp(a-1) +//d0d2 +disp(1-a) +//d2z0 +disp(a-%i) +//z0d2 +disp(%i-a) + + +//z2d0 +disp(b-1) +//d0z2 +disp(1-b) +//z2z0 +disp(b-%i) +//z0z2 +disp(%i-b) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpPlus.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpPlus.sci new file mode 100644 index 00000000..3cef1468 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpPlus.sci @@ -0,0 +1,47 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE +function mainfunction() + +//test addition + +//d0d0 +disp (1+1) +//d0z0 +disp (1+%i) +//z0d0 +disp (%i+1) +//z0z0 +disp (%i+%i) + +a=[1 2 3; 4 5 6] +b=[1+%i,2 3; 4 5 6] + + +//d2d2 +disp(a+a) +//d2z2 +disp(a+b) +//z2d2 +disp(b+a) +//z2z2 +disp(b+b) + +//d2d0 +disp(a+1) +//d0d2 +disp(1+a) +//d2z0 +disp(a+%i) +//z0d2 +disp(%i+a) +//z2z2 + +//z2d0 +disp(b+1) +//d0z2 +disp(1+b) +//z2z0 +disp(b+%i) +//z0z2 +disp(%i+b) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpSlash_OpDotSlash.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpSlash_OpDotSlash.sci new file mode 100644 index 00000000..5523a19f --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpSlash_OpDotSlash.sci @@ -0,0 +1,67 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT +function mainfunction() + +//test division + +//d0d0 +disp (5/3) +//d0z0 +disp (1/%i) +//z0d0 +disp (%i/5) +//z0z0 +disp (%i/(3*%i)) + +a=[1 2 3; 5 5 6] +c=[4 2 3 ;8 8 4; 3 4 5] +b=[1+%i,2+4*%i 3+1*%i; 4 5 6+2*%i] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + +//d2d2 +disp("d2d2") +disp(a/c) +disp(a./a) +//d2z2 +disp("d2z2") +disp(a/d) +disp(a./b) +//z2d2 +disp("z2d2") +disp(d/c) +disp(b./a) +//z2z2 +disp("z2z2") +disp(b/d) +disp(b./b) + + + + +//d2d0 +disp("d2d0") +disp(a/2) +//d0d2 +disp("d0d2") +disp(1/c) +//d2z0 +disp("d2z0") +disp(a/%i) +//z0d2 +disp("z0d2") +disp(%i/c) + + +//z2d0 +disp("z2d0") +disp(b/5) +//d0z2 +disp("d0z2") +disp(1/d) +//z2z0 +disp("z2z0") +disp(b/%i) +//z0z2 +disp("z0z2") +disp(%i/d) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpStar_OpDotStar.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpStar_OpDotStar.sci new file mode 100644 index 00000000..93d50258 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/operations/mainfunctionOpStar_OpDotStar.sci @@ -0,0 +1,58 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE +function mainfunction() + +//test multiplication + +//d0d0 +disp (5/3) +//d0z0 +disp (1/%i) +//z0d0 +disp (%i/5) +//z0z0 +disp (%i/(3*%i)) + +a=[1 2 3; 4 5 6] +c=[4 2 3 ;8 8 4; 3 4 5] +b=[1+%i,2+4*%i 3+1*%i; 4 5 6+2*%i] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] +e=[4 2 ;3 8 ;8-1*%i 4; 3+4*%i 4] + +//d2d2 +disp(a*c) +disp(a.*a) +//d2z2 +disp(a*d) +disp(a.*b) +//z2d2 +disp(e*a) +disp(b.*a) +//z2z2 +disp(b*d) +disp(b.*b) + + + + +//d2d0 +disp(a*1) +//d0d2 +disp(1*a) +//d2z0 +disp(a*%i) +//z0d2 +disp(%i*a) + + +//z2d0 +disp(b*1) +//d0z2 +disp(1*b) +//z2z0 +disp(b*%i) +//z0z2 +disp(%i*b) + +endfunction + + diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionConvol.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionConvol.sci new file mode 100644 index 00000000..41c38603 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionConvol.sci @@ -0,0 +1,47 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test convol + +disp (convol(3,5)) +disp (convol(3+2*%i,5-%i)) + +disp (convol(3,5+3*%i)) +disp (convol(3+2*%i,2)) + +c=[1 2 3] +d=[4 5 6 7 8] +e=[2+3*%i 4+4*%i 7-5*%i 8+%i] +f=[1+5*%i 3-2*%i 1-%i] + +disp (convol(3,d)) +disp (convol(3,f)) +disp (convol(c,2)) +disp (convol(e,5)) + +disp (convol(3-%i,d)) +disp (convol(3+2*%i,f)) +disp (convol(c,2+2*%i)) +disp (convol(e,5+%i)) + +disp (convol(c,d)) +disp (convol(c,f)) +disp (convol(e,c)) +disp (convol(e,f)) + +//the following lines don't exist in Scilab but are in Sci2C + +//g=[1 2; 3 4] +//h=[4 5; 6 7] +//i=[2+3*%i 4+4*%i; 7-5*%i 8+%i] +//j=[1+5*%i 4+4*%i; 3-2*%i 1-%i] + +//disp (convol(g,h)) +//disp (convol(g,j)) +//disp (convol(i,h)) +//disp (convol(i,j)) + + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFft.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFft.sci new file mode 100644 index 00000000..e9d11acd --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFft.sci @@ -0,0 +1,38 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test fftshift + +//1 input argument +disp(fft(4)) + +disp(fft([3 4 2 1; 1 4 5 2])); + +disp(fft(4-%i)) + + +disp(fft([3+%i*2 4 2-%i 1; 1-%i*2 4 5 2])); + +//2 input arguments + +disp(fft(4,1)) + +disp(fft([3 4 2 1; 1 4 5 2],1)); + +disp(fft(4-%i,1)) + + +disp(fft([3+%i*2 4 2-%i 1; 1-%i*2 4 5 2],1)); + +disp(fft(4,-1)) + +disp(fft([3 4 2 1; 1 4 5 2],-1)); + +disp(fft(4-%i,-1)) + + +disp(fft([3+%i*2 4 2-%i 1; 1-%i*2 4 5 2],-1)); + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFftShift.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFftShift.sci new file mode 100644 index 00000000..b562894f --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionFftShift.sci @@ -0,0 +1,30 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + + +// test fftshift + +disp(fftshift(4)) +disp(fftshift(5,1)) +disp(fftshift(6,2)) + +disp(fftshift(4-%i)) +disp(fftshift(4-%i*2,1)) +disp(fftshift(4-%i*3,2)) + +a=[2 3 4 8; 8 4 5 6;1 2 3 4; 14 5 8 7; 1 2 6 7] +b=[2 3 4 8;1 2 6+3*%i 7] + + +disp(fftshift(a)) +disp(fftshift(a,1)) +disp(fftshift(a,2)) + + +disp(fftshift(b)) +disp(fftshift(b,1)) +disp(fftshift(b,2)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionIfft.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionIfft.sci new file mode 100644 index 00000000..3da3e39b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionIfft.sci @@ -0,0 +1,24 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test ifft + +//real +disp (ifft(4)) + +a=[1 0 5; -2 4 0 ; -4 -2 -1] + +disp (ifft(a)) + + +//complex +disp (ifft(4-2*%i)) + + +b=[1+%i 0+0*%i; 5-2*%i 4+0*%i] + +disp (ifft(b)) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionLev.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionLev.sci new file mode 100644 index 00000000..274567db --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/signalProcessing/mainfunctionLev.sci @@ -0,0 +1,38 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test lev + +//reals + +b=[1 2 3 4] + +disp(lev(b)) + +[u,v]=lev(b) +disp(u) +disp(v) + +[x,y,z]=lev(b) +disp(x) +disp(y) +disp(z) + +//complexes + +c=[1+2*%i 2 3-3*%i 4+%i] + +disp(lev(c)) + +[uc,vc]=lev(c) +disp(uc) +disp(vc) + +[xc,yc,zc]=lev(c) +disp(xc) +disp(yc) +disp(zc) + + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionMean.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionMean.sci new file mode 100644 index 00000000..ab4b0bc5 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionMean.sci @@ -0,0 +1,21 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + + +function mainfunction() + +//test mean + + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + + + +disp (mean(c)) +disp (mean(c,1)) +disp (mean(c,2)) +disp (mean(d)) +disp (mean(d,1)) +disp (mean(d,2)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionSum.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionSum.sci new file mode 100644 index 00000000..7302398e --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionSum.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test sum + + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + + + +disp (sum(c)) +disp (sum(c,1)) +disp (sum(c,2)) +disp (sum(d)) +disp (sum(d,1)) +disp (sum(d,2)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionVariance.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionVariance.sci new file mode 100644 index 00000000..716d61e3 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/statistic Functions/mainfunctionVariance.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +//test variance + + +c=[4 2 3 ;8 8 4; 3 4 5] +d=[4 2 3 ;8 8-1*%i 4; 3+4*%i 4 5] + + + +disp (variance(c)) +disp (variance(c,1)) +disp (variance(c,2)) +disp (variance(d)) +disp (variance(d,1)) +disp (variance(d,2)) + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/type/mainfunctionReal_Imag.sci b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/type/mainfunctionReal_Imag.sci new file mode 100644 index 00000000..02b5c3a7 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/Mes_tests/type/mainfunctionReal_Imag.sci @@ -0,0 +1,20 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +disp(real(4)); +disp(imag(4)); + +disp(real(1+2*%i)); +disp(imag(1+2*%i)); + +a=[4 2 7 5;4 8 6 1]; + +disp(real(a)); +disp(imag(a)); + +b=a+%i*2*a +disp(real(b)); +disp(imag(b)); + +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/SCI2CInputParameters.sce b/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/SCI2CInputParameters.sce new file mode 100644 index 00000000..84590e7b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/SCI2CInputParameters.sce @@ -0,0 +1,89 @@ +// ----------------------------------------------------------------- +// === hArtes/PoliBa/GAP SCI2C tool === +// === Authors: === +// === Raffaele Nutricato === +// === raffaele.nutricato@tiscali.it === +// === Alberto Morea === +// === === +// === *************** === +// === USER PARAMETERS === +// === *************** === +// === === +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + + +// ------------------------------------------ +// --- Specify Paths of User Scilab code. --- +// ------------------------------------------ +// UserSciCodeMainDir = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\SCI2CTests\test999_WorkingDir'; +UserSciCodeMainDir = '../SCI2CTests/test999_WorkingDir'; + +// --- Path + filename of the .sci main file of the code to be translated. --- +// It is the entry point. +UserScilabMainFile = fullfile(UserSciCodeMainDir,'scilabcode\mainfunction.sci'); + +// --- List of the paths containing the .sci files written by the user. --- +UserSciFilesPaths = ... + [... + fullfile(UserSciCodeMainDir,'scilabcode');... + ]; + +// -------------------------- +// --- End Specify paths. --- +// -------------------------- + + +// ---------------------------- +// --- Select the run mode. --- +// ---------------------------- +//RunMode = 'GenLibraryStructure'; +//RunMode = 'Translate'; +RunMode = 'All'; + +// --- Select one of the following options. --- + +// 'GenLibraryStructure'; +// Generates the library structure and exits. It is very +// useful when the user wants to manually change the files stored in that structure +// before running the translation. 'GenLibraryStructure' option forces SCI2C to remove +// the already existing WorkingDir and OutCCCodeDir directories. + +// 'Translate'; +// Performs the translation without generating the library structure. It means that the library +// structure must be already existing. This is useful when the user doesn't want to spend time +// to generate again that structure or when he wants to force the SCI2C tool to access to +// a manually-changed library structure. 'Translate' option forces SCI2C to don't remove +// the already existing WorkingDir. Only OutCCCodeDir directory will be removed. + +// 'All'; +// Performs all the actions listed above. + +// -------------------------------- +// --- End Select the run mode. --- +// -------------------------------- + + +// ---------------------------- +// --- Translation Options. --- +// ---------------------------- +// --- Enable (1) / Disable (0) copy of Scilab code into C code. --- +// If 1 the Scilab code will be copied into the C code in order to show +// how each Scilab code line has been translated into C code. +CopySciCodeIntoCCode = 1; + +// --- Select the path style for the C code. --- +// It can be: +// windows +// unix +// cygwin +CCompilerPathStyle = 'cygwin'; + +// --- Path + File name of the main SCI2C library header file. +// Sci2CLibMainHeaderFName = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\Scilab2C\CFiles\sci2cincludes\sci2clib.h'; +Sci2CLibMainHeaderFName = '../../../Scilab2C/CFiles/sci2cincludes/sci2clib.h'; +// -------------------------------- +// --- End Translation Options. --- +// -------------------------------- diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/scilabcode/mainfunction.sci b/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/scilabcode/mainfunction.sci new file mode 100644 index 00000000..e39f7648 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test000_TrigonIdentity/scilabcode/mainfunction.sci @@ -0,0 +1,30 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +// ------------------------------ +// --- Simple Scalar Addition --- +// ------------------------------ +a = 1; +b = 2; +c = 0; +c = a + b; +disp(c); + +// ------------------------------ +// --- Trigonometric Identity --- +// ------------------------------ +x = (1:3)' * (4:9); +y = (sin(x).^2) + (cos(x).^2); +disp(x); +disp(y-ones(3,6)); + +// ------------------------------- +// --- Computation of Distance --- +// ------------------------------- +// generate a vector w +w = cos(sin(cos(x*3)*2).* x+ones(3,6).*cos(x-sin(y*2))); +distxw = sqrt(x.^2 + w.^2); +disp(distxw); +endfunction + \ No newline at end of file diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/SCI2CInputParameters.sce b/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/SCI2CInputParameters.sce new file mode 100644 index 00000000..84590e7b --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/SCI2CInputParameters.sce @@ -0,0 +1,89 @@ +// ----------------------------------------------------------------- +// === hArtes/PoliBa/GAP SCI2C tool === +// === Authors: === +// === Raffaele Nutricato === +// === raffaele.nutricato@tiscali.it === +// === Alberto Morea === +// === === +// === *************** === +// === USER PARAMETERS === +// === *************** === +// === === +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + + +// ------------------------------------------ +// --- Specify Paths of User Scilab code. --- +// ------------------------------------------ +// UserSciCodeMainDir = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\SCI2CTests\test999_WorkingDir'; +UserSciCodeMainDir = '../SCI2CTests/test999_WorkingDir'; + +// --- Path + filename of the .sci main file of the code to be translated. --- +// It is the entry point. +UserScilabMainFile = fullfile(UserSciCodeMainDir,'scilabcode\mainfunction.sci'); + +// --- List of the paths containing the .sci files written by the user. --- +UserSciFilesPaths = ... + [... + fullfile(UserSciCodeMainDir,'scilabcode');... + ]; + +// -------------------------- +// --- End Specify paths. --- +// -------------------------- + + +// ---------------------------- +// --- Select the run mode. --- +// ---------------------------- +//RunMode = 'GenLibraryStructure'; +//RunMode = 'Translate'; +RunMode = 'All'; + +// --- Select one of the following options. --- + +// 'GenLibraryStructure'; +// Generates the library structure and exits. It is very +// useful when the user wants to manually change the files stored in that structure +// before running the translation. 'GenLibraryStructure' option forces SCI2C to remove +// the already existing WorkingDir and OutCCCodeDir directories. + +// 'Translate'; +// Performs the translation without generating the library structure. It means that the library +// structure must be already existing. This is useful when the user doesn't want to spend time +// to generate again that structure or when he wants to force the SCI2C tool to access to +// a manually-changed library structure. 'Translate' option forces SCI2C to don't remove +// the already existing WorkingDir. Only OutCCCodeDir directory will be removed. + +// 'All'; +// Performs all the actions listed above. + +// -------------------------------- +// --- End Select the run mode. --- +// -------------------------------- + + +// ---------------------------- +// --- Translation Options. --- +// ---------------------------- +// --- Enable (1) / Disable (0) copy of Scilab code into C code. --- +// If 1 the Scilab code will be copied into the C code in order to show +// how each Scilab code line has been translated into C code. +CopySciCodeIntoCCode = 1; + +// --- Select the path style for the C code. --- +// It can be: +// windows +// unix +// cygwin +CCompilerPathStyle = 'cygwin'; + +// --- Path + File name of the main SCI2C library header file. +// Sci2CLibMainHeaderFName = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\Scilab2C\CFiles\sci2cincludes\sci2clib.h'; +Sci2CLibMainHeaderFName = '../../../Scilab2C/CFiles/sci2cincludes/sci2clib.h'; +// -------------------------------- +// --- End Translation Options. --- +// -------------------------------- diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/scilabcode/mainfunction.sci b/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/scilabcode/mainfunction.sci new file mode 100644 index 00000000..a29a1c9e --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test001_LinearRegression/scilabcode/mainfunction.sci @@ -0,0 +1,55 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +// Knowing that +// (1) P * (V^gamma) = C +// Where +// P = Pressure +// V = Volume +// gamma,C = constants depending on the particular gas used. +// (2) log10(P) = log10(C) - gamma*log10(V) +// (3) x = log10(V) +// (4) y = log10(P) +// than (2) becomes: +// y = a + b*x; +// Where +// a = log10(C) +// b = -gamma +// Then thanks to this transformation it is possible to perform +// a linear regression to estimate gamma and C! + +Volume = [54.3 61.8 72.4 88.7 118.6 194.0]; +Pressure = [61.2 49.5 37.6 28.4 19.2 10.1]; +x = log10(Volume); +y = log10(Pressure); + +a = (sum(y)*sum(x.^2)-sum(x)*sum(x.*y))./(length(x)*sum(x.^2)-sum(x).*sum(x)); +b = (length(x)*sum(x.*y)-sum(x)*sum(y))./(length(x)*sum(x.^2)-sum(x).*sum(x)); + +// Other way to compute a and b +beq = sum((x-mean(x)).*(y-mean(y)))./sum((x-mean(x)).^2); +aeq = mean(y)-mean(x)*beq; + +C = 10 .^a; +gamma = -b; + +disp('C') +disp(C) + +disp('gamma'); +disp(gamma); + +disp('a'); +disp(a) +disp('aeq'); +disp(aeq) + +disp('b'); +disp(b) +disp('beq'); +disp(beq) + +// plot(Volume,Pressure); +// plot(Volume,(C ./(Volume.^gamma)),'r') +endfunction diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/SCI2CInputParameters.sce b/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/SCI2CInputParameters.sce new file mode 100644 index 00000000..52d8c7d5 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/SCI2CInputParameters.sce @@ -0,0 +1,89 @@ +// ----------------------------------------------------------------- +// === hArtes/PoliBa/GAP SCI2C tool === +// === Authors: === +// === Raffaele Nutricato === +// === raffaele.nutricato@tiscali.it === +// === Alberto Morea === +// === === +// === *************** === +// === USER PARAMETERS === +// === *************** === +// === === +// +// Copyright 2007 Raffaele Nutricato. +// Contact: raffaele.nutricato@tiscali.it +// ----------------------------------------------------------------- + + +// ------------------------------------------ +// --- Specify Paths of User Scilab code. --- +// ------------------------------------------ +// UserSciCodeMainDir = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\SCI2CTests\test999_WorkingDir'; +UserSciCodeMainDir = '../SCI2CTests/test999_WorkingDir'; + +// --- Path + filename of the .sci main file of the code to be translated. --- +// It is the entry point. +UserScilabMainFile = fullfile(UserSciCodeMainDir,'scilabcode/mainfunction.sci'); + +// --- List of the paths containing the .sci files written by the user. --- +UserSciFilesPaths = ... + [... + fullfile(UserSciCodeMainDir,'scilabcode');... + ]; + +// -------------------------- +// --- End Specify paths. --- +// -------------------------- + + +// ---------------------------- +// --- Select the run mode. --- +// ---------------------------- +//RunMode = 'GenLibraryStructure'; +//RunMode = 'Translate'; +RunMode = 'All'; + +// --- Select one of the following options. --- + +// 'GenLibraryStructure'; +// Generates the library structure and exits. It is very +// useful when the user wants to manually change the files stored in that structure +// before running the translation. 'GenLibraryStructure' option forces SCI2C to remove +// the already existing WorkingDir and OutCCCodeDir directories. + +// 'Translate'; +// Performs the translation without generating the library structure. It means that the library +// structure must be already existing. This is useful when the user doesn't want to spend time +// to generate again that structure or when he wants to force the SCI2C tool to access to +// a manually-changed library structure. 'Translate' option forces SCI2C to don't remove +// the already existing WorkingDir. Only OutCCCodeDir directory will be removed. + +// 'All'; +// Performs all the actions listed above. + +// -------------------------------- +// --- End Select the run mode. --- +// -------------------------------- + + +// ---------------------------- +// --- Translation Options. --- +// ---------------------------- +// --- Enable (1) / Disable (0) copy of Scilab code into C code. --- +// If 1 the Scilab code will be copied into the C code in order to show +// how each Scilab code line has been translated into C code. +CopySciCodeIntoCCode = 1; + +// --- Select the path style for the C code. --- +// It can be: +// windows +// unix +// cygwin +CCompilerPathStyle = 'unix'; + +// --- Path + File name of the main SCI2C library header file. +// Sci2CLibMainHeaderFName = 'D:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\svnhartes\src\Scilab2C\Scilab2C\CFiles\sci2cincludes\sci2clib.h'; +Sci2CLibMainHeaderFName = '../../../Scilab2C/CFiles/sci2cincludes/sci2clib.h'; +// -------------------------------- +// --- End Translation Options. --- +// -------------------------------- diff --git a/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci b/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci new file mode 100644 index 00000000..e39f7648 --- /dev/null +++ b/2.3-1/src/Scilab2C/SCI2CTests/test999_WorkingDir/scilabcode/mainfunction.sci @@ -0,0 +1,30 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE + +function mainfunction() + +// ------------------------------ +// --- Simple Scalar Addition --- +// ------------------------------ +a = 1; +b = 2; +c = 0; +c = a + b; +disp(c); + +// ------------------------------ +// --- Trigonometric Identity --- +// ------------------------------ +x = (1:3)' * (4:9); +y = (sin(x).^2) + (cos(x).^2); +disp(x); +disp(y-ones(3,6)); + +// ------------------------------- +// --- Computation of Distance --- +// ------------------------------- +// generate a vector w +w = cos(sin(cos(x*3)*2).* x+ones(3,6).*cos(x-sin(y*2))); +distxw = sqrt(x.^2 + w.^2); +disp(distxw); +endfunction + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/Makefile.am new file mode 100644 index 00000000..5a9a6120 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/Makefile.am @@ -0,0 +1,25 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS= abs \ + conj \ + find \ + isempty \ + isnan \ + rand \ + sign \ + pythag \ + size \ + type \ + length \ + frexp\ + find2d diff --git a/2.3-1/src/c/auxiliaryFunctions/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/Makefile.in new file mode 100644 index 00000000..edc340c4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/Makefile.in @@ -0,0 +1,573 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/auxiliaryFunctions +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = abs \ + conj \ + find \ + isempty \ + isnan \ + rand \ + sign \ + pythag \ + size \ + type \ + length \ + frexp\ + find2d + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.am new file mode 100644 index 00000000..5ed377e4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAbs_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAbs.la + +libAbs_la_SOURCES = $(HEAD) $(SRC) + +SRC = sabss.c \ + dabss.c \ + cabss.c \ + zabss.c \ + sabsa.c \ + dabsa.c \ + cabsa.c \ + zabsa.c + +HEAD = ../includes/abs.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAbs testDoubleAbs + +TESTS = testFloatAbs testDoubleAbs + +# +# -*- Abs Tests -*- +# +testFloatAbs_SOURCES = testAbs.h testFloatAbs.c +testFloatAbs_CFLAGS = $(check_INCLUDES) +testFloatAbs_LDADD = $(check_LDADD) + +testDoubleAbs_SOURCES = testAbs.h testDoubleAbs.c +testDoubleAbs_CFLAGS = $(check_INCLUDES) +testDoubleAbs_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.in new file mode 100644 index 00000000..ef9df92c --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/Makefile.in @@ -0,0 +1,800 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAbs$(EXEEXT) testDoubleAbs$(EXEEXT) +TESTS = testFloatAbs$(EXEEXT) testDoubleAbs$(EXEEXT) +subdir = src/c/auxiliaryFunctions/abs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAbs_la_LIBADD = +am__objects_1 = +am__objects_2 = libAbs_la-sabss.lo libAbs_la-dabss.lo \ + libAbs_la-cabss.lo libAbs_la-zabss.lo libAbs_la-sabsa.lo \ + libAbs_la-dabsa.lo libAbs_la-cabsa.lo libAbs_la-zabsa.lo +am_libAbs_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAbs_la_OBJECTS = $(am_libAbs_la_OBJECTS) +libAbs_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAbs_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAbs_OBJECTS = testDoubleAbs-testDoubleAbs.$(OBJEXT) +testDoubleAbs_OBJECTS = $(am_testDoubleAbs_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleAbs_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAbs_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAbs_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAbs_OBJECTS = testFloatAbs-testFloatAbs.$(OBJEXT) +testFloatAbs_OBJECTS = $(am_testFloatAbs_OBJECTS) +testFloatAbs_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAbs_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAbs_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAbs_la_SOURCES) $(testDoubleAbs_SOURCES) \ + $(testFloatAbs_SOURCES) +DIST_SOURCES = $(libAbs_la_SOURCES) $(testDoubleAbs_SOURCES) \ + $(testFloatAbs_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAbs_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAbs.la +libAbs_la_SOURCES = $(HEAD) $(SRC) +SRC = sabss.c \ + dabss.c \ + cabss.c \ + zabss.c \ + sabsa.c \ + dabsa.c \ + cabsa.c \ + zabsa.c + +HEAD = ../includes/abs.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Abs Tests -*- +# +testFloatAbs_SOURCES = testAbs.h testFloatAbs.c +testFloatAbs_CFLAGS = $(check_INCLUDES) +testFloatAbs_LDADD = $(check_LDADD) +testDoubleAbs_SOURCES = testAbs.h testDoubleAbs.c +testDoubleAbs_CFLAGS = $(check_INCLUDES) +testDoubleAbs_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/abs/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/abs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAbs.la: $(libAbs_la_OBJECTS) $(libAbs_la_DEPENDENCIES) + $(libAbs_la_LINK) -rpath $(pkglibdir) $(libAbs_la_OBJECTS) $(libAbs_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAbs$(EXEEXT): $(testDoubleAbs_OBJECTS) $(testDoubleAbs_DEPENDENCIES) + @rm -f testDoubleAbs$(EXEEXT) + $(testDoubleAbs_LINK) $(testDoubleAbs_OBJECTS) $(testDoubleAbs_LDADD) $(LIBS) +testFloatAbs$(EXEEXT): $(testFloatAbs_OBJECTS) $(testFloatAbs_DEPENDENCIES) + @rm -f testFloatAbs$(EXEEXT) + $(testFloatAbs_LINK) $(testFloatAbs_OBJECTS) $(testFloatAbs_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-cabsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-cabss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-dabsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-dabss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-sabsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-sabss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-zabsa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAbs_la-zabss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAbs-testDoubleAbs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAbs-testFloatAbs.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAbs_la-sabss.lo: sabss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-sabss.lo -MD -MP -MF $(DEPDIR)/libAbs_la-sabss.Tpo -c -o libAbs_la-sabss.lo `test -f 'sabss.c' || echo '$(srcdir)/'`sabss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-sabss.Tpo $(DEPDIR)/libAbs_la-sabss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sabss.c' object='libAbs_la-sabss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-sabss.lo `test -f 'sabss.c' || echo '$(srcdir)/'`sabss.c + +libAbs_la-dabss.lo: dabss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-dabss.lo -MD -MP -MF $(DEPDIR)/libAbs_la-dabss.Tpo -c -o libAbs_la-dabss.lo `test -f 'dabss.c' || echo '$(srcdir)/'`dabss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-dabss.Tpo $(DEPDIR)/libAbs_la-dabss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dabss.c' object='libAbs_la-dabss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-dabss.lo `test -f 'dabss.c' || echo '$(srcdir)/'`dabss.c + +libAbs_la-cabss.lo: cabss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-cabss.lo -MD -MP -MF $(DEPDIR)/libAbs_la-cabss.Tpo -c -o libAbs_la-cabss.lo `test -f 'cabss.c' || echo '$(srcdir)/'`cabss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-cabss.Tpo $(DEPDIR)/libAbs_la-cabss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cabss.c' object='libAbs_la-cabss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-cabss.lo `test -f 'cabss.c' || echo '$(srcdir)/'`cabss.c + +libAbs_la-zabss.lo: zabss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-zabss.lo -MD -MP -MF $(DEPDIR)/libAbs_la-zabss.Tpo -c -o libAbs_la-zabss.lo `test -f 'zabss.c' || echo '$(srcdir)/'`zabss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-zabss.Tpo $(DEPDIR)/libAbs_la-zabss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zabss.c' object='libAbs_la-zabss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-zabss.lo `test -f 'zabss.c' || echo '$(srcdir)/'`zabss.c + +libAbs_la-sabsa.lo: sabsa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-sabsa.lo -MD -MP -MF $(DEPDIR)/libAbs_la-sabsa.Tpo -c -o libAbs_la-sabsa.lo `test -f 'sabsa.c' || echo '$(srcdir)/'`sabsa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-sabsa.Tpo $(DEPDIR)/libAbs_la-sabsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sabsa.c' object='libAbs_la-sabsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-sabsa.lo `test -f 'sabsa.c' || echo '$(srcdir)/'`sabsa.c + +libAbs_la-dabsa.lo: dabsa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-dabsa.lo -MD -MP -MF $(DEPDIR)/libAbs_la-dabsa.Tpo -c -o libAbs_la-dabsa.lo `test -f 'dabsa.c' || echo '$(srcdir)/'`dabsa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-dabsa.Tpo $(DEPDIR)/libAbs_la-dabsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dabsa.c' object='libAbs_la-dabsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-dabsa.lo `test -f 'dabsa.c' || echo '$(srcdir)/'`dabsa.c + +libAbs_la-cabsa.lo: cabsa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-cabsa.lo -MD -MP -MF $(DEPDIR)/libAbs_la-cabsa.Tpo -c -o libAbs_la-cabsa.lo `test -f 'cabsa.c' || echo '$(srcdir)/'`cabsa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-cabsa.Tpo $(DEPDIR)/libAbs_la-cabsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cabsa.c' object='libAbs_la-cabsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-cabsa.lo `test -f 'cabsa.c' || echo '$(srcdir)/'`cabsa.c + +libAbs_la-zabsa.lo: zabsa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -MT libAbs_la-zabsa.lo -MD -MP -MF $(DEPDIR)/libAbs_la-zabsa.Tpo -c -o libAbs_la-zabsa.lo `test -f 'zabsa.c' || echo '$(srcdir)/'`zabsa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAbs_la-zabsa.Tpo $(DEPDIR)/libAbs_la-zabsa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zabsa.c' object='libAbs_la-zabsa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAbs_la_CFLAGS) $(CFLAGS) -c -o libAbs_la-zabsa.lo `test -f 'zabsa.c' || echo '$(srcdir)/'`zabsa.c + +testDoubleAbs-testDoubleAbs.o: testDoubleAbs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAbs_CFLAGS) $(CFLAGS) -MT testDoubleAbs-testDoubleAbs.o -MD -MP -MF $(DEPDIR)/testDoubleAbs-testDoubleAbs.Tpo -c -o testDoubleAbs-testDoubleAbs.o `test -f 'testDoubleAbs.c' || echo '$(srcdir)/'`testDoubleAbs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAbs-testDoubleAbs.Tpo $(DEPDIR)/testDoubleAbs-testDoubleAbs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAbs.c' object='testDoubleAbs-testDoubleAbs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAbs_CFLAGS) $(CFLAGS) -c -o testDoubleAbs-testDoubleAbs.o `test -f 'testDoubleAbs.c' || echo '$(srcdir)/'`testDoubleAbs.c + +testDoubleAbs-testDoubleAbs.obj: testDoubleAbs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAbs_CFLAGS) $(CFLAGS) -MT testDoubleAbs-testDoubleAbs.obj -MD -MP -MF $(DEPDIR)/testDoubleAbs-testDoubleAbs.Tpo -c -o testDoubleAbs-testDoubleAbs.obj `if test -f 'testDoubleAbs.c'; then $(CYGPATH_W) 'testDoubleAbs.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAbs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAbs-testDoubleAbs.Tpo $(DEPDIR)/testDoubleAbs-testDoubleAbs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAbs.c' object='testDoubleAbs-testDoubleAbs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAbs_CFLAGS) $(CFLAGS) -c -o testDoubleAbs-testDoubleAbs.obj `if test -f 'testDoubleAbs.c'; then $(CYGPATH_W) 'testDoubleAbs.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAbs.c'; fi` + +testFloatAbs-testFloatAbs.o: testFloatAbs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAbs_CFLAGS) $(CFLAGS) -MT testFloatAbs-testFloatAbs.o -MD -MP -MF $(DEPDIR)/testFloatAbs-testFloatAbs.Tpo -c -o testFloatAbs-testFloatAbs.o `test -f 'testFloatAbs.c' || echo '$(srcdir)/'`testFloatAbs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAbs-testFloatAbs.Tpo $(DEPDIR)/testFloatAbs-testFloatAbs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAbs.c' object='testFloatAbs-testFloatAbs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAbs_CFLAGS) $(CFLAGS) -c -o testFloatAbs-testFloatAbs.o `test -f 'testFloatAbs.c' || echo '$(srcdir)/'`testFloatAbs.c + +testFloatAbs-testFloatAbs.obj: testFloatAbs.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAbs_CFLAGS) $(CFLAGS) -MT testFloatAbs-testFloatAbs.obj -MD -MP -MF $(DEPDIR)/testFloatAbs-testFloatAbs.Tpo -c -o testFloatAbs-testFloatAbs.obj `if test -f 'testFloatAbs.c'; then $(CYGPATH_W) 'testFloatAbs.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAbs.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAbs-testFloatAbs.Tpo $(DEPDIR)/testFloatAbs-testFloatAbs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAbs.c' object='testFloatAbs-testFloatAbs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAbs_CFLAGS) $(CFLAGS) -c -o testFloatAbs-testFloatAbs.obj `if test -f 'testFloatAbs.c'; then $(CYGPATH_W) 'testFloatAbs.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAbs.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/cabsa.c b/2.3-1/src/c/auxiliaryFunctions/abs/cabsa.c new file mode 100644 index 00000000..cacf4273 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/cabsa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +void cabsa(floatComplex *in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = cabss(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/cabss.c b/2.3-1/src/c/auxiliaryFunctions/abs/cabss.c new file mode 100644 index 00000000..8cd766df --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/cabss.c @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "abs.h" +#include "sqrt.h" +#include "max.h" +#include "min.h" + +float cabss(floatComplex in) { + float real = sabss(creals(in)); + float imag = sabss(cimags(in)); + float zMax = max(real, imag); + float zMin = min(real, imag); + + if(zMin == 0) + { + return zMax; + } + return zMax * (ssqrts(1 + (zMin / zMax) * (zMin / zMax))); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/dabsa.c b/2.3-1/src/c/auxiliaryFunctions/abs/dabsa.c new file mode 100644 index 00000000..edff9910 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/dabsa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +void dabsa(double *in, int size, double* out){ + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = dabss(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/dabss.c b/2.3-1/src/c/auxiliaryFunctions/abs/dabss.c new file mode 100644 index 00000000..5be86cd1 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/dabss.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +double dabss(double num) { + if (num >= 0) { + return num; + } + return -num; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/sabsa.c b/2.3-1/src/c/auxiliaryFunctions/abs/sabsa.c new file mode 100644 index 00000000..406afc59 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/sabsa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +void sabsa(float *in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = sabss(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/sabss.c b/2.3-1/src/c/auxiliaryFunctions/abs/sabss.c new file mode 100644 index 00000000..802951e6 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/sabss.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +float sabss(float num) { + if (num >= 0) { + return num; + } + return -num; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/testAbs.h b/2.3-1/src/c/auxiliaryFunctions/abs/testAbs.h new file mode 100644 index 00000000..c334f678 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/testAbs.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTABS_H_ +#define _TESTABS_H_ + +#include +#include + +#include "abs.h" + +int sabssTest(void); + +int dabssTest(void); + +int cabssTest(void); + +int zabssTest(void); + +int sabsaTest(void); + +int dabsaTest(void); + +int cabsaTest(void); + +int zabsaTest(void); + +int testAbs(void); + +#endif /* ! _TESTABS_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/testDoubleAbs.c b/2.3-1/src/c/auxiliaryFunctions/abs/testDoubleAbs.c new file mode 100644 index 00000000..c096692e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/testDoubleAbs.c @@ -0,0 +1,93 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAbs.h" + +int dabssTest() { + double value1 = -123456.789; + double value2 = 987654.321; + printf(">> Doubles \n"); + assert(dabss(value1) == -value1); + assert(dabss(value2) == value2); + assert(dabss(0) == 0); + assert(dabss(-1) == 1); + assert(dabss(1) == 1); + return 0; +} + +int zabssTest() { + doubleComplex value1 = DoubleComplex(4,3); + printf(">> Double Complex \n"); + assert(zabss(value1) == 5); + return 0; +} + +int dabsaTest() { + double value1 = -123456.789; + double value2 = 987654.321; + double value3 = 0; + double in[3]; + double out[3]; + + in[0] = value1; + in[1] = value2; + in[2] = value3; + + printf(">> Doubles Array\n"); + dabsa(in, 3, out); + assert(out[0] == -value1); + assert(out[1] == value2); + assert(out[2] == value3); + assert(out[2] == 0); + return 0; +} + +int zabsaTest() { + doubleComplex in[4]; + double out[4]; + + in[0] = DoubleComplex(4,3); + in[1] = DoubleComplex(-4,3); + in[2] = DoubleComplex(4,-3); + in[3] = DoubleComplex(-4,-3); + + printf(">> Double Complex Array\n"); + zabsa(in, 4, out); + assert(out[0] == 5); + assert(out[1] == 5); + assert(out[2] == 5); + assert(out[3] == 5); + return 0; +} + +int testAbs() { + int dabssStatus = 0; + int zabssStatus = 0; + int dabsaStatus = 0; + int zabsaStatus = 0; + + printf(">>>> Abs Tests\n"); + dabssStatus = dabssTest(); + zabssStatus = zabssTest(); + dabsaStatus = dabsaTest(); + zabsaStatus = zabsaTest(); + + return (dabssStatus + + zabssStatus+ + dabsaStatus + + zabsaStatus); +} + +int main(void) { + assert(testAbs() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/testFloatAbs.c b/2.3-1/src/c/auxiliaryFunctions/abs/testFloatAbs.c new file mode 100644 index 00000000..93bbba63 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/testFloatAbs.c @@ -0,0 +1,93 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAbs.h" + +int sabssTest() { + float value1 = -123456.789f; + float value2 = 987654.321f; + printf(">> Floats \n"); + assert(sabss(value1) == -value1); + assert(sabss(value2) == value2); + assert(sabss(0) == 0); + assert(sabss(-1) == 1); + assert(sabss(1) == 1); + return 0; +} + +int cabssTest() { + floatComplex value1 = FloatComplex(4.0f,3.0f); + printf(">> Float Complex \n"); + assert(cabss(value1) == 5.0f); + return 0; +} + +int sabsaTest() { + float value1 = -123456.789f; + float value2 = 987654.321f; + float value3 = 0.0f; + float in[3]; + float out[3]; + + in[0] = value1; + in[1] = value2; + in[2] = value3; + + printf(">> Floats Array\n"); + sabsa(in, 3, out); + assert(out[0] == -value1); + assert(out[1] == value2); + assert(out[2] == value3); + assert(out[2] == 0.0f); + return 0; +} + +int cabsaTest() { + floatComplex in[4]; + float out[4]; + + in[0] = FloatComplex(4.0f,3.0f); + in[1] = FloatComplex(-4.0f,3.0f); + in[2] = FloatComplex(4.0f,-3.0f); + in[3] = FloatComplex(-4.0f,-3.0f); + + printf(">> Float Complex Array\n"); + cabsa(in, 4, out); + assert(out[0] == 5.0f); + assert(out[1] == 5.0f); + assert(out[2] == 5.0f); + assert(out[3] == 5.0f); + return 0; +} + +int testAbs() { + int sabssStatus = 0; + int cabssStatus = 0; + int sabsaStatus = 0; + int cabsaStatus = 0; + + printf(">>>> Float Abs Tests\n"); + sabssStatus = sabssTest(); + cabssStatus = cabssTest(); + sabsaStatus = sabsaTest(); + cabsaStatus = cabsaTest(); + + return (sabssStatus + + cabssStatus + + sabsaStatus + + cabsaStatus); +} + +int main(void) { + assert(testAbs() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj b/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj new file mode 100644 index 00000000..da75e942 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5A8D4B59-AC5D-4BA0-A26F-17E740F35042} + testDoubleAbs + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj.filters new file mode 100644 index 00000000..c16bb7b5 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/test_DoubleAbs/testDoubleAbs.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj b/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj new file mode 100644 index 00000000..a8e1fdc3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4B5A02A3-C3EF-4A5C-B5A8-7264697D42B6} + testFloatAbs + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj.filters new file mode 100644 index 00000000..5c85e70f --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/test_FloatAbs/testFloatAbs.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/zabsa.c b/2.3-1/src/c/auxiliaryFunctions/abs/zabsa.c new file mode 100644 index 00000000..2b73432e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/zabsa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "abs.h" + +void zabsa(doubleComplex *in, int size, double* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = zabss(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/abs/zabss.c b/2.3-1/src/c/auxiliaryFunctions/abs/zabss.c new file mode 100644 index 00000000..4e7b4dd3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/abs/zabss.c @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include + +#include "abs.h" +#include "sqrt.h" +#include "max.h" +#include "min.h" + +double zabss(doubleComplex in) { + double real = dabss(zreals(in)); + double imag = dabss(zimags(in)); + double zMax = max(real, imag); + double zMin = min(real, imag); + + if(zMin == 0) + { + return zMax; + } + return zMax * (dsqrts(1 + (zMin / zMax) * (zMin / zMax))); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj b/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj new file mode 100644 index 00000000..d152ba26 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj @@ -0,0 +1,507 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AF4A8AF2-CC9F-4991-BE6E-8AAF9CB5BFC9} + auxiliaryFunctions + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../type;../includes;../operations/includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;AUXILIARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../type;../includes;../operations/includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;AUXILIARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../type;../includes;../operations/includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;AUXILIARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../type;../includes;../operations/includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;AUXILIARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj.filters new file mode 100644 index 00000000..f84550bc --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/auxiliaryFunctions.vcxproj.filters @@ -0,0 +1,284 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {a20f4024-42d0-43f3-9f83-a9719b14699c} + + + {a0b76aea-8f6d-4671-8f84-096e86ab5d0b} + + + {0be62708-24dc-4ee0-b2c0-4cb62191c396} + + + {b0d1ea94-0f26-46cf-b3e8-d44f6833dc2d} + + + {b900d815-afa8-48e9-92c0-e1b53277942f} + + + {5901078e-0d30-4157-9789-03e80e3e277b} + + + {5332579b-316d-4830-9de8-bd72d0d56511} + + + {39e0071f-0a03-4686-b2c2-da5ed82db0df} + + + {bdd2dc71-9612-4b61-9a60-c598c3f03b85} + + + {f6035d57-7c08-48fb-bc55-e7c55c165edd} + + + {ea170338-a2c4-4dd6-aedb-998de767fedd} + + + {52b3f0d4-6f15-4e0e-90b7-3c3b0b42157e} + + + {f1a35ccf-dacf-497e-bd3d-c88534e42095} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\abs + + + Source Files\conj + + + Source Files\conj + + + Source Files\conj + + + Source Files\conj + + + Source Files\find + + + Source Files\find + + + Source Files\find + + + Source Files\find + + + Source Files\find2d + + + Source Files\find2d + + + Source Files\find2d + + + Source Files\find2d + + + Source Files\frexp + + + Source Files\frexp + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\isnan + + + Source Files\pythag + + + Source Files\pythag + + + Source Files\pythag + + + Source Files\pythag + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\rand + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + Source Files\sign + + + + + Source Files\abs + + + Source Files\conj + + + Source Files\find + + + Source Files\find2d + + + Source Files\frexp + + + Source Files\isnan + + + Source Files\pythag + + + Source Files\rand + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.am new file mode 100644 index 00000000..e9c9bc98 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.am @@ -0,0 +1,44 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libConj_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libConj.la + +HEAD = ../includes/conj.h + +libConj_la_SOURCES = $(HEAD) \ + cconja.c \ + zconja.c \ + zconjs.c \ + cconjs.c + +check_PROGRAMS = testConj + +check_LDADD = libConj.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la + + + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I ../includes + +testConj_SOURCES = testConj.c +testConj_LDADD = $(check_LDADD) +testConj_CFLAGS = $(check_INCLUDES) + +TESTS = testConj diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.in new file mode 100644 index 00000000..a3477788 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/Makefile.in @@ -0,0 +1,710 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testConj$(EXEEXT) +TESTS = testConj$(EXEEXT) +subdir = src/c/auxiliaryFunctions/conj +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libConj_la_LIBADD = +am__objects_1 = +am_libConj_la_OBJECTS = $(am__objects_1) libConj_la-cconja.lo \ + libConj_la-zconja.lo libConj_la-zconjs.lo libConj_la-cconjs.lo +libConj_la_OBJECTS = $(am_libConj_la_OBJECTS) +libConj_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libConj_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testConj_OBJECTS = testConj-testConj.$(OBJEXT) +testConj_OBJECTS = $(am_testConj_OBJECTS) +testConj_DEPENDENCIES = $(check_LDADD) +testConj_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testConj_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libConj_la_SOURCES) $(testConj_SOURCES) +DIST_SOURCES = $(libConj_la_SOURCES) $(testConj_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libConj_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libConj.la +HEAD = ../includes/conj.h +libConj_la_SOURCES = $(HEAD) \ + cconja.c \ + zconja.c \ + zconjs.c \ + cconjs.c + +check_LDADD = libConj.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I ../includes + +testConj_SOURCES = testConj.c +testConj_LDADD = $(check_LDADD) +testConj_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/conj/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/conj/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libConj.la: $(libConj_la_OBJECTS) $(libConj_la_DEPENDENCIES) + $(libConj_la_LINK) -rpath $(pkglibdir) $(libConj_la_OBJECTS) $(libConj_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testConj$(EXEEXT): $(testConj_OBJECTS) $(testConj_DEPENDENCIES) + @rm -f testConj$(EXEEXT) + $(testConj_LINK) $(testConj_OBJECTS) $(testConj_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConj_la-cconja.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConj_la-cconjs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConj_la-zconja.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConj_la-zconjs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testConj-testConj.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libConj_la-cconja.lo: cconja.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -MT libConj_la-cconja.lo -MD -MP -MF $(DEPDIR)/libConj_la-cconja.Tpo -c -o libConj_la-cconja.lo `test -f 'cconja.c' || echo '$(srcdir)/'`cconja.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConj_la-cconja.Tpo $(DEPDIR)/libConj_la-cconja.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cconja.c' object='libConj_la-cconja.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -c -o libConj_la-cconja.lo `test -f 'cconja.c' || echo '$(srcdir)/'`cconja.c + +libConj_la-zconja.lo: zconja.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -MT libConj_la-zconja.lo -MD -MP -MF $(DEPDIR)/libConj_la-zconja.Tpo -c -o libConj_la-zconja.lo `test -f 'zconja.c' || echo '$(srcdir)/'`zconja.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConj_la-zconja.Tpo $(DEPDIR)/libConj_la-zconja.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zconja.c' object='libConj_la-zconja.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -c -o libConj_la-zconja.lo `test -f 'zconja.c' || echo '$(srcdir)/'`zconja.c + +libConj_la-zconjs.lo: zconjs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -MT libConj_la-zconjs.lo -MD -MP -MF $(DEPDIR)/libConj_la-zconjs.Tpo -c -o libConj_la-zconjs.lo `test -f 'zconjs.c' || echo '$(srcdir)/'`zconjs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConj_la-zconjs.Tpo $(DEPDIR)/libConj_la-zconjs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zconjs.c' object='libConj_la-zconjs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -c -o libConj_la-zconjs.lo `test -f 'zconjs.c' || echo '$(srcdir)/'`zconjs.c + +libConj_la-cconjs.lo: cconjs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -MT libConj_la-cconjs.lo -MD -MP -MF $(DEPDIR)/libConj_la-cconjs.Tpo -c -o libConj_la-cconjs.lo `test -f 'cconjs.c' || echo '$(srcdir)/'`cconjs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConj_la-cconjs.Tpo $(DEPDIR)/libConj_la-cconjs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cconjs.c' object='libConj_la-cconjs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConj_la_CFLAGS) $(CFLAGS) -c -o libConj_la-cconjs.lo `test -f 'cconjs.c' || echo '$(srcdir)/'`cconjs.c + +testConj-testConj.o: testConj.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testConj_CFLAGS) $(CFLAGS) -MT testConj-testConj.o -MD -MP -MF $(DEPDIR)/testConj-testConj.Tpo -c -o testConj-testConj.o `test -f 'testConj.c' || echo '$(srcdir)/'`testConj.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testConj-testConj.Tpo $(DEPDIR)/testConj-testConj.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testConj.c' object='testConj-testConj.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testConj_CFLAGS) $(CFLAGS) -c -o testConj-testConj.o `test -f 'testConj.c' || echo '$(srcdir)/'`testConj.c + +testConj-testConj.obj: testConj.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testConj_CFLAGS) $(CFLAGS) -MT testConj-testConj.obj -MD -MP -MF $(DEPDIR)/testConj-testConj.Tpo -c -o testConj-testConj.obj `if test -f 'testConj.c'; then $(CYGPATH_W) 'testConj.c'; else $(CYGPATH_W) '$(srcdir)/testConj.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testConj-testConj.Tpo $(DEPDIR)/testConj-testConj.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testConj.c' object='testConj-testConj.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testConj_CFLAGS) $(CFLAGS) -c -o testConj-testConj.obj `if test -f 'testConj.c'; then $(CYGPATH_W) 'testConj.c'; else $(CYGPATH_W) '$(srcdir)/testConj.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/cconja.c b/2.3-1/src/c/auxiliaryFunctions/conj/cconja.c new file mode 100644 index 00000000..a975f4cf --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/cconja.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conj.h" + +void cconja ( floatComplex* in , int size, floatComplex* out ){ + + int i = 0 ; + + for ( i =0 ; i < size ; i++ ) + out[i] = cconjs ( in[i]); + +} diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/cconjs.c b/2.3-1/src/c/auxiliaryFunctions/conj/cconjs.c new file mode 100644 index 00000000..c6aed15b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/cconjs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conj.h" + +floatComplex cconjs ( floatComplex in ) +{ + return FloatComplex ( creals ( in ) ,- cimags( in )); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/testConj.c b/2.3-1/src/c/auxiliaryFunctions/conj/testConj.c new file mode 100644 index 00000000..bdb443fc --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/testConj.c @@ -0,0 +1,139 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conj.h" +#include +#include +#include +#define SIZE 100 +#define FMATRIX {0.0373321f,0.4293466f,0.3157233f,0.3682477f,0.1458774f,0.6768379f,0.5261979f,0.4003626f,\ +0.0029108f,0.3068181f,0.7902694f,0.9577950f,0.6689271f,0.2929616f,0.8223899f,0.0179846f,\ +0.8710701f,0.3181024f,0.5724473f,0.5738658f,0.3492018f,0.7067298f,0.3599201f,0.4052311f,\ +0.6140811f,0.6524047f,0.0295171f,0.5668896f,0.7114017f,0.4588491f,0.4720517f,0.0623731f,\ +0.0854401f,0.0134564f,0.3543002f,0.6719395f,0.1360619f,0.2119744f,0.4015942f,0.4036219f,\ +0.5628382f,0.5531093f,0.0768984f,0.5360758f,0.0900212f,0.6218026f,0.0001215f,0.7219727f,\ +0.6661293f,0.6799288f,0.9514125f,0.1206901f,0.7318910f,0.0831662f,0.8021909f,0.0290492f,\ +0.6502991f,0.7427882f,0.2176611f,0.9788486f,0.8925237f,0.3511275f,0.4745619f,0.7699462f,\ +0.0734342f,0.5894619f,0.2378993f,0.4076361f,0.4304818f,0.0370717f,0.6404148f,0.4130743f,\ +0.8396902f,0.0002195f,0.5085374f,0.4754997f,0.9625065f,0.9798011f,0.0785698f,0.9150032f,\ +0.6172610f,0.9964195f,0.0468599f,0.9245926f,0.9689865f,0.4916290f,0.2977053f,0.0603055f,\ +0.6313472f,0.0241030f,0.1527438f,0.9481178f,0.2744266f,0.4794727f,0.4855768f,0.6764004f,\ +0.8321250f,0.0125876f,0.5453780f,0.8426717f} +#define DMATRIX {0.70964269945397973061,0.6610225578770041465759,0.7252350724302232265472,\ +0.510143497958779335022,0.2824866441078484058380,0.2214915128424763679504,\ +0.5767575385980308055878,0.7048253491520881652832,0.5607945644296705722809,\ +0.3628880484029650688171,0.3088326244615018367767,0.9813414867967367172241,\ +0.7428482254035770893097,0.1616391474381089210510,0.3652521963231265544891,\ +0.3835070468485355377197,0.1169181005097925662994,0.8911246126517653465271,\ +0.0634272000752389431000,0.6263941843062639236450,0.6807702076621353626251,\ +0.2588596837595105171204,0.4394804346375167369843,0.8598818778991699218750,\ +0.5482823201455175876617,0.8135995296761393547058,0.4898237003944814205170,\ +0.0240026097744703292847,0.7369195525534451007843,0.2411156157031655311584,\ +0.1529693226329982280731,0.2648359201848506927490,0.4298193217255175113678,\ +0.7673939457163214683533,0.8753260499797761440277,0.3796988371759653091431,\ +0.3062356826849281787872,0.3880051793530583381653,0.1047293278388679027557,\ +0.7603831812739372253418,0.0340930395759642124176,0.1423966242000460624695,\ +0.5554559468291699886322,0.8031897451728582382202,0.5183992316015064716339,\ +0.1518561029806733131409,0.5884730662219226360321,0.2545093484222888946533,\ +0.9992679939605295658112,0.6398976957425475120544,0.5506716123782098293304,\ +0.4607007671147584915161,0.5933007937856018543243,0.6538193570449948310852,\ +0.4168340521864593029022,0.9910155385732650756836,0.3720780410803854465485,\ +0.7061824081465601921082,0.5780865414999425411224,0.602319641038775444031,\ +0.5715096746571362018585,0.0549629041925072669983,0.1205854485742747784,\ +0.0143620483577251434326,0.0257951230742037296295,0.8411248764023184776306,\ +0.4381882525049149990082,0.4643401596695184707642,0.4197426405735313892365,\ +0.8023654492571949958801,0.5228588166646659374237,0.5095121040940284729004,\ +0.4531980180181562900543,0.7817818326875567436218,0.776557037141174077988,\ +0.0466059204190969467163,0.5113326688297092914581,0.7502101892605423927307,\ +0.6883628661744296550751,0.0167756117880344390869,0.9345410899259150028229,\ +0.5609863763675093650818,0.2205847105942666530609,0.7648540753871202468872,\ +0.4816976976580917835236,0.1558785634115338325500,0.2476022052578628063202,\ +0.5216529071331024169922,0.0805230387486517429352,0.4409417239949107170105,\ +0.8911933614872395992279,0.9780590813606977462769,0.4588093762286007404327,\ +0.5510440031066536903381,0.0960960905067622661591,0.4196785055100917816162,\ +0.7502556503750383853912,0.7218149593099951744080,0.2895541018806397914886,\ +0.3907764498144388198853} + + +static void cconjsTest ( void ) +{ + float realin = 0.126244857f; + float imagin = -0.47864959f; + floatComplex in = FloatComplex ( realin , imagin ); + + assert ( fabs ( creals ( in ) - realin ) / fabs( creals (in)) < 1e-06 ); + assert ( fabs ( cimags ( in ) - imagin ) / fabs( cimags (in)) < 1e-06 ); +} + + +static void cconjaTest ( void ) +{ + int i = 0 ; + float tin [] = FMATRIX ; + floatComplex* in = FloatComplexMatrix ( tin , tin , SIZE ); + floatComplex out[100] ; + + cconja ( in , SIZE , out ) ; + + for ( i = 0 ; i < SIZE ; i++ ) + { + assert ( fabs ( creals ( in[i] ) - tin[i] ) / fabs( creals (in[i])) < 1e-06 ); + assert ( fabs ( cimags ( in[i] ) - tin[i] ) / fabs( cimags (in[i])) < 1e-06 ); + } + +} + +static void zconjsTest ( void ) +{ + double realin = 0.126244857788445; + double imagin = -0.47864959451267; + doubleComplex in = DoubleComplex ( realin , imagin ); + + assert ( fabs ( zreals ( in ) - realin ) / fabs( zreals (in)) < 1e-16 ); + assert ( fabs ( zimags ( in ) - imagin ) / fabs( zimags (in)) < 1e-16 ); +} + +static void zconjaTest ( void ) +{ + int i = 0 ; + double tin [] = DMATRIX ; + doubleComplex* in = DoubleComplexMatrix ( tin , tin , SIZE ); + doubleComplex out[100] ; + + zconja ( in , SIZE , out ) ; + + for ( i = 0 ; i < SIZE ; i++ ) + { + assert ( fabs ( zreals ( in[i] ) - tin[i] ) / fabs( zreals (in[i])) < 1e-16 ); + assert ( fabs ( zimags ( in[i] ) - tin[i] ) / fabs( zimags (in[i])) < 1e-16 ); + } + +} + +static int testConj (void) { + + printf("\n>>>> Float a Tests\n"); + cconjsTest(); + cconjaTest(); +printf("\t>>>> Double a Tests\n"); + zconjsTest(); + zconjaTest(); + + + return 0; +} + + +int main(void) { + assert(testConj() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj b/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj new file mode 100644 index 00000000..2a287102 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CD5DB834-234F-40A3-B551-DC895885E7B1} + testConj + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj.filters new file mode 100644 index 00000000..f084f6fe --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/test_Conj/testConj.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/zconja.c b/2.3-1/src/c/auxiliaryFunctions/conj/zconja.c new file mode 100644 index 00000000..2c939f72 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/zconja.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conj.h" + +void zconja ( doubleComplex* in , int size, doubleComplex* out ){ + + int i = 0 ; + + for ( i =0 ; i < size ; i++ ) + out[i] = zconjs ( in[i]); + +} diff --git a/2.3-1/src/c/auxiliaryFunctions/conj/zconjs.c b/2.3-1/src/c/auxiliaryFunctions/conj/zconjs.c new file mode 100644 index 00000000..b98f46d3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/conj/zconjs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conj.h" + +doubleComplex zconjs ( doubleComplex in ) +{ + return DoubleComplex ( zreals ( in ) ,- zimags( in )); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/find/Makefile.am new file mode 100644 index 00000000..622cc20b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/Makefile.am @@ -0,0 +1,49 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +AM_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFind.la + +libFind_la_SOURCES = $(HEAD) $(SRC) + +SRC = sfinda.c \ + dfinda.c \ + cfinda.c \ + zfinda.c + +HEAD = ../includes/find.h \ + ../../includes/notFound.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testFind + +TESTS = testFind + +# +# -*- Find Tests -*- +# +testFind_SOURCES = testFind.h testFind.c +testFind_CFLAGS = $(check_INCLUDES) +testFind_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find/libFind.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/find/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/find/Makefile.in new file mode 100644 index 00000000..09820585 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/Makefile.in @@ -0,0 +1,691 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFind$(EXEEXT) +TESTS = testFind$(EXEEXT) +subdir = src/c/auxiliaryFunctions/find +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFind_la_LIBADD = +am__objects_1 = +am__objects_2 = sfinda.lo dfinda.lo cfinda.lo zfinda.lo +am_libFind_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libFind_la_OBJECTS = $(am_libFind_la_OBJECTS) +am_testFind_OBJECTS = testFind-testFind.$(OBJEXT) +testFind_OBJECTS = $(am_testFind_OBJECTS) +testFind_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find/libFind.la +testFind_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testFind_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFind_la_SOURCES) $(testFind_SOURCES) +DIST_SOURCES = $(libFind_la_SOURCES) $(testFind_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFind.la +libFind_la_SOURCES = $(HEAD) $(SRC) +SRC = sfinda.c \ + dfinda.c \ + cfinda.c \ + zfinda.c + +HEAD = ../includes/find.h \ + ../../includes/notFound.h + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Find Tests -*- +# +testFind_SOURCES = testFind.h testFind.c +testFind_CFLAGS = $(check_INCLUDES) +testFind_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find/libFind.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/find/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/find/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFind.la: $(libFind_la_OBJECTS) $(libFind_la_DEPENDENCIES) + $(LINK) -rpath $(pkglibdir) $(libFind_la_OBJECTS) $(libFind_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testFind$(EXEEXT): $(testFind_OBJECTS) $(testFind_DEPENDENCIES) + @rm -f testFind$(EXEEXT) + $(testFind_LINK) $(testFind_OBJECTS) $(testFind_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfinda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfinda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfinda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFind-testFind.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfinda.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +testFind-testFind.o: testFind.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind_CFLAGS) $(CFLAGS) -MT testFind-testFind.o -MD -MP -MF $(DEPDIR)/testFind-testFind.Tpo -c -o testFind-testFind.o `test -f 'testFind.c' || echo '$(srcdir)/'`testFind.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFind-testFind.Tpo $(DEPDIR)/testFind-testFind.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFind.c' object='testFind-testFind.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind_CFLAGS) $(CFLAGS) -c -o testFind-testFind.o `test -f 'testFind.c' || echo '$(srcdir)/'`testFind.c + +testFind-testFind.obj: testFind.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind_CFLAGS) $(CFLAGS) -MT testFind-testFind.obj -MD -MP -MF $(DEPDIR)/testFind-testFind.Tpo -c -o testFind-testFind.obj `if test -f 'testFind.c'; then $(CYGPATH_W) 'testFind.c'; else $(CYGPATH_W) '$(srcdir)/testFind.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFind-testFind.Tpo $(DEPDIR)/testFind-testFind.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFind.c' object='testFind-testFind.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind_CFLAGS) $(CFLAGS) -c -o testFind-testFind.obj `if test -f 'testFind.c'; then $(CYGPATH_W) 'testFind.c'; else $(CYGPATH_W) '$(srcdir)/testFind.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/find/cfinda.c b/2.3-1/src/c/auxiliaryFunctions/find/cfinda.c new file mode 100644 index 00000000..54374903 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/cfinda.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find.h" + +void cfinda(floatComplex* z, int size, float *out, int max) +{ + int i = 0; + int j = 0; + + /* if out is empty */ + out[0]=-1; + + for (i = 0; i < size ; ++i) + { + /*to avoid useless search if we only want to find the max first founded value */ + if (j == max) + { + return ; + } + + if (creals(z[i]) != 0 || cimags(z[i]) != 0) + { + out[j] = (float)(i+1); + ++j; + } + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find/dfinda.c b/2.3-1/src/c/auxiliaryFunctions/find/dfinda.c new file mode 100644 index 00000000..ac223ae2 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/dfinda.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "find.h" + +void dfinda(double* x, int size, double *out, int max) +{ + int i = 0; + int j = 0; + + /* if out is empty */ + out[0]=-1; + + + for (i = 0; i < size ; ++i) + { + /*to avoid useless search if we only want to find the max first founded value */ + if (j == max) + { + return ; + } + + if (x[i] != 0) + { + out[j] = (double)(i+1); + ++j; + } + } +} + diff --git a/2.3-1/src/c/auxiliaryFunctions/find/sfinda.c b/2.3-1/src/c/auxiliaryFunctions/find/sfinda.c new file mode 100644 index 00000000..ac445fac --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/sfinda.c @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find.h" + +void sfinda(float* x, int size, float* out, int max) +{ + int i = 0; + int j = 0; + + + /* if out is empty */ + out[0]=-1; + + + for (i = 0; i < size ; ++i) + { + /*to avoid useless search if we only want to find the max first founded value */ + if (j == max ) + { + return ; + } + + if (x[i] != 0) + { + out[j] = (float)(i+1); + ++j; + } + } +} + + diff --git a/2.3-1/src/c/auxiliaryFunctions/find/testFind.c b/2.3-1/src/c/auxiliaryFunctions/find/testFind.c new file mode 100644 index 00000000..298d55b3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/testFind.c @@ -0,0 +1,217 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include "testFind.h" + +int sfindaTest() { + int result = 0, i = 0; + float goodArray[5] = {0.,2.,3.,5.,10.}; + float badArray[5] = {0.,0.,0.,0.,0.}; + float res[4] = {2.,3.,4.,5.}; + float *outGood = NULL, *outBad = NULL; + int indiceOut; + + outGood=(float*)malloc((unsigned int)5*sizeof(float)); + outBad=(float*)malloc((unsigned int)5*sizeof(float)); + + printf(">> Floats \n"); + sfinda(goodArray, 5, outGood, &indiceOut,-1); + sfinda(badArray, 5, outBad, &indiceOut,-1); + + for (i=0;i<4;i++){ + if ( outGood[i] != res[i]) { + printf("ERROR ! : Test Failed (non empty array)\n"); + result = ERROR; + } + else + printf("%f ",outGood[i]); + } + + printf("\n"); + + if (outBad[0]!=-1) { + printf("ERROR ! : Test Failed (empty array)\n"); + result = ERROR; + } + else + printf("%f ",outBad[0]); + + printf("\n"); + free(outBad); + free(outGood); + return result; +} + +int dfindaTest() { + int result = 0, i = 0; + double goodArray[5] = {0.,2.,3.,5.,10.}; + double badArray[5] = {0.,0.,0.,0.,0.}; + double res[4] = {2.,3.,4.,5.}; + double *outGood = NULL, *outBad = NULL; + int indiceOut; + + outGood=(double*)malloc((unsigned int)5*sizeof(double)); + outBad=(double*)malloc((unsigned int)5*sizeof(double)); + + + printf(">> Double \n"); + dfinda(goodArray, 5, outGood, &indiceOut,-1); + dfinda(badArray, 5, outBad, &indiceOut,-1); + + for (i=0;i<4;i++){ + if ( outGood[i] != res[i]) { + printf("ERROR ! : Test Failed (non empty array)\n"); + result = ERROR; + } + else + printf("%f ",outGood[i]); + } + + printf("\n"); + + if (outBad[0]!=-1) { + printf("ERROR ! : Test Failed (empty array)\n"); + result = ERROR; + } + else + printf("%f ",outBad[0]); + + printf("\n"); + free(outBad); + free(outGood); + return result; +} + +int cfindaTest() { + int result = 0, i = 0; + floatComplex goodArray[5]; + floatComplex badArray[5]; + float res[4] = {2.,3.,4.,5.}; + float *outGood = NULL, *outBad = NULL; + int indiceOut; + + outGood=(float*)malloc((unsigned int)5*sizeof(float)); + outBad=(float*)malloc((unsigned int)5*sizeof(float)); + + /* Good values in goodArray */ + goodArray[0] = FloatComplex(0., 0.); + goodArray[1] = FloatComplex(0., 2.); + goodArray[2] = FloatComplex(3., 50.); + goodArray[3] = FloatComplex(5., 10.); + goodArray[4] = FloatComplex(10., -10.); + /* Bad values in badArray */ + badArray[0] = FloatComplex(0., 0.); + badArray[1] = FloatComplex(0., 0.); + badArray[2] = FloatComplex(0., 0.); + badArray[3] = FloatComplex(0., 0.); + badArray[4] = FloatComplex(0., 0.); + + printf(">> Float Complex \n"); + cfinda(goodArray, 5, outGood, &indiceOut,-1); + cfinda(badArray, 5, outBad, &indiceOut,-1); + + for (i=0;i<4;i++){ + if ( outGood[i] != res[i]) { + printf("ERROR ! : Test Failed (non empty array)\n"); + result = ERROR; + } + else + printf("%f ",outGood[i]); + } + + printf("\n"); + + if (outBad[0]!=-1) { + printf("ERROR ! : Test Failed (empty array)\n"); + result = ERROR; + } + else + printf("%f ",outBad[0]); + + printf("\n"); + free(outBad); + free(outGood); + return result; +} + +int zfindaTest() { + int result = 0, i = 0; + doubleComplex goodArray[5]; + doubleComplex badArray[5]; + double res[4] = {2.,3.,4.,5.}; + double *outGood = NULL, *outBad = NULL; + int indiceOut; + + outGood=(double*)malloc((unsigned int)5*sizeof(double)); + outBad=(double*)malloc((unsigned int)5*sizeof(double)); + + + /* Good values in goodArray */ + goodArray[0] = DoubleComplex(0., 0.); + goodArray[1] = DoubleComplex(0., 2.); + goodArray[2] = DoubleComplex(3., 50.); + goodArray[3] = DoubleComplex(5., 10.); + goodArray[4] = DoubleComplex(10., -10.); + /* Bad values in badArray */ + badArray[0] = DoubleComplex(0., 0.); + badArray[1] = DoubleComplex(0., 0.); + badArray[2] = DoubleComplex(0., 0.); + badArray[3] = DoubleComplex(0., 0.); + badArray[4] = DoubleComplex(0., 0.); + + + printf(">> Double Complex \n"); + zfinda(goodArray, 5, outGood, &indiceOut,-1); + zfinda(badArray, 5, outBad, &indiceOut,-1); + + for (i=0;i<4;i++){ + if ( outGood[i] != res[i]) { + printf("ERROR ! : Test Failed (non empty array)\n"); + result = ERROR; + } + else + printf("%f ",outGood[i]); + } + + printf("\n"); + + if (outBad[0]!=-1) { + printf("ERROR ! : Test Failed (empty array)\n"); + result = ERROR; + } + else + printf("%f ",outBad[0]); + + printf("\n"); + free(outBad); + free(outGood); + return result; +} + +int testFind() { + int sfindaStatus, dfindaStatus = 0; + int cfindaStatus, zfindaStatus = 0; + + printf(">>>> Find Tests\n"); + sfindaStatus = sfindaTest(); + dfindaStatus = dfindaTest(); + cfindaStatus = cfindaTest(); + zfindaStatus = zfindaTest(); + + return (sfindaStatus + dfindaStatus + + cfindaStatus + zfindaStatus); +} + +int main(void) { + assert(testFind() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find/testFind.h b/2.3-1/src/c/auxiliaryFunctions/find/testFind.h new file mode 100644 index 00000000..1b257e79 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/testFind.h @@ -0,0 +1,42 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTFIND_H_ +#define _TESTFIND_H_ + +#include +#include + +#include "find.h" +#include "notFound.h" + +#define ERROR 42 + +int sfindsTest(void); + +int dfindsTest(void); + +int cfindsTest(void); + +int zfindsTest(void); + +int sfindaTest(void); + +int dfindaTest(void); + +int cfindaTest(void); + +int zfindaTest(void); + +int testFind(void); + +#endif /* ! _TESTFIND_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj b/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj new file mode 100644 index 00000000..bad1e747 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D5110077-CA24-494B-87D0-451BD124CF70} + testFind + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj.filters new file mode 100644 index 00000000..acd53578 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/test_Find/testFind.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/find/zfinda.c b/2.3-1/src/c/auxiliaryFunctions/find/zfinda.c new file mode 100644 index 00000000..cb6295a3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find/zfinda.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find.h" + +void zfinda(doubleComplex* z, int size, double *out, int max) +{ + int i = 0; + int j = 0; + + /* if out is empty */ + out[0]=-1; + + for (i = 0; i < size ; ++i) + { + /*to avoid useless search if we only want to find the max first founded value */ + if (j == max ) + { + return ; + } + + if (zreals(z[i]) != 0 || zimags(z[i]) != 0) + { + out[j] = (double)(i+1); + ++j; + } + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.am new file mode 100644 index 00000000..c1c2f2ad --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.am @@ -0,0 +1,48 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +AM_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFind2d.la + +libFind2d_la_SOURCES = $(HEAD) $(SRC) + +SRC = sfind2da.c \ + dfind2da.c \ + cfind2da.c \ + zfind2da.c + +HEAD = ../includes/find2d.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testFind2d + +TESTS = testFind2d + +# +# -*- Find2d Tests -*- +# +testFind2d_SOURCES = testFind2d.h testFind2d.c +testFind2d_CFLAGS = $(check_INCLUDES) +testFind2d_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find2d/libFind2d.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.in new file mode 100644 index 00000000..6fb34f73 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/Makefile.in @@ -0,0 +1,689 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFind2d$(EXEEXT) +TESTS = testFind2d$(EXEEXT) +subdir = src/c/auxiliaryFunctions/find2d +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFind2d_la_LIBADD = +am__objects_1 = +am__objects_2 = sfind2da.lo dfind2da.lo cfind2da.lo zfind2da.lo +am_libFind2d_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libFind2d_la_OBJECTS = $(am_libFind2d_la_OBJECTS) +am_testFind2d_OBJECTS = testFind2d-testFind2d.$(OBJEXT) +testFind2d_OBJECTS = $(am_testFind2d_OBJECTS) +testFind2d_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find2d/libFind2d.la +testFind2d_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFind2d_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFind2d_la_SOURCES) $(testFind2d_SOURCES) +DIST_SOURCES = $(libFind2d_la_SOURCES) $(testFind2d_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFind2d.la +libFind2d_la_SOURCES = $(HEAD) $(SRC) +SRC = sfind2da.c \ + dfind2da.c \ + cfind2da.c \ + zfind2da.c + +HEAD = ../includes/find2d.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Find2d Tests -*- +# +testFind2d_SOURCES = testFind2d.h testFind2d.c +testFind2d_CFLAGS = $(check_INCLUDES) +testFind2d_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/find2d/libFind2d.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/find2d/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/find2d/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFind2d.la: $(libFind2d_la_OBJECTS) $(libFind2d_la_DEPENDENCIES) + $(LINK) -rpath $(pkglibdir) $(libFind2d_la_OBJECTS) $(libFind2d_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testFind2d$(EXEEXT): $(testFind2d_OBJECTS) $(testFind2d_DEPENDENCIES) + @rm -f testFind2d$(EXEEXT) + $(testFind2d_LINK) $(testFind2d_OBJECTS) $(testFind2d_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfind2da.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dfind2da.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfind2da.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFind2d-testFind2d.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zfind2da.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +testFind2d-testFind2d.o: testFind2d.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind2d_CFLAGS) $(CFLAGS) -MT testFind2d-testFind2d.o -MD -MP -MF $(DEPDIR)/testFind2d-testFind2d.Tpo -c -o testFind2d-testFind2d.o `test -f 'testFind2d.c' || echo '$(srcdir)/'`testFind2d.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFind2d-testFind2d.Tpo $(DEPDIR)/testFind2d-testFind2d.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFind2d.c' object='testFind2d-testFind2d.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind2d_CFLAGS) $(CFLAGS) -c -o testFind2d-testFind2d.o `test -f 'testFind2d.c' || echo '$(srcdir)/'`testFind2d.c + +testFind2d-testFind2d.obj: testFind2d.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind2d_CFLAGS) $(CFLAGS) -MT testFind2d-testFind2d.obj -MD -MP -MF $(DEPDIR)/testFind2d-testFind2d.Tpo -c -o testFind2d-testFind2d.obj `if test -f 'testFind2d.c'; then $(CYGPATH_W) 'testFind2d.c'; else $(CYGPATH_W) '$(srcdir)/testFind2d.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFind2d-testFind2d.Tpo $(DEPDIR)/testFind2d-testFind2d.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFind2d.c' object='testFind2d-testFind2d.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFind2d_CFLAGS) $(CFLAGS) -c -o testFind2d-testFind2d.obj `if test -f 'testFind2d.c'; then $(CYGPATH_W) 'testFind2d.c'; else $(CYGPATH_W) '$(srcdir)/testFind2d.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/cfind2da.c b/2.3-1/src/c/auxiliaryFunctions/find2d/cfind2da.c new file mode 100644 index 00000000..c2db728b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/cfind2da.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find2d.h" + +void cfind2da(floatComplex* x, int rows, int columns, float* out1,int* indiceOut1, float* out2,int* indiceOut2,int max) { + int i = 0, j=0; + indiceOut1[1] = 0; + + /* if out are empties */ + out1[0]=-1; + out2[0]=-1; + + for (j = 0; j < columns ; ++j){ + for (i = 0; i < rows ; ++i) { + /*to avoid useless search if we only want to find the max first founded value */ + if (indiceOut1[1] == max ) return ; + if ((creals(x[j*rows+i]) != 0) || (cimags(x[j*rows+i])!=0) ) { + + out1[indiceOut1[1]] = (float)(i+1); + out2[indiceOut1[1]] = (float)(j+1); + indiceOut1[1]++; + } + } + } + indiceOut2[1]=indiceOut1[1]; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/dfind2da.c b/2.3-1/src/c/auxiliaryFunctions/find2d/dfind2da.c new file mode 100644 index 00000000..22d4cf55 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/dfind2da.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find2d.h" + +void dfind2da(double* x, int rows, int columns, double* out1, double* out2, int max) { + int i = 0, j=0, k = 0; + + /* if out are empties */ + out1[0]=-1; + out2[0]=-1; + + for (j = 0; j < columns ; ++j) + { + for (i = 0; i < rows ; ++i) + { + /*to avoid useless search if we only want to find the max first founded value */ + if (max == 0) + { + return; + } + + if (x[j*rows+i] != 0) + { + out1[k] = (double)(i+1); + out2[k] = (double)(j+1); + k++; + } + } + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/sfind2da.c b/2.3-1/src/c/auxiliaryFunctions/find2d/sfind2da.c new file mode 100644 index 00000000..fdd74bfc --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/sfind2da.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find2d.h" + +void sfind2da(float* x, int rows, int columns, float* out1,int* indiceOut1, float* out2,int* indiceOut2,int max) { + int i = 0, j=0; + indiceOut1[1] = 0; + + /* if out are empties */ + out1[0]=-1; + out2[0]=-1; + + for (j = 0; j < columns ; ++j){ + for (i = 0; i < rows ; ++i) { + /*to avoid useless search if we only want to find the max first founded value */ + if (indiceOut1[1] == max ) return ; + if (x[j*rows+i] != 0) { + + out1[indiceOut1[1]] = (float)(i+1); + out2[indiceOut1[1]] = (float)(j+1); + indiceOut1[1]++; + } + } + } + indiceOut2[1]=indiceOut1[1]; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.c b/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.c new file mode 100644 index 00000000..1fcfdc9e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.c @@ -0,0 +1,532 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testFind2d.h" +#include + +int sfind2daTest() { + int result = 0, i = 0; + float goodArray[6] = {0.,2.,3.,0.,5.,10.}; + float badArray[6] = {0.,0.,0.,0.,0.,0.}; + float out1_1_6[4] = {1.,1.,1.,1.}; + float out1_2_3[4] = {1.,1.,2.,2.}; + float out1_3_2[4] = {2.,2.,3.,3.}; + float out1_6_1[4] = {2.,3.,5.,6.}; + float out2_1_6[4] = {2.,3.,5.,6.}; + float out2_2_3[4] = {2.,3.,1.,3.}; + float out2_3_2[4] = {1.,2.,1.,2.}; + float out2_6_1[4] = {1.,1.,1.,1.}; + float out1Good[6] = {0}, out1Bad[6] = {0}, out2Good[6] = {0}, out2Bad[6] = {0}; + int size1[2]={0},size2[2]={0}; + printf(">> Floats \n"); + + /* Test tab 1 ligne 6 colonnes */ + sfind2da(goodArray, 1, 6, out1Good, size1, out2Good, size2 , -1); + + + for (i=0;i> Double \n"); + + /* Test tab 1 ligne 6 colonnes */ + dfind2da(goodArray, 1, 6, out1Good, size1, out2Good, size2,-1); + + + for (i=0;i> Float Complex \n"); + + /* Test tab 1 ligne 6 colonnes */ + cfind2da(goodArray, 1, 6, out1Good, size1, out2Good, size2,-1); + + + for (i=0;i> Double Complex \n"); + + /* Test tab 1 ligne 6 colonnes */ + zfind2da(goodArray, 1, 6, out1Good, size1, out2Good, size2,-1); + + + for (i=0;i>>> Find2d Tests\n"); + sfind2daStatus = sfind2daTest(); + dfind2daStatus = dfind2daTest(); + cfind2daStatus = cfind2daTest(); + zfind2daStatus = zfind2daTest(); + + return (sfind2daStatus + dfind2daStatus + + cfind2daStatus + zfind2daStatus); +} + +int main(void) { + assert(testFind2d() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.h b/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.h new file mode 100644 index 00000000..f5c49062 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/testFind2d.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTFIND2D_H_ +#define _TESTFIND2D_H_ + +#include +#include + +#include "find2d.h" + +#define ERROR 42 + +int sfind2dsTest(void); + +int dfind2dsTest(void); + +int cfind2dsTest(void); + +int zfind2dsTest(void); + +int sfind2daTest(void); + +int dfind2daTest(void); + +int cfind2daTest(void); + +int zfind2daTest(void); + +int testFind2d(void); + +#endif /* ! _TESTFIND2D_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj b/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj new file mode 100644 index 00000000..13ba2480 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7361B40C-BCF5-442B-9116-7DB5AD7456B0} + testFind2d + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj.filters new file mode 100644 index 00000000..31560ef4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/test_Find2d/testFind2d.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/find2d/zfind2da.c b/2.3-1/src/c/auxiliaryFunctions/find2d/zfind2da.c new file mode 100644 index 00000000..a8fa4962 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/find2d/zfind2da.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "find2d.h" + +void zfind2da(doubleComplex* x, int rows, int columns, double* out1,int* indiceOut1, double* out2,int* indiceOut2,int max) { + int i = 0, j=0; + indiceOut1[1] = 0; + + /* if out are empties */ + out1[0]=-1; + out2[0]=-1; + + for (j = 0; j < columns ; ++j){ + for (i = 0; i < rows ; ++i) { + /*to avoid useless search if we only want to find the max first founded value */ + if (indiceOut1[1] == max ) return ; + if ((zreals(x[j*rows+i]) != 0) || (zimags(x[j*rows+i])!=0) ) { + + out1[indiceOut1[1]] = (double)(i+1); + out2[indiceOut1[1]] = (double)(j+1); + indiceOut1[1]++; + } + } + } + indiceOut2[1]=indiceOut1[1]; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.am new file mode 100644 index 00000000..a9e2b0f3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.am @@ -0,0 +1,66 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libFrexp_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFrexp.la + +HEAD = ../includes/frexp.h + +libFrexp_la_SOURCES = $(HEAD) \ + sfrexps.c \ + dfrexps.c + +check_PROGRAMS = testFrexp + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libFrexp.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + + +testFrexp_SOURCES = testFrexp.c +testFrexp_LDADD = $(check_LDADD) +testFrexp_CFLAGS = $(check_INCLUDES) + +TESTS = testFrexp diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.in new file mode 100644 index 00000000..52b1558b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/Makefile.in @@ -0,0 +1,716 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFrexp$(EXEEXT) +TESTS = testFrexp$(EXEEXT) +subdir = src/c/auxiliaryFunctions/frexp +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFrexp_la_LIBADD = +am__objects_1 = +am_libFrexp_la_OBJECTS = $(am__objects_1) libFrexp_la-sfrexps.lo \ + libFrexp_la-dfrexps.lo +libFrexp_la_OBJECTS = $(am_libFrexp_la_OBJECTS) +libFrexp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libFrexp_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFrexp_OBJECTS = testFrexp-testFrexp.$(OBJEXT) +testFrexp_OBJECTS = $(am_testFrexp_OBJECTS) +testFrexp_DEPENDENCIES = $(check_LDADD) +testFrexp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFrexp_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFrexp_la_SOURCES) $(testFrexp_SOURCES) +DIST_SOURCES = $(libFrexp_la_SOURCES) $(testFrexp_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libFrexp_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFrexp.la +HEAD = ../includes/frexp.h +libFrexp_la_SOURCES = $(HEAD) \ + sfrexps.c \ + dfrexps.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libFrexp.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +testFrexp_SOURCES = testFrexp.c +testFrexp_LDADD = $(check_LDADD) +testFrexp_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/frexp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/frexp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFrexp.la: $(libFrexp_la_OBJECTS) $(libFrexp_la_DEPENDENCIES) + $(libFrexp_la_LINK) -rpath $(pkglibdir) $(libFrexp_la_OBJECTS) $(libFrexp_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testFrexp$(EXEEXT): $(testFrexp_OBJECTS) $(testFrexp_DEPENDENCIES) + @rm -f testFrexp$(EXEEXT) + $(testFrexp_LINK) $(testFrexp_OBJECTS) $(testFrexp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFrexp_la-dfrexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFrexp_la-sfrexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFrexp-testFrexp.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libFrexp_la-sfrexps.lo: sfrexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFrexp_la_CFLAGS) $(CFLAGS) -MT libFrexp_la-sfrexps.lo -MD -MP -MF $(DEPDIR)/libFrexp_la-sfrexps.Tpo -c -o libFrexp_la-sfrexps.lo `test -f 'sfrexps.c' || echo '$(srcdir)/'`sfrexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFrexp_la-sfrexps.Tpo $(DEPDIR)/libFrexp_la-sfrexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfrexps.c' object='libFrexp_la-sfrexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFrexp_la_CFLAGS) $(CFLAGS) -c -o libFrexp_la-sfrexps.lo `test -f 'sfrexps.c' || echo '$(srcdir)/'`sfrexps.c + +libFrexp_la-dfrexps.lo: dfrexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFrexp_la_CFLAGS) $(CFLAGS) -MT libFrexp_la-dfrexps.lo -MD -MP -MF $(DEPDIR)/libFrexp_la-dfrexps.Tpo -c -o libFrexp_la-dfrexps.lo `test -f 'dfrexps.c' || echo '$(srcdir)/'`dfrexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFrexp_la-dfrexps.Tpo $(DEPDIR)/libFrexp_la-dfrexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfrexps.c' object='libFrexp_la-dfrexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFrexp_la_CFLAGS) $(CFLAGS) -c -o libFrexp_la-dfrexps.lo `test -f 'dfrexps.c' || echo '$(srcdir)/'`dfrexps.c + +testFrexp-testFrexp.o: testFrexp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFrexp_CFLAGS) $(CFLAGS) -MT testFrexp-testFrexp.o -MD -MP -MF $(DEPDIR)/testFrexp-testFrexp.Tpo -c -o testFrexp-testFrexp.o `test -f 'testFrexp.c' || echo '$(srcdir)/'`testFrexp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFrexp-testFrexp.Tpo $(DEPDIR)/testFrexp-testFrexp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFrexp.c' object='testFrexp-testFrexp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFrexp_CFLAGS) $(CFLAGS) -c -o testFrexp-testFrexp.o `test -f 'testFrexp.c' || echo '$(srcdir)/'`testFrexp.c + +testFrexp-testFrexp.obj: testFrexp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFrexp_CFLAGS) $(CFLAGS) -MT testFrexp-testFrexp.obj -MD -MP -MF $(DEPDIR)/testFrexp-testFrexp.Tpo -c -o testFrexp-testFrexp.obj `if test -f 'testFrexp.c'; then $(CYGPATH_W) 'testFrexp.c'; else $(CYGPATH_W) '$(srcdir)/testFrexp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFrexp-testFrexp.Tpo $(DEPDIR)/testFrexp-testFrexp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFrexp.c' object='testFrexp-testFrexp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFrexp_CFLAGS) $(CFLAGS) -c -o testFrexp-testFrexp.obj `if test -f 'testFrexp.c'; then $(CYGPATH_W) 'testFrexp.c'; else $(CYGPATH_W) '$(srcdir)/testFrexp.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/dfrexps.c b/2.3-1/src/c/auxiliaryFunctions/frexp/dfrexps.c new file mode 100644 index 00000000..04d05be4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/dfrexps.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "frexp.h" + +double dfrexps(double _dblVal, double *_pdblExp) +{ + int iExp = 0; + double dblCoef = 0; + dblCoef = frexp(_dblVal, &iExp); + *_pdblExp = iExp; + return dblCoef; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/sfrexps.c b/2.3-1/src/c/auxiliaryFunctions/frexp/sfrexps.c new file mode 100644 index 00000000..b15095e3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/sfrexps.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "frexp.h" + +float sfrexps(float _fltVal, float *_pfltExp) +{ + int iExp = 0; + float fltCoef = 0; + fltCoef = (float) frexp (_fltVal, &iExp); + *_pfltExp = (float) iExp; + return fltCoef; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/testFrexp.c b/2.3-1/src/c/auxiliaryFunctions/frexp/testFrexp.c new file mode 100644 index 00000000..45988886 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/testFrexp.c @@ -0,0 +1,162 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#define SIZE 100 + +#define DMATRIX_TEST {14.6458099031118518,15.9879935334969154,14.5023146230340352,9.79104027026660262,\ + 13.658147977601745,18.2826677794023276,13.9913488019182726,13.0555850244756648,\ + 11.2702097163264696,12.2080852641231488,\ +14.9576657268129818,18.0415870145381838,15.4577532112657572,10.6060207869925502,\ + 14.6987916130120198,19.9917861348452170,14.8484467294549827,14.0994958596124,\ + 12.1294313366477713,12.8836800651605152,\ +7.72729140087719646,8.27571528291814396,8.78222511899259928,5.22537042408334251,\ + 7.61718988429527233,10.1106593547443495,7.22727291477849576,6.72646688774223733,\ + 6.21430065514425589,6.69442204331610213,\ +11.8618893865302528,13.2731189359057637,12.8373872935372706,9.52692469532374631,\ + 11.9056327368823247,16.3654355264039921,11.8674243780595265,11.7206072002431814,\ + 9.24712051368910970,10.6966525674175159,\ +7.25089971320127891,8.98673751651268127,7.49831172728240691,5.29368504368777693,\ + 8.12154956830077346,10.3089262075282218,7.4337348502224856,6.83888206810676191,\ + 5.87125977419815737,6.5321378683758375,\ +9.25854069422946502,10.4059421461299539,9.47515410794143342,7.263789985253827,\ + 9.16034813421007321,13.6353552693330933,9.3726649654333336,8.83558176180042132,\ + 7.6055387753197277,8.4871270614444292,\ +12.6878667266786511,14.1417583108624711,13.0448499416136254,9.182764814582713,\ + 12.4852121681423256,17.073953108953809,13.2550267101027224,11.3640159258193041,\ + 9.6279844249894015,10.6765282334921068,\ +16.0691497196859565,18.4667994666424704,16.975871456346809,12.083598083627443,\ + 15.7522021028722747,22.0489520587189212,16.1322911282790358,16.8044904865300744,\ + 12.7829232118433556,14.5730443462997599,\ +11.943978463537455,13.6259118560125358,11.8068134298221956,8.21687415305816771,\ + 11.4127920042158735,15.2296090993128281,11.3826577511842082,11.0976684273648587,\ + 10.3857413785092909,10.2894980707345525,\ +11.5843985401712821,13.2781579371486753,12.1725305229437293,8.37850128011447204,\ + 11.8141382209783163,15.4022074994757734,11.484608766021573,11.1535660239869383,\ + 9.31343988645433285,11.1349864749012912} + +#define FMATRIX_TEST {4.6052332809216896f,2.16205411267794823f,1.12245312965776556f,4.0468190853821735f,\ + 7.29705295628955231f,2.45894799152591625f,2.29331674633863614f,4.21571156291592253f,\ + 2.81922686558935887f,2.348781949769843f,\ +2.07401297354815162f,1.50063692688995753f,0.25219828236411757f,2.7063265188290884f,\ + 6.35812780561968260f,0.67264506810224134f,0.79079814568186024f,2.91747981321864280f,\ + 1.01032692983832129f,0.75975015828076931f,\ +7.04077899650083694f,5.39363072316827363f,4.99449464719530045f,6.79878933472462954f,\ + 11.2977866849707205f,5.7026161792862045f,6.09443833294921244f,7.35970702338152272f,\ + 6.14030297304667272f,5.80227288585002476f,\ +1.52422494456658053f,0.15792523935350228f,-0.39437456229879331f,3.21063571532312331f,\ + 4.72654937095295491f,0.19681048033039794f,0.13926710536989889f,2.4098033377935764f,\ + 1.19110231590601412f,0.24431206393184518f,\ +5.84910802491279558f,3.67968516288822922f,2.73879619563976862f,5.69547375492497387f,\ + 10.2284804678743431f,4.40378197582331143f,3.9855513762320007f,6.24858736599414133f,\ + 4.57057059205936156f,4.19331143449899635f,\ +2.84423960711997825f,0.91341486330902766f,0.32799575263405639f,3.63130361353437925f,\ + 6.73358898182897025f,2.44092642244158631f,1.4035651670524776f,3.29646069585033841f,\ + 1.63804041671370615f,1.34065096546340268f,\ +5.04689360696997724f,2.58451417966281571f,1.89915292921285772f,4.62170835433455451f,\ + 9.05019265678329887f,3.33670002112993291f,3.66038974983755372f,5.62296495186113443f,\ + 4.04432332701467434f,3.48415716881126114f,\ +2.99051528256943167f,0.76077291642727529f,0.19995186822386554f,2.96972391032047955f,\ + 6.60462877127714787f,1.8346028052798535f,1.31621250911818244f,3.73816126628208467f,\ + 1.3788533261260996f,0.30973924698106181f,\ +5.20595600060592734f,3.44646883779368096f,1.85946748567920750f,5.1361216710529769f,\ + 10.0941765681228333f,3.49429925842045552f,3.05021742013193098f,5.4348094549241184f,\ + 4.51765668386982977f,3.40850797720926035f,\ +4.65702831667450212f,3.03706964016556746f,2.06940591125521856f,5.11047315752830578f,\ + 9.94379845012778674f,3.3321507049026704f,3.29919175160893818f,5.94111235727490428f,\ + 4.22429837741492253f,4.41612421969640145f} + + + +#include +#include +#include "frexp.h" +#include "pow.h" + + +static void dfrexpsTest ( void ) { + + int i = 0 ; + + double out = 0 ; + double dexp = 0 ; + double result = 0; + + + + double in[] = DMATRIX_TEST ; + + + + + + + for ( i = 0 ; i < SIZE; i++ ) + { + out = dfrexps ( in[i] , &dexp ) ; + result = out * dpows( 2 , dexp) ; + + printf ( "\t\t %d in :%e %e\tresult : %e\tassert : %e \n" , i , dexp, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + assert ( fabs ( in[i] - result) / fabs( in[i]) < 3e-16 ) ; + } + + +} + +static void sfrexpsTest ( void ) { + + int i = 0 ; + + float out = 0 ; + float fexp = 0 ; + float result = 0; + + + float in[] = FMATRIX_TEST ; + + + + + + + for ( i = 0 ; i < SIZE; i++ ) + { + out = sfrexps ( in[i] , &fexp ) ; + result = out * spows( 2.0f , fexp) ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i , in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + assert ( fabs ( in[i] - result) / fabs( in[i]) < 1e-6 ) ; + } + + +} + + +static int testFrexp(void) { + + printf("\n>>>> Matrix Exponential Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dfrexpsTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sfrexpsTest(); + + return 0; +} + + + +int main(void) { + assert(testFrexp() == 0); + return 0; +} + + diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj b/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj new file mode 100644 index 00000000..0c4a6f72 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj @@ -0,0 +1,187 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testFrexp + {FDBBFB07-9E66-481E-AA45-3F3BD87CCE77} + frexp + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj.filters new file mode 100644 index 00000000..ea3ead10 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/frexp/test_frexp/frexp.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/abs.h b/2.3-1/src/c/auxiliaryFunctions/includes/abs.h new file mode 100644 index 00000000..00565e39 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/abs.h @@ -0,0 +1,93 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ABS_H__ +#define __ABS_H__ + +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "sqrt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + ** \brief Float Absolute Value function + ** Determine the absolute value of in. + ** \param in : the float we must determine abs. + ** \return -in or in depending on the sign of in. + **/ +EXTERN_AUXFUNCT float sabss(float in); + +/** + ** \brief Double Absolute Value function + ** Determine the absolute value of in. + ** \param in : the double we must determine abs. + ** \return -in or +in depending on the abs of in. + **/ +EXTERN_AUXFUNCT double dabss(double in); + +/** + ** \brief Float Complex Absolute Value function + ** Determine the absolute value of in. + ** \param in : the float complex we must determine abs i.e. module. + ** \return |in|. + **/ +EXTERN_AUXFUNCT float cabss(floatComplex in); + +/** + ** \brief Double Complex Absolute Value function + ** Determine the absolute value of in. + ** \param in : the double complex we must determine abs i.e. module. + ** \return |in|. + **/ +EXTERN_AUXFUNCT double zabss(doubleComplex in); + +/** + ** \brief Float Array Absolute Value function + ** Determine the absolute value of in elements. + ** \param in : the float array we must determine abs. + ** \param out : the float array result. + **/ +EXTERN_AUXFUNCT void sabsa(float *in, int size, float* out); + +/** + ** \brief Double Array Absolute Value function + ** Determine the absolute value of in elements. + ** \param in : the double array we must determine abs. + ** \param out : the double array result. + **/ +EXTERN_AUXFUNCT void dabsa(double *in, int size, double* out); + +/** + ** \brief Float Complex Array Absolute Value function + ** Determine the absolute value of in elements. + ** \param in : the float complex array we must determine abs i.e. module. + ** \param out : the float complex array result i.e out[n] = |in[n]|. + **/ +EXTERN_AUXFUNCT void cabsa(floatComplex *in, int size, float* out); + +/** + ** \brief Double Complex Array Absolute Value function + ** Determine the absolute value of in. + ** \param in : the double complex array we must determine abs i.e. module. + ** \param out : the double complex array result i.e out[n] = |in[n]|. + **/ +EXTERN_AUXFUNCT void zabsa(doubleComplex *in, int size, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ABS_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/conj.h b/2.3-1/src/c/auxiliaryFunctions/includes/conj.h new file mode 100644 index 00000000..b49855bf --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/conj.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CONJ_H__ +#define __CONJ_H__ + +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_AUXFUNCT floatComplex cconjs( floatComplex in ) ; + +EXTERN_AUXFUNCT void cconja ( floatComplex* in , int size, floatComplex* out ); + +EXTERN_AUXFUNCT doubleComplex zconjs ( doubleComplex in) ; + +EXTERN_AUXFUNCT void zconja ( doubleComplex* in , int size, doubleComplex* out ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__CONJ_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h b/2.3-1/src/c/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h new file mode 100644 index 00000000..09b1bea8 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/dynlib_auxiliaryfunctions.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_AUXILIARYFUNCTIONS_H__ +#define __DYNLIB_AUXILIARYFUNCTIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if AUXILIARYFUNCTIONS_EXPORTS + #define EXTERN_AUXFUNCT __declspec (dllexport) + #else + #define EXTERN_AUXFUNCT __declspec (dllimport) + #endif +#else + #define EXTERN_AUXFUNCT +#endif + +#endif /* __DYNLIB_AUXILIARYFUNCTIONS_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/find.h b/2.3-1/src/c/auxiliaryFunctions/includes/find.h new file mode 100644 index 00000000..3104e957 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/find.h @@ -0,0 +1,52 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FIND_H__ +#define __FIND_H__ + +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Float Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void sfinda(float* x, int size, float *out, int max); + +/* +** \brief Double Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void dfinda(double*x, int size, double *out, int max); + +/* +** \brief Float Complex Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void cfinda(floatComplex* z, int size, float *out, int max); + +/* +** \brief Double Complex Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void zfinda(doubleComplex* z, int size, double *out, int max); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__FIND_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/find2d.h b/2.3-1/src/c/auxiliaryFunctions/includes/find2d.h new file mode 100644 index 00000000..2e9be6fa --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/find2d.h @@ -0,0 +1,52 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FIND2D_H__ +#define __FIND2D_H__ + +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Float Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void sfind2da(float* x, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2,int max); + +/* +** \brief Double Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void dfind2da(double* x, int rows, int columns, double* out1, double* out2, int max); + +/* +** \brief Float Complex Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void cfind2da(floatComplex* z, int rows, int columns, float* out1, int* sizeOut1, float* out2, int* sizeOut2,int max); + +/* +** \brief Double Complex Find function +** max is an integer giving the maximum number of indices to return. (use -1 to search them all) +*/ +EXTERN_AUXFUNCT void zfind2da(doubleComplex* z, int rows, int columns, double* out1, int* sizeOut1, double* out2, int* sizeOut2,int max); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__FIND2D_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/frexp.h b/2.3-1/src/c/auxiliaryFunctions/includes/frexp.h new file mode 100644 index 00000000..cb4d8f32 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/frexp.h @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FREXP_H__ +#define __FREXP_H__ + +#include +#include "dynlib_auxiliaryfunctions.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_AUXFUNCT float sfrexps(float _fltVal, float *_pfltExp); + +EXTERN_AUXFUNCT double dfrexps(double _dblVal, double *_pdblExp); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif /* !__FREXP_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/isempty.h b/2.3-1/src/c/auxiliaryFunctions/includes/isempty.h new file mode 100644 index 00000000..4248200a --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/isempty.h @@ -0,0 +1,64 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __IS_EMPTY_H__ +#define __IS_EMPTY_H__ + + + +#include "floatComplex.h" +#include "doubleComplex.h" +#include "notFound.h" +#include "find.h" + + +/* +** \brief Float Is Empty function +*/ +#define sisemptys(in) 0.0f /*= false*/ + +/* +** \brief Double Is Empty function +*/ +#define disemptys(in) 0/*= false*/ + +/* +** \brief Float Complex Is Empty function +*/ +#define cisemptys(in) 0.0f/*= false*/ + +/* +** \brief Double Complex Is Empty function +*/ +#define zisemptys(in) 0/*= false*/ + +/* +** \brief Float Is Empty function +*/ +#define sisemptya(in,size) (size==0) ? 1.0f : 0.0f + +/* +** \brief Double Is Empty function +*/ +#define disemptya(in,size) (size==0) ? 1.0 : 0.0 + +/* +** \brief Float Complex Is Empty function +*/ +#define cisemptya(in,size) (size==0) ? 1.0f : 0.0f + +/* +** \brief Double Complex Is Empty function +*/ +#define zisemptya(in,size) (size==0) ? 1.0 : 0.0 + +#endif /* !__IS_EMPTY_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/isnan.h b/2.3-1/src/c/auxiliaryFunctions/includes/isnan.h new file mode 100644 index 00000000..e0975c23 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/isnan.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __IS_NAN_H__ +#define __IS_NAN_H__ + +#include +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Float Is Nan function +*/ +EXTERN_AUXFUNCT float sisnans(float x); + +/* +** \brief Double Is Nan function +*/ +EXTERN_AUXFUNCT double disnans(double x); + +/* +** \brief Float Complex Is Nan function +*/ +EXTERN_AUXFUNCT float cisnans(floatComplex z); + +/* +** \brief Double Complex Is Nan function +*/ +EXTERN_AUXFUNCT double zisnans(doubleComplex z); + +/* +** \brief Float Is Nan function +*/ +EXTERN_AUXFUNCT void sisnana(float* x, int size, float* out); + +/* +** \brief Double Is Nan function +*/ +EXTERN_AUXFUNCT void disnana(double* x, int size, double* out); + +/* +** \brief Float Complex Is Nan function +*/ +EXTERN_AUXFUNCT void cisnana(floatComplex* z, int size, float* out); + +/* +** \brief Double Complex Is Nan function +*/ +EXTERN_AUXFUNCT void zisnana(doubleComplex* z, int size, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif /* !__IS_NAN_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/length.h b/2.3-1/src/c/auxiliaryFunctions/includes/length.h new file mode 100644 index 00000000..f8939f18 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/length.h @@ -0,0 +1,98 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) 2007-2008 - POLIBA - Raffaele Nutricato + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LENGTH_H__ +#define __LENGTH_H__ + +#include "dynlib_auxiliaryfunctions.h" + +/** + ** WARNING : + ** We assume size of arrays are known, so we + ** use #define to avoid compilation warnings + ** such as "unused parameter" + **/ + +/** + ** \brief Float Size Scalar function + ** Determine the size of an array. + ** \param in : the float array we must determine size. + ** \param size : the number of elements. + ** \return the size of in. + **/ +#define slengths(in) 1.0f + +/** + ** \brief Float length Scalar function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define dlengths(in) 1.0 + +/** + ** \brief Complex Float length Scalar function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define clengths(in) 1.0f + +/** + ** \brief Complex Double length Array function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define zlengths(in) 1.0 + +/** + ** \brief Float length Array function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define slengtha(in, size) (float)size + +/** + ** \brief Double length Array function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define dlengtha(in, size) (double)size + +/** + ** \brief Complex Float length Array function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define clengtha(in, size) (float)size + +/** + ** \brief Complex Double length Array function + ** Determine the length of an array. + ** \param in : the float array we must determine length. + ** \param length : the number of elements. + ** \return the length of in. + **/ +#define zlengtha(in, size) (double)size + +#endif /* !__LENGTH_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/max.h b/2.3-1/src/c/auxiliaryFunctions/includes/max.h new file mode 100644 index 00000000..c37bfea5 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/max.h @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MAX_H__ +#define __MAX_H__ + +#define max(a,b) (a>=b?a:b) + +#define maxa(a,size1,b,size2,out) {int i;\ + for (i=0;i +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + ** \brief Float Rand function + ** \return A random float. + **/ +EXTERN_AUXFUNCT float srands(void); + +/** + ** \brief Double Rand function + ** \return A random double. + **/ +EXTERN_AUXFUNCT double drands(void); + +/** + ** \brief Float Complex Rand function + ** \return A random float complex. + **/ +EXTERN_AUXFUNCT floatComplex crands(void); + +/** + ** \brief Double Complex Rand function + ** \return A random double complex. + **/ +EXTERN_AUXFUNCT doubleComplex zrands(void); + +/** + ** \brief Float Array Rand function + ** \return A random float array. + **/ +EXTERN_AUXFUNCT void sranda(float *out, int size); + +/** + ** \brief Double Array Rand function + ** \return A random double array. + **/ +EXTERN_AUXFUNCT void dranda(double *out, int size); + +/** + ** \brief Float Complex Array Rand function + ** \return A random float complex array. + **/ +EXTERN_AUXFUNCT void cranda(floatComplex *out, int size); + +/** + ** \brief Double Complex Array Rand function + ** \return A random double complex array. + **/ +EXTERN_AUXFUNCT void zranda(doubleComplex *out, int size); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif /* !__RAND_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/sign.h b/2.3-1/src/c/auxiliaryFunctions/includes/sign.h new file mode 100644 index 00000000..0f69b4b7 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/sign.h @@ -0,0 +1,99 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SIGN_H__ +#define __SIGN_H__ + +#include + +#include "dynlib_auxiliaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + ** \brief Float Signe function + ** Determine the sign of in (assume that 0 is positive). + ** \param in : the float we must determine sign. + ** \return -1 or +1 depending on the sign of in. + **/ +EXTERN_AUXFUNCT float ssigns(float in); + +/** + ** \brief Double Signe function + ** Determine the sign of in (assume that 0 is positive). + ** \param in : the double we must determine sign. + ** \return -1 or +1 depending on the sign of in. + **/ +EXTERN_AUXFUNCT double dsigns(double in); + +/** + ** \brief Float Complex Signe function + ** Determine the sign of in (assume that 0 is positive). + ** \param in : the float we must determine sign. + ** \return -1 or +1 depending on the sign of in. + **/ +EXTERN_AUXFUNCT floatComplex csigns(floatComplex in); + +/** + ** \brief Double Complex Signe function + ** Determine the sign of in (assume that 0 is positive). + ** \param in : the double we must determine sign. + ** \return -1 or +1 depending on the sign of in. + **/ +EXTERN_AUXFUNCT doubleComplex zsigns(doubleComplex in); + +/** + ** \brief Float Signe Array function + ** Determine the sign of an array in (assume that 0 is positive). + ** \param in : the float array we must determine sign. + ** \param size : the number of elements. + ** \return -1 or +1 depending on the sign of in elements. + **/ +EXTERN_AUXFUNCT void ssigna(float *in, int size, float *out); + +/** + ** \brief Double Signe Array function + ** Determine the sign of an array in (assume that 0 is positive). + ** \param in : the double array we must determine sign. + ** \param size : the number of elements. + ** \return -1 or +1 depending on the sign of in elements. + **/ +EXTERN_AUXFUNCT void dsigna(double *in, int size, double *out); + +/** + ** \brief Float Signe Complex Array function + ** Determine the sign of an array in (assume that 0 is positive). + ** \param in : the float complex array we must determine sign. + ** \param size : the number of elements. + ** \return -1 or +1 depending on the sign of in elements. + **/ +EXTERN_AUXFUNCT void csigna(floatComplex *in, int size, floatComplex *out); + +/** + ** \brief Double Signe Complex Array function + ** Determine the sign of an array in (assume that 0 is positive). + ** \param in : the double complex array we must determine sign. + ** \param size : the number of elements. + ** \return -1 or +1 depending on the sign of in elements. + **/ +EXTERN_AUXFUNCT void zsigna(doubleComplex *in, int size, doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__SIGN_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/size.h b/2.3-1/src/c/auxiliaryFunctions/includes/size.h new file mode 100644 index 00000000..ebc07a05 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/size.h @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SIZE_H__ +#define __SIZE_H__ + +/** + ** \brief Double Size Array function + ** Determine the size of an array. + ** \param in : the float array we must determine size. + ** \param size : the number of elements. + ** \return the size of in. + **/ +double dallsizea(int *size, char *select); + +#endif /* !__SIZE_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/includes/type.h b/2.3-1/src/c/auxiliaryFunctions/includes/type.h new file mode 100644 index 00000000..00b468d6 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/includes/type.h @@ -0,0 +1,72 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/** + ** \brief Return scilab code encoding for data type. + **/ + +/** + ** WARNING : + ** We use #define to avoid compilation warnings + ** such as "unused parameter" and better performance. + **/ + +#ifndef __TYPE_H__ +#define __TYPE_H__ + +#define REAL_FLOAT_CONSTANT_MATRIX 1.0f +#define REAL_DOUBLE_CONSTANT_MATRIX 1.0 + +#define COMPLEX_FLOAT_CONSTANT_MATRIX 1.0f +#define COMPLEX_DOUBLE_CONSTANT_MATRIX 1.0 + +/** + ** Float scalar. + **/ +#define stypes(in) REAL_FLOAT_CONSTANT_MATRIX + +/** + ** Double scalar. + **/ +#define dtypes(in) REAL_DOUBLE_CONSTANT_MATRIX + +/** + ** Float complex scalar. + **/ +#define ctypes(in) COMPLEX_FLOAT_CONSTANT_MATRIX + +/** + ** Double complex scalar. + **/ +#define ztypes(in) COMPLEX_DOUBLE_CONSTANT_MATRIX + +/** + ** Float array. + **/ +#define stypea(in, size) REAL_FLOAT_CONSTANT_MATRIX + +/** + ** Double array. + **/ +#define dtypea(in, size) REAL_DOUBLE_CONSTANT_MATRIX + +/** + ** Float complex array. + **/ +#define ctypea(in, size) COMPLEX_FLOAT_CONSTANT_MATRIX + +/** + ** Double complex array. + **/ +#define ztypea(in, size) COMPLEX_DOUBLE_CONSTANT_MATRIX + +#endif /* !__TYPE_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h new file mode 100644 index 00000000..4c353fee --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_abs.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_ABS_H__ +#define __INT_ABS_H__ + +#define s0abss0(in) sabss(in) + +#define d0absd0(in) dabss(in) + +#define c0abss0(in) cabss(in) + +#define z0absd0(in) zabss(in) + +#define s2abss2(in,size,out) sabsa(in, size[0]*size[1], out) + +#define d2absd2(in,size,out) dabsa(in, size[0]*size[1], out) + +#define c2abss2(in,size,out) cabsa(in, size[0]*size[1], out) + +#define z2absd2(in,size,out) zabsa(in, size[0]*size[1], out) + +#endif /* !__INT_ABS_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h new file mode 100644 index 00000000..f54de243 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_conj.h @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CONJ_H__ +#define __INT_CONJ_H__ + +#define copy(in,size,out) {int i;for (i=0; i +** +** +** Copyright POLIBA 2008 +*/ +/* + 1. Search for length in INIT_FillSCI2LibCDirs.sci + 2. Search for // --- Function List Class. --- in INIT_FillSCI2LibCDirs.sci + 3. You will find + PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y'); + PrintStringInfo('c0'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('z0'+ArgSeparator+'d0',ClassFileName,'file','y'); + PrintStringInfo('g0'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('g0'+ArgSeparator+'d0',ClassFileName,'file','y'); + + PrintStringInfo('s2'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('d2'+ArgSeparator+'d0',ClassFileName,'file','y'); + PrintStringInfo('c2'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('z2'+ArgSeparator+'d0',ClassFileName,'file','y'); + PrintStringInfo('g2'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('g2'+ArgSeparator+'d0',ClassFileName,'file','y'); + 4. These are all the functions to be implemented. + 5. According to functions available in src you have to generate the mapping between + functions in step3 and functions in src. +*/ + +#ifndef __INT_LENGTH_H__ +#define __INT_LENGTH_H__ + +#define s0lengths0(in) \ +slengths(in) + +#define d0lengthd0(in) \ +dlengths(in) + +#define c0lengths0(in) \ +clengths(in) + +#define z0lengthd0(in) \ +zlengths(in) + +#define g0lengths0(in) \ +slengths(in) + +#define g0lengthd0(in) \ +dlengths(in) + +#define s2lengths0(inptr,insizeptr) \ +slengtha(inptr, insizeptr[0]*insizeptr[1]) + +#define d2lengthd0(inptr,insizeptr) \ +dlengtha(inptr, insizeptr[0]*insizeptr[1]) + +#define c2lengths0(inptr,insizeptr) \ +clengtha(inptr, insizeptr[0]*insizeptr[1]) + +#define z2lengthd0(inptr,insizeptr) \ +zlengtha(inptr, insizeptr[0]*insizeptr[1]) + +#define g2lengths0(inptr,insizeptr) \ +slengtha(inptr, insizeptr[0]*insizeptr[1]) + +#define g2lengthd0(inptr,insizeptr) \ +dlengtha(inptr, insizeptr[0]*insizeptr[1]) +#endif /* !__INT_LENGTH_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/interfaces/int_max.h b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_max.h new file mode 100644 index 00000000..0dc0eef0 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/interfaces/int_max.h @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_MAX_H__ +#define __INT_MAX_H__ + +#define s0maxs0(in) in + +#define d0maxd0(in) in + +#define s2maxs0(in,size) smaxa(in,size[0]*size[1]); + +#define d2maxd0(in,size) dmaxa(in,size[0]*size[1]); + + + +#define s0s0maxs0(in1,in2) max(in1,in2) + +#define d0d0maxd0(in1,in2) max(in1,in2) + +#define s2s2maxs2(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + +#define d2d2maxd2(in1,size1,in2,size2,out) maxa(in1, size1, in2, size2, out) + + +#define s2s0maxs2(in1,size,in2,out) {int i;\ + for (i=0;i> Float array\n"); + + out=sisemptya(empty, 0); + if (out == 0) { + printf("ERROR1 ! : Test Failed (empty array)\n"); + result = ERROR; + } + assert (out == 1); + + + out = sisemptya(full, 5); + if ( out == 1) { + printf("ERROR2 ! : Test Failed (non empty array)\n"); + result = ERROR; + } + assert(out == 0); + + return result; +} + +int disemptyaTest() { + int result = 0; + double *empty; + double full[5] = {1., 2., 3., 0., 0.}; + double out; + + empty = NULL; + full[4]=0; + + + printf(">> Double array\n"); + out=disemptya(empty, 0); + if (out == 0) { + printf("ERROR1 ! : Test Failed (empty array)\n"); + result = ERROR; + } + + assert(out == 1); + + + out=disemptya(full, 5); + if (out == 1) { + printf("ERROR2 ! : Test Failed (non empty array)\n"); + result = ERROR; + } + assert(out == 0); + + return result; +} + +int cisemptyaTest() { + int result = 0; + floatComplex *empty; + floatComplex full[5]; + float out; + + empty=NULL; + + full[0] = FloatComplex(0.,1.); + full[1] = FloatComplex(0., 2.); + full[2] = FloatComplex(0., 3.); + full[3] = FloatComplex(0., 0.); + full[4] = FloatComplex(0., 0.); + + printf(">> Float Complex array\n"); + + out = cisemptya(empty, 0); + if (out == 0) { + printf("ERROR1 ! : Test Failed (empty array)\n"); + result = ERROR; + } + assert (out == 1); + + + out = cisemptya(full, 5); + if (out == 1) { + printf("ERROR2 ! : Test Failed (non empty array)\n"); + result = ERROR; + } + assert(out == 0); + + + return result; +} + +int zisemptyaTest() { + int result = 0; + doubleComplex *empty; + doubleComplex full[5]; + double out; + + empty=NULL; + + full[0] = DoubleComplex(0.,1.); + full[1] = DoubleComplex(0., 2.); + full[2] = DoubleComplex(0., 3.); + full[3] = DoubleComplex(0., 0.); + full[4] = DoubleComplex(0., 0.);; + + printf(">> Double Complex array\n"); + + out = zisemptya(empty, 0); + if (out == 0) { + printf("ERROR1 ! : Test Failed (empty array)\n"); + result = ERROR; + } + assert (out == 1); + + out = zisemptya(full, 5); + if (out == 1) { + printf("ERROR2 ! : Test Failed (non empty array)\n"); + result = ERROR; + } + assert(out == 0); + + + return result; +} + + +int testIsEmpty() { + int sisemptyaTestStatus, disemptyaTestStatus = 0; + int cisemptyaTestStatus, zisemptyaTestStatus = 0; + printf("\n>>>> IsEmpty Tests\n"); + sisemptyaTestStatus = sisemptyaTest(); + disemptyaTestStatus = disemptyaTest(); + cisemptyaTestStatus = cisemptyaTest(); + zisemptyaTestStatus = zisemptyaTest(); + return (sisemptyaTestStatus + disemptyaTestStatus + + cisemptyaTestStatus + zisemptyaTestStatus); +} + +int main(void) { + assert(testIsEmpty() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/isempty/testIsEmpty.h b/2.3-1/src/c/auxiliaryFunctions/isempty/testIsEmpty.h new file mode 100644 index 00000000..6e3726ae --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isempty/testIsEmpty.h @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TESTISEMPTY_H__ +#define __TESTISEMPTY_H__ + +#include +#include +#include "isempty.h" + +#define ERROR 51 + +int sisemptyaTest(void); + +int disemptyaTest(void); + +int cisemptyaTest(void); + +int zisemptyaTest(void); + +int testIsEmpty(void); + +#endif /* ! __TESTISEMPTY_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj b/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj new file mode 100644 index 00000000..aae8bfab --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CF43766B-FEBE-4E52-A7CA-7D0A9F5DB982} + testIsEmpty + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj.filters new file mode 100644 index 00000000..9b8f6aad --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isempty/test_IsEmpty/testIsEmpty.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.am new file mode 100644 index 00000000..dbe87924 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.am @@ -0,0 +1,48 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libIsnan_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libIsnan.la + +libIsnan_la_SOURCES = $(HEAD) $(SRC) + +SRC = sisnans.c \ + disnans.c \ + cisnans.c \ + zisnans.c + +HEAD = ../includes/isnan.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testIsnan + +TESTS = testIsnan + +# +# -*- Isnan Tests -*- +# +testIsnan_SOURCES = testIsNan.h testIsNan.c +testIsnan_CFLAGS = $(check_INCLUDES) +testIsnan_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.in new file mode 100644 index 00000000..e9e38b53 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/Makefile.in @@ -0,0 +1,721 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testIsnan$(EXEEXT) +TESTS = testIsnan$(EXEEXT) +subdir = src/c/auxiliaryFunctions/isnan +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libIsnan_la_LIBADD = +am__objects_1 = +am__objects_2 = libIsnan_la-sisnans.lo libIsnan_la-disnans.lo \ + libIsnan_la-cisnans.lo libIsnan_la-zisnans.lo +am_libIsnan_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libIsnan_la_OBJECTS = $(am_libIsnan_la_OBJECTS) +libIsnan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libIsnan_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testIsnan_OBJECTS = testIsnan-testIsNan.$(OBJEXT) +testIsnan_OBJECTS = $(am_testIsnan_OBJECTS) +testIsnan_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la +testIsnan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testIsnan_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libIsnan_la_SOURCES) $(testIsnan_SOURCES) +DIST_SOURCES = $(libIsnan_la_SOURCES) $(testIsnan_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libIsnan_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libIsnan.la +libIsnan_la_SOURCES = $(HEAD) $(SRC) +SRC = sisnans.c \ + disnans.c \ + cisnans.c \ + zisnans.c + +HEAD = ../includes/isnan.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Isnan Tests -*- +# +testIsnan_SOURCES = testIsNan.h testIsNan.c +testIsnan_CFLAGS = $(check_INCLUDES) +testIsnan_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/isnan/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/isnan/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libIsnan.la: $(libIsnan_la_OBJECTS) $(libIsnan_la_DEPENDENCIES) + $(libIsnan_la_LINK) -rpath $(pkglibdir) $(libIsnan_la_OBJECTS) $(libIsnan_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testIsnan$(EXEEXT): $(testIsnan_OBJECTS) $(testIsnan_DEPENDENCIES) + @rm -f testIsnan$(EXEEXT) + $(testIsnan_LINK) $(testIsnan_OBJECTS) $(testIsnan_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIsnan_la-cisnans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIsnan_la-disnans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIsnan_la-sisnans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIsnan_la-zisnans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testIsnan-testIsNan.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libIsnan_la-sisnans.lo: sisnans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -MT libIsnan_la-sisnans.lo -MD -MP -MF $(DEPDIR)/libIsnan_la-sisnans.Tpo -c -o libIsnan_la-sisnans.lo `test -f 'sisnans.c' || echo '$(srcdir)/'`sisnans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIsnan_la-sisnans.Tpo $(DEPDIR)/libIsnan_la-sisnans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sisnans.c' object='libIsnan_la-sisnans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -c -o libIsnan_la-sisnans.lo `test -f 'sisnans.c' || echo '$(srcdir)/'`sisnans.c + +libIsnan_la-disnans.lo: disnans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -MT libIsnan_la-disnans.lo -MD -MP -MF $(DEPDIR)/libIsnan_la-disnans.Tpo -c -o libIsnan_la-disnans.lo `test -f 'disnans.c' || echo '$(srcdir)/'`disnans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIsnan_la-disnans.Tpo $(DEPDIR)/libIsnan_la-disnans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='disnans.c' object='libIsnan_la-disnans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -c -o libIsnan_la-disnans.lo `test -f 'disnans.c' || echo '$(srcdir)/'`disnans.c + +libIsnan_la-cisnans.lo: cisnans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -MT libIsnan_la-cisnans.lo -MD -MP -MF $(DEPDIR)/libIsnan_la-cisnans.Tpo -c -o libIsnan_la-cisnans.lo `test -f 'cisnans.c' || echo '$(srcdir)/'`cisnans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIsnan_la-cisnans.Tpo $(DEPDIR)/libIsnan_la-cisnans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cisnans.c' object='libIsnan_la-cisnans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -c -o libIsnan_la-cisnans.lo `test -f 'cisnans.c' || echo '$(srcdir)/'`cisnans.c + +libIsnan_la-zisnans.lo: zisnans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -MT libIsnan_la-zisnans.lo -MD -MP -MF $(DEPDIR)/libIsnan_la-zisnans.Tpo -c -o libIsnan_la-zisnans.lo `test -f 'zisnans.c' || echo '$(srcdir)/'`zisnans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIsnan_la-zisnans.Tpo $(DEPDIR)/libIsnan_la-zisnans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zisnans.c' object='libIsnan_la-zisnans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIsnan_la_CFLAGS) $(CFLAGS) -c -o libIsnan_la-zisnans.lo `test -f 'zisnans.c' || echo '$(srcdir)/'`zisnans.c + +testIsnan-testIsNan.o: testIsNan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testIsnan_CFLAGS) $(CFLAGS) -MT testIsnan-testIsNan.o -MD -MP -MF $(DEPDIR)/testIsnan-testIsNan.Tpo -c -o testIsnan-testIsNan.o `test -f 'testIsNan.c' || echo '$(srcdir)/'`testIsNan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testIsnan-testIsNan.Tpo $(DEPDIR)/testIsnan-testIsNan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testIsNan.c' object='testIsnan-testIsNan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testIsnan_CFLAGS) $(CFLAGS) -c -o testIsnan-testIsNan.o `test -f 'testIsNan.c' || echo '$(srcdir)/'`testIsNan.c + +testIsnan-testIsNan.obj: testIsNan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testIsnan_CFLAGS) $(CFLAGS) -MT testIsnan-testIsNan.obj -MD -MP -MF $(DEPDIR)/testIsnan-testIsNan.Tpo -c -o testIsnan-testIsNan.obj `if test -f 'testIsNan.c'; then $(CYGPATH_W) 'testIsNan.c'; else $(CYGPATH_W) '$(srcdir)/testIsNan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testIsnan-testIsNan.Tpo $(DEPDIR)/testIsnan-testIsNan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testIsNan.c' object='testIsnan-testIsNan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testIsnan_CFLAGS) $(CFLAGS) -c -o testIsnan-testIsNan.obj `if test -f 'testIsNan.c'; then $(CYGPATH_W) 'testIsNan.c'; else $(CYGPATH_W) '$(srcdir)/testIsNan.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/cisnana.c b/2.3-1/src/c/auxiliaryFunctions/isnan/cisnana.c new file mode 100644 index 00000000..0048400a --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/cisnana.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "isnan.h" + + +void cisnana(floatComplex* in, int size, float* out){ + int i=0; + + for (i=0;i +#define isnan(x) _isnan((double)x) +#endif + +#include "isnan.h" + + +float cisnans(floatComplex in) { + if ((int)(isnan(creals(in))) && (int)(isnan(cimags(in)))) return 1; + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/disnana.c b/2.3-1/src/c/auxiliaryFunctions/isnan/disnana.c new file mode 100644 index 00000000..ad556fd8 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/disnana.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "isnan.h" + + +void disnana(double* in, int size, double* out){ + int i=0; + + for (i=0;i +#define isnan(x) _isnan((double)x) +#endif + +#include "isnan.h" + +double disnans(double in) { + return isnan(in) ? 1 : 0; +} + diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/sisnana.c b/2.3-1/src/c/auxiliaryFunctions/isnan/sisnana.c new file mode 100644 index 00000000..31574376 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/sisnana.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "isnan.h" + + +void sisnana(float* in, int size, float* out){ + int i=0; + + for (i=0;i +#define isnan(x) _isnan((double)x) +#endif + +#include "isnan.h" + +float sisnans(float in) { + return isnan(in) ? (float)1 :(float)0; +} + diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.c b/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.c new file mode 100644 index 00000000..6e14cd5b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.c @@ -0,0 +1,157 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* FIXME : Must improve isnan rules and remove define. */ +#define NDEBUG + +#include "testIsNan.h" + +int sisnansTest() { + int result = 0; + float fA=0.0f; + float fB=0.0f; + float nan = fA / fB; + float full = 1.23456789f; + + printf(">> Float \n"); + if ((bool)sisnans(nan) == false) { + printf("ERROR ! : Test Failed (Must be nan)\n"); + result = ERROR; + } + assert (sisnans(nan) == true); + + if ((bool)sisnans(full) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(sisnans(full) == false); + + return result; +} + +int disnansTest() { + int result = 0; + double dA = 0.; + double dB = 0.; + double nan = dA / dB; + double full = 1.456789321861; + + printf(">> Double\n"); + if ((bool)disnans(nan) == false) { + printf("ERROR ! : Test Failed (Must be nan)\n"); + result = ERROR; + } + assert(disnans(nan) == true); + + if ((bool)disnans(full) == true) { + printf("ERROR ! : Test Failed (non nan array)\n"); + result = ERROR; + } + assert(disnans(full) == false); + + return result; +} + +int cisnansTest() { + int result = 0; + float fA = 0.; + float fB = 0.; + floatComplex nan_nan = FloatComplex(fA/fB, fA/fB); + floatComplex nan_real = FloatComplex(fA/fB, 1.123456789f); + floatComplex real_nan = FloatComplex(1.123456789f, fA/fB); + floatComplex full = FloatComplex(0.0f,1.0f); + + printf(">> Float Complex\n"); + if ((bool)cisnans(nan_nan) == false) { + printf("ERROR ! : Test Failed (Must be nan)\n"); + result = ERROR; + } + assert (cisnans(nan_nan) == true); + + if ((bool)cisnans(nan_real) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(nan_real) == false); + + if ((bool)cisnans(real_nan) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(real_nan) == false); + + if ((bool)cisnans(full) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(full) == false); + + + return result; +} + +int zisnansTest() { + int result = 0; + float fA = 0.; + float fB = 0.; + floatComplex nan_nan = FloatComplex(fA/fB, fA/fB); + floatComplex nan_real = FloatComplex(fA/fB, 1.123456789f); + floatComplex real_nan = FloatComplex(1.123456789f , fA/fB); + floatComplex full = FloatComplex(0.0f,1.0f); + + printf(">> Double Complex\n"); + if ((bool)cisnans(nan_nan) == false) { + printf("ERROR ! : Test Failed (Must be nan)\n"); + result = ERROR; + } + assert (cisnans(nan_nan) == true); + + if ((bool)cisnans(nan_real) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(nan_real) == false); + + if ((bool)cisnans(real_nan) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(real_nan) == false); + + if ((bool)cisnans(full) == true) { + printf("ERROR ! : Test Failed (Must not be nan)\n"); + result = ERROR; + } + assert(cisnans(full) == false); + + + return result; +} + + +int testIsNan() { + int sisnansTestStatus, disnansTestStatus = 0; + int cisnansTestStatus, zisnansTestStatus = 0; + printf("\n>>>> IsNan Tests\n"); + sisnansTestStatus = sisnansTest(); + disnansTestStatus = disnansTest(); + cisnansTestStatus = cisnansTest(); + zisnansTestStatus = zisnansTest(); + + return (sisnansTestStatus + disnansTestStatus + + cisnansTestStatus + zisnansTestStatus); +} + +int main(void) { + assert(testIsNan() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.h b/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.h new file mode 100644 index 00000000..ee34db84 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/testIsNan.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TESTISNAN_H__ +#define __TESTISNAN_H__ + +#include +#include +#include "isnan.h" + +#define ERROR 51 + +int sisnansTest(void); + +int disnansTest(void); + +int cisnansTest(void); + +int zisnansTest(void); + +int sisnanaTest(void); + +int disnanaTest(void); + +int cisnanaTest(void); + +int zisnanaTest(void); + +int testIsNan(void); + +#endif /* ! __TESTISNAN_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj b/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj new file mode 100644 index 00000000..96df6092 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {18763BD3-2916-4D97-9633-5DAC1A635EDD} + testIsNan + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj.filters new file mode 100644 index 00000000..7dccdb35 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/test_IsNan/testIsNan.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/isnan/zisnana.c b/2.3-1/src/c/auxiliaryFunctions/isnan/zisnana.c new file mode 100644 index 00000000..a6a65596 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/isnan/zisnana.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "isnan.h" + + +void zisnana(doubleComplex* in, int size, double* out){ + int i=0; + + for (i=0;i +#define isnan(x) _isnan((double)x) +#endif + +#include "isnan.h" + +double zisnans(doubleComplex in) { + return (isnan(zreals(in)) || isnan(zimags(in))); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/length/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/length/Makefile.am new file mode 100644 index 00000000..8c51f41c --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/Makefile.am @@ -0,0 +1,37 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libLength_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testLength + +TESTS = testLength + +# +# -*- Length Tests -*- +# +testLength_SOURCES = testLength.h testLength.c +testLength_CFLAGS = $(check_INCLUDES) +testLength_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/length/libLength.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/length/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/length/Makefile.in new file mode 100644 index 00000000..d7bd658c --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/Makefile.in @@ -0,0 +1,611 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testLength$(EXEEXT) +TESTS = testLength$(EXEEXT) +subdir = src/c/auxiliaryFunctions/length +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_testLength_OBJECTS = testLength-testLength.$(OBJEXT) +testLength_OBJECTS = $(am_testLength_OBJECTS) +testLength_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/length/libLength.la +testLength_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testLength_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(testLength_SOURCES) +DIST_SOURCES = $(testLength_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLength_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Length Tests -*- +# +testLength_SOURCES = testLength.h testLength.c +testLength_CFLAGS = $(check_INCLUDES) +testLength_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/length/libLength.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/length/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/length/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testLength$(EXEEXT): $(testLength_OBJECTS) $(testLength_DEPENDENCIES) + @rm -f testLength$(EXEEXT) + $(testLength_LINK) $(testLength_OBJECTS) $(testLength_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testLength-testLength.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +testLength-testLength.o: testLength.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLength_CFLAGS) $(CFLAGS) -MT testLength-testLength.o -MD -MP -MF $(DEPDIR)/testLength-testLength.Tpo -c -o testLength-testLength.o `test -f 'testLength.c' || echo '$(srcdir)/'`testLength.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testLength-testLength.Tpo $(DEPDIR)/testLength-testLength.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testLength.c' object='testLength-testLength.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLength_CFLAGS) $(CFLAGS) -c -o testLength-testLength.o `test -f 'testLength.c' || echo '$(srcdir)/'`testLength.c + +testLength-testLength.obj: testLength.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLength_CFLAGS) $(CFLAGS) -MT testLength-testLength.obj -MD -MP -MF $(DEPDIR)/testLength-testLength.Tpo -c -o testLength-testLength.obj `if test -f 'testLength.c'; then $(CYGPATH_W) 'testLength.c'; else $(CYGPATH_W) '$(srcdir)/testLength.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testLength-testLength.Tpo $(DEPDIR)/testLength-testLength.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testLength.c' object='testLength-testLength.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLength_CFLAGS) $(CFLAGS) -c -o testLength-testLength.obj `if test -f 'testLength.c'; then $(CYGPATH_W) 'testLength.c'; else $(CYGPATH_W) '$(srcdir)/testLength.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/length/testLength.c b/2.3-1/src/c/auxiliaryFunctions/length/testLength.c new file mode 100644 index 00000000..339884f0 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/testLength.c @@ -0,0 +1,106 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLength.h" + +int slengthaTest() { + float goodArray[5] = {0.,2.,3.,5.,10.}; + float badArray[5] = {0.,0.,0.,0.,0.}; + + /* Only to avoid gss unused variable warning */ + goodArray[4] = 10.0f; + badArray[4] = 0.0f; + + printf(">> Floats \n"); + assert(slengtha(goodArray, 5) == 5); + assert(slengtha(badArray, 5) == 5); + return 0; +} + +int dlengthaTest() { + double goodArray[5] = {0.,2.,3.,5.,10.}; + double badArray[5] = {0.,0.,0.,0.,0.}; + + /* Only to avoid gss unused variable warning */ + goodArray[4] = 10.0; + badArray[4] = 0.0; + + printf(">> Doubles \n"); + assert(dlengtha(goodArray, 5) == 5); + assert(dlengtha(badArray, 5) == 5); + return 0; +} + +int clengthaTest() { + floatComplex goodArray[5]; + floatComplex badArray[5]; + + /* Good values in goodArray */ + goodArray[0] = FloatComplex(0., 0.); + goodArray[1] = FloatComplex(0., 2.); + goodArray[2] = FloatComplex(3., 50.); + goodArray[3] = FloatComplex(5., 10.); + goodArray[4] = FloatComplex(10., -10.); + /* Bad values in badArray */ + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + + printf(">> Float Complex \n"); + assert(clengtha(goodArray, 5) == 5); + assert(clengtha(badArray, 5) == 5); + return 0; +} + +int zlengthaTest() { + doubleComplex goodArray[5]; + doubleComplex badArray[5]; + + /* Good values in goodArray. */ + goodArray[0] = DoubleComplex(0., 0.); + goodArray[1] = DoubleComplex(0., 2.); + goodArray[2] = DoubleComplex(3., 50.); + goodArray[3] = DoubleComplex(5., 10.); + goodArray[4] = DoubleComplex(10., -10.); + /* Bad values in badArray */ + badArray[0] = DoubleComplex(0., 0.); + badArray[1] = DoubleComplex(0., 0.); + badArray[2] = DoubleComplex(0., 0.); + badArray[3] = DoubleComplex(0., 0.); + badArray[4] = DoubleComplex(0., 0.); + + printf(">> Double Complex \n"); + assert(zlengtha(goodArray, 5) == 5); + assert(zlengtha(goodArray, 5) == 5); + return 0; +} + +int testLength() { + int slengthaStatus, dlengthaStatus = 0; + int clengthaStatus, zlengthaStatus = 0; + + printf(">>>> Length Tests\n"); + slengthaStatus = slengthaTest(); + dlengthaStatus = dlengthaTest(); + clengthaStatus = clengthaTest(); + zlengthaStatus = zlengthaTest(); + + return (slengthaStatus + dlengthaStatus + + clengthaStatus + zlengthaStatus); +} + +int main(void) { + assert(testLength() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/length/testLength.h b/2.3-1/src/c/auxiliaryFunctions/length/testLength.h new file mode 100644 index 00000000..f8e27325 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/testLength.h @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTLENGTH_H_ +#define _TESTLENGTH_H_ + +#include +#include + +#include "floatComplex.h" +#include "doubleComplex.h" +#include "length.h" + +int slengthaTest(void); + +int dlengthaTest(void); + +int clengthaTest(void); + +int zlengthaTest(void); + +int testLength(void); + +#endif /* ! _TESTLENGTH_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj b/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj new file mode 100644 index 00000000..f50d88d7 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A4626E50-DDD7-44E1-83FC-05BF396AF250} + testLength + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj.filters new file mode 100644 index 00000000..ff0141df --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/length/test_Length/testLength.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.am new file mode 100644 index 00000000..4cf06ea4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.am @@ -0,0 +1,58 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libPythag_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libPythag.la + +libPythag_la_SOURCES = $(HEAD) $(SRC) + +SRC = spythags.c \ + dpythags.c \ + cpythags.c \ + zpythags.c + +HEAD = ../includes/pythag.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testPythag + +TESTS = testPythag + +# +# -*- Pythag Tests -*- +# +testPythag_SOURCES = testPythag.h testPythag.c +testPythag_CFLAGS = $(check_INCLUDES) +testPythag_LDADD = $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.in new file mode 100644 index 00000000..3cc42cd7 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/Makefile.in @@ -0,0 +1,737 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testPythag$(EXEEXT) +TESTS = testPythag$(EXEEXT) +subdir = src/c/auxiliaryFunctions/pythag +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libPythag_la_LIBADD = +am__objects_1 = +am__objects_2 = libPythag_la-spythags.lo libPythag_la-dpythags.lo \ + libPythag_la-cpythags.lo libPythag_la-zpythags.lo +am_libPythag_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libPythag_la_OBJECTS = $(am_libPythag_la_OBJECTS) +libPythag_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libPythag_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testPythag_OBJECTS = testPythag-testPythag.$(OBJEXT) +testPythag_OBJECTS = $(am_testPythag_OBJECTS) +testPythag_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testPythag_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testPythag_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libPythag_la_SOURCES) $(testPythag_SOURCES) +DIST_SOURCES = $(libPythag_la_SOURCES) $(testPythag_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libPythag_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libPythag.la +libPythag_la_SOURCES = $(HEAD) $(SRC) +SRC = spythags.c \ + dpythags.c \ + cpythags.c \ + zpythags.c + +HEAD = ../includes/pythag.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Pythag Tests -*- +# +testPythag_SOURCES = testPythag.h testPythag.c +testPythag_CFLAGS = $(check_INCLUDES) +testPythag_LDADD = $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/pythag/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/pythag/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libPythag.la: $(libPythag_la_OBJECTS) $(libPythag_la_DEPENDENCIES) + $(libPythag_la_LINK) -rpath $(pkglibdir) $(libPythag_la_OBJECTS) $(libPythag_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testPythag$(EXEEXT): $(testPythag_OBJECTS) $(testPythag_DEPENDENCIES) + @rm -f testPythag$(EXEEXT) + $(testPythag_LINK) $(testPythag_OBJECTS) $(testPythag_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPythag_la-cpythags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPythag_la-dpythags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPythag_la-spythags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPythag_la-zpythags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testPythag-testPythag.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libPythag_la-spythags.lo: spythags.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -MT libPythag_la-spythags.lo -MD -MP -MF $(DEPDIR)/libPythag_la-spythags.Tpo -c -o libPythag_la-spythags.lo `test -f 'spythags.c' || echo '$(srcdir)/'`spythags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPythag_la-spythags.Tpo $(DEPDIR)/libPythag_la-spythags.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spythags.c' object='libPythag_la-spythags.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -c -o libPythag_la-spythags.lo `test -f 'spythags.c' || echo '$(srcdir)/'`spythags.c + +libPythag_la-dpythags.lo: dpythags.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -MT libPythag_la-dpythags.lo -MD -MP -MF $(DEPDIR)/libPythag_la-dpythags.Tpo -c -o libPythag_la-dpythags.lo `test -f 'dpythags.c' || echo '$(srcdir)/'`dpythags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPythag_la-dpythags.Tpo $(DEPDIR)/libPythag_la-dpythags.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpythags.c' object='libPythag_la-dpythags.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -c -o libPythag_la-dpythags.lo `test -f 'dpythags.c' || echo '$(srcdir)/'`dpythags.c + +libPythag_la-cpythags.lo: cpythags.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -MT libPythag_la-cpythags.lo -MD -MP -MF $(DEPDIR)/libPythag_la-cpythags.Tpo -c -o libPythag_la-cpythags.lo `test -f 'cpythags.c' || echo '$(srcdir)/'`cpythags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPythag_la-cpythags.Tpo $(DEPDIR)/libPythag_la-cpythags.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpythags.c' object='libPythag_la-cpythags.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -c -o libPythag_la-cpythags.lo `test -f 'cpythags.c' || echo '$(srcdir)/'`cpythags.c + +libPythag_la-zpythags.lo: zpythags.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -MT libPythag_la-zpythags.lo -MD -MP -MF $(DEPDIR)/libPythag_la-zpythags.Tpo -c -o libPythag_la-zpythags.lo `test -f 'zpythags.c' || echo '$(srcdir)/'`zpythags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPythag_la-zpythags.Tpo $(DEPDIR)/libPythag_la-zpythags.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zpythags.c' object='libPythag_la-zpythags.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPythag_la_CFLAGS) $(CFLAGS) -c -o libPythag_la-zpythags.lo `test -f 'zpythags.c' || echo '$(srcdir)/'`zpythags.c + +testPythag-testPythag.o: testPythag.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testPythag_CFLAGS) $(CFLAGS) -MT testPythag-testPythag.o -MD -MP -MF $(DEPDIR)/testPythag-testPythag.Tpo -c -o testPythag-testPythag.o `test -f 'testPythag.c' || echo '$(srcdir)/'`testPythag.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testPythag-testPythag.Tpo $(DEPDIR)/testPythag-testPythag.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testPythag.c' object='testPythag-testPythag.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testPythag_CFLAGS) $(CFLAGS) -c -o testPythag-testPythag.o `test -f 'testPythag.c' || echo '$(srcdir)/'`testPythag.c + +testPythag-testPythag.obj: testPythag.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testPythag_CFLAGS) $(CFLAGS) -MT testPythag-testPythag.obj -MD -MP -MF $(DEPDIR)/testPythag-testPythag.Tpo -c -o testPythag-testPythag.obj `if test -f 'testPythag.c'; then $(CYGPATH_W) 'testPythag.c'; else $(CYGPATH_W) '$(srcdir)/testPythag.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testPythag-testPythag.Tpo $(DEPDIR)/testPythag-testPythag.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testPythag.c' object='testPythag-testPythag.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testPythag_CFLAGS) $(CFLAGS) -c -o testPythag-testPythag.obj `if test -f 'testPythag.c'; then $(CYGPATH_W) 'testPythag.c'; else $(CYGPATH_W) '$(srcdir)/testPythag.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/cpythags.c b/2.3-1/src/c/auxiliaryFunctions/pythag/cpythags.c new file mode 100644 index 00000000..2f4ad33d --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/cpythags.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pythag.h" + +floatComplex cpythags(floatComplex x, floatComplex y) { + return (csqrts( cadds(cmuls(x,x), + cmuls(y,y)) )); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/dpythags.c b/2.3-1/src/c/auxiliaryFunctions/pythag/dpythags.c new file mode 100644 index 00000000..9e2c09a6 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/dpythags.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pythag.h" + +double dpythags(double x, double y) { + return (dsqrts( (x*x) + (y*y) ) ); +} + diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/spythags.c b/2.3-1/src/c/auxiliaryFunctions/pythag/spythags.c new file mode 100644 index 00000000..64d22a47 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/spythags.c @@ -0,0 +1,17 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pythag.h" + +float spythags(float x, float y) { + return (ssqrts( (x*x) + (y*y) )); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.c b/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.c new file mode 100644 index 00000000..81e92b71 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.c @@ -0,0 +1,52 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testPythag.h" + +int spythagsTest() { + float value1 = -3; + float value2 = 4; + + printf(">> Floats \n"); + assert(spythags(value1, value2) == 5); + assert(spythags(0, 0) == 0); + assert(spythags(-3, 0) == 3); + assert(spythags(3, 0) == 3); + return 0; +} + +int dpythagsTest() { + double value1 = -3; + double value2 = 4; + + printf(">> Doubles \n"); + assert(dpythags(value1, value2) == 5); + assert(dpythags(0, 0) == 0); + assert(dpythags(-3, 0) == 3); + assert(dpythags(3, 0) == 3); + return 0; +} + +int testPythag() { + int spythagsStatus, dpythagsStatus = 0; + + printf(">>>> Pythag Tests\n"); + spythagsStatus = spythagsTest(); + dpythagsStatus = dpythagsTest(); + + return (spythagsStatus + dpythagsStatus); +} + +int main(void) { + assert(testPythag() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.h b/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.h new file mode 100644 index 00000000..f2981db4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/testPythag.h @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTPYTHAG_H_ +#define _TESTPYTHAG_H_ + +#include +#include + +#include "pythag.h" + +int spythagsTest(void); + +int dpythagsTest(void); + +int testPythag(void); + +#endif /* ! _TESTPYTHAG_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj b/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj new file mode 100644 index 00000000..7701234c --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {10F6C306-FD81-45F3-936B-CDF8213A88E6} + testPythag + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj.filters new file mode 100644 index 00000000..4c2c3c9d --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/test_Pythag/testPythag.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/pythag/zpythags.c b/2.3-1/src/c/auxiliaryFunctions/pythag/zpythags.c new file mode 100644 index 00000000..5ba7dba9 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/pythag/zpythags.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pythag.h" + +doubleComplex zpythags(doubleComplex x, doubleComplex y) { + return (zsqrts( zadds(zmuls(x,x), + zmuls(y,y)) )); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.am new file mode 100644 index 00000000..5a7edb4e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.am @@ -0,0 +1,52 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libRand_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libRand.la + +libRand_la_SOURCES = $(HEAD) $(SRC) + +SRC = srands.c \ + drands.c \ + crands.c \ + zrands.c \ + sranda.c \ + dranda.c \ + cranda.c \ + zranda.c + +HEAD = ../includes/rand.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testRand + +TESTS = testRand + +# +# -*- Rand Tests -*- +# +testRand_SOURCES = testRand.h testRand.c +testRand_CFLAGS = $(check_INCLUDES) +testRand_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/rand/libRand.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.in new file mode 100644 index 00000000..eff51ad3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/Makefile.in @@ -0,0 +1,758 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testRand$(EXEEXT) +TESTS = testRand$(EXEEXT) +subdir = src/c/auxiliaryFunctions/rand +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libRand_la_LIBADD = +am__objects_1 = +am__objects_2 = libRand_la-srands.lo libRand_la-drands.lo \ + libRand_la-crands.lo libRand_la-zrands.lo libRand_la-sranda.lo \ + libRand_la-dranda.lo libRand_la-cranda.lo libRand_la-zranda.lo +am_libRand_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libRand_la_OBJECTS = $(am_libRand_la_OBJECTS) +libRand_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libRand_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testRand_OBJECTS = testRand-testRand.$(OBJEXT) +testRand_OBJECTS = $(am_testRand_OBJECTS) +testRand_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/rand/libRand.la +testRand_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testRand_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libRand_la_SOURCES) $(testRand_SOURCES) +DIST_SOURCES = $(libRand_la_SOURCES) $(testRand_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libRand_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libRand.la +libRand_la_SOURCES = $(HEAD) $(SRC) +SRC = srands.c \ + drands.c \ + crands.c \ + zrands.c \ + sranda.c \ + dranda.c \ + cranda.c \ + zranda.c + +HEAD = ../includes/rand.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Rand Tests -*- +# +testRand_SOURCES = testRand.h testRand.c +testRand_CFLAGS = $(check_INCLUDES) +testRand_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/rand/libRand.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/rand/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/rand/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libRand.la: $(libRand_la_OBJECTS) $(libRand_la_DEPENDENCIES) + $(libRand_la_LINK) -rpath $(pkglibdir) $(libRand_la_OBJECTS) $(libRand_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testRand$(EXEEXT): $(testRand_OBJECTS) $(testRand_DEPENDENCIES) + @rm -f testRand$(EXEEXT) + $(testRand_LINK) $(testRand_OBJECTS) $(testRand_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-cranda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-crands.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-dranda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-drands.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-sranda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-srands.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-zranda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRand_la-zrands.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRand-testRand.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libRand_la-srands.lo: srands.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-srands.lo -MD -MP -MF $(DEPDIR)/libRand_la-srands.Tpo -c -o libRand_la-srands.lo `test -f 'srands.c' || echo '$(srcdir)/'`srands.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-srands.Tpo $(DEPDIR)/libRand_la-srands.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srands.c' object='libRand_la-srands.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-srands.lo `test -f 'srands.c' || echo '$(srcdir)/'`srands.c + +libRand_la-drands.lo: drands.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-drands.lo -MD -MP -MF $(DEPDIR)/libRand_la-drands.Tpo -c -o libRand_la-drands.lo `test -f 'drands.c' || echo '$(srcdir)/'`drands.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-drands.Tpo $(DEPDIR)/libRand_la-drands.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drands.c' object='libRand_la-drands.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-drands.lo `test -f 'drands.c' || echo '$(srcdir)/'`drands.c + +libRand_la-crands.lo: crands.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-crands.lo -MD -MP -MF $(DEPDIR)/libRand_la-crands.Tpo -c -o libRand_la-crands.lo `test -f 'crands.c' || echo '$(srcdir)/'`crands.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-crands.Tpo $(DEPDIR)/libRand_la-crands.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crands.c' object='libRand_la-crands.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-crands.lo `test -f 'crands.c' || echo '$(srcdir)/'`crands.c + +libRand_la-zrands.lo: zrands.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-zrands.lo -MD -MP -MF $(DEPDIR)/libRand_la-zrands.Tpo -c -o libRand_la-zrands.lo `test -f 'zrands.c' || echo '$(srcdir)/'`zrands.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-zrands.Tpo $(DEPDIR)/libRand_la-zrands.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrands.c' object='libRand_la-zrands.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-zrands.lo `test -f 'zrands.c' || echo '$(srcdir)/'`zrands.c + +libRand_la-sranda.lo: sranda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-sranda.lo -MD -MP -MF $(DEPDIR)/libRand_la-sranda.Tpo -c -o libRand_la-sranda.lo `test -f 'sranda.c' || echo '$(srcdir)/'`sranda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-sranda.Tpo $(DEPDIR)/libRand_la-sranda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sranda.c' object='libRand_la-sranda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-sranda.lo `test -f 'sranda.c' || echo '$(srcdir)/'`sranda.c + +libRand_la-dranda.lo: dranda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-dranda.lo -MD -MP -MF $(DEPDIR)/libRand_la-dranda.Tpo -c -o libRand_la-dranda.lo `test -f 'dranda.c' || echo '$(srcdir)/'`dranda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-dranda.Tpo $(DEPDIR)/libRand_la-dranda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dranda.c' object='libRand_la-dranda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-dranda.lo `test -f 'dranda.c' || echo '$(srcdir)/'`dranda.c + +libRand_la-cranda.lo: cranda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-cranda.lo -MD -MP -MF $(DEPDIR)/libRand_la-cranda.Tpo -c -o libRand_la-cranda.lo `test -f 'cranda.c' || echo '$(srcdir)/'`cranda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-cranda.Tpo $(DEPDIR)/libRand_la-cranda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cranda.c' object='libRand_la-cranda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-cranda.lo `test -f 'cranda.c' || echo '$(srcdir)/'`cranda.c + +libRand_la-zranda.lo: zranda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -MT libRand_la-zranda.lo -MD -MP -MF $(DEPDIR)/libRand_la-zranda.Tpo -c -o libRand_la-zranda.lo `test -f 'zranda.c' || echo '$(srcdir)/'`zranda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRand_la-zranda.Tpo $(DEPDIR)/libRand_la-zranda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zranda.c' object='libRand_la-zranda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRand_la_CFLAGS) $(CFLAGS) -c -o libRand_la-zranda.lo `test -f 'zranda.c' || echo '$(srcdir)/'`zranda.c + +testRand-testRand.o: testRand.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRand_CFLAGS) $(CFLAGS) -MT testRand-testRand.o -MD -MP -MF $(DEPDIR)/testRand-testRand.Tpo -c -o testRand-testRand.o `test -f 'testRand.c' || echo '$(srcdir)/'`testRand.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRand-testRand.Tpo $(DEPDIR)/testRand-testRand.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRand.c' object='testRand-testRand.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRand_CFLAGS) $(CFLAGS) -c -o testRand-testRand.o `test -f 'testRand.c' || echo '$(srcdir)/'`testRand.c + +testRand-testRand.obj: testRand.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRand_CFLAGS) $(CFLAGS) -MT testRand-testRand.obj -MD -MP -MF $(DEPDIR)/testRand-testRand.Tpo -c -o testRand-testRand.obj `if test -f 'testRand.c'; then $(CYGPATH_W) 'testRand.c'; else $(CYGPATH_W) '$(srcdir)/testRand.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRand-testRand.Tpo $(DEPDIR)/testRand-testRand.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRand.c' object='testRand-testRand.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRand_CFLAGS) $(CFLAGS) -c -o testRand-testRand.obj `if test -f 'testRand.c'; then $(CYGPATH_W) 'testRand.c'; else $(CYGPATH_W) '$(srcdir)/testRand.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/cranda.c b/2.3-1/src/c/auxiliaryFunctions/rand/cranda.c new file mode 100644 index 00000000..12dda29e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/cranda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +void cranda(floatComplex *out, int size) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = crands(); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/crands.c b/2.3-1/src/c/auxiliaryFunctions/rand/crands.c new file mode 100644 index 00000000..82b1a620 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/crands.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +floatComplex crands(void) { + /* FIXME : Implementation */ + return FloatComplex(0, 0); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/dranda.c b/2.3-1/src/c/auxiliaryFunctions/rand/dranda.c new file mode 100644 index 00000000..f4678279 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/dranda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +void dranda(double *out, int size) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = drands(); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/drands.c b/2.3-1/src/c/auxiliaryFunctions/rand/drands.c new file mode 100644 index 00000000..9b7c4cf4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/drands.c @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +/* + URAND, A UNIVERSAL RANDOM NUMBER GENERATOR + BY, MICHAEL A. MALCOLM, CLEVE B. MOLER, + STAN-CS-73-334, JANUARY 1973, + COMPUTER SCIENCE DEPARTMENT, + School of Humanities and Sciences, STANFORD UNIVERSITY, + ftp://reports.stanford.edu/pub/cstr/reports/cs/tr/73/334/CS-TR-73-334.pdf + +*/ + + + +#include "rand.h" +#include + +double drands(void) { + int m=1; + const int itwo=2; + static int m2=0,halfm=0,ia=0, ic=0, mic=0, iy=0; + static double s=0.0; + + if (m2==0){ + /* if first entry, compute machine integer word length */ + while (m>m2){ + m2=m; + m=itwo*m2; + } + halfm = m2; + + /* compute multiplier and increment for linear congruential method */ + ia = 8*(int)(halfm*atan(1.0)/8.0) + 5; + ic = 2*(int)(halfm*(0.5-sqrt(3.0)/6.0)) + 1; + mic = (m2 - ic) + m2; + + /* s is the scale factor for converting to floating point */ + s = 0.5/halfm; + } + + /* compute next random number */ + iy = iy*ia; + + /* the following statement is for computers which do not allow + integer overflow on addition */ + if (iy > mic) iy = (iy - m2) - m2; + + iy = iy + ic; + + /* the following statement is for computers where the + word length for addition is greater than for multiplication */ + if (iy/2 > m2) iy = (iy - m2) - m2; + + /* the following statement is for computers where integer + overflow affects the sign bit */ + if (iy < 0) iy = (iy + m2) + m2; + return (double)iy*s; +} + + diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/sranda.c b/2.3-1/src/c/auxiliaryFunctions/rand/sranda.c new file mode 100644 index 00000000..e6203e3e --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/sranda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +void sranda(float *out, int size) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = srands(); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/srands.c b/2.3-1/src/c/auxiliaryFunctions/rand/srands.c new file mode 100644 index 00000000..8196d7cd --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/srands.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +float srands(void) { + /* FIXME : need some code */ + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/testRand.c b/2.3-1/src/c/auxiliaryFunctions/rand/testRand.c new file mode 100644 index 00000000..c57b69da --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/testRand.c @@ -0,0 +1,101 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "testRand.h" + +/* + +int drandsTest() { + + double nan = 0.0 / 0.0; + double result = nan; + int i=0; + printf(">> Double\n"); + for (i=0;i<10;i++){ + result = drands(); + printf("%1.20f\n",result); + } + + assert(&result != &nan); + + return 0; +} +*/ + +/* +int zrandsTest() { + + double nan = 0.0 / 0.0; + doubleComplex result = DoubleComplex(nan,nan); + int i=0; + printf(">> DoubleComplex\n"); + for (i=0;i<10;i++){ + result = zrands(); + printf("%1.20f+%1.20f\n",zreals(result),zimags(result)); + } + + assert(zreals(result) != nan); + + return 0; +} +*/ + + +int drandaTest() { + int i; + double dA = 0.0; + double nan = dA / dA; + double *result; + result=(double*)malloc((unsigned int)12*sizeof(double)); + printf(">> Double Array\n"); + dranda(result,12); + for (i=0;i<12;i++){ + printf("%1.20f\n",result[i]); + + assert(result[i] != nan);} + free(result); + return 0; +} + + +/* +int zrandaTest() { + int i; + double nan = 0.0 / 0.0; + doubleComplex *result; + result=malloc((uint)12*sizeof(doubleComplex)); + printf(">> DoubleComplex Array\n"); + zranda(result,12); + for (i=0;i<12;i++){ + printf("%1.20f+%1.20f\n",zreals(result[i]),zimags(result[i])); + + assert(zreals(result[i]) != nan);} + free(result); + + return 0; +} +*/ + +int testRand() { +/* int drandsTestStatus = 0;*/ + int zrandaTestStatus = 0; + printf("\n>>>> Rand Tests\n"); + /* drandsTestStatus = drandsTest();*/ + zrandaTestStatus = drandaTest(); + return (zrandaTestStatus); +} + +int main(void) { + assert(testRand() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/testRand.h b/2.3-1/src/c/auxiliaryFunctions/rand/testRand.h new file mode 100644 index 00000000..48f05788 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/testRand.h @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TESTRAND_H__ +#define __TESTRAND_H__ + +#include +#include +#include "rand.h" + +#define ERROR 51 + +int srandsTest(void); + +int drandsTest(void); +int drandaTest(void); +int crandsTest(void); + +int zrandsTest(void); +int zrandaTest(void); +int testRand(void); + +#endif /* ! __TESTRAND_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj b/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj new file mode 100644 index 00000000..a6ffe249 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {31BBBDB6-9E46-4227-A8E3-9A1942DBD05E} + testRand + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj.filters new file mode 100644 index 00000000..a2ac28e9 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/test_Rand/testRand.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/zranda.c b/2.3-1/src/c/auxiliaryFunctions/rand/zranda.c new file mode 100644 index 00000000..a9b9c895 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/zranda.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" +#include +void zranda(doubleComplex *out, int size) { + int i = 0; + + for (i = 0 ; i < size ; ++i) { + out[i] = DoubleComplex(drands(), 0); + } + + for (i = 0 ; i < size ; ++i) { + out[i] = DoubleComplex(zreals(out[i]), drands()); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/rand/zrands.c b/2.3-1/src/c/auxiliaryFunctions/rand/zrands.c new file mode 100644 index 00000000..3011545f --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/rand/zrands.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "rand.h" + +doubleComplex zrands(void) { + double Real_rand=drands(); + double Imag_rand=drands(); + return DoubleComplex(Real_rand,Imag_rand ); + + /* We can't do return DoubleComplex(drands(),drands()) + cause the result is false; it give imag+real*i instead of real+imag*i */ +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.am new file mode 100644 index 00000000..4060373a --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.am @@ -0,0 +1,60 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSign_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSign.la + +libSign_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssigns.c \ + dsigns.c \ + csigns.c \ + zsigns.c \ + ssigna.c \ + dsigna.c \ + csigna.c \ + zsigna.c + +HEAD = ../includes/sign.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +check_PROGRAMS = testSign + +TESTS = testSign + +# +# -*- Sign Tests -*- +# +testSign_SOURCES = testSign.h testSign.c +testSign_CFLAGS = $(check_INCLUDES) +testSign_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.in new file mode 100644 index 00000000..ab42d154 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/Makefile.in @@ -0,0 +1,772 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testSign$(EXEEXT) +TESTS = testSign$(EXEEXT) +subdir = src/c/auxiliaryFunctions/sign +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSign_la_LIBADD = +am__objects_1 = +am__objects_2 = libSign_la-ssigns.lo libSign_la-dsigns.lo \ + libSign_la-csigns.lo libSign_la-zsigns.lo libSign_la-ssigna.lo \ + libSign_la-dsigna.lo libSign_la-csigna.lo libSign_la-zsigna.lo +am_libSign_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSign_la_OBJECTS = $(am_libSign_la_OBJECTS) +libSign_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSign_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testSign_OBJECTS = testSign-testSign.$(OBJEXT) +testSign_OBJECTS = $(am_testSign_OBJECTS) +testSign_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testSign_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testSign_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSign_la_SOURCES) $(testSign_SOURCES) +DIST_SOURCES = $(libSign_la_SOURCES) $(testSign_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSign_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSign.la +libSign_la_SOURCES = $(HEAD) $(SRC) +SRC = ssigns.c \ + dsigns.c \ + csigns.c \ + zsigns.c \ + ssigna.c \ + dsigna.c \ + csigna.c \ + zsigna.c + +HEAD = ../includes/sign.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + +# +# -*- Sign Tests -*- +# +testSign_SOURCES = testSign.h testSign.c +testSign_CFLAGS = $(check_INCLUDES) +testSign_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/sign/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/sign/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSign.la: $(libSign_la_OBJECTS) $(libSign_la_DEPENDENCIES) + $(libSign_la_LINK) -rpath $(pkglibdir) $(libSign_la_OBJECTS) $(libSign_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testSign$(EXEEXT): $(testSign_OBJECTS) $(testSign_DEPENDENCIES) + @rm -f testSign$(EXEEXT) + $(testSign_LINK) $(testSign_OBJECTS) $(testSign_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-csigna.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-csigns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-dsigna.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-dsigns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-ssigna.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-ssigns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-zsigna.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSign_la-zsigns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSign-testSign.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSign_la-ssigns.lo: ssigns.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-ssigns.lo -MD -MP -MF $(DEPDIR)/libSign_la-ssigns.Tpo -c -o libSign_la-ssigns.lo `test -f 'ssigns.c' || echo '$(srcdir)/'`ssigns.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-ssigns.Tpo $(DEPDIR)/libSign_la-ssigns.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssigns.c' object='libSign_la-ssigns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-ssigns.lo `test -f 'ssigns.c' || echo '$(srcdir)/'`ssigns.c + +libSign_la-dsigns.lo: dsigns.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-dsigns.lo -MD -MP -MF $(DEPDIR)/libSign_la-dsigns.Tpo -c -o libSign_la-dsigns.lo `test -f 'dsigns.c' || echo '$(srcdir)/'`dsigns.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-dsigns.Tpo $(DEPDIR)/libSign_la-dsigns.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsigns.c' object='libSign_la-dsigns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-dsigns.lo `test -f 'dsigns.c' || echo '$(srcdir)/'`dsigns.c + +libSign_la-csigns.lo: csigns.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-csigns.lo -MD -MP -MF $(DEPDIR)/libSign_la-csigns.Tpo -c -o libSign_la-csigns.lo `test -f 'csigns.c' || echo '$(srcdir)/'`csigns.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-csigns.Tpo $(DEPDIR)/libSign_la-csigns.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csigns.c' object='libSign_la-csigns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-csigns.lo `test -f 'csigns.c' || echo '$(srcdir)/'`csigns.c + +libSign_la-zsigns.lo: zsigns.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-zsigns.lo -MD -MP -MF $(DEPDIR)/libSign_la-zsigns.Tpo -c -o libSign_la-zsigns.lo `test -f 'zsigns.c' || echo '$(srcdir)/'`zsigns.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-zsigns.Tpo $(DEPDIR)/libSign_la-zsigns.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsigns.c' object='libSign_la-zsigns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-zsigns.lo `test -f 'zsigns.c' || echo '$(srcdir)/'`zsigns.c + +libSign_la-ssigna.lo: ssigna.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-ssigna.lo -MD -MP -MF $(DEPDIR)/libSign_la-ssigna.Tpo -c -o libSign_la-ssigna.lo `test -f 'ssigna.c' || echo '$(srcdir)/'`ssigna.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-ssigna.Tpo $(DEPDIR)/libSign_la-ssigna.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssigna.c' object='libSign_la-ssigna.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-ssigna.lo `test -f 'ssigna.c' || echo '$(srcdir)/'`ssigna.c + +libSign_la-dsigna.lo: dsigna.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-dsigna.lo -MD -MP -MF $(DEPDIR)/libSign_la-dsigna.Tpo -c -o libSign_la-dsigna.lo `test -f 'dsigna.c' || echo '$(srcdir)/'`dsigna.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-dsigna.Tpo $(DEPDIR)/libSign_la-dsigna.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsigna.c' object='libSign_la-dsigna.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-dsigna.lo `test -f 'dsigna.c' || echo '$(srcdir)/'`dsigna.c + +libSign_la-csigna.lo: csigna.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-csigna.lo -MD -MP -MF $(DEPDIR)/libSign_la-csigna.Tpo -c -o libSign_la-csigna.lo `test -f 'csigna.c' || echo '$(srcdir)/'`csigna.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-csigna.Tpo $(DEPDIR)/libSign_la-csigna.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csigna.c' object='libSign_la-csigna.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-csigna.lo `test -f 'csigna.c' || echo '$(srcdir)/'`csigna.c + +libSign_la-zsigna.lo: zsigna.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -MT libSign_la-zsigna.lo -MD -MP -MF $(DEPDIR)/libSign_la-zsigna.Tpo -c -o libSign_la-zsigna.lo `test -f 'zsigna.c' || echo '$(srcdir)/'`zsigna.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSign_la-zsigna.Tpo $(DEPDIR)/libSign_la-zsigna.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsigna.c' object='libSign_la-zsigna.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSign_la_CFLAGS) $(CFLAGS) -c -o libSign_la-zsigna.lo `test -f 'zsigna.c' || echo '$(srcdir)/'`zsigna.c + +testSign-testSign.o: testSign.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSign_CFLAGS) $(CFLAGS) -MT testSign-testSign.o -MD -MP -MF $(DEPDIR)/testSign-testSign.Tpo -c -o testSign-testSign.o `test -f 'testSign.c' || echo '$(srcdir)/'`testSign.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSign-testSign.Tpo $(DEPDIR)/testSign-testSign.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSign.c' object='testSign-testSign.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSign_CFLAGS) $(CFLAGS) -c -o testSign-testSign.o `test -f 'testSign.c' || echo '$(srcdir)/'`testSign.c + +testSign-testSign.obj: testSign.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSign_CFLAGS) $(CFLAGS) -MT testSign-testSign.obj -MD -MP -MF $(DEPDIR)/testSign-testSign.Tpo -c -o testSign-testSign.obj `if test -f 'testSign.c'; then $(CYGPATH_W) 'testSign.c'; else $(CYGPATH_W) '$(srcdir)/testSign.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSign-testSign.Tpo $(DEPDIR)/testSign-testSign.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSign.c' object='testSign-testSign.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSign_CFLAGS) $(CFLAGS) -c -o testSign-testSign.obj `if test -f 'testSign.c'; then $(CYGPATH_W) 'testSign.c'; else $(CYGPATH_W) '$(srcdir)/testSign.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/csigna.c b/2.3-1/src/c/auxiliaryFunctions/sign/csigna.c new file mode 100644 index 00000000..478b4689 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/csigna.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +void csigna(floatComplex *in, int size, floatComplex *out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) { + out[i] = csigns(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/csigns.c b/2.3-1/src/c/auxiliaryFunctions/sign/csigns.c new file mode 100644 index 00000000..b054046f --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/csigns.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" +#include "abs.h" + +floatComplex csigns(floatComplex in) { + if ( (creals(in)==0) && (cimags(in)==0) ) return FloatComplex(0,0); + return FloatComplex(creals(in) / cabss(in), cimags(in) / cabss(in)); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/dsigna.c b/2.3-1/src/c/auxiliaryFunctions/sign/dsigna.c new file mode 100644 index 00000000..49e66144 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/dsigna.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +void dsigna(double *in, int size, double *out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) { + out[i] = dsigns(in[i]); + } +} + diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/dsigns.c b/2.3-1/src/c/auxiliaryFunctions/sign/dsigns.c new file mode 100644 index 00000000..66bd2669 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/dsigns.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +double dsigns(double num) { + if (num > 0) { + return 1.0; + } + if (num < 0) { + return -1.0; + } + /* num == 0 */ + return 0.0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/ssigna.c b/2.3-1/src/c/auxiliaryFunctions/sign/ssigna.c new file mode 100644 index 00000000..44f8cf4a --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/ssigna.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +void ssigna(float *in, int size, float *out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) { + out[i] = ssigns(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/ssigns.c b/2.3-1/src/c/auxiliaryFunctions/sign/ssigns.c new file mode 100644 index 00000000..8be78cce --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/ssigns.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +float ssigns(float num) { + if (num > 0) { + return 1.0f; + } + if (num < 0) { + return -1.0f; + } + /* num == 0 */ + return 0.0f; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/testSign.c b/2.3-1/src/c/auxiliaryFunctions/sign/testSign.c new file mode 100644 index 00000000..7f23f8f3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/testSign.c @@ -0,0 +1,106 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +** FIXME : Add some array tests ! +*/ + +#include "testSign.h" + +int ssignsTest() { + + float positive = 0.123f; + float negative = -0.123f; + float zero = 0.0f; + + printf(">> Float \n"); + assert(ssigns(positive) == 1); + assert(ssigns(negative) == -1); + assert(ssigns(zero) == 0); + return 0; +} + +int dsignsTest() { + + double positive = 0.123; + double negative = -0.123; + double zero = 0; + + printf(">> Double\n"); + assert(dsigns(positive) == 1); + assert(dsigns(negative) == -1); + assert(dsigns(zero) == 0); + return 0; +} + +int csignsTest() { + floatComplex zero = FloatComplex(0., 0.); + floatComplex i = FloatComplex(0., 1.); + floatComplex oneAndI = FloatComplex(1., 1.); + floatComplex sign_i = csigns(i); + floatComplex sign_oneAndI = csigns(oneAndI); + floatComplex sign_zero = csigns(zero); + + printf(">> Float Complex\n"); + /* sign(%i) = %i */ + assert(creals(sign_i) == 0); + assert(cimags(sign_i) == 1); + /* sign(1+%i) = (1+%i) / sqrt(2) */ + assert(creals(sign_oneAndI) == 1 / sqrtf(2)); + assert(cimags(sign_oneAndI) == 1 / sqrtf(2)); + /* sign(0) = 0 */ + assert(creals(sign_zero) == 0); + assert(cimags(sign_zero) == 0); + + return 0; +} + +int zsignsTest() { + floatComplex zero = FloatComplex(0., 0.); + doubleComplex i = DoubleComplex(0., 1.); + doubleComplex oneAndI = DoubleComplex(1., 1.); + doubleComplex sign_i = zsigns(i); + doubleComplex sign_oneAndI = zsigns(oneAndI); + floatComplex sign_zero = csigns(zero); + + printf(">> Double Complex\n"); + /* sign(%i) = %i */ + assert(zreals(sign_i) == 0); + assert(zimags(sign_i) == 1); + /* sign(1+%i) = (1+%i) / sqrt(2) */ + assert ( fabs ( zreals(sign_oneAndI) - (sqrt(2.)/2.) ) / fabs( zreals(sign_oneAndI)) < 1e-15) ; + assert ( fabs ( zimags(sign_oneAndI) - 1 / sqrt(2.) ) / fabs( zimags(sign_oneAndI)) < 1e-15) ; + /* sign(0) = 0 */ + assert(creals(sign_zero) == 0); + assert(cimags(sign_zero) == 0); + + return 0; +} + + +int testSign() { + int ssignsTestStatus, dsignsTestStatus = 0; + int csignsTestStatus, zsignsTestStatus = 0; + printf("\n>>>> Sign Tests\n"); + ssignsTestStatus = ssignsTest(); + dsignsTestStatus = dsignsTest(); + csignsTestStatus = csignsTest(); + zsignsTestStatus = zsignsTest(); + + return (ssignsTestStatus + dsignsTestStatus + + csignsTestStatus + zsignsTestStatus); +} + +int main(void) { + assert(testSign() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/testSign.h b/2.3-1/src/c/auxiliaryFunctions/sign/testSign.h new file mode 100644 index 00000000..214f28eb --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/testSign.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TESTSIGN_H__ +#define __TESTSIGN_H__ + +#include +#include +#include "sign.h" + +int ssignsTest(void); + +int dsignsTest(void); + +int csignsTest(void); + +int zsignsTest(void); + +int testSign(void); + +#endif /* ! __TESTSIGN_H__ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj b/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj new file mode 100644 index 00000000..871fd18b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {EEBFAC09-8BD7-4254-9316-57C1907D827E} + testSign + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj.filters new file mode 100644 index 00000000..288bfbe2 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/test_Sign/testSign.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/zsigna.c b/2.3-1/src/c/auxiliaryFunctions/sign/zsigna.c new file mode 100644 index 00000000..eafbfbbf --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/zsigna.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" + +void zsigna(doubleComplex *in, int size, doubleComplex *out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) { + out[i] = zsigns(in[i]); + } +} diff --git a/2.3-1/src/c/auxiliaryFunctions/sign/zsigns.c b/2.3-1/src/c/auxiliaryFunctions/sign/zsigns.c new file mode 100644 index 00000000..a4fed8d4 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/sign/zsigns.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sign.h" +#include "abs.h" + +doubleComplex zsigns(doubleComplex in) { + if ( (zreals(in)==0) && (zimags(in)==0) ) return DoubleComplex(0,0); + return DoubleComplex(zreals(in) / zabss(in), zimags(in) / zabss(in)); +} diff --git a/2.3-1/src/c/auxiliaryFunctions/size/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/size/Makefile.am new file mode 100644 index 00000000..e7eaacaa --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/Makefile.am @@ -0,0 +1,37 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSize_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testSize + +TESTS = testSize + +# +# -*- Size Tests -*- +# +testSize_SOURCES = testSize.h testSize.c +testSize_CFLAGS = $(check_INCLUDES) +testSize_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/size/libSize.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/size/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/size/Makefile.in new file mode 100644 index 00000000..80b14074 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/Makefile.in @@ -0,0 +1,611 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testSize$(EXEEXT) +TESTS = testSize$(EXEEXT) +subdir = src/c/auxiliaryFunctions/size +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_testSize_OBJECTS = testSize-testSize.$(OBJEXT) +testSize_OBJECTS = $(am_testSize_OBJECTS) +testSize_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/size/libSize.la +testSize_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testSize_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(testSize_SOURCES) +DIST_SOURCES = $(testSize_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSize_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Size Tests -*- +# +testSize_SOURCES = testSize.h testSize.c +testSize_CFLAGS = $(check_INCLUDES) +testSize_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/size/libSize.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/size/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/size/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testSize$(EXEEXT): $(testSize_OBJECTS) $(testSize_DEPENDENCIES) + @rm -f testSize$(EXEEXT) + $(testSize_LINK) $(testSize_OBJECTS) $(testSize_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSize-testSize.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +testSize-testSize.o: testSize.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSize_CFLAGS) $(CFLAGS) -MT testSize-testSize.o -MD -MP -MF $(DEPDIR)/testSize-testSize.Tpo -c -o testSize-testSize.o `test -f 'testSize.c' || echo '$(srcdir)/'`testSize.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSize-testSize.Tpo $(DEPDIR)/testSize-testSize.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSize.c' object='testSize-testSize.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSize_CFLAGS) $(CFLAGS) -c -o testSize-testSize.o `test -f 'testSize.c' || echo '$(srcdir)/'`testSize.c + +testSize-testSize.obj: testSize.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSize_CFLAGS) $(CFLAGS) -MT testSize-testSize.obj -MD -MP -MF $(DEPDIR)/testSize-testSize.Tpo -c -o testSize-testSize.obj `if test -f 'testSize.c'; then $(CYGPATH_W) 'testSize.c'; else $(CYGPATH_W) '$(srcdir)/testSize.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSize-testSize.Tpo $(DEPDIR)/testSize-testSize.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSize.c' object='testSize-testSize.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSize_CFLAGS) $(CFLAGS) -c -o testSize-testSize.obj `if test -f 'testSize.c'; then $(CYGPATH_W) 'testSize.c'; else $(CYGPATH_W) '$(srcdir)/testSize.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/size/dallsizea.c b/2.3-1/src/c/auxiliaryFunctions/size/dallsizea.c new file mode 100644 index 00000000..c757fc3d --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/dallsizea.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "size.h" + +double dallsizea(int *size, char *select) +{ + printf("** DEBUG ** select = [%s]\n", select); + if (strcmp(select, "*")) + { + return size[0] * size[1]; + } + if (strcmp(select, "r")) + { + return size[0]; + } + if (strcmp(select, "c")) + { + return size[1]; + } + + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/size/testSize.c b/2.3-1/src/c/auxiliaryFunctions/size/testSize.c new file mode 100644 index 00000000..8effde94 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/testSize.c @@ -0,0 +1,106 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSize.h" + +int ssizeaTest() { + float goodArray[5] = {0.,2.,3.,5.,10.}; + float badArray[5] = {0.,0.,0.,0.,0.}; + + /* Only to avoid gss unused variable warning */ + goodArray[4] = 10.0f; + badArray[4] = 0.0f; + + printf(">> Floats \n"); + assert(ssizea(goodArray, 5) == 5); + assert(ssizea(badArray, 5) == 5); + return 0; +} + +int dsizeaTest() { + double goodArray[5] = {0.,2.,3.,5.,10.}; + double badArray[5] = {0.,0.,0.,0.,0.}; + + /* Only to avoid gss unused variable warning */ + goodArray[4] = 10.0; + badArray[4] = 0.0; + + printf(">> Doubles \n"); + assert(dsizea(goodArray, 5) == 5); + assert(dsizea(badArray, 5) == 5); + return 0; +} + +int csizeaTest() { + floatComplex goodArray[5]; + floatComplex badArray[5]; + + /* Good values in goodArray */ + goodArray[0] = FloatComplex(0., 0.); + goodArray[1] = FloatComplex(0., 2.); + goodArray[2] = FloatComplex(3., 50.); + goodArray[3] = FloatComplex(5., 10.); + goodArray[4] = FloatComplex(10., -10.); + /* Bad values in badArray */ + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + badArray[5] = FloatComplex(0., 0.); + + printf(">> Float Complex \n"); + assert(csizea(goodArray, 5) == 5); + assert(csizea(badArray, 5) == 5); + return 0; +} + +int zsizeaTest() { + doubleComplex goodArray[5]; + doubleComplex badArray[5]; + + /* Good values in goodArray. */ + goodArray[0] = DoubleComplex(0., 0.); + goodArray[1] = DoubleComplex(0., 2.); + goodArray[2] = DoubleComplex(3., 50.); + goodArray[3] = DoubleComplex(5., 10.); + goodArray[4] = DoubleComplex(10., -10.); + /* Bad values in badArray */ + badArray[0] = DoubleComplex(0., 0.); + badArray[1] = DoubleComplex(0., 0.); + badArray[2] = DoubleComplex(0., 0.); + badArray[3] = DoubleComplex(0., 0.); + badArray[4] = DoubleComplex(0., 0.); + + printf(">> Double Complex \n"); + assert(zsizea(goodArray, 5) == 5); + assert(zsizea(goodArray, 5) == 5); + return 0; +} + +int testSize() { + int ssizeaStatus, dsizeaStatus = 0; + int csizeaStatus, zsizeaStatus = 0; + + printf(">>>> Size Tests\n"); + ssizeaStatus = ssizeaTest(); + dsizeaStatus = dsizeaTest(); + csizeaStatus = csizeaTest(); + zsizeaStatus = zsizeaTest(); + + return (ssizeaStatus + dsizeaStatus + + csizeaStatus + zsizeaStatus); +} + +int main(void) { + assert(testSize() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/size/testSize.h b/2.3-1/src/c/auxiliaryFunctions/size/testSize.h new file mode 100644 index 00000000..b26ad7a6 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/testSize.h @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTSIZE_H_ +#define _TESTSIZE_H_ + +#include +#include + +#include "floatComplex.h" +#include "doubleComplex.h" +#include "size.h" + +int ssizeaTest(void); + +int dsizeaTest(void); + +int csizeaTest(void); + +int zsizeaTest(void); + +int testSize(void); + +#endif /* ! _TESTSIZE_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj b/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj new file mode 100644 index 00000000..19309aea --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj @@ -0,0 +1,177 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5D4B1991-549D-48ED-A5F6-CB17F15B72C8} + testSize + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj.filters new file mode 100644 index 00000000..6e0d1d41 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/size/test_Size/testSize.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/type/Makefile.am b/2.3-1/src/c/auxiliaryFunctions/type/Makefile.am new file mode 100644 index 00000000..004ba1b3 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/Makefile.am @@ -0,0 +1,37 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libType_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_PROGRAMS = testType + +TESTS = testType + +# +# -*- Type Tests -*- +# +testType_SOURCES = testType.h testType.c +testType_CFLAGS = $(check_INCLUDES) +testType_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/type/libType.la \ + @LIBMATH@ diff --git a/2.3-1/src/c/auxiliaryFunctions/type/Makefile.in b/2.3-1/src/c/auxiliaryFunctions/type/Makefile.in new file mode 100644 index 00000000..f2e87d49 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/Makefile.in @@ -0,0 +1,611 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testType$(EXEEXT) +TESTS = testType$(EXEEXT) +subdir = src/c/auxiliaryFunctions/type +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am_testType_OBJECTS = testType-testType.$(OBJEXT) +testType_OBJECTS = $(am_testType_OBJECTS) +testType_DEPENDENCIES = \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/type/libType.la +testType_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testType_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(testType_SOURCES) +DIST_SOURCES = $(testType_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libType_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + + +# +# -*- Type Tests -*- +# +testType_SOURCES = testType.h testType.c +testType_CFLAGS = $(check_INCLUDES) +testType_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/auxiliaryFunctions/type/libType.la \ + @LIBMATH@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/type/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/auxiliaryFunctions/type/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testType$(EXEEXT): $(testType_OBJECTS) $(testType_DEPENDENCIES) + @rm -f testType$(EXEEXT) + $(testType_LINK) $(testType_OBJECTS) $(testType_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testType-testType.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +testType-testType.o: testType.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testType_CFLAGS) $(CFLAGS) -MT testType-testType.o -MD -MP -MF $(DEPDIR)/testType-testType.Tpo -c -o testType-testType.o `test -f 'testType.c' || echo '$(srcdir)/'`testType.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testType-testType.Tpo $(DEPDIR)/testType-testType.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testType.c' object='testType-testType.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testType_CFLAGS) $(CFLAGS) -c -o testType-testType.o `test -f 'testType.c' || echo '$(srcdir)/'`testType.c + +testType-testType.obj: testType.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testType_CFLAGS) $(CFLAGS) -MT testType-testType.obj -MD -MP -MF $(DEPDIR)/testType-testType.Tpo -c -o testType-testType.obj `if test -f 'testType.c'; then $(CYGPATH_W) 'testType.c'; else $(CYGPATH_W) '$(srcdir)/testType.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testType-testType.Tpo $(DEPDIR)/testType-testType.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testType.c' object='testType-testType.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testType_CFLAGS) $(CFLAGS) -c -o testType-testType.obj `if test -f 'testType.c'; then $(CYGPATH_W) 'testType.c'; else $(CYGPATH_W) '$(srcdir)/testType.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/auxiliaryFunctions/type/testType.c b/2.3-1/src/c/auxiliaryFunctions/type/testType.c new file mode 100644 index 00000000..f2eafa89 --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/testType.c @@ -0,0 +1,155 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testType.h" +#include "type.h" + +int stypesTest() { + float in = 3.14f; + + /* Only to avoid gcc unused variable */ + ++in; + + assert(stypes(in) == 1); + return 0; +} + +int dtypesTest() { + double in = 3.14; + + /* Only to avoid gcc unused variable */ + ++in; + + assert(dtypes(in) == 1); + return 0; +} + +int ctypesTest() { + floatComplex in = FloatComplex(3.14f, 3.14f); + + /* Only to avoid gcc unused variable */ + creals(in); + + assert(ctypes(in) == 1); + return 0; +} + +int ztypesTest() { + doubleComplex in = DoubleComplex(3.14, 3.14); + + /* Only to avoid gcc unused variable */ + zreals(in); + + assert(ztypes(in) == 1); + return 0; +} + +int stypeaTest() { + float goodArray[5] = {0.0f,2.0f,3.0f,5.0f,10.0f}; + float badArray[5] = {0.0f,0.0f,0.0f,0.0f,0.0f}; + + /* Only to avoid gcc unused variable */ + goodArray[4] = 11.0f; + badArray[4] = 0.0f; + + printf(">> Floats \n"); + assert(stypea(goodArray, 5) == 1); + assert(stypea(badArray, 5) == 1); + return 0; +} + +int dtypeaTest() { + double goodArray[5] = {0.,2.,3.,5.,10.}; + double badArray[5] = {0.,0.,0.,0.,0.}; + + /* Only to avoid gcc unused variable */ + goodArray[4] = 11.0; + badArray[4] = 0.0; + + printf(">> Doubles \n"); + assert(dtypea(goodArray, 5) == 1); + assert(dtypea(badArray, 5) == 1); + return 0; +} + +int ctypeaTest() { + floatComplex goodArray[5]; + floatComplex badArray[5]; + + /* Good values in goodArray */ + goodArray[0] = FloatComplex(0.0f, 0.0f); + goodArray[1] = FloatComplex(0.0f, 2.0f); + goodArray[2] = FloatComplex(3.0f, 50.0f); + goodArray[3] = FloatComplex(5.0f, 10.0f); + goodArray[4] = FloatComplex(10.0f, -10.0f); + /* Bad values in badArray */ + badArray[5] = FloatComplex(0.0f, 0.0f); + badArray[5] = FloatComplex(0.0f, 0.0f); + badArray[5] = FloatComplex(0.0f, 0.0f); + badArray[5] = FloatComplex(0.0f, 0.0f); + badArray[5] = FloatComplex(0.0f, 0.0f); + + printf(">> Float Complex \n"); + assert(ctypea(goodArray, 5) == 1.0f); + assert(ctypea(badArray, 5) == 1.0f); + return 0; +} + +int ztypeaTest() { + doubleComplex goodArray[5]; + doubleComplex badArray[5]; + + /* Good values in goodArray. */ + goodArray[0] = DoubleComplex(0., 0.); + goodArray[1] = DoubleComplex(0., 2.); + goodArray[2] = DoubleComplex(3., 50.); + goodArray[3] = DoubleComplex(5., 10.); + goodArray[4] = DoubleComplex(10., -10.); + /* Bad values in badArray */ + badArray[0] = DoubleComplex(0., 0.); + badArray[1] = DoubleComplex(0., 0.); + badArray[2] = DoubleComplex(0., 0.); + badArray[3] = DoubleComplex(0., 0.); + badArray[4] = DoubleComplex(0., 0.); + + printf(">> Double Complex \n"); + assert(ztypea(goodArray, 5) == 1); + assert(ztypea(goodArray, 5) == 1); + return 0; +} + +int testType() { + int stypesStatus, dtypesStatus = 0; + int ctypesStatus, ztypesStatus = 0; + int stypeaStatus, dtypeaStatus = 0; + int ctypeaStatus, ztypeaStatus = 0; + + printf(">>>> Type Tests\n"); + stypesStatus = stypesTest(); + dtypesStatus = dtypesTest(); + ctypesStatus = ctypesTest(); + ztypesStatus = ztypesTest(); + stypeaStatus = stypeaTest(); + dtypeaStatus = dtypeaTest(); + ctypeaStatus = ctypeaTest(); + ztypeaStatus = ztypeaTest(); + + return (stypesStatus + dtypesStatus + + ctypesStatus + ztypesStatus + + stypeaStatus + dtypeaStatus + + ctypeaStatus + ztypeaStatus); +} + +int main(void) { + assert(testType() == 0); + return 0; +} diff --git a/2.3-1/src/c/auxiliaryFunctions/type/testType.h b/2.3-1/src/c/auxiliaryFunctions/type/testType.h new file mode 100644 index 00000000..1057ac8b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/testType.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTTYPE_H_ +#define _TESTTYPE_H_ + +#include +#include + +#include "floatComplex.h" +#include "doubleComplex.h" +#include "type.h" + +int stypesTest(void); + +int dtypesTest(void); + +int ctypesTest(void); + +int ztypesTest(void); + +int stypeaTest(void); + +int dtypeaTest(void); + +int ctypeaTest(void); + +int ztypeaTest(void); + +int testType(void); + +#endif /* ! _TESTTYPE_H_ */ diff --git a/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj b/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj new file mode 100644 index 00000000..96815e5b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8EB05C91-9405-4AF4-88B4-A6B227409BFB} + testType + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;../../../type;../../../operations/includes;../../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj.filters b/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj.filters new file mode 100644 index 00000000..b6b8675b --- /dev/null +++ b/2.3-1/src/c/auxiliaryFunctions/type/test_Type/testType.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/Makefile.am b/2.3-1/src/c/elementaryFunctions/Makefile.am new file mode 100644 index 00000000..66caa2d4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Makefile.am @@ -0,0 +1,40 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +dist_SUBDIRS= includes + +SUBDIRS= cos \ + cosh \ + acos \ + acosh \ + sin \ + sinh \ + asinh \ + tan \ + tanh \ + atan \ + atanh \ + exp \ + exp10 \ + log \ + log1p \ + log10 \ + sqrt \ + asin \ + lnp1m1 \ + pow \ + atan2\ + ceil\ + floor\ + fix\ + int\ + round diff --git a/2.3-1/src/c/elementaryFunctions/Makefile.in b/2.3-1/src/c/elementaryFunctions/Makefile.in new file mode 100644 index 00000000..d9edd2db --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/Makefile.in @@ -0,0 +1,587 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/elementaryFunctions +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_SUBDIRS = includes +SUBDIRS = cos \ + cosh \ + acos \ + acosh \ + sin \ + sinh \ + asinh \ + tan \ + tanh \ + atan \ + atanh \ + exp \ + exp10 \ + log \ + log1p \ + log10 \ + sqrt \ + asin \ + lnp1m1 \ + pow \ + atan2\ + ceil\ + floor\ + fix\ + int\ + round + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/acos/Makefile.am b/2.3-1/src/c/elementaryFunctions/acos/Makefile.am new file mode 100644 index 00000000..24935987 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/Makefile.am @@ -0,0 +1,73 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAcos_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAcos.la + +libAcos_la_SOURCES = $(HEAD) $(SRC) + +SRC = sacoss.c \ + dacoss.c \ + cacoss.c \ + zacoss.c \ + sacosa.c \ + dacosa.c \ + cacosa.c \ + zacosa.c + +HEAD = ../includes/acos.h \ + ../../auxiliaryFunctions/includes/min.h \ + ../../auxiliaryFunctions/includes/max.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testRealsAcos testCplxAcos + +TESTS = testRealsAcos testCplxAcos + +# +# -*- Acosine Tests -*- +# +testRealsAcos_SOURCES = testAcos.h testRealsAcos.c +testRealsAcos_CFLAGS = $(check_INCLUDES) +testRealsAcos_LDADD = $(check_LDADD) + +testCplxAcos_SOURCES = testAcos.h testCplxAcos.c +testCplxAcos_CFLAGS = $(check_INCLUDES) +testCplxAcos_LDADD = $(check_LDADD) + diff --git a/2.3-1/src/c/elementaryFunctions/acos/Makefile.in b/2.3-1/src/c/elementaryFunctions/acos/Makefile.in new file mode 100644 index 00000000..504e3d15 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/Makefile.in @@ -0,0 +1,813 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testRealsAcos$(EXEEXT) testCplxAcos$(EXEEXT) +TESTS = testRealsAcos$(EXEEXT) testCplxAcos$(EXEEXT) +subdir = src/c/elementaryFunctions/acos +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAcos_la_LIBADD = +am__objects_1 = +am__objects_2 = libAcos_la-sacoss.lo libAcos_la-dacoss.lo \ + libAcos_la-cacoss.lo libAcos_la-zacoss.lo libAcos_la-sacosa.lo \ + libAcos_la-dacosa.lo libAcos_la-cacosa.lo libAcos_la-zacosa.lo +am_libAcos_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAcos_la_OBJECTS = $(am_libAcos_la_OBJECTS) +libAcos_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAcos_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testCplxAcos_OBJECTS = testCplxAcos-testCplxAcos.$(OBJEXT) +testCplxAcos_OBJECTS = $(am_testCplxAcos_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testCplxAcos_DEPENDENCIES = $(am__DEPENDENCIES_1) +testCplxAcos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testCplxAcos_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testRealsAcos_OBJECTS = testRealsAcos-testRealsAcos.$(OBJEXT) +testRealsAcos_OBJECTS = $(am_testRealsAcos_OBJECTS) +testRealsAcos_DEPENDENCIES = $(am__DEPENDENCIES_1) +testRealsAcos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testRealsAcos_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAcos_la_SOURCES) $(testCplxAcos_SOURCES) \ + $(testRealsAcos_SOURCES) +DIST_SOURCES = $(libAcos_la_SOURCES) $(testCplxAcos_SOURCES) \ + $(testRealsAcos_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAcos_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAcos.la +libAcos_la_SOURCES = $(HEAD) $(SRC) +SRC = sacoss.c \ + dacoss.c \ + cacoss.c \ + zacoss.c \ + sacosa.c \ + dacosa.c \ + cacosa.c \ + zacosa.c + +HEAD = ../includes/acos.h \ + ../../auxiliaryFunctions/includes/min.h \ + ../../auxiliaryFunctions/includes/max.h + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Acosine Tests -*- +# +testRealsAcos_SOURCES = testAcos.h testRealsAcos.c +testRealsAcos_CFLAGS = $(check_INCLUDES) +testRealsAcos_LDADD = $(check_LDADD) +testCplxAcos_SOURCES = testAcos.h testCplxAcos.c +testCplxAcos_CFLAGS = $(check_INCLUDES) +testCplxAcos_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/acos/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/acos/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAcos.la: $(libAcos_la_OBJECTS) $(libAcos_la_DEPENDENCIES) + $(libAcos_la_LINK) -rpath $(pkglibdir) $(libAcos_la_OBJECTS) $(libAcos_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testCplxAcos$(EXEEXT): $(testCplxAcos_OBJECTS) $(testCplxAcos_DEPENDENCIES) + @rm -f testCplxAcos$(EXEEXT) + $(testCplxAcos_LINK) $(testCplxAcos_OBJECTS) $(testCplxAcos_LDADD) $(LIBS) +testRealsAcos$(EXEEXT): $(testRealsAcos_OBJECTS) $(testRealsAcos_DEPENDENCIES) + @rm -f testRealsAcos$(EXEEXT) + $(testRealsAcos_LINK) $(testRealsAcos_OBJECTS) $(testRealsAcos_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-cacosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-cacoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-dacosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-dacoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-sacosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-sacoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-zacosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcos_la-zacoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testCplxAcos-testCplxAcos.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRealsAcos-testRealsAcos.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAcos_la-sacoss.lo: sacoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-sacoss.lo -MD -MP -MF $(DEPDIR)/libAcos_la-sacoss.Tpo -c -o libAcos_la-sacoss.lo `test -f 'sacoss.c' || echo '$(srcdir)/'`sacoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-sacoss.Tpo $(DEPDIR)/libAcos_la-sacoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sacoss.c' object='libAcos_la-sacoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-sacoss.lo `test -f 'sacoss.c' || echo '$(srcdir)/'`sacoss.c + +libAcos_la-dacoss.lo: dacoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-dacoss.lo -MD -MP -MF $(DEPDIR)/libAcos_la-dacoss.Tpo -c -o libAcos_la-dacoss.lo `test -f 'dacoss.c' || echo '$(srcdir)/'`dacoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-dacoss.Tpo $(DEPDIR)/libAcos_la-dacoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dacoss.c' object='libAcos_la-dacoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-dacoss.lo `test -f 'dacoss.c' || echo '$(srcdir)/'`dacoss.c + +libAcos_la-cacoss.lo: cacoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-cacoss.lo -MD -MP -MF $(DEPDIR)/libAcos_la-cacoss.Tpo -c -o libAcos_la-cacoss.lo `test -f 'cacoss.c' || echo '$(srcdir)/'`cacoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-cacoss.Tpo $(DEPDIR)/libAcos_la-cacoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cacoss.c' object='libAcos_la-cacoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-cacoss.lo `test -f 'cacoss.c' || echo '$(srcdir)/'`cacoss.c + +libAcos_la-zacoss.lo: zacoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-zacoss.lo -MD -MP -MF $(DEPDIR)/libAcos_la-zacoss.Tpo -c -o libAcos_la-zacoss.lo `test -f 'zacoss.c' || echo '$(srcdir)/'`zacoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-zacoss.Tpo $(DEPDIR)/libAcos_la-zacoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zacoss.c' object='libAcos_la-zacoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-zacoss.lo `test -f 'zacoss.c' || echo '$(srcdir)/'`zacoss.c + +libAcos_la-sacosa.lo: sacosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-sacosa.lo -MD -MP -MF $(DEPDIR)/libAcos_la-sacosa.Tpo -c -o libAcos_la-sacosa.lo `test -f 'sacosa.c' || echo '$(srcdir)/'`sacosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-sacosa.Tpo $(DEPDIR)/libAcos_la-sacosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sacosa.c' object='libAcos_la-sacosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-sacosa.lo `test -f 'sacosa.c' || echo '$(srcdir)/'`sacosa.c + +libAcos_la-dacosa.lo: dacosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-dacosa.lo -MD -MP -MF $(DEPDIR)/libAcos_la-dacosa.Tpo -c -o libAcos_la-dacosa.lo `test -f 'dacosa.c' || echo '$(srcdir)/'`dacosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-dacosa.Tpo $(DEPDIR)/libAcos_la-dacosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dacosa.c' object='libAcos_la-dacosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-dacosa.lo `test -f 'dacosa.c' || echo '$(srcdir)/'`dacosa.c + +libAcos_la-cacosa.lo: cacosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-cacosa.lo -MD -MP -MF $(DEPDIR)/libAcos_la-cacosa.Tpo -c -o libAcos_la-cacosa.lo `test -f 'cacosa.c' || echo '$(srcdir)/'`cacosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-cacosa.Tpo $(DEPDIR)/libAcos_la-cacosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cacosa.c' object='libAcos_la-cacosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-cacosa.lo `test -f 'cacosa.c' || echo '$(srcdir)/'`cacosa.c + +libAcos_la-zacosa.lo: zacosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -MT libAcos_la-zacosa.lo -MD -MP -MF $(DEPDIR)/libAcos_la-zacosa.Tpo -c -o libAcos_la-zacosa.lo `test -f 'zacosa.c' || echo '$(srcdir)/'`zacosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcos_la-zacosa.Tpo $(DEPDIR)/libAcos_la-zacosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zacosa.c' object='libAcos_la-zacosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcos_la_CFLAGS) $(CFLAGS) -c -o libAcos_la-zacosa.lo `test -f 'zacosa.c' || echo '$(srcdir)/'`zacosa.c + +testCplxAcos-testCplxAcos.o: testCplxAcos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testCplxAcos_CFLAGS) $(CFLAGS) -MT testCplxAcos-testCplxAcos.o -MD -MP -MF $(DEPDIR)/testCplxAcos-testCplxAcos.Tpo -c -o testCplxAcos-testCplxAcos.o `test -f 'testCplxAcos.c' || echo '$(srcdir)/'`testCplxAcos.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testCplxAcos-testCplxAcos.Tpo $(DEPDIR)/testCplxAcos-testCplxAcos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testCplxAcos.c' object='testCplxAcos-testCplxAcos.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testCplxAcos_CFLAGS) $(CFLAGS) -c -o testCplxAcos-testCplxAcos.o `test -f 'testCplxAcos.c' || echo '$(srcdir)/'`testCplxAcos.c + +testCplxAcos-testCplxAcos.obj: testCplxAcos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testCplxAcos_CFLAGS) $(CFLAGS) -MT testCplxAcos-testCplxAcos.obj -MD -MP -MF $(DEPDIR)/testCplxAcos-testCplxAcos.Tpo -c -o testCplxAcos-testCplxAcos.obj `if test -f 'testCplxAcos.c'; then $(CYGPATH_W) 'testCplxAcos.c'; else $(CYGPATH_W) '$(srcdir)/testCplxAcos.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testCplxAcos-testCplxAcos.Tpo $(DEPDIR)/testCplxAcos-testCplxAcos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testCplxAcos.c' object='testCplxAcos-testCplxAcos.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testCplxAcos_CFLAGS) $(CFLAGS) -c -o testCplxAcos-testCplxAcos.obj `if test -f 'testCplxAcos.c'; then $(CYGPATH_W) 'testCplxAcos.c'; else $(CYGPATH_W) '$(srcdir)/testCplxAcos.c'; fi` + +testRealsAcos-testRealsAcos.o: testRealsAcos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRealsAcos_CFLAGS) $(CFLAGS) -MT testRealsAcos-testRealsAcos.o -MD -MP -MF $(DEPDIR)/testRealsAcos-testRealsAcos.Tpo -c -o testRealsAcos-testRealsAcos.o `test -f 'testRealsAcos.c' || echo '$(srcdir)/'`testRealsAcos.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRealsAcos-testRealsAcos.Tpo $(DEPDIR)/testRealsAcos-testRealsAcos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRealsAcos.c' object='testRealsAcos-testRealsAcos.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRealsAcos_CFLAGS) $(CFLAGS) -c -o testRealsAcos-testRealsAcos.o `test -f 'testRealsAcos.c' || echo '$(srcdir)/'`testRealsAcos.c + +testRealsAcos-testRealsAcos.obj: testRealsAcos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRealsAcos_CFLAGS) $(CFLAGS) -MT testRealsAcos-testRealsAcos.obj -MD -MP -MF $(DEPDIR)/testRealsAcos-testRealsAcos.Tpo -c -o testRealsAcos-testRealsAcos.obj `if test -f 'testRealsAcos.c'; then $(CYGPATH_W) 'testRealsAcos.c'; else $(CYGPATH_W) '$(srcdir)/testRealsAcos.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRealsAcos-testRealsAcos.Tpo $(DEPDIR)/testRealsAcos-testRealsAcos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRealsAcos.c' object='testRealsAcos-testRealsAcos.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRealsAcos_CFLAGS) $(CFLAGS) -c -o testRealsAcos-testRealsAcos.obj `if test -f 'testRealsAcos.c'; then $(CYGPATH_W) 'testRealsAcos.c'; else $(CYGPATH_W) '$(srcdir)/testRealsAcos.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/acos/cacosa.c b/2.3-1/src/c/elementaryFunctions/acos/cacosa.c new file mode 100644 index 00000000..da7e2e0f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/cacosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acos.h" + +void cacosa(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cacoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/cacoss.c b/2.3-1/src/c/elementaryFunctions/acos/cacoss.c new file mode 100644 index 00000000..97420313 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/cacoss.c @@ -0,0 +1,147 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + * This fonction is a translation of fortran wacos write by Bruno Pincon + * REFERENCE + * This is a Fortran-77 translation of an algorithm by + * T.E. Hull, T. F. Fairgrieve and P.T.P. Tang which + * appears in their article : + * "Implementing the Complex Arcsine and Arccosine + * Functions Using Exception Handling", ACM, TOMS, + * Vol 23, No. 3, Sept 1997, p. 299-335 + */ + +#include "acos.h" +#include "atan.h" +#include "log.h" +#include "log1p.h" +#include "sqrt.h" +#include "abs.h" +#include "lapack.h" +#include "min.h" +#include "max.h" + +#define localSign(x) (x>0 ? 1.0f : -1.0f) + +floatComplex cacoss(floatComplex z) { + static float sfltPi = 3.1415926535897932384626433f; + static float sfltPi_2 = 1.5707963267948966192313216f; + static float sfltLn2 = 0.6931471805599453094172321f; + static float sfltAcross = 1.5f; + static float sfltBcross = 0.6417f; + + float fltLsup = ssqrts((float) getOverflowThreshold())/8.0f; + float fltLinf = 4.0f * ssqrts((float) getUnderflowThreshold()); + float fltEpsm = ssqrts((float) getRelativeMachinePrecision()); + + float fltAbsReal = sabss(creals(z)); + float fltAbsImg = sabss(cimags(z)); + float fltSignReal = localSign(creals(z)); + float fltSignImg = localSign(cimags(z)); + + float fltR = 0, fltS = 0, fltA = 0, fltB = 0; + + float fltTemp = 0; + + float _pfltReal = 0; + float _pfltImg = 0; + + if( min(fltAbsReal, fltAbsImg) > fltLinf && max(fltAbsReal, fltAbsImg) <= fltLsup) + {/* we are in the safe region */ + fltR = ssqrts( (fltAbsReal + 1 )*(fltAbsReal + 1 ) + fltAbsImg*fltAbsImg); + fltS = ssqrts( (fltAbsReal - 1 )*(fltAbsReal - 1 ) + fltAbsImg*fltAbsImg); + fltA = 0.5f * ( fltR + fltS ); + fltB = fltAbsReal / fltA; + + + /* compute the real part */ + if(fltB <= sfltBcross) + _pfltReal = sacoss(fltB); + else if( fltAbsReal <= 1) + _pfltReal = satans(ssqrts(0.5f * (fltA + fltAbsReal) * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + (fltS + (1 - fltAbsReal)))) / fltAbsReal); + else + _pfltReal = satans((fltAbsImg * ssqrts(0.5f * ((fltA + fltAbsReal) / (fltR + (fltAbsReal + 1)) + (fltA + fltAbsReal) / (fltS + (fltAbsReal - 1))))) / fltAbsReal); + + /* compute the imaginary part */ + if(fltA <= sfltAcross) + { + float fltImg1 = 0; + + if(fltAbsReal < 1) + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(y**2)/(S+(1.d0-x))) */ + fltImg1 = 0.5f * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + fltAbsImg*fltAbsImg / (fltS + (1 - fltAbsReal))); + else + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(S+(x-1.d0))) */ + fltImg1 = 0.5f * (fltAbsImg*fltAbsImg / (fltR + (fltAbsReal + 1)) + (fltS + (fltAbsReal - 1))); + /* ai = logp1(Am1 + sqrt(Am1*(A+1.d0))) */ + fltTemp = fltImg1 + ssqrts(fltImg1 *( fltA + 1)); + _pfltImg = slog1ps(fltTemp); + } + else + /* ai = log(A + sqrt(A**2 - 1.d0)) */ + _pfltImg = slogs(fltA + ssqrts(fltA*fltA - 1)); + } + else + {/* evaluation in the special regions ... */ + if(fltAbsImg <= fltEpsm * sabss(fltAbsReal - 1)) + { + if(fltAbsReal < 1) + { + _pfltReal = sacoss(fltAbsReal); + _pfltImg = fltAbsImg / ssqrts((1 + fltAbsReal) * (1 - fltAbsReal)); + } + else + { + _pfltReal = 0; + if(fltAbsReal <= fltLsup) + { + fltTemp = (fltAbsReal - 1) + ssqrts((fltAbsReal - 1) * (fltAbsReal + 1)); + _pfltImg = slog1ps(fltTemp); + } + else + _pfltImg = sfltLn2 + slogs(fltAbsReal); + } + } + else if(fltAbsImg < fltLinf) + { + _pfltReal = ssqrts(fltAbsImg); + _pfltImg = _pfltReal; + } + else if((fltEpsm * fltAbsImg - 1 >= fltAbsReal)) + { + _pfltReal = sfltPi_2; + _pfltImg = sfltLn2 + slogs(fltAbsImg); + } + else if(fltAbsReal > 1) + { + _pfltReal = satans(fltAbsImg / fltAbsReal); + fltTemp = (fltAbsReal / fltAbsImg)*(fltAbsReal / fltAbsImg); + _pfltImg = sfltLn2 + slogs(fltAbsImg) + 0.5f * slog1ps(fltTemp); + } + else + { + float fltTemp2 = ssqrts(1 + fltAbsImg*fltAbsImg); + _pfltReal = sfltPi_2; + fltTemp = 2 * fltAbsImg * (fltAbsImg + fltTemp2); + _pfltImg = 0.5f * slog1ps(fltTemp); + } + } + if(fltSignReal < 0) + _pfltReal = sfltPi - _pfltReal; + + if(fltAbsImg != 0 || fltSignReal < 0) + _pfltImg = - fltSignImg * _pfltImg; + + return FloatComplex(_pfltReal, _pfltImg); +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/dacosa.c b/2.3-1/src/c/elementaryFunctions/acos/dacosa.c new file mode 100644 index 00000000..62626a7c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/dacosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acos.h" + +void dacosa(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dacoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/dacoss.c b/2.3-1/src/c/elementaryFunctions/acos/dacoss.c new file mode 100644 index 00000000..1c5eab24 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/dacoss.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include "acos.h" + +double dacoss(double x) { + return (acos(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/sacosa.c b/2.3-1/src/c/elementaryFunctions/acos/sacosa.c new file mode 100644 index 00000000..6035130b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/sacosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acos.h" + +void sacosa(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sacoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/sacoss.c b/2.3-1/src/c/elementaryFunctions/acos/sacoss.c new file mode 100644 index 00000000..733c8afe --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/sacoss.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "acos.h" + +float sacoss(float x) { + return (acosf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/testAcos.h b/2.3-1/src/c/elementaryFunctions/acos/testAcos.h new file mode 100644 index 00000000..781c9cb9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/testAcos.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTACOS_H_ +#define _TESTACOS_H_ + +#include +#include +#include "acos.h" + +void sacossTest(void); + +void dacossTest(void); + +void cacossTest(void); + +void zacossTest(void); + +void sacosaTest(void); + +void dacosaTest(void); + +void cacosaTest(void); + +void zacosaTest(void); + +int testAcos(void); + +#endif /* ! _TESTACOS_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/acos/testCplxAcos.c b/2.3-1/src/c/elementaryFunctions/acos/testCplxAcos.c new file mode 100644 index 00000000..f1b235db --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/testCplxAcos.c @@ -0,0 +1,681 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAcos.h" +#include +#include +#include + + +#define InRF {0.4424391170032322406769f,0.6678683990612626075745f,0.3319660718552768230438f, \ +0.9546736516058444976807f,0.0156700448133051395416f,0.8749210601672530174255f, \ +0.4522444806061685085297f,0.5117330569773912429810f,0.0253186416812241077423f, \ +0.0014351801946759223938f,0.9977079438976943492889f,0.2380047738552093505859f, \ +0.9923671730794012546539f,0.8377430764958262443542f,0.3201149418018758296967f, \ +0.8609968703240156173706f,0.2300571207888424396515f,0.0514277378097176551819f, \ +0.7738713542930781841278f,0.7888738475739955902100f,0.3247241438366472721100f, \ +0.4342710664495825767517f,0.2505763596855103969574f,0.1493970695883035659790f, \ +0.1849924144335091114044f,0.4753739954903721809387f,0.1413027080707252025604f, \ +0.8269120678305625915527f,0.7530783289112150669098f,0.4791984809562563896179f, \ +0.5703613697551190853119f,0.4661327209323644638062f,0.9719535936601459980011f, \ +0.9472813690081238746643f,0.2443005586974322795868f,0.9114723093807697296143f, \ +0.1021176860667765140533f,0.442370138131082057953f,0.7598891309462487697601f, \ +0.0506714452058076858521f,0.9817296904511749744415f,0.6537305163219571113586f, \ +0.7148343580774962902069f,0.5314728766679763793945f,0.3238495090045034885406f, \ +0.8823759732767939567566f,0.4649840756319463253021f,0.3200931679457426071167f, \ +0.6445384477265179157257f,0.6649690875783562660217f,0.87176320655271410942f, \ +0.5702412538230419158936f,0.9155691773630678653717f,0.7551447888836264610291f, \ +0.8835946596227586269379f,0.7714338693767786026001f,0.535495069343596696854f, \ +0.1810054751113057136536f,0.2950546029023826122284f,0.6453578546643257141113f, \ +0.7128289067186415195465f,0.5975380046293139457703f,0.5275121121667325496674f, \ +0.7590293344110250473022f,0.8550809700973331928253f,0.6527025634422898292542f, \ +0.7750031943432986736298f,0.3234997726976871490479f,0.0574064985848963260651f, \ +0.5859434073790907859802f,0.3590891859494149684906f,0.146858902648091316223f, \ +0.2846125257201492786407f,0.7778714792802929878235f,0.6364495265297591686249f, \ +0.2102845311164855957031f,0.3402740904130041599274f,0.46986890118569135666f, \ +0.3029589070938527584076f,0.8358892183750867843628f,0.2167098228819668292999f, \ +0.372365341521799564362f,0.4379987935535609722137f,0.9151138328015804290771f, \ +0.9195669055916368961334f,0.3805362572893500328064f,0.1327533251605927944183f, \ +0.1664179805666208267212f,0.3607654091902077198029f,0.1161730112507939338684f, \ +0.0462395879440009593964f,0.8910173103213310241699f,0.4135520034469664096832f, \ +0.5144748641178011894226f,0.7328222631476819515228f,0.1954176928848028182983f, \ +0.7234130431897938251495f,0.1745128417387604713440f,0.0849626506678760051727f, \ +0.1494962759315967559814f,0.3685970292426645755768f,0.6921154772862792015076f, \ +0.734952067490667104721f,0.8488794136792421340942f,0.9639964443631470203400f, \ +0.6939264284446835517883f,0.7593796211294829845428f,0.8503674715757369995117f, \ +0.3021389641799032688141f,0.7913839695975184440613f,0.5300843580625951290131f, \ +0.9491565059870481491089f,0.1250380431301891803741f,0.1733723590150475502014f, \ +0.0553417871706187725067f,0.7666068188846111297607f,0.1206528753973543643951f, \ +0.0562950810417532920837f,0.6550347781740128993988f,0.1173083875328302383423f, \ +0.7377077308483421802521f,0.7103199632838368415833f,0.3135588350705802440643f, \ +0.6241931691765785217285f,0.9126206659711897373199f,0.2805461687967181205750f, \ +0.5542117445729672908783f,0.5504442807286977767944f,0.3022916098125278949738f, \ +0.1218430632725358009338f,0.1788175995461642742157f,0.3169520534574985504150f, \ +0.1164998249150812625885f,0.8661109572276473045349f,0.7163351974450051784515f, \ +0.6740669626742601394653f,0.1436607432551681995392f,0.9407137231901288032532f, \ +0.9242008137516677379608f,0.9963994324207305908203f,0.0636921771802008152008f, \ +0.7568332878872752189636f,0.1861553504131734371185f,0.6694165151566267014f, \ +0.6417399053461849689484f,0.2864959994331002235413f,0.1503058592788875102997f, \ +0.036585446447134017944f,0.8965126336552202701569f,0.2470208695158362388611f, \ +0.4511714405380189418793f,0.8758140746504068374634f,0.8369763311930000782013f, \ +0.6116396905854344367981f,0.8594635161571204662323f,0.8739381656050682067871f, \ +0.8611579411663115024567f,0.6650390280410647392273f,0.7033504783175885677338f, \ +0.0680055823177099227905f,0.4108084668405354022980f,0.3225740874186158180237f, \ +0.9049567128531634807587f,0.7221073396503925323486f,0.9756754324771463871002f, \ +0.931904456578195095062f,0.4758459976874291896820f,0.6085055340081453323364f, \ +0.0411347192712128162384f,0.27580172289162874222f,0.8152392762713134288788f, \ +0.1618081480264663696289f,0.0729317762888967990875f,0.9948789654299616813660f, \ +0.6547168060205876827240f,0.4749407302588224411011f,0.1327822064049541950226f, \ +0.1489921221509575843811f,0.9931546817533671855927f,0.605664949864149093628f, \ +0.2185817272402346134186f,0.1360632320865988731384f,0.8656457341276109218597f, \ +0.1623940262943506240845f,0.9229755070991814136505f,0.6870755525305867195129f, \ +0.2901548030786216259003f,0.6380550339818000793457f,0.5040368759073317050934f, \ +0.1559905512258410453796f,0.2356583862565457820892f,0.4607480820268392562866f, \ +0.9618054111488163471222f,0.8233367735520005226135f,0.9555186624638736248016f, \ +0.2299523688852787017822f,0.2144343988038599491119f,0.4322205847129225730896f, \ +0.5298418900929391384125f,0.1070291120558977127075f} + +#define InIF {0.9676976692862808704376f,0.6755087869241833686829f,0.9605711805634200572968f, \ +0.8287713527679443359375f,0.3716058083809912204742f,0.8529331116005778312683f, \ +0.6630636467598378658295f,0.3127506356686353683472f,0.0578817431814968585968f, \ +.4168665865436196327209f,0.6979019264690577983856f,0.3232105635106563568115f, \ +0.6520457030273973941803f,0.6255217781290411949158f,0.5866900808177888393402f, \ +0.1662572268396615982056f,0.3538595554418861865997f,0.0223209084942936897278f, \ +0.0555838677100837230682f,0.8830965086817741394043f,0.6798805170692503452301f, \ +0.9601878477260470390320f,0.5503053902648389339447f,0.9100682642310857772827f, \ +0.9618742396123707294464f,0.8895119810476899147034f,0.8663921202532947063446f, \ +0.6742273755371570587158f,0.6948372707702219486237f,0.6285339510068297386169f, \ +0.7384302965365350246429f,0.0932216811925172805786f,0.3283788901753723621368f, \ +0.3349032746627926826477f,0.7320226985029876232147f,0.4482167810201644897461f, \ +0.5952123203314840793610f,0.3971578357741236686707f,0.2822407945059239864349f, \ +0.5986177157610654830933f,0.9705053125508129596710f,0.9648752519860863685608f, \ +0.2223112653009593486786f,0.0073375217616558074951f,0.3558401078917086124420f, \ +0.3362461170181632041931f,0.6462869024835526943207f,0.5453626606613397598267f, \ +0.5815327730961143970490f,0.9218191178515553474426f,0.4494518819265067577362f, \ +0.5443653240799903869629f,0.8210619115270674228668f,0.0031680269166827201843f, \ +0.3902114122174680233002f,0.0661126133054494857788f,0.5113567491061985492706f, \ +0.0052305692806839942932f,0.0172157580964267253876f,0.8574225939810276031494f, \ +0.872694595251232385635f,0.5010691648349165916443f,0.3054686388932168483734f, \ +0.9594172257930040359497f,0.6219576788134872913361f,0.6678035454824566841125f, \ +0.3451700019650161266327f,0.439822167158126831055f,0.9729993590153753757477f, \ +0.4124652473255991935730f,0.9270431711338460445404f,0.2170634549111127853394f, \ +0.5178697113879024982452f,0.8865239778533577919006f,0.3678963701240718364716f, \ +0.4449110589921474456787f,0.0826504887081682682037f,0.6078358581289649009705f, \ +0.4201686209999024868011f,0.4264193121343851089478f,0.1516494569368660449982f, \ +0.9087635399773716926575f,0.6092100176028907299042f,0.5259142145514488220215f, \ +0.9537041061557829380035f,0.9292181981727480888367f,0.8420463739894330501556f, \ +0.0477776136249303817749f,0.8043447365052998065948f,0.8733733976259827613831f, \ +0.6313782478682696819305f,0.5507782585918903350830f,0.7975669191218912601471f, \ +0.7488008355721831321716f,0.7785643390379846096039f,0.5666997302323579788208f, \ +0.4409633320756256580353f,0.3067779587581753730774f,0.8593392628245055675507f, \ +0.1920152455568313598633f,0.3279649713076651096344f,0.4025174556300044059753f, \ +0.3560156985186040401459f,0.5213593374937772750854f,0.4409417365677654743195f, \ +0.4940686235204339027405f,0.7799209128133952617645f,0.3915464095771312713623f, \ +0.1789123923517763614655f,0.4986406108364462852478f,0.6278176582418382167816f, \ +0.4048861656337976455688f,0.7036139038391411304474f,0.7250975342467427253723f, \ +0.5160594466142356395721f,0.7005459144711494445801f,0.6976801478303968906403f, \ +0.1013754708692431449890f,0.3362301974557340145111f,0.4427097495645284652710f, \ +0.1286799986846745014191f,0.4155713254585862159729f,0.7760182614438235759735f, \ +0.4942846037447452545166f,0.1127647892571985721588f,0.7894535725936293601990f, \ +0.0490748188458383083344f,0.2449031788855791091919f,0.4716751468367874622345f, \ +0.1031448738649487495422f,0.1776066529564559459686f,0.0619737505912780761719f, \ +0.0768572040833532810211f,0.5897265700623393058777f,0.6714532985351979732513f, \ +0.3335268478840589523315f,0.5744381849654018878937f,0.3185150483623147010803f, \ +0.9473985652439296245575f,0.57160880789160728455f,0.5848113656975328922272f, \ +0.7857599845156073570251f,0.3324664360843598842621f,0.5449722055345773696899f, \ +0.9705804106779396533966f,0.3315144600346684455872f,0.9949513408355414867401f, \ +0.9098131582140922546387f,0.2666130834259092807770f,0.6014269543811678886414f, \ +0.6469328044913709163666f,0.3073055054992437362671f,0.8659543325193226337433f, \ +0.7722052121534943580627f,0.3620244706980884075165f,0.3966818638145923614502f, \ +0.0553487525321543216705f,0.7595019852742552757263f,0.3521075001917779445648f, \ +0.7926115561276674270630f,0.4941224199719727039337f,0.1269726501777768135071f, \ +0.0467983442358672618866f,0.3756254166364669799805f,0.2301741042174398899078f, \ +0.9152546999976038932800f,0.3194008930586278438568f,0.9443374704569578170776f, \ +0.8468258534558117389679f,0.1096191117540001869202f,0.2030929992906749248505f, \ +0.6782134883105754852295f,0.8342829556204378604889f,0.9650435885414481163025f, \ +0.9410973764024674892426f,0.3796364162117242813110f,0.7794532743282616138458f, \ +0.9074576767161488533020f,0.7145868721418082714081f,0.9640186801552772521973f, \ +0.4678759598173201084137f,0.2299097580835223197937f,0.8920741169713437557220f, \ +0.1667113658040761947632f,0.4915095348842442035675f,0.3024059170857071876526f, \ +0.1440355475060641765594f,0.9354602731764316558838f,0.4561293558217585086823f, \ +0.5141706829890608787537f,0.2665198049508035182953f,0.4771588463336229324341f, \ +0.3820844483561813831329f,0.6670796470716595649719f,0.0574905085377395153046f, \ +0.4276479780673980712891f,0.3921637185849249362946f,0.0390139548107981681824f, \ +0.0896534039638936519623f,0.1133126895874738693237f} + +#define ResRF {1.255529833022194452496f,1.0200026717383132712769f,1.3324589639215225211899f, \ +0.8677406156444121831939f,1.5561073447625946020167f,0.9286968935379427136922f, \ +1.1937226600193293624130f,1.067915927099262640709f,1.545517326047555650703f, \ +1.5694716389035829884335f,0.7825751983710025339036f,1.3429338762216549429951f, \ +0.7639188473405255086490f,0.8664584310401818312286f,1.2939802433811951054565f, \ +0.5990898407849659657032f,1.3527841901085291276274f,1.5193587499057941148095f, \ +0.6904789613904125378241f,0.9961995980090498914450f,1.3021994564088539281244f, \ +1.26004387047876331707f,1.3507596621653372714889f,1.4603873397973008430029f, \ +1.4376480261770669955013f,1.2185152537606129818926f,1.4640602217743992063959f, \ +0.894854807527207585238f,0.9591997301055474878240f,1.164221222913740527716f, \ +1.1146461656150485897143f,1.0887716288036126677241f,0.5830870294869971992568f, \ +0.6121373513947664379842f,1.3737517861001466989990f,0.7178494362155037888940f, \ +1.4830224178312794158785f,1.15302764511686950399f,0.7870894488597584004452f, \ +1.5273165827155432694440f,0.9046421279509564428167f,1.1098998065332701390417f, \ +0.8178369263058140603562f,1.0104814656927540994502f,1.2625532917342228156343f, \ +0.6793632590344759192291f,1.1798090506359553142346f,1.2887180301097407308930f, \ +1.0105656841969548054294f,1.0915011675220371856199f,0.7542427310988851774098f, \ +1.0653686177891663611206f,0.8900627912448225709241f,0.7149348217487093704037f, \ +0.7102600249699384526991f,0.6960735527765307129044f,1.088533305867128486710f, \ +1.388790211991853373874f,1.2713337729965381583952f,1.088577004770347134155f, \ +1.0451133763707507462470f,1.028861647762511877f,1.0500108990334240388620f, \ +1.0388362590565514143037f,0.8513413455225736781173f,1.0298997364083655181588f, \ +0.7980374938553029817712f,1.272512010082343492101f,1.5296574807566454268226f, \ +1.0155756589776196996411f,1.3087404816635104243261f,1.4268507232054599143112f, \ +1.3171287563927265296115f,1.0046812403038571925862f,0.9520223764784513376114f, \ +1.3780800950311928865233f,1.2249760089920562755594f,1.1679630143718853219070f, \ +1.2895295822531129825705f,0.7757074400337321540277f,1.3549804577387012383127f, \ +1.2966028029732796778006f,1.1956170559024092980849f,0.7573690728750529510549f, \ +0.9358060876311721232312f,1.2935811029700821084276f,1.4692924940131448785507f, \ +1.403798205397557063989f,1.2904936439816625526333f,1.4833304573509458190728f, \ +1.5316962881883187108656f,0.7896852637031629429387f,1.2487229023268595629048f, \ +1.1608910658948932148604f,1.0024005845134518200013f,1.4005673415801471737296f, \ +0.8902696237675791213206f,1.4033814016250207856729f,1.5063701881984010721993f, \ +1.4235075164410782022628f,1.2154417216544426416647f,0.9067832509325496337382f, \ +0.8451361326845713284328f,0.8105760364528488137736f,0.6677149293012821784643f, \ +0.9376824522142382933865f,0.9834531063046333398958f,0.7435234402945338771929f, \ +1.2692770995801996303243f,0.8506643591613352040071f,1.1209388788239313949902f, \ +0.6577834067257107841797f,1.4685347852910790589220f,1.4304586887418837548580f, \ +1.5216097729687187989356f,0.9508172376200363373755f,1.4718437723337385314437f, \ +1.5147598813826532726523f,0.9228342692416234838149f,1.463425399368290413804f, \ +0.7595378867190821781108f,0.8934128848181713822285f,1.3234788454526924539323f, \ +1.0022503118871550764624f,0.4807627355715887174092f,1.3509123886799738745168f, \ +0.9845326329544197285770f,1.0135326383159133367684f,1.2959003688929946473962f, \ +1.4493071459819437674099f,1.393898839191649585700f,1.2489929355782913856f, \ +1.4543809570962817900863f,0.8282434492927793767691f,0.979974070275603015290f, \ +0.9016529084751209177639f,1.4461450567069793482489f,0.6070295384428338048011f, \ +0.9308147234333767894299f,0.7189471755291521049003f,1.5158092773905904593335f, \ +0.9872214614683698652442f,1.3935021592326080064339f,0.9771853998510096062091f, \ +1.1193192900537867195965f,1.296487096062820532083f,1.4643457982927459148925f, \ +1.5437362050733878238162f,0.6187847061723403818689f,1.3588173690830449569233f, \ +1.1915339871130086191187f,0.6686084978144331003591f,0.9583842322663218560308f, \ +1.0912664509894050013372f,0.7181625782359223331142f,0.7233140240221890282513f, \ +0.5428178535441999796873f,1.0471999339904087822362f,0.8769816861755428405445f, \ +1.5175053601847408035752f,1.1993783088315406182289f,1.2453663926230837954989f, \ +0.4514953581289469219939f,0.8662667007384096118372f,0.4974730247398895799371f, \ +0.9147617192703559885203f,1.1061521220724712666339f,1.1357238908175482094975f, \ +1.5394063571165421677733f,1.2932180862175921554069f,0.6824933434976203638911f, \ +1.43686302401783927429f,1.5148015609296603400935f,0.8950325309450218869145f, \ +1.1033723890979516557564f,1.1179316393641773874634f,1.4660961587943455164407f, \ +1.4605422546022659435749f,0.7934640514556516865952f,1.1421515306768439401708f, \ +1.3722266762337298473540f,1.4378608786974975686235f,0.9484918901540384528204f, \ +1.409977666065525436778f,0.7322918733552260528441f,0.8770810468745882104713f, \ +1.2797762559830598849686f,1.113354965599829160539f,1.1052282890851641283803f, \ +1.4319057784002142685864f,1.3414927111991592489915f,1.150175091750528233447f, \ +0.6311676673228704403940f,0.8947310349200747747744f,0.3427408557056949023334f, \ +1.3585307702603606205827f,1.3703718078359574672476f,1.1242902219788122319954f, \ +1.0158255484348914787773f,1.4642540410581941223711f} + +#define ResIF {-0.89394934684766447219f,-0.7269960621148598978181f,-0.873228865930417708086f, \ +-0.9411580369058477613109f,-0.3635823360806625381692f,-0.9266296361203899545345f, \ +-0.6634195150572302912551f,-0.3497653794429004814326f,-0.0578679396761476172451f, \ +-0.4056499805826500049122f,-0.8741287625997348209594f,-0.3259826010316183575455f, \ +-0.8401934298465025818814f,-0.7488675904074600930826f,-0.5773032354998757220699f, \ +-0.2907264701768227377343f,-0.3549390003452199127132f,-0.0223486092632642734113f, \ +-0.0871612243254889368371f,-0.9176985409654165870563f,-0.6568925683359604361655f, \ +-0.8873647393225528867688f,-0.5376252047526711708159f,-0.8204495329467825781578f, \ +-0.8603334854615410920431f,-0.8439135541376909799283f,-0.7874200016694758996749f, \ +-0.7820668187587638264802f,-0.7702271668977674901058f,-0.6397730584800335185136f, \ +-0.7501646240735952986256f,-0.1050163064317838901296f,-0.5657338500383883861389f, \ +-0.5540440668540072000070f,-0.6903185807895677594814f,-0.6373808782648936466231f, \ +-0.5666907482042378152443f,-0.4219005724672658108609f,-0.3886193868474250856515f, \ +-0.5681250599967884173935f,-1.0378225966102092581167f,-0.9349807842842002836292f, \ +-0.3001473873644374679159f,-0.0086619472523597629970f,-0.3652645919168465704630f, \ +-0.5124455823851000735303f,-0.6518809665531226649193f,-0.5410207144441225857179f, \ +-0.6415487649665978509006f,-0.9086003711350160161331f,-0.6165709440100644034288f, \ +-0.5877295308593559752808f,-0.9208050182698661600966f,-0.0048324714164703318209f, \ +-0.5674999297524496721934f,-0.1029242691026374945107f,-0.5491640506289516832084f, \ +-0.0053183908272447745144f,-0.0180166547854653871785f,-0.8584065847628071788122f, \ +-0.8876649204332747178370f,-0.5558116272697392057367f,-0.3452541277977640987729f, \ +-0.9592322323801306671598f,-0.7535283497855133072463f,-0.7161931212080890896132f, \ +-0.4651350655885536089507f,-0.4452798781006889750067f,-0.8627422069241995616906f, \ +-0.4680940627922438035391f,-0.8526687741435754475106f,-0.2176103156742132949120f, \ +-0.5122870446551318623918f,-0.9165631260315680872708f,-0.4375389900682862820425f, \ +-0.4390596706521518455268f,-0.0877388848995636905226f,-0.6201939230056620067089f, \ +-0.4244909451374946907087f,-0.5765081340409458077190f,-0.1546339715387441970940f, \ +-0.8412371149638495637646f,-0.6152054338449556292190f,-0.7055085618375696032700f, \ +-1.0060843012853948330587f,-0.8572003556218193986993f,-0.7684942188683597796839f, \ +-0.0484327267220403465120f,-0.7613094946055299905296f,-0.7914662562103550458303f, \ +-0.5959529832580606756309f,-0.7135015962341314521566f,-0.7642115760119819745100f, \ +-0.7454508488281011979737f,-0.8264682151161963918895f,-0.5472791982347332551129f, \ +-0.5406217977943502672744f,-0.3063151633155380415552f,-0.7796913689590335705404f, \ +-0.1929181474134157303624f,-0.3430522750956541133682f,-0.4911328183727812768389f, \ +-0.459568916168811014700f,-0.6685113226304408851064f,-0.6625697799772538587604f, \ +-0.5798078060087921148380f,-0.8360708027394485597483f,-0.5502607336825936501512f, \ +-0.1862858035907569154155f,-0.6223700777366898417853f,-0.6503554622010890851058f, \ +-0.6214803763548166770647f,-0.658644048866955045263f,-0.6789244719569749175747f, \ +-0.4960847336430311282918f,-0.7793968717468962026373f,-0.6535755489490102654315f, \ +-0.1013611882342874415119f,-0.4101097128485187148783f,-0.4317360856761057741338f, \ +-0.1858046514491050738016f,-0.5108140928015871828904f,-0.7329583102689192219970f, \ +-0.5572655332532194805140f,-0.2414852833474282756132f,-0.7396265276752447270781f, \ +-0.0588783609986792688673f,-0.2846992688951475170001f,-0.4723177842872927079121f, \ +-0.1037246805315373693324f,-0.1794574611552203768916f,-0.0652808430937008854489f, \ +-0.0773039499491101622652f,-0.7330187724544895422341f,-0.7392992415079050472215f,\ +-0.4133533124652354895368f,-0.5506738102468112794341f,-0.5328074192235940920170f, \ +-1.0038415897821586497685f,-0.7848345170731062525604f,-0.5565211946593774383629f, \ +-0.8394668443345630892694f,-0.3316478088740031915371f,-0.6174546571080481438543f, \ +-0.9359141759808927707454f,-0.3379222154458279558931f,-0.8818086263290126902703f, \ +-0.8163896696778171202524f,-0.4448261056193882900800f,-0.5818126677407939872921f, \ +-0.6497328441864358428148f,-0.4773967451595543809439f,-0.9219910445529124753961f, \ +-0.7866824847635498496601f,-0.5256445971902782288154f,-0.5682526122395586964942f, \ +-0.1069466527081457118964f,-0.7916702346016932789752f,-0.4433240253515259299277f, \ +-0.7277712730096503879196f,-0.508130072062960125301f,-0.1336083189147964367383f,\ +-0.1070544087071799849165f,-0.4749428955148710107537f,-0.4653576600823912667870f, \ +-0.9868535311953914312966f,-0.3500843154048065564155f,-0.9103124176740465811619f, \ +-0.7691355099915161419588f,-0.1137367567447675059666f,-0.3166772504537387900037f, \ +-0.6397920481545310567029f,-0.7602207727265776204817f,-1.0393654015282784985885f, \ +-0.9191682984673771317219f,-0.4105629424946563021948f,-0.7199249389558314282667f, \ +-0.8184995123883722634162f,-0.8831578283865785250484f,-0.9231074927684407294137f, \ +-0.4607753273118053716217f,-0.2299250742000491787298f,-0.9489247717923485758718f, \ +-0.1680978688129062259549f,-0.6812321574150533853853f,-0.3838159223290327215494f, \ +-0.1497969931648169827909f,-0.9112200478501172318246f,-0.4905472078299850102745f, \ +-0.4982920949193456183757f,-0.2703771635876200951643f,-0.501441786599973071681f,\ +-0.6091306446866900925485f,-0.7751834725402599879374f,-0.1702436202720564450974f, \ +-0.4245933471268953929290f,-0.3901971933403464709578f,-0.0432410994613097177108f, \ +-0.1052903868471218307157f,-0.1137136398834104750177f} + + + +#define InRD {0.9181839306838810443878,0.0884356433525681495667,0.4926414485089480876923, \ +0.8834870792925357818604,0.6802056566812098026276,0.0268530314788222312927, \ +0.7203164598904550075531,0.4598560053855180740356,0.4730282914824783802032, \ +0.0919386046007275581360,0.7707213866524398326874,0.2658544182777404785156, \ +0.0074534364975988864899,0.9752697972580790519714,0.7235199823044240474701, \ +0.5191026907414197921753,0.6986512844450771808624,0.0405965903773903846741, \ +0.1825077752582728862762,0.3346745036542415618896,0.7407455802895128726959, \ +0.2895397534593939781189,0.1539079672656953334808,0.2327872756868600845337, \ +0.249757957179099321365,0.1534609617665410041809,0.8524017068557441234589, \ +0.1445394679903984069824,0.5686616473831236362457,0.3302547885105013847351, \ +0.2786427377723157405853,0.8844447638839483261108,0.3282945682294666767120, \ +0.3848125720396637916565,0.9120064224116504192352,0.5585131235420703887939, \ +0.3578817830421030521393,0.3319081580266356468201,0.3623231402598321437836, \ +0.8766287136822938919067,0.0389173370786011219025,0.9202555166557431221008, \ +0.3243460613302886486053,0.8379747122526168823242,0.1961554684676229953766, \ +0.836488234810531139374,0.6787032946012914180756,0.7582549881190061569214, \ +0.1194611941464245319366,0.5478108832612633705139,0.0830844114534556865692, \ +0.1074626557528972625732,0.8102702707983553409576,0.0020722588524222373962, \ +0.8974113441072404384613,0.1269455049186944961548,0.0464085307903587818146, \ +0.9040105016902089118958,0.7867436590604484081268,0.6945183053612709045410, \ +0.3590205931104719638824,0.7864200873300433158875,0.8456682055257260799408, \ +0.4063719864934682846069,0.5153579493053257465363,0.5949906939640641212463, \ +0.5879231388680636882782,0.3445296920835971832275,0.6011764244176447391510, \ +0.0055679446086287498474,0.6450063190422952175140,0.4985997099429368972778, \ +0.2964930129237473011017,0.1925860242918133735657,0.5175180840305984020233, \ +0.3105752766132354736328,0.4384520896710455417633,0.2674221722409129142761, \ +0.2229883982799947261810,0.3114312570542097091675,0.465050995815545320511, \ +0.1054230490699410438538,0.1839383761398494243622,0.3182676993310451507568, \ +0.8334749997593462467194,0.7803529789671301841736,0.1999261802993714809418, \ +0.1607502643018960952759,0.0067916330881416797638,0.3250140668824315071106, \ +0.8473272952251136302948,0.4055975303053855895996,0.1027544015087187290192, \ +0.0367881907150149345398,0.1505991755984723567963,0.0478651728481054306030, \ +0.7984658707864582538605,0.0468508685007691383362,0.8687802697531878948212, \ +0.6377770192921161651611,0.5846501276828348636627,0.3718070005998015403748, \ +0.2409734181128442287445,0.8118529785424470901489,0.9632846158929169178009, \ +0.1664984868839383125305,0.5345636266283690929413,0.6970838457345962524414, \ +0.6823413469828665256500,0.3967337189242243766785,0.2399202152155339717865, \ +0.1569029819220304489136,0.6013874863274395465851,0.6506889471784234046936, \ +0.2553333411924540996552,0.3477048687636852264404,0.2817953140474855899811, \ +0.3077315231785178184509,0.9059348977170884609222,0.5546605382114648818970, \ +0.8953115609474480152130,0.7834150167182087898254,0.1403537872247397899628, \ +0.7755798771977424621582,0.5447361194528639316559,0.0693962080404162406921, \ +0.7488555698655545711517,0.0215708073228597640991,0.5904601295478641986847, \ +0.2870239550247788429260,0.9467164869420230388641,0.8032453395426273345947, \ +0.0766134397126734256744,0.4733499353751540184021,0.1665818593464791774750, \ +0.7712225038558244705200,0.8505714428611099720001,0.3183112638071179389954, \ +0.4035588609986007213593,0.9796781539916992187500,0.4695712872780859470367, \ +0.0718349842354655265808,0.9567936672829091548920,0.7416916470974683761597, \ +0.4881874625571072101593,0.3396144369617104530334,0.9112829784862697124481, \ +0.5451393984258174896240,0.2204167605377733707428,0.9863075008615851402283, \ +0.2036699182353913784027,0.9978853110224008560181,0.5701226112432777881622, \ +0.8649067105725407600403,0.6157743069343268871307,0.2710180804133415222168, \ +0.0235887938179075717926,0.5910312486812472343445,0.5396073102019727230072, \ +0.0088853742927312850952,0.3979325224645435810089,0.0808908129110932350159, \ +0.8576204623095691204071,0.1746748872101306915283,0.4391269073821604251862, \ +0.0716713583096861839294,0.7819390646182000637054,0.8002922702580690383911, \ +0.8633827907033264636993,0.3430927144363522529602,0.9963299590162932872772, \ +0.1092859357595443725586,0.9356399574317038059235,0.8588880775496363639832, \ +0.9446536763571202754974,0.9815687369555234909058,0.1789177213795483112335, \ +0.5469553777948021888733,0.6095509598962962627411,0.2286865226924419403076, \ +0.3082748861052095890045,0.9369305213913321495056,0.6251136637292802333832, \ +0.6483835671097040176392,0.9831290808506309986115,0.3739325078204274177551, \ +0.0672900262288749217987,0.327214874327182769775,0.4716854714788496494293, \ +0.0272304220125079154968,0.7657743184827268123627,0.1599553581327199935913, \ +0.8212248464114964008331,0.4125823015347123146057,0.4811308677308261394501, \ +0.0545558966696262359619,0.6280010775662958621979,0.6469958787783980369568, \ +0.7909024558030068874359,0.7913962621241807937622} + + +#define InID {0.0004979562945663928986,0.1546611981466412544250,0.0284530925564467906952, \ +0.0055849254131317138672,0.8097954043187201023102,0.0428051082417368888855, \ +0.1182951643131673336029,0.2610557358711957931519,0.8207950596697628498077, \ +0.8662176290526986122131,0.6516509572975337505341,0.6852114759385585784912, \ +0.7980552376247942447662,0.9992001941427588462830,0.0459985560737550258636, \ +0.1328642908483743667603,0.1799852666445076465607,0.3336857678368687629700, \ +0.1323521169833838939667,0.3482229933142662048340,0.4151491993106901645660, \ +0.5222808374091982841492,0.0140265165828168392181,0.0936772432178258895874, \ +0.554428898263722658157,0.4849792802706360816956,0.5406363750807940959930, \ +0.7141286022961139678955,0.1927964971400797367096,0.3982981061562895774841, \ +0.2410794547758996486664,0.1056184638291597366333,0.3544462365098297595978, \ +0.8855850743129849433899,0.0592544334940612316132,0.5570028573274612426758, \ +0.4150356748141348361969,0.6272481856867671012878,0.7362630530260503292084, \ +0.4334241282194852828979,0.6547862743027508258820,0.1096570501103997230530, \ +0.1828466425649821758270,0.1703294925391674041748,0.5361933619715273380280, \ +0.7314661284908652305603,0.6858070171438157558441,0.5467864666134119033813, \ +0.3000954654999077320099,0.9861098499968647956848,0.2921617510728538036346, \ +0.7068451717495918273926,0.9738530241884291172028,0.9392196042463183403015, \ +0.2147838263772428035736,0.8976975139230489730835,0.3853864748962223529816, \ +0.7197126084938645362854,0.6032756562344729900360,0.3933832384645938873291, \ +0.2768237129785120487213,0.2433026498183608055115,0.5238274834118783473969, \ +0.5727928597480058670044,0.1115069282241165637970,0.8871827023103833198547, \ +0.4918101537041366100311,0.620717465877532958984,0.6681088157929480075836, \ +0.3346294192597270011902,0.4008522643707692623138,0.8206953983753919601440, \ +0.0156081621535122394562,0.3082795003429055213928,0.1921516875736415386200, \ +0.9084058068692684173584,0.9628748060204088687897,0.4108279338106513023376, \ +0.1077714688144624233246,0.4543590787798166275024,0.5766139742918312549591, \ +0.7918981136754155158997,0.8716701003722846508026,0.7446341440081596374512, \ +0.8614199929870665073395,0.8598338318988680839539,0.6422161697410047054291, \ +0.1284126546233892440796,0.1956893731839954853058,0.7571631455793976783752, \ +0.0799373830668628215790,0.3010600395500659942627,0.61714327195659279823, \ +0.8184841191396117210388,0.3742539635859429836273,0.4915034342557191848755, \ +0.5517093283124268054962,0.7295224415138363838196,0.5729464250616729259491, \ +0.0226564854383468627930,0.0795128741301596164703,0.6061109183356165885925, \ +0.0581077202223241329193,0.2136410307139158248901,0.3317275200970470905304, \ +0.7118408391252160072327,0.5123297641985118389130,0.0925556533038616180420, \ +0.1120351166464388370514,0.0331352194771170616150,0.2188743329606950283051, \ +0.8885411117225885391235,0.3364450898952782154083,0.4304939182475209236145, \ +0.0395783367566764354706,0.7718926444649696350098,0.3852231525816023349762, \ +0.584660629741847515106,0.9142434685491025447845,0.8109691496938467025757, \ +0.9606793900020420551300,0.4564617509022355079651,0.2252602274529635906219, \ +0.6146492399275302886963,0.5445657209493219852448,0.4790671234950423240662, \ +0.8712163171730935573578,0.6290841717272996902466,0.0488327336497604846954, \ +0.2014226512983441352844,0.3932394194416701793671,0.5574976503849029541016, \ +0.7534958967007696628571,0.6016047922894358634949,0.9978243424557149410248, \ +0.871782509610056877136,0.1253611450083553791046,0.7888469258323311805725, \ +0.8198945443145930767059,0.8846442662179470062256,0.6113598407246172428131, \ +0.3129875948652625083923,0.2698480314575135707855,0.3510415498167276382446, \ +0.0002431091852486133575,0.8000906230881810188293,0.8083376321010291576385, \ +0.0676734074950218200684,0.4463855498470366001129,0.1329871071502566337585, \ +0.9925356446765363216400,0.4392634835094213485718,0.7494483222253620624542, \ +0.8954892838373780250549,0.1376328612677752971649,0.4803910739719867706299, \ +0.9836516068316996097565,0.2990262722596526145935,0.4373219660483300685883, \ +0.2216190565377473831177,0.0704064411111176013947,0.3104516910389065742493, \ +0.8870153087191283702850,0.9886686950922012329102,0.3880559303797781467438, \ +0.1997731504961848258972,0.8535470529459416866302,0.5233913194388151168823, \ +0.0124758337624371051788,0.2265536198392510414124,0.6351096997968852519989, \ +0.4152868799865245819092,0.6822845251299440860748,0.6837346693500876426697, \ +0.8551749861799180507660,0.8123193774372339248657,0.0824123290367424488068, \ +0.0176315875723958015442,0.0341491582803428173065,0.8797791674733161926270, \ +0.5397802316583693027496,0.2428503734990954399109,0.1825126199983060359955, \ +0.9759421404451131820679,0.7248379667289555072784,0.3708766037598252296448, \ +0.7591939563862979412079,0.0132757760584354400635,0.4527114764787256717682, \ +0.0710861748084425926208,0.8389283320866525173187,0.9739420730620622634888, \ +0.1777097475714981555939,0.2829279201105237007141,0.8323502647690474987030, \ +0.0483473539352416992188,0.2749410220421850681305,0.9980281023308634757996, \ +0.6025707735680043697357,0.3654889445751905441284} + +#define ResRD {0.4073265521222889096187,1.4832960157658940936187,1.0559760538030802390352, \ +0.4876757408319799536,1.0503603238676473274893,1.543964660923583975816, \ +0.7807960353449081569721,1.113475122068019684818,1.2074148700721019089599, \ +1.5013200231227292746894,0.9297840505433454527662,1.3514532021448848464473, \ +1.5649706537079166590587,0.9184476769025181619455,0.7642136963785024494911, \ +1.0321272581534788326252,0.8249731824697179582984,1.5322804352205618982907, \ +1.3889179161647142723979,1.2511777469647082927651,0.8631362880453896657684, \ +1.3132001390852299227419,1.4162898618562522745634,1.336955652419456130886, \ +1.3518798690760625014207,1.432530814961507692473,0.8166991767829372417253, \ +1.4531763459288651318957,0.9836350291388685773697,1.2611871109235879284682, \ +1.2970941054870110953345,0.5247972514595955484396,1.2580817851890182534902, \ +1.284150657350121349509,0.4431164578699607337064,1.0790628231962844374436, \ +1.2369697766373111136318,1.2891801931155641991467,1.279426005626910445301, \ +0.7411469003274002709247,1.5382371539791293013621,0.4648284998100537523946, \ +1.2466755478200817197632,0.6344745057664578080647,1.3976472343104680007286, \ +0.9101343728052767589887,1.0145238645542766775520,0.8998398574208711364619, \ +1.4561881086142904884184,1.18618251793282958317,1.4909812525527503801470, \ +1.483042965312622918361,1.0101711671842434903112,1.5692858337560215975515, \ +0.581296448133323040430,1.4763786358343300442186,1.5274840435675274274985, \ +0.8570040265906480048130,0.8982361671454072160614,0.9010874927564332947938, \ +1.2192362807008756409033,0.7383467259694986850604,0.8144931489593250084624, \ +1.2166243834118397604271,1.03436100179767165308,1.131906113417643577890, \ +1.0351962467792186206594,1.2775309074990219837531,1.071918673883956119042, \ +1.565516150270076733975,0.9534817223618026194032,1.18808795707930903163, \ +1.2698193301194886650762,1.3859852741821954147383,1.0412417743580970608264, \ +1.3416868735639895238165,1.2575402806037097036551,1.3220218864013655313272, \ +1.3473014979095856435976,1.285468609148218810390,1.1658747858778166772709, \ +1.488164159422029397817,1.4322756049582612281057,1.3158102253315304697168, \ +0.9591789810942366045765,0.9946060566652682455313,1.4024848311652073906686, \ +1.4107060249666192319751,1.5641310708030540244096,1.3120464909736666569984, \ +0.5765266085251754546448,1.174948768778458774165,1.4833345055395814604537, \ +1.542328840440976067683,1.4294563291509121416567,1.5278339217974101771347, \ +0.8672708709861330911295,1.5329472698613195724704,0.8183477500293765416473, \ +0.8795454275343114192154,0.9497631085851768739658,1.2520159281840994580648, \ +1.3278713297298554429915,0.6921693745176561440857,0.5940515258646017482391, \ +1.4351615904003474089023,1.0896179081737702443178,0.8073262505844599479232, \ +0.8303525589696477693380,1.1631217540254512599063,1.3345425852020198487224, \ +1.4535942378139874442411,0.9795882485013941431973,0.9572655323242533764727, \ +1.3128248243665050498663,1.2961023348938622845594,1.3059941497461620141252, \ +1.304483982989253165741,0.9305437394849996879387,1.1438076057366068916110, \ +0.9529804506540070496712,0.8395036014732552009932,1.4335056151860767759132, \ +0.9118181357873784698143,1.088227104950570067743,1.5081933427510285650186, \ +1.0197527081918582592124,1.5525377607896333476134,0.9404998007389445691118, \ +1.286060244811547681465,0.6524446466111782916286,0.8656706311155134558888, \ +1.5096117736353744653854,1.1637012525123178185993,1.4530145530183353752562, \ +1.0046068631631419609818,0.5919009089776723353538,1.3213581010685828687201, \ +1.2600188980179465314535,0.8740394919467842083094,1.1689296619753437589395, \ +1.5022014467298512307991,0.5528837279866596343680,0.8359949109724567062329, \ +1.0607846432300507277802,1.3062568171740265299263,0.8879559287204453754683, \ +0.9963420783593853746751,1.3688496242545662440193,0.3803570908643706949270, \ +1.4264926442838912201694,0.6382023556059207569646,1.117517041236663288828, \ +0.9501387596985741978983,0.9188351614160777947049,1.3254743353137110606355, \ +1.55398001104990246546,0.9810746826810110565731,1.0669910119329548692235, \ +1.5621213392572059763808,1.162804162098360238886,1.4934861287145768660167, \ +0.9519686104540553417408,1.4467374415079707894449,1.154639180917391483305, \ +1.500462431806032004289,0.9915094174043252994721,0.8535439676775620210236, \ +0.5293817691790781987393,1.23068211775509039896,0.7526195369457671091595, \ +1.4697720678086412249286,0.8182121412746224953239,0.8746692343808056824273, \ +0.8844573970963010012269,0.8439197222579799539943,1.391544468064010775521, \ +0.9922180869468192332405,0.9160137371548995322001,1.3993728411492449836828, \ +1.2985217508033519706601,0.5536816066461542895638,0.9157598470345392760450, \ +1.1161566883090805468726,0.8048708844349877766788,1.2156607775224024248217, \ +1.5172042703120385276350,1.2374758085060872936367,1.1351487844726630971337, \ +1.5436311555741579759626,0.9980288444492946275943,1.4563247763642750420843, \ +0.6617790067192217406955,1.1654713730545154248830,1.2035174317997594517493, \ +1.5162772650111728811595,0.9344765112644882742998,1.1223294698972574590101, \ +0.8945516347671441659273,0.7901547616106909810441} + +#define ResID {-0.0012569697886744767793,-0.1546381133029076926366,-0.0326845596217153130936, \ +-0.0119187043920920034135,-0.8334668693395566041460,-0.0428074462389216731095, \ +-0.1672885154101033944318,-0.2869984863074300229790,-0.7925278559645111409182, \ +-0.7851274769100758943452,-0.7428250726131904180249,-0.6543302407510473983621, \ +-0.7311595163178985501418,-1.052203053002093824375,-0.0664259655312470775890, \ +-0.1541712629474439599786,-0.2426466544194012253666,-0.3280193987403173250250, \ +-0.1341688909762420167660,-0.3590358673724926563686,-0.5222636224036150132122, \ +-0.5167890418406643204818,-0.0141951437273657391641,-0.0961499124903888030547, \ +-0.5411789866531571124852,-0.4719374206382114245173,-0.6865145475966729637918, \ +-0.6682412786135066840032,-0.229561178131867382746,-0.4068630429518135804834, \ +-0.2478546467124292662643,-0.2092687177409224830171,-0.3643943961998056257912, \ +-0.8260533990387732838911,-0.1377643146197947143783,-0.5959599853289488935459, \ +-0.4262600844346774997540,-0.6137130366455740837495,-0.7080093721711945287112, \ +-0.6044893440702200360093,-0.6155234120386735563457,-0.2422467665254410262854, \ +-0.1917136851747310299920,-0.2835381480340813942220,-0.5205087419896101685879, \ +-0.8283554785369232620340,-0.7385639097367507899250,-0.6511255066138333935655, \ +-0.2976620683491659202780,-0.9257955504050334738508,-0.2890528438121037768660, \ +-0.6604934892243505828446,-0.9834822614680237551354,-0.8377366271338905212573, \ +-0.3818062735980304323036,-0.8101402379111779517018,-0.3767706089539061276028, \ +-0.8471279280465069394523,-0.7100416511121218077207,-0.4827879396812622680990, \ +-0.2907446603933081519244,-0.3540413099584073797210,-0.6691029908570297335402, \ +-0.5779752710357292100340,-0.1293680641651104301637,-0.8672105047323137583248, \ +-0.5445780680276932628203,-0.6098830976698420558435,-0.701796561463252421831, \ +-0.3286839097690721356315,-0.4736684460520745321155,-0.7974492297316398969897, \ +-0.0163420882574338011128,-0.3086940489965586675858,-0.2208475495159677448598, \ +-0.8330345833509705810727,-0.8899247395553587791639,-0.4121122816452804649145, \ +-0.110296470108896760287,-0.4573875737589336853972,-0.5921314598231492976055, \ +-0.7284533656063938433789,-0.7940022333816690869313,-0.7086861369245996966626, \ +-0.9177754728271111384075,-0.8992125494626673765097,-0.6124156802640610131050, \ +-0.1297119059766182191940,-0.1944657181402436596507,-0.7195246660784752057438, \ +-0.1461225286840270864985,-0.3207633116621479985042,-0.5854835047639634915129, \ +-0.7472936554211552229177,-0.3695542509299474809303,-0.4740067448468703315001, \ +-0.6718044057588442585782,-0.67710691385219745619,-0.7207858066458165957613, \ +-0.0294026163397106028718,-0.0976133299331403969656,-0.6013612638349056238596, \ +-0.0598297565651504936746,-0.328794773496815184721,-0.5625239033097394480976, \ +-0.6677071141299576462202,-0.5498312284204850408642,-0.1277672590472646030335, \ +-0.1511975528780685473773,-0.0360853980890413067462,-0.2232684445667622585852, \ +-0.8049065446736692885921,-0.3948819631358797543896,-0.5048059213328937033793, \ +-0.0409214035081632079849,-0.7341976462547471493636,-0.3892323418939396262317, \ +-0.5739837580671862671267,-0.9770097106672435138819,-0.8021342946497018733254, \ +-1.0021601470891579044320,-0.5801678547205166847078,-0.2254843767325802050827, \ +-0.7149457311090813282917,-0.5814477978791194878738,-0.4632588121589609753137, \ +-0.8972503262100923748790,-0.5936926452425980160754,-0.0604108143246592510511, \ +-0.2083620749723606169201,-0.6092960412140594472774,-0.6787459939901434591292, \ +-0.6970693351773428192431,-0.6155344865687581989988,-0.8847535831035618913987, \ +-0.9045009940161035100203,-0.2228370896879496854126,-0.7435945044006587734131, \ +-0.7797072997435431362945,-0.9858551830709869623348,-0.6231594490146994402835, \ +-0.3087944685075739159608,-0.4935703580252177591348,-0.4570457045425700415286, \ +-0.0002785589239395412880,-0.7550970319205865255441,-0.9107367125371321758820, \ +-0.0805255675456537367563,-0.4411921852011919109593,-0.3509629581295168887500, \ +-0.8834651688371163436031,-0.6829765945613543998149,-0.7587154857028519661100, \ +-0.9508788895131682350481,-0.1722922072289033157411,-0.4769308753189193672561, \ +-0.8698653140140508721601,-0.3524550030910831299735,-0.48064598279368742073, \ +-0.2198520225955942486440,-0.0766272000705114642027,-0.3065575707631173485446, \ +-0.9428944463643879059234,-0.8787732160663290770231,-0.4124717822835545222304, \ +-0.198953189056428669801,-0.8954090767834280706339,-0.6481614554957403351310, \ +-0.0247021173339000768565,-0.2380648741688522473936,-0.8303628800121001241052, \ +-0.4061558941427557689607,-0.8344614350167003369307,-0.8022035151889936877012, \ +-0.9540346088196560714323,-0.9416233317955250425868,-0.0836566823356919425647, \ +-0.0210575991644249005397,-0.0430401703581563405132,-0.8035548300562509460576, \ +-0.5345951582358715592491,-0.4468307121957418859282,-0.2281623925724436396933, \ +-0.9410916791444350337770,-0.8853872018362433093941,-0.3859095350986695427409, \ +-0.7013552814699581805513,-0.0140485558911140305527,-0.4806326207619357471224, \ +-0.0710526121402196841892,-0.8801311527599792183807,-0.8674163434334025701844, \ +-0.2852979580229001999037,-0.3032063540671979806618,-0.8027805094234632399264, \ +-0.0484003958010784038346,-0.3355136589916887235319,-0.9554164532781582730436, \ +-0.7111271555138466426982,-0.4940883791858934337426} + + + + + + +void cacossTest(void){ + int i=0; + float tInR[]=InRF; + float tInI[]=InIF; + float tResR[]=ResRF; + float tResI[]=ResIF; + floatComplex tIn[200]; + floatComplex tRes[200]; + floatComplex out[200]; + + for (i=0;i<200;i++){ + tIn[i]=FloatComplex(tInR[i],tInI[i]); + tRes[i]=FloatComplex(tResR[i],tResI[i]); + out[i]=cacoss(tIn[i]); + } + + + for (i=0;i<200;i++){ + assert ( ( fabs(creals(out[i]) - creals(tRes[i])) / fabs(creals(out[i])) ) < 1e-6); + assert ( ( fabs(cimags(out[i]) - cimags(tRes[i])) / fabs(cimags(out[i])) ) < 1e-6); + } +} + + + +void zacossTest(void){ + int i=0; + double tInR[]=InRD; + double tInI[]=InID; + double tResR[]=ResRD; + double tResI[]=ResID; + doubleComplex tIn[200]; + doubleComplex tRes[200]; + doubleComplex out[200]; + + for (i=0;i<200;i++){ + tIn[i]=DoubleComplex(tInR[i],tInI[i]); + tRes[i]=DoubleComplex(tResR[i],tResI[i]); + out[i]=zacoss(tIn[i]); + } + + + for (i=0;i<200;i++){ + assert ( ( fabs(zreals(out[i]) - zreals(tRes[i])) / fabs(zreals(out[i])) ) < 3e-15); + assert ( ( fabs(zimags(out[i]) - zimags(tRes[i])) / fabs(zimags(out[i])) ) < 3e-15); + } + + out[0]=zacoss(DoubleComplex(0.2,0.1)); + printf ("%1.20f + %1.20f *i\n",zreals(out[0]),zimags(out[0])); + assert ( ( fabs(zreals(out[0]) - 1.3704927556955963652285) / fabs(zreals(out[0])) ) < 3e-16); + assert ( ( fabs(zimags(out[0]) - (- 0.1018639159801242727310)) / fabs(zimags(out[0])) ) < 3e-16); +} + + +void cacosaTest(void){ + int i=0; + float tInR[]=InRF; + float tInI[]=InIF; + float tResR[]=ResRF; + float tResI[]=ResIF; + floatComplex tIn[200]; + floatComplex tRes[200]; + floatComplex out[200]; + + for (i=0;i<200;i++){ + tIn[i]=FloatComplex(tInR[i],tInI[i]); + tRes[i]=FloatComplex(tResR[i],tResI[i]); + } + cacosa(tIn,200,out); + for (i=0;i<200;i++){ + assert ( ( fabs(creals(out[i]) - creals(tRes[i])) / fabs(creals(out[i])) ) < 1e-6); + assert ( ( fabs(cimags(out[i]) - cimags(tRes[i])) / fabs(cimags(out[i])) ) < 1e-6); + } +} + + +void zacosaTest(void){ + int i=0; + double tInR[]=InRD; + double tInI[]=InID; + double tResR[]=ResRD; + double tResI[]=ResID; + doubleComplex tIn[200]; + doubleComplex tRes[200]; + doubleComplex out[200]; + + for (i=0;i<200;i++){ + tIn[i]=DoubleComplex(tInR[i],tInI[i]); + tRes[i]=DoubleComplex(tResR[i],tResI[i]); + } + zacosa(tIn,200,out); + for (i=0;i<200;i++){ + assert ( ( fabs(zreals(out[i]) - zreals(tRes[i])) / fabs(zreals(out[i])) ) < 3e-15); + assert ( ( fabs(zimags(out[i]) - zimags(tRes[i])) / fabs(zimags(out[i])) ) < 3e-15); + } +} + + +int testAcos(void) { + printf("\n>>>> Complex ArcCosine Tests\n"); + cacossTest(); + zacossTest(); + cacosaTest(); + zacosaTest(); + return 0; +} + +int main(void) { + assert(testAcos() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/testRealsAcos.c b/2.3-1/src/c/elementaryFunctions/acos/testRealsAcos.c new file mode 100644 index 00000000..0609a7c2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/testRealsAcos.c @@ -0,0 +1,647 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAcos.h" +#include +#include +#include + + +#define InRF {0.2146485899575054645538f,0.0151845822110772132874f,0.0480025182478129863739f, \ +0.2151292376220226287842f,0.3335768491961061954498f,0.4239571234211325645447f, \ +0.8191771185956895351410f,0.1142293009907007217407f,0.2984248069114983081818f, \ +0.7708469005301594734192f,0.9841971280984580516815f,0.4902752116322517395020f, \ +0.1607228242792189121246f,0.4278817875310778617859f,0.3875273256562650203705f, \ +0.9808397348970174789429f,0.9092800100333988666534f,0.482719236053526401520f, \ +0.665830671321600675583f,0.2464372254908084869385f,0.7713316814042627811432f, \ +0.8996570175513625144958f,0.9153267047367990016937f,0.9860265571624040603638f, \ +0.2070462000556290149689f,0.6318158404901623725891f,0.9118843185715377330780f, \ +0.5755609273910522460938f,0.6911411830224096775055f,0.9032438425347208976746f, \ +0.7275989069603383541107f,0.2983345370739698410034f,0.8753590886481106281281f, \ +0.3796929577365517616272f,0.0876038889400660991669f,0.6358761452138423919678f, \ +0.2255521775223314762115f,0.446817158721387386322f,0.3108666068874299526215f, \ +0.5881394986063241958618f,0.7271268484182655811310f,0.3145425738766789436340f, \ +0.1787185999564826488495f,0.4917406365275382995605f,0.7525973492302000522614f, \ +0.1663594795390963554382f,0.5748702525161206722260f,0.3049920704215764999390f, \ +0.6849988629110157489777f,0.0722861671820282936096f,0.2406598175875842571259f, \ +0.8284838385879993438721f,0.3909099684096872806549f,0.8842546856030821800232f, \ +0.4892868152819573879242f,0.8299614358693361282349f,0.1368344766087830066681f, \ +0.8326684581115841865540f,0.2227798062376677989960f,0.5422506183385848999023f, \ +0.0426926412619650363922f,0.0428817747160792350769f,0.0954485400579869747162f, \ +0.5029790829867124557495f,0.6661717449314892292023f,0.6903511593118309974670f, \ +0.1675704787485301494598f,0.2048450224101543426514f,0.8116860599257051944733f, \ +0.0132086118683218955994f,0.8930616951547563076019f,0.5251825544983148574829f, \ +0.1576961842365562915802f,0.9010067256167531013489f,0.7848821463994681835175f, \ +0.4035740271210670471191f,0.7961377524770796298981f,0.2783856792375445365906f, \ +0.6019253223203122615814f,0.7362591978162527084351f,0.2777095218189060688019f, \ +0.0024121040478348731995f,0.4011422689072787761688f,0.9560912884771823883057f, \ +0.2567708329297602176666f,0.4923398261889815330505f,0.2986499867402017116547f, \ +0.2667899150401353836060f,0.3295984459109604358673f,0.8105424838140606880188f, \ +0.2835742044262588024139f,0.0002408921718597412109f,0.1597527512349188327789f, \ +0.4133680192753672599792f,0.9283765270374715328217f,0.0655929129570722579956f, \ +0.4843033556826412677765f,0.2906650463119149208069f,0.3394159595482051372528f, \ +0.9589011035859584808350f,0.0946640432812273502350f,0.7127310922369360923767f, \ +0.1914948052726686000824f,0.3020674530416727066040f,0.3857871112413704395294f, \ +0.303432715125381946564f,0.1901389393024146556854f,0.3798281177878379821777f, \ +0.5674670808948576450348f,0.6582474960014224052429f,0.8053624569438397884369f, \ +0.6435376014560461044312f,0.1315037836320698261261f,0.2259779060259461402893f, \ +0.6206666971556842327118f,0.6504998095333576202393f,0.6684748218394815921783f, \ +0.6728870486840605735779f,0.1410236409865319728851f,0.4075959790498018264771f, \ +0.627867404837161302567f,0.4480062769725918769836f,0.4035936850123107433319f, \ +0.5879594832658767700195f,0.1153195598162710666656f,0.7683646855875849723816f, \ +0.2349277897737920284271f,0.5894475113600492477417f,0.3207207177765667438507f, \ +0.7428904781118035316467f,0.4984040032140910625458f,0.9036596231162548065186f, \ +0.6709216744638979434967f,0.8537342092022299766541f,0.1756483591161668300629f, \ +0.7642531786113977432251f,0.3008039263077080249786f,0.5137639017775654792786f, \ +0.6256901505403220653534f,0.5433056429028511047363f,0.9364583813585340976715f, \ +0.9189820392057299613953f,0.8656015782617032527924f,0.8644737657159566879272f, \ +0.7842234452255070209503f,0.9146144324913620948792f,0.2163717742078006267548f, \ +0.9016996361315250396729f,0.5193324820138514041901f,0.0936209624633193016052f, \ +0.1577651998959481716156f,0.8322136122733354568481f,0.9679206502623856067657f, \ +0.8463781969621777534485f,0.7359144198708236217499f,0.9125841259956359863281f, \ +0.5761411138810217380524f,0.5802838830277323722839f,0.3673972501419484615326f, \ +0.1465643625706434249878f,0.2601406280882656574249f,0.8280333140864968299866f, \ +0.3835482816211879253387f,0.0134858153760433197021f,0.7306445003487169742584f, \ +0.4633175721392035484314f,0.1587547785602509975433f,0.2259487155824899673462f, \ +0.8859009263105690479279f,0.7426936449483036994934f,0.1664869519881904125214f, \ +0.9855593368411064147949f,0.3667347007431089878082f,0.3923764182254672050476f, \ +0.8068126081489026546478f,0.7054641749709844589233f,0.8674603034742176532745f, \ +0.4587025428190827369690f,0.34914617193862795830f,0.6684310026466846466064f, \ +0.2964043603278696537018f,0.1410161769017577171326f,0.8339820853434503078461f, \ +0.5892267990857362747192f,0.3797874790616333484650f,0.3257266031578183174133f, \ +0.277362580876797437668f,0.5500425547361373901367f,0.8027154603041708469391f, \ +0.0402877209708094596863f,0.0218298300169408321381f,0.2777149509638547897339f, \ +0.4810298834927380084991f,0.5458494136109948158264f,0.5776124666444957256317f, \ +0.2314949147403240203857f,0.0577680678106844425201f,0.2873307904228568077087f, \ +0.7977964854799211025238f,0.4701130483299493789673f} + + +#define InIF {0.0394321014173328876495f,0.3370208526030182838440f,0.6783407176844775676727f, \ +0.2560503073036670684814f,0.5241241441108286380768f,0.9488922869786620140076f, \ +0.3087073317728936672211f,0.7950635720044374465942f,0.9224105221219360828400f, \ +0.4595228182151913642883f,0.7807972389273345470428f,0.226513788104057312012f, \ +0.9408814110793173313141f,0.6131632206961512565613f,0.4430119856260716915131f, \ +0.2909095119684934616089f,0.8606127654202282428741f,0.8565102526918053627014f, \ +0.9051895807497203350067f,0.6799235455691814422607f,0.5336262793280184268951f, \ +0.7887798985466361045837f,0.7137753940187394618988f,0.4034583661705255508423f, \ +0.1977087226696312427521f,0.1879524858668446540833f,0.7047274294309318065643f, \ +0.4047584310173988342285f,0.2033406519331037998199f,0.8319396777078509330750f, \ +0.8779059736989438533783f,0.3923193570226430892944f,0.2464844961650669574738f, \ +0.8334233397617936134338f,0.1366976196877658367157f,0.3573439754545688629150f, \ +0.2009820179082453250885f,0.7071162825450301170349f,0.7366236648522317409515f, \ +0.7454952616244554519653f,0.1443111491389572620392f,0.8881948785856366157532f, \ +0.7866828846745193004608f,0.751696139574050903f,0.6704522022046148777008f, \ +0.9206535546109080314636f,0.6471786811016499996185f,0.7067261617630720138550f, \ +0.0836134557612240314484f,0.0343311587348580360413f,0.5677806059829890727997f, \ +0.0243650637567043304443f,0.5665661157108843326569f,0.3293592026457190513611f, \ +0.4095702595077455043793f,0.6778331939131021499634f,0.9173386511392891407013f, \ +0.2867819787934422492981f,0.7948215636424720287323f,0.6742788180708885192871f, \ +0.9480205052532255649567f,0.8240985525771975517273f,0.5282654105685651302338f, \ +0.4960622992366552352905f,0.1394251813180744647980f,0.6144766295328736305237f, \ +0.6335886861197650432587f,0.9775871522724628448486f,0.6453627035953104496002f, \ +0.8883882975205779075623f,0.8489176682196557521820f,0.5864279735833406448364f, \ +0.240271453280001878738f,0.4364176439121365547180f,0.925035800319164991379f, \ +0.5775052458047866821289f,0.3039593794383108615875f,0.0319902477785944938660f, \ +0.5700858398340642452240f,0.9890570174902677536011f,0.4372045849449932575226f, \ +0.9927745470777153968811f,0.3845063815824687480927f,0.9491574577987194061279f, \ +0.8019652874208986759186f,0.0995050808414816856384f,0.6299527562223374843597f, \ +0.2615322861820459365845f,0.7799491551704704761505f,0.5909776063635945320129f, \ +0.1759523036889731884003f,0.7394210770726203918457f,0.0432920181192457675934f, \ +0.4539660913869738578796f,0.4680440216325223445892f,0.2562364395707845687866f, \ +0.6310959537513554096222f,0.7268115812912583351135f,0.8611525888554751873016f, \ +0.9817700721323490142822f,0.125576748047024011612f,0.0354329412803053855896f, \ +0.1619467637501657009125f,0.7726956922560930252075f,0.5215707314200699329376f, \ +0.0805094735696911811829f,0.7239321577362716197968f,0.1861188411712646484375f, \ +0.8831509896554052829742f,0.2945854095742106437683f,0.9390283836983144283295f, \ +0.0849235635250806808472f,0.3811029498465359210968f,0.3878462770953774452209f, \ +0.4693805794231593608856f,0.3036659620702266693115f,0.8050093413330614566803f, \ +0.0013171425089240074158f,0.0631553060375154018402f,0.3437646273523569107056f, \ +0.1436945316381752490997f,0.1862327279523015022278f,0.2980708214454352855682f, \ +0.5667379423975944519043f,0.3277782374061644077301f,0.9283294035121798515320f, \ +0.0964117287658154964447f,0.8542382624000310897827f,0.7280886103399097919464f, \ +0.4358090544119477272034f,0.3552779997698962688446f,0.2036329694092273712158f, \ +0.5036846981383860111237f,0.4097248231992125511169f,0.5358183733187615871429f, \ +0.2278824020177125930786f,0.3932382804341614246368f,0.0155387269333004951477f, \ +0.5551981288008391857147f,0.0284646600484848022461f,0.0435250797308981418610f, \ +0.7746011493727564811707f,0.8250512345694005489349f,0.4100972842425107955933f, \ +0.4687753473408520221710f,0.0943022081628441810608f,0.7801668713800609111786f, \ +0.9060058109462261199951f,0.7346338243223726749420f,0.6556449970230460166931f, \ +0.7411603308282792568207f,0.5824892017990350723267f,0.4604790774174034595490f, \ +0.3769907029345631599426f,0.4548782887868583202362f,0.0915321484208106994629f, \ +0.2338522099889814853668f,0.1727255983278155326843f,0.1562884538434445858002f, \ +0.9402142520993947982788f,0.5307449479587376117706f,0.2255999082699418067932f, \ +0.495603590738028287888f,0.4456660784780979156494f,0.2354971007443964481354f, \ +0.9914885526522994041443f,0.1743899188004434108734f,0.3443220872431993484497f, \ +0.354053397197276353836f,0.6553237633779644966125f,0.6344098853878676891327f, \ +0.5242204368114471435547f,0.0143296965397894382477f,0.2569495765492320060730f, \ +0.6429493143223226070404f,0.8490996640175580978394f,0.3474385743029415607452f, \ +0.2056481996551156044006f,0.1183789293281733989716f,0.5430422388017177581787f, \ +0.3435242832638323307037f,0.4020882537588477134705f,0.0397002524696290493011f, \ +0.1044149938970804214478f,0.2759570893831551074982f,0.6864448906853795051575f, \ +0.7838258775882422924042f,0.217856429517269134521f,0.7876369827426970005035f, \ +0.8314417852088809013367f,0.7343441187404096126556f,0.6330608930438756942749f, \ +0.2331567634828388690948f,0.79906500224024057388f,0.5055180336348712444305f, \ +0.4791096337139606475830f,0.3705745027400553226471f,0.4796987390145659446716f, \ +0.6252688220702111721039f,0.9830987323075532913208f} + + +#define ResRF {1.3544643076000049131125f,1.555611161001190234643f,1.5227753545043396510295f, \ +1.3539721626852589953f,1.2307011179667750599975f,1.132986233674521114878f, \ +0.6108215211136103217626f,1.4563171387342028761935f,1.26775449603837397916f, \ +0.6906267709340139226981f,0.1780149993077420056409f,1.0583908356731808186879f, \ +1.4093733723685308856233f,1.1286484374252463425137f,1.1728485230904668323859f, \ +0.1960702202025065843394f,0.4292455238079518897720f,1.0670393141498673017509f, \ +0.8421897142243505163250f,1.3217939513349721281088f,0.6898654070878095234676f, \ +0.4518130294310849226491f,0.4144778912738525944448f,0.1673685006122558327490f, \ +1.3622415598200958708475f,0.886902683876586550582f,0.4229445354426950576254f, \ +0.9575064117084541859271f,0.8077294519947597617460f,0.4435267853313298869189f, \ +0.7559810258252398496026f,1.2678490741689776299950f,0.5046182820452449480086f, \ +1.1813319501282872892034f,1.4830799972889596727299f,0.8816531266139947531357f, \ +1.3432865448676185593513f,1.107591898499146854107f,1.2546916476714633503775f, \ +0.9420398538652174913466f,0.7566689041304636154095f,1.2508215962260114118010f, \ +1.3911123978681665391832f,1.0567086722755880678903f,0.7187986332601904448936f, \ +1.4036597839870441628563f,0.9583507556750017197800f,1.260866223812947772842f, \ +0.8161941887163420839002f,1.49844705842773628923f,1.327750735837211149004f, \ +0.5944014578559909667277f,1.1691763062196611766552f,0.4859006803898779369710f, \ +1.0595245187218389482098f,0.5917577795331790957434f,1.4335312043991983443902f, \ +0.5868872597311183270108f,1.3461313138241890463576f,0.9976829092544128307907f, \ +1.5280907058444337387471f,1.5279013990243792697754f,1.4752022598870020431150f, \ +1.0437541728877690605515f,0.8417324807407642328627f,0.8088220073687144573427f, \ +1.4024315436728629347130f,1.3644909573371579725176f,0.6237633497149321915032f, \ +1.5575873308176619858045f,0.4666916888200717261626f,1.0178667076465526264428f, \ +1.4124391178254291911998f,0.4487116894768009012218f,0.6682904180063654608901f, \ +1.1553765634714785459636f,0.6499108421939678859047f,1.2886833903313061888696f, \ +0.9248863868474237470707f,0.7432707317726728879492f,1.2893873050266133617470f, \ +1.5683842204080198357019f,1.1580328237052455175871f,0.297435226780083439291f, \ +1.3111168037999454405451f,1.0560204013836156367034f,1.267518556897496040392f, \ +1.300735649674872540515f,1.2349181037163743379637f,0.6257185580692986581752f, \ +1.2832770556580765930477f,1.5705554346207071247932f,1.4103561444004117930717f, \ +1.1446465290134530956578f,0.3807759856686916410951f,1.5051562877181774435797f, \ +1.065229590564843231704f,1.2758745069326440368940f,1.2245003981556386030149f, \ +0.2876926938040382797368f,1.475990325123716528921f,0.7774122140225130372926f, \ +1.3781114155823581679527f,1.263935652317189628491f,1.1747355003768786829710f, \ +1.2625031633451624379916f,1.379492661159100963530f,1.1811858445520480032087f, \ +0.9673699297198078417281f,0.8523079182101511719338f,0.6345096623572386019f, \ +0.8716851786364174792254f,1.438910541717890456681f,1.3428495335058063808731f, \ +0.9012036112561767620122f,0.8625540038617608429306f,0.8386401358861846899728f, \ +0.8326916717391449340724f,1.4293010137458141972644f,1.1509764487838076707504f, \ +0.8919861503219816967203f,1.1062622764047711498847f,1.1553550780909149775511f, \ +0.9422624178970196995309f,1.4552196270328432436969f,0.6945142387614549051023f, \ +1.33365204874339027263f,0.940421593525194388086f,1.244306023462703247873f, \ +0.7334183218187529940124f,1.049039471207045437495f,0.4425568980368907445744f, \ +0.8353452979806201827984f,0.5476812518090538040028f,1.3942319989111211508970f, \ +0.7009138051156860171886f,1.2652608172154014010147f,1.0312300888962582234853f, \ +0.8947803803621411367075f,0.9964267421930456114509f,0.3584025169927071985398f, \ +0.4053053537674792816681f,0.52444580540694141213f,0.5266937610818180903749f, \ +0.6693527332761076698020f,0.4162430398171838019650f,1.3526996566064570792776f, \ +0.4471117451927261177147f,1.0247266752134434053545f,1.4770380592585463652711f, \ +1.4123692272878969333760f,0.5877081129044480212187f,0.2539777406414896465670f, \ +0.5616486929670342354015f,0.7437800898892800161022f,0.4212363058629264855881f, \ +0.9567967508657543307393f,0.9517191061460341661160f,1.1945873210943909192849f, \ +1.4237020985347941248733f,1.307628484293123394266f,0.5952054691773595029858f, \ +1.1771609573131449621997f,1.5573101026141118463642f,0.7515308864404272037874f, \ +1.08906115052591578873f,1.4113670182151965004635f,1.3428794989819419214427f, \ +0.4823637262878405218558f,0.7337123123270111735295f,1.403530508718869640461f, \ +0.1701502458411716656173f,1.1952995905474013138559f,1.1675825417504139824842f, \ +0.632059235534878305351f,0.7877184695580223827704f,0.5207218041934291719031f, \ +1.0942618099823884225685f,1.2141365475300021081750f,0.8386990520942673166260f, \ +1.2698707048803585806240f,1.4293085531739009308438f,0.5845108665288674121285f, \ +0.9406947904242937141817f,1.1812297752030191944073f,1.2390161854573771282872f, \ +1.2897484327948283144849f,0.9883811343629644863285f,0.6389615878853852626307f, \ +1.5304976993530934326060f,1.5489647626028015814370f,1.2893816535780269205702f, \ +1.0689672707047077615528f,0.9933937851799321538948f,0.9549954566636918995570f, \ +1.337182267875798302725f,1.5129960805231705833762f,1.2793573801230322395384f, \ +0.6471646932978184496577f,1.0813774684738581832733f} + +#define ResIF {1.5313539994534084431876f,1.2270454945240594213374f,0.8252943559980340237914f, \ +1.3118622512767883492302f,1.0191099717030900340120f,0.3210890168818836265530f, \ +1.2569626427487261555171f,0.6516839411893488032135f,0.3965201754844740467121f, \ +1.0933384694570118522705f,0.6748555027471666578620f,1.3422993862285261812417f, \ +0.3455732962500616678447f,0.9107376302950138668990f,1.1118407738194451273017f, \ +1.2756190002512473036234f,0.534324627989826939078f,0.5423264441023638582351f, \ +0.4389707532009931023609f,0.8231379603724421345490f,1.0079137337479666669537f, \ +0.6619748165277959950359f,0.7759222830602500176056f,1.1555029726809751267069f, \ +1.3717763753859233410992f,1.3817192645680580476153f,0.7887574388774107880806f, \ +1.154081687844786152652f,1.3660276734930973940862f,0.5882019906981408308155f, \ +0.4993250010048232434556f,1.1676445771431656073247f,1.3217451760779403979740f, \ +0.5855226957110959418173f,1.4336693595120120203745f,1.205373778014949381898f, \ +1.3684360354595728193061f,0.7853847263571438475083f,0.7427319788503217168341f, \ +0.7295187281370371090716f,1.425979527467823082532f,0.4773949303589768988765f, \ +0.6653789652250786668120f,0.7201661840055592067600f,0.8359782312775623225320f, \ +0.4010449856231582121957f,0.8669186056114237537429f,0.7859362957809750138694f, \ +1.4870851367060453629421f,1.536458420533861612967f,0.9669891090554120216538f, \ +1.5464288516482158630794f,0.9684637239770992334087f,1.2351714956359907127137f, \ +1.1488133772379154340371f,0.8259848817840680368363f,0.4094531852851721054343f, \ +1.2799303040161731370716f,0.6520828442366262134300f,0.8308086408007220313721f, \ +0.3238399424616983379721f,0.6021873821209878796523f,1.0142399690964163383455f, \ +1.0517384795139694819710f,1.4309154243829336206062f,0.9090739203715231253611f, \ +0.8846133529122768290875f,0.2121182423802339123142f,0.8692983189363326923527f, \ +0.47697379514371801568f,0.5568622476164218904060f,0.9441544643774535394698f, \ +1.3281508401476103120586f,1.1191830432760909719292f,0.3896665024665909582424f, \ +0.9551267985697193818595f,1.2619503910172775729137f,1.5388006201603028344493f, \ +0.9641859946151247751089f,0.1480742995944135109720f,1.1183082300559199495638f, \ +0.1202844206176664348940f,1.1761232908094509941321f,0.3202477413820724594373f, \ +0.6402184399260194558323f,1.4711263056909940072359f,0.8893039482321445365898f, \ +1.3061869235485943363528f,0.6762117558368399006241f,0.9385261464846976764420f, \ +1.3939232457675478915604f,0.7385862765729950263349f,1.5274907742828045531525f, \ +1.0995848226997599894617f,1.0837202329455530858127f,1.3116696951046082908476f, \ +0.8878310767922412694020f,0.7571280287683522791653f,0.5332636611081145172619f, \ +0.1912359123928325799202f,1.44488716691460328256f,1.5353559670190242147925f, \ +1.4081331860416281820392f,0.6877194039437647399282f,1.02210543863474323523f, \ +1.4901996245029442977881f,0.7613110787878502039305f,1.3835858489414398775352f, \ +0.4882587676373527640905f,1.2717746792548134671108f,0.3510027969902725919482f, \ +1.48577035226708975557f,1.1798073422108839025668f,1.1725025103978652385450f, \ +1.082207178445642403730f,1.262258365804196147408f,0.6351051130420296564338f, \ +1.5694791839051283055539f,1.5075989617580312085465f,1.2198734065895773248656f, \ +1.4266026395050115383f,1.3834699355835038403484f,1.2681253600974256023903f, \ +0.9682551856135412915449f,1.2368453959617209392263f,0.3809027641084558046813f, \ +1.4742346083993373984100f,0.5467124691036475692130f,0.7552669049014355540095f, \ +1.1198593352029904135492f,1.2075848742491721576897f,1.3657291093636882983731f, \ +1.0429375766976551886955f,1.1486439448135470353662f,1.0053196235121615309538f, \ +1.3408940198345395966584f,1.166645348645906299367f,1.555256974484105159107f, \ +0.9821951633092294020599f,1.5423278214913895833860f,1.5272574927805724342988f, \ +0.6847121192620346796787f,0.6005034615094222427700f,1.1482356007343721415737f, \ +1.0828924838534597085982f,1.4763537862006439471685f,0.6758638036045827579557f, \ +0.4370463027476746975530f,0.7456695165395208491077f,0.8557598004935614843802f, \ +0.7359992024987982439654f,0.9490086268240732758628f,1.0922615019568577832132f, \ +1.184251206507022535774f,1.098560786595480287531f,1.4791358826505083268188f, \ +1.334758450002002438950f,1.3972001359840415801727f,1.4138645236300337870716f, \ +0.3475374929910621246698f,1.0113170412320249269555f,1.3432375513394290145186f, \ +1.0522666912154046148231f,1.1088781475531621634190f,1.3330663041014356728908f, \ +0.1305645353871486558095f,1.3955101678176036195111f,1.2192797033375830650925f, \ +1.2088946193116594240990f,0.8561851579342378837367f,0.8835514575659523250906f, \ +1.0189969006408940987995f,1.5564661397993202474055f,1.3109318548790835912143f, \ +0.8724535168872261658990f,0.5565178057806303701938f,1.215958206971465838109f, \ +1.3636703086937589368688f,1.4521391539839998419126f,0.9967404603545287899991f, \ +1.2201293368773795666726f,1.1569998731124000457271f,1.5310856382606727876805f, \ +1.4661906653829819280332f,1.2912110119575965772043f,0.8142075135673421115712f, \ +0.6699932176804166417128f,1.3511787210901111677686f,0.6638319846196626405899f, \ +0.5890987081162550875746f,0.7460964201464012068854f,0.8852953565042832595466f, \ +1.3354736682149619397819f,0.6450578234482783335224f,1.0408140682934756693356f, \ +1.0711562631188329408616f,1.1911688411902121575991f,1.0704849901046198379362f, \ +0.8953203785098390321551f,0.1841145960893279809323f} + + +#define InRD {0.3596746218390762805939,0.9327730434015393257141,0.6520409691147506237030, \ +0.4466360807418823242188,0.5597501345910131931305,0.1586764482781291007996, \ +0.1349689974449574947357,0.5309285502880811691284,0.7984495465643703937531, \ +0.5877699116244912147522,0.5329149584285914897919,0.3033532761037349700928, \ +0.0826407433487474918365,0.2014105310663580894470,0.2214868194423615932465, \ +0.5626921299844980239868,0.594995748717337846756,0.3364775599911808967590, \ +0.9449067446403205394745,0.2256392762064933776855,0.0615444355644285678864, \ +0.3346643997356295585632,0.9560257433913648128510,0.1118353512138128280640, \ +0.875087611842900514603,0.9554424667730927467346,0.2715726937167346477509, \ +0.6644485183060169219971,0.0682194815017282962799,0.7714469349011778831482, \ +0.8863877407275140285492,0.5750523973256349563599,0.7297094804234802722931, \ +0.2650343524292111396790,0.2903900700621306896210,0.7815508693456649780273, \ +0.9579934873618185520172,0.8447621343657374382019,0.1320300563238561153412, \ +0.8078997563570737838745,0.9455244098789989948273,0.500539929606020450592, \ +0.3719757865183055400848,0.9143753759562969207764,0.2877321452833712100983, \ +0.3162028631195425987244,0.7707839584909379482269,0.0271399710327386856079, \ +0.1103429165668785572052,0.5582566531375050544739,0.0543051543645560741425, \ +0.9158540144562721252441,0.1088079833425581455231,0.5595446033403277397156, \ +0.6005734889768064022064,0.5880853887647390365601,0.0935917277820408344269, \ +0.1165864700451493263245,0.9919306333176791667938,0.3692654408514499664307, \ +0.1350691155530512332916,0.6193392043933272361755,0.2761342129670083522797, \ +0.6369419116526842117310,0.9017825317569077014923,0.6321295695379376411438, \ +0.2802005815319716930389,0.6780787408351898193359,0.2858079918660223484039, \ +0.1445086328312754631042,0.8207319690845906734467,0.6381527464836835861206, \ +0.9089807276614010334015,0.2107781330123543739319,0.1544780055992305278778, \ +0.0307971797883510589600,0.6037301481701433658600,0.1969387223944067955017, \ +0.5128816193901002407074,0.7767421547323465347290,0.4622741756029427051544, \ +0.3538100840523838996887,0.0643593105487525463104,0.2408019527792930603027, \ +0.54792295629158616066,0.9350729240104556083679,0.148065799381583929062, \ +0.2356592025607824325562,0.8622419466264545917511,0.5789828384295105934143, \ +0.1228930498473346233368,0.4611959345638751983643,0.6618243739940226078033, \ +0.1725060557946562767029,0.6754536679945886135101,0.3481215108186006546021, \ +0.7184230727143585681915,0.9166270541027188301086,0.9307986753992736339569, \ +0.7746474295854568481445,0.6161916949786245822906,0.8115780530497431755066, \ +0.2096196576021611690521,0.6249590050429105758667,0.6797852967865765094757, \ +0.2807403812184929847717,0.7756852875463664531708,0.6582339219748973846436, \ +0.6270702988840639591217,0.1519677182659506797791,0.4172622240148484706879, \ +0.6569576654583215713501,0.5401938227005302906036,0.7150812121108174324036, \ +0.2062703850679099559784,0.3232858255505561828613,0.2487624012865126132965, \ +0.0742864711210131645203,0.2789225964806973934174,0.8922032769769430160522, \ +0.7188800652511417865753,0.5142624313011765480042,0.9815986151807010173798, \ +0.9302302338182926177979,0.5417958036996424198151,0.0986720984801650047302, \ +0.2257035276852548122406,0.2884251791983842849731,0.1159104001708328723907, \ +0.2198451654985547065735,0.3952605235390365123749,0.6784346699714660644531, \ +0.6158926435746252536774,0.3183825043961405754089,0.6509880437515676021576, \ +0.8403400164097547531128,0.3426549141295254230499,0.4914325335994362831116, \ +0.9746113042347133159637,0.7710508368909358978271,0.5479381443001329898834, \ +0.2083894601091742515564,0.7971581942401826381683,0.98199548758566379547, \ +0.327256154734641313553,0.8527633966878056526184,0.5549895497970283031464, \ +0.2548583671450614929199,0.6749493652023375034332,0.3089723540470004081726, \ +0.0173138021491467952728,0.8641140963882207870483,0.2950978805311024188995, \ +0.3128061080351471900940,0.7289360011927783489227,0.7351085729897022247314, \ +0.2620439515449106693268,0.7843119418248534202576,0.4119912139140069484711, \ +0.5064369011670351028442,0.1242738110013306140900,0.8618522631004452705383, \ +0.6704122978262603282928,0.9653681963682174682617,0.5454088845290243625641, \ +0.8560840962454676628113,0.8408820494078099727631,0.8250672649592161178589, \ +0.0760563765652477741241,0.8426104495301842689514,0.3340197275392711162567, \ +0.3123631589114665985107,0.1502692312933504581451,0.1120535572990775108337, \ +0.3095519519411027431488,0.5348146054893732070923,0.9003654685802757740021, \ +0.1962999971583485603333,0.0292179766111075878143,0.0958223119378089904785, \ +0.8838568949140608310699,0.6896676821634173393250,0.7311593382619321346283, \ +0.926538145169615745544,0.3162371893413364887238,0.5837447280064225196838, \ +0.3695438797585666179657,0.8033211864531040191650,0.9033793644048273563385, \ +0.3346501952037215232849,0.0631741485558450222015,0.5194906610995531082153, \ +0.8672926020808517932892,0.3814667062833905220032,0.5968301701359450817108, \ +0.1801257431507110595703,0.2589884647168219089508,0.3345949379727244377136, \ +0.8190965964458882808685,0.5886622350662946701050} + + +#define InID {0.9229331132955849170685,0.3624883117154240608215,0.4197423788718879222870, \ +0.1054803654551506042480,0.9433643990196287631989,0.2429116321727633476257, \ +0.5323819159530103206635,0.6621514465659856796265,0.3330680062063038349152, \ +0.5687411213293671607971,0.8901842678897082805634,0.3511209674179553985596, \ +0.0435834513045847415924,0.3901510154828429222107,0.6022473922930657863617, \ +0.1305641103535890579224,0.7857504826970398426056,0.3076619254425168037415, \ +0.1008732873015105724335,0.4706113189458847045898,0.23320029163733124733, \ +0.7386203287169337272644,0.0550201400183141231537,0.9430699776858091354370, \ +0.3567060981877148151398,0.8223499367013573646545,0.7739888499490916728973, \ +0.6216929666697978973389,0.9831431121565401554108,0.1827249368652701377869, \ +0.9450939274393022060394,0.2617440912872552871704,0.1728078690357506275177, \ +0.2669151099398732185364,0.0490687671117484569550,0.7276103869080543518066, \ +0.5088469409383833408356,0.4790528221055865287781,0.2969552963040769100189, \ +0.6372112985700368881226,0.8925450225360691547394,0.8275718921795487403870, \ +0.4322279985062777996063,0.6919547356665134429932,0.9382223919965326786041, \ +0.3049683338031172752380,0.2419023117981851100922,0.6609900016337633132935, \ +0.5614917469210922718048,0.7187329726293683052063,0.1203774022869765758514, \ +0.4885075986385345458984,0.8546244152821600437164,0.1922059385105967521667, \ +0.5297633125446736812592,0.4928359072655439376831,0.8427759413607418537140, \ +0.0541030326858162879944,0.7004424850456416606903,0.1260847412049770355225, \ +0.214821046683937311172,0.3354639699682593345642,0.4156156606040894985199, \ +0.2630857769399881362915,0.6225479659624397754669,0.5927724959328770637512, \ +0.2235821518115699291229,0.4883798584342002868652,0.6419621580280363559723, \ +0.2759983791038393974304,0.9215044914744794368744,0.3500011768192052841187, \ +0.9904493917711079120636,0.3603112781420350074768,0.6544074560515582561493, \ +0.0488083250820636749268,0.0935482070781290531158,0.4602164840325713157654, \ +0.4731614640913903713226,0.5321122277528047561646,0.5950817507691681385040, \ +0.1448625372722744941711,0.6952003496699035167694,0.4603509455919265747070, \ +0.9043989875353872776031,0.6732707200571894645691,0.9117235108278691768646, \ +0.0155613552778959274292,0.3744752858765423297882,0.8682364234700798988342, \ +0.9851324330084025859833,0.0203977040946483612061,0.2046223790384829044342, \ +0.3476523896679282188416,0.8804515874944627285004,0.3364470396190881729126, \ +0.6615577009506523609161,0.8320038290694355964661,0.6744837048463523387909, \ +0.0105915144085884094238,0.7125830971635878086090,0.7467854125425219535828, \ +0.5864494233392179012299,0.1381675656884908676147,0.6646229107864201068878, \ +0.8385901385918259620667,0.3738613124005496501923,0.9116719700396060943604, \ +0.9028714434243738651276,0.0236200755462050437927,0.9373822710476815700531, \ +0.8237647730857133865356,0.3227997911162674427032,0.1873689787462353706360, \ +0.4784183013252913951874,0.4933190941810607910156,0.5492720552720129489899, \ +0.1542267827317118644714,0.0531956567429006099701,0.0832678060978651046753, \ +0.5365209286101162433624,0.5457559684291481971741,0.8670723657123744487762, \ +0.7789970897138118743896,0.6427326560951769351959,0.7463898053392767906189, \ +0.1528341299854218959808,0.2960368636995553970337,0.772991370875388383865, \ +0.6953024687245488166809,0.9767245980910956859589,0.8857980892062187194824, \ +0.6843328052200376987457,0.7232010317966341972351,0.8159600137732923030853, \ +0.8081069495528936386108,0.0466573764570057392120,0.1527893329039216041565, \ +0.2514782394282519817352,0.7392859049141407012939,0.3532526479102671146393, \ +0.8816537177190184593201,0.6196721545420587062836,0.0845316220074892044067, \ +0.2746751648373901844025,0.6663206564262509346008,0.9668574291281402111053, \ +0.6633397787809371948242,0.5497416653670370578766,0.32623623590916395187, \ +0.1502246721647679805756,0.7367267441004514694214,0.0073796664364635944366, \ +0.5864175269380211830139,0.4290259550325572490692,0.8449981324374675750732, \ +0.8130874247290194034576,0.7775258263573050498962,0.3897457099519670009613, \ +0.4248142335563898086548,0.533753272611647844315,0.1121117742732167243958, \ +0.5490060034207999706268,0.6743023172020912170410,0.1145843290723860263824, \ +0.7557823462411761283875,0.4779561846517026424408,0.6349658127874135971069, \ +0.3618945856578648090363,0.4120397204533219337463,0.7918969090096652507782, \ +0.9591403640806674957275,0.0255023674108088016510,0.6395420199260115623474, \ +0.8488885364495217800140,0.3317467588931322097778,0.0744871688075363636017, \ +0.6205359296873211860657,0.5010939049534499645233,0.0150907337665557861328, \ +0.2600558646954596042633,0.5992111889645457267761,0.7426054789684712886810, \ +0.48545965366065502167,0.5592682962305843830109,0.7087269583716988563538, \ +0.5975068728439509868622,0.6302660666406154632568,0.5933722318150103092194, \ +0.4056600620970129966736,0.0919187492690980434418,0.4744881335645914077759, \ +0.6144977030344307422638,0.2306251050904393196106,0.6537790927104651927948, \ +0.9051569327712059020996,0.1544607155956327915192,0.1138164652511477470398, \ +0.7841078578494489192963,0.3626406397670507431030} + + +#define ResRD {1.2028771717397248597337,0.3687655164040291033700,0.8605230767316590645422, \ +1.1077942947750605284796,0.9767120864552386594326,1.4114463541323842843411, \ +1.4354141532486464072349,1.0111003946929904007135,0.6460807643012056455945, \ +0.942496758054768402069,1.0087545936051280914825,1.262586531900748765267, \ +1.4880612274536648698131,1.3679985766801496804845,1.3474574320651662162618, \ +0.9731575131888534624380,0.9335359675538464907518,1.2276224867355149950043, \ +0.3334867299422681341525,1.3431971414533188102780,1.5092129727018919194137, \ +1.2295472552241557551156,0.2976587959346745915212,1.4587265301529550587389, \ +0.5051795104327043706149,0.2996411780017103065887,1.2957695643431932364109, \ +0.8440406830828603990113,1.50252381975481164034,0.6896842944166139410811, \ +0.4813132194495245430588,0.9581281339053301371322,0.7528993595207621458698, \ +1.3025567781811444589835,1.2761618784887454047805,0.6736483673578720354769, \ +0.2908743485069323897463,0.5646758064966191925649,1.438379639941827381477, \ +0.6302168108311377858755,0.3315946371104716572376,1.0465739819013770706135, \ +1.1896596872617526408078,0.4168338903307298726197,1.2789383292392024760176, \ +1.2490720222420119700502,0.6907255719643182745315,1.5436530228729308245050, \ +1.4602282599819302877364,0.9785132735167261230913,1.5164644455125539934670, \ +0.4131665402940313813751,1.4617724919866201815921,0.976960093696471187918, \ +0.9265781639066993369269,0.9421067569746168768319,1.4770674228670064298541, \ +1.4539441129892149984215,0.1271238965902136142105,1.1925778534654034590545, \ +1.4353131098866320769503,0.9028955486769573157702,1.291026727930056683391, \ +0.8802714396298314536438,0.4469199799286652230457,0.8864978673073259374249, \ +1.2867932721224226710888,0.8256508509224979031060,1.280946841714904582687, \ +1.4257799518141858197140,0.6081052805119846471626,0.8786997656642617782197, \ +0.4299640690276578247619,1.358425418880489399243,1.4156972317305263064924, \ +1.539994276579740084543,0.9226243343869420243664,1.3725618187689798688211, \ +1.0322581557317391798279,0.6813198095430882395007,1.0902381815309389878621, \ +1.2091547718013440082530,1.5063925025508968502663,1.3276042940716099582943, \ +0.9909170452840954101958,0.3623315827204681149887,1.4221840996178074512102, \ +1.3328995078730689893831,0.5311168124493514941520,0.9533157205028358616161, \ +1.4475918193576946535472,1.0914537614762709338834,0.8475465668021775478280, \ +1.397423024242874678436,0.8292165733697762775023,1.2152298005000905511963, \ +0.7692636520177893455497,0.4112369685450336653787,0.3742045597954955504783, \ +0.6846389399063078640140,0.9068981756365698254641,0.6239482394976629819894, \ +1.3596103677318518432315,0.8957173083282501391267,0.8233264779021800539027, \ +1.2862309003134888563125,0.6829961273496524265525,0.8523259494147855663826, \ +0.8930098639160600759723,1.4182375163347213931075,1.140365661220332116343, \ +0.8540200113324175612561,1.00012891553026617153,0.7740560507824159053314, \ +1.3630344917090961853745,1.2415966072092310401587,1.3193940476076928547400, \ +1.4964413607109372517101,1.2881243295307911456149,0.4685959659402677002227, \ +0.7686064589523176060482,1.0306489046710447521349,0.1921358819063216094580, \ +0.3757565999820682289823,0.9982241210548544740888,1.4719634077784360393082, \ +1.343131188620912519482,1.2782146146919892704119,1.4546247978060928840449, \ +1.34914057669922526905,1.1644448741462574137273,0.8251664782779083440190, \ +0.9072778206884453133796,1.2467736163145475281055,0.8619109958260211534764, \ +0.5728861415513620825024,1.2210548843020616605060,1.057062476566032582781, \ +0.2258178915663380803558,0.6903065678994606546581,0.9908988891861231218527, \ +1.3608683482364234418327,0.6482226075956507571618,0.1900463122401400695161, \ +1.2373979549105573738643,0.5495428169674564378155,0.9824459232054076895935, \ +1.3130950959292289059732,0.8299002502243607581889,1.2566839986965321340762, \ +1.5534816595091374136217,0.5274088279670856582726,1.2712383671403899576546, \ +1.2526503588977928593806,0.7540298966945283565266,0.7449695106054331494860, \ +1.3056567692434561944737,0.6692100940463061586883,1.1461580467200653821180, \ +1.0397487722058409431725,1.4462003916605226105929,0.5318856797809271563793, \ +0.8360320128831254526958,0.2639453129802519226743,0.9939194594428718554369, \ +0.5431515558502996166013,0.5718854142758250658218,0.6004750914590427646189, \ +1.494666433096084601218,0.5686839111974200111632,1.2302312925591223358168, \ +1.253116675176039196415,1.4199557361545380729240,1.4585069438499760341443, \ +1.2560745223234066614282,1.0065080046249368361799,0.4501876422711190706138, \ +1.37321326022231460229,1.541574191402776516924,1.474826766905839248167, \ +0.4867517858084012272180,0.8097662970595214115832,0.7507765257710836692695, \ +0.3856924750031833770691,1.249035839325627783580,0.9474631507713823230787, \ +1.1922782211545606134706,0.6379451906902231517194,0.4432108724859483706027, \ +1.2295623289060186866806,1.5075800815380702157853,1.0245415674248141701952, \ +0.5210587890871913874236,1.1794138612822491207766,0.9312516456662516262099, \ +1.3896820429875444968815,1.3088215387819075452569,1.2296209664609143441538, \ +0.6109619018903345022409,0.9413933583319856746030} + +#define ResID {0.3951648575239898320000,1.1998599191854182333117,1.1376348605752844012073, \ +1.465119377848908444051,0.3381668921842964636859,1.3254300655944222242510, \ +1.0093844168860410803745,0.8471101875532934810664,1.2312408252616013903946, \ +0.9658218036234816894492,0.4730468665045839404826,1.2120282989381994109834, \ +1.5271990657633036647667,1.1700007263913658750454,0.9244830082340818044884, \ +1.4398583874714105945714,0.6668878269832446692433,1.2580615360595837071145, \ +1.469751180044867489016,1.0808128388866473645891,1.3354289061467599086797, \ +0.7397748903744012505257,1.5157483892532124247765,0.3390532325241176758723, \ +1.2060566608171623403933,0.6052674782943161524429,0.6856796849056999709759, \ +0.8998940392728933534983,0.1838720261619849749568,1.3870389861749277127245, \ +0.3329144266647406369408,1.3059674741482103499379,1.3971166092654940804607, \ +1.3006057440568965510863,1.5217078474803023002693,0.7559642911271701182230, \ +1.0369514991511814550051,1.0712209857356591591326,1.269293794668532759928, \ +0.8799219498148160845119,0.4678387125772855426042,0.5960279397443470905671, \ +1.1238342982646878365216,0.8066031631951199321051,0.3533394355311441636935, \ +1.2608911478449162935078,1.3264704147976305037560,0.8486590233944532046806, \ +0.9746088733052290509207,0.7688180390299395039477,1.4501262863697272909036, \ +1.0604177661273477273340,0.5459692445499627622141,1.3773868224199956600273, \ +1.0124748504563416684476,1.0554503653691549303062,0.5683765307039274627954, \ +1.51666686477275236555,0.7947790388807016714878,1.444375103731482257174, \ +1.3542877317815249504918,1.2286986304625879817820,1.1421767363912749271293, \ +1.3045770615336993447642,0.8988019765557795359712,0.9362993172800923025179, \ +1.3453082070226998201434,1.0605641572328137200998,0.8737416901115169221015, \ +1.291168053919788061279,0.3988595901749554806237,1.2132239668698467927044, \ +0.1383173844378887129558,1.202194763365512786280,0.8573976133064432625375, \ +1.521968601948950672309,1.477111135350419379719,1.0925573022860231020559, \ +1.0779203988995060825573,1.0097029754548383362334,0.9334289595014243490212, \ +1.4254222838750787438755,0.8020977417833006217762,1.0924058427012042216120, \ +0.4408272680981772384534,0.8321728959279414139516,0.4233361516656445888707, \ +1.555234343403203434164,1.1869655070484292913591,0.5191596559668992805214, \ +0.1726531465878520799073,1.5503972079690304664013,1.36471841886514577702, \ +1.2157301769255985934848,0.4939825241386303633639,1.2276548967083007468659, \ +0.8479022368018470645623,0.5880863647395992988010,0.8305311605615690595528, \ +1.5602046143499832542290,0.7776231797042172377843,0.7275809483667111665639, \ +0.9441279829885425023406,1.4321853316086308183230,0.843807306082328567598, \ +0.5761063109755523159450,1.1876275724298643865495,0.4234615972962428864790, \ +0.4443937992506357126388,1.5471740543923786503910,0.3557593635626380978998, \ +0.6027763814257049990175,1.2421101770287796828285,1.38231332584564192700, \ +1.0719437082101082037155,1.0548949687688948806397,0.9893034572407536364480, \ +1.4159515018071209269124,1.5175755494012541646498,1.4874319959560586834613, \ +1.0044873206933038201072,0.9935053064241541331825,0.5215010392624837010089, \ +0.6777315702665774876934,0.8727363606570205378787,0.7281755897232153884602, \ +1.4173608641957105014342,1.2702554699418613370909,0.68725347232280220577, \ +0.8019556663866970191989,0.2161770444474211128050,0.4825853710330196832956, \ +0.8171080273286167594549,0.7623702910110113917241,0.6164084604410411394326, \ +0.6298651458963931970558,1.5241220055757684903597,1.4174061936572994735428, \ +1.3165890509097089022816,0.7387870320346577868165,1.2097506908133905945135, \ +0.4914411126250278760708,0.9024714041224581873024,1.486163708235356928355, \ +1.2925444697673078575662,0.8415327957004463677038,0.2581754363689663378523, \ +0.8455232994143846436685,0.9887413792308584747914,1.2384771061229662425518, \ +1.4200008069038045910304,0.7425795503893282134555,1.563416593374662655336, \ +0.9441673613882943794096,1.127382154057082752630,0.5642346520145214983089, \ +0.621360123138604558690,0.6800745718063847533585,1.1704408755783293205610, \ +1.1320396542439032927518,1.0077635667413964437600,1.458448357717931243016, \ +0.9896218035143569125012,0.8307768192585568423070,1.4559597641231585285482, \ +0.7139482848605868126057,1.0724698824433842592185,0.8828320605509567542413, \ +1.2004968934363549060151,1.146104811676569967815,0.6568872036374757694688, \ +0.2868482517606141812827,1.545291194242470300679,0.8768939505825917857251, \ +0.5569173641664709739629,1.232641734141120881674,1.4962401054388050347654, \ +0.9013703796371622667394,1.04593395730292670898,1.5557050202002185024241, \ +1.3077162690478547624195,0.9282808676410991832739,0.7338439661737942154573, \ +1.0639074721436194703728,0.9772934382272977504869,0.7831042538275899689282, \ +0.9304079984506387068777,0.8889004609716527616214,0.9355544417368609755314, \ +1.1530954621848632513093,1.4787476451204033534026,1.076413879615883972818, \ +0.9090472087664583922262,1.3380762696952535062422,0.8582283270195686375459, \ +0.4390475642403208755837,1.4157147317770455430264,1.4567326846157102604451, \ +0.6695389988269940806376,1.199696469825039413237} + + + +void sacossTest(void) { + int i=0; + float tIn1[]=InRF; + float tRes1[]=ResRF; + float tIn2[]=InIF; + float tRes2[]=ResIF; + + for(i=0;i<200;i++){ + assert ( ( fabs(sacoss(tIn1[i]) - tRes1[i]) / fabs(sacoss(tIn1[i])) ) < 1e-6); + assert ( ( fabs(sacoss(tIn2[i]) - tRes2[i]) / fabs(sacoss(tIn2[i])) ) < 3e-6); + } +} + + +void dacossTest(void) { + int i=0; + double tIn1[]=InRD; + double tRes1[]=ResRD; + double tIn2[]=InID; + double tRes2[]=ResID; + + for(i=0;i<200;i++){ + assert ( ( (fabs(dacoss(tIn1[i])) - tRes1[i]) / fabs(dacoss(tIn1[i])) ) < 3e-15); + assert ( ( (fabs(dacoss(tIn2[i])) - tRes2[i]) / fabs(dacoss(tIn2[i])) ) < 3e-15); + } +} + + +void sacosaTest(void){ + int i=0; + float tIn1[]=InRF; + float tRes1[]=ResRF; + float tIn2[]=InIF; + float tRes2[]=ResIF; + float out1[200]; + float out2[200]; + sacosa(tIn1,200,out1); + sacosa(tIn2,200,out2); + for(i=0;i<200;i++){ + assert( (fabs(out1[i]-tRes1[i])/fabs(out1[i])) <1e-6); + assert( (fabs(out2[i]-tRes2[i])/fabs(out2[i])) <3e-6); + } +} + +void dacosaTest(void){ + int i=0; + double tIn1[]=InRD; + double tRes1[]=ResRD; + double tIn2[]=InID; + double tRes2[]=ResID; + double out1[200]; + double out2[200]; + dacosa(tIn1,200,out1); + dacosa(tIn2,200,out2); + for(i=0;i<200;i++){ + assert( (fabs(out1[i]-tRes1[i])/fabs(out1[i])) <3e-15); + assert( (fabs(out2[i]-tRes2[i])/fabs(out2[i])) <3e-15); + } +} + + + + +int testAcos(void) { + printf("\n>>>> Reals ArcCosine Tests\n"); + sacossTest(); + dacossTest(); + sacosaTest(); + dacosaTest(); + return 0; +} + +int main(void) { + assert(testAcos() == 0); + return 0; +} + + diff --git a/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj b/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj new file mode 100644 index 00000000..16540c31 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testCplxAcos + {20AFE4D5-CE52-4CCE-ADAB-87442079BC0B} + test_cplxacos + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj.filters b/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj.filters new file mode 100644 index 00000000..df3e5449 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/test_cplxacos/test_cplxacos.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj b/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj new file mode 100644 index 00000000..35c1287e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0556427D-6D88-4A12-9EB3-7F551D6F1FA4} + testrealsacos + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj.filters b/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj.filters new file mode 100644 index 00000000..c2135695 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/test_realsacos/testrealsacos.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acos/zacosa.c b/2.3-1/src/c/elementaryFunctions/acos/zacosa.c new file mode 100644 index 00000000..812c1405 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/zacosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acos.h" + +void zacosa(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zacoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acos/zacoss.c b/2.3-1/src/c/elementaryFunctions/acos/zacoss.c new file mode 100644 index 00000000..de6f3fe9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acos/zacoss.c @@ -0,0 +1,147 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + * This fonction is a translation of fortran wacos write by Bruno Pincon + * REFERENCE + * This is a Fortran-77 translation of an algorithm by + * T.E. Hull, T. F. Fairgrieve and P.T.P. Tang which + * appears in their article : + * "Implementing the Complex Arcsine and Arccosine + * Functions Using Exception Handling", ACM, TOMS, + * Vol 23, No. 3, Sept 1997, p. 299-335 + */ + +#include "acos.h" +#include "atan.h" +#include "log.h" +#include "log1p.h" +#include "sqrt.h" +#include "abs.h" +#include "lapack.h" +#include "min.h" +#include "max.h" + +#define localSign(x) (x>0 ? 1 : -1) + +doubleComplex zacoss(doubleComplex z) { + static double sdblPi = 3.1415926535897932384626433; + static double sdblPi_2 = 1.5707963267948966192313216; + static double sdblLn2 = 0.6931471805599453094172321; + static double sdblAcross = 1.5; + static double sdblBcross = 0.6417; + + double dblLsup = dsqrts(getOverflowThreshold())/8.0; + double dblLinf = 4.0 * dsqrts(getUnderflowThreshold()); + double dblEpsm = dsqrts(getRelativeMachinePrecision()); + + double dblAbsReal = dabss(zreals(z)); + double dblAbsImg = dabss(zimags(z)); + double dblSignReal = localSign(zreals(z)); + double dblSignImg = localSign(zimags(z)); + + double dblR = 0, dblS = 0, dblA = 0, dblB = 0; + + double dblTemp = 0; + + double _pdblReal = 0; + double _pdblImg = 0; + + if( min(dblAbsReal, dblAbsImg) > dblLinf && max(dblAbsReal, dblAbsImg) <= dblLsup) + {/* we are in the safe region */ + dblR = dsqrts( (dblAbsReal + 1 )*(dblAbsReal + 1 ) + dblAbsImg*dblAbsImg); + dblS = dsqrts( (dblAbsReal - 1 )*(dblAbsReal - 1 ) + dblAbsImg*dblAbsImg); + dblA = 0.5 * ( dblR + dblS ); + dblB = dblAbsReal / dblA; + + + /* compute the real part */ + if(dblB <= sdblBcross) + _pdblReal = dacoss(dblB); + else if( dblAbsReal <= 1) + _pdblReal = datans(dsqrts(0.5 * (dblA + dblAbsReal) * (dblAbsImg*dblAbsImg / (dblR + (dblAbsReal + 1)) + (dblS + (1 - dblAbsReal)))) / dblAbsReal); + else + _pdblReal = datans((dblAbsImg * dsqrts(0.5 * ((dblA + dblAbsReal) / (dblR + (dblAbsReal + 1)) + (dblA + dblAbsReal) / (dblS + (dblAbsReal - 1))))) / dblAbsReal); + + /* compute the imaginary part */ + if(dblA <= sdblAcross) + { + double dblImg1 = 0; + + if(dblAbsReal < 1) + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(y**2)/(S+(1.d0-x))) */ + dblImg1 = 0.5 * (dblAbsImg*dblAbsImg / (dblR + (dblAbsReal + 1)) + dblAbsImg*dblAbsImg / (dblS + (1 - dblAbsReal))); + else + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(S+(x-1.d0))) */ + dblImg1 = 0.5 * (dblAbsImg*dblAbsImg / (dblR + (dblAbsReal + 1)) + (dblS + (dblAbsReal - 1))); + /* ai = logp1(Am1 + sqrt(Am1*(A+1.d0))) */ + dblTemp = dblImg1 + dsqrts(dblImg1 *( dblA + 1)); + _pdblImg = dlog1ps(dblTemp); + } + else + /* ai = log(A + sqrt(A**2 - 1.d0)) */ + _pdblImg = dlogs(dblA + dsqrts(dblA*dblA - 1)); + } + else + {/* evaluation in the special regions ... */ + if(dblAbsImg <= dblEpsm * dabss(dblAbsReal - 1)) + { + if(dblAbsReal < 1) + { + _pdblReal = dacoss(dblAbsReal); + _pdblImg = dblAbsImg / dsqrts((1 + dblAbsReal) * (1 - dblAbsReal)); + } + else + { + _pdblReal = 0; + if(dblAbsReal <= dblLsup) + { + dblTemp = (dblAbsReal - 1) + dsqrts((dblAbsReal - 1) * (dblAbsReal + 1)); + _pdblImg = dlog1ps(dblTemp); + } + else + _pdblImg = sdblLn2 + dlogs(dblAbsReal); + } + } + else if(dblAbsImg < dblLinf) + { + _pdblReal = dsqrts(dblAbsImg); + _pdblImg = _pdblReal; + } + else if((dblEpsm * dblAbsImg - 1 >= dblAbsReal)) + { + _pdblReal = sdblPi_2; + _pdblImg = sdblLn2 + dlogs(dblAbsImg); + } + else if(dblAbsReal > 1) + { + _pdblReal = datans(dblAbsImg / dblAbsReal); + dblTemp = (dblAbsReal / dblAbsImg)*(dblAbsReal / dblAbsImg); + _pdblImg = sdblLn2 + dlogs(dblAbsImg) + 0.5 * dlog1ps(dblTemp); + } + else + { + double dblTemp2 = dsqrts(1 + dblAbsImg*dblAbsImg); + _pdblReal = sdblPi_2; + dblTemp = 2 * dblAbsImg * (dblAbsImg + dblTemp2); + _pdblImg = 0.5 * dlog1ps(dblTemp); + } + } + if(dblSignReal < 0) + _pdblReal = sdblPi - _pdblReal; + + if(dblAbsImg != 0 || dblSignReal < 0) + _pdblImg = - dblSignImg * _pdblImg; + + return DoubleComplex(_pdblReal, _pdblImg); +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/Makefile.am b/2.3-1/src/c/elementaryFunctions/acosh/Makefile.am new file mode 100644 index 00000000..467f2ffb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/Makefile.am @@ -0,0 +1,72 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAcosh_la_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAcosh.la + +libAcosh_la_SOURCES = $(HEAD) $(SRC) + +SRC = sacoshs.c \ + dacoshs.c \ + cacoshs.c \ + zacoshs.c \ + sacosha.c \ + dacosha.c \ + cacosha.c \ + zacosha.c + +HEAD = ../includes/acosh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/acosh/libAcosh.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAcosh testDoubleAcosh + +TESTS = testFloatAcosh testDoubleAcosh + +# +# -*- Hyperbolic Acosine Tests -*- +# +testFloatAcosh_SOURCES = testAcosh.h testFloatAcosh.c +testFloatAcosh_CFLAGS = $(check_INCLUDES) +testFloatAcosh_LDADD = $(check_LDADD) + +testDoubleAcosh_SOURCES = testAcosh.h testDoubleAcosh.c +testDoubleAcosh_CFLAGS = $(check_INCLUDES) +testDoubleAcosh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/acosh/Makefile.in b/2.3-1/src/c/elementaryFunctions/acosh/Makefile.in new file mode 100644 index 00000000..4517285e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/Makefile.in @@ -0,0 +1,816 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAcosh$(EXEEXT) testDoubleAcosh$(EXEEXT) +TESTS = testFloatAcosh$(EXEEXT) testDoubleAcosh$(EXEEXT) +subdir = src/c/elementaryFunctions/acosh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAcosh_la_LIBADD = +am__objects_1 = +am__objects_2 = libAcosh_la-sacoshs.lo libAcosh_la-dacoshs.lo \ + libAcosh_la-cacoshs.lo libAcosh_la-zacoshs.lo \ + libAcosh_la-sacosha.lo libAcosh_la-dacosha.lo \ + libAcosh_la-cacosha.lo libAcosh_la-zacosha.lo +am_libAcosh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAcosh_la_OBJECTS = $(am_libAcosh_la_OBJECTS) +libAcosh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAcosh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAcosh_OBJECTS = \ + testDoubleAcosh-testDoubleAcosh.$(OBJEXT) +testDoubleAcosh_OBJECTS = $(am_testDoubleAcosh_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/acosh/libAcosh.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la +testDoubleAcosh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAcosh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAcosh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAcosh_OBJECTS = testFloatAcosh-testFloatAcosh.$(OBJEXT) +testFloatAcosh_OBJECTS = $(am_testFloatAcosh_OBJECTS) +testFloatAcosh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAcosh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAcosh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAcosh_la_SOURCES) $(testDoubleAcosh_SOURCES) \ + $(testFloatAcosh_SOURCES) +DIST_SOURCES = $(libAcosh_la_SOURCES) $(testDoubleAcosh_SOURCES) \ + $(testFloatAcosh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAcosh_la_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAcosh.la +libAcosh_la_SOURCES = $(HEAD) $(SRC) +SRC = sacoshs.c \ + dacoshs.c \ + cacoshs.c \ + zacoshs.c \ + sacosha.c \ + dacosha.c \ + cacosha.c \ + zacosha.c + +HEAD = ../includes/acosh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/acos/libAcos.la \ + $(top_builddir)/src/c/elementaryFunctions/acosh/libAcosh.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic Acosine Tests -*- +# +testFloatAcosh_SOURCES = testAcosh.h testFloatAcosh.c +testFloatAcosh_CFLAGS = $(check_INCLUDES) +testFloatAcosh_LDADD = $(check_LDADD) +testDoubleAcosh_SOURCES = testAcosh.h testDoubleAcosh.c +testDoubleAcosh_CFLAGS = $(check_INCLUDES) +testDoubleAcosh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/acosh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/acosh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAcosh.la: $(libAcosh_la_OBJECTS) $(libAcosh_la_DEPENDENCIES) + $(libAcosh_la_LINK) -rpath $(pkglibdir) $(libAcosh_la_OBJECTS) $(libAcosh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAcosh$(EXEEXT): $(testDoubleAcosh_OBJECTS) $(testDoubleAcosh_DEPENDENCIES) + @rm -f testDoubleAcosh$(EXEEXT) + $(testDoubleAcosh_LINK) $(testDoubleAcosh_OBJECTS) $(testDoubleAcosh_LDADD) $(LIBS) +testFloatAcosh$(EXEEXT): $(testFloatAcosh_OBJECTS) $(testFloatAcosh_DEPENDENCIES) + @rm -f testFloatAcosh$(EXEEXT) + $(testFloatAcosh_LINK) $(testFloatAcosh_OBJECTS) $(testFloatAcosh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-cacosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-cacoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-dacosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-dacoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-sacosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-sacoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-zacosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAcosh_la-zacoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAcosh-testFloatAcosh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAcosh_la-sacoshs.lo: sacoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-sacoshs.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-sacoshs.Tpo -c -o libAcosh_la-sacoshs.lo `test -f 'sacoshs.c' || echo '$(srcdir)/'`sacoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-sacoshs.Tpo $(DEPDIR)/libAcosh_la-sacoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sacoshs.c' object='libAcosh_la-sacoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-sacoshs.lo `test -f 'sacoshs.c' || echo '$(srcdir)/'`sacoshs.c + +libAcosh_la-dacoshs.lo: dacoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-dacoshs.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-dacoshs.Tpo -c -o libAcosh_la-dacoshs.lo `test -f 'dacoshs.c' || echo '$(srcdir)/'`dacoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-dacoshs.Tpo $(DEPDIR)/libAcosh_la-dacoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dacoshs.c' object='libAcosh_la-dacoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-dacoshs.lo `test -f 'dacoshs.c' || echo '$(srcdir)/'`dacoshs.c + +libAcosh_la-cacoshs.lo: cacoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-cacoshs.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-cacoshs.Tpo -c -o libAcosh_la-cacoshs.lo `test -f 'cacoshs.c' || echo '$(srcdir)/'`cacoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-cacoshs.Tpo $(DEPDIR)/libAcosh_la-cacoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cacoshs.c' object='libAcosh_la-cacoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-cacoshs.lo `test -f 'cacoshs.c' || echo '$(srcdir)/'`cacoshs.c + +libAcosh_la-zacoshs.lo: zacoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-zacoshs.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-zacoshs.Tpo -c -o libAcosh_la-zacoshs.lo `test -f 'zacoshs.c' || echo '$(srcdir)/'`zacoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-zacoshs.Tpo $(DEPDIR)/libAcosh_la-zacoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zacoshs.c' object='libAcosh_la-zacoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-zacoshs.lo `test -f 'zacoshs.c' || echo '$(srcdir)/'`zacoshs.c + +libAcosh_la-sacosha.lo: sacosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-sacosha.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-sacosha.Tpo -c -o libAcosh_la-sacosha.lo `test -f 'sacosha.c' || echo '$(srcdir)/'`sacosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-sacosha.Tpo $(DEPDIR)/libAcosh_la-sacosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sacosha.c' object='libAcosh_la-sacosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-sacosha.lo `test -f 'sacosha.c' || echo '$(srcdir)/'`sacosha.c + +libAcosh_la-dacosha.lo: dacosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-dacosha.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-dacosha.Tpo -c -o libAcosh_la-dacosha.lo `test -f 'dacosha.c' || echo '$(srcdir)/'`dacosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-dacosha.Tpo $(DEPDIR)/libAcosh_la-dacosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dacosha.c' object='libAcosh_la-dacosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-dacosha.lo `test -f 'dacosha.c' || echo '$(srcdir)/'`dacosha.c + +libAcosh_la-cacosha.lo: cacosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-cacosha.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-cacosha.Tpo -c -o libAcosh_la-cacosha.lo `test -f 'cacosha.c' || echo '$(srcdir)/'`cacosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-cacosha.Tpo $(DEPDIR)/libAcosh_la-cacosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cacosha.c' object='libAcosh_la-cacosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-cacosha.lo `test -f 'cacosha.c' || echo '$(srcdir)/'`cacosha.c + +libAcosh_la-zacosha.lo: zacosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -MT libAcosh_la-zacosha.lo -MD -MP -MF $(DEPDIR)/libAcosh_la-zacosha.Tpo -c -o libAcosh_la-zacosha.lo `test -f 'zacosha.c' || echo '$(srcdir)/'`zacosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAcosh_la-zacosha.Tpo $(DEPDIR)/libAcosh_la-zacosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zacosha.c' object='libAcosh_la-zacosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAcosh_la_CFLAGS) $(CFLAGS) -c -o libAcosh_la-zacosha.lo `test -f 'zacosha.c' || echo '$(srcdir)/'`zacosha.c + +testDoubleAcosh-testDoubleAcosh.o: testDoubleAcosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAcosh_CFLAGS) $(CFLAGS) -MT testDoubleAcosh-testDoubleAcosh.o -MD -MP -MF $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Tpo -c -o testDoubleAcosh-testDoubleAcosh.o `test -f 'testDoubleAcosh.c' || echo '$(srcdir)/'`testDoubleAcosh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Tpo $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAcosh.c' object='testDoubleAcosh-testDoubleAcosh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAcosh_CFLAGS) $(CFLAGS) -c -o testDoubleAcosh-testDoubleAcosh.o `test -f 'testDoubleAcosh.c' || echo '$(srcdir)/'`testDoubleAcosh.c + +testDoubleAcosh-testDoubleAcosh.obj: testDoubleAcosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAcosh_CFLAGS) $(CFLAGS) -MT testDoubleAcosh-testDoubleAcosh.obj -MD -MP -MF $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Tpo -c -o testDoubleAcosh-testDoubleAcosh.obj `if test -f 'testDoubleAcosh.c'; then $(CYGPATH_W) 'testDoubleAcosh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAcosh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Tpo $(DEPDIR)/testDoubleAcosh-testDoubleAcosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAcosh.c' object='testDoubleAcosh-testDoubleAcosh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAcosh_CFLAGS) $(CFLAGS) -c -o testDoubleAcosh-testDoubleAcosh.obj `if test -f 'testDoubleAcosh.c'; then $(CYGPATH_W) 'testDoubleAcosh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAcosh.c'; fi` + +testFloatAcosh-testFloatAcosh.o: testFloatAcosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAcosh_CFLAGS) $(CFLAGS) -MT testFloatAcosh-testFloatAcosh.o -MD -MP -MF $(DEPDIR)/testFloatAcosh-testFloatAcosh.Tpo -c -o testFloatAcosh-testFloatAcosh.o `test -f 'testFloatAcosh.c' || echo '$(srcdir)/'`testFloatAcosh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAcosh-testFloatAcosh.Tpo $(DEPDIR)/testFloatAcosh-testFloatAcosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAcosh.c' object='testFloatAcosh-testFloatAcosh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAcosh_CFLAGS) $(CFLAGS) -c -o testFloatAcosh-testFloatAcosh.o `test -f 'testFloatAcosh.c' || echo '$(srcdir)/'`testFloatAcosh.c + +testFloatAcosh-testFloatAcosh.obj: testFloatAcosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAcosh_CFLAGS) $(CFLAGS) -MT testFloatAcosh-testFloatAcosh.obj -MD -MP -MF $(DEPDIR)/testFloatAcosh-testFloatAcosh.Tpo -c -o testFloatAcosh-testFloatAcosh.obj `if test -f 'testFloatAcosh.c'; then $(CYGPATH_W) 'testFloatAcosh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAcosh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAcosh-testFloatAcosh.Tpo $(DEPDIR)/testFloatAcosh-testFloatAcosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAcosh.c' object='testFloatAcosh-testFloatAcosh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAcosh_CFLAGS) $(CFLAGS) -c -o testFloatAcosh-testFloatAcosh.obj `if test -f 'testFloatAcosh.c'; then $(CYGPATH_W) 'testFloatAcosh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAcosh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/acosh/cacosha.c b/2.3-1/src/c/elementaryFunctions/acosh/cacosha.c new file mode 100644 index 00000000..925ddf88 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/cacosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acosh.h" + +void cacosha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cacoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/cacoshs.c b/2.3-1/src/c/elementaryFunctions/acosh/cacoshs.c new file mode 100644 index 00000000..15238215 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/cacoshs.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula : +// +// acosh(z) = sign(-imag(acos(z)) i acos(z) +// +// sign(x) = 1 if x >= 0 +// | -1 if x < 0 +*/ + +#include "acosh.h" +#include "acos.h" + +#define localSign(x) x >= 0 ? 1.0f : -1.0f + +floatComplex cacoshs(floatComplex z) { + floatComplex acos_z = cacoss(z); + float sign = localSign(-cimags(acos_z)); + + return FloatComplex(-sign * cimags(acos_z), sign * creals(acos_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/dacosha.c b/2.3-1/src/c/elementaryFunctions/acosh/dacosha.c new file mode 100644 index 00000000..d681a052 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/dacosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acosh.h" + +void dacosha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dacoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/dacoshs.c b/2.3-1/src/c/elementaryFunctions/acosh/dacoshs.c new file mode 100644 index 00000000..a5c13c8b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/dacoshs.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "acosh.h" + +#ifdef _MSC_VER +double acosh(double x) +{ + return log(x + sqrt(x * x - 1)); +} +#endif + +double dacoshs(double x) { + return (acosh(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/sacosha.c b/2.3-1/src/c/elementaryFunctions/acosh/sacosha.c new file mode 100644 index 00000000..12b748cf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/sacosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acosh.h" + +void sacosha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sacoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/sacoshs.c b/2.3-1/src/c/elementaryFunctions/acosh/sacoshs.c new file mode 100644 index 00000000..d2a9ae53 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/sacoshs.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "acosh.h" + +#ifdef _MSC_VER +float acoshf (float x) +{ + return (float) log(x + sqrt(x * x - 1)); +} +#endif + +float sacoshs(float x) { + return (acoshf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/testAcosh.h b/2.3-1/src/c/elementaryFunctions/acosh/testAcosh.h new file mode 100644 index 00000000..04f91707 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/testAcosh.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTACOSH_H_ +#define _TESTACOSH_H_ + +#include +#include +#include "acosh.h" + + +void sacoshsTest(void); + +void dacoshsTest(void); + +void cacoshsTest(void); + +void zacoshsTest(void); + +void sacoshaTest(void); + +void dacoshaTest(void); + +void cacoshaTest(void); + +void zacoshaTest(void); + +int testAcosh(void); + +#endif /* ! _TESTACOSH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/acosh/testDoubleAcosh.c b/2.3-1/src/c/elementaryFunctions/acosh/testDoubleAcosh.c new file mode 100644 index 00000000..60a041db --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/testDoubleAcosh.c @@ -0,0 +1,512 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "isnan.h" +#include "testAcosh.h" + +#ifdef _MSC_VER +#include +#define isnan(x) _isnan((double)x) +#endif + + +#define IN {38.746443623676896095276,39.8779044859111309052,99.6399083640426397324,\ +93.207842670381069183350,6.8147667217999696731567,71.874653641134500503540,\ +65.928971720859408378601,43.781969323754310607910,95.70061699487268924713,\ +39.777786191552877426147,54.149620747193694114685,14.754852838814258575439,\ +91.972588421776890754700,41.853474546223878860474,90.448315022513270378113,\ +32.027477025985717773438,57.482325518503785133362,75.726259034126996994019,\ +32.547289272770285606384,50.125551037490367889404,26.862081931903958320618,\ +11.706684622913599014282,36.675705714151263237000,87.538864836096763610840,\ +52.483216533437371253967,76.861125137656927108765,82.899243896827101707458,\ +64.99033216387033462524,56.250627012923359870911,21.698794979602098464966,\ +93.22312804870307445526,93.5097210109233856201,97.608120972290635108948,\ +91.35094834491610527039,26.843591919168829917908,9.1870715841650962829590,\ +17.129724519327282905579,73.117265943437814712524,86.922781122848391532898,\ +1.4808017760515213012695,65.071928361430764198303,42.254429217427968978882,\ +23.262092983350157737732,31.955500133335590362549,74.261871399357914924622,\ +77.881882060319185256958,65.248953877016901969910,90.324406325817108154297,\ +86.69646182097494602203,70.879780035465955734253,69.452034076675772666931,\ +84.671579115092754364014,93.227435695007443428040,95.654127094894647598267,\ +16.239900095388293266296,12.728751823306083679199,95.707353064790368080139,\ +67.644099798053503036499,39.798104530200362205505,11.081875301897525787354,\ +50.97153154201805591583,58.446559030562639236450,25.919713405892252922058,\ +29.182348400354385375977,6.0309174004942178726196,90.43274922296404838562,\ +61.944271018728613853455,25.037935934960842132568,83.850894169881939888000,\ +82.732185069471597671509,73.220202280208468437195,29.458374157547950744629,\ +29.091028729453682899475,70.458725746721029281616,30.465652560815215110779,\ +75.730663724243640899658,73.18075490184128284454,69.053836632519960403442,\ +62.402765033766627311707,41.599050164222717285156,28.105994546785950660706,\ +5.6220385245978832244873,58.040395518764853477478,0.4246918484568595886230,\ +68.2817161548882722855,89.133544359356164932251,92.980264825746417045593,\ +28.40001545846462249756,9.885430941358208656311,41.369083430618047714233,\ +64.121548598632216453552,64.692758955061435699463,47.02662643976509571075,\ +60.481913108378648757935,67.138904659077525138855,71.394702047109603881836,\ +54.127137595787644386292,39.052018057554960250854,1.1089378502219915390015,\ +90.150084160268306732178,13.887455360963940620422,8.5074969567358493804932,\ +34.66010238043963909149,42.338709905743598937988,80.213972786441445351,\ +31.7881367169320583344,18.021041667088866233826,69.688742049038410186768,\ +35.482168616726994514465,16.12617420032620429993,75.34236568026244640350,\ +62.194181978702545166016,51.510728383436799049377,67.819245439022779464722,\ +61.666865786537528038025,70.212037675082683563232,13.621602999046444892883,\ +60.870522353798151016235,18.923167092725634574890,47.614179179072380065918,\ +17.161004850640892982483,41.371036972850561141968,15.31781828962266445160,\ +22.868881560862064361572,95.856341393664479255676,39.499193150550127029419,\ +2.500818995758891106,44.927055388689041137695,91.384086245670914649963,\ +11.012465786188840866089,74.87958460114896297455,0.7881646975874900817871,\ +23.523587780073285102844,80.106287542730569839478,65.456348611041903495789,\ +51.620832458138465881348,70.271815219894051551819,5.5151230655610561370850,\ +62.56400248967111110687,84.313133545219898223877,17.294042231515049934387,\ +41.730730701237916946411,81.875373004004359245300,25.327575206756591796875,\ +86.085468018427491188049,17.212611716240644454956,78.060937067493796348572,\ +13.735765032470226287842,0.2187759149819612503052,1.4656470157206058502197,\ +30.469974083825945854187,80.307766422629356384277,99.052629480138421058655,\ +82.85992136225104331970,87.21015579067170619965,29.531141556799411773682,\ +58.27610609121620655060,29.06773509457707405090,2.0005736034363508224,\ +71.4346818625926971436,26.664068037644028663635,51.992803346365690231323,\ +48.17320345900952816010,0.0918259844183921813965,38.418471114709973335266,\ +49.06664276495575904846,44.197808159515261650085,65.678765252232551574707,\ +10.470610717311501502991,42.787145730108022689819,75.105277216061949729919,\ +36.962236650288105010986,84.119305433705449104309,90.374342072755098342896,\ +44.184404192492365837097,1.0920032858848571777344,20.380018139258027076721,\ +85.418348293751478195190,39.327101549133658409119,97.573022358119487762451,\ +8.4199145901948213577271,23.39450428262352943420,48.397052986547350883484,\ +33.292300626635551452637,96.453859517350792884827,52.920697536319494247437,\ +7.9968032892793416976929,75.475437380373477935791,4.476350219920277596,\ +84.631874877959489822388,20.008285669609904289246,69.44785490632057189941,\ +28.204387659206986427307,79.546741675585508346558,20.281786611303687095642,\ +78.075716458261013031006,93.606285052374005317688,88.801648560911417007446,\ +33.848348213359713554382,89.761531725525856018066} + +#define RESULT {4.3500195892822599574856,4.378812333443298676627,5.2946847693089331698957,\ +5.2279502699832844925254,2.6068118507181217147206,4.968022463585481496295,\ +4.8816676362403299549442,4.4722388068202851840738,5.2543446283333992141706,\ +4.3762977630646631155287,4.6848128785767624293612,3.3835688928264802122214,\ +5.2146082054939908445590,4.4271792498758397726988,5.1978952030053422461719,\ +4.159497560939560578674,4.7445490293632399669832,5.0202285648475850621253,\ +4.1756051841813626168687,4.6075785448582253778227,3.9835162329116351465075,\ +3.1514779837977200394050,4.2950758361772223281605,5.165197419194649697261,\ +4.653549840642725143880,5.035105083560019956224,5.1107367420045859418565,\ +4.8673265089936572636020,4.7228853485288873059744,3.7698725167565876326137,\ +5.2281142583800894740875,5.2311839874435639430317,5.2740816359097371091025,\ +5.2078258853539018957690,3.982827186610214287299,2.9079691610609703644741,\ +3.5331093207527803912171,4.9851649496034715625115,5.1581342419725935144470,\ +0.9450506373811344840163,4.8685813827251553931319,4.4367163112396088564537,\ +3.8395099847061766595857,4.1572465837028591550961,5.0006994941965512424531,\ +5.0482993082581542054754,4.8712984679982609392823,5.1965242406243383754827,\ +5.1555269912574592794385,4.954082618091184997411,4.9337317049920867972901,\ +5.1318923054243690273779,5.228160467885317963521,5.2538586990129676479455,\ +3.4796690893012534040452,3.2354639460120244720542,5.2544150166005954005755,\ +4.9073526741507107473694,4.3768085901327413722584,3.0964161555968114925008,\ +4.6243182142058252281913,4.7611868033967539304285,3.9477786701409951497510,\ +4.0664175090632737052943,2.4831009250018341028010,5.1977230816033159754852,\ +4.8193171469932529760172,3.9131402651137854320496,5.1221517738388655516246,\ +5.1087193584020944570057,4.98657191625376672306,4.0758371911626332106948,\ +4.0632814774108050315249,4.9481239065017428302440,4.1094776238806378643176,\ +5.0202867341820684998766,4.9860329708595516606806,4.9279811897230469952547,\ +4.8266925606060153697285,4.421080015153528108840,4.0288134359166507536543,\ +2.4118364183807097234080,4.7542122019999739634954,0,\ +4.9167355873994562642793,5.1832514554357551617159,5.2255055264178071894321,\ +4.0392267678246307482937,2.9816410740582028893186,4.4155348942144980739499,\ +4.8538668500531736427206,4.8627367182462748473881,4.5437480774189333843083,\ +4.7954231948046981415246,4.8998553915953095838631,4.9613217960209823331752,\ +4.6843975172654603866818,4.3578777660333960497496,0.4626347638559775710121,\ +5.1945923008314265345575,3.3228343258666956927527,2.830622803369744922009,\ +4.238528249750794785200,4.438709481897562980635,5.077806047884725337838,\ +4.1519928438683244564800,3.5839165427001460351164,4.9371344840241793150426,\ +4.2619788264190443527468,3.4726281293145686568380,5.0151457380383783757338,\ +4.8233440014012511909414,4.6348430510092004652734,4.9099388325030934865367,\ +4.81482819845952114690,4.9446162371720561168331,3.3034540778469194677314,\ +4.8018287252966844746993,3.6328352359975357721567,4.556167488561304601546,\ +3.5349368514717505185274,4.41558212917596915048,3.4210967363570983224008,\ +3.8224459155669441301484,5.2559705982049909067655,4.3692671498839636967659,\ +1.5671566063449566819088,4.4980634827120455909721,5.2081885950679547292452,\ +3.0901072205487807309510,5.0089838747007107144782,0,\ +3.850698741029123794988,5.076462566530570263978,4.8744723131002718474747,\ +4.6369786693462113902342,4.9454673471881154256380,2.3923187222394570738970,\ +4.8292733779221936885051,5.127649658742538640865,3.5426723072020398497273,\ +4.424241396092424949416,5.0983081346685077406278,3.9246509637740216724922,\ +5.1484540607983912963164,3.537944651477085589164,5.0505959169093319616195,\ +3.3118225003889145696689,0,0.9310418690232507010762,\ +4.1096195393026562214800,5.0789747485012091132717,5.2887730188734272118722,\ +5.1102622536361952398920,5.1614350980940946200803,4.0783057415377843568649,\ +4.7582657239633334711471,4.0624799671967695147146,1.3172890037212539038336,\ +4.9618816771260449982606,3.9761122565887623281,4.64415999832871140285,\ +4.5678423566873336270078,0,4.3415161209508754680542,\ +4.5862227542495350718355,4.481694375737592217490,4.8778648861550966131517,\ +3.0394313734202933474648,4.4492483198356360674097,5.0119936831694982259933,\ +4.3028609023006350042806,5.1253479422290126876760,5.1970769705972195140475,\ +4.4813909798397162376205,0.4257373352329655857851,3.7070996451820255046528,\ +5.1406738437618608728030,4.3648993866947414232982,5.2737219653314042489001,\ +2.820201721217977297584,3.8451912168199942065883,4.5724793527790357217100,\ +4.1982477070823893683382,5.2621850617105074832125,4.661852422144622920541,\ +2.7682565538529817494862,5.0169105620070073570105,2.1792385497944919414692,\ +5.131423242241443638534,3.6886685835548016498819,4.9336715234659216378077,\ +4.032310316197459165721,5.0694524637856641646749,3.7022621441401133424165,\ +5.0507852459760567143121,5.2322161767096924123166,5.1795206909289932539764,\ +4.2148191048546337356129,5.19027265701442619417} + + +#define ZRIN {0.1483933464623987674713,0.5565875237807631492615,0.4628333351574838161469,\ +0.9158247429877519607544,0.0444016349501907825470,0.8175177471712231636047,\ +0.5320580708794295787811,0.2989391684532165527344,0.5029047676362097263336,\ +0.4266923693940043449402,0.3965902938507497310638,0.7440190296620130538940,\ +0.7921002809889614582062,0.5715918401256203651428,0.4155966262333095073700,\ +0.2953372262418270111084,0.1075767637230455875397,0.7572548976168036460876,\ +0.93660886352881789207,0.7694978956133127212524,0.0902581927366554737091,\ +0.4731486858800053596497,0.4765542480163276195526,0.6361737176775932312012,\ +0.5064576440490782260895,0.9049607468768954277039,0.6742701171897351741791,\ +0.3656400945037603378296,0.6837903787381947040558,0.4100628877058625221252,\ +0.3582529271952807903290,0.7118562050163745880127,0.7966963038779795169830,\ +0.9753969227895140647888,0.5733916512690484523773,0.8998429346829652786255,\ +0.5953218084760010242462,0.3765322910621762275696,0.9104355531744658946991,\ +0.1861076802015304565430,0.6715109744109213352203,0.2566455481573939323425,\ +0.9819463356398046016693,0.7608660291880369186401,0.8556561623699963092804,\ +0.8441717335954308509827,0.3884846637956798076630,0.4608103148639202117920,\ +0.8381579727865755558014,0.5278776129707694053650,0.0187810636125504970551,\ +0.2611750457435846328735,0.6092445817776024341583,0.0081067951396107673645,\ +0.0276411953382194042206,0.0158492103219032287598,0.8109004520811140537262,\ +0.2429467244073748588562,0.3353355019353330135345,0.4142854567617177963257,\ +0.5946544189937412738800,0.9080675477162003517151,0.992223232518881559372,\ +0.6239561475813388824463,0.0789771513082087039948,0.5889828568324446678162,\ +0.2523608407936990261078,0.5871062893420457839966,0.0000379872508347034454,\ +0.4244823055341839790344,0.69984475849196314812,0.4405533373355865478516,\ +0.6495711454190313816071,0.4199861017987132072449,0.2716385438106954097748,\ +0.0272838752716779708862,0.6936013107188045978546,0.1495713749900460243,\ +0.5206344048492610454559,0.9685971699655055999756,0.9657785953022539615631,\ +0.0654204180464148521423,0.9626990980468690395355,0.2655456010252237319946,\ +0.8290728745050728321075,0.1334408046677708625793,0.8514542016200721263885,\ +0.8984219655394554138184,0.1995774977840483188629,0.0138073815032839775085,\ +0.2245407640002667903900,0.3930436577647924423218,0.8261723746545612812042,\ +0.5051761353388428688049,0.5651183272711932659149,0.822583723813295364380,\ +0.9197964356280863285065,0.4713199352845549583435,0.9223483256064355373383,\ +0.2136987913399934768677,0.7260794681496918201447,0.9689361499622464179993,\ +0.8346118587069213390350,0.8257038742303848266602,0.1350833275355398654938,\ +0.7953761396929621696472,0.8992118402384221553802,0.2715440522879362106323,\ +0.9219025229103863239288,0.1750466236844658851624,0.3323095212690532207489,\ +0.9493130259215831756592,0.7118741781450808048248,0.8032329222187399864197,\ +0.3628453887067735195160,0.7530685458332300186157,0.2641473677940666675568,\ +0.9660940738394856452942,0.8041944387368857860565,0.5316947177052497863770,\ +0.1673618280328810214996,0.955579827539622783661,0.6473058252595365047455,\ +0.2645611818879842758179,0.5411860425956547260284,0.4980195099487900733948,\ +0.0190768833272159099579,0.4227291680872440338135,0.8374647037126123905182,\ +0.4151327675208449363708,0.3497115275822579860687,0.4844544250518083572388,\ +0.3347255480475723743439,0.2362121837213635444641,0.0928130256943404674530,\ +0.0737370252609252929688,0.4197955676354467868805,0.9802277712151408195496,\ +0.8419611467979848384857,0.6906680446118116378784,0.2502765958197414875031,\ +0.8266033390536904335022,0.1875236849300563335419,0.5023231171071529388428,\ +0.8916302681900560855865,0.8934147348627448081970,0.1574523574672639369965,\ +0.1629528645426034927368,0.5226223585195839405060,0.8417599620297551155090,\ +0.5858130785636603832245,0.1322202011942863464355,0.8028764897026121616364,\ +0.5250511718913912773132,0.2528006075881421566010,0.4602345135062932968140,\ +0.996287219692021608353,0.4019785309210419654846,0.1399875725619494915009,\ +0.5081327147781848907471,0.9440425024367868900299,0.9318959629163146018982,\ +0.6445578685961663722992,0.5729571748524904251099,0.4810055238194763660431,\ +0.6713787661865353584290,0.0962744313292205333710,0.8855805248022079467773,\ +0.3892059125937521457672,0.2907031057402491569519,0.4209313853643834590912,\ +0.9504273366183042526245,0.482190326321870088577,0.2289973804727196693420,\ +0.2940405677072703838348,0.6957426778972148895264,0.9139824123121798038483,\ +0.2068154653534293174744,0.6285024262033402919769,0.4031575415283441543579,\ +0.3064021435566246509552,0.3148818286135792732239,0.7400112929753959178925,\ +0.8853011503815650939941,0.788494529668241739273,0.8977585239335894584656,\ +0.0339450328610837459564,0.8802101369947195053101,0.5418177028186619281769,\ +0.9511840576305985450745,0.5574890668503940105438,0.1312845982611179351807,\ +0.9453403786756098270416,0.2518341308459639549255,0.2607447705231606960297,\ +0.1215410251170396804810,0.9136986923404037952423,0.9382542567327618598938,\ +0.3105722474865615367889,0.9309121072292327880859} + +#define ZIIN {0.5225624092854559421539,0.7617142526432871818542,0.3009174778126180171967,\ +0.1853434126824140548706,0.5148605112917721271515,0.7257346073165535926819,\ +0.7033738414756953716278,0.5664369426667690277100,0.7816161573864519596100,\ +0.3330347230657935142517,0.4017280167900025844574,0.8503915611654520034790,\ +0.41114101978018879890,0.1586530329659581184387,0.6542402538470923900604,\ +0.9449902996420860290527,0.400338994804769754410,0.9679889930412173271179,\ +0.32740902295336127281,0.8933845367282629013062,0.6218692888505756855011,\ +0.0985169494524598121643,0.7449700380675494670868,0.3134250529110431671143,\ +0.1409188793040812015533,0.3239218806847929954529,0.9958796552382409572601,\ +0.2412899602204561233521,0.4753343504853546619415,0.9194070147350430488586,\ +0.0450326460413634777069,0.8481595069169998168945,0.8928631045855581760406,\ +0.1469233212992548942566,0.4904643460176885128021,0.9986877571791410446167,\ +0.3392539476044476032257,0.8790708789601922035217,0.3107871781103312969208,\ +0.1200211457908153533936,0.0909670502878725528717,0.5804221173748373985291,\ +0.446611551102250814438,0.3501139078289270401001,0.7262432840652763843536,\ +0.3650169344618916511536,0.5597011330537497997284,0.434090383350849151611,\ +0.5082829319871962070465,0.3487796885892748832703,0.8136124997399747371674,\ +0.337404197081923484802,0.7742837746627628803253,0.0156080657616257667542,\ +0.0195691580884158611298,0.0445443131029605865479,0.4240885511972010135651,\ +0.8158838218078017234802,0.9913199446164071559906,0.5120379645377397537231,\ +0.1021917951293289661407,0.7161553995683789253235,0.4527317988686263561249,\ +0.2445004582405090332031,0.1668560453690588474274,0.9187424210831522941589,\ +0.3418669118545949459076,0.4624818544834852218628,0.0400874321348965167999,\ +0.4700120547786355018616,0.8552942494861781597137,0.3308605216443538665771,\ +0.0322206378914415836334,0.9760772576555609703064,0.0763854510150849819183,\ +0.2165335658937692642212,0.2348632332868874073029,0.1446668924763798713684,\ +0.5313451024703681468964,0.4441541358828544616699,0.5759493880905210971832,\ +0.3719177199527621269226,0.5167253850959241390228,0.5186656024307012557983,\ +0.6306529571302235126495,0.0928382659330964088440,0.5421750987879931926727,\ +0.2833826132118701934814,0.2819099412299692630768,0.1141945635899901390076,\ +0.7321730605326592922211,0.9823690224438905715942,0.8243003231473267078400,\ +0.6485677706077694892883,0.5304958778433501720428,0.6958626955747604370117,\ +0.6050392785109579563141,0.2683336613699793815613,0.5511700971983373165131,\ +0.1174971889704465866089,0.7958277617581188678741,0.4983139941468834877014,\ +0.9196587274782359600067,0.1420703046023845672607,0.389312467072159051895,\ +0.2658497532829642295837,0.9480321384035050868988,0.2326095197349786758423,\ +0.0139051643200218677521,0.9270462663844227790833,0.4878733339719474315643,\ +0.0354842916131019592285,0.6607114099897444248199,0.0879401965066790580750,\ +0.8046676008962094783783,0.212315237149596214294,0.9163186331279575824738,\ +0.9393384093418717384338,0.3174265320412814617157,0.9574301876127719879150,\ +0.7951935962773859500885,0.3240787154063582420349,0.0472964248619973659515,\ +0.1696171183139085769653,0.7654392314143478870392,0.2554624872282147407532,\ +0.1189010548405349254608,0.7469239532947540283203,0.0616608508862555027008,\ +0.1056091515347361564636,0.1581688239239156246185,0.9732552450150251388550,\ +0.8786917333491146564484,0.1824825564399361610413,0.9303942839615046977997,\ +0.4655157290399074554443,0.5399280847050249576569,0.9143392136320471763611,\ +0.0622840351425111293793,0.6500507537275552749634,0.2340233740396797657013,\ +0.3603484155610203742981,0.1917369994334876537323,0.2371335849165916442871,\ +0.4136920445598661899567,0.2661342276260256767273,0.3891090690158307552338,\ +0.6622495856136083602905,0.4503725995309650897980,0.3829893553629517555237,\ +0.1937121297232806682587,0.9629272706806659698486,0.6385000632144510746002,\ +0.2695108866319060325623,0.1092974594794213771820,0.0598662365227937698364,\ +0.1431378168053925037384,0.2944079088047146797180,0.9022735017351806163788,\ +0.9111119657754898071289,0.9847188093699514865875,0.0592310009524226188660,\ +0.5464080139063298702240,0.5080275069922208786011,0.6546461437828838825226,\ +0.9597736010327935218811,0.1577645908109843730927,0.1818120293319225311279,\ +0.4555030376650393009186,0.1048952480778098106384,0.7636235631071031093597,\ +0.1893162522464990615845,0.1596221593208611011505,0.3115166993811726570129,\ +0.2491372707299888134003,0.0469047501683235168457,0.0797643386758863925934,\ +0.3945369226858019828796,0.3254697113297879695892,0.5811151321977376937866,\ +0.1456566532142460346222,0.4704219633713364601135,0.8631705637089908123016,\ +0.1648640967905521392822,0.0801398889161646366119,0.4932156866416335105896,\ +0.4345335862599313259125,0.1079503614455461502075,0.2686753761954605579376,\ +0.7417223947122693061829,0.4086893904022872447968,0.6706044673919677734375,\ +0.4159612008370459079742,0.4766113189980387687683,0.4431825890205800533295,\ +0.6688354592770338058472,0.5834077899344265460968,0.4861929873004555702209,\ +0.715783319901674985886,0.1403244398534297943115} + +#define ZRRESULT {0.5053397031743451783825,0.7650083608446867078356,0.3289296819323739295982,\ +0.3563456766158749622342,0.4948207655225617118688,0.8169593462846268527855,\ +0.7132198900639351579755,0.5570137230416445373038,0.7685376318852206178889,\ +0.3559803193123551312560,0.4189790595413633300659,0.8813522345691391368661,\ +0.5405451162482487470484,0.1905551975849387180695,0.6493731034151291048317,\ +0.8578709195697519218626,0.3922142862720902067863,0.9642946930057294530059,\ +0.5389615746319644795648,0.9186094888728127960675,0.5890418064066422765279,\ +0.1113977102429560134267,0.7345860770241963155769,0.3799876579856086289411,\ +0.1619970506356118999935,0.51382943864194075001,0.9605702232101991366875,\ +0.2552214504374311077051,0.5588288246069162967800,0.8545155572742579863643,\ +0.0482073009402987154304,0.8701819105023789191478,0.9267094766915666692597,\ +0.3583874762657675017152,0.5394241582016752190043,1.0267057888096897677599,\ +0.3962322220487046187110,0.8200372580795054489045,0.5035682683774097556650,\ +0.1218215489911998739014,0.1217295472085216101465,0.5645974853924803360528,\ +0.6787204142960019392916,0.4641409785094591788912,0.8320374579652175528466,\ +0.5202648072575078996849,0.5635084163999081185992,0.4608376215542885900867,\ +0.6521335567127740651117,0.3901559225476997627702,0.7433295520896158192770,\ +0.3414853587252406064145,0.7876437052847802267053,0.0156079448330699189357,\ +0.0195753850507095344957,0.0445351746116087257588,0.5619901990592348628439,\ +0.7563216032216260042986,0.8953230010983072029163,0.5250759023565449989945,\ +0.1262270783291525866332,0.8463340938014771719367,0.6903512283163251161966,\ +0.3002023271844543317322,0.1665929038330317135674,0.8881085995755062523216,\ +0.3450945758035259824936,0.5168125326109850314893,0.0400767031552608649081,\ +0.4881659313644853837033,0.8717577944100705078512,0.3559191435167290418207,\ +0.0423384874325624382951,0.8962569818869624560520,0.0792669980362326609402,\ +0.2149514867261388406661,0.3084002596083564862184,0.1457610223920582370738,\ +0.5638322964331675679617,0.6681928703809085767773,0.7715309042125101379739,\ +0.3644939000586688848671,0.7241095709372292743566,0.5109856481565466790329,\ +0.7492592023075983487246,0.0935322123614654998836,0.6873609600399674945947,\ +0.4653574362777189166174,0.2834338708350941926639,0.1139584955905696417311,\ +0.6886187601911135658384,0.8966624572124947123442,0.8901159605244814976288,\ +0.6621780758434868685569,0.5739364819547106977282,0.7967040377802739881119,\ +0.7702556784014074064970,0.2963495189276508789966,0.729639913718978516677,\ +0.1199467917211827494572,0.8369585267706058928638,0.7130151705637984838049,\ +0.9564173315765011063050,0.2362741844905166255231,0.3829952297292640861492,\ +0.3854654409071321952140,0.9956878617898979877410,0.2388852521695121466916,\ +0.0357548125472270175718,0.8344528446849692748799,0.4908081134490644426016,\ +0.1072298401775326898155,0.7292248632489435333781,0.1444440063075330404896,\ +0.7618560442692507983509,0.3014073074948313002430,0.8338433864005018181231,\ +1.013809216729007589564,0.4488437286282063176657,0.9028988520348978363828,\ +0.7342748763980897486192,0.5492704923146081164020,0.0619250478958671968233,\ +0.1747947745500638971894,0.7643392221916658346714,0.2869233753851287982428,\ +0.1186438529044472750540,0.7261517086175122148717,0.1110167797262640587697,\ +0.1156665104854840142590,0.1677179018762894047168,0.9049771869312485117476,\ +0.8140692858573190804350,0.1865250841653489921601,0.8328626043313867022277,\ +0.4511026850510220786994,0.5511713324178673101272,1.0040394102716723168101,\ +0.1134432764930088655131,0.7136163206069113806862,0.2389915016256592694699,\ +0.5061510239067475991348,0.1938531425179492451161,0.267912781705172242663,\ +0.594520593176991907214,0.4421595740617755287971,0.3838580911610497414799,\ +0.6265966551277006857390,0.4892019455111443759776,0.5371648663643865395656,\ +0.2336644699290637006150,0.8580649693764487162539,0.7447932141471096390006,\ +0.30664577808112553070,0.1126796888171682081703,0.0673404850217956818526,\ +0.3780061914448271664924,0.3135468248495265064513,0.8141814149801622768621,\ +0.8656800272972641208113,1.0330415543607425199468,0.1517147576472806791426,\ +0.6107832692276639052764,0.5555300503019462432519,0.6621194316643849164805,\ +0.9359383537376269046604,0.1578266511911156633197,0.3288869400610432980336,\ +0.4688911283964798393242,0.1093517544178844447256,0.7390278072154514710235,\ +0.3915656081630794482784,0.1803516698292359499156,0.3140185989593758941751,\ +0.2570435038916802361619,0.0651252572213311814453,0.1812803236410877871787,\ +0.3918987512324060840108,0.3907169202420177067658,0.5847178774812699098007,\ +0.1522469534945809221949,0.4726351219523636792985,0.8890284419930043480207,\ +0.3043305148205690535690,0.1282404489119809976039,0.6689999411776240689775,\ +0.4220981761434796641907,0.2107039270298768085521,0.3089304668962193911597,\ +0.8825265124364938262858,0.4570764804119011315287,0.6317437032300170507426,\ +0.6289949625530589782940,0.4716158816756069738219,0.4417016096894970100806,\ +0.6297964082740089564183,0.7506329678118981441060,0.6853639001045995771122,\ +0.6844909750084481325771,0.3028385676048351293765} + +#define ZIRESULT {1.4391441245686327210507,1.130955515640670316913,1.1164484564631134144719,\ +0.5343429881094952094145,1.5313159234681512632648,0.9218282568507811802760,\ +1.1368031918334591257036,1.309961324172885133166,1.1768313149474189938104,\ +1.1581725732800560724201,1.198068547194847122128,1.0167778558643913999759,\ +0.8107284978807606234952,0.9747572654361357225028,1.2226962809307837520834,\ +1.356863284326968122073,1.4708283871101888173882,1.0424189614104724110888,\ +0.6175483783889722522176,1.012434899444895508580,1.4941377955828787360559,\ +1.081247186686038253001,1.189977918876721885155,0.9361970185325101390106,\ +1.0473314366303878575337,0.6478815708564551467674,1.103880390282215628872,\ +1.208902068619972958174,0.9405460211534443226711,1.2708555309086870810376,\ +1.2048457921815343141247,1.0386992340805454304586,0.9940470159552662332558,\ +0.4129471251607437776165,1.0483368304459323994138,0.9626808065085141752348,\ +0.9866797451792658213421,1.2893127532844186333705,0.6333368050416610106623,\ +1.3849939050391590900091,0.8412033774271403530065,1.3484185557182311043789,\ +0.6561721869869621137639,0.8152667302376208624537,0.8942162872449925803409,\ +0.7354476761871528989190,1.2302184692777484720239,1.1419032200306009627866,\ +0.8136425490751511002685,1.0585917357001826122342,1.5562281161680697749716,\ +1.3215709464122720184776,1.0936282246933759498830,1.562690430228121041267,\ +1.5431569076078051061529,1.5549621593607869662890,0.7985043985204253180754,\ +1.3827954341839958640747,1.3338048203354757603734,1.1992311317991326546917,\ +0.9398015526727905299964,0.8526323846859752420002,0.6516084904889641871151,\ +0.9312161189612270240090,1.4928235928235611407189,1.1434135639085114544145,\ +1.3304436504678796016066,1.0279557218905930326969,1.5707583700301124274290,\ +1.18264027414866035315,1.049240570305455033662,1.1438977350867394200407,\ +0.8645410048697405036577,1.272544314036070156604,1.2965854453389789036066,\ +1.5441276936419627840991,0.8474785980812834518261,1.4222542688372477037717,\ +1.1067340541491283989473,0.6658230283826037654293,0.7440600810961385258580,\ +1.509454955782236762474,0.7139904083352976993382,1.3343109319103572119047,\ +0.8754276015708571945240,1.4375430902494801266300,0.8182153660902479197503,\ +0.6279916190243797213810,1.3777792247900606525945,1.5570776874524723254467,\ +1.3896877170114805277734,1.292290381577097857502,0.9513544490495031702437,\ +1.146595322853661613749,1.0663673649265974496814,0.9066444651210990857138,\ +0.7936124351430207113367,1.1025133400691302654195,0.7646931356316959416120,\ +1.3570006423237950254901,1.0127507430242304042878,0.6984070724030820853656,\ +0.9777377069899801931285,0.6381815285628557044006,1.4447151619316793702552,\ +0.7381184252357657626931,0.9463444174447509515957,1.3036540993301888313738,\ +0.3993509460349408124458,1.4425649666003559357108,1.2703537792660923866350,\ +0.3366052452908819825339,0.9799364183556658058905,0.6519110571169279833015,\ +1.288935099739083156578,0.766834829952783847418,1.3765235555687964641436,\ +0.9026821267000586512808,0.7532458865053713870097,1.1915253215495016370085,\ +1.4398661339551832583084,0.5960292480319858698934,0.8683763627836410536887,\ +1.307183356265154250409,1.1437419441048803925298,1.0721920855425228769064,\ +1.5518517938677236500666,1.2329687641584510249260,0.5874976025749066854686,\ +1.1457409989520814797004,1.2187173974473419768572,1.2272326680013900812583,\ +1.3202499364548996307889,1.3364966855772182352524,1.5028659601895917319325,\ +1.5039244799556488185743,1.199080874147727016066,0.8850027352965960103504,\ +0.5797999065603636204003,0.9935513093218836244702,1.3250345117052622079257,\ +0.7510747251416685088543,1.3856864393507652977178,1.0646397833458374204696,\ +0.7161423103150551527918,0.6220745390646167383153,1.4237426982899421545881,\ +1.4349026977530163762253,1.0862935323189089054097,0.7475103036060971595234,\ +0.9640755596017442918821,1.4756182374730877349123,0.8992686396344509169865,\ +1.0456992348735927311765,1.316872193719026640224,1.0937098269572853581622,\ +0.3787889502350130777053,1.1777575502770252224849,1.466927792635024818679,\ +1.198998549247170863907,0.9317214709279717510526,0.3994553068013038665818,\ +0.9996993047110468433303,1.0533682169916682713762,1.1680862767422879322510,\ +1.0968093743281353003027,1.475564759332087749755,0.5739680940616843640711,\ +1.2132055498728515630091,1.277641763762892734846,1.2372616699165408515881,\ +0.4908185034943345348424,1.0764535824324550361553,1.3508749145869605179371,\ +1.282220574891209663448,0.8033914160655766245611,0.4529330910646225394345,\ +1.3777085436870080137339,0.9478851551815749010288,1.2208388985822435923723,\ +1.263077873207383738929,1.284175149159334061721,1.023436357706823729430,\ +0.5626793926847969418148,0.6728398111486185717567,0.7545922256887819257187,\ +1.5396608871785673056110,0.5335122401588628937574,1.0275094129340511805992,\ +0.8338356239168208672297,1.0426578447465559840168,1.4617456602888381222982,\ +0.6682797094798482717692,1.3426136823908161321839,1.3312882615539098907220,\ +1.4697575902556172522395,0.7877417380659905710161,0.7165102522491650915981,\ +1.3183788402186256139004,0.4738958779540429211430} + +void dacoshsTest(void) { + double In[]=IN; + double Res[]=RESULT; + double out; + int i = 0; + + for (i=0;i<200;i++){ + if (In[i]<1) assert(1); + else { + out = dacoshs(In[i]); + assert ( ( fabs(out-Res[i]) / fabs(out) ) <3e-16); + } + } +} + +void zacoshsTest(void) { + double InR[]=ZRIN; + double InI[]=ZIIN; + double ResR[]=ZRRESULT; + double ResI[]=ZIRESULT; + int i=0; + doubleComplex in,out; + + for (i=0;i<200;i++){ + in=DoubleComplex(InR[i],InI[i]); + out=zacoshs(in); + assert( ( fabs(zreals(out)-ResR[i]) / fabs(zreals(out)) ) <3e-15); + assert( ( fabs(zimags(out)-ResI[i]) / fabs(zimags(out)) ) <3e-15); + } +} + +void dacoshaTest(void) { + double In[]=IN; + double Res[]=RESULT; + double out[200],in[200]; + int i = 0; + + for (i=0;i<200;i++){ + in[i]=In[i]; + } + + dacosha(in,200,out); + for (i=0;i<200;i++){ + if (isnan(out[i])) assert(1); + else{ + assert ( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <3e-16); + } + } +} + +void zacoshaTest(void) { + double InR[]=ZRIN; + double InI[]=ZIIN; + double ResR[]=ZRRESULT; + double ResI[]=ZIRESULT; + int i=0; + doubleComplex in[200],out[200]; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(InR[i],InI[i]); + } + zacosha(in,200,out); + for (i=0;i<200;i++){ + assert( ( fabs(zreals(out[i])-ResR[i]) / fabs(zreals(out[i])) ) <3e-15); + assert( ( fabs(zimags(out[i])-ResI[i]) / fabs(zimags(out[i])) ) <3e-15); + } +} + +int testAcosh(void) { + printf("\n>>>> Double Hyperbolic ArcCosine Tests\n"); + dacoshsTest(); + zacoshsTest(); + dacoshaTest(); + zacoshaTest(); + return 0; +} + +int main(void) { + assert(testAcosh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/testFloatAcosh.c b/2.3-1/src/c/elementaryFunctions/acosh/testFloatAcosh.c new file mode 100644 index 00000000..aa14a308 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/testFloatAcosh.c @@ -0,0 +1,510 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAcosh.h" +#include "isnan.h" + +#ifdef _MSC_VER +#include +#define isnan(x) _isnan((double)x) +#endif + +#define IN {38.746443623676896095276f,39.8779044859111309052f,99.6399083640426397324f,\ +93.207842670381069183350f,6.8147667217999696731567f,71.874653641134500503540f,\ +65.928971720859408378601f,43.781969323754310607910f,95.70061699487268924713f,\ +39.777786191552877426147f,54.149620747193694114685f,14.754852838814258575439f,\ +91.972588421776890754700f,41.853474546223878860474f,90.448315022513270378113f,\ +32.027477025985717773438f,57.482325518503785133362f,75.726259034126996994019f,\ +32.547289272770285606384f,50.125551037490367889404f,26.862081931903958320618f,\ +11.706684622913599014282f,36.675705714151263237000f,87.538864836096763610840f,\ +52.483216533437371253967f,76.861125137656927108765f,82.899243896827101707458f,\ +64.99033216387033462524f,56.250627012923359870911f,21.698794979602098464966f,\ +93.22312804870307445526f,93.5097210109233856201f,97.608120972290635108948f,\ +91.35094834491610527039f,26.843591919168829917908f,9.1870715841650962829590f,\ +17.129724519327282905579f,73.117265943437814712524f,86.922781122848391532898f,\ +1.4808017760515213012695f,65.071928361430764198303f,42.254429217427968978882f,\ +23.262092983350157737732f,31.955500133335590362549f,74.261871399357914924622f,\ +77.881882060319185256958f,65.248953877016901969910f,90.324406325817108154297f,\ +86.69646182097494602203f,70.879780035465955734253f,69.452034076675772666931f,\ +84.671579115092754364014f,93.227435695007443428040f,95.654127094894647598267f,\ +16.239900095388293266296f,12.728751823306083679199f,95.707353064790368080139f,\ +67.644099798053503036499f,39.798104530200362205505f,11.081875301897525787354f,\ +50.97153154201805591583f,58.446559030562639236450f,25.919713405892252922058f,\ +29.182348400354385375977f,6.0309174004942178726196f,90.43274922296404838562f,\ +61.944271018728613853455f,25.037935934960842132568f,83.850894169881939888000f,\ +82.732185069471597671509f,73.220202280208468437195f,29.458374157547950744629f,\ +29.091028729453682899475f,70.458725746721029281616f,30.465652560815215110779f,\ +75.730663724243640899658f,73.18075490184128284454f,69.053836632519960403442f,\ +62.402765033766627311707f,41.599050164222717285156f,28.105994546785950660706f,\ +5.6220385245978832244873f,58.040395518764853477478f,0.4246918484568595886230f,\ +68.2817161548882722855f,89.133544359356164932251f,92.980264825746417045593f,\ +28.40001545846462249756f,9.885430941358208656311f,41.369083430618047714233f,\ +64.121548598632216453552f,64.692758955061435699463f,47.02662643976509571075f,\ +60.481913108378648757935f,67.138904659077525138855f,71.394702047109603881836f,\ +54.127137595787644386292f,39.052018057554960250854f,1.1089378502219915390015f,\ +90.150084160268306732178f,13.887455360963940620422f,8.5074969567358493804932f,\ +34.66010238043963909149f,42.338709905743598937988f,80.213972786441445351f,\ +31.7881367169320583344f,18.021041667088866233826f,69.688742049038410186768f,\ +35.482168616726994514465f,16.12617420032620429993f,75.34236568026244640350f,\ +62.194181978702545166016f,51.510728383436799049377f,67.819245439022779464722f,\ +61.666865786537528038025f,70.212037675082683563232f,13.621602999046444892883f,\ +60.870522353798151016235f,18.923167092725634574890f,47.614179179072380065918f,\ +17.161004850640892982483f,41.371036972850561141968f,15.31781828962266445160f,\ +22.868881560862064361572f,95.856341393664479255676f,39.499193150550127029419f,\ +2.500818995758891106f,44.927055388689041137695f,91.384086245670914649963f,\ +11.012465786188840866089f,74.87958460114896297455f,0.7881646975874900817871f,\ +23.523587780073285102844f,80.106287542730569839478f,65.456348611041903495789f,\ +51.620832458138465881348f,70.271815219894051551819f,5.5151230655610561370850f,\ +62.56400248967111110687f,84.313133545219898223877f,17.294042231515049934387f,\ +41.730730701237916946411f,81.875373004004359245300f,25.327575206756591796875f,\ +86.085468018427491188049f,17.212611716240644454956f,78.060937067493796348572f,\ +13.735765032470226287842f,0.2187759149819612503052f,1.4656470157206058502197f,\ +30.469974083825945854187f,80.307766422629356384277f,99.052629480138421058655f,\ +82.85992136225104331970f,87.21015579067170619965f,29.531141556799411773682f,\ +58.27610609121620655060f,29.06773509457707405090f,2.0005736034363508224f,\ +71.4346818625926971436f,26.664068037644028663635f,51.992803346365690231323f,\ +48.17320345900952816010f,0.0918259844183921813965f,38.418471114709973335266f,\ +49.06664276495575904846f,44.197808159515261650085f,65.678765252232551574707f,\ +10.470610717311501502991f,42.787145730108022689819f,75.105277216061949729919f,\ +36.962236650288105010986f,84.119305433705449104309f,90.374342072755098342896f,\ +44.184404192492365837097f,1.0920032858848571777344f,20.380018139258027076721f,\ +85.418348293751478195190f,39.327101549133658409119f,97.573022358119487762451f,\ +8.4199145901948213577271f,23.39450428262352943420f,48.397052986547350883484f,\ +33.292300626635551452637f,96.453859517350792884827f,52.920697536319494247437f,\ +7.9968032892793416976929f,75.475437380373477935791f,4.476350219920277596f,\ +84.631874877959489822388f,20.008285669609904289246f,69.44785490632057189941f,\ +28.204387659206986427307f,79.546741675585508346558f,20.281786611303687095642f,\ +78.075716458261013031006f,93.606285052374005317688f,88.801648560911417007446f,\ +33.848348213359713554382f,89.761531725525856018066f} + +#define RESULT {4.3500195892822599574856f,4.378812333443298676627f,5.2946847693089331698957f,\ +5.2279502699832844925254f,2.6068118507181217147206f,4.968022463585481496295f,\ +4.8816676362403299549442f,4.4722388068202851840738f,5.2543446283333992141706f,\ +4.3762977630646631155287f,4.6848128785767624293612f,3.3835688928264802122214f,\ +5.2146082054939908445590f,4.4271792498758397726988f,5.1978952030053422461719f,\ +4.159497560939560578674f,4.7445490293632399669832f,5.0202285648475850621253f,\ +4.1756051841813626168687f,4.6075785448582253778227f,3.9835162329116351465075f,\ +3.1514779837977200394050f,4.2950758361772223281605f,5.165197419194649697261f,\ +4.653549840642725143880f,5.035105083560019956224f,5.1107367420045859418565f,\ +4.8673265089936572636020f,4.7228853485288873059744f,3.7698725167565876326137f,\ +5.2281142583800894740875f,5.2311839874435639430317f,5.2740816359097371091025f,\ +5.2078258853539018957690f,3.982827186610214287299f,2.9079691610609703644741f,\ +3.5331093207527803912171f,4.9851649496034715625115f,5.1581342419725935144470f,\ +0.9450506373811344840163f,4.8685813827251553931319f,4.4367163112396088564537f,\ +3.8395099847061766595857f,4.1572465837028591550961f,5.0006994941965512424531f,\ +5.0482993082581542054754f,4.8712984679982609392823f,5.1965242406243383754827f,\ +5.1555269912574592794385f,4.954082618091184997411f,4.9337317049920867972901f,\ +5.1318923054243690273779f,5.228160467885317963521f,5.2538586990129676479455f,\ +3.4796690893012534040452f,3.2354639460120244720542f,5.2544150166005954005755f,\ +4.9073526741507107473694f,4.3768085901327413722584f,3.0964161555968114925008f,\ +4.6243182142058252281913f,4.7611868033967539304285f,3.9477786701409951497510f,\ +4.0664175090632737052943f,2.4831009250018341028010f,5.1977230816033159754852f,\ +4.8193171469932529760172f,3.9131402651137854320496f,5.1221517738388655516246f,\ +5.1087193584020944570057f,4.98657191625376672306f,4.0758371911626332106948f,\ +4.0632814774108050315249f,4.9481239065017428302440f,4.1094776238806378643176f,\ +5.0202867341820684998766f,4.9860329708595516606806f,4.9279811897230469952547f,\ +4.8266925606060153697285f,4.421080015153528108840f,4.0288134359166507536543f,\ +2.4118364183807097234080f,4.7542122019999739634954f,0,\ +4.9167355873994562642793f,5.1832514554357551617159f,5.2255055264178071894321f,\ +4.0392267678246307482937f,2.9816410740582028893186f,4.4155348942144980739499f,\ +4.8538668500531736427206f,4.8627367182462748473881f,4.5437480774189333843083f,\ +4.7954231948046981415246f,4.8998553915953095838631f,4.9613217960209823331752f,\ +4.6843975172654603866818f,4.3578777660333960497496f,0.4626347638559775710121f,\ +5.1945923008314265345575f,3.3228343258666956927527f,2.830622803369744922009f,\ +4.238528249750794785200f,4.438709481897562980635f,5.077806047884725337838f,\ +4.1519928438683244564800f,3.5839165427001460351164f,4.9371344840241793150426f,\ +4.2619788264190443527468f,3.4726281293145686568380f,5.0151457380383783757338f,\ +4.8233440014012511909414f,4.6348430510092004652734f,4.9099388325030934865367f,\ +4.81482819845952114690f,4.9446162371720561168331f,3.3034540778469194677314f,\ +4.8018287252966844746993f,3.6328352359975357721567f,4.556167488561304601546f,\ +3.5349368514717505185274f,4.41558212917596915048f,3.4210967363570983224008f,\ +3.8224459155669441301484f,5.2559705982049909067655f,4.3692671498839636967659f,\ +1.5671566063449566819088f,4.4980634827120455909721f,5.2081885950679547292452f,\ +3.0901072205487807309510f,5.0089838747007107144782f,0,\ +3.850698741029123794988f,5.076462566530570263978f,4.8744723131002718474747f,\ +4.6369786693462113902342f,4.9454673471881154256380f,2.3923187222394570738970f,\ +4.8292733779221936885051f,5.127649658742538640865f,3.5426723072020398497273f,\ +4.424241396092424949416f,5.0983081346685077406278f,3.9246509637740216724922f,\ +5.1484540607983912963164f,3.537944651477085589164f,5.0505959169093319616195f,\ +3.3118225003889145696689f,0,0.9310418690232507010762f,\ +4.1096195393026562214800f,5.0789747485012091132717f,5.2887730188734272118722f,\ +5.1102622536361952398920f,5.1614350980940946200803f,4.0783057415377843568649f,\ +4.7582657239633334711471f,4.0624799671967695147146f,1.3172890037212539038336f,\ +4.9618816771260449982606f,3.9761122565887623281f,4.64415999832871140285f,\ +4.5678423566873336270078f,0,4.3415161209508754680542f,\ +4.5862227542495350718355f,4.481694375737592217490f,4.8778648861550966131517f,\ +3.0394313734202933474648f,4.4492483198356360674097f,5.0119936831694982259933f,\ +4.3028609023006350042806f,5.1253479422290126876760f,5.1970769705972195140475f,\ +4.4813909798397162376205f,0.4257373352329655857851f,3.7070996451820255046528f,\ +5.1406738437618608728030f,4.3648993866947414232982f,5.2737219653314042489001f,\ +2.820201721217977297584f,3.8451912168199942065883f,4.5724793527790357217100f,\ +4.1982477070823893683382f,5.2621850617105074832125f,4.661852422144622920541f,\ +2.7682565538529817494862f,5.0169105620070073570105f,2.1792385497944919414692f,\ +5.131423242241443638534f,3.6886685835548016498819f,4.9336715234659216378077f,\ +4.032310316197459165721f,5.0694524637856641646749f,3.7022621441401133424165f,\ +5.0507852459760567143121f,5.2322161767096924123166f,5.1795206909289932539764f,\ +4.2148191048546337356129f,5.19027265701442619417f} + +#define CRIN {0.1483933464623987674713f,0.5565875237807631492615f,0.4628333351574838161469f,\ +0.9158247429877519607544f,0.0444016349501907825470f,0.8175177471712231636047f,\ +0.5320580708794295787811f,0.2989391684532165527344f,0.5029047676362097263336f,\ +0.4266923693940043449402f,0.3965902938507497310638f,0.7440190296620130538940f,\ +0.7921002809889614582062f,0.5715918401256203651428f,0.4155966262333095073700f,\ +0.2953372262418270111084f,0.1075767637230455875397f,0.7572548976168036460876f,\ +0.93660886352881789207f,0.7694978956133127212524f,0.0902581927366554737091f,\ +0.4731486858800053596497f,0.4765542480163276195526f,0.6361737176775932312012f,\ +0.5064576440490782260895f,0.9049607468768954277039f,0.6742701171897351741791f,\ +0.3656400945037603378296f,0.6837903787381947040558f,0.4100628877058625221252f,\ +0.3582529271952807903290f,0.7118562050163745880127f,0.7966963038779795169830f,\ +0.9753969227895140647888f,0.5733916512690484523773f,0.8998429346829652786255f,\ +0.5953218084760010242462f,0.3765322910621762275696f,0.9104355531744658946991f,\ +0.1861076802015304565430f,0.6715109744109213352203f,0.2566455481573939323425f,\ +0.9819463356398046016693f,0.7608660291880369186401f,0.8556561623699963092804f,\ +0.8441717335954308509827f,0.3884846637956798076630f,0.4608103148639202117920f,\ +0.8381579727865755558014f,0.5278776129707694053650f,0.0187810636125504970551f,\ +0.2611750457435846328735f,0.6092445817776024341583f,0.0081067951396107673645f,\ +0.0276411953382194042206f,0.0158492103219032287598f,0.8109004520811140537262f,\ +0.2429467244073748588562f,0.3353355019353330135345f,0.4142854567617177963257f,\ +0.5946544189937412738800f,0.9080675477162003517151f,0.992223232518881559372f,\ +0.6239561475813388824463f,0.0789771513082087039948f,0.5889828568324446678162f,\ +0.2523608407936990261078f,0.5871062893420457839966f,0.0000379872508347034454f,\ +0.4244823055341839790344f,0.69984475849196314812f,0.4405533373355865478516f,\ +0.6495711454190313816071f,0.4199861017987132072449f,0.2716385438106954097748f,\ +0.0272838752716779708862f,0.6936013107188045978546f,0.1495713749900460243f,\ +0.5206344048492610454559f,0.9685971699655055999756f,0.9657785953022539615631f,\ +0.0654204180464148521423f,0.9626990980468690395355f,0.2655456010252237319946f,\ +0.8290728745050728321075f,0.1334408046677708625793f,0.8514542016200721263885f,\ +0.8984219655394554138184f,0.1995774977840483188629f,0.0138073815032839775085f,\ +0.2245407640002667903900f,0.3930436577647924423218f,0.8261723746545612812042f,\ +0.5051761353388428688049f,0.5651183272711932659149f,0.822583723813295364380f,\ +0.9197964356280863285065f,0.4713199352845549583435f,0.9223483256064355373383f,\ +0.2136987913399934768677f,0.7260794681496918201447f,0.9689361499622464179993f,\ +0.8346118587069213390350f,0.8257038742303848266602f,0.1350833275355398654938f,\ +0.7953761396929621696472f,0.8992118402384221553802f,0.2715440522879362106323f,\ +0.9219025229103863239288f,0.1750466236844658851624f,0.3323095212690532207489f,\ +0.9493130259215831756592f,0.7118741781450808048248f,0.8032329222187399864197f,\ +0.3628453887067735195160f,0.7530685458332300186157f,0.2641473677940666675568f,\ +0.9660940738394856452942f,0.8041944387368857860565f,0.5316947177052497863770f,\ +0.1673618280328810214996f,0.955579827539622783661f,0.6473058252595365047455f,\ +0.2645611818879842758179f,0.5411860425956547260284f,0.4980195099487900733948f,\ +0.0190768833272159099579f,0.4227291680872440338135f,0.8374647037126123905182f,\ +0.4151327675208449363708f,0.3497115275822579860687f,0.4844544250518083572388f,\ +0.3347255480475723743439f,0.2362121837213635444641f,0.0928130256943404674530f,\ +0.0737370252609252929688f,0.4197955676354467868805f,0.9802277712151408195496f,\ +0.8419611467979848384857f,0.6906680446118116378784f,0.2502765958197414875031f,\ +0.8266033390536904335022f,0.1875236849300563335419f,0.5023231171071529388428f,\ +0.8916302681900560855865f,0.8934147348627448081970f,0.1574523574672639369965f,\ +0.1629528645426034927368f,0.5226223585195839405060f,0.8417599620297551155090f,\ +0.5858130785636603832245f,0.1322202011942863464355f,0.8028764897026121616364f,\ +0.5250511718913912773132f,0.2528006075881421566010f,0.4602345135062932968140f,\ +0.996287219692021608353f,0.4019785309210419654846f,0.1399875725619494915009f,\ +0.5081327147781848907471f,0.9440425024367868900299f,0.9318959629163146018982f,\ +0.6445578685961663722992f,0.5729571748524904251099f,0.4810055238194763660431f,\ +0.6713787661865353584290f,0.0962744313292205333710f,0.8855805248022079467773f,\ +0.3892059125937521457672f,0.2907031057402491569519f,0.4209313853643834590912f,\ +0.9504273366183042526245f,0.482190326321870088577f,0.2289973804727196693420f,\ +0.2940405677072703838348f,0.6957426778972148895264f,0.9139824123121798038483f,\ +0.2068154653534293174744f,0.6285024262033402919769f,0.4031575415283441543579f,\ +0.3064021435566246509552f,0.3148818286135792732239f,0.7400112929753959178925f,\ +0.8853011503815650939941f,0.788494529668241739273f,0.8977585239335894584656f,\ +0.0339450328610837459564f,0.8802101369947195053101f,0.5418177028186619281769f,\ +0.9511840576305985450745f,0.5574890668503940105438f,0.1312845982611179351807f,\ +0.9453403786756098270416f,0.2518341308459639549255f,0.2607447705231606960297f,\ +0.1215410251170396804810f,0.9136986923404037952423f,0.9382542567327618598938f,\ +0.3105722474865615367889f,0.9309121072292327880859f} + +#define CIIN {0.5225624092854559421539f,0.7617142526432871818542f,0.3009174778126180171967f,\ +0.1853434126824140548706f,0.5148605112917721271515f,0.7257346073165535926819f,\ +0.7033738414756953716278f,0.5664369426667690277100f,0.7816161573864519596100f,\ +0.3330347230657935142517f,0.4017280167900025844574f,0.8503915611654520034790f,\ +0.41114101978018879890f,0.1586530329659581184387f,0.6542402538470923900604f,\ +0.9449902996420860290527f,0.400338994804769754410f,0.9679889930412173271179f,\ +0.32740902295336127281f,0.8933845367282629013062f,0.6218692888505756855011f,\ +0.0985169494524598121643f,0.7449700380675494670868f,0.3134250529110431671143f,\ +0.1409188793040812015533f,0.3239218806847929954529f,0.9958796552382409572601f,\ +0.2412899602204561233521f,0.4753343504853546619415f,0.9194070147350430488586f,\ +0.0450326460413634777069f,0.8481595069169998168945f,0.8928631045855581760406f,\ +0.1469233212992548942566f,0.4904643460176885128021f,0.9986877571791410446167f,\ +0.3392539476044476032257f,0.8790708789601922035217f,0.3107871781103312969208f,\ +0.1200211457908153533936f,0.0909670502878725528717f,0.5804221173748373985291f,\ +0.446611551102250814438f,0.3501139078289270401001f,0.7262432840652763843536f,\ +0.3650169344618916511536f,0.5597011330537497997284f,0.434090383350849151611f,\ +0.5082829319871962070465f,0.3487796885892748832703f,0.8136124997399747371674f,\ +0.337404197081923484802f,0.7742837746627628803253f,0.0156080657616257667542f,\ +0.0195691580884158611298f,0.0445443131029605865479f,0.4240885511972010135651f,\ +0.8158838218078017234802f,0.9913199446164071559906f,0.5120379645377397537231f,\ +0.1021917951293289661407f,0.7161553995683789253235f,0.4527317988686263561249f,\ +0.2445004582405090332031f,0.1668560453690588474274f,0.9187424210831522941589f,\ +0.3418669118545949459076f,0.4624818544834852218628f,0.0400874321348965167999f,\ +0.4700120547786355018616f,0.8552942494861781597137f,0.3308605216443538665771f,\ +0.0322206378914415836334f,0.9760772576555609703064f,0.0763854510150849819183f,\ +0.2165335658937692642212f,0.2348632332868874073029f,0.1446668924763798713684f,\ +0.5313451024703681468964f,0.4441541358828544616699f,0.5759493880905210971832f,\ +0.3719177199527621269226f,0.5167253850959241390228f,0.5186656024307012557983f,\ +0.6306529571302235126495f,0.0928382659330964088440f,0.5421750987879931926727f,\ +0.2833826132118701934814f,0.2819099412299692630768f,0.1141945635899901390076f,\ +0.7321730605326592922211f,0.9823690224438905715942f,0.8243003231473267078400f,\ +0.6485677706077694892883f,0.5304958778433501720428f,0.6958626955747604370117f,\ +0.6050392785109579563141f,0.2683336613699793815613f,0.5511700971983373165131f,\ +0.1174971889704465866089f,0.7958277617581188678741f,0.4983139941468834877014f,\ +0.9196587274782359600067f,0.1420703046023845672607f,0.389312467072159051895f,\ +0.2658497532829642295837f,0.9480321384035050868988f,0.2326095197349786758423f,\ +0.0139051643200218677521f,0.9270462663844227790833f,0.4878733339719474315643f,\ +0.0354842916131019592285f,0.6607114099897444248199f,0.0879401965066790580750f,\ +0.8046676008962094783783f,0.212315237149596214294f,0.9163186331279575824738f,\ +0.9393384093418717384338f,0.3174265320412814617157f,0.9574301876127719879150f,\ +0.7951935962773859500885f,0.3240787154063582420349f,0.0472964248619973659515f,\ +0.1696171183139085769653f,0.7654392314143478870392f,0.2554624872282147407532f,\ +0.1189010548405349254608f,0.7469239532947540283203f,0.0616608508862555027008f,\ +0.1056091515347361564636f,0.1581688239239156246185f,0.9732552450150251388550f,\ +0.8786917333491146564484f,0.1824825564399361610413f,0.9303942839615046977997f,\ +0.4655157290399074554443f,0.5399280847050249576569f,0.9143392136320471763611f,\ +0.0622840351425111293793f,0.6500507537275552749634f,0.2340233740396797657013f,\ +0.3603484155610203742981f,0.1917369994334876537323f,0.2371335849165916442871f,\ +0.4136920445598661899567f,0.2661342276260256767273f,0.3891090690158307552338f,\ +0.6622495856136083602905f,0.4503725995309650897980f,0.3829893553629517555237f,\ +0.1937121297232806682587f,0.9629272706806659698486f,0.6385000632144510746002f,\ +0.2695108866319060325623f,0.1092974594794213771820f,0.0598662365227937698364f,\ +0.1431378168053925037384f,0.2944079088047146797180f,0.9022735017351806163788f,\ +0.9111119657754898071289f,0.9847188093699514865875f,0.0592310009524226188660f,\ +0.5464080139063298702240f,0.5080275069922208786011f,0.6546461437828838825226f,\ +0.9597736010327935218811f,0.1577645908109843730927f,0.1818120293319225311279f,\ +0.4555030376650393009186f,0.1048952480778098106384f,0.7636235631071031093597f,\ +0.1893162522464990615845f,0.1596221593208611011505f,0.3115166993811726570129f,\ +0.2491372707299888134003f,0.0469047501683235168457f,0.0797643386758863925934f,\ +0.3945369226858019828796f,0.3254697113297879695892f,0.5811151321977376937866f,\ +0.1456566532142460346222f,0.4704219633713364601135f,0.8631705637089908123016f,\ +0.1648640967905521392822f,0.0801398889161646366119f,0.4932156866416335105896f,\ +0.4345335862599313259125f,0.1079503614455461502075f,0.2686753761954605579376f,\ +0.7417223947122693061829f,0.4086893904022872447968f,0.6706044673919677734375f,\ +0.4159612008370459079742f,0.4766113189980387687683f,0.4431825890205800533295f,\ +0.6688354592770338058472f,0.5834077899344265460968f,0.4861929873004555702209f,\ +0.715783319901674985886f,0.1403244398534297943115f} + +#define CRRESULT {0.5053397031743451783825f,0.7650083608446867078356f,0.3289296819323739295982f,\ +0.3563456766158749622342f,0.4948207655225617118688f,0.8169593462846268527855f,\ +0.7132198900639351579755f,0.5570137230416445373038f,0.7685376318852206178889f,\ +0.3559803193123551312560f,0.4189790595413633300659f,0.8813522345691391368661f,\ +0.5405451162482487470484f,0.1905551975849387180695f,0.6493731034151291048317f,\ +0.8578709195697519218626f,0.3922142862720902067863f,0.9642946930057294530059f,\ +0.5389615746319644795648f,0.9186094888728127960675f,0.5890418064066422765279f,\ +0.1113977102429560134267f,0.7345860770241963155769f,0.3799876579856086289411f,\ +0.1619970506356118999935f,0.51382943864194075001f,0.9605702232101991366875f,\ +0.2552214504374311077051f,0.5588288246069162967800f,0.8545155572742579863643f,\ +0.0482073009402987154304f,0.8701819105023789191478f,0.9267094766915666692597f,\ +0.3583874762657675017152f,0.5394241582016752190043f,1.0267057888096897677599f,\ +0.3962322220487046187110f,0.8200372580795054489045f,0.5035682683774097556650f,\ +0.1218215489911998739014f,0.1217295472085216101465f,0.5645974853924803360528f,\ +0.6787204142960019392916f,0.4641409785094591788912f,0.8320374579652175528466f,\ +0.5202648072575078996849f,0.5635084163999081185992f,0.4608376215542885900867f,\ +0.6521335567127740651117f,0.3901559225476997627702f,0.7433295520896158192770f,\ +0.3414853587252406064145f,0.7876437052847802267053f,0.0156079448330699189357f,\ +0.0195753850507095344957f,0.0445351746116087257588f,0.5619901990592348628439f,\ +0.7563216032216260042986f,0.8953230010983072029163f,0.5250759023565449989945f,\ +0.1262270783291525866332f,0.8463340938014771719367f,0.6903512283163251161966f,\ +0.3002023271844543317322f,0.1665929038330317135674f,0.8881085995755062523216f,\ +0.3450945758035259824936f,0.5168125326109850314893f,0.0400767031552608649081f,\ +0.4881659313644853837033f,0.8717577944100705078512f,0.3559191435167290418207f,\ +0.0423384874325624382951f,0.8962569818869624560520f,0.0792669980362326609402f,\ +0.2149514867261388406661f,0.3084002596083564862184f,0.1457610223920582370738f,\ +0.5638322964331675679617f,0.6681928703809085767773f,0.7715309042125101379739f,\ +0.3644939000586688848671f,0.7241095709372292743566f,0.5109856481565466790329f,\ +0.7492592023075983487246f,0.0935322123614654998836f,0.6873609600399674945947f,\ +0.4653574362777189166174f,0.2834338708350941926639f,0.1139584955905696417311f,\ +0.6886187601911135658384f,0.8966624572124947123442f,0.8901159605244814976288f,\ +0.6621780758434868685569f,0.5739364819547106977282f,0.7967040377802739881119f,\ +0.7702556784014074064970f,0.2963495189276508789966f,0.729639913718978516677f,\ +0.1199467917211827494572f,0.8369585267706058928638f,0.7130151705637984838049f,\ +0.9564173315765011063050f,0.2362741844905166255231f,0.3829952297292640861492f,\ +0.3854654409071321952140f,0.9956878617898979877410f,0.2388852521695121466916f,\ +0.0357548125472270175718f,0.8344528446849692748799f,0.4908081134490644426016f,\ +0.1072298401775326898155f,0.7292248632489435333781f,0.1444440063075330404896f,\ +0.7618560442692507983509f,0.3014073074948313002430f,0.8338433864005018181231f,\ +1.013809216729007589564f,0.4488437286282063176657f,0.9028988520348978363828f,\ +0.7342748763980897486192f,0.5492704923146081164020f,0.0619250478958671968233f,\ +0.1747947745500638971894f,0.7643392221916658346714f,0.2869233753851287982428f,\ +0.1186438529044472750540f,0.7261517086175122148717f,0.1110167797262640587697f,\ +0.1156665104854840142590f,0.1677179018762894047168f,0.9049771869312485117476f,\ +0.8140692858573190804350f,0.1865250841653489921601f,0.8328626043313867022277f,\ +0.4511026850510220786994f,0.5511713324178673101272f,1.0040394102716723168101f,\ +0.1134432764930088655131f,0.7136163206069113806862f,0.2389915016256592694699f,\ +0.5061510239067475991348f,0.1938531425179492451161f,0.267912781705172242663f,\ +0.594520593176991907214f,0.4421595740617755287971f,0.3838580911610497414799f,\ +0.6265966551277006857390f,0.4892019455111443759776f,0.5371648663643865395656f,\ +0.2336644699290637006150f,0.8580649693764487162539f,0.7447932141471096390006f,\ +0.30664577808112553070f,0.1126796888171682081703f,0.0673404850217956818526f,\ +0.3780061914448271664924f,0.3135468248495265064513f,0.8141814149801622768621f,\ +0.8656800272972641208113f,1.0330415543607425199468f,0.1517147576472806791426f,\ +0.6107832692276639052764f,0.5555300503019462432519f,0.6621194316643849164805f,\ +0.9359383537376269046604f,0.1578266511911156633197f,0.3288869400610432980336f,\ +0.4688911283964798393242f,0.1093517544178844447256f,0.7390278072154514710235f,\ +0.3915656081630794482784f,0.1803516698292359499156f,0.3140185989593758941751f,\ +0.2570435038916802361619f,0.0651252572213311814453f,0.1812803236410877871787f,\ +0.3918987512324060840108f,0.3907169202420177067658f,0.5847178774812699098007f,\ +0.1522469534945809221949f,0.4726351219523636792985f,0.8890284419930043480207f,\ +0.3043305148205690535690f,0.1282404489119809976039f,0.6689999411776240689775f,\ +0.4220981761434796641907f,0.2107039270298768085521f,0.3089304668962193911597f,\ +0.8825265124364938262858f,0.4570764804119011315287f,0.6317437032300170507426f,\ +0.6289949625530589782940f,0.4716158816756069738219f,0.4417016096894970100806f,\ +0.6297964082740089564183f,0.7506329678118981441060f,0.6853639001045995771122f,\ +0.6844909750084481325771f,0.3028385676048351293765f} + +#define CIRESULT {1.4391441245686327210507f,1.130955515640670316913f,1.1164484564631134144719f,\ +0.5343429881094952094145f,1.5313159234681512632648f,0.9218282568507811802760f,\ +1.1368031918334591257036f,1.309961324172885133166f,1.1768313149474189938104f,\ +1.1581725732800560724201f,1.198068547194847122128f,1.0167778558643913999759f,\ +0.8107284978807606234952f,0.9747572654361357225028f,1.2226962809307837520834f,\ +1.356863284326968122073f,1.4708283871101888173882f,1.0424189614104724110888f,\ +0.6175483783889722522176f,1.012434899444895508580f,1.4941377955828787360559f,\ +1.081247186686038253001f,1.189977918876721885155f,0.9361970185325101390106f,\ +1.0473314366303878575337f,0.6478815708564551467674f,1.103880390282215628872f,\ +1.208902068619972958174f,0.9405460211534443226711f,1.2708555309086870810376f,\ +1.2048457921815343141247f,1.0386992340805454304586f,0.9940470159552662332558f,\ +0.4129471251607437776165f,1.0483368304459323994138f,0.9626808065085141752348f,\ +0.9866797451792658213421f,1.2893127532844186333705f,0.6333368050416610106623f,\ +1.3849939050391590900091f,0.8412033774271403530065f,1.3484185557182311043789f,\ +0.6561721869869621137639f,0.8152667302376208624537f,0.8942162872449925803409f,\ +0.7354476761871528989190f,1.2302184692777484720239f,1.1419032200306009627866f,\ +0.8136425490751511002685f,1.0585917357001826122342f,1.5562281161680697749716f,\ +1.3215709464122720184776f,1.0936282246933759498830f,1.562690430228121041267f,\ +1.5431569076078051061529f,1.5549621593607869662890f,0.7985043985204253180754f,\ +1.3827954341839958640747f,1.3338048203354757603734f,1.1992311317991326546917f,\ +0.9398015526727905299964f,0.8526323846859752420002f,0.6516084904889641871151f,\ +0.9312161189612270240090f,1.4928235928235611407189f,1.1434135639085114544145f,\ +1.3304436504678796016066f,1.0279557218905930326969f,1.5707583700301124274290f,\ +1.18264027414866035315f,1.049240570305455033662f,1.1438977350867394200407f,\ +0.8645410048697405036577f,1.272544314036070156604f,1.2965854453389789036066f,\ +1.5441276936419627840991f,0.8474785980812834518261f,1.4222542688372477037717f,\ +1.1067340541491283989473f,0.6658230283826037654293f,0.7440600810961385258580f,\ +1.509454955782236762474f,0.7139904083352976993382f,1.3343109319103572119047f,\ +0.8754276015708571945240f,1.4375430902494801266300f,0.8182153660902479197503f,\ +0.6279916190243797213810f,1.3777792247900606525945f,1.5570776874524723254467f,\ +1.3896877170114805277734f,1.292290381577097857502f,0.9513544490495031702437f,\ +1.146595322853661613749f,1.0663673649265974496814f,0.9066444651210990857138f,\ +0.7936124351430207113367f,1.1025133400691302654195f,0.7646931356316959416120f,\ +1.3570006423237950254901f,1.0127507430242304042878f,0.6984070724030820853656f,\ +0.9777377069899801931285f,0.6381815285628557044006f,1.4447151619316793702552f,\ +0.7381184252357657626931f,0.9463444174447509515957f,1.3036540993301888313738f,\ +0.3993509460349408124458f,1.4425649666003559357108f,1.2703537792660923866350f,\ +0.3366052452908819825339f,0.9799364183556658058905f,0.6519110571169279833015f,\ +1.288935099739083156578f,0.766834829952783847418f,1.3765235555687964641436f,\ +0.9026821267000586512808f,0.7532458865053713870097f,1.1915253215495016370085f,\ +1.4398661339551832583084f,0.5960292480319858698934f,0.8683763627836410536887f,\ +1.307183356265154250409f,1.1437419441048803925298f,1.0721920855425228769064f,\ +1.5518517938677236500666f,1.2329687641584510249260f,0.5874976025749066854686f,\ +1.1457409989520814797004f,1.2187173974473419768572f,1.2272326680013900812583f,\ +1.3202499364548996307889f,1.3364966855772182352524f,1.5028659601895917319325f,\ +1.5039244799556488185743f,1.199080874147727016066f,0.8850027352965960103504f,\ +0.5797999065603636204003f,0.9935513093218836244702f,1.3250345117052622079257f,\ +0.7510747251416685088543f,1.3856864393507652977178f,1.0646397833458374204696f,\ +0.7161423103150551527918f,0.6220745390646167383153f,1.4237426982899421545881f,\ +1.4349026977530163762253f,1.0862935323189089054097f,0.7475103036060971595234f,\ +0.9640755596017442918821f,1.4756182374730877349123f,0.8992686396344509169865f,\ +1.0456992348735927311765f,1.316872193719026640224f,1.0937098269572853581622f,\ +0.3787889502350130777053f,1.1777575502770252224849f,1.466927792635024818679f,\ +1.198998549247170863907f,0.9317214709279717510526f,0.3994553068013038665818f,\ +0.9996993047110468433303f,1.0533682169916682713762f,1.1680862767422879322510f,\ +1.0968093743281353003027f,1.475564759332087749755f,0.5739680940616843640711f,\ +1.2132055498728515630091f,1.277641763762892734846f,1.2372616699165408515881f,\ +0.4908185034943345348424f,1.0764535824324550361553f,1.3508749145869605179371f,\ +1.282220574891209663448f,0.8033914160655766245611f,0.4529330910646225394345f,\ +1.3777085436870080137339f,0.9478851551815749010288f,1.2208388985822435923723f,\ +1.263077873207383738929f,1.284175149159334061721f,1.023436357706823729430f,\ +0.5626793926847969418148f,0.6728398111486185717567f,0.7545922256887819257187f,\ +1.5396608871785673056110f,0.5335122401588628937574f,1.0275094129340511805992f,\ +0.8338356239168208672297f,1.0426578447465559840168f,1.4617456602888381222982f,\ +0.6682797094798482717692f,1.3426136823908161321839f,1.3312882615539098907220f,\ +1.4697575902556172522395f,0.7877417380659905710161f,0.7165102522491650915981f,\ +1.3183788402186256139004f,0.4738958779540429211430f} + + +void sacoshsTest(void) { + float In[]=IN; + float Res[]=RESULT; + float out; + int i = 0; + + for (i=0;i<200;i++){ + if (In[i]<1) assert(1); + else { + out = sacoshs(In[i]); + assert ( ( fabs(out-Res[i]) / fabs(out) ) <1e-6); + } + } +} + +void cacoshsTest(void) { + float InR[]=CRIN; + float InI[]=CIIN; + float ResR[]=CRRESULT; + float ResI[]=CIRESULT; + int i=0; + floatComplex in,out; + + for (i=0;i<200;i++){ + in=FloatComplex(InR[i],InI[i]); + out=cacoshs(in); + assert( ( fabs(creals(out)-ResR[i]) / fabs(creals(out)) ) <1e-6); + assert( ( fabs(cimags(out)-ResI[i]) / fabs(cimags(out)) ) <1e-6); + } +} + +void sacoshaTest(void) { + float In[]=IN; + float Res[]=RESULT; + float out[200],in[200]; + int i = 0; + + for (i=0;i<200;i++){ + in[i]=In[i]; + } + + sacosha(in,200,out); + for (i=0;i<200;i++){ + if (isnan(out[i])) assert(1); + else{ + assert ( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <1e-6); + } + } +} + +void cacoshaTest(void) { + float InR[]=CRIN; + float InI[]=CIIN; + float ResR[]=CRRESULT; + float ResI[]=CIRESULT; + int i=0; + floatComplex in[200],out[200]; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(InR[i],InI[i]); + } + cacosha(in,200,out); + for (i=0;i<200;i++){ + assert( ( fabs(creals(out[i])-ResR[i]) / fabs(creals(out[i])) ) <1e-6); + assert( ( fabs(cimags(out[i])-ResI[i]) / fabs(cimags(out[i])) ) <1e-6); + } +} + +int testAcosh(void) { + printf("\n>>>> Float Hyperbolic ArcCosine Tests\n"); + sacoshsTest(); + cacoshsTest(); + sacoshaTest(); + cacoshaTest(); + return 0; +} + +int main(void) { + assert(testAcosh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj b/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj new file mode 100644 index 00000000..9e4fef1a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {24015124-A47C-406F-850B-09E95DBBF573} + testFloatAcosh + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj.filters b/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj.filters new file mode 100644 index 00000000..bb020c5d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/test_FloatAcosh/testFloatAcosh.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj b/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj new file mode 100644 index 00000000..e89a1a6b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj @@ -0,0 +1,179 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testDoubleAcosh + {5805527C-6A77-40A9-8EF6-414B0269B50E} + test_doubleacosh + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj.filters b/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj.filters new file mode 100644 index 00000000..f609dce1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/acosh/zacosha.c b/2.3-1/src/c/elementaryFunctions/acosh/zacosha.c new file mode 100644 index 00000000..c5ba119e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/zacosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "acosh.h" + +void zacosha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zacoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/acosh/zacoshs.c b/2.3-1/src/c/elementaryFunctions/acosh/zacoshs.c new file mode 100644 index 00000000..3bb3b25a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/acosh/zacoshs.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula : +// +// acosh(z) = sign(-imag(acos(z)) i acos(z) +// +// sign(x) = 1 if x >= 0 +// | -1 if x < 0 +*/ + +#include "acosh.h" +#include "acos.h" + +#define localSign(x) x >= 0 ? 1.0 : -1.0 + +doubleComplex zacoshs(doubleComplex z) { + doubleComplex acos_z = zacoss(z); + double sign = localSign(-zimags(acos_z)); + + return DoubleComplex(-sign * zimags(acos_z), sign * zreals(acos_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/Makefile.am b/2.3-1/src/c/elementaryFunctions/asin/Makefile.am new file mode 100644 index 00000000..0a8ab05a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/Makefile.am @@ -0,0 +1,72 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAsin_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAsin.la + +libAsin_la_SOURCES = $(HEAD) $(SRC) + +SRC = sasins.c \ + dasins.c \ + casins.c \ + zasins.c \ + sasina.c \ + dasina.c \ + casina.c \ + zasina.c + +HEAD = ../includes/asin.h + + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAsin testDoubleAsin + +TESTS = testFloatAsin testDoubleAsin + +# +# -*- ArcSine Tests -*- +# +testFloatAsin_SOURCES = testAsin.h testFloatAsin.c +testFloatAsin_CFLAGS = $(check_INCLUDES) +testFloatAsin_LDADD = $(check_LDADD) + +testDoubleAsin_SOURCES = testAsin.h testDoubleAsin.c +testDoubleAsin_CFLAGS = $(check_INCLUDES) +testDoubleAsin_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/asin/Makefile.in b/2.3-1/src/c/elementaryFunctions/asin/Makefile.in new file mode 100644 index 00000000..9c133bd6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/Makefile.in @@ -0,0 +1,812 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAsin$(EXEEXT) testDoubleAsin$(EXEEXT) +TESTS = testFloatAsin$(EXEEXT) testDoubleAsin$(EXEEXT) +subdir = src/c/elementaryFunctions/asin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAsin_la_LIBADD = +am__objects_1 = +am__objects_2 = libAsin_la-sasins.lo libAsin_la-dasins.lo \ + libAsin_la-casins.lo libAsin_la-zasins.lo libAsin_la-sasina.lo \ + libAsin_la-dasina.lo libAsin_la-casina.lo libAsin_la-zasina.lo +am_libAsin_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAsin_la_OBJECTS = $(am_libAsin_la_OBJECTS) +libAsin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAsin_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAsin_OBJECTS = testDoubleAsin-testDoubleAsin.$(OBJEXT) +testDoubleAsin_OBJECTS = $(am_testDoubleAsin_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleAsin_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAsin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAsin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAsin_OBJECTS = testFloatAsin-testFloatAsin.$(OBJEXT) +testFloatAsin_OBJECTS = $(am_testFloatAsin_OBJECTS) +testFloatAsin_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAsin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAsin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAsin_la_SOURCES) $(testDoubleAsin_SOURCES) \ + $(testFloatAsin_SOURCES) +DIST_SOURCES = $(libAsin_la_SOURCES) $(testDoubleAsin_SOURCES) \ + $(testFloatAsin_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAsin_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAsin.la +libAsin_la_SOURCES = $(HEAD) $(SRC) +SRC = sasins.c \ + dasins.c \ + casins.c \ + zasins.c \ + sasina.c \ + dasina.c \ + casina.c \ + zasina.c + +HEAD = ../includes/asin.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- ArcSine Tests -*- +# +testFloatAsin_SOURCES = testAsin.h testFloatAsin.c +testFloatAsin_CFLAGS = $(check_INCLUDES) +testFloatAsin_LDADD = $(check_LDADD) +testDoubleAsin_SOURCES = testAsin.h testDoubleAsin.c +testDoubleAsin_CFLAGS = $(check_INCLUDES) +testDoubleAsin_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/asin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/asin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAsin.la: $(libAsin_la_OBJECTS) $(libAsin_la_DEPENDENCIES) + $(libAsin_la_LINK) -rpath $(pkglibdir) $(libAsin_la_OBJECTS) $(libAsin_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAsin$(EXEEXT): $(testDoubleAsin_OBJECTS) $(testDoubleAsin_DEPENDENCIES) + @rm -f testDoubleAsin$(EXEEXT) + $(testDoubleAsin_LINK) $(testDoubleAsin_OBJECTS) $(testDoubleAsin_LDADD) $(LIBS) +testFloatAsin$(EXEEXT): $(testFloatAsin_OBJECTS) $(testFloatAsin_DEPENDENCIES) + @rm -f testFloatAsin$(EXEEXT) + $(testFloatAsin_LINK) $(testFloatAsin_OBJECTS) $(testFloatAsin_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-casina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-casins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-dasina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-dasins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-sasina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-sasins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-zasina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsin_la-zasins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAsin-testDoubleAsin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAsin-testFloatAsin.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAsin_la-sasins.lo: sasins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-sasins.lo -MD -MP -MF $(DEPDIR)/libAsin_la-sasins.Tpo -c -o libAsin_la-sasins.lo `test -f 'sasins.c' || echo '$(srcdir)/'`sasins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-sasins.Tpo $(DEPDIR)/libAsin_la-sasins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sasins.c' object='libAsin_la-sasins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-sasins.lo `test -f 'sasins.c' || echo '$(srcdir)/'`sasins.c + +libAsin_la-dasins.lo: dasins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-dasins.lo -MD -MP -MF $(DEPDIR)/libAsin_la-dasins.Tpo -c -o libAsin_la-dasins.lo `test -f 'dasins.c' || echo '$(srcdir)/'`dasins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-dasins.Tpo $(DEPDIR)/libAsin_la-dasins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dasins.c' object='libAsin_la-dasins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-dasins.lo `test -f 'dasins.c' || echo '$(srcdir)/'`dasins.c + +libAsin_la-casins.lo: casins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-casins.lo -MD -MP -MF $(DEPDIR)/libAsin_la-casins.Tpo -c -o libAsin_la-casins.lo `test -f 'casins.c' || echo '$(srcdir)/'`casins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-casins.Tpo $(DEPDIR)/libAsin_la-casins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='casins.c' object='libAsin_la-casins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-casins.lo `test -f 'casins.c' || echo '$(srcdir)/'`casins.c + +libAsin_la-zasins.lo: zasins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-zasins.lo -MD -MP -MF $(DEPDIR)/libAsin_la-zasins.Tpo -c -o libAsin_la-zasins.lo `test -f 'zasins.c' || echo '$(srcdir)/'`zasins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-zasins.Tpo $(DEPDIR)/libAsin_la-zasins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zasins.c' object='libAsin_la-zasins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-zasins.lo `test -f 'zasins.c' || echo '$(srcdir)/'`zasins.c + +libAsin_la-sasina.lo: sasina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-sasina.lo -MD -MP -MF $(DEPDIR)/libAsin_la-sasina.Tpo -c -o libAsin_la-sasina.lo `test -f 'sasina.c' || echo '$(srcdir)/'`sasina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-sasina.Tpo $(DEPDIR)/libAsin_la-sasina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sasina.c' object='libAsin_la-sasina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-sasina.lo `test -f 'sasina.c' || echo '$(srcdir)/'`sasina.c + +libAsin_la-dasina.lo: dasina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-dasina.lo -MD -MP -MF $(DEPDIR)/libAsin_la-dasina.Tpo -c -o libAsin_la-dasina.lo `test -f 'dasina.c' || echo '$(srcdir)/'`dasina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-dasina.Tpo $(DEPDIR)/libAsin_la-dasina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dasina.c' object='libAsin_la-dasina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-dasina.lo `test -f 'dasina.c' || echo '$(srcdir)/'`dasina.c + +libAsin_la-casina.lo: casina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-casina.lo -MD -MP -MF $(DEPDIR)/libAsin_la-casina.Tpo -c -o libAsin_la-casina.lo `test -f 'casina.c' || echo '$(srcdir)/'`casina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-casina.Tpo $(DEPDIR)/libAsin_la-casina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='casina.c' object='libAsin_la-casina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-casina.lo `test -f 'casina.c' || echo '$(srcdir)/'`casina.c + +libAsin_la-zasina.lo: zasina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -MT libAsin_la-zasina.lo -MD -MP -MF $(DEPDIR)/libAsin_la-zasina.Tpo -c -o libAsin_la-zasina.lo `test -f 'zasina.c' || echo '$(srcdir)/'`zasina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsin_la-zasina.Tpo $(DEPDIR)/libAsin_la-zasina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zasina.c' object='libAsin_la-zasina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsin_la_CFLAGS) $(CFLAGS) -c -o libAsin_la-zasina.lo `test -f 'zasina.c' || echo '$(srcdir)/'`zasina.c + +testDoubleAsin-testDoubleAsin.o: testDoubleAsin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsin_CFLAGS) $(CFLAGS) -MT testDoubleAsin-testDoubleAsin.o -MD -MP -MF $(DEPDIR)/testDoubleAsin-testDoubleAsin.Tpo -c -o testDoubleAsin-testDoubleAsin.o `test -f 'testDoubleAsin.c' || echo '$(srcdir)/'`testDoubleAsin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAsin-testDoubleAsin.Tpo $(DEPDIR)/testDoubleAsin-testDoubleAsin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAsin.c' object='testDoubleAsin-testDoubleAsin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsin_CFLAGS) $(CFLAGS) -c -o testDoubleAsin-testDoubleAsin.o `test -f 'testDoubleAsin.c' || echo '$(srcdir)/'`testDoubleAsin.c + +testDoubleAsin-testDoubleAsin.obj: testDoubleAsin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsin_CFLAGS) $(CFLAGS) -MT testDoubleAsin-testDoubleAsin.obj -MD -MP -MF $(DEPDIR)/testDoubleAsin-testDoubleAsin.Tpo -c -o testDoubleAsin-testDoubleAsin.obj `if test -f 'testDoubleAsin.c'; then $(CYGPATH_W) 'testDoubleAsin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAsin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAsin-testDoubleAsin.Tpo $(DEPDIR)/testDoubleAsin-testDoubleAsin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAsin.c' object='testDoubleAsin-testDoubleAsin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsin_CFLAGS) $(CFLAGS) -c -o testDoubleAsin-testDoubleAsin.obj `if test -f 'testDoubleAsin.c'; then $(CYGPATH_W) 'testDoubleAsin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAsin.c'; fi` + +testFloatAsin-testFloatAsin.o: testFloatAsin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsin_CFLAGS) $(CFLAGS) -MT testFloatAsin-testFloatAsin.o -MD -MP -MF $(DEPDIR)/testFloatAsin-testFloatAsin.Tpo -c -o testFloatAsin-testFloatAsin.o `test -f 'testFloatAsin.c' || echo '$(srcdir)/'`testFloatAsin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAsin-testFloatAsin.Tpo $(DEPDIR)/testFloatAsin-testFloatAsin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAsin.c' object='testFloatAsin-testFloatAsin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsin_CFLAGS) $(CFLAGS) -c -o testFloatAsin-testFloatAsin.o `test -f 'testFloatAsin.c' || echo '$(srcdir)/'`testFloatAsin.c + +testFloatAsin-testFloatAsin.obj: testFloatAsin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsin_CFLAGS) $(CFLAGS) -MT testFloatAsin-testFloatAsin.obj -MD -MP -MF $(DEPDIR)/testFloatAsin-testFloatAsin.Tpo -c -o testFloatAsin-testFloatAsin.obj `if test -f 'testFloatAsin.c'; then $(CYGPATH_W) 'testFloatAsin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAsin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAsin-testFloatAsin.Tpo $(DEPDIR)/testFloatAsin-testFloatAsin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAsin.c' object='testFloatAsin-testFloatAsin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsin_CFLAGS) $(CFLAGS) -c -o testFloatAsin-testFloatAsin.obj `if test -f 'testFloatAsin.c'; then $(CYGPATH_W) 'testFloatAsin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAsin.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/asin/casina.c b/2.3-1/src/c/elementaryFunctions/asin/casina.c new file mode 100644 index 00000000..9433290e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/casina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asin.h" + +void casina(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = casins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/casins.c b/2.3-1/src/c/elementaryFunctions/asin/casins.c new file mode 100644 index 00000000..35a4a8d8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/casins.c @@ -0,0 +1,146 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + * REFERENCE + * This is a Fortran-77 translation of an algorithm by + * T.E. Hull, T. F. Fairgrieve and P.T.P. Tang which + * appears in their article : + * "Implementing the Complex Arcsine and Arccosine + * Functions Using Exception Handling", ACM, TOMS, + * Vol 23, No. 3, Sept 1997, p. 299-335 + * Thanks to Tom Fairgrieve + */ + +#include "lapack.h" +#include "asin.h" +#include "atan.h" +#include "sqrt.h" +#include "abs.h" +#include "log.h" +#include "log1p.h" +#include "min.h" +#include "max.h" + +floatComplex casins(floatComplex z) { + static float sdblPi_2 = 1.5707963267948966192313216f; + static float sdblLn2 = 0.6931471805599453094172321f; + static float sdblAcross = 1.5f; + static float sdblBcross = 0.6417f; + + float dblLsup = ssqrts((float) getOverflowThreshold())/ 8.0f; + float dblLinf = 4.0f * ssqrts((float) getUnderflowThreshold()); + float dblEpsm = ssqrts((float) getRelativeMachinePrecision()); + + float _dblReal = creals(z); + float _dblImg = cimags(z); + + float dblAbsReal = sabss(_dblReal); + float dblAbsImg = sabss(_dblImg); + float iSignReal = _dblReal < 0 ? -1.0f : 1.0f; + float iSignImg = _dblImg < 0 ? -1.0f : 1.0f; + + float dblR = 0, dblS = 0, dblA = 0, dblB = 0; + + float dblTemp = 0; + + float _pdblReal = 0; + float _pdblImg = 0; + + if( min(dblAbsReal, dblAbsImg) > dblLinf && max(dblAbsReal, dblAbsImg) <= dblLsup) + { + /* we are in the safe region */ + dblR = ssqrts( (dblAbsReal + 1) * (dblAbsReal + 1) + dblAbsImg * dblAbsImg); + dblS = ssqrts( (dblAbsReal - 1) * (dblAbsReal - 1) + dblAbsImg * dblAbsImg); + dblA = (float) 0.5 * ( dblR + dblS ); + dblB = dblAbsReal / dblA; + + + /* compute the real part */ + if(dblB <= sdblBcross) + _pdblReal = sasins(dblB); + else if( dblAbsReal <= 1) + _pdblReal = satans(dblAbsReal / ssqrts( 0.5f * (dblA + dblAbsReal) * ( (dblAbsImg * dblAbsImg) / (dblR + (dblAbsReal + 1)) + (dblS + (1 - dblAbsReal))))); + else + _pdblReal = satans(dblAbsReal / (dblAbsImg * ssqrts( 0.5f * ((dblA + dblAbsReal) / (dblR + (dblAbsReal + 1)) + (dblA + dblAbsReal) / (dblS + (dblAbsReal-1)))))); + + /* compute the imaginary part */ + if(dblA <= sdblAcross) + { + float dblImg1 = 0; + + if(dblAbsReal < 1) + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(y**2)/(S+(1.d0-x))) */ + dblImg1 = 0.5f * (dblAbsImg * dblAbsImg / (dblR + (dblAbsReal + 1)) + dblAbsImg * dblAbsImg / (dblS + (1 - dblAbsReal))); + else + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(S+(x-1.d0))) */ + dblImg1 = 0.5f * (dblAbsImg * dblAbsImg / (dblR + (dblAbsReal + 1)) + (dblS + (dblAbsReal - 1))); + /* ai = logp1(Am1 + sqrt(Am1*(A+1.d0))) */ + dblTemp = dblImg1 + ssqrts(dblImg1 * (dblA + 1)); + _pdblImg = slog1ps(dblTemp); + } + else + /* ai = log(A + sqrt(A**2 - 1.d0)) */ + _pdblImg = slogs(dblA + ssqrts(dblA * dblA - (float) 1.0)); + } + else + { + /* evaluation in the special regions ... */ + if(dblAbsImg <= dblEpsm * dabss(dblAbsReal - 1)) + { + if(dblAbsReal < 1) + { + _pdblReal = sasins(dblAbsReal); + _pdblImg = dblAbsImg / ssqrts((1 + dblAbsReal) * (1 - dblAbsReal)); + } + else + { + _pdblReal = sdblPi_2; + if(dblAbsReal <= dblLsup) + { + dblTemp = (dblAbsReal - 1) + ssqrts((dblAbsReal - 1) * (dblAbsReal + 1)); + _pdblImg = slog1ps(dblTemp); + } + else + _pdblImg = sdblLn2 + slogs(dblAbsReal); + } + } + else if(dblAbsImg < dblLinf) + { + _pdblReal = sdblPi_2 - ssqrts(dblAbsImg); + _pdblImg = ssqrts(dblAbsImg); + } + else if((dblEpsm * dblAbsImg - 1 >= dblAbsReal)) + { + _pdblReal = dblAbsReal * dblAbsImg; + _pdblImg = sdblLn2 + slogs(dblAbsReal); + } + else if(dblAbsReal > 1) + { + _pdblReal = satans(dblAbsReal / dblAbsImg); + dblTemp = (dblAbsReal / dblAbsImg) * (dblAbsReal / dblAbsImg); + _pdblImg = sdblLn2 + slogs(dblAbsReal) + 0.5f * slog1ps(dblTemp); + } + else + { + float dblTemp2 = ssqrts(1 + dblAbsImg * dblAbsImg); + _pdblReal = dblAbsReal / dblTemp2; + dblTemp = 2.0f * dblAbsImg * (dblAbsImg + dblTemp2); + _pdblImg = 0.5f * slog1ps(dblTemp); + } + } + _pdblReal *= iSignReal; + _pdblImg *= iSignImg; + + return (FloatComplex(_pdblReal, _pdblImg)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/dasina.c b/2.3-1/src/c/elementaryFunctions/asin/dasina.c new file mode 100644 index 00000000..beb38d42 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/dasina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asin.h" + +void dasina(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dasins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/dasins.c b/2.3-1/src/c/elementaryFunctions/asin/dasins.c new file mode 100644 index 00000000..08e524b3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/dasins.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "asin.h" + +double dasins(double x) { + return (asin(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/sasina.c b/2.3-1/src/c/elementaryFunctions/asin/sasina.c new file mode 100644 index 00000000..d6e76ba3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/sasina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asin.h" + +void sasina(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sasins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/sasins.c b/2.3-1/src/c/elementaryFunctions/asin/sasins.c new file mode 100644 index 00000000..63967c27 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/sasins.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "asin.h" + +float sasins(float x) { + return (asinf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/testAsin.h b/2.3-1/src/c/elementaryFunctions/asin/testAsin.h new file mode 100644 index 00000000..ede65bfc --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/testAsin.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTASIN_H_ +#define _TESTASIN_H_ + +#include +#include +#include +#include "asin.h" +#include "constant.h" + + +void sasinsTest(void); + +void dasinsTest(void); + +void casinsTest(void); + +void zasinsTest(void); + +void sasinaTest(void); + +void dasinaTest(void); + +void casinaTest(void); + +void zasinaTest(void); + +int testAsin(void); + +#endif /* ! _TESTASIN_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/asin/testDoubleAsin.c b/2.3-1/src/c/elementaryFunctions/asin/testDoubleAsin.c new file mode 100644 index 00000000..58149a42 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/testDoubleAsin.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAsin.h" + +#define SOURCE {0.9356911443173885345459,0.5202743173576891422272,0.8356943717226386070251,\ +0.1390841729007661342621,0.1484344247728586196899,0.5062630889005959033966,\ +0.6569615425541996955872,0.1527653667144477367401,0.2077333852648735046387,\ +0.1310311132110655307770,0.2355898572131991386414,0.9000837444327771663666,\ +0.0360118653625249862671,0.4438733388669788837433,0.2795370602980256080627,\ +0.3609029497019946575165,0.0737524814903736114502,0.8877843604423105716705,\ +0.7357059037312865257263,0.1533541432581841945648,0.2168745566159486770630,\ +0.7783402544446289539337,0.6990017639473080635071,0.6133037763647735118866,\ +0.1271589249372482299805,0.3196897902525961399078,0.2413121340796351432800,\ +0.0203057392500340938568,0.8844696115702390670776,0.7514050160534679889679,\ +0.8791579911485314369202,0.3137878845445811748505,0.4495223872363567352295,\ +0.7199412197805941104889,0.8987670382484793663025,0.1432229257188737392426,\ +0.9059501979500055313110,0.4684562650509178638458,0.2573188217356801033020,\ +0.5960337105207145214081,0.9504154697060585021973,0.9387393021024763584137,\ +0.2791117234155535697937,0.4469828694127500057220,0.5995192881673574447632,\ +0.3789988537319004535675,0.8654018277302384376526,0.2727968390099704265594,\ +0.5822574533522129058838,0.5512602762319147586823,0.4366636639460921287537,\ +0.2757742605172097682953,0.3867734093219041824341,0.1321225953288376331329,\ +0.3260228233411908149719,0.1601287531666457653046,0.4301580488681793212891,\ +0.4006247171200811862946,0.8426104513928294181824,0.9048160626552999019623,\ +0.320046393200755119324,0.8069710140116512775421,0.7235896149650216102600,\ +0.7765955845825374126434,0.6767611466348171234131,0.5158662856556475162506,\ +0.1936035444959998130798,0.4270762628875672817230,0.4847531262785196304321,\ +0.5182100948877632617950,0.3503957511857151985168,0.4174968632869422435760,\ +0.442088566720485687256,0.4049004786647856235504,0.0953520191833376884460,\ +0.0149906217120587825775,0.2767332997173070907593,0.396497034002095460892,\ +0.3277142727747559547424,0.6040842677466571331024,0.4983838088810443878174,\ +0.7224933789111673831940,0.6212163185700774192810,0.5571814230643212795258,\ +0.5545951593667268753052,0.9439489883370697498322,0.1018914626911282539368,\ +0.9077803748659789562225,0.8599558025598526000977,0.3132304050959646701813,\ +0.7458020029589533805847,0.6701762243174016475677,0.6670592557638883590698,\ +0.7646118258126080036163,0.8154405960813164710999,0.1493974099867045879364,\ +0.2480226568877696990967,0.6294850618578493595123,0.6535534998401999473572,\ +0.0851266062818467617035,0.3553021941334009170532,0.6699288752861320972443,\ +0.5531356902793049812317,0.9733559968881309032440,0.4305554106831550598145,\ +0.5243876897729933261871,0.9223478538915514945984,0.4095269232057034969330,\ +0.5303003843873739242554,0.1592096765525639057159,0.4631052548065781593323,\ +0.7969039077870547771454,0.4371217824518680572510,0.4197942153550684452057,\ +0.5820884769782423973083,0.2639330527745187282562,0.9251737911254167556763,\ +0.2750987303443253040314,0.7529260413721203804016,0.1343348133377730846405,\ +0.6487299203872680664062,0.8492549010552465915680,0.0482988981530070304871,\ +0.7936811461113393306732,0.6225296836346387863159,0.8340442483313381671906,\ +0.5607167938724160194397,0.2962070326320827007294,0.7626721523702144622803,\ +0.3759830952621996402740,0.9307165136560797691345,0.5556063777767121791840,\ +0.4568063858896493911743,0.0317669031210243701935,0.7012319983914494514465,\ +0.4635622831992805004120,0.6323687359690666198730,0.8858239823020994663239,\ +0.7168863369151949882507,0.7797616957686841487885,0.2916170265525579452515,\ +0.4237285782583057880402,0.28695563320070505142,0.1371444310061633586884,\ +0.9822116084396839141846,0.2552233324386179447174,0.3307547485455870628357,\ +0.0061365715228021144867,0.1720932889729738235474,0.2806011182256042957306,\ +0.2241949187591671943665,0.9616182404570281505585,0.9974081367254257202148,\ +0.3941962518729269504547,0.5662632463499903678894,0.0963757499121129512787,\ +0.3522291611880064010620,0.3187350784428417682648,0.5841740677133202552795,\ +0.9247881243936717510223,0.7888248674571514129639,0.6642959327436983585358,\ +0.3959421953186392784119,0.6204979992471635341644,0.1972246859222650527954,\ +0.8056284752674400806427,0.8491280348971486091614,0.9318168940953910350800,\ +0.7328312769532203674316,0.6715824031271040439606,0.1545045776292681694031,\ +0.6186148612760007381439,0.9608297105878591537476,0.0403955359943211078644,\ +0.0333962673321366310120,0.7544445092789828777313,0.6861435212194919586182,\ +0.4345912770368158817291,0.5974397426471114158630,0.7376494011841714382172,\ +0.4376876372843980789185,0.2092354488559067249298,0.6795164542272686958313,\ +0.3552068280987441539764,0.0756681859493255615234,0.9273025044240057468414,\ +0.8346071569249033927917,0.743054957594722509384,0.4906791727989912033081,\ +0.6159011130221188068390,0.7293182769790291786194,0.5866543571464717388153,\ +0.8633460365235805511475,0.9971091211773455142975,0.1388301542028784751892,\ +0.4055338925682008266449,0.4532660786062479019165,0.2871678886003792285919,\ +0.2700171591714024543762,0.2655710014514625072479} + + +#define RESULT {1.2102129173972693276795,0.547172134283395505960,0.9893959167427971435060,\ +0.1395365387198562734383,0.1489849714320161666592,0.5308459929384929942842,\ +0.7167814580056727224999,0.1533658822581816516539,0.2092572247647190852859,\ +0.1314089889300391889027,0.2378254645317898763324,1.1199616760260284742401,\ +0.0360196535997655206685,0.4599165600749937077296,0.2833119142414158297960,\ +0.3692359156088362848180,0.0738195075749003143395,1.0925087004242901578266,\ +0.8267083221396219760990,0.1539616791242165161346,0.2186116813912043488344,\ +0.8920178989455170848188,0.7740006423727355810982,0.6602366372124121030041,\ +0.1275041230444604323235,0.3254020787470935927033,0.2437177159295554063068,\ +0.0203071349297229801489,1.0853560691206285415689,0.8501888295310906507041,\ +1.0740923528156336441697,0.3191797921431215878663,0.4662305874507110536875,\ +0.8037176217662085342397,1.1169491151572188414320,0.1437171522303946902266,\ +1.13361865210398771175,0.4875426458125770023955,0.2602465647055824948808,\ +0.6385524103330081358010,1.2545691699775671779093,1.2189537472935179085454,\ +0.2828689457902803794376,0.4633896660240007236986,0.6429003543060739511716,\ +0.3887142006801726501486,1.0459517428704359076619,0.2762989388590115780175,\ +0.6215026189895035413358,0.5838740042814533071081,0.4518867349636846997285,\ +0.2793951051102595561915,0.3971301217078890832823,0.132510043706192570667,\ +0.3320934649289025153429,0.1608210878711773539340,0.4446678438400747945813,\ +0.4121985697961437211667,1.0021124190562762379386,1.1309475449498487265032,\ +0.3257784557613874198978,0.9390052579549887923349,0.8089888457708835911575,\ +0.8892438326422247296676,0.7433542835357417333242,0.5420185672225497075516,\ +0.1948338635337260038582,0.4412568471414960447063,0.5060808916267004464729,\ +0.5447567844134539871703,0.3579936097184594490095,0.430688870641149468277,\ +0.4579258061456900619213,0.4168699854700866902490,0.0954971037836137986998,\ +0.0149911832144437959929,0.2803929768115001053275,0.4076979699824179737000,\ +0.3338832266123987202455,0.6486162776185823153341,0.5217335620683097863193,\ +0.8074019476106287784845,0.6702938912826584827442,0.5909876416606805182852,\ +0.5878763702657983092337,1.2343959660274554934745,0.1020685954711661458383,\ +1.1379615773910940479396,1.0351830670880448614923,0.3185927153117306676045,\ +0.8417379366997205236700,0.7344461964462585257252,0.7302544939241956134524,\ +0.8704388193816158247884,0.9534899570984974870314,0.1499588151786827583400,\ +0.2506386006706501912156,0.6808903181988129604818,0.7122699052095804450602,\ +0.0852297552133160912780,0.3632373356223638216633,0.7341129828114539845885,\ +0.5861234773434839118167,1.3394387326603169885431,0.4451080564403126493822,\ +0.5519958405399131295965,1.1741139184516546922765,0.4219354466987135787726,\ +0.5589548324277814339567,0.1598900667546140630382,0.4814956074594635149211,\ +0.9221526721268241688634,0.4523960307711298312050,0.4332185780481620507310,\ +0.6212947925772885904294,0.2670975836918499934924,1.1814932336008394653248,\ +0.2786923935221553016994,0.8524970032637724237645,0.1347421608080361932203,\ +0.7059143267628599227592,1.014572470500166190277,0.0483176963724658639632,\ +0.9168365263416731192336,0.6719709888964939814571,0.9863981265157644173769,\ +0.5952512315907774187451,0.3007190162077965633891,0.8674345484889434132469,\ +0.3854574865641427483531,1.1963670583888645904125,0.5890920941092092633085,\ +0.4744017948433008613485,0.0317722484037002914081,0.7771241013419247778415,\ +0.4820113338532510671719,0.6846071548899330672100,1.0882667543007658040,\ +0.7993259845681112141236,0.8942850957473000850229,0.2959169071935129347040,\ +0.4375577621669283212569,0.2910472961271438063768,0.1375780266978623433971,\ +1.3818975127290542559422,0.2580786782411462754183,0.337103224922307598277,\ +0.0061366100381220973006,0.1729542689024595181202,0.2844203312567258890020,\ +0.2261168471284604464255,1.292840105239649206581,1.4987826659389660299837,\ +0.4051931219540680362279,0.6019650966008720516243,0.0965255712145899474885,\ +0.3599518411886321600512,0.3243946620517429990649,0.6238620609478121581404,\ +1.1804783562721565814968,0.9088946724537740884386,0.7265514890656400437408,\ +0.407093673069975237055,0.6693775784027574671242,0.1985261923397042549411,\ +0.9367355633059043507060,1.0143322323911900806337,1.199387299048776833743,\ +0.8224738107516712526390,0.7363424248289601736772,0.1551259899908567496674,\ +0.6669785285495629656438,1.289980681935538386895,0.0404065303042144760570,\ +0.0334024783187645626925,0.8548073921139841546690,0.7561744594372630245971,\ +0.4495844069894625594230,0.6403046132494145670222,0.8295822852568314198507,\ +0.4530252724246893181181,0.2107930369382310653581,0.747103346555288094777,\ +0.3631353147252046054128,0.0757405812005388645591,1.1871407475057926816930,\ +0.9874192358186812956689,0.8376237455287295352591,0.5128690395827339987278,\ +0.6635292564994419439728,0.8173250039556049229006,0.6269213761078136215588,\ +1.0418634321911146578543,1.4947401270369859993536,0.1392800314888206769659,\ +0.4175628314057308609897,0.4704260294397792363519,0.29126887742414786509,\ +0.2734108525510542397896,0.2687961431094310627010} + + +#define RSOURCE {0.0100881215184926986694,0.0074436445720493793488,0.2989360922947525978088,\ +0.3327573235146701335907,0.237830940634012222290,0.8535961345769464969635,\ +0.7922197943553328514099,0.9695409736596047878265,0.6468791384249925613403,\ +0.9159972262568771839142,0.7485287981107831001282,0.5446169781498610973358,\ +0.4380150139331817626953,0.8022991069592535495758,0.0770919052883982658386,\ +0.6038356139324605464935,0.0416274946182966232300,0.0491319303400814533234,\ +0.2167323390021920204163,0.5511633078567683696747,0.5648556910455226898193,\ +0.7904387773014605045319,0.8203159859403967857361,0.8707285351119935512543,\ +0.7680293265730142593384,0.9941699919290840625763,0.7653715135529637336731,\ +0.7766020926646888256073,0.0391560420393943786621,0.3610868924297392368317,\ +0.7096323622390627861023,0.1340617476962506771088,0.3352055754512548446655,\ +0.4794248570688068866730,0.9102506125345826148987,0.9960912610404193401337,\ +0.5589408166706562042236,0.3291657851077616214752,0.5254327272996306419373,\ +0.5988637856207787990570,0.3400457371026277542114,0.7296699327416718006134,\ +0.1172471689060330390930,0.1599596398882567882538,0.6893001943826675415039,\ +0.8244171240366995334625,0.5743538914248347282410,0.3230684562586247920990,\ +0.4945516120642423629761,0.1966073368676006793976,0.1734057078137993812561,\ +0.5929257045499980449677,0.3272335343062877655029,0.7093706638552248477936,\ +0.9978715321049094200134,0.6042335904203355312347,0.5281810555607080459595,\ +0.6643366483040153980255,0.4330314965918660163879,0.5683163288049399852753,\ +0.0414931252598762512207,0.3723129951395094394684,0.9558939440175890922546,\ +0.7412597923539578914642,0.9651917275041341781616,0.7298236568458378314972,\ +0.9387842947617173194885,0.2572855348698794841766,0.2874279357492923736572,\ +0.8952562944032251834869,0.6853557890281081199646,0.1711091897450387477875,\ +0.7769848424941301345825,0.658369113225489854813,0.4177721040323376655579,\ +0.0530332433991134166718,0.4968273639678955078125,0.59690707409754395485,\ +0.4338118461892008781433,0.9805241837166249752045,0.9094489198178052902222,\ +0.6140774791128933429718,0.152644918300211429596,0.2700240234844386577606,\ +0.0427649877965450286865,0.9506349326111376285553,0.2680307617411017417908,\ +0.7927461988292634487152,0.6853035334497690200806,0.2653256771154701709747,\ +0.7276884736493229866028,0.2182058426551520824432,0.0794423148036003112793,\ +0.8774413042701780796051,0.7575887991115450859070,0.0292344330810010433197,\ +0.0814430620521306991577,0.7652318407781422138214,0.6499179983511567115784,\ +0.652228816878050565720,0.2570325322449207305908,0.4139282093383371829987,\ +0.5334635889157652854919,0.5463846079073846340179,0.8812804389744997024536,\ +0.1071240645833313465118,0.8451719628646969795227,0.5956639605574309825897,\ +0.3115242570638656616211,0.7552670040167868137360,0.7216278789564967155457,\ +0.64724771818146109581,0.7020909022539854049683,0.8550091539509594440460,\ +0.0292058298364281654358,0.5402219365350902080536,0.5295652858912944793701,\ +0.6731671304441988468170,0.2516432842239737510681,0.4682487822137773036957,\ +0.8973557446151971817017,0.2490413752384483814240,0.953785804100334644318,\ +0.0199718060903251171112,0.0883063450455665588379,0.3088448666967451572418,\ +0.0402540368959307670593,0.7409055917523801326752,0.3341060634702444076538,\ +0.6859912057407200336456,0.5277825826779007911682,0.5605597789399325847626,\ +0.2702448405325412750244,0.3409920767880976200104,0.0499807363376021385193,\ +0.9285474619828164577484,0.0452665109187364578247,0.5747140836901962757111,\ +0.8132651047781109809875,0.0034279632382094860077,0.5530686080455780029297,\ +0.5287449606694281101227,0.2227140991017222404480,0.7380339815281331539154,\ +0.7569990437477827072144,0.5666191582567989826202,0.8965943017974495887756,\ +0.205033115576952695847,0.5744996629655361175537,0.6296528042294085025787,\ +0.28830870892852544785,0.0064737624488770961761,0.2910466734319925308228,\ +0.161138039547950029373,0.6345168473199009895325,0.1110653909854590892792,\ +0.9721379503607749938965,0.6926467292942106723785,0.4481767667457461357117,\ +0.9629431902430951595306,0.8420772161334753036499,0.6861935486085712909698,\ +0.2752589071169495582581,0.2056670929305255413055,0.0983050949871540069580,\ +0.7260084436275064945221,0.9338818406686186790466,0.8652051738463342189789,\ +0.1300270427018404006958,0.6536684674210846424103,0.9546198891475796699524,\ +0.3356514233164489269257,0.6098881512880325317383,0.7403389909304678440094,\ +0.4407326159998774528503,0.0114278956316411495209,0.4274448286741971969604,\ +0.4898742889054119586945,0.0670661935582756996155,0.9097212324850261211395,\ +0.9331833533942699432373,0.1665275008417665958405,0.4363766452297568321228,\ +0.1269035614095628261566,0.4618353042751550674438,0.6410199669189751148224,\ +0.5118249626830220222473,0.4726877692155539989471,0.6037398651242256164551,\ +0.6487199389375746250153,0.3443940980359911918640,0.1257671504281461238861,\ +0.1930030044168233871460,0.0536806662566959857941,0.813977831043303012848,\ +0.6546894307248294353485,0.4812035299837589263916,0.2122878567315638065338,\ +0.6028915112838149070740,0.2477151653729379177094} + +#define ISOURCE {0.4653960186988115310669,0.0302665126509964466095,0.1205546753481030464172,\ +0.4954105126671493053436,0.8391606211662292480469,0.8067971416749060153961,\ +0.5980955390259623527527,0.5697243823669850826263,0.535449741408228874207,\ +0.4594913427717983722687,0.0716273644939064979553,0.1432999591343104839325,\ +0.3299815915524959564209,0.2239767671562731266022,0.4729467025026679039001,\ +0.8927706009708344936371,0.4739306215196847915649,0.4218414542265236377716,\ +0.5464035095646977424622,0.9297901126556098461151,0.8246648237109184265137,\ +0.3906875425018370151520,0.8106931401416659355164,0.0035473941825330257416,\ +0.4432799126952886581421,0.1700443555600941181183,0.2843202138319611549377,\ +0.8185154641978442668915,0.1276803798973560333252,0.0368908629752695560455,\ +0.1934843575581908226013,0.3111848584376275539398,0.8499574232846498489380,\ +0.4845375162549316883087,0.3811378227546811103821,0.2295314031653106212616,\ +0.5668137520551681518555,0.7386174597777426242828,0.6359649775549769401550,\ +0.8589683636091649532318,0.3717852663248777389526,0.4039371167309582233429,\ +0.6600336739793419837952,0.2385329673998057842255,0.4580096118152141571045,\ +0.3359361500479280948639,0.8938684901222586631775,0.7110573030076920986176,\ +0.8602916095405817031860,0.3305067983455955982208,0.9176958473399281501770,\ +0.15107359318062663078,0.4452155604958534240723,0.7259225868619978427887,\ +0.6476110024377703666687,0.7142038433812558650970,0.1180544253438711166382,\ +0.5106264133937656879425,0.0454169148579239845276,0.4517838652245700359344,\ +0.7152258791029453277588,0.0306280092336237430573,0.5608849888667464256287,\ +0.6344716749154031276703,0.5510452408343553543091,0.8902607751078903675079,\ +0.0251876907423138618469,0.1285902666859328746796,0.0875252783298492431641,\ +0.1400479921139776706696,0.2142530409619212150574,0.6689547612331807613373,\ +0.6959728877991437911987,0.3454284076578915119171,0.8007909813895821571350,\ +0.3719339291565120220184,0.9791326485574245452881,0.6300911963917315006256,\ +0.9137416174635291099548,0.3324960893951356410980,0.6226272527128458023071,\ +0.2876702961511909961700,0.0238953353837132453918,0.6489893826656043529510,\ +0.2444448098540306091309,0.0555481188930571079254,0.374434794299304485321,\ +0.7194064198993146419525,0.2112230267375707626343,0.6445186366327106952667,\ +0.6751487934961915016174,0.1528833056800067424774,0.8900802619755268096924,\ +0.6180598423816263675690,0.27906801458448171616,0.1401830366812646389008,\ +0.3047434557229280471802,0.2149655860848724842072,0.5602726386860013008118,\ +0.6269132751040160655975,0.6647229343652725219727,0.2090867855586111545563,\ +0.7116218386217951774597,0.133228497114032506943,0.7362840902060270309448,\ +0.3999320124275982379913,0.6811551460996270179749,0.5637665162794291973114,\ +0.523965936154127120972,0.8278774530626833438873,0.4659156939014792442322,\ +0.8515693820081651210785,0.23139653541147708893,0.3077362445183098316193,\ +0.4819453330710530281067,0.7797386529855430126190,0.9701553061604499816895,\ +0.3744371854700148105621,0.2292016251012682914734,0.8245750456117093563080,\ +0.1854322012513875961304,0.2345628221519291400909,0.9701467091217637062073,\ +0.3639524574391543865204,0.2672337628901004791260,0.8174969092942774295807,\ +0.6407580440863966941833,0.0946763656102120876312,0.3158860523253679275513,\ +0.5199312460608780384064,0.7127110259607434272766,0.0025766002945601940155,\ +0.5305844545364379882812,0.7374818869866430759430,0.2254834799095988273621,\ +0.7290844931267201900482,0.1897403579205274581909,0.7771647279150784015656,\ +0.7071320274844765663147,0.67804440064355731010,0.6918747089803218841553,\ +0.2444804669357836246490,0.2024903288111090660095,0.7065096027217805385590,\ +0.6258084420114755630493,0.4988589403219521045685,0.1275391997769474983215,\ +0.7432725760154426097870,0.3388997837901115417480,0.2712128334678709506989,\ +0.1686986042186617851257,0.1788796423934400081635,0.9720784332603216171265,\ +0.0373507668264210224152,0.9457915211096405982971,0.3708799923770129680634,\ +0.4304266162216663360596,0.2409997568465769290924,0.6574296867474913597107,\ +0.1080590835772454738617,0.2580570150166749954224,0.9601870519109070301056,\ +0.4275712119415402412415,0.3774064141325652599335,0.8860375732183456420898,\ +0.1107313432730734348297,0.572000074200332164764,0.2775676711462438106537,\ +0.2221131753176450729370,0.7805933509953320026398,0.5034774849191308021545,\ +0.4225312541238963603973,0.0509742014110088348389,0.7888357848860323429108,\ +0.4943151315674185752869,0.6792991734109818935394,0.2138219568878412246704,\ +0.0629426804371178150177,0.0151202948763966560364,0.5832923236303031444550,\ +0.0359809771180152893066,0.9282481097616255283356,0.8684628410264849662781,\ +0.2752401321195065975189,0.9713082071393728256226,0.90322426753118634224,\ +0.8362140888348221778870,0.3033045823685824871063,0.9321490563452243804932,\ +0.0943789319135248661041,0.0593075519427657127380,0.1341886124573647975922,\ +0.2735903281718492507935,0.7845123005099594593048,0.868671556003391742706,\ +0.7169788884930312633514,0.9007600247859954833984,0.3080832012929022312164,\ +0.2860837308689951896667,0.9434729530476033687592} + +#define RRESULT {0.0091461935615653692372,0.0074403059517685150512,0.3011120408510194468299,\ +0.2998770814044370847107,0.1819248875927510500361,0.6444988336836313669309,\ +0.6791245188293772994115,0.8328839139359748289237,0.5765876696591275551995,\ +0.8504976129204943058326,0.8394277222457392495514,0.5667892427465585081237,\ +0.4244768273740840425212,0.8613255288489666261498,0.0697161665763657567574,\ +0.4438565921449716400460,0.0376207427201287192275,0.0452773943778729953680,\ +0.1905350234324321712087,0.3984765801447008870539,0.4314770699424559374791,\ +0.7678818181682768306828,0.6201489749119961647494,1.056635799167679801158,\ +0.7224469139675204765183,1.1570753191068809950792,0.7891360295709419769850,\ +0.5869418614770346431797,0.0388500272557359208059,0.3691306128445250300807,\ +0.7557159781600413239744,0.1282646090865436350192,0.254601106881209460209,\ +0.4365177363889400918850,0.8917468285467748945194,1.0969945987775304718781,\ +0.4896234023783549438313,0.2644825052430134770809,0.4440381533885026654751,\ +0.4483584089258232929787,0.3221387984110837821028,0.7011289310321348056121,\ +0.0978674265602834936306,0.1561241830600058055900,0.6415261435351872210120,\ +0.8301262834168886550756,0.4226589438886647065452,0.2631688682703156034748,\ +0.3718501469694869832061,0.1874416812787549069252,0.1276292125120765952317,\ +0.6223362931435947320580,0.3011173751873987280980,0.5675795050042053979666,\ +0.8129219748246857557561,0.4890104311779664980619,0.550584097940126637738,\ +0.6003329153401916196131,0.4472450285127820834852,0.5277749449162034700578,\ +0.0337492295725758256753,0.3812817338877603767777,0.8272241071562403957884,\ +0.6236783490132045137955,0.8396686488386544411355,0.5323480108875771055210,\ +1.2121602671977980136830,0.2578891950501832064369,0.2902963532926625123132,\ +1.0407218420407280401463,0.719658282922589376263,0.1422515549798589185038,\ +0.6295643770268913863575,0.6485925881357603728361,0.3247882629711342783452,\ +0.0497195040545942226751,0.3510527044460081680377,0.50563338590045081578,\ +0.3179706585678286345775,0.99285160840273078975,0.7609503370287584722576,\ +0.6176058717047394619470,0.1531988771495936818567,0.2266760787365090790146,\ +0.0415517947772082799074,1.218422457974889017152,0.2526690822330791563743,\ +0.6329425814457148025127,0.7204713317072120037921,0.2231989518352319179506,\ +0.5985707095895493878857,0.2172853881448477131322,0.0593293879714889560439,\ +0.7385713745542424879531,0.7823911147317434977566,0.0289551632441432602039,\ +0.0779646258693818400287,0.8182888473500083970080,0.5715052817983971022997,\ +0.5528641949610285655226,0.2141542425335012378440,0.4153673917132313930800,\ +0.4332354240667932732123,0.5700436227902923036481,0.6908832900189864067997,\ +0.0995605703740609776498,0.6869435543144543077076,0.5227653368830831315250,\ +0.2770997202417057603263,0.5689013982218961151816,0.6692632096949825415422,\ +0.4851064406738322953849,0.7345650510869129456992,0.8789819041715580816287,\ +0.0263110479671970418081,0.4230828882691921033476,0.3752940809060429927513,\ +0.6545085349432201438091,0.2474097208124308444610,0.3590569749582296354973,\ +1.0107395629243736134839,0.2444967346619240644578,0.6498559643022308041083,\ +0.0187681811419864209844,0.0853955435810109381167,0.23858632896482903640,\ +0.0338939736966144267161,0.8239189153398052134492,0.3225505736889286989566,\ +0.6168540121263207387514,0.428433060998039016987,0.5950583374560662885955,\ +0.2394573971728722883157,0.2741095497000874958715,0.0487731652979911251000,\ +0.7269475532699710695894,0.0444861838193508288275,0.4501104783981072499088,\ +0.6528448282940336744318,0.0028372513246705619722,0.4536708244402919421034,\ +0.5336004611058299262893,0.2198360890060693795256,0.5959746705988369086526,\ +0.6396262340663229073456,0.5139896603726894497299,1.0518513414805021888299,\ +0.1644962891003966809489,0.5624905673203877132238,0.6391528366469793054350,\ +0.2879084713580257748333,0.0063726492100631259435,0.2079683900269996554844,\ +0.1617268596829900817458,0.45252598419205131153,0.1042540297218644135269,\ +0.9167320764408587452365,0.7202498119943631094131,0.3747568855205881677151,\ +1.1832506588357394328170,0.8926873380378329558837,0.4837753498734558843530,\ +0.2545199640454580136684,0.1931610886369621860048,0.0735568361645391743942,\ +0.7995145050294805155744,0.8044454260553820512669,0.9085111724757110041040,\ +0.1272278092834613905104,0.5090362502018392909520,0.8578711409272452570463,\ +0.3118078521746414644156,0.6543371722769727449887,0.5706133911152972970626,\ +0.3988750643962680753063,0.0094531166452282121282,0.4291477558442853834642,\ +0.5104896641888095887296,0.0671088543520260150110,0.7800123094015957159186,\ +1.1912011959193866683648,0.12192992647229736192,0.3274120948460061963914,\ +0.1225950921700365431333,0.3281975873099651774822,0.4674494885223512974370,\ +0.3894697523335833855285,0.4641231634718703258358,0.4345931392944782367671,\ +0.6995072076723701792744,0.3508640282412981981075,0.1249574421756384084992,\ +0.1870180747450552183331,0.0422329366873970546425,0.5961240984598299430530,\ +0.5279606410558730367200,0.3544288908497560397493,0.2039132017920733119798,\ +0.6057722587792238044813,0.1797611770377918194441} + +#define IRESULT {0.4500666085684790207466,0.0302627309405466352055,0.1259014236203331582598,\ +0.4977434045460411571327,0.773705242465913545225,0.887900733341152936795,\ +0.7079916425568136828517,0.7688472856787659237554,0.6017352744773040162940,\ +0.6498883599394120746950,0.107039917160296094156,0.1690548918257823163280,\ +0.3546374548515999203246,0.3373847934787007063484,0.4579255569364570899182,\ +0.8732609696455944092719,0.4580771972571195393975,0.4106361461893539566148,\ +0.5311452992294272146268,0.8876026166669700456779,0.8147068623051754165942,\ +0.5194139247849689500214,0.8786785088163897583513,0.0072129604104987166471,\ +0.5609976062745508640361,0.4112823226813016597170,0.3933766150232178571144,\ +0.8693290272249873940,0.1274316261040582265451,0.0395449426043308974177,\ +0.2628191746325336808354,0.3088296914886584088045,0.7926272523547727155702,\ +0.5120084435293993374572,0.5746945549365780614437,0.4839450538685827751806,\ +0.6047355489888047719305,0.7052834690539023787537,0.6561539945033735277136,\ +0.8478769656358153827824,0.3825478020514606614100,0.5066754044490697772574,\ +0.6222644111952397860676,0.2391828028480158796487,0.5443776858218749570284,\ +0.4792822085648152929949,0.86724431342169228110,0.6822409980077328572889,\ +0.8261589834748411798060,0.3303572550644504612904,0.8274965298010771297399,\ +0.1848774585857928254296,0.4507700784722463716037,0.7795271583399024928340,\ +0.8398668346264467343687,0.7396983997066739480175,0.1380866564681807739934,\ +0.5849046253180708587749,0.0503500622675033676634,0.5016357319277500170784,\ +0.6654269099346773463921,0.0329916341046517930247,0.7548317451254575871644,\ +0.7182541963203104007363,0.7522847340656214631949,0.9046859380442064946237,\ +0.0716988879790057820340,0.132599207337852937,0.0912207697238807957429,\ +0.2735698269446988906139,0.2811794411108771152286,0.6327124304403525245633,\ +0.7796338249130402298093,0.4209075105417727225010,0.7673980540361009516914,\ +0.3642835980514441684974,0.9112659650125345400795,0.6691470644846674309392,\ +0.8542200565296905745427,0.5762098993480122555155,0.7786617427494030296842,\ +0.3459141320122436358275,0.0241761593182958818560,0.6246129374546308676841,\ +0.2422787652159511528893,0.1602629717157874056355,0.3776710192863622084225,\ +0.8030895628249021811484,0.2774953901907728504028,0.6203514328186836568335,\ +0.7460670209249947726349,0.1559320495131248929255,0.8026468549051214429468,\ +0.760424886296417135156,0.3839751822834133743179,0.1397861363985309635094,\ +0.3011015740622249303726,0.3095528263794048440261,0.6246974136518177456168,\ +0.6824390801574051756972,0.6364220425441351469686,0.2265745526065163772955,\ +0.7201722295639139126422,0.1575984581645545612449,0.8494571876510255137305,\ +0.3918195908099642577049,0.7946547307771568702250,0.6117848393634578441080,\ +0.5208720859508298994811,0.8690531065973791102763,0.5637323042761468450124,\ +0.8547026638602744919027,0.306960447908322775490,0.4654093394618514789585,\ +0.4651555318578067255153,0.7751475575968125308890,0.9112674172531984861934,\ +0.4560028346615129235531,0.234251732325255618283,0.7944832243829529350165,\ +0.3423334159329023407281,0.239457736168475460170,1.02777275826487124455,\ +0.3564220429250729016424,0.2650952420467553305450,0.7646166714313819001703,\ +0.6037691171359901298743,0.1389158036998756340363,0.3271927879913820724767,\ +0.6006321860598116124663,0.7197540296752282795723,0.0031113959438069660468,\ +0.5221204081389118067946,0.7059634191281195514378,0.2238770907129097598176,\ +0.8641197102092305071253,0.1888045378279312735970,0.7812121068214791241857,\ +0.8015589685608611736356,0.6345893564856053270518,0.7088628827258813824841,\ +0.2802718253544457249760,0.2060232397943899673720,0.7740411253804675428825,\ +0.716974289181374180302,0.5454318495795067445187,0.2544009667091767235014,\ +0.6958995710025659420239,0.3906147496642403682543,0.3317958100335353655019,\ +0.1750450440110335736943,0.1779427350870727009280,0.8767597428372501111582,\ +0.0378355850756998610129,0.9174242179663641971743,0.3647620293190586560073,\ +0.6587619708007782515224,0.3153773564551797248257,0.6579511103942273786416,\ +0.2821737200327205097317,0.4005650534773762538876,0.9399862930023007434599,\ +0.4285643691635598884204,0.3756601850966035938129,0.8002497169354958472809,\ +0.1581953331446839250418,0.7519083154621302167442,0.4373149903759625534150,\ +0.2220927412218937635480,0.804348871566688328,0.7089002298114742695034,\ +0.4305150724386235805419,0.0641995146174158398678,0.8363640441971674777122,\ +0.5135521078813733986124,0.6356504507416418370269,0.2330299466993880075361,\ +0.0720777388352223102874,0.0151538267615728122067,0.7485905695903387613299,\ +0.0969510446209165821507,0.8347965442360075760675,0.8215865796515979813108,\ +0.2738845295035164384423,0.8996918043828731059719,0.8896690120740690099765,\ +0.8117683352741612567982,0.3329971294517217184072,0.9008120497468148357711,\ +0.1230347833276769775601,0.0631133065200175230602,0.1348341818397757463366,\ +0.2749675342978448178144,0.7210794354646373749418,0.9161054973709473747689,\ +0.7559186765863976642521,0.8531345425055275599746,0.3096300406745840505529,\ +0.3413400734450014462062,0.8520286730709790701255} + +void dasinsTest(void) { + double in[]= SOURCE; + double res[]= RESULT; + double out; + int i=0; + + for (i=0;i<200;i++){ + out=dasins(in[i]); + assert( ( (fabs(out-res[i])) / (fabs(out)) ) <3e-16); + } +} + +void zasinsTest(void) { + double inR[]= RSOURCE; + double inI[]= ISOURCE; + double resR[]= RRESULT; + double resI[]= IRESULT; + doubleComplex out,in; + int i=0; + + for (i=0;i<200;i++){ + in = DoubleComplex(inR[i],inI[i]); + out=zasins(in); + assert( ( (fabs(zreals(out)-resR[i])) / (fabs(zreals(out))) ) <3e-15); + assert( ( (fabs(zimags(out)-resI[i])) / (fabs(zimags(out))) ) <3e-15); + } +} + +void dasinaTest(void) { + double in[]= SOURCE; + double res[]= RESULT; + double out[200]; + int i=0; + + dasina(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <3e-16); + } +} + +void zasinaTest(void) { + double inR[]= RSOURCE; + double inI[]= ISOURCE; + double resR[]= RRESULT; + double resI[]= IRESULT; + doubleComplex out[200],*in; + int i=0; + + + in= DoubleComplexMatrix(inR,inI,200); + zasina(in,200,out); + + for (i=0;i<200;i++){ + assert( ( (fabs(zreals(out[i])-resR[i])) / (fabs(zreals(out[i]))) ) <3e-15); + assert( ( (fabs(zimags(out[i])-resI[i])) / (fabs(zimags(out[i]))) ) <3e-15); + } +} + +int testAsin(void) { + printf("\n>>>> Double ArcSine Tests\n"); + dasinsTest(); + zasinsTest(); + dasinaTest(); + zasinaTest(); + return 0; +} + +int main(void) { + assert(testAsin() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/testFloatAsin.c b/2.3-1/src/c/elementaryFunctions/asin/testFloatAsin.c new file mode 100644 index 00000000..00a630ac --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/testFloatAsin.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAsin.h" + +#define SOURCE {0.9356911443173885345459f,0.5202743173576891422272f,0.8356943717226386070251f,\ +0.1390841729007661342621f,0.1484344247728586196899f,0.5062630889005959033966f,\ +0.6569615425541996955872f,0.1527653667144477367401f,0.2077333852648735046387f,\ +0.1310311132110655307770f,0.2355898572131991386414f,0.9000837444327771663666f,\ +0.0360118653625249862671f,0.4438733388669788837433f,0.2795370602980256080627f,\ +0.3609029497019946575165f,0.0737524814903736114502f,0.8877843604423105716705f,\ +0.7357059037312865257263f,0.1533541432581841945648f,0.2168745566159486770630f,\ +0.7783402544446289539337f,0.6990017639473080635071f,0.6133037763647735118866f,\ +0.1271589249372482299805f,0.3196897902525961399078f,0.2413121340796351432800f,\ +0.0203057392500340938568f,0.8844696115702390670776f,0.7514050160534679889679f,\ +0.8791579911485314369202f,0.3137878845445811748505f,0.4495223872363567352295f,\ +0.7199412197805941104889f,0.8987670382484793663025f,0.1432229257188737392426f,\ +0.9059501979500055313110f,0.4684562650509178638458f,0.2573188217356801033020f,\ +0.5960337105207145214081f,0.9504154697060585021973f,0.9387393021024763584137f,\ +0.2791117234155535697937f,0.4469828694127500057220f,0.5995192881673574447632f,\ +0.3789988537319004535675f,0.8654018277302384376526f,0.2727968390099704265594f,\ +0.5822574533522129058838f,0.5512602762319147586823f,0.4366636639460921287537f,\ +0.2757742605172097682953f,0.3867734093219041824341f,0.1321225953288376331329f,\ +0.3260228233411908149719f,0.1601287531666457653046f,0.4301580488681793212891f,\ +0.4006247171200811862946f,0.8426104513928294181824f,0.9048160626552999019623f,\ +0.320046393200755119324f,0.8069710140116512775421f,0.7235896149650216102600f,\ +0.7765955845825374126434f,0.6767611466348171234131f,0.5158662856556475162506f,\ +0.1936035444959998130798f,0.4270762628875672817230f,0.4847531262785196304321f,\ +0.5182100948877632617950f,0.3503957511857151985168f,0.4174968632869422435760f,\ +0.442088566720485687256f,0.4049004786647856235504f,0.0953520191833376884460f,\ +0.0149906217120587825775f,0.2767332997173070907593f,0.396497034002095460892f,\ +0.3277142727747559547424f,0.6040842677466571331024f,0.4983838088810443878174f,\ +0.7224933789111673831940f,0.6212163185700774192810f,0.5571814230643212795258f,\ +0.5545951593667268753052f,0.9439489883370697498322f,0.1018914626911282539368f,\ +0.9077803748659789562225f,0.8599558025598526000977f,0.3132304050959646701813f,\ +0.7458020029589533805847f,0.6701762243174016475677f,0.6670592557638883590698f,\ +0.7646118258126080036163f,0.8154405960813164710999f,0.1493974099867045879364f,\ +0.2480226568877696990967f,0.6294850618578493595123f,0.6535534998401999473572f,\ +0.0851266062818467617035f,0.3553021941334009170532f,0.6699288752861320972443f,\ +0.5531356902793049812317f,0.9733559968881309032440f,0.4305554106831550598145f,\ +0.5243876897729933261871f,0.9223478538915514945984f,0.4095269232057034969330f,\ +0.5303003843873739242554f,0.1592096765525639057159f,0.4631052548065781593323f,\ +0.7969039077870547771454f,0.4371217824518680572510f,0.4197942153550684452057f,\ +0.5820884769782423973083f,0.2639330527745187282562f,0.9251737911254167556763f,\ +0.2750987303443253040314f,0.7529260413721203804016f,0.1343348133377730846405f,\ +0.6487299203872680664062f,0.8492549010552465915680f,0.0482988981530070304871f,\ +0.7936811461113393306732f,0.6225296836346387863159f,0.8340442483313381671906f,\ +0.5607167938724160194397f,0.2962070326320827007294f,0.7626721523702144622803f,\ +0.3759830952621996402740f,0.9307165136560797691345f,0.5556063777767121791840f,\ +0.4568063858896493911743f,0.0317669031210243701935f,0.7012319983914494514465f,\ +0.4635622831992805004120f,0.6323687359690666198730f,0.8858239823020994663239f,\ +0.7168863369151949882507f,0.7797616957686841487885f,0.2916170265525579452515f,\ +0.4237285782583057880402f,0.28695563320070505142f,0.1371444310061633586884f,\ +0.9822116084396839141846f,0.2552233324386179447174f,0.3307547485455870628357f,\ +0.0061365715228021144867f,0.1720932889729738235474f,0.2806011182256042957306f,\ +0.2241949187591671943665f,0.9616182404570281505585f,0.9974081367254257202148f,\ +0.3941962518729269504547f,0.5662632463499903678894f,0.0963757499121129512787f,\ +0.3522291611880064010620f,0.3187350784428417682648f,0.5841740677133202552795f,\ +0.9247881243936717510223f,0.7888248674571514129639f,0.6642959327436983585358f,\ +0.3959421953186392784119f,0.6204979992471635341644f,0.1972246859222650527954f,\ +0.8056284752674400806427f,0.8491280348971486091614f,0.9318168940953910350800f,\ +0.7328312769532203674316f,0.6715824031271040439606f,0.1545045776292681694031f,\ +0.6186148612760007381439f,0.9608297105878591537476f,0.0403955359943211078644f,\ +0.0333962673321366310120f,0.7544445092789828777313f,0.6861435212194919586182f,\ +0.4345912770368158817291f,0.5974397426471114158630f,0.7376494011841714382172f,\ +0.4376876372843980789185f,0.2092354488559067249298f,0.6795164542272686958313f,\ +0.3552068280987441539764f,0.0756681859493255615234f,0.9273025044240057468414f,\ +0.8346071569249033927917f,0.743054957594722509384f,0.4906791727989912033081f,\ +0.6159011130221188068390f,0.7293182769790291786194f,0.5866543571464717388153f,\ +0.8633460365235805511475f,0.9971091211773455142975f,0.1388301542028784751892f,\ +0.4055338925682008266449f,0.4532660786062479019165f,0.2871678886003792285919f,\ +0.2700171591714024543762f,0.2655710014514625072479f} + +#define RESULT {1.2102129173972693276795f,0.547172134283395505960f,0.9893959167427971435060f,\ +0.1395365387198562734383f,0.1489849714320161666592f,0.5308459929384929942842f,\ +0.7167814580056727224999f,0.1533658822581816516539f,0.2092572247647190852859f,\ +0.1314089889300391889027f,0.2378254645317898763324f,1.1199616760260284742401f,\ +0.0360196535997655206685f,0.4599165600749937077296f,0.2833119142414158297960f,\ +0.3692359156088362848180f,0.0738195075749003143395f,1.0925087004242901578266f,\ +0.8267083221396219760990f,0.1539616791242165161346f,0.2186116813912043488344f,\ +0.8920178989455170848188f,0.7740006423727355810982f,0.6602366372124121030041f,\ +0.1275041230444604323235f,0.3254020787470935927033f,0.2437177159295554063068f,\ +0.0203071349297229801489f,1.0853560691206285415689f,0.8501888295310906507041f,\ +1.0740923528156336441697f,0.3191797921431215878663f,0.4662305874507110536875f,\ +0.8037176217662085342397f,1.1169491151572188414320f,0.1437171522303946902266f,\ +1.13361865210398771175f,0.4875426458125770023955f,0.2602465647055824948808f,\ +0.6385524103330081358010f,1.2545691699775671779093f,1.2189537472935179085454f,\ +0.2828689457902803794376f,0.4633896660240007236986f,0.6429003543060739511716f,\ +0.3887142006801726501486f,1.0459517428704359076619f,0.2762989388590115780175f,\ +0.6215026189895035413358f,0.5838740042814533071081f,0.4518867349636846997285f,\ +0.2793951051102595561915f,0.3971301217078890832823f,0.132510043706192570667f,\ +0.3320934649289025153429f,0.1608210878711773539340f,0.4446678438400747945813f,\ +0.4121985697961437211667f,1.0021124190562762379386f,1.1309475449498487265032f,\ +0.3257784557613874198978f,0.9390052579549887923349f,0.8089888457708835911575f,\ +0.8892438326422247296676f,0.7433542835357417333242f,0.5420185672225497075516f,\ +0.1948338635337260038582f,0.4412568471414960447063f,0.5060808916267004464729f,\ +0.5447567844134539871703f,0.3579936097184594490095f,0.430688870641149468277f,\ +0.4579258061456900619213f,0.4168699854700866902490f,0.0954971037836137986998f,\ +0.0149911832144437959929f,0.2803929768115001053275f,0.4076979699824179737000f,\ +0.3338832266123987202455f,0.6486162776185823153341f,0.5217335620683097863193f,\ +0.8074019476106287784845f,0.6702938912826584827442f,0.5909876416606805182852f,\ +0.5878763702657983092337f,1.2343959660274554934745f,0.1020685954711661458383f,\ +1.1379615773910940479396f,1.0351830670880448614923f,0.3185927153117306676045f,\ +0.8417379366997205236700f,0.7344461964462585257252f,0.7302544939241956134524f,\ +0.8704388193816158247884f,0.9534899570984974870314f,0.1499588151786827583400f,\ +0.2506386006706501912156f,0.6808903181988129604818f,0.7122699052095804450602f,\ +0.0852297552133160912780f,0.3632373356223638216633f,0.7341129828114539845885f,\ +0.5861234773434839118167f,1.3394387326603169885431f,0.4451080564403126493822f,\ +0.5519958405399131295965f,1.1741139184516546922765f,0.4219354466987135787726f,\ +0.5589548324277814339567f,0.1598900667546140630382f,0.4814956074594635149211f,\ +0.9221526721268241688634f,0.4523960307711298312050f,0.4332185780481620507310f,\ +0.6212947925772885904294f,0.2670975836918499934924f,1.1814932336008394653248f,\ +0.2786923935221553016994f,0.8524970032637724237645f,0.1347421608080361932203f,\ +0.7059143267628599227592f,1.014572470500166190277f,0.0483176963724658639632f,\ +0.9168365263416731192336f,0.6719709888964939814571f,0.9863981265157644173769f,\ +0.5952512315907774187451f,0.3007190162077965633891f,0.8674345484889434132469f,\ +0.3854574865641427483531f,1.1963670583888645904125f,0.5890920941092092633085f,\ +0.4744017948433008613485f,0.0317722484037002914081f,0.7771241013419247778415f,\ +0.4820113338532510671719f,0.6846071548899330672100f,1.0882667543007658040f,\ +0.7993259845681112141236f,0.8942850957473000850229f,0.2959169071935129347040f,\ +0.4375577621669283212569f,0.2910472961271438063768f,0.1375780266978623433971f,\ +1.3818975127290542559422f,0.2580786782411462754183f,0.337103224922307598277f,\ +0.0061366100381220973006f,0.1729542689024595181202f,0.2844203312567258890020f,\ +0.2261168471284604464255f,1.292840105239649206581f,1.4987826659389660299837f,\ +0.4051931219540680362279f,0.6019650966008720516243f,0.0965255712145899474885f,\ +0.3599518411886321600512f,0.3243946620517429990649f,0.6238620609478121581404f,\ +1.1804783562721565814968f,0.9088946724537740884386f,0.7265514890656400437408f,\ +0.407093673069975237055f,0.6693775784027574671242f,0.1985261923397042549411f,\ +0.9367355633059043507060f,1.0143322323911900806337f,1.199387299048776833743f,\ +0.8224738107516712526390f,0.7363424248289601736772f,0.1551259899908567496674f,\ +0.6669785285495629656438f,1.289980681935538386895f,0.0404065303042144760570f,\ +0.0334024783187645626925f,0.8548073921139841546690f,0.7561744594372630245971f,\ +0.4495844069894625594230f,0.6403046132494145670222f,0.8295822852568314198507f,\ +0.4530252724246893181181f,0.2107930369382310653581f,0.747103346555288094777f,\ +0.3631353147252046054128f,0.0757405812005388645591f,1.1871407475057926816930f,\ +0.9874192358186812956689f,0.8376237455287295352591f,0.5128690395827339987278f,\ +0.6635292564994419439728f,0.8173250039556049229006f,0.6269213761078136215588f,\ +1.0418634321911146578543f,1.4947401270369859993536f,0.1392800314888206769659f,\ +0.4175628314057308609897f,0.4704260294397792363519f,0.29126887742414786509f,\ +0.2734108525510542397896f,0.2687961431094310627010f} + + + +#define RSOURCE {0.0100881215184926986694f,0.0074436445720493793488f,0.2989360922947525978088f,\ +0.3327573235146701335907f,0.237830940634012222290f,0.8535961345769464969635f,\ +0.7922197943553328514099f,0.9695409736596047878265f,0.6468791384249925613403f,\ +0.9159972262568771839142f,0.7485287981107831001282f,0.5446169781498610973358f,\ +0.4380150139331817626953f,0.8022991069592535495758f,0.0770919052883982658386f,\ +0.6038356139324605464935f,0.0416274946182966232300f,0.0491319303400814533234f,\ +0.2167323390021920204163f,0.5511633078567683696747f,0.5648556910455226898193f,\ +0.7904387773014605045319f,0.8203159859403967857361f,0.8707285351119935512543f,\ +0.7680293265730142593384f,0.9941699919290840625763f,0.7653715135529637336731f,\ +0.7766020926646888256073f,0.0391560420393943786621f,0.3610868924297392368317f,\ +0.7096323622390627861023f,0.1340617476962506771088f,0.3352055754512548446655f,\ +0.4794248570688068866730f,0.9102506125345826148987f,0.9960912610404193401337f,\ +0.5589408166706562042236f,0.3291657851077616214752f,0.5254327272996306419373f,\ +0.5988637856207787990570f,0.3400457371026277542114f,0.7296699327416718006134f,\ +0.1172471689060330390930f,0.1599596398882567882538f,0.6893001943826675415039f,\ +0.8244171240366995334625f,0.5743538914248347282410f,0.3230684562586247920990f,\ +0.4945516120642423629761f,0.1966073368676006793976f,0.1734057078137993812561f,\ +0.5929257045499980449677f,0.3272335343062877655029f,0.7093706638552248477936f,\ +0.9978715321049094200134f,0.6042335904203355312347f,0.5281810555607080459595f,\ +0.6643366483040153980255f,0.4330314965918660163879f,0.5683163288049399852753f,\ +0.0414931252598762512207f,0.3723129951395094394684f,0.9558939440175890922546f,\ +0.7412597923539578914642f,0.9651917275041341781616f,0.7298236568458378314972f,\ +0.9387842947617173194885f,0.2572855348698794841766f,0.2874279357492923736572f,\ +0.8952562944032251834869f,0.6853557890281081199646f,0.1711091897450387477875f,\ +0.7769848424941301345825f,0.658369113225489854813f,0.4177721040323376655579f,\ +0.0530332433991134166718f,0.4968273639678955078125f,0.59690707409754395485f,\ +0.4338118461892008781433f,0.9805241837166249752045f,0.9094489198178052902222f,\ +0.6140774791128933429718f,0.152644918300211429596f,0.2700240234844386577606f,\ +0.0427649877965450286865f,0.9506349326111376285553f,0.2680307617411017417908f,\ +0.7927461988292634487152f,0.6853035334497690200806f,0.2653256771154701709747f,\ +0.7276884736493229866028f,0.2182058426551520824432f,0.0794423148036003112793f,\ +0.8774413042701780796051f,0.7575887991115450859070f,0.0292344330810010433197f,\ +0.0814430620521306991577f,0.7652318407781422138214f,0.6499179983511567115784f,\ +0.652228816878050565720f,0.2570325322449207305908f,0.4139282093383371829987f,\ +0.5334635889157652854919f,0.5463846079073846340179f,0.8812804389744997024536f,\ +0.1071240645833313465118f,0.8451719628646969795227f,0.5956639605574309825897f,\ +0.3115242570638656616211f,0.7552670040167868137360f,0.7216278789564967155457f,\ +0.64724771818146109581f,0.7020909022539854049683f,0.8550091539509594440460f,\ +0.0292058298364281654358f,0.5402219365350902080536f,0.5295652858912944793701f,\ +0.6731671304441988468170f,0.2516432842239737510681f,0.4682487822137773036957f,\ +0.8973557446151971817017f,0.2490413752384483814240f,0.953785804100334644318f,\ +0.0199718060903251171112f,0.0883063450455665588379f,0.3088448666967451572418f,\ +0.0402540368959307670593f,0.7409055917523801326752f,0.3341060634702444076538f,\ +0.6859912057407200336456f,0.5277825826779007911682f,0.5605597789399325847626f,\ +0.2702448405325412750244f,0.3409920767880976200104f,0.0499807363376021385193f,\ +0.9285474619828164577484f,0.0452665109187364578247f,0.5747140836901962757111f,\ +0.8132651047781109809875f,0.0034279632382094860077f,0.5530686080455780029297f,\ +0.5287449606694281101227f,0.2227140991017222404480f,0.7380339815281331539154f,\ +0.7569990437477827072144f,0.5666191582567989826202f,0.8965943017974495887756f,\ +0.205033115576952695847f,0.5744996629655361175537f,0.6296528042294085025787f,\ +0.28830870892852544785f,0.0064737624488770961761f,0.2910466734319925308228f,\ +0.161138039547950029373f,0.6345168473199009895325f,0.1110653909854590892792f,\ +0.9721379503607749938965f,0.6926467292942106723785f,0.4481767667457461357117f,\ +0.9629431902430951595306f,0.8420772161334753036499f,0.6861935486085712909698f,\ +0.2752589071169495582581f,0.2056670929305255413055f,0.0983050949871540069580f,\ +0.7260084436275064945221f,0.9338818406686186790466f,0.8652051738463342189789f,\ +0.1300270427018404006958f,0.6536684674210846424103f,0.9546198891475796699524f,\ +0.3356514233164489269257f,0.6098881512880325317383f,0.7403389909304678440094f,\ +0.4407326159998774528503f,0.0114278956316411495209f,0.4274448286741971969604f,\ +0.4898742889054119586945f,0.0670661935582756996155f,0.9097212324850261211395f,\ +0.9331833533942699432373f,0.1665275008417665958405f,0.4363766452297568321228f,\ +0.1269035614095628261566f,0.4618353042751550674438f,0.6410199669189751148224f,\ +0.5118249626830220222473f,0.4726877692155539989471f,0.6037398651242256164551f,\ +0.6487199389375746250153f,0.3443940980359911918640f,0.1257671504281461238861f,\ +0.1930030044168233871460f,0.0536806662566959857941f,0.813977831043303012848f,\ +0.6546894307248294353485f,0.4812035299837589263916f,0.2122878567315638065338f,\ +0.6028915112838149070740f,0.2477151653729379177094f} + +#define ISOURCE {0.4653960186988115310669f,0.0302665126509964466095f,0.1205546753481030464172f,\ +0.4954105126671493053436f,0.8391606211662292480469f,0.8067971416749060153961f,\ +0.5980955390259623527527f,0.5697243823669850826263f,0.535449741408228874207f,\ +0.4594913427717983722687f,0.0716273644939064979553f,0.1432999591343104839325f,\ +0.3299815915524959564209f,0.2239767671562731266022f,0.4729467025026679039001f,\ +0.8927706009708344936371f,0.4739306215196847915649f,0.4218414542265236377716f,\ +0.5464035095646977424622f,0.9297901126556098461151f,0.8246648237109184265137f,\ +0.3906875425018370151520f,0.8106931401416659355164f,0.0035473941825330257416f,\ +0.4432799126952886581421f,0.1700443555600941181183f,0.2843202138319611549377f,\ +0.8185154641978442668915f,0.1276803798973560333252f,0.0368908629752695560455f,\ +0.1934843575581908226013f,0.3111848584376275539398f,0.8499574232846498489380f,\ +0.4845375162549316883087f,0.3811378227546811103821f,0.2295314031653106212616f,\ +0.5668137520551681518555f,0.7386174597777426242828f,0.6359649775549769401550f,\ +0.8589683636091649532318f,0.3717852663248777389526f,0.4039371167309582233429f,\ +0.6600336739793419837952f,0.2385329673998057842255f,0.4580096118152141571045f,\ +0.3359361500479280948639f,0.8938684901222586631775f,0.7110573030076920986176f,\ +0.8602916095405817031860f,0.3305067983455955982208f,0.9176958473399281501770f,\ +0.15107359318062663078f,0.4452155604958534240723f,0.7259225868619978427887f,\ +0.6476110024377703666687f,0.7142038433812558650970f,0.1180544253438711166382f,\ +0.5106264133937656879425f,0.0454169148579239845276f,0.4517838652245700359344f,\ +0.7152258791029453277588f,0.0306280092336237430573f,0.5608849888667464256287f,\ +0.6344716749154031276703f,0.5510452408343553543091f,0.8902607751078903675079f,\ +0.0251876907423138618469f,0.1285902666859328746796f,0.0875252783298492431641f,\ +0.1400479921139776706696f,0.2142530409619212150574f,0.6689547612331807613373f,\ +0.6959728877991437911987f,0.3454284076578915119171f,0.8007909813895821571350f,\ +0.3719339291565120220184f,0.9791326485574245452881f,0.6300911963917315006256f,\ +0.9137416174635291099548f,0.3324960893951356410980f,0.6226272527128458023071f,\ +0.2876702961511909961700f,0.0238953353837132453918f,0.6489893826656043529510f,\ +0.2444448098540306091309f,0.0555481188930571079254f,0.374434794299304485321f,\ +0.7194064198993146419525f,0.2112230267375707626343f,0.6445186366327106952667f,\ +0.6751487934961915016174f,0.1528833056800067424774f,0.8900802619755268096924f,\ +0.6180598423816263675690f,0.27906801458448171616f,0.1401830366812646389008f,\ +0.3047434557229280471802f,0.2149655860848724842072f,0.5602726386860013008118f,\ +0.6269132751040160655975f,0.6647229343652725219727f,0.2090867855586111545563f,\ +0.7116218386217951774597f,0.133228497114032506943f,0.7362840902060270309448f,\ +0.3999320124275982379913f,0.6811551460996270179749f,0.5637665162794291973114f,\ +0.523965936154127120972f,0.8278774530626833438873f,0.4659156939014792442322f,\ +0.8515693820081651210785f,0.23139653541147708893f,0.3077362445183098316193f,\ +0.4819453330710530281067f,0.7797386529855430126190f,0.9701553061604499816895f,\ +0.3744371854700148105621f,0.2292016251012682914734f,0.8245750456117093563080f,\ +0.1854322012513875961304f,0.2345628221519291400909f,0.9701467091217637062073f,\ +0.3639524574391543865204f,0.2672337628901004791260f,0.8174969092942774295807f,\ +0.6407580440863966941833f,0.0946763656102120876312f,0.3158860523253679275513f,\ +0.5199312460608780384064f,0.7127110259607434272766f,0.0025766002945601940155f,\ +0.5305844545364379882812f,0.7374818869866430759430f,0.2254834799095988273621f,\ +0.7290844931267201900482f,0.1897403579205274581909f,0.7771647279150784015656f,\ +0.7071320274844765663147f,0.67804440064355731010f,0.6918747089803218841553f,\ +0.2444804669357836246490f,0.2024903288111090660095f,0.7065096027217805385590f,\ +0.6258084420114755630493f,0.4988589403219521045685f,0.1275391997769474983215f,\ +0.7432725760154426097870f,0.3388997837901115417480f,0.2712128334678709506989f,\ +0.1686986042186617851257f,0.1788796423934400081635f,0.9720784332603216171265f,\ +0.0373507668264210224152f,0.9457915211096405982971f,0.3708799923770129680634f,\ +0.4304266162216663360596f,0.2409997568465769290924f,0.6574296867474913597107f,\ +0.1080590835772454738617f,0.2580570150166749954224f,0.9601870519109070301056f,\ +0.4275712119415402412415f,0.3774064141325652599335f,0.8860375732183456420898f,\ +0.1107313432730734348297f,0.572000074200332164764f,0.2775676711462438106537f,\ +0.2221131753176450729370f,0.7805933509953320026398f,0.5034774849191308021545f,\ +0.4225312541238963603973f,0.0509742014110088348389f,0.7888357848860323429108f,\ +0.4943151315674185752869f,0.6792991734109818935394f,0.2138219568878412246704f,\ +0.0629426804371178150177f,0.0151202948763966560364f,0.5832923236303031444550f,\ +0.0359809771180152893066f,0.9282481097616255283356f,0.8684628410264849662781f,\ +0.2752401321195065975189f,0.9713082071393728256226f,0.90322426753118634224f,\ +0.8362140888348221778870f,0.3033045823685824871063f,0.9321490563452243804932f,\ +0.0943789319135248661041f,0.0593075519427657127380f,0.1341886124573647975922f,\ +0.2735903281718492507935f,0.7845123005099594593048f,0.868671556003391742706f,\ +0.7169788884930312633514f,0.9007600247859954833984f,0.3080832012929022312164f,\ +0.2860837308689951896667f,0.9434729530476033687592f} + +#define RRESULT {0.0091461935615653692372f,0.0074403059517685150512f,0.3011120408510194468299f,\ +0.2998770814044370847107f,0.1819248875927510500361f,0.6444988336836313669309f,\ +0.6791245188293772994115f,0.8328839139359748289237f,0.5765876696591275551995f,\ +0.8504976129204943058326f,0.8394277222457392495514f,0.5667892427465585081237f,\ +0.4244768273740840425212f,0.8613255288489666261498f,0.0697161665763657567574f,\ +0.4438565921449716400460f,0.0376207427201287192275f,0.0452773943778729953680f,\ +0.1905350234324321712087f,0.3984765801447008870539f,0.4314770699424559374791f,\ +0.7678818181682768306828f,0.6201489749119961647494f,1.056635799167679801158f,\ +0.7224469139675204765183f,1.1570753191068809950792f,0.7891360295709419769850f,\ +0.5869418614770346431797f,0.0388500272557359208059f,0.3691306128445250300807f,\ +0.7557159781600413239744f,0.1282646090865436350192f,0.254601106881209460209f,\ +0.4365177363889400918850f,0.8917468285467748945194f,1.0969945987775304718781f,\ +0.4896234023783549438313f,0.2644825052430134770809f,0.4440381533885026654751f,\ +0.4483584089258232929787f,0.3221387984110837821028f,0.7011289310321348056121f,\ +0.0978674265602834936306f,0.1561241830600058055900f,0.6415261435351872210120f,\ +0.8301262834168886550756f,0.4226589438886647065452f,0.2631688682703156034748f,\ +0.3718501469694869832061f,0.1874416812787549069252f,0.1276292125120765952317f,\ +0.6223362931435947320580f,0.3011173751873987280980f,0.5675795050042053979666f,\ +0.8129219748246857557561f,0.4890104311779664980619f,0.550584097940126637738f,\ +0.6003329153401916196131f,0.4472450285127820834852f,0.5277749449162034700578f,\ +0.0337492295725758256753f,0.3812817338877603767777f,0.8272241071562403957884f,\ +0.6236783490132045137955f,0.8396686488386544411355f,0.5323480108875771055210f,\ +1.2121602671977980136830f,0.2578891950501832064369f,0.2902963532926625123132f,\ +1.0407218420407280401463f,0.719658282922589376263f,0.1422515549798589185038f,\ +0.6295643770268913863575f,0.6485925881357603728361f,0.3247882629711342783452f,\ +0.0497195040545942226751f,0.3510527044460081680377f,0.50563338590045081578f,\ +0.3179706585678286345775f,0.99285160840273078975f,0.7609503370287584722576f,\ +0.6176058717047394619470f,0.1531988771495936818567f,0.2266760787365090790146f,\ +0.0415517947772082799074f,1.218422457974889017152f,0.2526690822330791563743f,\ +0.6329425814457148025127f,0.7204713317072120037921f,0.2231989518352319179506f,\ +0.5985707095895493878857f,0.2172853881448477131322f,0.0593293879714889560439f,\ +0.7385713745542424879531f,0.7823911147317434977566f,0.0289551632441432602039f,\ +0.0779646258693818400287f,0.8182888473500083970080f,0.5715052817983971022997f,\ +0.5528641949610285655226f,0.2141542425335012378440f,0.4153673917132313930800f,\ +0.4332354240667932732123f,0.5700436227902923036481f,0.6908832900189864067997f,\ +0.0995605703740609776498f,0.6869435543144543077076f,0.5227653368830831315250f,\ +0.2770997202417057603263f,0.5689013982218961151816f,0.6692632096949825415422f,\ +0.4851064406738322953849f,0.7345650510869129456992f,0.8789819041715580816287f,\ +0.0263110479671970418081f,0.4230828882691921033476f,0.3752940809060429927513f,\ +0.6545085349432201438091f,0.2474097208124308444610f,0.3590569749582296354973f,\ +1.0107395629243736134839f,0.2444967346619240644578f,0.6498559643022308041083f,\ +0.0187681811419864209844f,0.0853955435810109381167f,0.23858632896482903640f,\ +0.0338939736966144267161f,0.8239189153398052134492f,0.3225505736889286989566f,\ +0.6168540121263207387514f,0.428433060998039016987f,0.5950583374560662885955f,\ +0.2394573971728722883157f,0.2741095497000874958715f,0.0487731652979911251000f,\ +0.7269475532699710695894f,0.0444861838193508288275f,0.4501104783981072499088f,\ +0.6528448282940336744318f,0.0028372513246705619722f,0.4536708244402919421034f,\ +0.5336004611058299262893f,0.2198360890060693795256f,0.5959746705988369086526f,\ +0.6396262340663229073456f,0.5139896603726894497299f,1.0518513414805021888299f,\ +0.1644962891003966809489f,0.5624905673203877132238f,0.6391528366469793054350f,\ +0.2879084713580257748333f,0.0063726492100631259435f,0.2079683900269996554844f,\ +0.1617268596829900817458f,0.45252598419205131153f,0.1042540297218644135269f,\ +0.9167320764408587452365f,0.7202498119943631094131f,0.3747568855205881677151f,\ +1.1832506588357394328170f,0.8926873380378329558837f,0.4837753498734558843530f,\ +0.2545199640454580136684f,0.1931610886369621860048f,0.0735568361645391743942f,\ +0.7995145050294805155744f,0.8044454260553820512669f,0.9085111724757110041040f,\ +0.1272278092834613905104f,0.5090362502018392909520f,0.8578711409272452570463f,\ +0.3118078521746414644156f,0.6543371722769727449887f,0.5706133911152972970626f,\ +0.3988750643962680753063f,0.0094531166452282121282f,0.4291477558442853834642f,\ +0.5104896641888095887296f,0.0671088543520260150110f,0.7800123094015957159186f,\ +1.1912011959193866683648f,0.12192992647229736192f,0.3274120948460061963914f,\ +0.1225950921700365431333f,0.3281975873099651774822f,0.4674494885223512974370f,\ +0.3894697523335833855285f,0.4641231634718703258358f,0.4345931392944782367671f,\ +0.6995072076723701792744f,0.3508640282412981981075f,0.1249574421756384084992f,\ +0.1870180747450552183331f,0.0422329366873970546425f,0.5961240984598299430530f,\ +0.5279606410558730367200f,0.3544288908497560397493f,0.2039132017920733119798f,\ +0.6057722587792238044813f,0.1797611770377918194441f} + +#define IRESULT {0.4500666085684790207466f,0.0302627309405466352055f,0.1259014236203331582598f,\ +0.4977434045460411571327f,0.773705242465913545225f,0.887900733341152936795f,\ +0.7079916425568136828517f,0.7688472856787659237554f,0.6017352744773040162940f,\ +0.6498883599394120746950f,0.107039917160296094156f,0.1690548918257823163280f,\ +0.3546374548515999203246f,0.3373847934787007063484f,0.4579255569364570899182f,\ +0.8732609696455944092719f,0.4580771972571195393975f,0.4106361461893539566148f,\ +0.5311452992294272146268f,0.8876026166669700456779f,0.8147068623051754165942f,\ +0.5194139247849689500214f,0.8786785088163897583513f,0.0072129604104987166471f,\ +0.5609976062745508640361f,0.4112823226813016597170f,0.3933766150232178571144f,\ +0.8693290272249873940f,0.1274316261040582265451f,0.0395449426043308974177f,\ +0.2628191746325336808354f,0.3088296914886584088045f,0.7926272523547727155702f,\ +0.5120084435293993374572f,0.5746945549365780614437f,0.4839450538685827751806f,\ +0.6047355489888047719305f,0.7052834690539023787537f,0.6561539945033735277136f,\ +0.8478769656358153827824f,0.3825478020514606614100f,0.5066754044490697772574f,\ +0.6222644111952397860676f,0.2391828028480158796487f,0.5443776858218749570284f,\ +0.4792822085648152929949f,0.86724431342169228110f,0.6822409980077328572889f,\ +0.8261589834748411798060f,0.3303572550644504612904f,0.8274965298010771297399f,\ +0.1848774585857928254296f,0.4507700784722463716037f,0.7795271583399024928340f,\ +0.8398668346264467343687f,0.7396983997066739480175f,0.1380866564681807739934f,\ +0.5849046253180708587749f,0.0503500622675033676634f,0.5016357319277500170784f,\ +0.6654269099346773463921f,0.0329916341046517930247f,0.7548317451254575871644f,\ +0.7182541963203104007363f,0.7522847340656214631949f,0.9046859380442064946237f,\ +0.0716988879790057820340f,0.132599207337852937f,0.0912207697238807957429f,\ +0.2735698269446988906139f,0.2811794411108771152286f,0.6327124304403525245633f,\ +0.7796338249130402298093f,0.4209075105417727225010f,0.7673980540361009516914f,\ +0.3642835980514441684974f,0.9112659650125345400795f,0.6691470644846674309392f,\ +0.8542200565296905745427f,0.5762098993480122555155f,0.7786617427494030296842f,\ +0.3459141320122436358275f,0.0241761593182958818560f,0.6246129374546308676841f,\ +0.2422787652159511528893f,0.1602629717157874056355f,0.3776710192863622084225f,\ +0.8030895628249021811484f,0.2774953901907728504028f,0.6203514328186836568335f,\ +0.7460670209249947726349f,0.1559320495131248929255f,0.8026468549051214429468f,\ +0.760424886296417135156f,0.3839751822834133743179f,0.1397861363985309635094f,\ +0.3011015740622249303726f,0.3095528263794048440261f,0.6246974136518177456168f,\ +0.6824390801574051756972f,0.6364220425441351469686f,0.2265745526065163772955f,\ +0.7201722295639139126422f,0.1575984581645545612449f,0.8494571876510255137305f,\ +0.3918195908099642577049f,0.7946547307771568702250f,0.6117848393634578441080f,\ +0.5208720859508298994811f,0.8690531065973791102763f,0.5637323042761468450124f,\ +0.8547026638602744919027f,0.306960447908322775490f,0.4654093394618514789585f,\ +0.4651555318578067255153f,0.7751475575968125308890f,0.9112674172531984861934f,\ +0.4560028346615129235531f,0.234251732325255618283f,0.7944832243829529350165f,\ +0.3423334159329023407281f,0.239457736168475460170f,1.02777275826487124455f,\ +0.3564220429250729016424f,0.2650952420467553305450f,0.7646166714313819001703f,\ +0.6037691171359901298743f,0.1389158036998756340363f,0.3271927879913820724767f,\ +0.6006321860598116124663f,0.7197540296752282795723f,0.0031113959438069660468f,\ +0.5221204081389118067946f,0.7059634191281195514378f,0.2238770907129097598176f,\ +0.8641197102092305071253f,0.1888045378279312735970f,0.7812121068214791241857f,\ +0.8015589685608611736356f,0.6345893564856053270518f,0.7088628827258813824841f,\ +0.2802718253544457249760f,0.2060232397943899673720f,0.7740411253804675428825f,\ +0.716974289181374180302f,0.5454318495795067445187f,0.2544009667091767235014f,\ +0.6958995710025659420239f,0.3906147496642403682543f,0.3317958100335353655019f,\ +0.1750450440110335736943f,0.1779427350870727009280f,0.8767597428372501111582f,\ +0.0378355850756998610129f,0.9174242179663641971743f,0.3647620293190586560073f,\ +0.6587619708007782515224f,0.3153773564551797248257f,0.6579511103942273786416f,\ +0.2821737200327205097317f,0.4005650534773762538876f,0.9399862930023007434599f,\ +0.4285643691635598884204f,0.3756601850966035938129f,0.8002497169354958472809f,\ +0.1581953331446839250418f,0.7519083154621302167442f,0.4373149903759625534150f,\ +0.2220927412218937635480f,0.804348871566688328f,0.7089002298114742695034f,\ +0.4305150724386235805419f,0.0641995146174158398678f,0.8363640441971674777122f,\ +0.5135521078813733986124f,0.6356504507416418370269f,0.2330299466993880075361f,\ +0.0720777388352223102874f,0.0151538267615728122067f,0.7485905695903387613299f,\ +0.0969510446209165821507f,0.8347965442360075760675f,0.8215865796515979813108f,\ +0.2738845295035164384423f,0.8996918043828731059719f,0.8896690120740690099765f,\ +0.8117683352741612567982f,0.3329971294517217184072f,0.9008120497468148357711f,\ +0.1230347833276769775601f,0.0631133065200175230602f,0.1348341818397757463366f,\ +0.2749675342978448178144f,0.7210794354646373749418f,0.9161054973709473747689f,\ +0.7559186765863976642521f,0.8531345425055275599746f,0.3096300406745840505529f,\ +0.3413400734450014462062f,0.8520286730709790701255f} + +void sasinsTest(void) { + float in[]= SOURCE; + float res[]= RESULT; + float out; + int i=0; + + for (i=0;i<200;i++){ + out=sasins(in[i]); + assert( ( (fabs(out-res[i])) / (fabs(out)) ) <1e-6); + } +} + +void casinsTest(void) { + float inR[]= RSOURCE; + float inI[]= ISOURCE; + float resR[]= RRESULT; + float resI[]= IRESULT; + floatComplex out,in; + int i=0; + + for (i=0;i<200;i++){ + in = FloatComplex(inR[i],inI[i]); + out=casins(in); + assert( ( (fabs(creals(out)-resR[i])) / (fabs(creals(out))) ) <1e-6); + assert( ( (fabs(cimags(out)-resI[i])) / (fabs(cimags(out))) ) <1e-6); + } +} + +void sasinaTest(void) { + float in[]= SOURCE; + float res[]= RESULT; + float out[200]; + int i=0; + + sasina(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <1e-6); + } +} + +void casinaTest(void) { + float inR[]= RSOURCE; + float inI[]= ISOURCE; + float resR[]= RRESULT; + float resI[]= IRESULT; + floatComplex out[200],in[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i] = FloatComplex(inR[i],inI[i]); + } + + casina(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(creals(out[i])-resR[i])) / (fabs(creals(out[i]))) ) <1e-6); + assert( ( (fabs(cimags(out[i])-resI[i])) / (fabs(cimags(out[i]))) ) <1e-6); + } +} + + +int testAsin(void) { + printf("\n>>>> Float ArcSine Tests\n"); + sasinsTest(); + casinsTest(); + sasinaTest(); + casinaTest(); + return 0; +} + +int main(void) { + assert(testAsin() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/zasina.c b/2.3-1/src/c/elementaryFunctions/asin/zasina.c new file mode 100644 index 00000000..ca46ff3f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/zasina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asin.h" + +void zasina(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zasins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asin/zasins.c b/2.3-1/src/c/elementaryFunctions/asin/zasins.c new file mode 100644 index 00000000..5bd586a8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asin/zasins.c @@ -0,0 +1,146 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + * REFERENCE + * This is a Fortran-77 translation of an algorithm by + * T.E. Hull, T. F. Fairgrieve and P.T.P. Tang which + * appears in their article : + * "Implementing the Complex Arcsine and Arccosine + * Functions Using Exception Handling", ACM, TOMS, + * Vol 23, No. 3, Sept 1997, p. 299-335 + * Thanks to Tom Fairgrieve + */ + +#include "lapack.h" +#include "asin.h" +#include "atan.h" +#include "sqrt.h" +#include "abs.h" +#include "log.h" +#include "log1p.h" +#include "min.h" +#include "max.h" + +doubleComplex zasins(doubleComplex z) { + static double sdblPi_2 = 1.5707963267948966192313216; + static double sdblLn2 = 0.6931471805599453094172321; + static double sdblAcross = 1.5; + static double sdblBcross = 0.6417; + + double dblLsup = dsqrts(getOverflowThreshold())/8.0; + double dblLinf = 4 * dsqrts(getUnderflowThreshold()); + double dblEpsm = dsqrts(getRelativeMachinePrecision()); + + double _dblReal = zreals(z); + double _dblImg = zimags(z); + + double dblAbsReal = dabss(_dblReal); + double dblAbsImg = dabss(_dblImg); + int iSignReal = _dblReal < 0 ? -1 : 1; + int iSignImg = _dblImg < 0 ? -1 : 1; + + double dblR = 0, dblS = 0, dblA = 0, dblB = 0; + + double dblTemp = 0; + + double _pdblReal = 0; + double _pdblImg = 0; + + if( min(dblAbsReal, dblAbsImg) > dblLinf && max(dblAbsReal, dblAbsImg) <= dblLsup) + { + /* we are in the safe region */ + dblR = dsqrts( (dblAbsReal + 1) * (dblAbsReal + 1) + dblAbsImg * dblAbsImg); + dblS = dsqrts( (dblAbsReal - 1) * (dblAbsReal - 1) + dblAbsImg * dblAbsImg); + dblA = 0.5 * ( dblR + dblS ); + dblB = dblAbsReal / dblA; + + + /* compute the real part */ + if(dblB <= sdblBcross) + _pdblReal = dasins(dblB); + else if( dblAbsReal <= 1) + _pdblReal = datans(dblAbsReal / dsqrts( 0.5 * (dblA + dblAbsReal) * ( (dblAbsImg * dblAbsImg) / (dblR + (dblAbsReal + 1)) + (dblS + (1 - dblAbsReal))))); + else + _pdblReal = datans(dblAbsReal / (dblAbsImg * dsqrts(0.5 * ((dblA + dblAbsReal) / (dblR + (dblAbsReal + 1)) + (dblA + dblAbsReal) / (dblS + (dblAbsReal-1)))))); + + /* compute the imaginary part */ + if(dblA <= sdblAcross) + { + double dblImg1 = 0; + + if(dblAbsReal < 1) + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(y**2)/(S+(1.d0-x))) */ + dblImg1 = 0.5 * (dblAbsImg * dblAbsImg / (dblR + (dblAbsReal + 1)) + dblAbsImg * dblAbsImg / (dblS + (1 - dblAbsReal))); + else + /* Am1 = 0.5d0*((y**2)/(R+(x+1.d0))+(S+(x-1.d0))) */ + dblImg1 = 0.5 * (dblAbsImg * dblAbsImg / (dblR + (dblAbsReal + 1)) + (dblS + (dblAbsReal - 1))); + /* ai = logp1(Am1 + sqrt(Am1*(A+1.d0))) */ + dblTemp = dblImg1 + dsqrts(dblImg1 * (dblA + 1)); + _pdblImg = dlog1ps(dblTemp); + } + else + /* ai = log(A + sqrt(A**2 - 1.d0)) */ + _pdblImg = dlogs(dblA + dsqrts(dblA * dblA - 1)); + } + else + { + /* evaluation in the special regions ... */ + if(dblAbsImg <= dblEpsm * dabss(dblAbsReal - 1)) + { + if(dblAbsReal < 1) + { + _pdblReal = dasins(dblAbsReal); + _pdblImg = dblAbsImg / dsqrts((1 + dblAbsReal) * (1 - dblAbsReal)); + } + else + { + _pdblReal = sdblPi_2; + if(dblAbsReal <= dblLsup) + { + dblTemp = (dblAbsReal - 1) + dsqrts((dblAbsReal - 1) * (dblAbsReal + 1)); + _pdblImg = dlog1ps(dblTemp); + } + else + _pdblImg = sdblLn2 + dlogs(dblAbsReal); + } + } + else if(dblAbsImg < dblLinf) + { + _pdblReal = sdblPi_2 - dsqrts(dblAbsImg); + _pdblImg = dsqrts(dblAbsImg); + } + else if((dblEpsm * dblAbsImg - 1 >= dblAbsReal)) + { + _pdblReal = dblAbsReal * dblAbsImg; + _pdblImg = sdblLn2 + dlogs(dblAbsReal); + } + else if(dblAbsReal > 1) + { + _pdblReal = datans(dblAbsReal / dblAbsImg); + dblTemp = (dblAbsReal / dblAbsImg) * (dblAbsReal / dblAbsImg); + _pdblImg = sdblLn2 + dlogs(dblAbsReal) + 0.5 * dlog1ps(dblTemp); + } + else + { + double dblTemp2 = dsqrts(1 + dblAbsImg * dblAbsImg); + _pdblReal = dblAbsReal / dblTemp2; + dblTemp = 2 * dblAbsImg * (dblAbsImg + dblTemp2); + _pdblImg = 0.5 * dlog1ps(dblTemp); + } + } + _pdblReal *= iSignReal; + _pdblImg *= iSignImg; + + return (DoubleComplex(_pdblReal, _pdblImg)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/Makefile.am b/2.3-1/src/c/elementaryFunctions/asinh/Makefile.am new file mode 100644 index 00000000..33f4436e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/Makefile.am @@ -0,0 +1,69 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAsinh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAsinh.la + +libAsinh_la_SOURCES = $(HEAD) $(SRC) + +SRC = sasinhs.c \ + dasinhs.c \ + casinhs.c \ + zasinhs.c \ + sasinha.c \ + dasinha.c \ + casinha.c \ + zasinha.c + +HEAD = ../includes/asinh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/asinh/libAsinh.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAsinh testDoubleAsinh + +TESTS = testFloatAsinh testDoubleAsinh + +# +# -*- Hyperbolic ArcSine Tests -*- +# +testFloatAsinh_SOURCES = testAsinh.h testFloatAsinh.c +testFloatAsinh_CFLAGS = $(check_INCLUDES) +testFloatAsinh_LDADD = $(check_LDADD) + +testDoubleAsinh_SOURCES = testAsinh.h testDoubleAsinh.c +testDoubleAsinh_CFLAGS = $(check_INCLUDES) +testDoubleAsinh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/asinh/Makefile.in b/2.3-1/src/c/elementaryFunctions/asinh/Makefile.in new file mode 100644 index 00000000..3d560e29 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/Makefile.in @@ -0,0 +1,812 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAsinh$(EXEEXT) testDoubleAsinh$(EXEEXT) +TESTS = testFloatAsinh$(EXEEXT) testDoubleAsinh$(EXEEXT) +subdir = src/c/elementaryFunctions/asinh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAsinh_la_LIBADD = +am__objects_1 = +am__objects_2 = libAsinh_la-sasinhs.lo libAsinh_la-dasinhs.lo \ + libAsinh_la-casinhs.lo libAsinh_la-zasinhs.lo \ + libAsinh_la-sasinha.lo libAsinh_la-dasinha.lo \ + libAsinh_la-casinha.lo libAsinh_la-zasinha.lo +am_libAsinh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAsinh_la_OBJECTS = $(am_libAsinh_la_OBJECTS) +libAsinh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAsinh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAsinh_OBJECTS = \ + testDoubleAsinh-testDoubleAsinh.$(OBJEXT) +testDoubleAsinh_OBJECTS = $(am_testDoubleAsinh_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/asinh/libAsinh.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleAsinh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAsinh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAsinh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAsinh_OBJECTS = testFloatAsinh-testFloatAsinh.$(OBJEXT) +testFloatAsinh_OBJECTS = $(am_testFloatAsinh_OBJECTS) +testFloatAsinh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAsinh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAsinh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAsinh_la_SOURCES) $(testDoubleAsinh_SOURCES) \ + $(testFloatAsinh_SOURCES) +DIST_SOURCES = $(libAsinh_la_SOURCES) $(testDoubleAsinh_SOURCES) \ + $(testFloatAsinh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAsinh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAsinh.la +libAsinh_la_SOURCES = $(HEAD) $(SRC) +SRC = sasinhs.c \ + dasinhs.c \ + casinhs.c \ + zasinhs.c \ + sasinha.c \ + dasinha.c \ + casinha.c \ + zasinha.c + +HEAD = ../includes/asinh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/asinh/libAsinh.la \ + $(top_builddir)/src/c/elementaryFunctions/asin/libAsin.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic ArcSine Tests -*- +# +testFloatAsinh_SOURCES = testAsinh.h testFloatAsinh.c +testFloatAsinh_CFLAGS = $(check_INCLUDES) +testFloatAsinh_LDADD = $(check_LDADD) +testDoubleAsinh_SOURCES = testAsinh.h testDoubleAsinh.c +testDoubleAsinh_CFLAGS = $(check_INCLUDES) +testDoubleAsinh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/asinh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/asinh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAsinh.la: $(libAsinh_la_OBJECTS) $(libAsinh_la_DEPENDENCIES) + $(libAsinh_la_LINK) -rpath $(pkglibdir) $(libAsinh_la_OBJECTS) $(libAsinh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAsinh$(EXEEXT): $(testDoubleAsinh_OBJECTS) $(testDoubleAsinh_DEPENDENCIES) + @rm -f testDoubleAsinh$(EXEEXT) + $(testDoubleAsinh_LINK) $(testDoubleAsinh_OBJECTS) $(testDoubleAsinh_LDADD) $(LIBS) +testFloatAsinh$(EXEEXT): $(testFloatAsinh_OBJECTS) $(testFloatAsinh_DEPENDENCIES) + @rm -f testFloatAsinh$(EXEEXT) + $(testFloatAsinh_LINK) $(testFloatAsinh_OBJECTS) $(testFloatAsinh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-casinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-casinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-dasinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-dasinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-sasinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-sasinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-zasinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAsinh_la-zasinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAsinh-testFloatAsinh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAsinh_la-sasinhs.lo: sasinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-sasinhs.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-sasinhs.Tpo -c -o libAsinh_la-sasinhs.lo `test -f 'sasinhs.c' || echo '$(srcdir)/'`sasinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-sasinhs.Tpo $(DEPDIR)/libAsinh_la-sasinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sasinhs.c' object='libAsinh_la-sasinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-sasinhs.lo `test -f 'sasinhs.c' || echo '$(srcdir)/'`sasinhs.c + +libAsinh_la-dasinhs.lo: dasinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-dasinhs.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-dasinhs.Tpo -c -o libAsinh_la-dasinhs.lo `test -f 'dasinhs.c' || echo '$(srcdir)/'`dasinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-dasinhs.Tpo $(DEPDIR)/libAsinh_la-dasinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dasinhs.c' object='libAsinh_la-dasinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-dasinhs.lo `test -f 'dasinhs.c' || echo '$(srcdir)/'`dasinhs.c + +libAsinh_la-casinhs.lo: casinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-casinhs.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-casinhs.Tpo -c -o libAsinh_la-casinhs.lo `test -f 'casinhs.c' || echo '$(srcdir)/'`casinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-casinhs.Tpo $(DEPDIR)/libAsinh_la-casinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='casinhs.c' object='libAsinh_la-casinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-casinhs.lo `test -f 'casinhs.c' || echo '$(srcdir)/'`casinhs.c + +libAsinh_la-zasinhs.lo: zasinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-zasinhs.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-zasinhs.Tpo -c -o libAsinh_la-zasinhs.lo `test -f 'zasinhs.c' || echo '$(srcdir)/'`zasinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-zasinhs.Tpo $(DEPDIR)/libAsinh_la-zasinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zasinhs.c' object='libAsinh_la-zasinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-zasinhs.lo `test -f 'zasinhs.c' || echo '$(srcdir)/'`zasinhs.c + +libAsinh_la-sasinha.lo: sasinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-sasinha.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-sasinha.Tpo -c -o libAsinh_la-sasinha.lo `test -f 'sasinha.c' || echo '$(srcdir)/'`sasinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-sasinha.Tpo $(DEPDIR)/libAsinh_la-sasinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sasinha.c' object='libAsinh_la-sasinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-sasinha.lo `test -f 'sasinha.c' || echo '$(srcdir)/'`sasinha.c + +libAsinh_la-dasinha.lo: dasinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-dasinha.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-dasinha.Tpo -c -o libAsinh_la-dasinha.lo `test -f 'dasinha.c' || echo '$(srcdir)/'`dasinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-dasinha.Tpo $(DEPDIR)/libAsinh_la-dasinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dasinha.c' object='libAsinh_la-dasinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-dasinha.lo `test -f 'dasinha.c' || echo '$(srcdir)/'`dasinha.c + +libAsinh_la-casinha.lo: casinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-casinha.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-casinha.Tpo -c -o libAsinh_la-casinha.lo `test -f 'casinha.c' || echo '$(srcdir)/'`casinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-casinha.Tpo $(DEPDIR)/libAsinh_la-casinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='casinha.c' object='libAsinh_la-casinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-casinha.lo `test -f 'casinha.c' || echo '$(srcdir)/'`casinha.c + +libAsinh_la-zasinha.lo: zasinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -MT libAsinh_la-zasinha.lo -MD -MP -MF $(DEPDIR)/libAsinh_la-zasinha.Tpo -c -o libAsinh_la-zasinha.lo `test -f 'zasinha.c' || echo '$(srcdir)/'`zasinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAsinh_la-zasinha.Tpo $(DEPDIR)/libAsinh_la-zasinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zasinha.c' object='libAsinh_la-zasinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAsinh_la_CFLAGS) $(CFLAGS) -c -o libAsinh_la-zasinha.lo `test -f 'zasinha.c' || echo '$(srcdir)/'`zasinha.c + +testDoubleAsinh-testDoubleAsinh.o: testDoubleAsinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsinh_CFLAGS) $(CFLAGS) -MT testDoubleAsinh-testDoubleAsinh.o -MD -MP -MF $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Tpo -c -o testDoubleAsinh-testDoubleAsinh.o `test -f 'testDoubleAsinh.c' || echo '$(srcdir)/'`testDoubleAsinh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Tpo $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAsinh.c' object='testDoubleAsinh-testDoubleAsinh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsinh_CFLAGS) $(CFLAGS) -c -o testDoubleAsinh-testDoubleAsinh.o `test -f 'testDoubleAsinh.c' || echo '$(srcdir)/'`testDoubleAsinh.c + +testDoubleAsinh-testDoubleAsinh.obj: testDoubleAsinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsinh_CFLAGS) $(CFLAGS) -MT testDoubleAsinh-testDoubleAsinh.obj -MD -MP -MF $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Tpo -c -o testDoubleAsinh-testDoubleAsinh.obj `if test -f 'testDoubleAsinh.c'; then $(CYGPATH_W) 'testDoubleAsinh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAsinh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Tpo $(DEPDIR)/testDoubleAsinh-testDoubleAsinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAsinh.c' object='testDoubleAsinh-testDoubleAsinh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAsinh_CFLAGS) $(CFLAGS) -c -o testDoubleAsinh-testDoubleAsinh.obj `if test -f 'testDoubleAsinh.c'; then $(CYGPATH_W) 'testDoubleAsinh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAsinh.c'; fi` + +testFloatAsinh-testFloatAsinh.o: testFloatAsinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsinh_CFLAGS) $(CFLAGS) -MT testFloatAsinh-testFloatAsinh.o -MD -MP -MF $(DEPDIR)/testFloatAsinh-testFloatAsinh.Tpo -c -o testFloatAsinh-testFloatAsinh.o `test -f 'testFloatAsinh.c' || echo '$(srcdir)/'`testFloatAsinh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAsinh-testFloatAsinh.Tpo $(DEPDIR)/testFloatAsinh-testFloatAsinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAsinh.c' object='testFloatAsinh-testFloatAsinh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsinh_CFLAGS) $(CFLAGS) -c -o testFloatAsinh-testFloatAsinh.o `test -f 'testFloatAsinh.c' || echo '$(srcdir)/'`testFloatAsinh.c + +testFloatAsinh-testFloatAsinh.obj: testFloatAsinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsinh_CFLAGS) $(CFLAGS) -MT testFloatAsinh-testFloatAsinh.obj -MD -MP -MF $(DEPDIR)/testFloatAsinh-testFloatAsinh.Tpo -c -o testFloatAsinh-testFloatAsinh.obj `if test -f 'testFloatAsinh.c'; then $(CYGPATH_W) 'testFloatAsinh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAsinh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAsinh-testFloatAsinh.Tpo $(DEPDIR)/testFloatAsinh-testFloatAsinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAsinh.c' object='testFloatAsinh-testFloatAsinh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAsinh_CFLAGS) $(CFLAGS) -c -o testFloatAsinh-testFloatAsinh.obj `if test -f 'testFloatAsinh.c'; then $(CYGPATH_W) 'testFloatAsinh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAsinh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/asinh/casinha.c b/2.3-1/src/c/elementaryFunctions/asinh/casinha.c new file mode 100644 index 00000000..76108aaf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/casinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asinh.h" + +void casinha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = casinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/casinhs.c b/2.3-1/src/c/elementaryFunctions/asinh/casinhs.c new file mode 100644 index 00000000..0d90c5ec --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/casinhs.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula asinh(z) = -i asin(i z) +*/ + +#include "asinh.h" +#include "asin.h" + +floatComplex casinhs(floatComplex z) { + floatComplex i_z = FloatComplex(-cimags(z), creals(z)); + floatComplex asin_i_z = casins(i_z); + + return FloatComplex(cimags(asin_i_z), -creals(asin_i_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/dasinha.c b/2.3-1/src/c/elementaryFunctions/asinh/dasinha.c new file mode 100644 index 00000000..0b6caf84 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/dasinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asinh.h" + +void dasinha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dasinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/dasinhs.c b/2.3-1/src/c/elementaryFunctions/asinh/dasinhs.c new file mode 100644 index 00000000..1e7c3037 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/dasinhs.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula asinh(z) = -i asin(i z) +// In real case asinh(z) = imag(asin(i z)) +*/ + +#include "asinh.h" +#include "asin.h" + +double dasinhs(double x) { + return zimags(zasins(DoubleComplex(0.0, x))); +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/sasinha.c b/2.3-1/src/c/elementaryFunctions/asinh/sasinha.c new file mode 100644 index 00000000..e5dc9a32 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/sasinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asinh.h" + +void sasinha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sasinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/sasinhs.c b/2.3-1/src/c/elementaryFunctions/asinh/sasinhs.c new file mode 100644 index 00000000..ab12d16d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/sasinhs.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula asinh(z) = -i asin(i z) +// In real case asinh(z) = imag(asin(i z)) +*/ + +#include "asinh.h" +#include "asin.h" + +float sasinhs(float x) { + return cimags(casins(FloatComplex(0.0f, x))); +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/testAsinh.h b/2.3-1/src/c/elementaryFunctions/asinh/testAsinh.h new file mode 100644 index 00000000..4352300a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/testAsinh.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTASINH_H_ +#define _TESTASINH_H_ + +#include +#include +#include +#include "asinh.h" +#include "constant.h" + + +void sasinhsTest(void); + +void dasinhsTest(void); + +void casinhsTest(void); + +void zasinhsTest(void); + +void sasinhaTest(void); + +void dasinhaTest(void); + +void casinhaTest(void); + +void zasinhaTest(void); + +int testAsinh(void); + +#endif /* ! _TESTASINH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/asinh/testDoubleAsinh.c b/2.3-1/src/c/elementaryFunctions/asinh/testDoubleAsinh.c new file mode 100644 index 00000000..105c32af --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/testDoubleAsinh.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAsinh.h" + + + +#define SOURCE {-1.3576117896733277401466,-1.7637832035201410629810,0.3855566139299755334946,\ +-0.2160798468986061537933,0.5079016244365412990902,-0.6713405437771273742698,\ +1.2405146112769958044453,1.3996914808133518182132,2.455810932856137718261,\ +-0.140780207215658148545,-0.4702849878182233100965,0.0273321471208497618344,\ +0.1272959744763040301763,1.0077609385751984394375,-0.5992823608151862657678,\ +-1.4909735993420030197854,1.1850328323549159659223,-0.7532372700108580509948,\ +0.1544844959811866313970,-0.4395251247591652199453,-0.1710077835697096926282,\ +-0.0020392103157046703732,2.3911285878389949566269,-1.8171171150936700211531,\ +-0.7159791420443786247318,0.5100070355081758322058,-0.9023845512384770506387,\ +0.1404573536528139765522,1.101925188407546940539,-0.0755748286838698046797,\ +0.0052019860396882644168,-0.3525317421211751067744,0.9599782396584397581307,\ +-0.3373393328184763340083,-0.9424787821879185845120,1.107342433121214275715,\ +0.5275760618563184456420,2.2874014544326271014540,0.8431549305721607323605,\ +-0.1180124731434434998123,-0.4202553394312918411124,-1.114616954771672663327,\ +0.7423526085481280123446,-0.8110912540737037490501,-0.2279425085104251347268,\ +0.6450672141930872127702,0.7812946955887702937815,1.4559939295961445981931,\ +1.4808632601102580395036,-0.0561674797508281767322,-0.6499637724416639228409,\ +0.9406577697059905762700,0.4408659857477613686072,1.0630757257539220628217,\ +-1.3783233641019425608221,-0.3062086297728683903507,0.3570701509900506276374,\ +0.2722352561686949279363,-0.8234027247256571202527,-0.5990920922251514735279,\ +0.8126089186562406307957,-0.9202541957145593531919,0.4637689483065319806521,\ +2.7285780311422769273122,-0.5523000528063060077244,0.5645499540468182919639,\ +-0.1966239792749471526623,0.3232076144184721222530,0.2044915219084416369011,\ +0.9122595139735795166658,1.32862804461268768641,-0.3933121244849541731092,\ +0.6800596076198115458311,-0.0390966465388340317366,0.4460664717379928534413,\ +0.0466968662605830517331,-1.159097013642337747896,-0.1516000867442619526315,\ +1.099835547132880231302,-1.8591997482220850024248,-1.5859733492347323213778,\ +-2.3518422239705527587716,-0.0363309315202365243347,-0.3671077430846361733252,\ +1.4974841041542252817464,0.1166082461631383904166,0.6150562435701190100446,\ +-1.1854669210396810985486,0.3562903039222897749738,0.3468046496992864269338,\ +-0.7767949783190361001672,-0.0388605946733660209680,0.4658948000641440767566,\ +2.5397452836287333077792,-1.6499955625089919308834,-1.730408375709416413102,\ +-0.5118965544481819396339,0.6229106301535243250811,1.2541834743916775440908,\ +-0.4242067654129669240781,-2.4609745338396713520979,-0.5875679117078018709464,\ +0.0525256277866840218249,-0.0221901005868065138993,0.0047340660621973179242,\ +0.5954335288237887491292,1.240326181995874410546,-0.4474314847009220885710,\ +0.309985603496633732590,0.1897272751476858920761,-0.5041309171227571495066,\ +-1.0407049076417729249755,-0.8790182225827031237131,-0.8241442015820352740008,\ +0.0114520840633361691702,-0.8375012162452729613804,1.5044689875616372720657,\ +-1.4872169103117691690841,-0.9491620445763213620438,-0.4714572242020408365804,\ +-0.9944436112957297790871,-0.7897744853013518584461,-1.9610605179993771951530,\ +-0.5551411828413486126976,-0.1498033190111577317438,1.049612455441040648196,\ +-1.873247408264758551155,-1.7768646550852811305532,2.055125969134249608317,\ +0.4181799324473139956027,0.4756981765178688870144,-0.0497090050304667893655,\ +-0.8254170186481527560218,0.3315212467523889205978,-0.1049083295446031904863,\ +0.9436361823785577307433,-0.4297495677869329622212,0.6041720693587251389545,\ +-0.5126921017648137235412,0.8253623930867394209443,-0.5636867633411185574133,\ +1.4780035136607696522049,-0.1150898513104453707578,-0.0895959753888824761425,\ +-0.1719733530741588689583,0.2269131790250100699780,2.0342102181126362481223,\ +-0.0976186373893909720145,-1.0193857468205604899,0.778026114056752038373,\ +0.3469309321844699645077,-0.2119385547567329830532,0.1122013143743656737872,\ +0.5130455426994967593757,-0.9836962738165191399986,-1.8662473753394661635241,\ +0.5046191490309642757595,0.5397589965174257597980,0.1495290449776452701425,\ +-1.0010126697848658050560,-1.231087303316227510308,0.493771591129457787517,\ +0.0084749296034232757258,0.6528794554325030308206,1.3165434517533367575481,\ +-0.7644706245855447113158,1.60959294894722515501,-0.3945002118117288958388,\ +-1.7397191133485980785167,0.7283944071784652640744,-0.8252534213629215686936,\ +0.1067480143242338502807,1.4303021806407054672405,-0.9653188502218088551388,\ +0.3473141482678416824825,1.3246017895509272221943,2.2493951812296155701176,\ +-0.6569708783346918101742,-0.321524642114760117462,0.6051546744959480639281,\ +0.3028414522677088660529,-0.6449695892069078340114,0.3426130327302095435194,\ +-0.9643932135296735541630,1.3325612893853038265490,-1.628074335418207230219,\ +0.7075076309451185929689,1.0853008279162978944044,-2.3506278976788554935240,\ +-0.1463993258475799474905,-1.0813242242905494183702,0.8848173893719444293993,\ +-0.8759582027327027509145,-0.8344888331049786778237,-1.0485734628076319729928,\ +1.9962933549994803517080,1.2493174700563109968954,1.1394362749053514871633,\ +-0.2197402489428784411185,0.3152457615995896134109} + +#define RESULT {-1.1130949556588403126511,-1.3327159168755193796585,0.3765918165954149632313,\ +-0.2144327449409605401698,0.4882680607211341006213,-0.6290298228269889380115,\ +1.0416537998862092084806,1.1378027100741174848508,1.6306935238556961031975,\ +-0.1403192842222721059553,-0.4544772654936784506141,0.0273287452012760077869,\ +0.1269546678262620797994,0.8868507654832032960357,-0.568209430801213888351,\ +-1.1897458189645284676317,1.0063560088725012064970,-0.6957349846601869058915,\ +0.1538765289352577170234,-0.4264787556420423508818,-0.1701850823931514988807,\ +-0.0020392089024058542880,1.6060204471410550741695,-1.3587234662009097796442,\ +-0.6657080515933866404765,0.4901444289074484705893,-0.8106383081775411225678,\ +0.1399995760847499992607,0.9516413314489057251322,-0.0755030713336432846017,\ +0.0052019625784457792020,-0.3456102163306026819889,0.8527889195091039598040,\ +-0.3312482849825826303203,-0.8401095674014050773692,0.9552769725934540101520,\ +0.5057396137890651788283,1.5652435713544583517631,0.7660130911978242362892,\ +-0.1177402502570575049123,-0.4087756154845550438104,-0.9601436921836913329642,\ +0.6870180358136419584980,-0.7413056602559416896625,-0.2260133834402236752137,\ +0.607083791196235011967,0.7179951440904949189203,1.1701025225825925080159,\ +1.1841009702891132082669,-0.0561379888707583402097,-0.6111939387463327655325,\ +0.8387837653657870262691,0.4277059773372764994726,0.9252791007143230661569,\ +-1.1253178411086610655,-0.3016147291750726489035,0.3498873875038394642978,\ +0.2689800399453179946541,-0.7508385861915640724362,-0.568046218336308084140,\ +0.7424839156827229835756,-0.8238461490952974086710,0.4485733597383650406165,\ +1.7289314850929364819621,-0.5274948117440469985695,0.5381900831525847639369,\ +-0.1953785803896550821168,0.3178295637778837390286,0.2030924952508830483300,\ +0.8179516300830952379997,1.0957859238613814056862,-0.3838186466908449778757,\ +0.6362542602331872076959,-0.0390866932016993157140,0.4324599635687117471505,\ +0.0466799117153936446445,-0.9895220015504287980335,-0.1510253177999459628378,\ +0.9502363023238964423456,-1.3788344661100282451116,-1.2415257056941875202227,\ +-1.5907556842186492129798,-0.0363229438428324669097,-0.3593253093499745309813,\ +1.1933668386250828596928,0.1163455870775610828671,0.5816925710627691703536,\ +-1.0066359311257613295965,0.3491528652755562234233,0.3402040976525141924292,\ +-0.7144454627768908050456,-0.0388508204533765666433,0.4505011238681072560652,\ +1.6618918653106427019139,-1.2751867809374948237178,-1.3161363888578068159774,\ +-0.4918270306483571441269,0.5883710719531183297448,1.0502037442465796956981,\ +-0.4124158523209305871049,-1.6326391191927918100646,-0.5581352790789477769096,\ +0.0525015052004256660423,-0.0221882799205271458165,0.0047340483795489029725,\ +0.5649052397488373289391,1.0415355372390291410767,-0.4337062598861871065559,\ +0.3052242689715726209343,0.1886070763157441099178,-0.4849035737297955339642,\ +-0.9098654196250280934422,-0.7931897365608786554247,-0.7514108860522482613575,\ +0.0114518337541998777018,-0.7616847132530191188948,1.1972396117455856856537,\ +-1.1876514534079536389299,-0.8449650527155313506356,-0.4555378112663634460056,\ +-0.8774391641368382011024,-0.7246635421278604383133,-1.4260843463597587810199,\ +-0.5299803397861506670807,-0.1492486124002971037417,0.9160234338985321356219,\ +-1.3854693118499961101975,-1.339149741178953689769,1.4680202081995989971119,\ +0.4068615933419172381313,0.4593706772145678129959,-0.0496885560579486892929,\ +-0.7523928088748154108245,0.3257305872841815830299,-0.1047168437798993573251,\ +0.8409515953244546260237,-0.4175134246305884921924,0.5723991247141133609233,\ +-0.4925350737504667897326,0.7523506802368506996004,-0.5374382677208087155662,\ +1.1824994989469264083937,-0.1148372801243118385139,-0.0894765353119480744137,\ +-0.1711367593250398000393,0.2250096841326320595833,1.458830901005770064316,\ +-0.0974642573471812823094,-0.8950151622701945086646,0.7154174354590427942213,\ +0.3403234064876564657354,-0.2103831526165375054305,0.1119672185619183107930,\ +0.4928495654965970862449,-0.8697979955142227659337,-1.382167978700230337452,\ +0.4853394960873701480253,0.5164877528407616491535,0.1489773595696585739567,\ +-0.8820894714376154022162,-1.0357236173571910953228,0.4756340389263381540630,\ +0.0084748281555349427863,0.6136369862616236625641,1.0884976091419886756739,\ +-0.7046834979102297724651,1.254056645766540967202,-0.3849240656020492257205,\ +-1.3207856959376931271777,0.6757730196964429891793,-0.7522666350656633804661,\ +0.1065463121770779120201,1.155469512029384748786,-0.8566364746899163273852,\ +0.3406854318087456645614,1.0933623617966952146219,1.5499122891284196068540,\ +-0.6170596901911918896744,-0.3162277642902040497574,0.5732399668068761666717,\ +0.2983935984890606074593,-0.6070017519078403367416,0.3362413129909137543549,\ +-0.8559703502467290725519,1.0981489764525824703867,-1.2637694566754069658288,\ +0.6588062099967662010869,0.9404229224232689698937,-1.590280419973736147909,\ +-0.1458813492114517662568,-0.9377256428290303702511,0.7975391112088442424621,\ +-0.7908896752603351565369,-0.7593735645090678998415,-0.9153065625835585805703,\ +1.441976583204267914340,1.0471665685842834747632,0.9766162941953494547320,\ +-0.2180092160957680658129,0.3102448153202543856821} + + +#define ZSOURCER {0.1344153599005591392945,-1.5506135890216410366804,-0.6851077106999041710367,\ +0.4218254137797516900577,0.4563186792784946765877,-0.0065657292828231895304,\ +-1.4909053660893785142605,0.3020078702400747494572,0.9932063361099687792688,\ +-0.4433136654301204071515,-1.2230912696221460933543,-0.4536074652511654647924,\ +-0.391728395210721336284,-1.0754644749418362792426,-0.3220075728643138068819,\ +-1.8561721663709394025688,0.9166361449615868517427,-0.4865676280317013935317,\ +-0.0798825634299456799337,0.7227932226211960520246,0.4367586477867241301354,\ +1.100708465607679542586,0.7887304681164191144660,-0.7638617615134800642451,\ +-1.1157778009204568636648,-0.0715514394916681589764,0.1759955522740979383389,\ +0.6521704771208436390850,-1.2566799200234315403435,0.7200913102328155845910,\ +-0.3420550667112094989086,0.2477935566640704911912,2.0205940701992970431888,\ +1.3930268695166325709778,-1.2605487293586259411882,-0.1650288634784027319569,\ +-0.0981081330322927658294,0.4100655669623185506367,0.7181621264742018562188,\ +-0.4072630840419457221024,0.5156039430832634051782,0.3795734781395984636099,\ +0.3638182194100580413298,0.8461109103084072380341,0.6093905395787995171730,\ +-0.2503150987783319125768,0.6420253514641469649860,-0.0446314315869399819148,\ +0.2916988037421140433914,-0.3385179884731976951429,0.4290547410494972568884,\ +-1.7617580904822116583119,0.0242252644066083683283,-1.6979773429025941666737,\ +-1.5685374082937220130418,0.2235220732382334762889,0.3158040584918663795655,\ +-0.3902896794740354780018,-0.2554731784615550393980,-1.2399505074947390070861,\ +-0.0969941013810174113008,-0.7835998873676693898815,-0.7420185738540517883521,\ +0.1215847078229450456410,0.346331144382537814419,-0.1289657459832099506425,\ +-0.2972509851392565738415,0.5513684955823417999099,-0.3924372370508544816126,\ +0.6550918706396454682661,-0.0941496244175293039991,-0.6298808116548983981886,\ +0.6046273337026021321705,1.154776599111647650275,-1.3475403271419439388268,\ +1.6941635868888738070126,-0.9698161544930480326698,0.321333626597992860763,\ +0.8077673631787291030903,0.4495327099693594008478,-0.2815944820401523052134,\ +0.5503911320698096076853,0.4415940612643087237466,-0.0426890352355768151749,\ +0.4574486820024267763607,-1.8233880107049311725120,-1.2644581540832258159668,\ +1.8182154451811951556550,-0.4365692326313646565161,-0.7834466000398015994577,\ +-0.2438122853723030947215,-1.238179759598785789620,1.0164635023339896324757,\ +1.1566875865587697980175,0.7525323014625638906594,-0.5302881550474964900133,\ +0.9946348209098996306921,-0.2846244148716441380031,-1.4971569165104527954213,\ +0.3858437386079422992680,0.5857497893655945198077,-0.5407108407032041874629,\ +-0.3913628275219260821416,0.394150621449124050066,-0.3677461583219513441279,\ +-0.3580090499105863521834,1.2238011161239454871463,-0.0394483595782139026542,\ +0.6819869387311006114771,0.0482725904112477066654,0.6909298247176761664790,\ +1.3224847954183336362632,1.4037115762091163517766,0.8467069128655627663349,\ +0.5210759995289813151231,-0.2055830325344648878971,-2.0192992995259366750815,\ +-0.5304191698016149647543,1.09472080578548336405,1.3620867421349684978082,\ +-0.1808242201566298279491,-0.0194904828858388744217,-0.4683180277648698042192,\ +0.7819869233308703870833,0.1429480494914288357666,0.2773646548392231792057,\ +0.6096476038786750040188,-0.5960852983339143262853,-1.963887290912852856550,\ +0.9721629223729456592551,-1.6452050961761244263215,-0.3723296190652639614527,\ +0.4738633834151028678683,-1.057700746568926764013,-0.4968910756708404541371,\ +0.2577873463311163293454,-0.0737988795500269523231,0.1977793752007929173331,\ +-0.6149210248305110315670,0.9875664176674272543011,-0.4642707502431423494116,\ +0.0643413048674845028385,0.6498540575999842694443,0.7121440663138152160627,\ +0.2359686505725840099945,-0.2350484222736072826,1.427908791905283747425,\ +-2.1717696603112686126735,-0.7707405591334609562537,0.8328839983146067993403,\ +-0.8442913355247498863321,-0.9327775490791254675571,-0.1481361786955139869804,\ +1.3160166106571784538914,-1.641046498941054032628,1.1071159236267200665083,\ +-0.1637297725664050573879,0.0063889356258534446900,-0.1876117315630027870821,\ +-0.0437156856017992812014,-0.5047856242612756005883,-0.4377080020532335691286,\ +0.8918622387976500309748,-0.7125206673387354250337,-1.8420141064608679393,\ +-0.6323236657671401639291,0.4307970989642812553733,0.0065706118931696342461,\ +-0.2380637309545470814420,-0.9281665549650555124828,1.2462413799568070604806,\ +0.1118120260462647785893,0.5017427788303500113543,0.1413380949238240147370,\ +0.5728474017890546887699,-0.2522748296906130449635,-0.4384774472140181011959,\ +0.0497517512937118988603,0.5020924835745471659365,0.6928164360637126817366,\ +0.9383192238380625438410,0.9522811808490952989459,0.6799302528285031677058,\ +0.5017679240717164423913,-2.1626383553421018035579,0.4579762384000223285341,\ +0.0586823729814069730559,-1.0035555258293702429739,-0.1166748359615927543853,\ +0.8530686378617126086610,-0.5952441201854786756442,-0.9104692400773028992944,\ +-0.1222081949574846115869,0.8743861864198215760879,-1.7814901158856750740256,\ +-0.1655434636829379024814,1.2699075561256230049167,3.1587625106365013749610,\ +0.8610776754247619901861,-0.0100004380673695478232} + +#define ZSOURCEI {0.9250286334648400998759,0.1065362941212572023275,-0.8122748012511081805442,\ +2.9016509109873367400212,-0.879282905363888867001,-0.3325238972742790566350,\ +1.2084799362120550725308,0.2580513186266746861186,-0.2529978784629969279507,\ +1.6363224419507169660193,0.3632057263498695842685,0.3611017132584669053763,\ +-1.2067543995469365292195,-0.9261214746973902567362,0.5500770410591231396324,\ +0.3509274981930612380410,-2.0620828383452867171854,0.1301261656898765051160,\ +-0.0829640021096160473757,0.5497292800458170036748,-1.586103376800369391120,\ +1.1212128658770057487715,-0.0802149047940418080671,0.3400568097779858578456,\ +0.5992917235464352287977,1.2934484737369573714716,-0.1770100915330515556345,\ +-1.6783588206143511545321,0.3877335362207995905770,-0.3290626192650726866695,\ +-0.7735806757117498211329,1.4288193530454935675778,-0.0608386450296815664562,\ +0.2853217242027552558170,-0.3091484421032868468160,0.2351673955360732704012,\ +0.8718242905301006873131,0.9043814712183079196350,0.4001603453209788274769,\ +0.2902565872125924539837,-0.1051862594971314374126,-0.2633497801636938695502,\ +0.5605928815183498503671,-1.0135332223701010168071,1.3762849538989350151041,\ +0.0221113855817069056287,0.296045052860035018405,0.1323984531412186749222,\ +-0.5439657044615130443432,0.7105758550684416752219,-1.988902172751357388947,\ +0.8370036445008282033342,-1.361827445493777322127,-0.2908726176761944892668,\ +0.7582058566306987268391,2.2582687071318150451305,-0.838995532132944754622,\ +-0.0049693115325542529942,0.8948621233346091274896,-0.1820415696112677728102,\ +0.0164009645281327567923,0.4631157184786182656744,1.2818863747394355634412,\ +1.37735582155233560187,-0.7661687725125947423521,-0.8188017890741936533061,\ +1.3941959606340814659120,2.0721869090596265472470,0.9329858014692479217800,\ +-1.0023470169799657547571,0.1352029091047084741195,0.5763346694547388793239,\ +-1.492034523395888490072,-0.4804977288873880647557,0.7911732889577677285686,\ +0.1745293679511154827377,0.0354831535332537570393,-0.8628629256538601355331,\ +0.1942834096659604437018,1.3466596448020036191906,0.3364543941938548110571,\ +-1.109797124842869298078,0.1809508886112952685821,0.5725159396053964844242,\ +0.6787472822917395287590,1.4922528447187788369632,-0.9855408452288743070824,\ +2.0147405762642014437347,-0.1974169216352719968821,-0.2472797570908096820297,\ +-0.3003777280233598800940,-0.6957353172991608269982,0.8954567399776292013769,\ +0.0025734217968703923703,1.2028191624106452373155,-0.3976568161030914483334,\ +-0.9486032699014914637559,0.344203116731234826098,-0.1282579491971870822020,\ +0.2354837848969928981724,-1.0123893486718691381299,-0.1455435264750559176683,\ +-0.0385439121492695893623,0.2704776801120854501370,0.9996348746916957628272,\ +1.1879952493572987215487,-0.1421627190737907164841,-0.9134168336317867176177,\ +-1.3273949616244651306118,-0.2266260602581666450117,0.0136941574262192684169,\ +0.8667822397875659667932,-0.8918524882230300931951,0.5818810906621436629393,\ +0.5786477410918646757665,-1.2824019249961673416749,-0.8858272202103619763491,\ +1.49931415247364041576,-0.3191008638398869501351,-0.6302800825827241659738,\ +-0.9307697616588104239099,-0.2218962076254625825911,0.5504657591791385362612,\ +0.7937732776747626894931,0.4530121091137990219089,-0.5561836772913717474864,\ +-0.0487810094749783207391,1.0373690852013959240452,-1.9605345216190741552964,\ +-0.6318190008183720562940,-0.2595506312908315571519,1.6655693943633802511783,\ +0.2643484753712377899326,0.5166487752761181884154,-1.7642021092407271787295,\ +0.9519817124353935344772,1.5941109627321103925368,-0.3268346133298423716873,\ +-0.8591341754919610274044,-0.5067465121338621258928,0.4012524027420211192307,\ +-1.3781772559142455580883,-1.0900200484217259511155,0.7071849131547247591101,\ +0.6311112492498477388736,-1.5661486235109134401711,-0.3037032596268335327139,\ +-2.3928711979350367755615,0.9280630230889591603116,1.234345031017325400313,\ +0.0245382276611107209841,-1.7795591476102954331395,-0.1457340296796875434016,\ +-1.4175919090731374794245,-1.0931645829165108629866,0.0976120560124896369247,\ +-0.4917932561715864236973,0.3236361331498361360026,-1.3493789441767958248164,\ +-0.4975410901203008995353,-0.5175498508985710843788,1.9028534065523732277114,\ +-1.0213015320689262654952,0.7201673839470011939667,-0.229479324750370056174,\ +0.0507808834449509222120,-0.6036524407661360003274,-0.3189899214184117592907,\ +0.8969390978377852485792,0.0689550751790670851671,-0.3842312216289716086948,\ +-0.5817559662860881664059,-1.4228206622942274339749,-0.8055937171612096436846,\ +-0.8761791574203163790457,0.6999940081500163335804,0.3592083211755666694032,\ +-2.2759824091756848396528,1.1126243656877470300515,-1.490042708505755930659,\ +-0.2517675074289520420479,-0.4649616224894683735869,-0.9304122891120238936224,\ +-0.2780945839682648634827,-1.186365868114249266796,-1.0805465619847403058174,\ +-0.2982113561322028982836,-0.4608151973468663786804,0.5142626215675811796046,\ +-0.8962085262358048254328,-1.8912922138922239057024,1.5339839202719194322100,\ +-1.0493592314888038341536,1.5275565058768361126340,-0.3000289995792813080300,\ +-1.2901253199534357118949,0.4517205659557054775455,0.1925085892467791881533,\ +0.4244705571771024699146,1.1465794102472002258253} + +#define ZRESULTR {0.2881823261718455264635,-1.2239148834349047323400,-0.7845879395690421587162,\ +1.7398908843418365854916,0.6267968040978579846723,-0.0069618200210163757799,\ +-1.3647060336777470102021,0.3067781755755824568688,0.8879601142484547793288,\ +-1.1408081118402808584733,-1.0511217892257147532575,-0.4630227853264242132703,\ +-0.8052300885146775888401,-1.0799054881923455528892,-0.3673239873834487356774,\ +-1.3895193771431015861140,1.4748704381210364644517,-0.4721815868535457205724,\ +-0.0800715444386163321955,0.7328675926305248111703,1.1062012776691256821238,\ +1.1578188890116758447135,0.7250736097899580512305,-0.7268209399811761395327,\ +-1.020749615675486277055,-0.7543891378811746761812,0.1777916795470285138414,\ +1.224903809672051702151,-1.074529895353530717372,0.6903548013878436639956,\ +-0.4611640141379182988857,0.933556473565831823613,1.4531339378119088046049,\ +1.1451427225776011908920,-1.0686132863053487973559,-0.1688483441440512822229,\ +-0.1889456477264452038956,0.5985578048499338166266,0.6993236665323845357989,\ +-0.4109810453160360754765,0.4971360116983927213141,0.3821580291233257486994,\ +0.4128919091647823558233,0.9758538921704605906271,1.0346135696067118026065,\ +-0.2478280180540722854587,0.6216905071606976251886,-0.0450118169844396301404,\ +0.3340415020637265142156,-0.4315313860868430495543,1.3446595868643815840926,\ +-1.4033414360880258620057,0.8274220763035017300879,-1.309144795084008494612,\ +-1.3004176310924011605863,1.4613978516551788811029,0.4652521895005036212112,\ +-0.3810083873666035292338,-0.4305652750257212835194,-1.0463819862831613693999,\ +-0.0968555231163464591670,-0.7621978211341690068181,-1.0442639351316740370379,\ +0.8551375533721097266238,0.4624338658491132791895,-0.2135461711123592121186,\ +-0.9192783709328955499274,1.406572519212488048268,-0.5996917427163407365853,\ +0.8472849136812159454024,-0.0948718277212909494311,-0.6635046470522460992925,\ +1.102552918644890800337,1.0241591511876448894469,-1.1946095915247210150767,\ +1.3012416677676885701231,-0.860094399966521483414,0.4848763007604853791932,\ +0.7459402751068522352540,0.9429407450799555112653,-0.2932662625241302944978,\ +0.8365772498525353428889,0.4339900657778844039747,-0.0520088659229247518567,\ +0.540163948037489571874,-1.5617045052623743650599,-1.1990755672824380262398,\ +1.6897714229424107834632,-0.4304392780607278479188,-0.7314935627224536940361,\ +-0.2521660858364912494167,-1.1139709472810304102808,1.03593284093582016503,\ +0.9879482215425008373444,1.008898373366306833177,-0.5387894626210441018088,\ +1.0404295395317768591070,-0.2970761763070669525533,-1.1952939328908356309000,\ +0.3857997224260597546319,0.8038817262315489653446,-0.5212531537640049394966,\ +-0.3822389517390957225373,0.3966495909859810709008,-0.6230521638604892276092,\ +-0.7692209701300163349202,1.03425437487647720047,-0.0946733232120821749378,\ +1.0396309891046779938506,0.0495385539831420876333,0.6452562376798283150237,\ +1.1985497422790862831476,1.2458585900431864423865,0.8349246161988523873276,\ +0.5689579490080320933743,-0.7806209699664544698905,-1.5187452500641256403213,\ +-1.0796802038517956390251,0.9639374126836365297422,1.1711728912763936794050,\ +-0.362488012679416937711,-0.0199872602643281528645,-0.5128264059242761963020,\ +0.8492028743473079011039,0.1591587587129435210631,0.3212111561314560104208,\ +0.5775318673000989777577,-0.8249558967503766160334,-1.7154192273737123297650,\ +0.9346304365709510175719,-1.2804432024400131950870,-1.1426657840798974952179,\ +0.4703017265736584850977,-0.9677493848474170157203,-1.2320829767979621927054,\ +0.4762683633703864716225,-1.0444970147674126348392,0.2072645201710894835578,\ +-0.7498010260478793487238,0.9188781401771745072082,-0.4789588845434366026765,\ +0.8476937452776511783270,0.8895027647705600060135,0.7682169660294876356588,\ +0.2922093151936491217668,-1.0429114806489117039945,1.166492728893671504409,\ +-1.8646253504096552688907,-0.8923239533314403226782,1.0666374040344190898821,\ +-0.7669950473749445052363,-1.3585386555510787776058,-0.1491456224121993634490,\ +1.354597929546794699007,-1.4004360287243708960148,0.9567139977921835791719,\ +-0.1859618971982733570680,0.0067522660769214690180,-0.842830481930881947328,\ +-0.0503539309377906904586,-0.5389456072426579424928,-1.2991753231583602623544,\ +1.0064698858838660999737,-0.7727166159011478185903,-1.375918311051623987851,\ +-0.5968365322787659854598,0.4909328325978893903248,0.0069327197759769939797,\ +-0.4109069224660110153380,-0.8305261099098545374275,1.067766372332880076002,\ +0.1364036525382384124061,1.0185816452043403579353,0.2263896344197315613211,\ +0.7241797053868859190828,-0.3310339119084142467386,-0.4485953806654829345568,\ +1.4637030484564286236804,0.8062581119903107218505,1.135230070733268981087,\ +0.8486739138084887779101,0.8869200257723099944940,0.8304138989692378958196,\ +0.4970805707137128659490,-1.6189532479764259242927,0.7536345887109229257916,\ +0.0614297741451279438740,-0.9217679644120017057318,-0.1351912284135200204016,\ +0.9344534227267771164804,-1.3237759469951597690596,-1.2409772949992454726953,\ +-0.4266400610039619012426,1.2242961173386468498592,-1.3507787481217943259537,\ +-0.7743193525686042910650,1.0905655681187926830944,1.869097852573508911078,\ +0.8141159942263986870614,-0.5353611933969746328188} + +#define ZRESULTI {1.0927665474832626291146,0.0577041411945533808114,-0.6605411939586326441898,\ +1.4173928005937053153929,-0.8196938376873322829042,-0.3389699587748392084485,\ +0.6182411929183926346809,0.2489298772050817232238,-0.1790179858054015138435,\ +1.2497543779018556175942,0.2282445233800083350673,0.3316185520857942714557,\ +-1.1178350760886399672955,-0.5992404494636266454322,0.5409431572062767257236,\ +0.165426376161976390611,-1.1122536593055589726475,0.1171231329897951256580,\ +-0.0827933061236485051682,0.4436212447193593200190,-1.2403328057018132568601,\ +0.6960798868922111193314,-0.0629757037081154352753,0.2697689038111338311055,\ +0.3922302209885859536342,1.4842743869253867128322,-0.1751428834182987837043,\ +-1.13801740936157136375,0.2394213509890497915134,-0.2668464988788373237760,\ +-0.7726426977316005473284,1.3382415873096298319922,-0.0269807302035863991185,\ +0.1656312162752983929703,-0.1911246952977092017356,0.2339836780169318453115,\ +1.0284310438096477824388,0.8686878315011077322794,0.3246111072217529036621,\ +0.2706500543034189298908,-0.0935407508346946525712,-0.2477506860556301926390,\ +0.5421539099371334158306,-0.7327711559744070068945,1.05214358953255682216,\ +0.0214509576394467729732,0.2493724089381304798163,0.1326531466862980457311,\ +-0.5409686898264083332322,0.7065143938000820744705,-1.3284854753780470648650,\ +0.3984512917058077308141,-1.5446072484052193463100,-0.1469509150678137976431,\ +0.3947301571210936610434,1.461008167394748147316,-0.8567501445560671280433,\ +-0.0046292376134026641879,0.9577036871573997300899,-0.1140752778705255016112,\ +0.0163250605343483005949,0.3628386917181465332050,0.9320951721399445277783,\ +1.44423353597128478754,-0.7628206936973814800140,-0.9280966118664348840639,\ +1.2849894108105837098321,1.2792864989827095190122,0.9061761299907579170210,\ +-0.8122605612540356734286,0.1350064725981316715586,0.4883936062374085174120,\ +-1.102637196793889051705,-0.3106468603302708908487,0.4543964386247798525886,\ +0.0885735454738456329249,0.0254706011136682855533,-0.8796254633651946486239,\ +0.151022627304807338655,1.1452851102523748938466,0.3283556388648877777392,\ +-0.9434455972747952667845,0.1659123702555805879300,0.6086281726098896616151,\ +0.631662047814702143356,0.6431181331610840157254,-0.5760553428914201301581,\ +0.8026360136122261401681,-0.1814351276467410234439,-0.1944579368330171531554,\ +-0.2953494745705410595704,-0.4250058789202441067445,0.599813865521373279499,\ +0.0016830438518425523946,0.8854731871017331723550,-0.3534985427172745442448,\ +-0.6383931728072353983805,0.3358307199066276060861,-0.0711733718807077142543,\ +0.2207727851446303901639,-0.8556718335996058577564,-0.1281371029552695606224,\ +-0.0358976629777693137524,0.2532084228703710415687,0.983986642358089413918,\ +1.1345925939829912820755,-0.0898559156199065373061,-1.1416915329673189560822,\ +-0.9870037974692073001748,-0.2283270051627071806077,0.0112664968061259064547,\ +0.4998464672322767698986,-0.4937534754955061888637,0.4389132738737425154518,\ +0.5191615917775272981416,-1.330080589614465180759,-0.3792401398168883108752,\ +1.1512099997314479971067,-0.2141264512433771194377,-0.3645359117298094808746,\ +-1.0609046855212507232125,-0.2237132816089271170057,0.5066458933231118288987,\ +0.6114387233853804115569,0.4637825784576218857147,-0.5570387380565021695489,\ +-0.0416532931678999865377,0.8675730496349238762832,-0.7521971544712148238787,\ +-0.4444425039044248570974,-0.1343255157657375076230,1.3031888522890535675458,\ +0.2398794824711508455461,0.3501788639961876947737,-1.2484148728039676790047,\ +1.0223862780907517766593,1.5114877336366283611113,-0.3256639805152193312132,\ +-0.7257147000802074421344,-0.3563177118938634091450,0.367466380314942664409,\ +-1.5032253124394940879682,-0.8731092741090689113292,0.5703012583169800864269,\ +0.6498833797759138164452,-1.3804786941428137669874,-0.1733188156619589748164,\ +-0.8098487944615534450676,0.7091099644264757806411,0.8627806630820323841036,\ +0.0187490818204580703132,-1.0316116049359651540840,-0.1446317495535741626256,\ +-0.7559013344655626243096,-0.5329078157992787057040,0.0653983668850169619358,\ +-0.5045465362161873912328,0.3295621318182701542376,-1.3711989596398608259875,\ +-0.5200355557922887728139,-0.4673488331710942134123,1.3098786184351398631520,\ +-0.7189565120188516900157,0.580208200526596162838,-0.1091990841314347954194,\ +0.0429221122996483323009,-0.5675416667058814645941,-0.3246554520854594838575,\ +0.9723329710924543123340,0.0505316478341986258238,-0.2385123070932486100126,\ +-0.6142986606043344677275,-1.1409813222703388824186,-0.9033119064286492250204,\ +-0.7584587763797572268487,0.7252421018090512427889,0.3319280479688784257775,\ +-1.5464687515566899467245,0.9763347698321626078055,-1.0511809923664583443781,\ +-0.1831638202759971745248,-0.3336438319634690841120,-0.7499286125479456277532,\ +-0.2495331996617490000201,-0.4693439688376106477818,-0.9839213631021112016484,\ +-0.3022296870844187743899,-0.3220832096726037319101,0.5347182539371353460211,\ +-0.6559994287878105900802,-1.2228456605235495935347,0.9588662882096035122714,\ +-1.2891530456629314294048,0.9731441796186428572213,-0.1461840118371629804184,\ +-1.3757278523698810435150,0.2762809284691948308321,0.0580458636704428015962,\ +0.3198225937522309325622,1.5529789344620548163789} + +void dasinhsTest(void) { + double in[]= SOURCE; + double res[]= RESULT; + double out; + int i=0; + + for (i=0;i<200;i++){ + out=dasinhs(in[i]); + assert ( ( (fabs(out-res[i])) / (fabs(out)) ) <3e-15); + } +} + +void zasinhsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out = zasinhs(in); + + assert( ( ( fabs( zreals(out)-resR[i] ) ) / (fabs(zreals(out)) ) ) <3e-15); + assert( ( ( fabs( zimags(out)-resI[i] ) ) / (fabs(zimags(out)) ) ) <3e-15); + } +} + +void dasinhaTest(void) { + double in[]= SOURCE; + double res[]= RESULT; + double out[200]; + int i=0; + + dasinha(in,200,out); + for (i=0;i<200;i++){ + assert ( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <3e-15); + }} + +void zasinhaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zasinha(in,200,out); + for (i=0;i<200;i++){ + assert( ( ( fabs( zreals(out[i])-resR[i] ) ) / (fabs(zreals(out[i])) ) ) <3e-15); + assert( ( ( fabs( zimags(out[i])-resI[i] ) ) / (fabs(zimags(out[i])) ) ) <3e-15); + } +} + +int testAsinh(void) { + printf("\n>>>> Double Hyperbolic ArcSine Tests\n"); + dasinhsTest(); + zasinhsTest(); + dasinhaTest(); + zasinhaTest(); + + return 0; +} + +int main(void) { + assert(testAsinh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/testFloatAsinh.c b/2.3-1/src/c/elementaryFunctions/asinh/testFloatAsinh.c new file mode 100644 index 00000000..ab6add0a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/testFloatAsinh.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAsinh.h" + + + +#define SOURCE {-1.3576117896733277401466f,-1.7637832035201410629810f,0.3855566139299755334946f,\ +-0.2160798468986061537933f,0.5079016244365412990902f,-0.6713405437771273742698f,\ +1.2405146112769958044453f,1.3996914808133518182132f,2.455810932856137718261f,\ +-0.140780207215658148545f,-0.4702849878182233100965f,0.0273321471208497618344f,\ +0.1272959744763040301763f,1.0077609385751984394375f,-0.5992823608151862657678f,\ +-1.4909735993420030197854f,1.1850328323549159659223f,-0.7532372700108580509948f,\ +0.1544844959811866313970f,-0.4395251247591652199453f,-0.1710077835697096926282f,\ +-0.0020392103157046703732f,2.3911285878389949566269f,-1.8171171150936700211531f,\ +-0.7159791420443786247318f,0.5100070355081758322058f,-0.9023845512384770506387f,\ +0.1404573536528139765522f,1.101925188407546940539f,-0.0755748286838698046797f,\ +0.0052019860396882644168f,-0.3525317421211751067744f,0.9599782396584397581307f,\ +-0.3373393328184763340083f,-0.9424787821879185845120f,1.107342433121214275715f,\ +0.5275760618563184456420f,2.2874014544326271014540f,0.8431549305721607323605f,\ +-0.1180124731434434998123f,-0.4202553394312918411124f,-1.114616954771672663327f,\ +0.7423526085481280123446f,-0.8110912540737037490501f,-0.2279425085104251347268f,\ +0.6450672141930872127702f,0.7812946955887702937815f,1.4559939295961445981931f,\ +1.4808632601102580395036f,-0.0561674797508281767322f,-0.6499637724416639228409f,\ +0.9406577697059905762700f,0.4408659857477613686072f,1.0630757257539220628217f,\ +-1.3783233641019425608221f,-0.3062086297728683903507f,0.3570701509900506276374f,\ +0.2722352561686949279363f,-0.8234027247256571202527f,-0.5990920922251514735279f,\ +0.8126089186562406307957f,-0.9202541957145593531919f,0.4637689483065319806521f,\ +2.7285780311422769273122f,-0.5523000528063060077244f,0.5645499540468182919639f,\ +-0.1966239792749471526623f,0.3232076144184721222530f,0.2044915219084416369011f,\ +0.9122595139735795166658f,1.32862804461268768641f,-0.3933121244849541731092f,\ +0.6800596076198115458311f,-0.0390966465388340317366f,0.4460664717379928534413f,\ +0.0466968662605830517331f,-1.159097013642337747896f,-0.1516000867442619526315f,\ +1.099835547132880231302f,-1.8591997482220850024248f,-1.5859733492347323213778f,\ +-2.3518422239705527587716f,-0.0363309315202365243347f,-0.3671077430846361733252f,\ +1.4974841041542252817464f,0.1166082461631383904166f,0.6150562435701190100446f,\ +-1.1854669210396810985486f,0.3562903039222897749738f,0.3468046496992864269338f,\ +-0.7767949783190361001672f,-0.0388605946733660209680f,0.4658948000641440767566f,\ +2.5397452836287333077792f,-1.6499955625089919308834f,-1.730408375709416413102f,\ +-0.5118965544481819396339f,0.6229106301535243250811f,1.2541834743916775440908f,\ +-0.4242067654129669240781f,-2.4609745338396713520979f,-0.5875679117078018709464f,\ +0.0525256277866840218249f,-0.0221901005868065138993f,0.0047340660621973179242f,\ +0.5954335288237887491292f,1.240326181995874410546f,-0.4474314847009220885710f,\ +0.309985603496633732590f,0.1897272751476858920761f,-0.5041309171227571495066f,\ +-1.0407049076417729249755f,-0.8790182225827031237131f,-0.8241442015820352740008f,\ +0.0114520840633361691702f,-0.8375012162452729613804f,1.5044689875616372720657f,\ +-1.4872169103117691690841f,-0.9491620445763213620438f,-0.4714572242020408365804f,\ +-0.9944436112957297790871f,-0.7897744853013518584461f,-1.9610605179993771951530f,\ +-0.5551411828413486126976f,-0.1498033190111577317438f,1.049612455441040648196f,\ +-1.873247408264758551155f,-1.7768646550852811305532f,2.055125969134249608317f,\ +0.4181799324473139956027f,0.4756981765178688870144f,-0.0497090050304667893655f,\ +-0.8254170186481527560218f,0.3315212467523889205978f,-0.1049083295446031904863f,\ +0.9436361823785577307433f,-0.4297495677869329622212f,0.6041720693587251389545f,\ +-0.5126921017648137235412f,0.8253623930867394209443f,-0.5636867633411185574133f,\ +1.4780035136607696522049f,-0.1150898513104453707578f,-0.0895959753888824761425f,\ +-0.1719733530741588689583f,0.2269131790250100699780f,2.0342102181126362481223f,\ +-0.0976186373893909720145f,-1.0193857468205604899f,0.778026114056752038373f,\ +0.3469309321844699645077f,-0.2119385547567329830532f,0.1122013143743656737872f,\ +0.5130455426994967593757f,-0.9836962738165191399986f,-1.8662473753394661635241f,\ +0.5046191490309642757595f,0.5397589965174257597980f,0.1495290449776452701425f,\ +-1.0010126697848658050560f,-1.231087303316227510308f,0.493771591129457787517f,\ +0.0084749296034232757258f,0.6528794554325030308206f,1.3165434517533367575481f,\ +-0.7644706245855447113158f,1.60959294894722515501f,-0.3945002118117288958388f,\ +-1.7397191133485980785167f,0.7283944071784652640744f,-0.8252534213629215686936f,\ +0.1067480143242338502807f,1.4303021806407054672405f,-0.9653188502218088551388f,\ +0.3473141482678416824825f,1.3246017895509272221943f,2.2493951812296155701176f,\ +-0.6569708783346918101742f,-0.321524642114760117462f,0.6051546744959480639281f,\ +0.3028414522677088660529f,-0.6449695892069078340114f,0.3426130327302095435194f,\ +-0.9643932135296735541630f,1.3325612893853038265490f,-1.628074335418207230219f,\ +0.7075076309451185929689f,1.0853008279162978944044f,-2.3506278976788554935240f,\ +-0.1463993258475799474905f,-1.0813242242905494183702f,0.8848173893719444293993f,\ +-0.8759582027327027509145f,-0.8344888331049786778237f,-1.0485734628076319729928f,\ +1.9962933549994803517080f,1.2493174700563109968954f,1.1394362749053514871633f,\ +-0.2197402489428784411185f,0.3152457615995896134109f} + +#define RESULT {-1.1130949556588403126511f,-1.3327159168755193796585f,0.3765918165954149632313f,\ +-0.2144327449409605401698f,0.4882680607211341006213f,-0.6290298228269889380115f,\ +1.0416537998862092084806f,1.1378027100741174848508f,1.6306935238556961031975f,\ +-0.1403192842222721059553f,-0.4544772654936784506141f,0.0273287452012760077869f,\ +0.1269546678262620797994f,0.8868507654832032960357f,-0.568209430801213888351f,\ +-1.1897458189645284676317f,1.0063560088725012064970f,-0.6957349846601869058915f,\ +0.1538765289352577170234f,-0.4264787556420423508818f,-0.1701850823931514988807f,\ +-0.0020392089024058542880f,1.6060204471410550741695f,-1.3587234662009097796442f,\ +-0.6657080515933866404765f,0.4901444289074484705893f,-0.8106383081775411225678f,\ +0.1399995760847499992607f,0.9516413314489057251322f,-0.0755030713336432846017f,\ +0.0052019625784457792020f,-0.3456102163306026819889f,0.8527889195091039598040f,\ +-0.3312482849825826303203f,-0.8401095674014050773692f,0.9552769725934540101520f,\ +0.5057396137890651788283f,1.5652435713544583517631f,0.7660130911978242362892f,\ +-0.1177402502570575049123f,-0.4087756154845550438104f,-0.9601436921836913329642f,\ +0.6870180358136419584980f,-0.7413056602559416896625f,-0.2260133834402236752137f,\ +0.607083791196235011967f,0.7179951440904949189203f,1.1701025225825925080159f,\ +1.1841009702891132082669f,-0.0561379888707583402097f,-0.6111939387463327655325f,\ +0.8387837653657870262691f,0.4277059773372764994726f,0.9252791007143230661569f,\ +-1.1253178411086610655f,-0.3016147291750726489035f,0.3498873875038394642978f,\ +0.2689800399453179946541f,-0.7508385861915640724362f,-0.568046218336308084140f,\ +0.7424839156827229835756f,-0.8238461490952974086710f,0.4485733597383650406165f,\ +1.7289314850929364819621f,-0.5274948117440469985695f,0.5381900831525847639369f,\ +-0.1953785803896550821168f,0.3178295637778837390286f,0.2030924952508830483300f,\ +0.8179516300830952379997f,1.0957859238613814056862f,-0.3838186466908449778757f,\ +0.6362542602331872076959f,-0.0390866932016993157140f,0.4324599635687117471505f,\ +0.0466799117153936446445f,-0.9895220015504287980335f,-0.1510253177999459628378f,\ +0.9502363023238964423456f,-1.3788344661100282451116f,-1.2415257056941875202227f,\ +-1.5907556842186492129798f,-0.0363229438428324669097f,-0.3593253093499745309813f,\ +1.1933668386250828596928f,0.1163455870775610828671f,0.5816925710627691703536f,\ +-1.0066359311257613295965f,0.3491528652755562234233f,0.3402040976525141924292f,\ +-0.7144454627768908050456f,-0.0388508204533765666433f,0.4505011238681072560652f,\ +1.6618918653106427019139f,-1.2751867809374948237178f,-1.3161363888578068159774f,\ +-0.4918270306483571441269f,0.5883710719531183297448f,1.0502037442465796956981f,\ +-0.4124158523209305871049f,-1.6326391191927918100646f,-0.5581352790789477769096f,\ +0.0525015052004256660423f,-0.0221882799205271458165f,0.0047340483795489029725f,\ +0.5649052397488373289391f,1.0415355372390291410767f,-0.4337062598861871065559f,\ +0.3052242689715726209343f,0.1886070763157441099178f,-0.4849035737297955339642f,\ +-0.9098654196250280934422f,-0.7931897365608786554247f,-0.7514108860522482613575f,\ +0.0114518337541998777018f,-0.7616847132530191188948f,1.1972396117455856856537f,\ +-1.1876514534079536389299f,-0.8449650527155313506356f,-0.4555378112663634460056f,\ +-0.8774391641368382011024f,-0.7246635421278604383133f,-1.4260843463597587810199f,\ +-0.5299803397861506670807f,-0.1492486124002971037417f,0.9160234338985321356219f,\ +-1.3854693118499961101975f,-1.339149741178953689769f,1.4680202081995989971119f,\ +0.4068615933419172381313f,0.4593706772145678129959f,-0.0496885560579486892929f,\ +-0.7523928088748154108245f,0.3257305872841815830299f,-0.1047168437798993573251f,\ +0.8409515953244546260237f,-0.4175134246305884921924f,0.5723991247141133609233f,\ +-0.4925350737504667897326f,0.7523506802368506996004f,-0.5374382677208087155662f,\ +1.1824994989469264083937f,-0.1148372801243118385139f,-0.0894765353119480744137f,\ +-0.1711367593250398000393f,0.2250096841326320595833f,1.458830901005770064316f,\ +-0.0974642573471812823094f,-0.8950151622701945086646f,0.7154174354590427942213f,\ +0.3403234064876564657354f,-0.2103831526165375054305f,0.1119672185619183107930f,\ +0.4928495654965970862449f,-0.8697979955142227659337f,-1.382167978700230337452f,\ +0.4853394960873701480253f,0.5164877528407616491535f,0.1489773595696585739567f,\ +-0.8820894714376154022162f,-1.0357236173571910953228f,0.4756340389263381540630f,\ +0.0084748281555349427863f,0.6136369862616236625641f,1.0884976091419886756739f,\ +-0.7046834979102297724651f,1.254056645766540967202f,-0.3849240656020492257205f,\ +-1.3207856959376931271777f,0.6757730196964429891793f,-0.7522666350656633804661f,\ +0.1065463121770779120201f,1.155469512029384748786f,-0.8566364746899163273852f,\ +0.3406854318087456645614f,1.0933623617966952146219f,1.5499122891284196068540f,\ +-0.6170596901911918896744f,-0.3162277642902040497574f,0.5732399668068761666717f,\ +0.2983935984890606074593f,-0.6070017519078403367416f,0.3362413129909137543549f,\ +-0.8559703502467290725519f,1.0981489764525824703867f,-1.2637694566754069658288f,\ +0.6588062099967662010869f,0.9404229224232689698937f,-1.590280419973736147909f,\ +-0.1458813492114517662568f,-0.9377256428290303702511f,0.7975391112088442424621f,\ +-0.7908896752603351565369f,-0.7593735645090678998415f,-0.9153065625835585805703f,\ +1.441976583204267914340f,1.0471665685842834747632f,0.9766162941953494547320f,\ +-0.2180092160957680658129f,0.3102448153202543856821f} + + +#define CSOURCER {0.1344153599005591392945f,-1.5506135890216410366804f,-0.6851077106999041710367f,\ +0.4218254137797516900577f,0.4563186792784946765877f,-0.0065657292828231895304f,\ +-1.4909053660893785142605f,0.3020078702400747494572f,0.9932063361099687792688f,\ +-0.4433136654301204071515f,-1.2230912696221460933543f,-0.4536074652511654647924f,\ +-0.391728395210721336284f,-1.0754644749418362792426f,-0.3220075728643138068819f,\ +-1.8561721663709394025688f,0.9166361449615868517427f,-0.4865676280317013935317f,\ +-0.0798825634299456799337f,0.7227932226211960520246f,0.4367586477867241301354f,\ +1.100708465607679542586f,0.7887304681164191144660f,-0.7638617615134800642451f,\ +-1.1157778009204568636648f,-0.0715514394916681589764f,0.1759955522740979383389f,\ +0.6521704771208436390850f,-1.2566799200234315403435f,0.7200913102328155845910f,\ +-0.3420550667112094989086f,0.2477935566640704911912f,2.0205940701992970431888f,\ +1.3930268695166325709778f,-1.2605487293586259411882f,-0.1650288634784027319569f,\ +-0.0981081330322927658294f,0.4100655669623185506367f,0.7181621264742018562188f,\ +-0.4072630840419457221024f,0.5156039430832634051782f,0.3795734781395984636099f,\ +0.3638182194100580413298f,0.8461109103084072380341f,0.6093905395787995171730f,\ +-0.2503150987783319125768f,0.6420253514641469649860f,-0.0446314315869399819148f,\ +0.2916988037421140433914f,-0.3385179884731976951429f,0.4290547410494972568884f,\ +-1.7617580904822116583119f,0.0242252644066083683283f,-1.6979773429025941666737f,\ +-1.5685374082937220130418f,0.2235220732382334762889f,0.3158040584918663795655f,\ +-0.3902896794740354780018f,-0.2554731784615550393980f,-1.2399505074947390070861f,\ +-0.0969941013810174113008f,-0.7835998873676693898815f,-0.7420185738540517883521f,\ +0.1215847078229450456410f,0.346331144382537814419f,-0.1289657459832099506425f,\ +-0.2972509851392565738415f,0.5513684955823417999099f,-0.3924372370508544816126f,\ +0.6550918706396454682661f,-0.0941496244175293039991f,-0.6298808116548983981886f,\ +0.6046273337026021321705f,1.154776599111647650275f,-1.3475403271419439388268f,\ +1.6941635868888738070126f,-0.9698161544930480326698f,0.321333626597992860763f,\ +0.8077673631787291030903f,0.4495327099693594008478f,-0.2815944820401523052134f,\ +0.5503911320698096076853f,0.4415940612643087237466f,-0.0426890352355768151749f,\ +0.4574486820024267763607f,-1.8233880107049311725120f,-1.2644581540832258159668f,\ +1.8182154451811951556550f,-0.4365692326313646565161f,-0.7834466000398015994577f,\ +-0.2438122853723030947215f,-1.238179759598785789620f,1.0164635023339896324757f,\ +1.1566875865587697980175f,0.7525323014625638906594f,-0.5302881550474964900133f,\ +0.9946348209098996306921f,-0.2846244148716441380031f,-1.4971569165104527954213f,\ +0.3858437386079422992680f,0.5857497893655945198077f,-0.5407108407032041874629f,\ +-0.3913628275219260821416f,0.394150621449124050066f,-0.3677461583219513441279f,\ +-0.3580090499105863521834f,1.2238011161239454871463f,-0.0394483595782139026542f,\ +0.6819869387311006114771f,0.0482725904112477066654f,0.6909298247176761664790f,\ +1.3224847954183336362632f,1.4037115762091163517766f,0.8467069128655627663349f,\ +0.5210759995289813151231f,-0.2055830325344648878971f,-2.0192992995259366750815f,\ +-0.5304191698016149647543f,1.09472080578548336405f,1.3620867421349684978082f,\ +-0.1808242201566298279491f,-0.0194904828858388744217f,-0.4683180277648698042192f,\ +0.7819869233308703870833f,0.1429480494914288357666f,0.2773646548392231792057f,\ +0.6096476038786750040188f,-0.5960852983339143262853f,-1.963887290912852856550f,\ +0.9721629223729456592551f,-1.6452050961761244263215f,-0.3723296190652639614527f,\ +0.4738633834151028678683f,-1.057700746568926764013f,-0.4968910756708404541371f,\ +0.2577873463311163293454f,-0.0737988795500269523231f,0.1977793752007929173331f,\ +-0.6149210248305110315670f,0.9875664176674272543011f,-0.4642707502431423494116f,\ +0.0643413048674845028385f,0.6498540575999842694443f,0.7121440663138152160627f,\ +0.2359686505725840099945f,-0.2350484222736072826f,1.427908791905283747425f,\ +-2.1717696603112686126735f,-0.7707405591334609562537f,0.8328839983146067993403f,\ +-0.8442913355247498863321f,-0.9327775490791254675571f,-0.1481361786955139869804f,\ +1.3160166106571784538914f,-1.641046498941054032628f,1.1071159236267200665083f,\ +-0.1637297725664050573879f,0.0063889356258534446900f,-0.1876117315630027870821f,\ +-0.0437156856017992812014f,-0.5047856242612756005883f,-0.4377080020532335691286f,\ +0.8918622387976500309748f,-0.7125206673387354250337f,-1.8420141064608679393f,\ +-0.6323236657671401639291f,0.4307970989642812553733f,0.0065706118931696342461f,\ +-0.2380637309545470814420f,-0.9281665549650555124828f,1.2462413799568070604806f,\ +0.1118120260462647785893f,0.5017427788303500113543f,0.1413380949238240147370f,\ +0.5728474017890546887699f,-0.2522748296906130449635f,-0.4384774472140181011959f,\ +0.0497517512937118988603f,0.5020924835745471659365f,0.6928164360637126817366f,\ +0.9383192238380625438410f,0.9522811808490952989459f,0.6799302528285031677058f,\ +0.5017679240717164423913f,-2.1626383553421018035579f,0.4579762384000223285341f,\ +0.0586823729814069730559f,-1.0035555258293702429739f,-0.1166748359615927543853f,\ +0.8530686378617126086610f,-0.5952441201854786756442f,-0.9104692400773028992944f,\ +-0.1222081949574846115869f,0.8743861864198215760879f,-1.7814901158856750740256f,\ +-0.1655434636829379024814f,1.2699075561256230049167f,3.1587625106365013749610f,\ +0.8610776754247619901861f,-0.0100004380673695478232f} + +#define CSOURCEI {0.9250286334648400998759f,0.1065362941212572023275f,-0.8122748012511081805442f,\ +2.9016509109873367400212f,-0.879282905363888867001f,-0.3325238972742790566350f,\ +1.2084799362120550725308f,0.2580513186266746861186f,-0.2529978784629969279507f,\ +1.6363224419507169660193f,0.3632057263498695842685f,0.3611017132584669053763f,\ +-1.2067543995469365292195f,-0.9261214746973902567362f,0.5500770410591231396324f,\ +0.3509274981930612380410f,-2.0620828383452867171854f,0.1301261656898765051160f,\ +-0.0829640021096160473757f,0.5497292800458170036748f,-1.586103376800369391120f,\ +1.1212128658770057487715f,-0.0802149047940418080671f,0.3400568097779858578456f,\ +0.5992917235464352287977f,1.2934484737369573714716f,-0.1770100915330515556345f,\ +-1.6783588206143511545321f,0.3877335362207995905770f,-0.3290626192650726866695f,\ +-0.7735806757117498211329f,1.4288193530454935675778f,-0.0608386450296815664562f,\ +0.2853217242027552558170f,-0.3091484421032868468160f,0.2351673955360732704012f,\ +0.8718242905301006873131f,0.9043814712183079196350f,0.4001603453209788274769f,\ +0.2902565872125924539837f,-0.1051862594971314374126f,-0.2633497801636938695502f,\ +0.5605928815183498503671f,-1.0135332223701010168071f,1.3762849538989350151041f,\ +0.0221113855817069056287f,0.296045052860035018405f,0.1323984531412186749222f,\ +-0.5439657044615130443432f,0.7105758550684416752219f,-1.988902172751357388947f,\ +0.8370036445008282033342f,-1.361827445493777322127f,-0.2908726176761944892668f,\ +0.7582058566306987268391f,2.2582687071318150451305f,-0.838995532132944754622f,\ +-0.0049693115325542529942f,0.8948621233346091274896f,-0.1820415696112677728102f,\ +0.0164009645281327567923f,0.4631157184786182656744f,1.2818863747394355634412f,\ +1.37735582155233560187f,-0.7661687725125947423521f,-0.8188017890741936533061f,\ +1.3941959606340814659120f,2.0721869090596265472470f,0.9329858014692479217800f,\ +-1.0023470169799657547571f,0.1352029091047084741195f,0.5763346694547388793239f,\ +-1.492034523395888490072f,-0.4804977288873880647557f,0.7911732889577677285686f,\ +0.1745293679511154827377f,0.0354831535332537570393f,-0.8628629256538601355331f,\ +0.1942834096659604437018f,1.3466596448020036191906f,0.3364543941938548110571f,\ +-1.109797124842869298078f,0.1809508886112952685821f,0.5725159396053964844242f,\ +0.6787472822917395287590f,1.4922528447187788369632f,-0.9855408452288743070824f,\ +2.0147405762642014437347f,-0.1974169216352719968821f,-0.2472797570908096820297f,\ +-0.3003777280233598800940f,-0.6957353172991608269982f,0.8954567399776292013769f,\ +0.0025734217968703923703f,1.2028191624106452373155f,-0.3976568161030914483334f,\ +-0.9486032699014914637559f,0.344203116731234826098f,-0.1282579491971870822020f,\ +0.2354837848969928981724f,-1.0123893486718691381299f,-0.1455435264750559176683f,\ +-0.0385439121492695893623f,0.2704776801120854501370f,0.9996348746916957628272f,\ +1.1879952493572987215487f,-0.1421627190737907164841f,-0.9134168336317867176177f,\ +-1.3273949616244651306118f,-0.2266260602581666450117f,0.0136941574262192684169f,\ +0.8667822397875659667932f,-0.8918524882230300931951f,0.5818810906621436629393f,\ +0.5786477410918646757665f,-1.2824019249961673416749f,-0.8858272202103619763491f,\ +1.49931415247364041576f,-0.3191008638398869501351f,-0.6302800825827241659738f,\ +-0.9307697616588104239099f,-0.2218962076254625825911f,0.5504657591791385362612f,\ +0.7937732776747626894931f,0.4530121091137990219089f,-0.5561836772913717474864f,\ +-0.0487810094749783207391f,1.0373690852013959240452f,-1.9605345216190741552964f,\ +-0.6318190008183720562940f,-0.2595506312908315571519f,1.6655693943633802511783f,\ +0.2643484753712377899326f,0.5166487752761181884154f,-1.7642021092407271787295f,\ +0.9519817124353935344772f,1.5941109627321103925368f,-0.3268346133298423716873f,\ +-0.8591341754919610274044f,-0.5067465121338621258928f,0.4012524027420211192307f,\ +-1.3781772559142455580883f,-1.0900200484217259511155f,0.7071849131547247591101f,\ +0.6311112492498477388736f,-1.5661486235109134401711f,-0.3037032596268335327139f,\ +-2.3928711979350367755615f,0.9280630230889591603116f,1.234345031017325400313f,\ +0.0245382276611107209841f,-1.7795591476102954331395f,-0.1457340296796875434016f,\ +-1.4175919090731374794245f,-1.0931645829165108629866f,0.0976120560124896369247f,\ +-0.4917932561715864236973f,0.3236361331498361360026f,-1.3493789441767958248164f,\ +-0.4975410901203008995353f,-0.5175498508985710843788f,1.9028534065523732277114f,\ +-1.0213015320689262654952f,0.7201673839470011939667f,-0.229479324750370056174f,\ +0.0507808834449509222120f,-0.6036524407661360003274f,-0.3189899214184117592907f,\ +0.8969390978377852485792f,0.0689550751790670851671f,-0.3842312216289716086948f,\ +-0.5817559662860881664059f,-1.4228206622942274339749f,-0.8055937171612096436846f,\ +-0.8761791574203163790457f,0.6999940081500163335804f,0.3592083211755666694032f,\ +-2.2759824091756848396528f,1.1126243656877470300515f,-1.490042708505755930659f,\ +-0.2517675074289520420479f,-0.4649616224894683735869f,-0.9304122891120238936224f,\ +-0.2780945839682648634827f,-1.186365868114249266796f,-1.0805465619847403058174f,\ +-0.2982113561322028982836f,-0.4608151973468663786804f,0.5142626215675811796046f,\ +-0.8962085262358048254328f,-1.8912922138922239057024f,1.5339839202719194322100f,\ +-1.0493592314888038341536f,1.5275565058768361126340f,-0.3000289995792813080300f,\ +-1.2901253199534357118949f,0.4517205659557054775455f,0.1925085892467791881533f,\ +0.4244705571771024699146f,1.1465794102472002258253f} + +#define CRESULTR {0.2881823261718455264635f,-1.2239148834349047323400f,-0.7845879395690421587162f,\ +1.7398908843418365854916f,0.6267968040978579846723f,-0.0069618200210163757799f,\ +-1.3647060336777470102021f,0.3067781755755824568688f,0.8879601142484547793288f,\ +-1.1408081118402808584733f,-1.0511217892257147532575f,-0.4630227853264242132703f,\ +-0.8052300885146775888401f,-1.0799054881923455528892f,-0.3673239873834487356774f,\ +-1.3895193771431015861140f,1.4748704381210364644517f,-0.4721815868535457205724f,\ +-0.0800715444386163321955f,0.7328675926305248111703f,1.1062012776691256821238f,\ +1.1578188890116758447135f,0.7250736097899580512305f,-0.7268209399811761395327f,\ +-1.020749615675486277055f,-0.7543891378811746761812f,0.1777916795470285138414f,\ +1.224903809672051702151f,-1.074529895353530717372f,0.6903548013878436639956f,\ +-0.4611640141379182988857f,0.933556473565831823613f,1.4531339378119088046049f,\ +1.1451427225776011908920f,-1.0686132863053487973559f,-0.1688483441440512822229f,\ +-0.1889456477264452038956f,0.5985578048499338166266f,0.6993236665323845357989f,\ +-0.4109810453160360754765f,0.4971360116983927213141f,0.3821580291233257486994f,\ +0.4128919091647823558233f,0.9758538921704605906271f,1.0346135696067118026065f,\ +-0.2478280180540722854587f,0.6216905071606976251886f,-0.0450118169844396301404f,\ +0.3340415020637265142156f,-0.4315313860868430495543f,1.3446595868643815840926f,\ +-1.4033414360880258620057f,0.8274220763035017300879f,-1.309144795084008494612f,\ +-1.3004176310924011605863f,1.4613978516551788811029f,0.4652521895005036212112f,\ +-0.3810083873666035292338f,-0.4305652750257212835194f,-1.0463819862831613693999f,\ +-0.0968555231163464591670f,-0.7621978211341690068181f,-1.0442639351316740370379f,\ +0.8551375533721097266238f,0.4624338658491132791895f,-0.2135461711123592121186f,\ +-0.9192783709328955499274f,1.406572519212488048268f,-0.5996917427163407365853f,\ +0.8472849136812159454024f,-0.0948718277212909494311f,-0.6635046470522460992925f,\ +1.102552918644890800337f,1.0241591511876448894469f,-1.1946095915247210150767f,\ +1.3012416677676885701231f,-0.860094399966521483414f,0.4848763007604853791932f,\ +0.7459402751068522352540f,0.9429407450799555112653f,-0.2932662625241302944978f,\ +0.8365772498525353428889f,0.4339900657778844039747f,-0.0520088659229247518567f,\ +0.540163948037489571874f,-1.5617045052623743650599f,-1.1990755672824380262398f,\ +1.6897714229424107834632f,-0.4304392780607278479188f,-0.7314935627224536940361f,\ +-0.2521660858364912494167f,-1.1139709472810304102808f,1.03593284093582016503f,\ +0.9879482215425008373444f,1.008898373366306833177f,-0.5387894626210441018088f,\ +1.0404295395317768591070f,-0.2970761763070669525533f,-1.1952939328908356309000f,\ +0.3857997224260597546319f,0.8038817262315489653446f,-0.5212531537640049394966f,\ +-0.3822389517390957225373f,0.3966495909859810709008f,-0.6230521638604892276092f,\ +-0.7692209701300163349202f,1.03425437487647720047f,-0.0946733232120821749378f,\ +1.0396309891046779938506f,0.0495385539831420876333f,0.6452562376798283150237f,\ +1.1985497422790862831476f,1.2458585900431864423865f,0.8349246161988523873276f,\ +0.5689579490080320933743f,-0.7806209699664544698905f,-1.5187452500641256403213f,\ +-1.0796802038517956390251f,0.9639374126836365297422f,1.1711728912763936794050f,\ +-0.362488012679416937711f,-0.0199872602643281528645f,-0.5128264059242761963020f,\ +0.8492028743473079011039f,0.1591587587129435210631f,0.3212111561314560104208f,\ +0.5775318673000989777577f,-0.8249558967503766160334f,-1.7154192273737123297650f,\ +0.9346304365709510175719f,-1.2804432024400131950870f,-1.1426657840798974952179f,\ +0.4703017265736584850977f,-0.9677493848474170157203f,-1.2320829767979621927054f,\ +0.4762683633703864716225f,-1.0444970147674126348392f,0.2072645201710894835578f,\ +-0.7498010260478793487238f,0.9188781401771745072082f,-0.4789588845434366026765f,\ +0.8476937452776511783270f,0.8895027647705600060135f,0.7682169660294876356588f,\ +0.2922093151936491217668f,-1.0429114806489117039945f,1.166492728893671504409f,\ +-1.8646253504096552688907f,-0.8923239533314403226782f,1.0666374040344190898821f,\ +-0.7669950473749445052363f,-1.3585386555510787776058f,-0.1491456224121993634490f,\ +1.354597929546794699007f,-1.4004360287243708960148f,0.9567139977921835791719f,\ +-0.1859618971982733570680f,0.0067522660769214690180f,-0.842830481930881947328f,\ +-0.0503539309377906904586f,-0.5389456072426579424928f,-1.2991753231583602623544f,\ +1.0064698858838660999737f,-0.7727166159011478185903f,-1.375918311051623987851f,\ +-0.5968365322787659854598f,0.4909328325978893903248f,0.0069327197759769939797f,\ +-0.4109069224660110153380f,-0.8305261099098545374275f,1.067766372332880076002f,\ +0.1364036525382384124061f,1.0185816452043403579353f,0.2263896344197315613211f,\ +0.7241797053868859190828f,-0.3310339119084142467386f,-0.4485953806654829345568f,\ +1.4637030484564286236804f,0.8062581119903107218505f,1.135230070733268981087f,\ +0.8486739138084887779101f,0.8869200257723099944940f,0.8304138989692378958196f,\ +0.4970805707137128659490f,-1.6189532479764259242927f,0.7536345887109229257916f,\ +0.0614297741451279438740f,-0.9217679644120017057318f,-0.1351912284135200204016f,\ +0.9344534227267771164804f,-1.3237759469951597690596f,-1.2409772949992454726953f,\ +-0.4266400610039619012426f,1.2242961173386468498592f,-1.3507787481217943259537f,\ +-0.7743193525686042910650f,1.0905655681187926830944f,1.869097852573508911078f,\ +0.8141159942263986870614f,-0.5353611933969746328188f} + +#define CRESULTI {1.0927665474832626291146f,0.0577041411945533808114f,-0.6605411939586326441898f,\ +1.4173928005937053153929f,-0.8196938376873322829042f,-0.3389699587748392084485f,\ +0.6182411929183926346809f,0.2489298772050817232238f,-0.1790179858054015138435f,\ +1.2497543779018556175942f,0.2282445233800083350673f,0.3316185520857942714557f,\ +-1.1178350760886399672955f,-0.5992404494636266454322f,0.5409431572062767257236f,\ +0.165426376161976390611f,-1.1122536593055589726475f,0.1171231329897951256580f,\ +-0.0827933061236485051682f,0.4436212447193593200190f,-1.2403328057018132568601f,\ +0.6960798868922111193314f,-0.0629757037081154352753f,0.2697689038111338311055f,\ +0.3922302209885859536342f,1.4842743869253867128322f,-0.1751428834182987837043f,\ +-1.13801740936157136375f,0.2394213509890497915134f,-0.2668464988788373237760f,\ +-0.7726426977316005473284f,1.3382415873096298319922f,-0.0269807302035863991185f,\ +0.1656312162752983929703f,-0.1911246952977092017356f,0.2339836780169318453115f,\ +1.0284310438096477824388f,0.8686878315011077322794f,0.3246111072217529036621f,\ +0.2706500543034189298908f,-0.0935407508346946525712f,-0.2477506860556301926390f,\ +0.5421539099371334158306f,-0.7327711559744070068945f,1.05214358953255682216f,\ +0.0214509576394467729732f,0.2493724089381304798163f,0.1326531466862980457311f,\ +-0.5409686898264083332322f,0.7065143938000820744705f,-1.3284854753780470648650f,\ +0.3984512917058077308141f,-1.5446072484052193463100f,-0.1469509150678137976431f,\ +0.3947301571210936610434f,1.461008167394748147316f,-0.8567501445560671280433f,\ +-0.0046292376134026641879f,0.9577036871573997300899f,-0.1140752778705255016112f,\ +0.0163250605343483005949f,0.3628386917181465332050f,0.9320951721399445277783f,\ +1.44423353597128478754f,-0.7628206936973814800140f,-0.9280966118664348840639f,\ +1.2849894108105837098321f,1.2792864989827095190122f,0.9061761299907579170210f,\ +-0.8122605612540356734286f,0.1350064725981316715586f,0.4883936062374085174120f,\ +-1.102637196793889051705f,-0.3106468603302708908487f,0.4543964386247798525886f,\ +0.0885735454738456329249f,0.0254706011136682855533f,-0.8796254633651946486239f,\ +0.151022627304807338655f,1.1452851102523748938466f,0.3283556388648877777392f,\ +-0.9434455972747952667845f,0.1659123702555805879300f,0.6086281726098896616151f,\ +0.631662047814702143356f,0.6431181331610840157254f,-0.5760553428914201301581f,\ +0.8026360136122261401681f,-0.1814351276467410234439f,-0.1944579368330171531554f,\ +-0.2953494745705410595704f,-0.4250058789202441067445f,0.599813865521373279499f,\ +0.0016830438518425523946f,0.8854731871017331723550f,-0.3534985427172745442448f,\ +-0.6383931728072353983805f,0.3358307199066276060861f,-0.0711733718807077142543f,\ +0.2207727851446303901639f,-0.8556718335996058577564f,-0.1281371029552695606224f,\ +-0.0358976629777693137524f,0.2532084228703710415687f,0.983986642358089413918f,\ +1.1345925939829912820755f,-0.0898559156199065373061f,-1.1416915329673189560822f,\ +-0.9870037974692073001748f,-0.2283270051627071806077f,0.0112664968061259064547f,\ +0.4998464672322767698986f,-0.4937534754955061888637f,0.4389132738737425154518f,\ +0.5191615917775272981416f,-1.330080589614465180759f,-0.3792401398168883108752f,\ +1.1512099997314479971067f,-0.2141264512433771194377f,-0.3645359117298094808746f,\ +-1.0609046855212507232125f,-0.2237132816089271170057f,0.5066458933231118288987f,\ +0.6114387233853804115569f,0.4637825784576218857147f,-0.5570387380565021695489f,\ +-0.0416532931678999865377f,0.8675730496349238762832f,-0.7521971544712148238787f,\ +-0.4444425039044248570974f,-0.1343255157657375076230f,1.3031888522890535675458f,\ +0.2398794824711508455461f,0.3501788639961876947737f,-1.2484148728039676790047f,\ +1.0223862780907517766593f,1.5114877336366283611113f,-0.3256639805152193312132f,\ +-0.7257147000802074421344f,-0.3563177118938634091450f,0.367466380314942664409f,\ +-1.5032253124394940879682f,-0.8731092741090689113292f,0.5703012583169800864269f,\ +0.6498833797759138164452f,-1.3804786941428137669874f,-0.1733188156619589748164f,\ +-0.8098487944615534450676f,0.7091099644264757806411f,0.8627806630820323841036f,\ +0.0187490818204580703132f,-1.0316116049359651540840f,-0.1446317495535741626256f,\ +-0.7559013344655626243096f,-0.5329078157992787057040f,0.0653983668850169619358f,\ +-0.5045465362161873912328f,0.3295621318182701542376f,-1.3711989596398608259875f,\ +-0.5200355557922887728139f,-0.4673488331710942134123f,1.3098786184351398631520f,\ +-0.7189565120188516900157f,0.580208200526596162838f,-0.1091990841314347954194f,\ +0.0429221122996483323009f,-0.5675416667058814645941f,-0.3246554520854594838575f,\ +0.9723329710924543123340f,0.0505316478341986258238f,-0.2385123070932486100126f,\ +-0.6142986606043344677275f,-1.1409813222703388824186f,-0.9033119064286492250204f,\ +-0.7584587763797572268487f,0.7252421018090512427889f,0.3319280479688784257775f,\ +-1.5464687515566899467245f,0.9763347698321626078055f,-1.0511809923664583443781f,\ +-0.1831638202759971745248f,-0.3336438319634690841120f,-0.7499286125479456277532f,\ +-0.2495331996617490000201f,-0.4693439688376106477818f,-0.9839213631021112016484f,\ +-0.3022296870844187743899f,-0.3220832096726037319101f,0.5347182539371353460211f,\ +-0.6559994287878105900802f,-1.2228456605235495935347f,0.9588662882096035122714f,\ +-1.2891530456629314294048f,0.9731441796186428572213f,-0.1461840118371629804184f,\ +-1.3757278523698810435150f,0.2762809284691948308321f,0.0580458636704428015962f,\ +0.3198225937522309325622f,1.5529789344620548163789f} + +void sasinhsTest(void) { + float in[]= SOURCE; + float res[]= RESULT; + float out; + int i=0; + + for (i=0;i<200;i++){ + out=sasinhs(in[i]); + assert ( ( (fabs(out-res[i])) / (fabs(out)) ) <1e-6); + } +} + +void casinhsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out = casinhs(in); + + assert( ( ( fabs( creals(out)-resR[i] ) ) / (fabs(creals(out)) ) ) <1e-6); + assert( ( ( fabs( cimags(out)-resI[i] ) ) / (fabs(cimags(out)) ) ) <1e-6); + } +} + +void sasinhaTest(void) { + float in[]= SOURCE; + float res[]= RESULT; + float out[200]; + int i=0; + + sasinha(in,200,out); + for (i=0;i<200;i++){ + assert ( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <1e-6); + }} + +void casinhaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + casinha(in,200,out); + for (i=0;i<200;i++){ + assert( ( ( fabs( creals(out[i])-resR[i] ) ) / (fabs(creals(out[i])) ) ) <1e-6); + assert( ( ( fabs( cimags(out[i])-resI[i] ) ) / (fabs(cimags(out[i])) ) ) <1e-6); + } +} + +int testAsinh(void) { + printf("\n>>>> Double Hyperbolic ArcSine Tests\n"); + sasinhsTest(); + casinhsTest(); + sasinhaTest(); + casinhaTest(); + + return 0; +} + +int main(void) { + assert(testAsinh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/zasinha.c b/2.3-1/src/c/elementaryFunctions/asinh/zasinha.c new file mode 100644 index 00000000..4ce24bd8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/zasinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "asinh.h" + +void zasinha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zasinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/asinh/zasinhs.c b/2.3-1/src/c/elementaryFunctions/asinh/zasinhs.c new file mode 100644 index 00000000..9322b04e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/asinh/zasinhs.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula asinh(z) = -i asin(i z) +*/ + +#include "asinh.h" +#include "asin.h" + +doubleComplex zasinhs(doubleComplex z) { + doubleComplex i_z = DoubleComplex(-zimags(z), zreals(z)); + doubleComplex asin_i_z = zasins(i_z); + + return DoubleComplex(zimags(asin_i_z), -zreals(asin_i_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/Makefile.am b/2.3-1/src/c/elementaryFunctions/atan/Makefile.am new file mode 100644 index 00000000..5c090404 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/Makefile.am @@ -0,0 +1,67 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAtan_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAtan.la + +libAtan_la_SOURCES = $(HEAD) $(SRC) + +SRC = satans.c \ + datans.c \ + catans.c \ + zatans.c \ + satana.c \ + datana.c \ + catana.c \ + zatana.c + +HEAD = ../includes/atan.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAtan testDoubleAtan + +TESTS = testFloatAtan testDoubleAtan + +# +# -*- Arc tangeant Tests -*- +# +testFloatAtan_SOURCES = testAtan.h testFloatAtan.c +testFloatAtan_CFLAGS = $(check_INCLUDES) +testFloatAtan_LDADD = $(check_LDADD) + +testDoubleAtan_SOURCES = testAtan.h testDoubleAtan.c +testDoubleAtan_CFLAGS = $(check_INCLUDES) +testDoubleAtan_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/atan/Makefile.in b/2.3-1/src/c/elementaryFunctions/atan/Makefile.in new file mode 100644 index 00000000..abb85ad4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/Makefile.in @@ -0,0 +1,803 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAtan$(EXEEXT) testDoubleAtan$(EXEEXT) +TESTS = testFloatAtan$(EXEEXT) testDoubleAtan$(EXEEXT) +subdir = src/c/elementaryFunctions/atan +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAtan_la_LIBADD = +am__objects_1 = +am__objects_2 = libAtan_la-satans.lo libAtan_la-datans.lo \ + libAtan_la-catans.lo libAtan_la-zatans.lo libAtan_la-satana.lo \ + libAtan_la-datana.lo libAtan_la-catana.lo libAtan_la-zatana.lo +am_libAtan_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAtan_la_OBJECTS = $(am_libAtan_la_OBJECTS) +libAtan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAtan_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAtan_OBJECTS = testDoubleAtan-testDoubleAtan.$(OBJEXT) +testDoubleAtan_OBJECTS = $(am_testDoubleAtan_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleAtan_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAtan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAtan_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAtan_OBJECTS = testFloatAtan-testFloatAtan.$(OBJEXT) +testFloatAtan_OBJECTS = $(am_testFloatAtan_OBJECTS) +testFloatAtan_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAtan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAtan_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAtan_la_SOURCES) $(testDoubleAtan_SOURCES) \ + $(testFloatAtan_SOURCES) +DIST_SOURCES = $(libAtan_la_SOURCES) $(testDoubleAtan_SOURCES) \ + $(testFloatAtan_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAtan_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAtan.la +libAtan_la_SOURCES = $(HEAD) $(SRC) +SRC = satans.c \ + datans.c \ + catans.c \ + zatans.c \ + satana.c \ + datana.c \ + catana.c \ + zatana.c + +HEAD = ../includes/atan.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Arc tangeant Tests -*- +# +testFloatAtan_SOURCES = testAtan.h testFloatAtan.c +testFloatAtan_CFLAGS = $(check_INCLUDES) +testFloatAtan_LDADD = $(check_LDADD) +testDoubleAtan_SOURCES = testAtan.h testDoubleAtan.c +testDoubleAtan_CFLAGS = $(check_INCLUDES) +testDoubleAtan_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/atan/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/atan/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAtan.la: $(libAtan_la_OBJECTS) $(libAtan_la_DEPENDENCIES) + $(libAtan_la_LINK) -rpath $(pkglibdir) $(libAtan_la_OBJECTS) $(libAtan_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAtan$(EXEEXT): $(testDoubleAtan_OBJECTS) $(testDoubleAtan_DEPENDENCIES) + @rm -f testDoubleAtan$(EXEEXT) + $(testDoubleAtan_LINK) $(testDoubleAtan_OBJECTS) $(testDoubleAtan_LDADD) $(LIBS) +testFloatAtan$(EXEEXT): $(testFloatAtan_OBJECTS) $(testFloatAtan_DEPENDENCIES) + @rm -f testFloatAtan$(EXEEXT) + $(testFloatAtan_LINK) $(testFloatAtan_OBJECTS) $(testFloatAtan_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-catana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-catans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-datana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-datans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-satana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-satans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-zatana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan_la-zatans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAtan-testDoubleAtan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAtan-testFloatAtan.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAtan_la-satans.lo: satans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-satans.lo -MD -MP -MF $(DEPDIR)/libAtan_la-satans.Tpo -c -o libAtan_la-satans.lo `test -f 'satans.c' || echo '$(srcdir)/'`satans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-satans.Tpo $(DEPDIR)/libAtan_la-satans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satans.c' object='libAtan_la-satans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-satans.lo `test -f 'satans.c' || echo '$(srcdir)/'`satans.c + +libAtan_la-datans.lo: datans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-datans.lo -MD -MP -MF $(DEPDIR)/libAtan_la-datans.Tpo -c -o libAtan_la-datans.lo `test -f 'datans.c' || echo '$(srcdir)/'`datans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-datans.Tpo $(DEPDIR)/libAtan_la-datans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datans.c' object='libAtan_la-datans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-datans.lo `test -f 'datans.c' || echo '$(srcdir)/'`datans.c + +libAtan_la-catans.lo: catans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-catans.lo -MD -MP -MF $(DEPDIR)/libAtan_la-catans.Tpo -c -o libAtan_la-catans.lo `test -f 'catans.c' || echo '$(srcdir)/'`catans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-catans.Tpo $(DEPDIR)/libAtan_la-catans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='catans.c' object='libAtan_la-catans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-catans.lo `test -f 'catans.c' || echo '$(srcdir)/'`catans.c + +libAtan_la-zatans.lo: zatans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-zatans.lo -MD -MP -MF $(DEPDIR)/libAtan_la-zatans.Tpo -c -o libAtan_la-zatans.lo `test -f 'zatans.c' || echo '$(srcdir)/'`zatans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-zatans.Tpo $(DEPDIR)/libAtan_la-zatans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zatans.c' object='libAtan_la-zatans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-zatans.lo `test -f 'zatans.c' || echo '$(srcdir)/'`zatans.c + +libAtan_la-satana.lo: satana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-satana.lo -MD -MP -MF $(DEPDIR)/libAtan_la-satana.Tpo -c -o libAtan_la-satana.lo `test -f 'satana.c' || echo '$(srcdir)/'`satana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-satana.Tpo $(DEPDIR)/libAtan_la-satana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satana.c' object='libAtan_la-satana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-satana.lo `test -f 'satana.c' || echo '$(srcdir)/'`satana.c + +libAtan_la-datana.lo: datana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-datana.lo -MD -MP -MF $(DEPDIR)/libAtan_la-datana.Tpo -c -o libAtan_la-datana.lo `test -f 'datana.c' || echo '$(srcdir)/'`datana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-datana.Tpo $(DEPDIR)/libAtan_la-datana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datana.c' object='libAtan_la-datana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-datana.lo `test -f 'datana.c' || echo '$(srcdir)/'`datana.c + +libAtan_la-catana.lo: catana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-catana.lo -MD -MP -MF $(DEPDIR)/libAtan_la-catana.Tpo -c -o libAtan_la-catana.lo `test -f 'catana.c' || echo '$(srcdir)/'`catana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-catana.Tpo $(DEPDIR)/libAtan_la-catana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='catana.c' object='libAtan_la-catana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-catana.lo `test -f 'catana.c' || echo '$(srcdir)/'`catana.c + +libAtan_la-zatana.lo: zatana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -MT libAtan_la-zatana.lo -MD -MP -MF $(DEPDIR)/libAtan_la-zatana.Tpo -c -o libAtan_la-zatana.lo `test -f 'zatana.c' || echo '$(srcdir)/'`zatana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan_la-zatana.Tpo $(DEPDIR)/libAtan_la-zatana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zatana.c' object='libAtan_la-zatana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan_la_CFLAGS) $(CFLAGS) -c -o libAtan_la-zatana.lo `test -f 'zatana.c' || echo '$(srcdir)/'`zatana.c + +testDoubleAtan-testDoubleAtan.o: testDoubleAtan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -MT testDoubleAtan-testDoubleAtan.o -MD -MP -MF $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo -c -o testDoubleAtan-testDoubleAtan.o `test -f 'testDoubleAtan.c' || echo '$(srcdir)/'`testDoubleAtan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo $(DEPDIR)/testDoubleAtan-testDoubleAtan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtan.c' object='testDoubleAtan-testDoubleAtan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -c -o testDoubleAtan-testDoubleAtan.o `test -f 'testDoubleAtan.c' || echo '$(srcdir)/'`testDoubleAtan.c + +testDoubleAtan-testDoubleAtan.obj: testDoubleAtan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -MT testDoubleAtan-testDoubleAtan.obj -MD -MP -MF $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo -c -o testDoubleAtan-testDoubleAtan.obj `if test -f 'testDoubleAtan.c'; then $(CYGPATH_W) 'testDoubleAtan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAtan-testDoubleAtan.Tpo $(DEPDIR)/testDoubleAtan-testDoubleAtan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtan.c' object='testDoubleAtan-testDoubleAtan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtan_CFLAGS) $(CFLAGS) -c -o testDoubleAtan-testDoubleAtan.obj `if test -f 'testDoubleAtan.c'; then $(CYGPATH_W) 'testDoubleAtan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtan.c'; fi` + +testFloatAtan-testFloatAtan.o: testFloatAtan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -MT testFloatAtan-testFloatAtan.o -MD -MP -MF $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo -c -o testFloatAtan-testFloatAtan.o `test -f 'testFloatAtan.c' || echo '$(srcdir)/'`testFloatAtan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo $(DEPDIR)/testFloatAtan-testFloatAtan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtan.c' object='testFloatAtan-testFloatAtan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -c -o testFloatAtan-testFloatAtan.o `test -f 'testFloatAtan.c' || echo '$(srcdir)/'`testFloatAtan.c + +testFloatAtan-testFloatAtan.obj: testFloatAtan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -MT testFloatAtan-testFloatAtan.obj -MD -MP -MF $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo -c -o testFloatAtan-testFloatAtan.obj `if test -f 'testFloatAtan.c'; then $(CYGPATH_W) 'testFloatAtan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAtan-testFloatAtan.Tpo $(DEPDIR)/testFloatAtan-testFloatAtan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtan.c' object='testFloatAtan-testFloatAtan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtan_CFLAGS) $(CFLAGS) -c -o testFloatAtan-testFloatAtan.obj `if test -f 'testFloatAtan.c'; then $(CYGPATH_W) 'testFloatAtan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtan.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/atan/catana.c b/2.3-1/src/c/elementaryFunctions/atan/catana.c new file mode 100644 index 00000000..d6335cd8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/catana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan.h" + +void catana(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = catans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/catans.c b/2.3-1/src/c/elementaryFunctions/atan/catans.c new file mode 100644 index 00000000..d2081181 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/catans.c @@ -0,0 +1,249 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + PURPOSE + watan compute the arctangent of a complex number + y = yr + i yi = atan(x), x = xr + i xi + + CALLING LIST / PARAMETERS + subroutine watan(xr,xi,yr,yi) + double precision xr,xi,yr,yi + + xr,xi: real and imaginary parts of the complex number + yr,yi: real and imaginary parts of the result + yr,yi may have the same memory cases than xr et xi + + COPYRIGHT (C) 2001 Bruno Pincon and Lydia van Dijk + Written by Bruno Pincon so + as to get more precision. Also to fix the + behavior at the singular points and at the branch cuts. + Polished by Lydia van Dijk + + + CHANGES : - (Bruno on 2001 May 22) for ysptrk use a + minimax polynome to enlarge the special + evaluation zone |s| < SLIM. Also rename + this function as lnp1m1. + - (Bruno on 2001 June 7) better handling + of spurious over/underflow ; remove + the call to pythag ; better accuracy + in the real part for z near +-i + + EXTERNALS FUNCTIONS + dlamch + lnp1m1 (at the end of this file) + + ALGORITHM : noting z = a + i*b, we have: + Z = yr + yi*b = arctan(z) = (i/2) * log( (i+z)/(i-z) ) + + This function has two branch points at +i and -i and the + chosen branch cuts are the two half-straight lines + D1 = [i, i*oo) and D2 = (-i*oo, i]. The function is then + analytic in C \ (D1 U D2)). + + From the definition it follows that: + + yr = 0.5 Arg ( (i+z)/(i-z) ) (1) + yi = 0.5 log (|(i+z)/(i-z)|) (2) + + so lim (z -> +- i) yr = undefined (and Nan is logical) + lim (z -> +i) yi = +oo + lim (z -> -i) yi = -oo + + The real part of arctan(z) is discontinuous across D1 and D2 + and we impose the following definitions: + if imag(z) > 1 then + Arg(arctan(z)) = pi/2 (=lim real(z) -> 0+) + if imag(z) < 1 then + Arg(arctan(z)) = -pi/2 (=lim real(z) -> 0-) + + + Basic evaluation: if we write (i+z)/(i-z) using + z = a + i*b, we get: + + i+z 1-(a**2+b**2) + i*(2a) + --- = ---------------------- + i-z a**2 + (1-b)**2 + + then, with r2 = |z|^2 = a**2 + b**2 : + + yr = 0.5 * Arg(1-r2 + (2*a)*i) + = 0.5 * atan2(2a, (1-r2)) (3) + + This formula is changed when r2 > RMAX (max pos float) + and also when |1-r2| and |a| are near 0 (see comments + in the code). + + After some math: + + yi = 0.25 * log( (a**2 + (b + 1)**2) / + (a**2 + (b - 1)**2) ) (4) + + Evaluation for "big" |z| + ------------------------ + + If |z| is "big", the direct evaluation of yi by (4) may + suffer of innaccuracies and of spurious overflow. Noting + that s = 2 b / (1 + |z|**2), we have: + + yi = 0.25 log ( (1 + s)/(1 - s) ) (5) + + 3 5 + yi = 0.25*( 2 * ( s + 1/3 s + 1/5 s + ... )) + + yi = 0.25 * lnp1m1(s) if |s| < SLIM + + So if |s| is less than SLIM we switch to a special + evaluation done by the function lnp1m1. The + threshold value SLIM is choosen by experiment + (with the Pari-gp software). For |s| + "very small" we used a truncated taylor dvp, + else a minimax polynome (see lnp1m1). + + To avoid spurious overflows (which result in spurious + underflows for s) in computing s with s= 2 b / (1 + |z|**2) + when |z|^2 > RMAX (max positive float) we use : + + s = 2d0 / ( (a/b)*a + b ) + + but if |b| = Inf this formula leads to NaN when + |a| is also Inf. As we have : + + |s| <= 2 / |b| + + we impose simply : s = 0 when |b| = Inf + + Evaluation for z very near to i or -i: + -------------------------------------- + Floating point numbers of the form a+i or a-i with 0 < + a**2 < tiny (approximately 1d-308) may lead to underflow + (i.e., a**2 = 0) and the logarithm will break formula (4). + So we switch to the following formulas: + + If b = +-1 and |a| < sqrt(tiny) approximately 1d-150 (say) + then (by using that a**2 + 4 = 4 in machine for such a): + + yi = 0.5 * log( 2/|a| ) for b=1 + + yi = 0.5 * log( |a|/2 ) for b=-1 + + finally: yi = 0.5 * sign(b) * log( 2/|a| ) + yi = 0.5 * sign(b) * (log(2) - log(|a|)) (6) + + The last trick is to avoid overflow for |a|=tiny! In fact + this formula may be used until a**2 + 4 = 4 so that the + threshold value may be larger. +*/ + +#include +#include "atan.h" +#include "abs.h" +#include "lnp1m1.h" +#include "lapack.h" + +#define _sign(a, b) b >=0 ? a : -a + +floatComplex catans(floatComplex z) { + static float sSlim = 0.2f; + /* . + ** / \ WARNING : this algorithm was based on double precision + ** / ! \ using float truncate the value to 0. + ** `----' + ** + ** static float sAlim = 1E-150f; + */ + static float sAlim = 0.0f; + static float sTol = 0.3f; + static float sLn2 = 0.6931471805599453094172321f; + + float RMax = (float) getOverflowThreshold(); + float Pi_2 = 2.0f * satans(1); + + float _inReal = creals(z); + float _inImg = cimags(z); + float _outReal = 0; + float _outImg = 0; + + /* Temporary variables */ + float R2 = 0; + float S = 0; + + + if(_inImg == 0) + { + _outReal = satans(_inReal); + _outImg = 0; + } + else + { + R2 = _inReal * _inReal + _inImg * _inImg; /* Oo */ + if(R2 > RMax) + { + if( dabss(_inImg) > RMax) + S = 0; + else + S = 1.0f / (((0.5f * _inReal) / _inImg) * _inReal + 0.5f * _inImg ); + } + else + S = (2 * _inImg) / (1+R2); + + if(dabss(S) < sSlim) + { + /* + s is small: |s| < SLIM <=> |z| outside the following disks: + D+ = D(center = [0; 1/slim], radius = sqrt(1/slim**2 - 1)) if b > 0 + D- = D(center = [0; -1/slim], radius = sqrt(1/slim**2 - 1)) if b < 0 + use the special evaluation of log((1+s)/(1-s)) (5) + */ + _outImg = slnp1m1s(S) * 0.25f; + } + else + { + if(sabss(S) == 1 && sabss(_inReal) <= sAlim) + { + /* |s| >= SLIM => |z| is inside D+ or D- */ + _outImg = _sign(0.5f,_inImg) * ( sLn2 - logf(sabss(_inReal))); + } + else + { + _outImg = 0.25f * logf((powf(_inReal,2) + powf((_inImg + 1.0f),2)) / (powf(_inReal,2) + powf((_inImg - 1.0f),2))); + } + } + if(_inReal == 0) + {/* z is purely imaginary */ + if( dabss(_inImg) > 1) + {/* got sign(b) * pi/2 */ + _outReal = _sign(1, _inImg) * Pi_2; + } + else if( dabss(_inImg) == 1) + {/* got a Nan with 0/0 */ + _outReal = (_inReal - _inReal) / (_inReal - _inReal); /* Oo */ + } + else + _outReal = 0; + } + else if(R2 > RMax) + {/* _outImg is necessarily very near sign(a)* pi/2 */ + _outReal = _sign(1, _inReal) * Pi_2; + } + else if(sabss(1 - R2) + sabss(_inReal) <= sTol) + {/* |b| is very near 1 (and a is near 0) some cancellation occur in the (next) generic formula */ + _outReal = 0.5f * atan2f(2.0f * _inReal, (1.0f - _inImg) * (1.0f + _inImg) - powf(_inReal,2.0f)); + } + else + _outReal = 0.5f * atan2f(2.0f * _inReal, 1.0f - R2); + } + + return FloatComplex(_outReal, _outImg); +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/datana.c b/2.3-1/src/c/elementaryFunctions/atan/datana.c new file mode 100644 index 00000000..9b1d9c94 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/datana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan.h" + +void datana(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = datans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/datans.c b/2.3-1/src/c/elementaryFunctions/atan/datans.c new file mode 100644 index 00000000..a16df82d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/datans.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "atan.h" + +double datans(double x) { + return (atan(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/satana.c b/2.3-1/src/c/elementaryFunctions/atan/satana.c new file mode 100644 index 00000000..639c6f58 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/satana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan.h" + +void satana(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = satans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/satans.c b/2.3-1/src/c/elementaryFunctions/atan/satans.c new file mode 100644 index 00000000..5c7badee --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/satans.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "atan.h" + +float satans(float x) { + return (atanf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/testAtan.h b/2.3-1/src/c/elementaryFunctions/atan/testAtan.h new file mode 100644 index 00000000..86ba100a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/testAtan.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTATAN_H_ +#define _TESTATAN_H_ + +#include +#include +#include +#include "atan.h" +#include "constant.h" + +void satansTest(void); + +void satanaTest(void); + +void catansTest(void); + +void catanaTest(void); + +void datansTest(void); + +void datanaTest(void); + +void zatansTest(void); + +void zatanaTest(void); + +int testAtan(void); + +#endif /* !_TESTATAN_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/atan/testDoubleAtan.c b/2.3-1/src/c/elementaryFunctions/atan/testDoubleAtan.c new file mode 100644 index 00000000..85ef1087 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/testDoubleAtan.c @@ -0,0 +1,496 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAtan.h" + +#define SOURCE {0.2271646957046519754719,0.0509554588447201708967,1.85687282969809008826,\ +-0.0600149264751901750925,0.1154209251583080408921,0.3931023811137128731730,\ +-0.3192353063868129114944,-0.1509983292012369027191,-0.3971164405532471297633,\ +-0.4879179365092389808467,0.8039704485327389127391,-1.6086183006520318183874,\ +-1.4550051558571557297483,-2.0613539298303464875062,2.3614638061462338569640,\ +-1.1480101088176024592968,-0.2658609898928261938700,1.5427739450302764279144,\ +0.7423335722389889923534,0.3296187860375025535653,0.8154893385384427428875,\ +-0.7055736212996815970300,0.2819847871866195676560,0.3955156539663013948172,\ +-1.0216483261612141486552,-0.9217285194529017955389,0.1388701122197689430404,\ +0.2561008611862776729318,0.9488840790776944533746,-0.6033504831579518112861,\ +-1.255847241084065313288,-1.5093582375924872174267,-0.2071228671170260715595,\ +-0.3992159361232490155658,1.1415777038585108726920,1.2096296402394912661293,\ +1.2000346264198469281581,0.7648344037454491983752,0.5126417298496636076877,\ +-0.6005237850264322219118,-2.2808601123468448257370,-1.0478316411512684780405,\ +0.3987387706615069249416,-0.7901557685645255180162,0.9472076517346639246142,\ +1.2552561019596721880731,0.4826393798173508331573,-1.9230607741483070061150,\ +0.4005546162223627693066,0.1739168390171661471300,-0.0825727057882147952306,\ +0.8203738818332056981220,0.9228038015421474726807,0.4570111559683089907935,\ +0.9219829463190309937204,1.604104528474896707024,-0.7201236539398426783620,\ +0.6869793119903724321063,-1.3399970213280150144186,0.6385085849830633986102,\ +-2.1392676796592846599765,0.3031216472852934495918,1.4731483222685206602165,\ +-0.6666106701273177836953,2.5253251451367195735,-0.3387226520606179125394,\ +0.1099263677503663910739,0.2055796316301525261672,0.4180157426427644207223,\ +-0.5676554981767482077615,0.1457986457557736703627,-1.887021345850510067876,\ +-2.0255226332731517402408,-1.5021973207858168031237,-0.1565213082415607970255,\ +1.792895025421787247311,0.9902819037203779428680,-1.3877868870664777922741,\ +-1.9114516712610110094062,-0.1241624780676525430234,-0.1512289550370426727266,\ +1.0440663453119916059819,0.8275748256509259936919,0.9453274386638104154201,\ +0.8371330563424048687438,0.7021707191099652023425,-1.06501992349112173386,\ +0.0584382761085656052269,0.3908208204693481846448,0.1507745763925768811564,\ +1.0041017891872929812536,-1.2313120848428102949157,0.3394895696418271380246,\ +-0.0827142520512850892844,0.6446222176264210235175,-1.4935026770981445487507,\ +-0.8052775249062644746800,-0.5748653112322126279565,0.9754979932482783500092,\ +-2.2884524191498907264020,2.022987266935787342703,0.1637454282369502356342,\ +0.5475744092801727580522,-0.8932610448161549809853,-1.2797351399265011195894,\ +0.1118201613432585478369,-0.9620980829388734445473,0.3643849907609559291011,\ +-0.6874188098904436827752,-1.217541476664303568000,-0.5294220756831705676504,\ +-0.5958966870065123266897,0.1130069370904074471662,1.3982224083465000230575,\ +-1.0698899503771839292199,-0.4886124217435617311800,-1.3658513358172643670230,\ +0.7879963184644042106797,-1.4375620975102927356915,-0.4139225629147579854639,\ +0.4724629049642866118752,1.3786020791121860185058,-0.1818007311019581573319,\ +-0.1220915022718044445904,-2.1432379005797042026416,-0.8715288727031362814301,\ +1.7328275421264391908949,0.0746395063981880602100,0.9478227559099661192477,\ +-0.6746643568348875685814,-1.12189978973121218253,0.7712825781700975991129,\ +0.7878967433781322027286,-0.114954127571938721775,-0.8797100720757337066757,\ +0.3945983137523260686486,-0.1335061206135170208675,-0.8812942795785859706470,\ +0.9678256351883146590964,-1.2184863124466103201371,0.2811177412486541848935,\ +0.9039980069833579712224,-0.8586130195545335075380,-0.9119525776637865677188,\ +0.7834023749729661645347,-1.8588322045751330957586,0.9413946838303350883592,\ +-0.6013167449649100548825,0.7116576086154465796696,0.1856739618227061516809,\ +-2.4025809662081938355982,-1.1900189182655975805858,0.4811625406314723463197,\ +0.2175387195999395339996,-0.0380853618830928608574,-0.6838145482543566133771,\ +-1.5179336348870946515888,-1.718734246002084020688,-0.5464611700109887060250,\ +0.7723526959000743818962,0.3006795138383335785903,1.4291868716265472283311,\ +-0.0677166634975557846232,0.0573956162401944233742,0.1830487012206095109867,\ +0.6989722492840018119864,0.1910038834963114218191,0.2306826823577726726100,\ +-0.2565102919971545825106,-0.3420573662934773273570,-0.0978166804483409507709,\ +0.1422536753322360680851,0.5435939242933658377410,-0.3468100829076145585894,\ +0.4660640367220392210612,0.8993729143853705920719,0.7600191222869452367661,\ +0.8968829064436780740266,0.5805771807617583490924,-0.2307843851109470378891,\ +0.5165770205506754475522,0.8824788500189956197417,-0.7969387348104061130627,\ +-1.8168722946703086407183,1.5190242407155258863583,-0.8149773729875190442229,\ +2.4028228775031306163612,0.4982657796195523181026,0.2226740315197290043248,\ +0.1768897379163425209736,0.3603060382424789764855,0.3218716686921767045071,\ +-1.192570046506437719813,-0.1122386313819233177869,-2.0287975179488202392974,\ +0.100288454133301133120,-0.9179783877737051067669,-1.1999331406575297620520,\ +0.7483478159755958536437,2.2060613717090746810356} + +#define RESULT {0.2233738732437201557346,0.0509114261721980362885,1.0767942567911201745545,\ +-0.0599430280405672463728,0.1149124379797051148655,0.3745460477695387035979,\ +-0.3090091280795300709983,-0.1498661654051850200542,-0.3780180809438991595961,\ +-0.4539353243495501954996,0.6771572627749745665326,-1.0146085369409014731445,\ +-0.9686564923933993487282,-1.1191250002845629651915,1.1702255762215818535310,\ +-0.8541951038511210736459,-0.2598500531232013632810,0.9956994243583069392756,\ +0.6385765127412353914238,0.3184037447477280347030,0.6841145592833487443230,\ +-0.6144568631857774132499,0.2748482455938721091826,0.3766345938432117956829,\ +-0.7961060093123013547967,-0.7446909349913972686608,0.1379876022907993438071,\ +0.2507123565043022361820,0.759175872898178005777,-0.5428794496736766284073,\ +-0.89833074078511021554,-0.9856607896834306270506,-0.2042349952101077392719,\ +-0.3798302772852411579585,0.8514111742492602719068,0.8799860018302214648145,\ +0.8760722415122048634117,0.6529277236314812160600,0.4737097703113398172725,\ +-0.5408045473230975730417,-1.1576046419742331838876,-0.8087511308495316519895,\ +0.3794186378049814734048,-0.6687094713589172290114,0.7582929808049961861727,\ +0.8981012978260718426782,0.4496629050128420623800,-1.0912735975391061327144,\ +0.3809844030879972476278,0.1721944986308187042212,-0.0823858026410947269502,\ +0.6870411688329144395126,0.7452719880215435965809,0.4286690862084140407617,\ +0.7448284765591709488675,1.0133478453990099055204,-0.6241044852011972121630,\ +0.6019336895450897451099,-0.9296864924479115721567,0.5682544332615881987891,\ +-1.1335263715873262757583,0.2943182248013878621329,0.9744281865108882501048,\ +-0.5879638357107155322012,1.1937528186152712716961,-0.3265930739728566956082,\ +0.1094867742408287547562,0.2027547884149371593132,0.3959400774109990694960,\ +-0.5162971747333449101802,0.1447785328438968288634,-1.0834879385306221966090,\ +-1.112201615701992940544,-0.98346913687842862917,-0.1552615733221418270471,\ +1.062017052786182524926,0.7805154284284491206236,-0.9463968404701921244282,\ +-1.088790816976063835497,-0.1235302727421704604982,-0.1500916423979053448967,\ +0.8069530021779800499360,0.6913301738780865957068,0.7573010048408638228423,\ +0.6969765492354944580455,0.6121813376326975530972,-0.8168741064761906311986,\ +0.0583718892203711620104,0.3725683317450820819516,0.1496473933205103579169,\ +0.7874448575733706823243,-0.8886955789071054878647,0.3272808967598674345645,\ +-0.0825263887088810432768,0.5725854110105892402771,-0.980788536566781998793,\ +-0.6779506710306395511623,-0.5217330517396027156352,0.772995847351621967469,\ +-1.1588253401537096376472,1.1117042516684423337,0.1623050519698593929796,\ +0.5009790459791051420169,-0.7290794216990050813365,-0.9074929345625200038938,\ +0.111357569834535111153,-0.7660835307058299070704,0.349432040770661034301,\ +-0.6022322122997969540137,-0.883185569845575946246,-0.4869072854862174781765,\ +-0.5373968957759416298359,0.1125295355475867259409,0.9499457978350420717106,\ +-0.8191503966966299232766,-0.4544961153792455021971,-0.9388212744104845741688,\ +0.667378646873721059762,-0.9630145809992480820938,-0.3924506725722226585518,\ +0.4413762601275756369823,0.9432440329190430183814,-0.1798366074472934617035,\ +-0.1214902252731905191174,-1.134237248756892579848,-0.7168606663031997783264,\ +1.0473916695445741886772,0.0745013609201800736104,0.7586170976909952790024,\ +-0.5935190472805600414574,-0.8427835085661474767704,0.6569834032811123769591,\ +0.6673172133738860534180,-0.1144517528481678869667,-0.7214914324609644769026,\ +0.3758410950307565223660,-0.1327212976140068612096,-0.722383800988696922474,\ +0.769049408891516961262,-0.8835660062516154100720,0.2740448831292710551999,\ +0.7350195594735607906856,-0.7094731621063239401792,-0.7393796262522003281958,\ +0.6645381846985234375325,-1.0772344059827341222757,0.7552201039546350136433,\ +-0.5413871326815293816281,0.6185070897724082028546,0.1835833463904297524483,\ +-1.176386657281365266670,-0.8719472877519027775861,0.4484643942741659561335,\ +0.2142014421948802427309,-0.0380669636860080026763,-0.5997804502671881810016,\ +-0.9882664118774061590145,-1.0438491153613729256477,-0.5001221995547742160682,\ +0.6576540281533080900545,0.292080085019127744239,0.9602726979256205330771,\ +-0.0676134413768641334697,0.0573327152217289193192,0.1810443840994339081973,\ +0.6100358657130787731759,0.1887306738654894733287,0.2267166741276365193869,\ +-0.2510965487437752940991,-0.3295815282597121531616,-0.0975064859373050984992,\ +0.141305606529955662953,0.4979116182528884881897,-0.3338302007475900112787,\ +0.4361321851910835434296,0.7324685375973356560309,0.6498825704253795576548,\ +0.731090278993245523687,0.526015577583169635645,-0.2268132361170670519002,\ +0.4768211073463659022131,0.7230501420836584758334,-0.6728715276854828619690,\ +-1.0676488164290300897363,0.9885963208407696489743,-0.6838069995773392584226,\ +1.1764223744131836468796,0.4622592705138702240397,0.2190994523411692873616,\ +0.1750786606269341127984,0.345826480359459564884,0.3113998336672463840280,\ +-0.8730018295092231150889,-0.1117708529226727198758,-1.1128425715998719880417,\ +0.0999542424787834421496,-0.7426595867662098005013,-0.8760306483273037070347,\ +0.6424428721795988339593,1.1452043748636047126865} + +#define ZSOURCER {-1.1795163216180464260674,-0.6957584169324845246862,0.8259988996926452831104,\ +0.2005040766836741483736,-1.2112828126521528737669,1.577061196992769698255,\ +0.7637772368360737917925,1.8192271630516374525399,0.5455430088849253511540,\ +1.146539236621446411490,1.6240394311350210276856,-1.4966797534977682726520,\ +-1.59547014335820214193,-0.7395898851221245351439,-0.8068636961152658715335,\ +-1.0311002075319768422901,1.2005970723482952688954,-0.2648910783446530303742,\ +-0.2626223153489460337973,-0.7475187472806215094323,-0.5661153624892958369230,\ +0.7434875747358512532159,0.7872535238570613769227,0.451715552409009846180,\ +0.4606878032667490185936,0.0776842938192593146507,0.8641526902252117947612,\ +1.207833841833020782630,0.8731959322473188400693,0.0203507380205638840898,\ +-2.142561452892851825425,0.3422111419280877142590,1.2579314478540355448644,\ +1.7477933051936518360492,0.5187339957481993391042,-0.132728581017459240643,\ +-1.1602733035670516059668,0.4875989045190238790894,-0.5701105851822111381111,\ +-1.1912139790942799510987,2.0124340046175204221868,-2.7045248893564091119401,\ +-0.6431322992574242114472,-1.9153194443350760600708,-0.5655545944523592272191,\ +-0.65321727466490830949,-0.704349532744792949934,0.1130503418105048285547,\ +0.7790220841116946015603,-0.8369920883463126681789,-1.604067362874623814406,\ +-0.2256746981594401069149,-0.1392938143448255172707,0.6830835101317246360608,\ +-0.4155213883413004238854,0.0229733819760836940893,0.8246417042132325736503,\ +-0.6376565658151804871778,-1.7068298799179615343746,1.4073819355206949044401,\ +-0.8295221757203087298294,0.6373043870424420775933,-0.2922017410826197592044,\ +2.1752387761511053909658,0.0600723389389604608968,0.7835812912685555797765,\ +-1.3959357154825373648066,-2.0629358999978850697232,0.2656918800288301518719,\ +-1.1613766205716309354301,0.8939124507954123721731,1.6784098435216081579568,\ +1.2683311792448521693188,1.8385748076192800493089,-0.9497329202198889763764,\ +-1.270378528387523964227,0.7963056587352231874277,-0.8480009473832804678395,\ +-0.8640072224951356183453,-0.8715001223760306947597,-1.0437638424148545368553,\ +-0.4238345049288854693437,1.1151445198271947578661,-2.2055374030068151114392,\ +0.2874269036908579932899,-1.141542990475093111158,0.5076848390265716881586,\ +0.3056363849775944885323,-0.3052849785217074396471,0.0155317052678219415240,\ +0.2432114799458970910706,0.6784283234918451199746,1.872617399166290219625,\ +-0.5480102320972454199577,-1.1310137592478748391756,-0.0865801063652356234224,\ +-0.32288669591661972591,-0.3304845320488251636526,0.0611848701378388329375,\ +1.826560717567842440090,0.7447867877814601245134,-1.1564474239432984692399,\ +-1.1265940444751152416103,0.142628529129462972014,-0.8925873814067234457426,\ +-0.3627863505191566417807,-0.5662183332585394301972,-0.2716795089578870614488,\ +1.3639803640910439508360,1.237612166886607800720,0.3924305122780659127457,\ +0.7582137693795522048745,-1.1492170633741971563779,0.4241382639443282975833,\ +0.4098444400457034175744,-1.37669132334320454270,-1.4476326062045372644604,\ +0.7114066611465256206870,-1.3924830606697651269599,0.0338524257403221839891,\ +0.0146836062137128426502,1.2378730149006278438151,0.2801823548361609406143,\ +-1.3742686169958964192972,0.1717540380186403925489,-0.5855903929173471578196,\ +0.1907429151227005570401,0.7888793090772500127272,1.1338168541183824000740,\ +0.7778678198128919918375,0.4430509890900592440133,-1.8169712227336964893709,\ +-0.1603235606348805963872,1.0728726966089832117746,-0.6538383763382829005906,\ +-1.2903854138672581353120,-1.2588653493715018516497,0.662482523108547827206,\ +0.8653058064884894262647,0.8205627120768179683097,-0.6052538675768098785923,\ +0.1489320223008726296055,-1.1002545757952191252116,0.5601748137285590400936,\ +-0.7753064210754536667025,0.0825270383499445148168,-1.3301792471357218872186,\ +0.3149537401293732719054,-0.4413283119409475707684,0.5584497354764290655282,\ +0.2709448579613401020261,-0.4281368707331745238065,-0.2387957265896963054974,\ +-0.4604827882307634956405,-0.5412644127984000963494,0.7328783982761175597176,\ +-0.0713404400136534444510,-1.1936962614002064597685,-3.042807307214757006619,\ +0.7597050488151386726798,0.1791274991920646930676,-0.2506292816675101398083,\ +-0.6351531470374360832665,-0.121161180968055212648,-0.3652194549719223193307,\ +-0.9437320920432173965153,-0.2710022932148818952669,-0.9443973941449046449748,\ +1.3983220899832822237130,-0.4381256814836405610869,0.3765568950431126271639,\ +-0.3219819650340491334894,-0.1074889504736799422657,-0.6785727331891553415488,\ +2.4505579021475099033012,-1.3142551981836398944381,0.7354780365902759964314,\ +0.3711279315629368302787,-0.8351813322615772028357,0.9766824658266765046832,\ +1.461883720898450089720,1.5553635146325224258845,1.4271923988949506423296,\ +0.0934141721491809351452,-0.6278372555306163116384,-0.7994063607890871114847,\ +0.4560734872063767486594,1.2736575371127356604006,0.2044809074410245119946,\ +0.2464253458581916467196,0.1480097817386342162749,-0.7352399556856978879438,\ +0.9198120099159204920980,-0.6013531026590643868701,-0.6865004071225593307304,\ +-0.104616070370811706236,-0.3041328910990643286105,-1.0780356133329238588203,\ +-0.4779521279351744977859,0.5025105381497957379722} + +#define ZSOURCEI {-0.9552428551144188650923,1.2961834852294731312838,1.1017640646828426032044,\ +0.8711087850527934328682,-0.9420760043657475657497,-0.1497284505613425964476,\ +-1.3185366552605053414027,-0.6344981208817582762904,-0.1939736947913383302566,\ +0.5047024828595823020549,0.571239270735604098839,0.6329832938920191276466,\ +-1.0836206204774869732432,-0.2988022043772741165313,0.0786451729619408040906,\ +0.1005946170325885125063,0.1951019512685897017157,1.3036996759610997020928,\ +-1.604446040591435362899,-1.665829130168900329423,0.3894119616051456289618,\ +-0.6441312956332616579402,-0.3024073427875212938254,-0.4621890957188650173038,\ +-0.6774568059775447625981,0.445231860114528421590,-0.5535293580988084327643,\ +-0.0006762893110915249931,-1.089389506561633025328,0.5723493142465210237191,\ +0.4420973206857362058919,-0.1612581930858848211496,-0.7163329171822375718293,\ +-0.5277733874018479820478,-0.4768406780661605948168,-0.3993604887388358948286,\ +-1.3804293506092022436604,-0.1591254367281162429570,-1.6980146860343119374903,\ +-1.4761781930573465437817,0.2862303841437082718713,0.6052999005919722508295,\ +-0.5483298295339265049364,0.0209604427664898014527,-0.6457183807429971444947,\ +-0.0603329310380973649064,0.0091414413452102355473,1.0949883817318917245132,\ +1.6400776092272673079009,-0.623485665086227380804,0.9132225220115295361012,\ +0.0829708966832887195864,-0.1905412057335640341194,1.7237280439025588485435,\ +-1.1486098807701770052603,0.7656322424078984001383,0.365608177776686305016,\ +0.8275570484489896960767,-1.1195346368945833237518,2.009348617520048563279,\ +-1.3914607990698013573194,2.0854477679794358735421,1.2877168046463016715109,\ +-0.8111545211857794646093,-1.4392639991852771430558,0.5337937550547192655515,\ +-0.4149967301072188807787,0.7753596072101661684783,-2.0802067762281923890555,\ +0.0857878546561958027494,0.6902510695334604928775,-0.8020501997457173404271,\ +-0.4448276219158631139550,-0.4542741017673427861290,0.7497806557441212271797,\ +0.3761686067694443580400,-0.5437950704705085680501,0.1952712229487395811933,\ +1.4963569359039357031804,0.1448961397504171522144,-1.6571742156046651572865,\ +-2.266222156481924709936,-0.6895293883454371997033,0.2295209621736973848449,\ +0.5362163385171105911553,0.9313103118348207143384,0.6330960821019180340130,\ +-1.0858111091662558944648,0.0887541886374976635166,-0.34952319730873010473,\ +1.2435770678983146808605,0.3496891344866185913354,0.8861210080034624958500,\ +0.8494363200871917207735,-2.6007673657870293837391,0.1208397242502698559763,\ +-2.7285983994246283401708,-0.9589084058643195795923,0.5028677894031623463178,\ +0.1177935239520793014867,-0.8303109816686591315715,0.1392963806792855974148,\ +-0.7007200653415375235511,0.3010279059055253614297,0.2808756871176958935798,\ +-0.3407758216783158822238,-0.1629402754377415607490,-0.9384370915542669111531,\ +-0.9062708617577245329144,-3.8216620591432644005181,-0.4342151148359789103459,\ +-1.8035270857235303765265,0.5183732162291515566110,-0.6322771366436347184603,\ +-1.565814486101537061913,-0.1275146747340561437234,1.64064977802353451075,\ +0.3863617690782851776810,2.0004008659625807098337,-0.6217884089242305956091,\ +0.5238947303594374549363,0.6235004214546735479274,0.2053444204279457063755,\ +0.8703948860420792632553,-1.0392069272746413677311,1.003277086375655047235,\ +-0.592126107443248783646,1.4081926997371712051432,0.3085101089696197229628,\ +1.3401416840168169919423,-0.1266586333113026985320,-0.6461594510334438545840,\ +-1.0118098370918304773625,0.6188273552553577028235,0.3590555220619524590120,\ +-1.1731665361057745933238,-0.6396350210213861409159,-0.1754282371769660675564,\ +-1.4007581459609705909486,0.9435849228454418202716,-0.8904968184314612233976,\ +0.2054651558278166589844,0.4710457442017800810952,-0.9616306477690889087384,\ +-0.121221389008828367428,-0.4940626370918775878138,-1.6256998584585298228689,\ +0.2527933604007285839366,0.9910414428133418329736,-0.4204166976073123729307,\ +-0.3726016912019385896038,0.9512465231833235890235,1.9770278000388763484096,\ +0.7942630050207910574755,0.2042467951135929216111,-0.4515030272861193516576,\ +0.6146475682591936440247,-0.6290585121948016888993,-0.1427330253584118413546,\ +-0.0603831392611861861308,-0.0118358773438195733624,1.060362899843382056275,\ +0.0968488469273018626193,0.1916075762821658201585,-0.4096449181703107345065,\ +0.3696227488734469268650,0.2664498618423789544352,-1.1169828984464544863187,\ +0.1529016818054778348301,0.5016653096177513537768,0.3713737327704177415555,\ +1.519060224335068820523,-0.1807259441689535728326,1.8139275887503047979266,\ +-0.3257752015232963649360,2.1486960576842424330835,-0.1051361455427324009815,\ +-0.2626851203928968758738,1.0103646188196337973864,0.2148110767207350724206,\ +0.4407052420763278299809,-0.5122126723342420584473,1.2412118916908576604641,\ +0.9766933236701691445347,2.039099736880281454887,-0.2559919392094065493382,\ +0.5420836083333696597819,0.0791245311903027159772,-0.0955893777744002970387,\ +-1.3712286813648302263857,2.1069701518694308184365,-1.189922581642507859456,\ +-1.1599757893702906663691,-0.5696357256121767909107,-1.3015572133370920671069,\ +-0.5449309642239419382292,-0.5067789559895423678881,0.6346443332238025369918,\ +-0.6108333161328157734360,1.8419857567724760016858} + +#define ZRESULTR {-1.0378404956328399766363,-1.133735695651125086059,1.0339197498326544444325,\ +0.5531122148702418694910,-1.040340001858497842591,1.0085860369894361632248,\ +1.1420720538989748149561,1.1056797792052726059353,0.5117972485274214777817,\ +0.9070677525728206846978,1.0572990288526666891045,-1.0360972400059726972188,\ +-1.1383229838393340571656,-0.6648420928164470167232,-0.6807443500487321275116,\ +-0.8031597943350016199915,0.883947625424225447155,-1.269412549612109586405,\ +-1.4161063395011512788813,-1.2859233456553140761969,-0.5672668801729759957553,\ +0.7745318044293433290548,0.6947007749642374330179,0.4991201053193883852011,\ +0.6140034872209438887580,0.096413007169791717366,0.8007709883951089624432,\ +0.8792563999787510464756,1.0343346624696823088385,0.0302467913897976371784,\ +-1.1472175673143576446478,0.3369832737151475243742,0.9907410521400105141154,\ +1.0796900049026223467052,0.5594674889946016360653,-0.1560251223940891662778,\ +-1.1705823062338804874116,0.4618385738778090776613,-1.3324797047631469215645,\ +-1.1997345609820562195580,1.1160254294044837930500,-1.230501878395329207194,\ +-0.6761086369817806973614,-1.0896592333865446899921,-0.6710881467286168300390,\ +-0.5798029666713722107829,-0.6136654494083557676021,1.1617507290156328103592,\ +1.27276401512989068010,-0.8120428578165023170143,-1.1072391191957589029471,\ +-0.2233715590492064695383,-0.1434422451344934956730,1.3153998337128238738103,\ +-1.0526498309129606045786,0.0553606627561369843415,0.7291584643384485531215,\ +-0.8211933984789114848724,-1.1593353121271579020402,1.3152057671476293787549,\ +-1.172801856026281397405,1.4071868225661712248353,-1.237749706635684621148,\ +1.1803373520872921798031,1.5151506180989924299496,0.7531983030718831795269,\ +-0.9762856051169326310202,-1.1612557605568909480098,1.4932305416569968681273,\ +-0.8614722664300586973951,0.8618528735715539346174,1.1016443473924788509777,\ +0.9393199732131509716027,1.0919198431908447854966,-0.9052324038739091305317,\ +-0.9298866314213817263479,0.7633780893052066751636,-0.7143116680469970836143,\ +-1.2127221047629597183715,-0.7227638256662162197230,-1.253501631676815275540,\ +-1.4738165927959636647415,0.9413278434132237304510,-1.1484735264203178584097,\ +0.3698862224535668929981,-1.0222624393360630890015,0.6231994143282580944643,\ +0.9950036636352803665062,-0.2983226702432650867536,0.0176907017367243651895,\ +1.2324636476429444709169,0.6361627801840686879942,1.1459319881374090410731,\ +-0.7953680408910630550423,-1.4154164061425698051266,-0.0876282946873059020998,\ +-1.5216557556403844664317,-0.8071142269969606708457,0.0815747053150205070349,\ +1.0712377179167194007903,0.8666202597884599123645,-0.8619222017137594393787,\ +-0.9481006227828882026998,0.1552413858057176687666,-0.7506128146087278629750,\ +-0.3836715577045819447477,-0.5239185633043924594787,-0.7436026090030812829568,\ +1.0616275053374448766874,1.4897517325664235698923,0.4367517077925673341099,\ +1.3246660695183969380651,-0.9109135023203799308433,0.5553722323129884896886,\ +1.3365545316217091187383,-0.9452504202661284882225,-1.24445301968662169756,\ +0.6665795438258386163000,-1.314150441284937187447,0.0550695906884250130364,\ +0.0202332991673926272658,0.9634857364192206397036,0.2836842504797497110935,\ +-1.0552170344242444155469,0.9396260470070250114816,-0.9303925570132891564867,\ +0.2783356640126000702828,1.1824291811858682610392,0.8685688319389791578473,\ +1.1519647668153425446036,0.4220715686665841848146,-1.1065714015957384130928,\ +-0.861924596730684333679,0.9073537157079681891858,-0.6218839294281949259258,\ +-1.120015581786375724604,-0.9733844585621500566930,0.595029230494463101664,\ +1.175230190501943328130,0.9508205283471821145369,-0.8508278968495206484590,\ +0.1541098930310453307690,-0.8824217885955716322854,0.8902851444120675195038,\ +-0.6639557596979325237996,0.1084368331219868891724,-1.2396941127079998956617,\ +0.3226031789257856052799,-0.8843151570857661347702,0.5707126023897258759732,\ +0.3012759106579737111709,-0.8367027089033168829602,-1.4909615617958020816758,\ +-0.7009193727197650103378,-0.5098573775891588333309,0.6979392344955810401075,\ +-0.11360619748546052499,-0.9509385591695135309109,-1.253860295053432105661,\ +0.650797750208578995590,0.1772712514866976729611,-0.9640945137047890467485,\ +-0.5689005122453275609118,-0.1250511412013994849701,-0.4037636514907702589561,\ +-0.7926166698304296653887,-0.2823466357029139617296,-1.056824688357730357424,\ +0.9537129762345133432433,-0.5025361511250948653995,0.4038372312258701746224,\ +-1.356748408455357823854,-0.1106205947085566049237,-1.3416335800212069173654,\ +1.1885949854017261451133,-1.3422443000337007656952,0.6375731708639520434190,\ +0.3760968575323995755078,-0.9884746207385446403748,0.7854115858087797885645,\ +0.999043445647114114472,1.033179400413832382810,1.1526308570666976560659,\ +0.6867562899067288784138,-1.4009010309735028254607,-0.6940419760103245794269,\ +0.5354681750957488439724,0.9063410461496741454823,0.2034358249367814175379,\ +1.3295608151948998809644,1.5281379412739910517161,-1.0737486644518823286631,\ +1.0727905584835071284289,-0.6577524210666327864061,-1.1372820311372766610702,\ +-0.1467884541731124814490,-0.3758609793464613990643,-0.9135278670013463608868,\ +-0.5879353157795642603745,1.3892627420568484097885} + +#define ZRESULTI {-0.3299360864553753103223,0.5773236414575498853807,0.4991095547887292593892,\ +1.0331094146354482532502,-0.3176151990967214233663,-0.0427672547155572568833,\ +-0.5408736725419536206516,-0.1380553162115908116814,-0.1495803862615101287314,\ +0.2075977110248564960759,0.1483156441793008761820,0.1814264210630067153396,\ +-0.2481388687151736549552,-0.1914494023025192226406,0.0475995307877313186817,\ +0.0486725512662827888843,0.0793454719839349342791,0.8749639413571212998022,\ +-0.6896294045728997845757,-0.5086525074514365307721,0.2944098793875352670923,\ +-0.3917506744074427116331,-0.1846852570799382420308,-0.3894217746197643492678,\ +-0.5646100518854718641748,0.4746040014516990646065,-0.3015127179783077537856,\ +-0.0002750414994330601867,-0.4738712470203229054633,0.6504861039469930217294,\ +0.0770111005352082517161,-0.1450021418767060144006,-0.2504460533174687753011,\ +-0.1242925201299330817406,-0.3767991401181884358884,-0.4132076872602681860691,\ +-0.3870747570445600693745,-0.1287551829606753961421,-0.5591653729797143590474,\ +-0.3808547758746415601294,0.0560087196606005033317,0.0701856173788610038233,\ +-0.3788485405347551959743,0.0044895072328474238538,-0.4792093730891275327188,\ +-0.0422815385429984591514,0.0061101098120875880007,1.3269258764406561823535,\ +0.50216582477378490790,-0.3441118926473294425961,0.2204807457606408893636,\ +0.0790893257779779063066,-0.1890021515648551142519,0.518665277550073300361,\ +-0.8006086655024508003109,1.0073379811293934338323,0.2137094925844510162616,\ +0.5375421998418649094376,-0.2320202834395212743157,0.3256990051992574852768,\ +-0.5075425697148114867474,0.4587488944259289214145,0.8635283954295314146066,\ +-0.1297869621390935479521,-0.852694676585578515,0.3180243625197139989424,\ +-0.1362504231180562963566,0.1356147426873018091431,-0.5110906304654022624945,\ +0.0364746671485365880905,0.3518205609306652159596,-0.1882338930265980980749,\ +-0.1641509348055795458610,-0.1003678389496054923491,0.3533058939584889368568,\ +0.1400753442460135889114,-0.3190262039403771177071,0.1130098866744752156288,\ +0.4874882612585151875351,0.0821093566409674818773,-0.4196102828902398829136,\ +-0.451423643355465198379,-0.2794721520836026540380,0.0388676985912680683644,\ +0.5261724556813406339373,0.3369140501375452179111,0.5021943268293638240607,\ +-0.9466008502228719923011,0.0813161752282447886087,-0.3647911127697049948893,\ +0.9402058236775613364600,0.2373145443406108057172,0.1741667096823807936445,\ +0.6110175965051998225874,-0.3276211596627106037438,0.1205074840878167241609,\ +-0.3776545253138779423274,-0.8929722827626465075923,0.549792722962075375293,\ +0.0271042479895461374539,-0.47522513055127707515,0.0593823102898174345898,\ +-0.2798313897020670570903,0.3034375004902351569136,0.1544875118519504486603,\ +-0.3064946913611272250044,-0.1233973071314871799986,-0.9748519593919268144688,\ +-0.2695469774323944189831,-0.2398595153162375315237,-0.3849351067537384318840,\ +-0.4832629774775746844817,0.2120502817724358168849,-0.5500280838647416681297,\ +-0.6567358702149050930785,-0.0439088406752093027285,0.3215272662057582220285,\ +0.252983359599071477852,0.3285524490410307585364,-0.7260295113781071174586,\ +0.5814783672028649430530,0.2280478984411803411447,0.1921683660815579341996,\ +0.2598222279442688464890,-1.2261944929533434844870,0.6354501028006451779362,\ +-0.6350507146232319266588,0.5241840999802419576170,0.1326112979841672367964,\ +0.5331634907909190701503,-0.1060363792025432461141,-0.1405159325068739140097,\ +-1.2650277702054697481771,0.2669908129991411804838,0.2495345813255305800205,\ +-0.3316627619047222141901,-0.2282918540535401608071,-0.1217152595768435791035,\ +-0.4921799931736892674827,0.4709770755615852455556,-0.5858164911014823728053,\ +0.2035859669317575948444,0.2043112301670926833630,-0.6450693837623580062512,\ +-0.0755935103401305513726,-0.5356174761081086144188,-0.3471562389208797116957,\ +0.2328317315621121486036,0.7651997819792383248583,-0.3199579280419243554334,\ +-0.3582454315092570285017,0.7669246314230472316709,0.5441811107763497856737,\ +0.6504831149102675569296,0.1580962824886572026806,-0.2872668874651375658935,\ +0.7084196447067554469612,-0.2398740644903666341392,-0.0138893916104706732079,\ +-0.0382724601233607325534,-0.0114683647521359316501,1.042906817386681339599,\ +0.0689854613036876146426,0.1910230634709511876590,-0.3704134917614289590482,\ +0.1911216797569713354843,0.2522464542416475996589,-0.4451672855349098623101,\ +0.0515134584128001532521,0.4287903998263715155126,0.3315338614185490695441,\ +0.7124742713592439047332,-0.1805296499983318203597,0.5024343285394804459187,\ +-0.0459393453273769861167,0.3351247751616924785978,-0.0681623033986126780626,\ +-0.2332477835758634543417,0.4789761892657505848447,0.1091019217623192538724,\ +0.1355147604481500289708,-0.1428984493591255733325,0.3037123307940571281804,\ +1.5115293287912119346572,0.4692494475562393740908,-0.154956179496453544386,\ +0.4557841446769143045614,0.0301394028826129541099,-0.0919789120268482279785,\ +-0.8385856266070932374390,0.5121474514176801440257,-0.5562655937076338430458,\ +-0.4610543161770726539039,-0.4105611124291430047428,-0.5820664911774818817136,\ +-0.5994113052598605273502,-0.4878070905668511203501,0.2712394281598410339384,\ +-0.5014387951037901913764,0.5397742494143892288960} + + + +void datansTest() { + double in[]= SOURCE; + double res[]= RESULT; + double out; + int i=0; + + for (i=0;i<200;i++){ + out=datans(in[i]); + assert( ( (fabs(out-res[i])) / (fabs(out)) ) <3e-16); + } +} + +void zatansTest() { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zatans(in); + assert( ( (fabs(zreals(out)-resR[i])) / (fabs(zreals(out))) ) <3e-15); + assert( ( (fabs(zimags(out)-resI[i])) / (fabs(zimags(out))) ) <3e-15); + } +} + +void datanaTest(void) { + double in[]= SOURCE; + double res[]= RESULT; + double out[200]; + int i=0; + + datana(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <3e-16); + } +} + +void zatanaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zatana(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(zreals(out[i])-resR[i])) / (fabs(zreals(out[i]))) ) <3e-15); + assert( ( (fabs(zimags(out[i])-resI[i])) / (fabs(zimags(out[i]))) ) <3e-15); + } +} + +int testAtan() { + printf("\n>>>> Double Arc Tangeant Tests\n"); + datansTest(); + zatansTest(); + datanaTest(); + zatanaTest(); + + return 0; +} + +int main() { + assert(testAtan() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/testFloatAtan.c b/2.3-1/src/c/elementaryFunctions/atan/testFloatAtan.c new file mode 100644 index 00000000..a740b53c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/testFloatAtan.c @@ -0,0 +1,502 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAtan.h" + + +#define SOURCE {0.2271646957046519754719f,0.0509554588447201708967f,1.85687282969809008826f,\ +-0.0600149264751901750925f,0.1154209251583080408921f,0.3931023811137128731730f,\ +-0.3192353063868129114944f,-0.1509983292012369027191f,-0.3971164405532471297633f,\ +-0.4879179365092389808467f,0.8039704485327389127391f,-1.6086183006520318183874f,\ +-1.4550051558571557297483f,-2.0613539298303464875062f,2.3614638061462338569640f,\ +-1.1480101088176024592968f,-0.2658609898928261938700f,1.5427739450302764279144f,\ +0.7423335722389889923534f,0.3296187860375025535653f,0.8154893385384427428875f,\ +-0.7055736212996815970300f,0.2819847871866195676560f,0.3955156539663013948172f,\ +-1.0216483261612141486552f,-0.9217285194529017955389f,0.1388701122197689430404f,\ +0.2561008611862776729318f,0.9488840790776944533746f,-0.6033504831579518112861f,\ +-1.255847241084065313288f,-1.5093582375924872174267f,-0.2071228671170260715595f,\ +-0.3992159361232490155658f,1.1415777038585108726920f,1.2096296402394912661293f,\ +1.2000346264198469281581f,0.7648344037454491983752f,0.5126417298496636076877f,\ +-0.6005237850264322219118f,-2.2808601123468448257370f,-1.0478316411512684780405f,\ +0.3987387706615069249416f,-0.7901557685645255180162f,0.9472076517346639246142f,\ +1.2552561019596721880731f,0.4826393798173508331573f,-1.9230607741483070061150f,\ +0.4005546162223627693066f,0.1739168390171661471300f,-0.0825727057882147952306f,\ +0.8203738818332056981220f,0.9228038015421474726807f,0.4570111559683089907935f,\ +0.9219829463190309937204f,1.604104528474896707024f,-0.7201236539398426783620f,\ +0.6869793119903724321063f,-1.3399970213280150144186f,0.6385085849830633986102f,\ +-2.1392676796592846599765f,0.3031216472852934495918f,1.4731483222685206602165f,\ +-0.6666106701273177836953f,2.5253251451367195735f,-0.3387226520606179125394f,\ +0.1099263677503663910739f,0.2055796316301525261672f,0.4180157426427644207223f,\ +-0.5676554981767482077615f,0.1457986457557736703627f,-1.887021345850510067876f,\ +-2.0255226332731517402408f,-1.5021973207858168031237f,-0.1565213082415607970255f,\ +1.792895025421787247311f,0.9902819037203779428680f,-1.3877868870664777922741f,\ +-1.9114516712610110094062f,-0.1241624780676525430234f,-0.1512289550370426727266f,\ +1.0440663453119916059819f,0.8275748256509259936919f,0.9453274386638104154201f,\ +0.8371330563424048687438f,0.7021707191099652023425f,-1.06501992349112173386f,\ +0.0584382761085656052269f,0.3908208204693481846448f,0.1507745763925768811564f,\ +1.0041017891872929812536f,-1.2313120848428102949157f,0.3394895696418271380246f,\ +-0.0827142520512850892844f,0.6446222176264210235175f,-1.4935026770981445487507f,\ +-0.8052775249062644746800f,-0.5748653112322126279565f,0.9754979932482783500092f,\ +-2.2884524191498907264020f,2.022987266935787342703f,0.1637454282369502356342f,\ +0.5475744092801727580522f,-0.8932610448161549809853f,-1.2797351399265011195894f,\ +0.1118201613432585478369f,-0.9620980829388734445473f,0.3643849907609559291011f,\ +-0.6874188098904436827752f,-1.217541476664303568000f,-0.5294220756831705676504f,\ +-0.5958966870065123266897f,0.1130069370904074471662f,1.3982224083465000230575f,\ +-1.0698899503771839292199f,-0.4886124217435617311800f,-1.3658513358172643670230f,\ +0.7879963184644042106797f,-1.4375620975102927356915f,-0.4139225629147579854639f,\ +0.4724629049642866118752f,1.3786020791121860185058f,-0.1818007311019581573319f,\ +-0.1220915022718044445904f,-2.1432379005797042026416f,-0.8715288727031362814301f,\ +1.7328275421264391908949f,0.0746395063981880602100f,0.9478227559099661192477f,\ +-0.6746643568348875685814f,-1.12189978973121218253f,0.7712825781700975991129f,\ +0.7878967433781322027286f,-0.114954127571938721775f,-0.8797100720757337066757f,\ +0.3945983137523260686486f,-0.1335061206135170208675f,-0.8812942795785859706470f,\ +0.9678256351883146590964f,-1.2184863124466103201371f,0.2811177412486541848935f,\ +0.9039980069833579712224f,-0.8586130195545335075380f,-0.9119525776637865677188f,\ +0.7834023749729661645347f,-1.8588322045751330957586f,0.9413946838303350883592f,\ +-0.6013167449649100548825f,0.7116576086154465796696f,0.1856739618227061516809f,\ +-2.4025809662081938355982f,-1.1900189182655975805858f,0.4811625406314723463197f,\ +0.2175387195999395339996f,-0.0380853618830928608574f,-0.6838145482543566133771f,\ +-1.5179336348870946515888f,-1.718734246002084020688f,-0.5464611700109887060250f,\ +0.7723526959000743818962f,0.3006795138383335785903f,1.4291868716265472283311f,\ +-0.0677166634975557846232f,0.0573956162401944233742f,0.1830487012206095109867f,\ +0.6989722492840018119864f,0.1910038834963114218191f,0.2306826823577726726100f,\ +-0.2565102919971545825106f,-0.3420573662934773273570f,-0.0978166804483409507709f,\ +0.1422536753322360680851f,0.5435939242933658377410f,-0.3468100829076145585894f,\ +0.4660640367220392210612f,0.8993729143853705920719f,0.7600191222869452367661f,\ +0.8968829064436780740266f,0.5805771807617583490924f,-0.2307843851109470378891f,\ +0.5165770205506754475522f,0.8824788500189956197417f,-0.7969387348104061130627f,\ +-1.8168722946703086407183f,1.5190242407155258863583f,-0.8149773729875190442229f,\ +2.4028228775031306163612f,0.4982657796195523181026f,0.2226740315197290043248f,\ +0.1768897379163425209736f,0.3603060382424789764855f,0.3218716686921767045071f,\ +-1.192570046506437719813f,-0.1122386313819233177869f,-2.0287975179488202392974f,\ +0.100288454133301133120f,-0.9179783877737051067669f,-1.1999331406575297620520f,\ +0.7483478159755958536437f,2.2060613717090746810356f} + +#define RESULT {0.2233738732437201557346f,0.0509114261721980362885f,1.0767942567911201745545f,\ +-0.0599430280405672463728f,0.1149124379797051148655f,0.3745460477695387035979f,\ +-0.3090091280795300709983f,-0.1498661654051850200542f,-0.3780180809438991595961f,\ +-0.4539353243495501954996f,0.6771572627749745665326f,-1.0146085369409014731445f,\ +-0.9686564923933993487282f,-1.1191250002845629651915f,1.1702255762215818535310f,\ +-0.8541951038511210736459f,-0.2598500531232013632810f,0.9956994243583069392756f,\ +0.6385765127412353914238f,0.3184037447477280347030f,0.6841145592833487443230f,\ +-0.6144568631857774132499f,0.2748482455938721091826f,0.3766345938432117956829f,\ +-0.7961060093123013547967f,-0.7446909349913972686608f,0.1379876022907993438071f,\ +0.2507123565043022361820f,0.759175872898178005777f,-0.5428794496736766284073f,\ +-0.89833074078511021554f,-0.9856607896834306270506f,-0.2042349952101077392719f,\ +-0.3798302772852411579585f,0.8514111742492602719068f,0.8799860018302214648145f,\ +0.8760722415122048634117f,0.6529277236314812160600f,0.4737097703113398172725f,\ +-0.5408045473230975730417f,-1.1576046419742331838876f,-0.8087511308495316519895f,\ +0.3794186378049814734048f,-0.6687094713589172290114f,0.7582929808049961861727f,\ +0.8981012978260718426782f,0.4496629050128420623800f,-1.0912735975391061327144f,\ +0.3809844030879972476278f,0.1721944986308187042212f,-0.0823858026410947269502f,\ +0.6870411688329144395126f,0.7452719880215435965809f,0.4286690862084140407617f,\ +0.7448284765591709488675f,1.0133478453990099055204f,-0.6241044852011972121630f,\ +0.6019336895450897451099f,-0.9296864924479115721567f,0.5682544332615881987891f,\ +-1.1335263715873262757583f,0.2943182248013878621329f,0.9744281865108882501048f,\ +-0.5879638357107155322012f,1.1937528186152712716961f,-0.3265930739728566956082f,\ +0.1094867742408287547562f,0.2027547884149371593132f,0.3959400774109990694960f,\ +-0.5162971747333449101802f,0.1447785328438968288634f,-1.0834879385306221966090f,\ +-1.112201615701992940544f,-0.98346913687842862917f,-0.1552615733221418270471f,\ +1.062017052786182524926f,0.7805154284284491206236f,-0.9463968404701921244282f,\ +-1.088790816976063835497f,-0.1235302727421704604982f,-0.1500916423979053448967f,\ +0.8069530021779800499360f,0.6913301738780865957068f,0.7573010048408638228423f,\ +0.6969765492354944580455f,0.6121813376326975530972f,-0.8168741064761906311986f,\ +0.0583718892203711620104f,0.3725683317450820819516f,0.1496473933205103579169f,\ +0.7874448575733706823243f,-0.8886955789071054878647f,0.3272808967598674345645f,\ +-0.0825263887088810432768f,0.5725854110105892402771f,-0.980788536566781998793f,\ +-0.6779506710306395511623f,-0.5217330517396027156352f,0.772995847351621967469f,\ +-1.1588253401537096376472f,1.1117042516684423337f,0.1623050519698593929796f,\ +0.5009790459791051420169f,-0.7290794216990050813365f,-0.9074929345625200038938f,\ +0.111357569834535111153f,-0.7660835307058299070704f,0.349432040770661034301f,\ +-0.6022322122997969540137f,-0.883185569845575946246f,-0.4869072854862174781765f,\ +-0.5373968957759416298359f,0.1125295355475867259409f,0.9499457978350420717106f,\ +-0.8191503966966299232766f,-0.4544961153792455021971f,-0.9388212744104845741688f,\ +0.667378646873721059762f,-0.9630145809992480820938f,-0.3924506725722226585518f,\ +0.4413762601275756369823f,0.9432440329190430183814f,-0.1798366074472934617035f,\ +-0.1214902252731905191174f,-1.134237248756892579848f,-0.7168606663031997783264f,\ +1.0473916695445741886772f,0.0745013609201800736104f,0.7586170976909952790024f,\ +-0.5935190472805600414574f,-0.8427835085661474767704f,0.6569834032811123769591f,\ +0.6673172133738860534180f,-0.1144517528481678869667f,-0.7214914324609644769026f,\ +0.3758410950307565223660f,-0.1327212976140068612096f,-0.722383800988696922474f,\ +0.769049408891516961262f,-0.8835660062516154100720f,0.2740448831292710551999f,\ +0.7350195594735607906856f,-0.7094731621063239401792f,-0.7393796262522003281958f,\ +0.6645381846985234375325f,-1.0772344059827341222757f,0.7552201039546350136433f,\ +-0.5413871326815293816281f,0.6185070897724082028546f,0.1835833463904297524483f,\ +-1.176386657281365266670f,-0.8719472877519027775861f,0.4484643942741659561335f,\ +0.2142014421948802427309f,-0.0380669636860080026763f,-0.5997804502671881810016f,\ +-0.9882664118774061590145f,-1.0438491153613729256477f,-0.5001221995547742160682f,\ +0.6576540281533080900545f,0.292080085019127744239f,0.9602726979256205330771f,\ +-0.0676134413768641334697f,0.0573327152217289193192f,0.1810443840994339081973f,\ +0.6100358657130787731759f,0.1887306738654894733287f,0.2267166741276365193869f,\ +-0.2510965487437752940991f,-0.3295815282597121531616f,-0.0975064859373050984992f,\ +0.141305606529955662953f,0.4979116182528884881897f,-0.3338302007475900112787f,\ +0.4361321851910835434296f,0.7324685375973356560309f,0.6498825704253795576548f,\ +0.731090278993245523687f,0.526015577583169635645f,-0.2268132361170670519002f,\ +0.4768211073463659022131f,0.7230501420836584758334f,-0.6728715276854828619690f,\ +-1.0676488164290300897363f,0.9885963208407696489743f,-0.6838069995773392584226f,\ +1.1764223744131836468796f,0.4622592705138702240397f,0.2190994523411692873616f,\ +0.1750786606269341127984f,0.345826480359459564884f,0.3113998336672463840280f,\ +-0.8730018295092231150889f,-0.1117708529226727198758f,-1.1128425715998719880417f,\ +0.0999542424787834421496f,-0.7426595867662098005013f,-0.8760306483273037070347f,\ +0.6424428721795988339593f,1.1452043748636047126865f} + +#define CSOURCER {-1.1795163216180464260674f,-0.6957584169324845246862f,0.8259988996926452831104f,\ +0.2005040766836741483736f,-1.2112828126521528737669f,1.577061196992769698255f,\ +0.7637772368360737917925f,1.8192271630516374525399f,0.5455430088849253511540f,\ +1.146539236621446411490f,1.6240394311350210276856f,-1.4966797534977682726520f,\ +-1.59547014335820214193f,-0.7395898851221245351439f,-0.8068636961152658715335f,\ +-1.0311002075319768422901f,1.2005970723482952688954f,-0.2648910783446530303742f,\ +-0.2626223153489460337973f,-0.7475187472806215094323f,-0.5661153624892958369230f,\ +0.7434875747358512532159f,0.7872535238570613769227f,0.451715552409009846180f,\ +0.4606878032667490185936f,0.0776842938192593146507f,0.8641526902252117947612f,\ +1.207833841833020782630f,0.8731959322473188400693f,0.0203507380205638840898f,\ +-2.142561452892851825425f,0.3422111419280877142590f,1.2579314478540355448644f,\ +1.7477933051936518360492f,0.5187339957481993391042f,-0.132728581017459240643f,\ +-1.1602733035670516059668f,0.4875989045190238790894f,-0.5701105851822111381111f,\ +-1.1912139790942799510987f,2.0124340046175204221868f,-2.7045248893564091119401f,\ +-0.6431322992574242114472f,-1.9153194443350760600708f,-0.5655545944523592272191f,\ +-0.65321727466490830949f,-0.704349532744792949934f,0.1130503418105048285547f,\ +0.7790220841116946015603f,-0.8369920883463126681789f,-1.604067362874623814406f,\ +-0.2256746981594401069149f,-0.1392938143448255172707f,0.6830835101317246360608f,\ +-0.4155213883413004238854f,0.0229733819760836940893f,0.8246417042132325736503f,\ +-0.6376565658151804871778f,-1.7068298799179615343746f,1.4073819355206949044401f,\ +-0.8295221757203087298294f,0.6373043870424420775933f,-0.2922017410826197592044f,\ +2.1752387761511053909658f,0.0600723389389604608968f,0.7835812912685555797765f,\ +-1.3959357154825373648066f,-2.0629358999978850697232f,0.2656918800288301518719f,\ +-1.1613766205716309354301f,0.8939124507954123721731f,1.6784098435216081579568f,\ +1.2683311792448521693188f,1.8385748076192800493089f,-0.9497329202198889763764f,\ +-1.270378528387523964227f,0.7963056587352231874277f,-0.8480009473832804678395f,\ +-0.8640072224951356183453f,-0.8715001223760306947597f,-1.0437638424148545368553f,\ +-0.4238345049288854693437f,1.1151445198271947578661f,-2.2055374030068151114392f,\ +0.2874269036908579932899f,-1.141542990475093111158f,0.5076848390265716881586f,\ +0.3056363849775944885323f,-0.3052849785217074396471f,0.0155317052678219415240f,\ +0.2432114799458970910706f,0.6784283234918451199746f,1.872617399166290219625f,\ +-0.5480102320972454199577f,-1.1310137592478748391756f,-0.0865801063652356234224f,\ +-0.32288669591661972591f,-0.3304845320488251636526f,0.0611848701378388329375f,\ +1.826560717567842440090f,0.7447867877814601245134f,-1.1564474239432984692399f,\ +-1.1265940444751152416103f,0.142628529129462972014f,-0.8925873814067234457426f,\ +-0.3627863505191566417807f,-0.5662183332585394301972f,-0.2716795089578870614488f,\ +1.3639803640910439508360f,1.237612166886607800720f,0.3924305122780659127457f,\ +0.7582137693795522048745f,-1.1492170633741971563779f,0.4241382639443282975833f,\ +0.4098444400457034175744f,-1.37669132334320454270f,-1.4476326062045372644604f,\ +0.7114066611465256206870f,-1.3924830606697651269599f,0.0338524257403221839891f,\ +0.0146836062137128426502f,1.2378730149006278438151f,0.2801823548361609406143f,\ +-1.3742686169958964192972f,0.1717540380186403925489f,-0.5855903929173471578196f,\ +0.1907429151227005570401f,0.7888793090772500127272f,1.1338168541183824000740f,\ +0.7778678198128919918375f,0.4430509890900592440133f,-1.8169712227336964893709f,\ +-0.1603235606348805963872f,1.0728726966089832117746f,-0.6538383763382829005906f,\ +-1.2903854138672581353120f,-1.2588653493715018516497f,0.662482523108547827206f,\ +0.8653058064884894262647f,0.8205627120768179683097f,-0.6052538675768098785923f,\ +0.1489320223008726296055f,-1.1002545757952191252116f,0.5601748137285590400936f,\ +-0.7753064210754536667025f,0.0825270383499445148168f,-1.3301792471357218872186f,\ +0.3149537401293732719054f,-0.4413283119409475707684f,0.5584497354764290655282f,\ +0.2709448579613401020261f,-0.4281368707331745238065f,-0.2387957265896963054974f,\ +-0.4604827882307634956405f,-0.5412644127984000963494f,0.7328783982761175597176f,\ +-0.0713404400136534444510f,-1.1936962614002064597685f,-3.042807307214757006619f,\ +0.7597050488151386726798f,0.1791274991920646930676f,-0.2506292816675101398083f,\ +-0.6351531470374360832665f,-0.121161180968055212648f,-0.3652194549719223193307f,\ +-0.9437320920432173965153f,-0.2710022932148818952669f,-0.9443973941449046449748f,\ +1.3983220899832822237130f,-0.4381256814836405610869f,0.3765568950431126271639f,\ +-0.3219819650340491334894f,-0.1074889504736799422657f,-0.6785727331891553415488f,\ +2.4505579021475099033012f,-1.3142551981836398944381f,0.7354780365902759964314f,\ +0.3711279315629368302787f,-0.8351813322615772028357f,0.9766824658266765046832f,\ +1.461883720898450089720f,1.5553635146325224258845f,1.4271923988949506423296f,\ +0.0934141721491809351452f,-0.6278372555306163116384f,-0.7994063607890871114847f,\ +0.4560734872063767486594f,1.2736575371127356604006f,0.2044809074410245119946f,\ +0.2464253458581916467196f,0.1480097817386342162749f,-0.7352399556856978879438f,\ +0.9198120099159204920980f,-0.6013531026590643868701f,-0.6865004071225593307304f,\ +-0.104616070370811706236f,-0.3041328910990643286105f,-1.0780356133329238588203f,\ +-0.4779521279351744977859f,0.5025105381497957379722f} + +#define CSOURCEI {-0.9552428551144188650923f,1.2961834852294731312838f,1.1017640646828426032044f,\ +0.8711087850527934328682f,-0.9420760043657475657497f,-0.1497284505613425964476f,\ +-1.3185366552605053414027f,-0.6344981208817582762904f,-0.1939736947913383302566f,\ +0.5047024828595823020549f,0.571239270735604098839f,0.6329832938920191276466f,\ +-1.0836206204774869732432f,-0.2988022043772741165313f,0.0786451729619408040906f,\ +0.1005946170325885125063f,0.1951019512685897017157f,1.3036996759610997020928f,\ +-1.604446040591435362899f,-1.665829130168900329423f,0.3894119616051456289618f,\ +-0.6441312956332616579402f,-0.3024073427875212938254f,-0.4621890957188650173038f,\ +-0.6774568059775447625981f,0.445231860114528421590f,-0.5535293580988084327643f,\ +-0.0006762893110915249931f,-1.089389506561633025328f,0.5723493142465210237191f,\ +0.4420973206857362058919f,-0.1612581930858848211496f,-0.7163329171822375718293f,\ +-0.5277733874018479820478f,-0.4768406780661605948168f,-0.3993604887388358948286f,\ +-1.3804293506092022436604f,-0.1591254367281162429570f,-1.6980146860343119374903f,\ +-1.4761781930573465437817f,0.2862303841437082718713f,0.6052999005919722508295f,\ +-0.5483298295339265049364f,0.0209604427664898014527f,-0.6457183807429971444947f,\ +-0.0603329310380973649064f,0.0091414413452102355473f,1.0949883817318917245132f,\ +1.6400776092272673079009f,-0.623485665086227380804f,0.9132225220115295361012f,\ +0.0829708966832887195864f,-0.1905412057335640341194f,1.7237280439025588485435f,\ +-1.1486098807701770052603f,0.7656322424078984001383f,0.365608177776686305016f,\ +0.8275570484489896960767f,-1.1195346368945833237518f,2.009348617520048563279f,\ +-1.3914607990698013573194f,2.0854477679794358735421f,1.2877168046463016715109f,\ +-0.8111545211857794646093f,-1.4392639991852771430558f,0.5337937550547192655515f,\ +-0.4149967301072188807787f,0.7753596072101661684783f,-2.0802067762281923890555f,\ +0.0857878546561958027494f,0.6902510695334604928775f,-0.8020501997457173404271f,\ +-0.4448276219158631139550f,-0.4542741017673427861290f,0.7497806557441212271797f,\ +0.3761686067694443580400f,-0.5437950704705085680501f,0.1952712229487395811933f,\ +1.4963569359039357031804f,0.1448961397504171522144f,-1.6571742156046651572865f,\ +-2.266222156481924709936f,-0.6895293883454371997033f,0.2295209621736973848449f,\ +0.5362163385171105911553f,0.9313103118348207143384f,0.6330960821019180340130f,\ +-1.0858111091662558944648f,0.0887541886374976635166f,-0.34952319730873010473f,\ +1.2435770678983146808605f,0.3496891344866185913354f,0.8861210080034624958500f,\ +0.8494363200871917207735f,-2.6007673657870293837391f,0.1208397242502698559763f,\ +-2.7285983994246283401708f,-0.9589084058643195795923f,0.5028677894031623463178f,\ +0.1177935239520793014867f,-0.8303109816686591315715f,0.1392963806792855974148f,\ +-0.7007200653415375235511f,0.3010279059055253614297f,0.2808756871176958935798f,\ +-0.3407758216783158822238f,-0.1629402754377415607490f,-0.9384370915542669111531f,\ +-0.9062708617577245329144f,-3.8216620591432644005181f,-0.4342151148359789103459f,\ +-1.8035270857235303765265f,0.5183732162291515566110f,-0.6322771366436347184603f,\ +-1.565814486101537061913f,-0.1275146747340561437234f,1.64064977802353451075f,\ +0.3863617690782851776810f,2.0004008659625807098337f,-0.6217884089242305956091f,\ +0.5238947303594374549363f,0.6235004214546735479274f,0.2053444204279457063755f,\ +0.8703948860420792632553f,-1.0392069272746413677311f,1.003277086375655047235f,\ +-0.592126107443248783646f,1.4081926997371712051432f,0.3085101089696197229628f,\ +1.3401416840168169919423f,-0.1266586333113026985320f,-0.6461594510334438545840f,\ +-1.0118098370918304773625f,0.6188273552553577028235f,0.3590555220619524590120f,\ +-1.1731665361057745933238f,-0.6396350210213861409159f,-0.1754282371769660675564f,\ +-1.4007581459609705909486f,0.9435849228454418202716f,-0.8904968184314612233976f,\ +0.2054651558278166589844f,0.4710457442017800810952f,-0.9616306477690889087384f,\ +-0.121221389008828367428f,-0.4940626370918775878138f,-1.6256998584585298228689f,\ +0.2527933604007285839366f,0.9910414428133418329736f,-0.4204166976073123729307f,\ +-0.3726016912019385896038f,0.9512465231833235890235f,1.9770278000388763484096f,\ +0.7942630050207910574755f,0.2042467951135929216111f,-0.4515030272861193516576f,\ +0.6146475682591936440247f,-0.6290585121948016888993f,-0.1427330253584118413546f,\ +-0.0603831392611861861308f,-0.0118358773438195733624f,1.060362899843382056275f,\ +0.0968488469273018626193f,0.1916075762821658201585f,-0.4096449181703107345065f,\ +0.3696227488734469268650f,0.2664498618423789544352f,-1.1169828984464544863187f,\ +0.1529016818054778348301f,0.5016653096177513537768f,0.3713737327704177415555f,\ +1.519060224335068820523f,-0.1807259441689535728326f,1.8139275887503047979266f,\ +-0.3257752015232963649360f,2.1486960576842424330835f,-0.1051361455427324009815f,\ +-0.2626851203928968758738f,1.0103646188196337973864f,0.2148110767207350724206f,\ +0.4407052420763278299809f,-0.5122126723342420584473f,1.2412118916908576604641f,\ +0.9766933236701691445347f,2.039099736880281454887f,-0.2559919392094065493382f,\ +0.5420836083333696597819f,0.0791245311903027159772f,-0.0955893777744002970387f,\ +-1.3712286813648302263857f,2.1069701518694308184365f,-1.189922581642507859456f,\ +-1.1599757893702906663691f,-0.5696357256121767909107f,-1.3015572133370920671069f,\ +-0.5449309642239419382292f,-0.5067789559895423678881f,0.6346443332238025369918f,\ +-0.6108333161328157734360f,1.8419857567724760016858f} + +#define CRESULTR {-1.0378404956328399766363f,-1.133735695651125086059f,1.0339197498326544444325f,\ +0.5531122148702418694910f,-1.040340001858497842591f,1.0085860369894361632248f,\ +1.1420720538989748149561f,1.1056797792052726059353f,0.5117972485274214777817f,\ +0.9070677525728206846978f,1.0572990288526666891045f,-1.0360972400059726972188f,\ +-1.1383229838393340571656f,-0.6648420928164470167232f,-0.6807443500487321275116f,\ +-0.8031597943350016199915f,0.883947625424225447155f,-1.269412549612109586405f,\ +-1.4161063395011512788813f,-1.2859233456553140761969f,-0.5672668801729759957553f,\ +0.7745318044293433290548f,0.6947007749642374330179f,0.4991201053193883852011f,\ +0.6140034872209438887580f,0.096413007169791717366f,0.8007709883951089624432f,\ +0.8792563999787510464756f,1.0343346624696823088385f,0.0302467913897976371784f,\ +-1.1472175673143576446478f,0.3369832737151475243742f,0.9907410521400105141154f,\ +1.0796900049026223467052f,0.5594674889946016360653f,-0.1560251223940891662778f,\ +-1.1705823062338804874116f,0.4618385738778090776613f,-1.3324797047631469215645f,\ +-1.1997345609820562195580f,1.1160254294044837930500f,-1.230501878395329207194f,\ +-0.6761086369817806973614f,-1.0896592333865446899921f,-0.6710881467286168300390f,\ +-0.5798029666713722107829f,-0.6136654494083557676021f,1.1617507290156328103592f,\ +1.27276401512989068010f,-0.8120428578165023170143f,-1.1072391191957589029471f,\ +-0.2233715590492064695383f,-0.1434422451344934956730f,1.3153998337128238738103f,\ +-1.0526498309129606045786f,0.0553606627561369843415f,0.7291584643384485531215f,\ +-0.8211933984789114848724f,-1.1593353121271579020402f,1.3152057671476293787549f,\ +-1.172801856026281397405f,1.4071868225661712248353f,-1.237749706635684621148f,\ +1.1803373520872921798031f,1.5151506180989924299496f,0.7531983030718831795269f,\ +-0.9762856051169326310202f,-1.1612557605568909480098f,1.4932305416569968681273f,\ +-0.8614722664300586973951f,0.8618528735715539346174f,1.1016443473924788509777f,\ +0.9393199732131509716027f,1.0919198431908447854966f,-0.9052324038739091305317f,\ +-0.9298866314213817263479f,0.7633780893052066751636f,-0.7143116680469970836143f,\ +-1.2127221047629597183715f,-0.7227638256662162197230f,-1.253501631676815275540f,\ +-1.4738165927959636647415f,0.9413278434132237304510f,-1.1484735264203178584097f,\ +0.3698862224535668929981f,-1.0222624393360630890015f,0.6231994143282580944643f,\ +0.9950036636352803665062f,-0.2983226702432650867536f,0.0176907017367243651895f,\ +1.2324636476429444709169f,0.6361627801840686879942f,1.1459319881374090410731f,\ +-0.7953680408910630550423f,-1.4154164061425698051266f,-0.0876282946873059020998f,\ +-1.5216557556403844664317f,-0.8071142269969606708457f,0.0815747053150205070349f,\ +1.0712377179167194007903f,0.8666202597884599123645f,-0.8619222017137594393787f,\ +-0.9481006227828882026998f,0.1552413858057176687666f,-0.7506128146087278629750f,\ +-0.3836715577045819447477f,-0.5239185633043924594787f,-0.7436026090030812829568f,\ +1.0616275053374448766874f,1.4897517325664235698923f,0.4367517077925673341099f,\ +1.3246660695183969380651f,-0.9109135023203799308433f,0.5553722323129884896886f,\ +1.3365545316217091187383f,-0.9452504202661284882225f,-1.24445301968662169756f,\ +0.6665795438258386163000f,-1.314150441284937187447f,0.0550695906884250130364f,\ +0.0202332991673926272658f,0.9634857364192206397036f,0.2836842504797497110935f,\ +-1.0552170344242444155469f,0.9396260470070250114816f,-0.9303925570132891564867f,\ +0.2783356640126000702828f,1.1824291811858682610392f,0.8685688319389791578473f,\ +1.1519647668153425446036f,0.4220715686665841848146f,-1.1065714015957384130928f,\ +-0.861924596730684333679f,0.9073537157079681891858f,-0.6218839294281949259258f,\ +-1.120015581786375724604f,-0.9733844585621500566930f,0.595029230494463101664f,\ +1.175230190501943328130f,0.9508205283471821145369f,-0.8508278968495206484590f,\ +0.1541098930310453307690f,-0.8824217885955716322854f,0.8902851444120675195038f,\ +-0.6639557596979325237996f,0.1084368331219868891724f,-1.2396941127079998956617f,\ +0.3226031789257856052799f,-0.8843151570857661347702f,0.5707126023897258759732f,\ +0.3012759106579737111709f,-0.8367027089033168829602f,-1.4909615617958020816758f,\ +-0.7009193727197650103378f,-0.5098573775891588333309f,0.6979392344955810401075f,\ +-0.11360619748546052499f,-0.9509385591695135309109f,-1.253860295053432105661f,\ +0.650797750208578995590f,0.1772712514866976729611f,-0.9640945137047890467485f,\ +-0.5689005122453275609118f,-0.1250511412013994849701f,-0.4037636514907702589561f,\ +-0.7926166698304296653887f,-0.2823466357029139617296f,-1.056824688357730357424f,\ +0.9537129762345133432433f,-0.5025361511250948653995f,0.4038372312258701746224f,\ +-1.356748408455357823854f,-0.1106205947085566049237f,-1.3416335800212069173654f,\ +1.1885949854017261451133f,-1.3422443000337007656952f,0.6375731708639520434190f,\ +0.3760968575323995755078f,-0.9884746207385446403748f,0.7854115858087797885645f,\ +0.999043445647114114472f,1.033179400413832382810f,1.1526308570666976560659f,\ +0.6867562899067288784138f,-1.4009010309735028254607f,-0.6940419760103245794269f,\ +0.5354681750957488439724f,0.9063410461496741454823f,0.2034358249367814175379f,\ +1.3295608151948998809644f,1.5281379412739910517161f,-1.0737486644518823286631f,\ +1.0727905584835071284289f,-0.6577524210666327864061f,-1.1372820311372766610702f,\ +-0.1467884541731124814490f,-0.3758609793464613990643f,-0.9135278670013463608868f,\ +-0.5879353157795642603745f,1.3892627420568484097885f} + +#define CRESULTI {-0.3299360864553753103223f,0.5773236414575498853807f,0.4991095547887292593892f,\ +1.0331094146354482532502f,-0.3176151990967214233663f,-0.0427672547155572568833f,\ +-0.5408736725419536206516f,-0.1380553162115908116814f,-0.1495803862615101287314f,\ +0.2075977110248564960759f,0.1483156441793008761820f,0.1814264210630067153396f,\ +-0.2481388687151736549552f,-0.1914494023025192226406f,0.0475995307877313186817f,\ +0.0486725512662827888843f,0.0793454719839349342791f,0.8749639413571212998022f,\ +-0.6896294045728997845757f,-0.5086525074514365307721f,0.2944098793875352670923f,\ +-0.3917506744074427116331f,-0.1846852570799382420308f,-0.3894217746197643492678f,\ +-0.5646100518854718641748f,0.4746040014516990646065f,-0.3015127179783077537856f,\ +-0.0002750414994330601867f,-0.4738712470203229054633f,0.6504861039469930217294f,\ +0.0770111005352082517161f,-0.1450021418767060144006f,-0.2504460533174687753011f,\ +-0.1242925201299330817406f,-0.3767991401181884358884f,-0.4132076872602681860691f,\ +-0.3870747570445600693745f,-0.1287551829606753961421f,-0.5591653729797143590474f,\ +-0.3808547758746415601294f,0.0560087196606005033317f,0.0701856173788610038233f,\ +-0.3788485405347551959743f,0.0044895072328474238538f,-0.4792093730891275327188f,\ +-0.0422815385429984591514f,0.0061101098120875880007f,1.3269258764406561823535f,\ +0.50216582477378490790f,-0.3441118926473294425961f,0.2204807457606408893636f,\ +0.0790893257779779063066f,-0.1890021515648551142519f,0.518665277550073300361f,\ +-0.8006086655024508003109f,1.0073379811293934338323f,0.2137094925844510162616f,\ +0.5375421998418649094376f,-0.2320202834395212743157f,0.3256990051992574852768f,\ +-0.5075425697148114867474f,0.4587488944259289214145f,0.8635283954295314146066f,\ +-0.1297869621390935479521f,-0.852694676585578515f,0.3180243625197139989424f,\ +-0.1362504231180562963566f,0.1356147426873018091431f,-0.5110906304654022624945f,\ +0.0364746671485365880905f,0.3518205609306652159596f,-0.1882338930265980980749f,\ +-0.1641509348055795458610f,-0.1003678389496054923491f,0.3533058939584889368568f,\ +0.1400753442460135889114f,-0.3190262039403771177071f,0.1130098866744752156288f,\ +0.4874882612585151875351f,0.0821093566409674818773f,-0.4196102828902398829136f,\ +-0.451423643355465198379f,-0.2794721520836026540380f,0.0388676985912680683644f,\ +0.5261724556813406339373f,0.3369140501375452179111f,0.5021943268293638240607f,\ +-0.9466008502228719923011f,0.0813161752282447886087f,-0.3647911127697049948893f,\ +0.9402058236775613364600f,0.2373145443406108057172f,0.1741667096823807936445f,\ +0.6110175965051998225874f,-0.3276211596627106037438f,0.1205074840878167241609f,\ +-0.3776545253138779423274f,-0.8929722827626465075923f,0.549792722962075375293f,\ +0.0271042479895461374539f,-0.47522513055127707515f,0.0593823102898174345898f,\ +-0.2798313897020670570903f,0.3034375004902351569136f,0.1544875118519504486603f,\ +-0.3064946913611272250044f,-0.1233973071314871799986f,-0.9748519593919268144688f,\ +-0.2695469774323944189831f,-0.2398595153162375315237f,-0.3849351067537384318840f,\ +-0.4832629774775746844817f,0.2120502817724358168849f,-0.5500280838647416681297f,\ +-0.6567358702149050930785f,-0.0439088406752093027285f,0.3215272662057582220285f,\ +0.252983359599071477852f,0.3285524490410307585364f,-0.7260295113781071174586f,\ +0.5814783672028649430530f,0.2280478984411803411447f,0.1921683660815579341996f,\ +0.2598222279442688464890f,-1.2261944929533434844870f,0.6354501028006451779362f,\ +-0.6350507146232319266588f,0.5241840999802419576170f,0.1326112979841672367964f,\ +0.5331634907909190701503f,-0.1060363792025432461141f,-0.1405159325068739140097f,\ +-1.2650277702054697481771f,0.2669908129991411804838f,0.2495345813255305800205f,\ +-0.3316627619047222141901f,-0.2282918540535401608071f,-0.1217152595768435791035f,\ +-0.4921799931736892674827f,0.4709770755615852455556f,-0.5858164911014823728053f,\ +0.2035859669317575948444f,0.2043112301670926833630f,-0.6450693837623580062512f,\ +-0.0755935103401305513726f,-0.5356174761081086144188f,-0.3471562389208797116957f,\ +0.2328317315621121486036f,0.7651997819792383248583f,-0.3199579280419243554334f,\ +-0.3582454315092570285017f,0.7669246314230472316709f,0.5441811107763497856737f,\ +0.6504831149102675569296f,0.1580962824886572026806f,-0.2872668874651375658935f,\ +0.7084196447067554469612f,-0.2398740644903666341392f,-0.0138893916104706732079f,\ +-0.0382724601233607325534f,-0.0114683647521359316501f,1.042906817386681339599f,\ +0.0689854613036876146426f,0.1910230634709511876590f,-0.3704134917614289590482f,\ +0.1911216797569713354843f,0.2522464542416475996589f,-0.4451672855349098623101f,\ +0.0515134584128001532521f,0.4287903998263715155126f,0.3315338614185490695441f,\ +0.7124742713592439047332f,-0.1805296499983318203597f,0.5024343285394804459187f,\ +-0.0459393453273769861167f,0.3351247751616924785978f,-0.0681623033986126780626f,\ +-0.2332477835758634543417f,0.4789761892657505848447f,0.1091019217623192538724f,\ +0.1355147604481500289708f,-0.1428984493591255733325f,0.3037123307940571281804f,\ +1.5115293287912119346572f,0.4692494475562393740908f,-0.154956179496453544386f,\ +0.4557841446769143045614f,0.0301394028826129541099f,-0.0919789120268482279785f,\ +-0.8385856266070932374390f,0.5121474514176801440257f,-0.5562655937076338430458f,\ +-0.4610543161770726539039f,-0.4105611124291430047428f,-0.5820664911774818817136f,\ +-0.5994113052598605273502f,-0.4878070905668511203501f,0.2712394281598410339384f,\ +-0.5014387951037901913764f,0.5397742494143892288960f} + + + + + + +void satansTest() { + float in[]= SOURCE; + float res[]= RESULT; + float out; + int i=0; + + for (i=0;i<200;i++){ + out=satans(in[i]); + assert( ( (fabs(out-res[i])) / (fabs(out)) ) <1e-7); + } +} + +void catansTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=catans(in); + assert( ( (fabs(creals(out)-resR[i])) / (fabs(creals(out))) ) <1e-6); + assert( ( (fabs(cimags(out)-resI[i])) / (fabs(cimags(out))) ) <1e-6); + } +} + +void satanaTest(void) { + float in[]= SOURCE; + float res[]= RESULT; + float out[200]; + int i=0; + + satana(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <1e-6); + } +} + +void catanaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + catana(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(creals(out[i])-resR[i])) / (fabs(creals(out[i]))) ) <1e-6); + assert( ( (fabs(cimags(out[i])-resI[i])) / (fabs(cimags(out[i]))) ) <1e-6); + } +} + + + +int testAtan() { + printf("\n>>>> Float Arc tangeant Tests\n"); + satansTest(); + catansTest(); + satanaTest(); + catanaTest(); + + return 0; +} + +int main() { + assert(testAtan() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/zatana.c b/2.3-1/src/c/elementaryFunctions/atan/zatana.c new file mode 100644 index 00000000..bfe4fc34 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/zatana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan.h" + +void zatana(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zatans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atan/zatans.c b/2.3-1/src/c/elementaryFunctions/atan/zatans.c new file mode 100644 index 00000000..4b8e9640 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan/zatans.c @@ -0,0 +1,242 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + PURPOSE + watan compute the arctangent of a complex number + y = yr + i yi = atan(x), x = xr + i xi + + CALLING LIST / PARAMETERS + subroutine watan(xr,xi,yr,yi) + double precision xr,xi,yr,yi + + xr,xi: real and imaginary parts of the complex number + yr,yi: real and imaginary parts of the result + yr,yi may have the same memory cases than xr et xi + + COPYRIGHT (C) 2001 Bruno Pincon and Lydia van Dijk + Written by Bruno Pincon so + as to get more precision. Also to fix the + behavior at the singular points and at the branch cuts. + Polished by Lydia van Dijk + + + CHANGES : - (Bruno on 2001 May 22) for ysptrk use a + minimax polynome to enlarge the special + evaluation zone |s| < SLIM. Also rename + this function as lnp1m1. + - (Bruno on 2001 June 7) better handling + of spurious over/underflow ; remove + the call to pythag ; better accuracy + in the real part for z near +-i + + EXTERNALS FUNCTIONS + dlamch + lnp1m1 (at the end of this file) + + ALGORITHM : noting z = a + i*b, we have: + Z = yr + yi*b = arctan(z) = (i/2) * log( (i+z)/(i-z) ) + + This function has two branch points at +i and -i and the + chosen branch cuts are the two half-straight lines + D1 = [i, i*oo) and D2 = (-i*oo, i]. The function is then + analytic in C \ (D1 U D2)). + + From the definition it follows that: + + yr = 0.5 Arg ( (i+z)/(i-z) ) (1) + yi = 0.5 log (|(i+z)/(i-z)|) (2) + + so lim (z -> +- i) yr = undefined (and Nan is logical) + lim (z -> +i) yi = +oo + lim (z -> -i) yi = -oo + + The real part of arctan(z) is discontinuous across D1 and D2 + and we impose the following definitions: + if imag(z) > 1 then + Arg(arctan(z)) = pi/2 (=lim real(z) -> 0+) + if imag(z) < 1 then + Arg(arctan(z)) = -pi/2 (=lim real(z) -> 0-) + + + Basic evaluation: if we write (i+z)/(i-z) using + z = a + i*b, we get: + + i+z 1-(a**2+b**2) + i*(2a) + --- = ---------------------- + i-z a**2 + (1-b)**2 + + then, with r2 = |z|^2 = a**2 + b**2 : + + yr = 0.5 * Arg(1-r2 + (2*a)*i) + = 0.5 * atan2(2a, (1-r2)) (3) + + This formula is changed when r2 > RMAX (max pos float) + and also when |1-r2| and |a| are near 0 (see comments + in the code). + + After some math: + + yi = 0.25 * log( (a**2 + (b + 1)**2) / + (a**2 + (b - 1)**2) ) (4) + + Evaluation for "big" |z| + ------------------------ + + If |z| is "big", the direct evaluation of yi by (4) may + suffer of innaccuracies and of spurious overflow. Noting + that s = 2 b / (1 + |z|**2), we have: + + yi = 0.25 log ( (1 + s)/(1 - s) ) (5) + + 3 5 + yi = 0.25*( 2 * ( s + 1/3 s + 1/5 s + ... )) + + yi = 0.25 * lnp1m1(s) if |s| < SLIM + + So if |s| is less than SLIM we switch to a special + evaluation done by the function lnp1m1. The + threshold value SLIM is choosen by experiment + (with the Pari-gp software). For |s| + "very small" we used a truncated taylor dvp, + else a minimax polynome (see lnp1m1). + + To avoid spurious overflows (which result in spurious + underflows for s) in computing s with s= 2 b / (1 + |z|**2) + when |z|^2 > RMAX (max positive float) we use : + + s = 2d0 / ( (a/b)*a + b ) + + but if |b| = Inf this formula leads to NaN when + |a| is also Inf. As we have : + + |s| <= 2 / |b| + + we impose simply : s = 0 when |b| = Inf + + Evaluation for z very near to i or -i: + -------------------------------------- + Floating point numbers of the form a+i or a-i with 0 < + a**2 < tiny (approximately 1d-308) may lead to underflow + (i.e., a**2 = 0) and the logarithm will break formula (4). + So we switch to the following formulas: + + If b = +-1 and |a| < sqrt(tiny) approximately 1d-150 (say) + then (by using that a**2 + 4 = 4 in machine for such a): + + yi = 0.5 * log( 2/|a| ) for b=1 + + yi = 0.5 * log( |a|/2 ) for b=-1 + + finally: yi = 0.5 * sign(b) * log( 2/|a| ) + yi = 0.5 * sign(b) * (log(2) - log(|a|)) (6) + + The last trick is to avoid overflow for |a|=tiny! In fact + this formula may be used until a**2 + 4 = 4 so that the + threshold value may be larger. +*/ + +#include +#include "lapack.h" +#include "atan.h" +#include "abs.h" +#include "lnp1m1.h" + +#define _sign(a, b) b >=0 ? a : -a + +doubleComplex zatans(doubleComplex z) { + static double sSlim = 0.2; + static double sAlim = 1E-150; + static double sTol = 0.3; + static double sLn2 = 0.6931471805599453094172321; + + double RMax = getOverflowThreshold(); + double Pi_2 = 2.0 * datans(1); + + double _inReal = zreals(z); + double _inImg = zimags(z); + double _outReal = 0; + double _outImg = 0; + + /* Temporary variables */ + double R2 = 0; + double S = 0; + + + if(_inImg == 0) + { + _outReal = datans(_inReal); + _outImg = 0; + } + else + { + R2 = _inReal * _inReal + _inImg * _inImg; /* Oo */ + if(R2 > RMax) + { + if( dabss(_inImg) > RMax) + S = 0; + else + S = 1 / (((0.5 * _inReal) / _inImg) * _inReal + 0.5 * _inImg ); + } + else + S = (2 * _inImg) / (1+R2); + + if(dabss(S) < sSlim) + { + /* + s is small: |s| < SLIM <=> |z| outside the following disks: + D+ = D(center = [0; 1/slim], radius = sqrt(1/slim**2 - 1)) if b > 0 + D- = D(center = [0; -1/slim], radius = sqrt(1/slim**2 - 1)) if b < 0 + use the special evaluation of log((1+s)/(1-s)) (5) + */ + _outImg = dlnp1m1s(S) * 0.25; + } + else + { + if(dabss(S) == 1 && dabss(_inReal) <= sAlim) + { + /* |s| >= SLIM => |z| is inside D+ or D- */ + _outImg = _sign(0.5,_inImg) * ( sLn2 - log(dabss(_inReal))); + } + else + { + _outImg = 0.25 * log((pow(_inReal,2) + pow((_inImg + 1),2)) / (pow(_inReal,2) + pow((_inImg - 1),2))); + } + } + if(_inReal == 0) + {/* z is purely imaginary */ + if( dabss(_inImg) > 1) + {/* got sign(b) * pi/2 */ + _outReal = _sign(1, _inImg) * Pi_2; + } + else if( dabss(_inImg) == 1) + {/* got a Nan with 0/0 */ + _outReal = (_inReal - _inReal) / (_inReal - _inReal); /* Oo */ + } + else + _outReal = 0; + } + else if(R2 > RMax) + {/* _outImg is necessarily very near sign(a)* pi/2 */ + _outReal = _sign(1, _inReal) * Pi_2; + } + else if(dabss(1 - R2) + dabss(_inReal) <= sTol) + {/* |b| is very near 1 (and a is near 0) some cancellation occur in the (next) generic formula */ + _outReal = 0.5 * atan2(2 * _inReal, (1-_inImg) * (1 + _inImg) - pow(_inReal,2)); + } + else + _outReal = 0.5 * atan2(2 * _inReal, 1 - R2); + } + + return DoubleComplex(_outReal, _outImg); +} diff --git a/2.3-1/src/c/elementaryFunctions/atan2/Makefile.am b/2.3-1/src/c/elementaryFunctions/atan2/Makefile.am new file mode 100644 index 00000000..becea0f4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/Makefile.am @@ -0,0 +1,58 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAtan2_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAtan2.la + +libAtan2_la_SOURCES = $(HEAD) $(SRC) + +SRC = satan2s.c \ + datan2s.c \ + satan2a.c \ + datan2a.c + +HEAD = ../includes/atan2.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atan2/libAtan2.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la + +check_PROGRAMS = testAtan2 + +TESTS = testAtan2 + +# +# -*- ArcTangeant2 Tests -*- +# +testAtan2_SOURCES = testAtan2.c +testAtan2_CFLAGS = $(check_INCLUDES) +testAtan2_LDADD = $(check_LDADD) + diff --git a/2.3-1/src/c/elementaryFunctions/atan2/Makefile.in b/2.3-1/src/c/elementaryFunctions/atan2/Makefile.in new file mode 100644 index 00000000..f2ccbdcd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/Makefile.in @@ -0,0 +1,726 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testAtan2$(EXEEXT) +TESTS = testAtan2$(EXEEXT) +subdir = src/c/elementaryFunctions/atan2 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAtan2_la_LIBADD = +am__objects_1 = +am__objects_2 = libAtan2_la-satan2s.lo libAtan2_la-datan2s.lo \ + libAtan2_la-satan2a.lo libAtan2_la-datan2a.lo +am_libAtan2_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAtan2_la_OBJECTS = $(am_libAtan2_la_OBJECTS) +libAtan2_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAtan2_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testAtan2_OBJECTS = testAtan2-testAtan2.$(OBJEXT) +testAtan2_OBJECTS = $(am_testAtan2_OBJECTS) +testAtan2_DEPENDENCIES = $(check_LDADD) +testAtan2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testAtan2_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAtan2_la_SOURCES) $(testAtan2_SOURCES) +DIST_SOURCES = $(libAtan2_la_SOURCES) $(testAtan2_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAtan2_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAtan2.la +libAtan2_la_SOURCES = $(HEAD) $(SRC) +SRC = satan2s.c \ + datan2s.c \ + satan2a.c \ + datan2a.c + +HEAD = ../includes/atan2.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atan2/libAtan2.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la + + +# +# -*- ArcTangeant2 Tests -*- +# +testAtan2_SOURCES = testAtan2.c +testAtan2_CFLAGS = $(check_INCLUDES) +testAtan2_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/atan2/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/atan2/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAtan2.la: $(libAtan2_la_OBJECTS) $(libAtan2_la_DEPENDENCIES) + $(libAtan2_la_LINK) -rpath $(pkglibdir) $(libAtan2_la_OBJECTS) $(libAtan2_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testAtan2$(EXEEXT): $(testAtan2_OBJECTS) $(testAtan2_DEPENDENCIES) + @rm -f testAtan2$(EXEEXT) + $(testAtan2_LINK) $(testAtan2_OBJECTS) $(testAtan2_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan2_la-datan2a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan2_la-datan2s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan2_la-satan2a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtan2_la-satan2s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAtan2-testAtan2.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAtan2_la-satan2s.lo: satan2s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -MT libAtan2_la-satan2s.lo -MD -MP -MF $(DEPDIR)/libAtan2_la-satan2s.Tpo -c -o libAtan2_la-satan2s.lo `test -f 'satan2s.c' || echo '$(srcdir)/'`satan2s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan2_la-satan2s.Tpo $(DEPDIR)/libAtan2_la-satan2s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satan2s.c' object='libAtan2_la-satan2s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -c -o libAtan2_la-satan2s.lo `test -f 'satan2s.c' || echo '$(srcdir)/'`satan2s.c + +libAtan2_la-datan2s.lo: datan2s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -MT libAtan2_la-datan2s.lo -MD -MP -MF $(DEPDIR)/libAtan2_la-datan2s.Tpo -c -o libAtan2_la-datan2s.lo `test -f 'datan2s.c' || echo '$(srcdir)/'`datan2s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan2_la-datan2s.Tpo $(DEPDIR)/libAtan2_la-datan2s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datan2s.c' object='libAtan2_la-datan2s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -c -o libAtan2_la-datan2s.lo `test -f 'datan2s.c' || echo '$(srcdir)/'`datan2s.c + +libAtan2_la-satan2a.lo: satan2a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -MT libAtan2_la-satan2a.lo -MD -MP -MF $(DEPDIR)/libAtan2_la-satan2a.Tpo -c -o libAtan2_la-satan2a.lo `test -f 'satan2a.c' || echo '$(srcdir)/'`satan2a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan2_la-satan2a.Tpo $(DEPDIR)/libAtan2_la-satan2a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satan2a.c' object='libAtan2_la-satan2a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -c -o libAtan2_la-satan2a.lo `test -f 'satan2a.c' || echo '$(srcdir)/'`satan2a.c + +libAtan2_la-datan2a.lo: datan2a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -MT libAtan2_la-datan2a.lo -MD -MP -MF $(DEPDIR)/libAtan2_la-datan2a.Tpo -c -o libAtan2_la-datan2a.lo `test -f 'datan2a.c' || echo '$(srcdir)/'`datan2a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtan2_la-datan2a.Tpo $(DEPDIR)/libAtan2_la-datan2a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datan2a.c' object='libAtan2_la-datan2a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtan2_la_CFLAGS) $(CFLAGS) -c -o libAtan2_la-datan2a.lo `test -f 'datan2a.c' || echo '$(srcdir)/'`datan2a.c + +testAtan2-testAtan2.o: testAtan2.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan2_CFLAGS) $(CFLAGS) -MT testAtan2-testAtan2.o -MD -MP -MF $(DEPDIR)/testAtan2-testAtan2.Tpo -c -o testAtan2-testAtan2.o `test -f 'testAtan2.c' || echo '$(srcdir)/'`testAtan2.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testAtan2-testAtan2.Tpo $(DEPDIR)/testAtan2-testAtan2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAtan2.c' object='testAtan2-testAtan2.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan2_CFLAGS) $(CFLAGS) -c -o testAtan2-testAtan2.o `test -f 'testAtan2.c' || echo '$(srcdir)/'`testAtan2.c + +testAtan2-testAtan2.obj: testAtan2.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan2_CFLAGS) $(CFLAGS) -MT testAtan2-testAtan2.obj -MD -MP -MF $(DEPDIR)/testAtan2-testAtan2.Tpo -c -o testAtan2-testAtan2.obj `if test -f 'testAtan2.c'; then $(CYGPATH_W) 'testAtan2.c'; else $(CYGPATH_W) '$(srcdir)/testAtan2.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testAtan2-testAtan2.Tpo $(DEPDIR)/testAtan2-testAtan2.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAtan2.c' object='testAtan2-testAtan2.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAtan2_CFLAGS) $(CFLAGS) -c -o testAtan2-testAtan2.obj `if test -f 'testAtan2.c'; then $(CYGPATH_W) 'testAtan2.c'; else $(CYGPATH_W) '$(srcdir)/testAtan2.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/atan2/datan2a.c b/2.3-1/src/c/elementaryFunctions/atan2/datan2a.c new file mode 100644 index 00000000..49a06aed --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/datan2a.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan2.h" + + +void datan2a(double *in1, int size1, + double *in2, int size2, + double * out) +{ + int i = 0; + + for(i = 0 ; i < size1 && i < size2 ; ++i) + { + out[i] = datan2s( in1[i] , in2[i]) ; + } +} \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/atan2/datan2s.c b/2.3-1/src/c/elementaryFunctions/atan2/datan2s.c new file mode 100644 index 00000000..f6c8637c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/datan2s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan2.h" + + +double datan2s ( double x , double y ) { + return atan2 ( x, y ) ; +} diff --git a/2.3-1/src/c/elementaryFunctions/atan2/satan2a.c b/2.3-1/src/c/elementaryFunctions/atan2/satan2a.c new file mode 100644 index 00000000..0e563915 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/satan2a.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan2.h" + + +void satan2a(float *in1, int size1, + float *in2, int size2, + float * out) +{ + int i = 0; + + for(i = 0 ; i < size1 && i < size2 ; ++i) + { + out[i] = satan2s( in1[i] , in2[i]) ; + } +} \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/atan2/satan2s.c b/2.3-1/src/c/elementaryFunctions/atan2/satan2s.c new file mode 100644 index 00000000..35015a8c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/satan2s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan2.h" + + +float satan2s ( float x , float y ) { + return atan2f ( x, y ) ; +} \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/atan2/testAtan2.c b/2.3-1/src/c/elementaryFunctions/atan2/testAtan2.c new file mode 100644 index 00000000..bae5fe54 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atan2/testAtan2.c @@ -0,0 +1,429 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atan2.h" +#include +#include +#define SIZE 100 + + +static void satan2sTest ( void ) +{ + + + int i = 0 ; + float Fin1[SIZE] = +{0.0373321f,0.4293466f,0.3157233f,0.3682477f,0.1458774f,0.6768379f,0.5261979f,0.4003626f, +0.0029108f,0.3068181f,0.7902694f,0.9577950f,0.6689271f,0.2929616f,0.8223899f,0.0179846f, +0.8710701f,0.3181024f,0.5724473f,0.5738658f,0.3492018f,0.7067298f,0.3599201f,0.4052311f, +0.6140811f,0.6524047f,0.0295171f,0.5668896f,0.7114017f,0.4588491f,0.4720517f,0.0623731f, +0.0854401f,0.0134564f,0.3543002f,0.6719395f,0.1360619f,0.2119744f,0.4015942f,0.4036219f, +0.5628382f,0.5531093f,0.0768984f,0.5360758f,0.0900212f,0.6218026f,0.0001215f,0.7219727f, +0.6661293f,0.6799288f,0.9514125f,0.1206901f,0.7318910f,0.0831662f,0.8021909f,0.0290492f, +0.6502991f,0.7427882f,0.2176611f,0.9788486f,0.8925237f,0.3511275f,0.4745619f,0.7699462f, +0.0734342f,0.5894619f,0.2378993f,0.4076361f,0.4304818f,0.0370717f,0.6404148f,0.4130743f, +0.8396902f,0.0002195f,0.5085374f,0.4754997f,0.9625065f,0.9798011f,0.0785698f,0.9150032f, +0.6172610f,0.9964195f,0.0468599f,0.9245926f,0.9689865f,0.4916290f,0.2977053f,0.0603055f, +0.6313472f,0.0241030f,0.1527438f,0.9481178f,0.2744266f,0.4794727f,0.4855768f,0.6764004f, +0.8321250f,0.0125876f,0.5453780f,0.8426717f}; + float Fin2[] = +{0.9029165f,0.4409482f,0.8332359f,0.7233976f,0.4377150f,0.3080607f,0.8749813f,0.5355882f, +0.3085999f,0.3354632f,0.2342486f,0.2589412f,0.8521509f,0.4821739f,0.6095218f,0.9872823f, +0.9811427f,0.3303114f,0.3589146f,0.2780528f,0.9583482f,0.0156363f,0.2964352f,0.4685935f, +0.4262021f,0.4217656f,0.1034854f,0.4279759f,0.7860729f,0.8568082f,0.1993437f,0.7131302f, +0.5208952f,0.9311723f,0.4143836f,0.5980196f,0.5549106f,0.8552953f,0.3097751f,0.9446128f, +0.2442680f,0.8760447f,0.4874215f,0.3844019f,0.0922345f,0.0705419f,0.7338807f,0.7792181f, +0.7827638f,0.2161568f,0.3420198f,0.4300938f,0.6261753f,0.9554251f,0.4541551f,0.0029223f, +0.0106921f,0.9746371f,0.7704261f,0.6396631f,0.9535886f,0.4148483f,0.4661540f,0.2238455f, +0.3456973f,0.2340624f,0.6619341f,0.2691180f,0.9830249f,0.7393351f,0.2902136f,0.3995950f, +0.9792278f,0.0075514f,0.7021023f,0.8907506f,0.6526974f,0.4136229f,0.8581691f,0.2396090f, +0.4820042f,0.9848586f,0.4469722f,0.2329814f,0.2234514f,0.8002565f,0.7750734f,0.4825007f, +0.7844883f,0.1534679f,0.7722877f,0.8952022f,0.9467326f,0.6981826f,0.9559161f,0.0484017f, +0.5323521f,0.2946867f,0.6977137f,0.9376204f}; + + float Fout[SIZE] ; + + float Result[] = +{0.0413226f,0.7720683f,0.3621962f,0.4708637f,0.3216938f,1.1436704f,0.5414350f,0.6419116f, +0.0094320f,0.7408287f,1.2826307f,1.3067571f,0.6655192f,0.5459780f,0.9329774f,0.0182142f, +0.7260404f,0.7665715f,1.0107725f,1.1196046f,0.3494266f,1.5486751f,0.8818216f,0.7130133f, +0.9640758f,0.9969006f,0.2778515f,0.9241318f,0.7355747f,0.4916683f,1.1712215f,0.0872419f, +0.1625778f,0.0144500f,0.7073927f,0.8435390f,0.2404522f,0.2429425f,0.9137623f,0.4038071f, +1.1613329f,0.5631677f,0.1564760f,0.9487081f,0.7732547f,1.4578319f,0.0001656f,0.7472834f, +0.7050723f,1.2629896f,1.2256956f,0.2735775f,0.8630843f,0.0868274f,1.0556435f,1.4705351f,1.554356f, +0.6512114f,0.2753444f,0.9919749f,0.7523326f,0.7024002f,0.7943357f,1.2878668f,0.2093122f, +1.1928114f,0.3450245f,0.9872899f,0.4127591f,0.0501000f,1.1453135f,0.8019831f,0.7088335f, +0.0290531f,0.6268536f,0.4903355f,0.9749046f,1.1713423f,0.0913007f,1.3146805f,0.9078258f, +0.7912332f,0.1044568f,1.3239524f,1.3441551f,0.5508964f,0.3667243f,0.1243404f,0.6776540f, +0.1557832f,0.1952610f,0.8140970f,0.2821348f,0.6017738f,0.4700034f,1.4993603f,1.0016604f, +0.0426892f,0.6634603f,0.7321154f} ; + + + + + + + + + for ( i = 0 ; i < SIZE ; ++i) + { + Fout[i] = satan2s( Fin1[i], Fin2[i] ); + printf ( "%e - %e\n" , Fout[i] , Result[i] ); + assert ( fabs ( Fout[i] - Result[i] ) / fabs( Fout[i]) < 3e-4 ); + } + +} + +static void datan2sTest ( void ) +{ + + + int i = 0 ; + double Fin1[SIZE] = +{0.70964269945397973061,0.6610225578770041465759,0.7252350724302232265472, +0.510143497958779335022,0.2824866441078484058380,0.2214915128424763679504, +0.5767575385980308055878,0.7048253491520881652832,0.5607945644296705722809, +0.3628880484029650688171,0.3088326244615018367767,0.9813414867967367172241, +0.7428482254035770893097,0.1616391474381089210510,0.3652521963231265544891, +0.3835070468485355377197,0.1169181005097925662994,0.8911246126517653465271, +0.0634272000752389431000,0.6263941843062639236450,0.6807702076621353626251, +0.2588596837595105171204,0.4394804346375167369843,0.8598818778991699218750, +0.5482823201455175876617,0.8135995296761393547058,0.4898237003944814205170, +0.0240026097744703292847,0.7369195525534451007843,0.2411156157031655311584, +0.1529693226329982280731,0.2648359201848506927490,0.4298193217255175113678, +0.7673939457163214683533,0.8753260499797761440277,0.3796988371759653091431, +0.3062356826849281787872,0.3880051793530583381653,0.1047293278388679027557, +0.7603831812739372253418,0.0340930395759642124176,0.1423966242000460624695, +0.5554559468291699886322,0.8031897451728582382202,0.5183992316015064716339, +0.1518561029806733131409,0.5884730662219226360321,0.2545093484222888946533, +0.9992679939605295658112,0.6398976957425475120544,0.5506716123782098293304, +0.4607007671147584915161,0.5933007937856018543243,0.6538193570449948310852, +0.4168340521864593029022,0.9910155385732650756836,0.3720780410803854465485, +0.7061824081465601921082,0.5780865414999425411224,0.602319641038775444031, +0.5715096746571362018585,0.0549629041925072669983,0.1205854485742747784, +0.0143620483577251434326,0.0257951230742037296295,0.8411248764023184776306, +0.4381882525049149990082,0.4643401596695184707642,0.4197426405735313892365, +0.8023654492571949958801,0.5228588166646659374237,0.5095121040940284729004, +0.4531980180181562900543,0.7817818326875567436218,0.776557037141174077988, +0.0466059204190969467163,0.5113326688297092914581,0.7502101892605423927307, +0.6883628661744296550751,0.0167756117880344390869,0.9345410899259150028229, +0.5609863763675093650818,0.2205847105942666530609,0.7648540753871202468872, +0.4816976976580917835236,0.1558785634115338325500,0.2476022052578628063202, +0.5216529071331024169922,0.0805230387486517429352,0.4409417239949107170105, +0.8911933614872395992279,0.9780590813606977462769,0.4588093762286007404327, +0.5510440031066536903381,0.0960960905067622661591,0.4196785055100917816162, +0.7502556503750383853912,0.7218149593099951744080,0.2895541018806397914886, +0.3907764498144388198853} +; + double Fin2[SIZE] = +{0.6686618146486580371857,0.4877656819298863410950,0.4685971769504249095917, +0.3562648519873619079590,0.3442325466312468051910,0.4253307832404971122742, +0.5588058172725141048431,0.3304864969104528427124,0.4157403339631855487823, +0.1595822656527161598206,0.3883102680556476116180,0.9415460713207721710205, +0.4722979352809488773346,0.8533652639016509056091,0.1207739165984094142914, +0.8999380934983491897583,0.4384902161546051502228,0.8976056622341275215149, +0.4911110657267272472382,0.3402217179536819458008,0.9966153600253164768219, +0.0215395865961909294128,0.6876890822313725948334,0.0044924151152372360229, +0.6397854541428387165070,0.5416147718206048011780,0.2247649203054606914520, +0.7364005260169506072998,0.4496364505030214786530,0.9678138038143515586853, +0.6489060199819505214691,0.2544666919857263565063,0.1923975017853081226349, +0.6861492367461323738098,0.4231455805711448192596,0.6734441593289375305176, +0.8270696722902357578278,0.9360805852338671684265,0.8326222090981900691986, +0.7424779590219259262085,0.0194640238769352436066,0.8016031915321946144104, +0.2554539437405765056610,0.2688109613955020904541,0.7558490769006311893463, +0.4347589677199721336365,0.6425966522656381130219,0.6957868058234453201294, +0.6499576461501419544220,0.2303190128877758979797,0.5504368054680526256561, +0.3038997054100036621094,0.0371030517853796482086,0.1703881053254008293152, +0.5698686256073415279388,0.0036411266773939132690,0.4491547052748501300812, +0.0576810697093605995178,0.4956056098453700542450,0.1888933442533016204834, +0.5641230703331530094147,0.8562210192903876304626,0.0794764286838471889496, +0.6196198705583810806274,0.2241039988584816455841,0.8582094730809330940247, +0.7114551994018256664276,0.8026027604937553405762,0.6153324418701231479645, +0.8958183480426669120789,0.8721761344932019710541,0.8389767911285161972046, +0.2040955354459583759308,0.3166538262739777565002,0.7006825651042163372040, +0.2073105163872241973877,0.5222550616599619388580,0.9416420971974730491638, +0.52116033947095274925,0.4509841967374086380005,0.3961292845197021961212, +0.7240869747474789619446,0.6724055963568389415741,0.2386146038770675659180, +0.7124841609038412570953,0.3286493895575404167175,0.4837769134901463985443, +0.7662767004221677780151,0.3153839264996349811554,0.3489987561479210853577, +0.7413818310014903545380,0.9702721945941448211670,0.1276510567404329776764, +0.3828862151131033897400,0.4882477498613297939301,0.5191949699074029922485, +0.0906856027431786060333,0.6833897503092885017395,0.5022272053174674510956, +0.0540433898568153381348} + + ; + double Fout[SIZE] ; + +double Result[] = +{0.8151222298353714146302,0.9350871051642664077974,0.997145470042032466829, +0.9611705131081605957277,0.6871926567255678408586,0.48011041457317088499, +0.8012054946208865269242,1.132343901220193460588,0.9328596693816280094325, +1.1564937347686861102147,0.6718834468335361798097,0.8060908633813578250127, +1.00447314922565955619,0.1871960989477313985763,1.25145462350922120898, +0.4028428263783953022781,0.2605755136377292391359,0.781774911019853857574, +0.1284394521185465987134,1.073232720478735968683,0.5992812665317298614909, +1.4877780687994013320008,0.5686520903625903455847,1.5655719182360376962038, +0.7085314645036139280521,0.9834619198256084882104,1.140591448484360226345, +0.0325829683756781798842,1.0229420689159220980713,0.2441637219657823987262, +0.2315075947889858876128,0.805363112922971136065,1.1499199282073593320064, +0.8412343166232832958329,1.1205046812517129861675,0.5133888656295326757828, +0.3546137657219728400726,0.3929433432393027447738,0.1251254110872664360166, +0.7973116893083483924798,1.0520419606393343059381,0.1758058639068769690716, +1.1397404905667376517897,1.2478349146446092721163,0.6011661864384908460224, +0.336040406143340686373,0.7414617770855178591205,0.35066862507579671382, +0.994116233357116407809,1.225301837543258720586,0.7856114093437986944934, +0.9876695123648748797507,1.5083409965621017434501,1.3158623593693956621564, +0.6315271916809107599633,1.5671222065095873343665,0.6918174612768925868522, +1.4892971216950183777072,0.8620674912261098166155,1.2669007116100525767166, +0.7919024670030506696250,0.0641044712091229373918,0.9880588227443989346455, +0.0231746556747607738991,0.1145990356665423787197,0.7753448027391854902035, +0.5520317684396915947076,0.5244928157781221234046,0.5986382937223412303851, +0.730422528982288210564,0.5400426833033002971263,0.5457711699419741657735, +1.1476553996273199942380,1.1859516842120860768972,0.8367154013891151542737, +0.2211356254003243038131,0.7748311007637324054897,0.6727280587907351616650, +0.9227659311220508531193,0.0371806395770535452749,1.16987833340959523909, +0.6591538541213141089159,0.3169908006212094342402,1.2683907108855461132180, +0.5944925989956957312899,0.4428774366489620084586,0.4730514714397818787361, +0.5976982909559278578371,0.2499770826480406105130,0.9012690725036259786762, +0.8769058262572594353301,0.7893948375778501169719,1.2994367291712400902526, +0.9635433198261218468161,0.1943343662922066283905,0.6797968572652465235606, +1.4505069462951736269929,0.8127362698086932901731,0.5229909037180106023968, +1.4333705873570850020116}; + + + + for ( i = 0 ; i < SIZE ; ++i) + { + Fout[i] = datan2s( Fin1[i], Fin2[i] ); + printf ( "%e - %e\n" , Fout[i] , Result[i] ); + assert ( fabs ( Fout[i] - Result[i] ) / fabs( Fout[i]) < 1e-16 ); + } + +} + + +static void satan2aTest ( void ) +{ + + + int i = 0 ; + float Fin1[SIZE] = +{0.0373321f,0.4293466f,0.3157233f,0.3682477f,0.1458774f,0.6768379f,0.5261979f,0.4003626f, +0.0029108f,0.3068181f,0.7902694f,0.9577950f,0.6689271f,0.2929616f,0.8223899f,0.0179846f, +0.8710701f,0.3181024f,0.5724473f,0.5738658f,0.3492018f,0.7067298f,0.3599201f,0.4052311f, +0.6140811f,0.6524047f,0.0295171f,0.5668896f,0.7114017f,0.4588491f,0.4720517f,0.0623731f, +0.0854401f,0.0134564f,0.3543002f,0.6719395f,0.1360619f,0.2119744f,0.4015942f,0.4036219f, +0.5628382f,0.5531093f,0.0768984f,0.5360758f,0.0900212f,0.6218026f,0.0001215f,0.7219727f, +0.6661293f,0.6799288f,0.9514125f,0.1206901f,0.7318910f,0.0831662f,0.8021909f,0.0290492f, +0.6502991f,0.7427882f,0.2176611f,0.9788486f,0.8925237f,0.3511275f,0.4745619f,0.7699462f, +0.0734342f,0.5894619f,0.2378993f,0.4076361f,0.4304818f,0.0370717f,0.6404148f,0.4130743f, +0.8396902f,0.0002195f,0.5085374f,0.4754997f,0.9625065f,0.9798011f,0.0785698f,0.9150032f, +0.6172610f,0.9964195f,0.0468599f,0.9245926f,0.9689865f,0.4916290f,0.2977053f,0.0603055f, +0.6313472f,0.0241030f,0.1527438f,0.9481178f,0.2744266f,0.4794727f,0.4855768f,0.6764004f, +0.8321250f,0.0125876f,0.5453780f,0.8426717f}; + float Fin2[] = +{0.9029165f,0.4409482f,0.8332359f,0.7233976f,0.4377150f,0.3080607f,0.8749813f,0.5355882f, +0.3085999f,0.3354632f,0.2342486f,0.2589412f,0.8521509f,0.4821739f,0.6095218f,0.9872823f, +0.9811427f,0.3303114f,0.3589146f,0.2780528f,0.9583482f,0.0156363f,0.2964352f,0.4685935f, +0.4262021f,0.4217656f,0.1034854f,0.4279759f,0.7860729f,0.8568082f,0.1993437f,0.7131302f, +0.5208952f,0.9311723f,0.4143836f,0.5980196f,0.5549106f,0.8552953f,0.3097751f,0.9446128f, +0.2442680f,0.8760447f,0.4874215f,0.3844019f,0.0922345f,0.0705419f,0.7338807f,0.7792181f, +0.7827638f,0.2161568f,0.3420198f,0.4300938f,0.6261753f,0.9554251f,0.4541551f,0.0029223f, +0.0106921f,0.9746371f,0.7704261f,0.6396631f,0.9535886f,0.4148483f,0.4661540f,0.2238455f, +0.3456973f,0.2340624f,0.6619341f,0.2691180f,0.9830249f,0.7393351f,0.2902136f,0.3995950f, +0.9792278f,0.0075514f,0.7021023f,0.8907506f,0.6526974f,0.4136229f,0.8581691f,0.2396090f, +0.4820042f,0.9848586f,0.4469722f,0.2329814f,0.2234514f,0.8002565f,0.7750734f,0.4825007f, +0.7844883f,0.1534679f,0.7722877f,0.8952022f,0.9467326f,0.6981826f,0.9559161f,0.0484017f, +0.5323521f,0.2946867f,0.6977137f,0.9376204f}; + + float Fout[SIZE] ; + + float Result[] = +{0.0413226f,0.7720683f,0.3621962f,0.4708637f,0.3216938f,1.1436704f,0.5414350f,0.6419116f, +0.0094320f,0.7408287f,1.2826307f,1.3067571f,0.6655192f,0.5459780f,0.9329774f,0.0182142f, +0.7260404f,0.7665715f,1.0107725f,1.1196046f,0.3494266f,1.5486751f,0.8818216f,0.7130133f, +0.9640758f,0.9969006f,0.2778515f,0.9241318f,0.7355747f,0.4916683f,1.1712215f,0.0872419f, +0.1625778f,0.0144500f,0.7073927f,0.8435390f,0.2404522f,0.2429425f,0.9137623f,0.4038071f, +1.1613329f,0.5631677f,0.1564760f,0.9487081f,0.7732547f,1.4578319f,0.0001656f,0.7472834f, +0.7050723f,1.2629896f,1.2256956f,0.2735775f,0.8630843f,0.0868274f,1.0556435f,1.4705351f,1.554356f, +0.6512114f,0.2753444f,0.9919749f,0.7523326f,0.7024002f,0.7943357f,1.2878668f,0.2093122f, +1.1928114f,0.3450245f,0.9872899f,0.4127591f,0.0501000f,1.1453135f,0.8019831f,0.7088335f, +0.0290531f,0.6268536f,0.4903355f,0.9749046f,1.1713423f,0.0913007f,1.3146805f,0.9078258f, +0.7912332f,0.1044568f,1.3239524f,1.3441551f,0.5508964f,0.3667243f,0.1243404f,0.6776540f, +0.1557832f,0.1952610f,0.8140970f,0.2821348f,0.6017738f,0.4700034f,1.4993603f,1.0016604f, +0.0426892f,0.6634603f,0.7321154f} ; + + + + + + + satan2a( Fin1, SIZE , Fin2 , SIZE , Fout ); + + for ( i = 0 ; i < SIZE ; ++i) + { + printf ( "%e - %e\n" , Fout[i] , Result[i] ); + assert ( fabs ( Fout[i] - Result[i] ) / fabs( Fout[i]) < 3e-4 ); + } + +} + +static void datan2aTest ( void ) +{ + + + int i = 0 ; + double Fin1[SIZE] = +{0.70964269945397973061,0.6610225578770041465759,0.7252350724302232265472, +0.510143497958779335022,0.2824866441078484058380,0.2214915128424763679504, +0.5767575385980308055878,0.7048253491520881652832,0.5607945644296705722809, +0.3628880484029650688171,0.3088326244615018367767,0.9813414867967367172241, +0.7428482254035770893097,0.1616391474381089210510,0.3652521963231265544891, +0.3835070468485355377197,0.1169181005097925662994,0.8911246126517653465271, +0.0634272000752389431000,0.6263941843062639236450,0.6807702076621353626251, +0.2588596837595105171204,0.4394804346375167369843,0.8598818778991699218750, +0.5482823201455175876617,0.8135995296761393547058,0.4898237003944814205170, +0.0240026097744703292847,0.7369195525534451007843,0.2411156157031655311584, +0.1529693226329982280731,0.2648359201848506927490,0.4298193217255175113678, +0.7673939457163214683533,0.8753260499797761440277,0.3796988371759653091431, +0.3062356826849281787872,0.3880051793530583381653,0.1047293278388679027557, +0.7603831812739372253418,0.0340930395759642124176,0.1423966242000460624695, +0.5554559468291699886322,0.8031897451728582382202,0.5183992316015064716339, +0.1518561029806733131409,0.5884730662219226360321,0.2545093484222888946533, +0.9992679939605295658112,0.6398976957425475120544,0.5506716123782098293304, +0.4607007671147584915161,0.5933007937856018543243,0.6538193570449948310852, +0.4168340521864593029022,0.9910155385732650756836,0.3720780410803854465485, +0.7061824081465601921082,0.5780865414999425411224,0.602319641038775444031, +0.5715096746571362018585,0.0549629041925072669983,0.1205854485742747784, +0.0143620483577251434326,0.0257951230742037296295,0.8411248764023184776306, +0.4381882525049149990082,0.4643401596695184707642,0.4197426405735313892365, +0.8023654492571949958801,0.5228588166646659374237,0.5095121040940284729004, +0.4531980180181562900543,0.7817818326875567436218,0.776557037141174077988, +0.0466059204190969467163,0.5113326688297092914581,0.7502101892605423927307, +0.6883628661744296550751,0.0167756117880344390869,0.9345410899259150028229, +0.5609863763675093650818,0.2205847105942666530609,0.7648540753871202468872, +0.4816976976580917835236,0.1558785634115338325500,0.2476022052578628063202, +0.5216529071331024169922,0.0805230387486517429352,0.4409417239949107170105, +0.8911933614872395992279,0.9780590813606977462769,0.4588093762286007404327, +0.5510440031066536903381,0.0960960905067622661591,0.4196785055100917816162, +0.7502556503750383853912,0.7218149593099951744080,0.2895541018806397914886, +0.3907764498144388198853} +; + double Fin2[SIZE] = +{0.6686618146486580371857,0.4877656819298863410950,0.4685971769504249095917, +0.3562648519873619079590,0.3442325466312468051910,0.4253307832404971122742, +0.5588058172725141048431,0.3304864969104528427124,0.4157403339631855487823, +0.1595822656527161598206,0.3883102680556476116180,0.9415460713207721710205, +0.4722979352809488773346,0.8533652639016509056091,0.1207739165984094142914, +0.8999380934983491897583,0.4384902161546051502228,0.8976056622341275215149, +0.4911110657267272472382,0.3402217179536819458008,0.9966153600253164768219, +0.0215395865961909294128,0.6876890822313725948334,0.0044924151152372360229, +0.6397854541428387165070,0.5416147718206048011780,0.2247649203054606914520, +0.7364005260169506072998,0.4496364505030214786530,0.9678138038143515586853, +0.6489060199819505214691,0.2544666919857263565063,0.1923975017853081226349, +0.6861492367461323738098,0.4231455805711448192596,0.6734441593289375305176, +0.8270696722902357578278,0.9360805852338671684265,0.8326222090981900691986, +0.7424779590219259262085,0.0194640238769352436066,0.8016031915321946144104, +0.2554539437405765056610,0.2688109613955020904541,0.7558490769006311893463, +0.4347589677199721336365,0.6425966522656381130219,0.6957868058234453201294, +0.6499576461501419544220,0.2303190128877758979797,0.5504368054680526256561, +0.3038997054100036621094,0.0371030517853796482086,0.1703881053254008293152, +0.5698686256073415279388,0.0036411266773939132690,0.4491547052748501300812, +0.0576810697093605995178,0.4956056098453700542450,0.1888933442533016204834, +0.5641230703331530094147,0.8562210192903876304626,0.0794764286838471889496, +0.6196198705583810806274,0.2241039988584816455841,0.8582094730809330940247, +0.7114551994018256664276,0.8026027604937553405762,0.6153324418701231479645, +0.8958183480426669120789,0.8721761344932019710541,0.8389767911285161972046, +0.2040955354459583759308,0.3166538262739777565002,0.7006825651042163372040, +0.2073105163872241973877,0.5222550616599619388580,0.9416420971974730491638, +0.52116033947095274925,0.4509841967374086380005,0.3961292845197021961212, +0.7240869747474789619446,0.6724055963568389415741,0.2386146038770675659180, +0.7124841609038412570953,0.3286493895575404167175,0.4837769134901463985443, +0.7662767004221677780151,0.3153839264996349811554,0.3489987561479210853577, +0.7413818310014903545380,0.9702721945941448211670,0.1276510567404329776764, +0.3828862151131033897400,0.4882477498613297939301,0.5191949699074029922485, +0.0906856027431786060333,0.6833897503092885017395,0.5022272053174674510956, +0.0540433898568153381348} + + ; + double Fout[SIZE] ; + +double Result[] = +{0.8151222298353714146302,0.9350871051642664077974,0.997145470042032466829, +0.9611705131081605957277,0.6871926567255678408586,0.48011041457317088499, +0.8012054946208865269242,1.132343901220193460588,0.9328596693816280094325, +1.1564937347686861102147,0.6718834468335361798097,0.8060908633813578250127, +1.00447314922565955619,0.1871960989477313985763,1.25145462350922120898, +0.4028428263783953022781,0.2605755136377292391359,0.781774911019853857574, +0.1284394521185465987134,1.073232720478735968683,0.5992812665317298614909, +1.4877780687994013320008,0.5686520903625903455847,1.5655719182360376962038, +0.7085314645036139280521,0.9834619198256084882104,1.140591448484360226345, +0.0325829683756781798842,1.0229420689159220980713,0.2441637219657823987262, +0.2315075947889858876128,0.805363112922971136065,1.1499199282073593320064, +0.8412343166232832958329,1.1205046812517129861675,0.5133888656295326757828, +0.3546137657219728400726,0.3929433432393027447738,0.1251254110872664360166, +0.7973116893083483924798,1.0520419606393343059381,0.1758058639068769690716, +1.1397404905667376517897,1.2478349146446092721163,0.6011661864384908460224, +0.336040406143340686373,0.7414617770855178591205,0.35066862507579671382, +0.994116233357116407809,1.225301837543258720586,0.7856114093437986944934, +0.9876695123648748797507,1.5083409965621017434501,1.3158623593693956621564, +0.6315271916809107599633,1.5671222065095873343665,0.6918174612768925868522, +1.4892971216950183777072,0.8620674912261098166155,1.2669007116100525767166, +0.7919024670030506696250,0.0641044712091229373918,0.9880588227443989346455, +0.0231746556747607738991,0.1145990356665423787197,0.7753448027391854902035, +0.5520317684396915947076,0.5244928157781221234046,0.5986382937223412303851, +0.730422528982288210564,0.5400426833033002971263,0.5457711699419741657735, +1.1476553996273199942380,1.1859516842120860768972,0.8367154013891151542737, +0.2211356254003243038131,0.7748311007637324054897,0.6727280587907351616650, +0.9227659311220508531193,0.0371806395770535452749,1.16987833340959523909, +0.6591538541213141089159,0.3169908006212094342402,1.2683907108855461132180, +0.5944925989956957312899,0.4428774366489620084586,0.4730514714397818787361, +0.5976982909559278578371,0.2499770826480406105130,0.9012690725036259786762, +0.8769058262572594353301,0.7893948375778501169719,1.2994367291712400902526, +0.9635433198261218468161,0.1943343662922066283905,0.6797968572652465235606, +1.4505069462951736269929,0.8127362698086932901731,0.5229909037180106023968, +1.4333705873570850020116}; + + + + datan2a( Fin1, SIZE , Fin2 , SIZE , Fout ); + + for ( i = 0 ; i < SIZE ; ++i) + { + printf ( "%e - %e\n" , Fout[i] , Result[i] ); + assert ( fabs ( Fout[i] - Result[i] ) / fabs( Fout[i]) < 1e-17 ); + } + +} + + + + +static int testAtan2 (void) { + + printf("\n>>>> Float a Tests\n"); + satan2aTest(); +printf("\t>>>> Double a Tests\n"); + datan2aTest(); +printf("\t>>>> Double s Tests\n"); + datan2sTest(); +printf("\t>>>> Float s Tests\n"); + satan2sTest(); + + return 0; +} + + +int main(void) { + assert(testAtan2() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/Makefile.am b/2.3-1/src/c/elementaryFunctions/atanh/Makefile.am new file mode 100644 index 00000000..df8ec211 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/Makefile.am @@ -0,0 +1,68 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAtanh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAtanh.la + +libAtanh_la_SOURCES = $(HEAD) $(SRC) + +SRC = satanhs.c \ + datanhs.c \ + catanhs.c \ + zatanhs.c \ + satanha.c \ + datanha.c \ + catanha.c \ + zatanha.c + +HEAD = ../includes/atanh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atanh/libAtanh.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatAtanh testDoubleAtanh + +TESTS = testFloatAtanh testDoubleAtanh + +# +# -*- Hyperbolic ArcTangeant Tests -*- +# +testFloatAtanh_SOURCES = testAtanh.h testFloatAtanh.c +testFloatAtanh_CFLAGS = $(check_INCLUDES) +testFloatAtanh_LDADD = $(check_LDADD) + +testDoubleAtanh_SOURCES = testAtanh.h testDoubleAtanh.c +testDoubleAtanh_CFLAGS = $(check_INCLUDES) +testDoubleAtanh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/atanh/Makefile.in b/2.3-1/src/c/elementaryFunctions/atanh/Makefile.in new file mode 100644 index 00000000..d1541b3e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/Makefile.in @@ -0,0 +1,809 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatAtanh$(EXEEXT) testDoubleAtanh$(EXEEXT) +TESTS = testFloatAtanh$(EXEEXT) testDoubleAtanh$(EXEEXT) +subdir = src/c/elementaryFunctions/atanh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAtanh_la_LIBADD = +am__objects_1 = +am__objects_2 = libAtanh_la-satanhs.lo libAtanh_la-datanhs.lo \ + libAtanh_la-catanhs.lo libAtanh_la-zatanhs.lo \ + libAtanh_la-satanha.lo libAtanh_la-datanha.lo \ + libAtanh_la-catanha.lo libAtanh_la-zatanha.lo +am_libAtanh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libAtanh_la_OBJECTS = $(am_libAtanh_la_OBJECTS) +libAtanh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAtanh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleAtanh_OBJECTS = \ + testDoubleAtanh-testDoubleAtanh.$(OBJEXT) +testDoubleAtanh_OBJECTS = $(am_testDoubleAtanh_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atanh/libAtanh.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la +testDoubleAtanh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleAtanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleAtanh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatAtanh_OBJECTS = testFloatAtanh-testFloatAtanh.$(OBJEXT) +testFloatAtanh_OBJECTS = $(am_testFloatAtanh_OBJECTS) +testFloatAtanh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatAtanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatAtanh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAtanh_la_SOURCES) $(testDoubleAtanh_SOURCES) \ + $(testFloatAtanh_SOURCES) +DIST_SOURCES = $(libAtanh_la_SOURCES) $(testDoubleAtanh_SOURCES) \ + $(testFloatAtanh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAtanh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAtanh.la +libAtanh_la_SOURCES = $(HEAD) $(SRC) +SRC = satanhs.c \ + datanhs.c \ + catanhs.c \ + zatanhs.c \ + satanha.c \ + datanha.c \ + catanha.c \ + zatanha.c + +HEAD = ../includes/atanh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/atan/libAtan.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/atanh/libAtanh.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/isnan/libIsnan.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic ArcTangeant Tests -*- +# +testFloatAtanh_SOURCES = testAtanh.h testFloatAtanh.c +testFloatAtanh_CFLAGS = $(check_INCLUDES) +testFloatAtanh_LDADD = $(check_LDADD) +testDoubleAtanh_SOURCES = testAtanh.h testDoubleAtanh.c +testDoubleAtanh_CFLAGS = $(check_INCLUDES) +testDoubleAtanh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/atanh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/atanh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAtanh.la: $(libAtanh_la_OBJECTS) $(libAtanh_la_DEPENDENCIES) + $(libAtanh_la_LINK) -rpath $(pkglibdir) $(libAtanh_la_OBJECTS) $(libAtanh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleAtanh$(EXEEXT): $(testDoubleAtanh_OBJECTS) $(testDoubleAtanh_DEPENDENCIES) + @rm -f testDoubleAtanh$(EXEEXT) + $(testDoubleAtanh_LINK) $(testDoubleAtanh_OBJECTS) $(testDoubleAtanh_LDADD) $(LIBS) +testFloatAtanh$(EXEEXT): $(testFloatAtanh_OBJECTS) $(testFloatAtanh_DEPENDENCIES) + @rm -f testFloatAtanh$(EXEEXT) + $(testFloatAtanh_LINK) $(testFloatAtanh_OBJECTS) $(testFloatAtanh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-catanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-catanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-datanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-datanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-satanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-satanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-zatanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAtanh_la-zatanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatAtanh-testFloatAtanh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAtanh_la-satanhs.lo: satanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-satanhs.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-satanhs.Tpo -c -o libAtanh_la-satanhs.lo `test -f 'satanhs.c' || echo '$(srcdir)/'`satanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-satanhs.Tpo $(DEPDIR)/libAtanh_la-satanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satanhs.c' object='libAtanh_la-satanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-satanhs.lo `test -f 'satanhs.c' || echo '$(srcdir)/'`satanhs.c + +libAtanh_la-datanhs.lo: datanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-datanhs.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-datanhs.Tpo -c -o libAtanh_la-datanhs.lo `test -f 'datanhs.c' || echo '$(srcdir)/'`datanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-datanhs.Tpo $(DEPDIR)/libAtanh_la-datanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datanhs.c' object='libAtanh_la-datanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-datanhs.lo `test -f 'datanhs.c' || echo '$(srcdir)/'`datanhs.c + +libAtanh_la-catanhs.lo: catanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-catanhs.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-catanhs.Tpo -c -o libAtanh_la-catanhs.lo `test -f 'catanhs.c' || echo '$(srcdir)/'`catanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-catanhs.Tpo $(DEPDIR)/libAtanh_la-catanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='catanhs.c' object='libAtanh_la-catanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-catanhs.lo `test -f 'catanhs.c' || echo '$(srcdir)/'`catanhs.c + +libAtanh_la-zatanhs.lo: zatanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-zatanhs.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-zatanhs.Tpo -c -o libAtanh_la-zatanhs.lo `test -f 'zatanhs.c' || echo '$(srcdir)/'`zatanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-zatanhs.Tpo $(DEPDIR)/libAtanh_la-zatanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zatanhs.c' object='libAtanh_la-zatanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-zatanhs.lo `test -f 'zatanhs.c' || echo '$(srcdir)/'`zatanhs.c + +libAtanh_la-satanha.lo: satanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-satanha.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-satanha.Tpo -c -o libAtanh_la-satanha.lo `test -f 'satanha.c' || echo '$(srcdir)/'`satanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-satanha.Tpo $(DEPDIR)/libAtanh_la-satanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='satanha.c' object='libAtanh_la-satanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-satanha.lo `test -f 'satanha.c' || echo '$(srcdir)/'`satanha.c + +libAtanh_la-datanha.lo: datanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-datanha.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-datanha.Tpo -c -o libAtanh_la-datanha.lo `test -f 'datanha.c' || echo '$(srcdir)/'`datanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-datanha.Tpo $(DEPDIR)/libAtanh_la-datanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='datanha.c' object='libAtanh_la-datanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-datanha.lo `test -f 'datanha.c' || echo '$(srcdir)/'`datanha.c + +libAtanh_la-catanha.lo: catanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-catanha.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-catanha.Tpo -c -o libAtanh_la-catanha.lo `test -f 'catanha.c' || echo '$(srcdir)/'`catanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-catanha.Tpo $(DEPDIR)/libAtanh_la-catanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='catanha.c' object='libAtanh_la-catanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-catanha.lo `test -f 'catanha.c' || echo '$(srcdir)/'`catanha.c + +libAtanh_la-zatanha.lo: zatanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -MT libAtanh_la-zatanha.lo -MD -MP -MF $(DEPDIR)/libAtanh_la-zatanha.Tpo -c -o libAtanh_la-zatanha.lo `test -f 'zatanha.c' || echo '$(srcdir)/'`zatanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAtanh_la-zatanha.Tpo $(DEPDIR)/libAtanh_la-zatanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zatanha.c' object='libAtanh_la-zatanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAtanh_la_CFLAGS) $(CFLAGS) -c -o libAtanh_la-zatanha.lo `test -f 'zatanha.c' || echo '$(srcdir)/'`zatanha.c + +testDoubleAtanh-testDoubleAtanh.o: testDoubleAtanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtanh_CFLAGS) $(CFLAGS) -MT testDoubleAtanh-testDoubleAtanh.o -MD -MP -MF $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Tpo -c -o testDoubleAtanh-testDoubleAtanh.o `test -f 'testDoubleAtanh.c' || echo '$(srcdir)/'`testDoubleAtanh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Tpo $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtanh.c' object='testDoubleAtanh-testDoubleAtanh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtanh_CFLAGS) $(CFLAGS) -c -o testDoubleAtanh-testDoubleAtanh.o `test -f 'testDoubleAtanh.c' || echo '$(srcdir)/'`testDoubleAtanh.c + +testDoubleAtanh-testDoubleAtanh.obj: testDoubleAtanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtanh_CFLAGS) $(CFLAGS) -MT testDoubleAtanh-testDoubleAtanh.obj -MD -MP -MF $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Tpo -c -o testDoubleAtanh-testDoubleAtanh.obj `if test -f 'testDoubleAtanh.c'; then $(CYGPATH_W) 'testDoubleAtanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtanh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Tpo $(DEPDIR)/testDoubleAtanh-testDoubleAtanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleAtanh.c' object='testDoubleAtanh-testDoubleAtanh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleAtanh_CFLAGS) $(CFLAGS) -c -o testDoubleAtanh-testDoubleAtanh.obj `if test -f 'testDoubleAtanh.c'; then $(CYGPATH_W) 'testDoubleAtanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleAtanh.c'; fi` + +testFloatAtanh-testFloatAtanh.o: testFloatAtanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtanh_CFLAGS) $(CFLAGS) -MT testFloatAtanh-testFloatAtanh.o -MD -MP -MF $(DEPDIR)/testFloatAtanh-testFloatAtanh.Tpo -c -o testFloatAtanh-testFloatAtanh.o `test -f 'testFloatAtanh.c' || echo '$(srcdir)/'`testFloatAtanh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAtanh-testFloatAtanh.Tpo $(DEPDIR)/testFloatAtanh-testFloatAtanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtanh.c' object='testFloatAtanh-testFloatAtanh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtanh_CFLAGS) $(CFLAGS) -c -o testFloatAtanh-testFloatAtanh.o `test -f 'testFloatAtanh.c' || echo '$(srcdir)/'`testFloatAtanh.c + +testFloatAtanh-testFloatAtanh.obj: testFloatAtanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtanh_CFLAGS) $(CFLAGS) -MT testFloatAtanh-testFloatAtanh.obj -MD -MP -MF $(DEPDIR)/testFloatAtanh-testFloatAtanh.Tpo -c -o testFloatAtanh-testFloatAtanh.obj `if test -f 'testFloatAtanh.c'; then $(CYGPATH_W) 'testFloatAtanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtanh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatAtanh-testFloatAtanh.Tpo $(DEPDIR)/testFloatAtanh-testFloatAtanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatAtanh.c' object='testFloatAtanh-testFloatAtanh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatAtanh_CFLAGS) $(CFLAGS) -c -o testFloatAtanh-testFloatAtanh.obj `if test -f 'testFloatAtanh.c'; then $(CYGPATH_W) 'testFloatAtanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatAtanh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/atanh/catanha.c b/2.3-1/src/c/elementaryFunctions/atanh/catanha.c new file mode 100644 index 00000000..0c7a77eb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/catanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" + +void catanha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = catanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/catanhs.c b/2.3-1/src/c/elementaryFunctions/atanh/catanhs.c new file mode 100644 index 00000000..8c975154 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/catanhs.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" +#include "atan.h" + +floatComplex catanhs(floatComplex z) { + floatComplex minus_i_z = FloatComplex(cimags(z), -creals(z)); + floatComplex atan_minus_i_z = catans(minus_i_z); + return FloatComplex(-cimags(atan_minus_i_z), creals(atan_minus_i_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/datanha.c b/2.3-1/src/c/elementaryFunctions/atanh/datanha.c new file mode 100644 index 00000000..01189a8d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/datanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" + +void datanha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = datanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/datanhs.c b/2.3-1/src/c/elementaryFunctions/atanh/datanhs.c new file mode 100644 index 00000000..e5eddf39 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/datanhs.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" +#include "atan.h" +/* +// METHOD +// based on the formula atanh(z) = i atan(-i z) +// +// Real case : atanh(x) = -imag(atan(-i x)) +*/ +double datanhs(double x) { + return (-zimags(zatans(DoubleComplex(0.0, -x)))); +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/satanha.c b/2.3-1/src/c/elementaryFunctions/atanh/satanha.c new file mode 100644 index 00000000..48b79a0d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/satanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" + +void satanha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = satanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/satanhs.c b/2.3-1/src/c/elementaryFunctions/atanh/satanhs.c new file mode 100644 index 00000000..15354aad --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/satanhs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" +#include "atan.h" + +float satanhs(float x) { + return (-cimags(catans(FloatComplex(0.0, -x)))); +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/testAtanh.h b/2.3-1/src/c/elementaryFunctions/atanh/testAtanh.h new file mode 100644 index 00000000..c683c179 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/testAtanh.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTATANH_H_ +#define _TESTATANH_H_ + +#include +#include +#include +#include "atanh.h" +#include "constant.h" + +void satanhsTest(void); + +void satanhaTest(void); + +void datanhsTest(void); + +void datanhaTest(void); + +void catanhsTest(void); + +void catanhaTest(void); + +void zatanhsTest(void); + +void zatanhaTest(void); + +int testAtanh(void); + +#endif /* !_TESTATANH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/atanh/testDoubleAtanh.c b/2.3-1/src/c/elementaryFunctions/atanh/testDoubleAtanh.c new file mode 100644 index 00000000..03b97e8f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/testDoubleAtanh.c @@ -0,0 +1,605 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAtanh.h" +#include "isnan.h" + +#define SOURCE {-1.1105866164187250255679,-1.0028386111936116176224,0.2375765916352992890292,\ +-1.9260782734203465427214,1.6339029335662884623304,0.4006142544568777608127,\ +-0.1884054141613809019162,0.3250370808239260722594,0.4942341130822986983162,\ +-0.5271214361991748420522,-0.2047974713791562706433,-0.6989092545405519718571,\ +-0.7715561486980614391840,-0.571989225566208348006,-0.5020150984917894909643,\ +-2.2857334641783242368263,2.332010485133160226923,1.3889136138977253853710,\ +1.3789467621494246873937,0.1097978131481585906126,-0.0647218447158609960779,\ +0.0281807372021152316433,0.1350188864488831574917,1.0304207301469319180143,\ +1.2534650597477734468299,-0.6673847151191693027883,0.7687329161404042876526,\ +0.9397659613234893294376,-0.1842256540708016310237,-0.6380964000421092130466,\ +-0.4312384814994691395462,0.2955203345655439961526,-0.9485014036835781592316,\ +-0.7318488744075331009498,1.0038104194654713374746,-1.1353561092070965088396,\ +-1.0960321876977914268281,-0.0171134176442899188508,-0.5858103496627128370378,\ +0.1289555865425900393895,1.5820296359767425098397,-1.4631497998103890623156,\ +1.2963845181574007447978,-0.3801415377268548834166,2.06830447887869084411,\ +-0.5625246161593648874799,0.5326361661049561213588,-1.2444472935191353002438,\ +1.98041335297601972520,-1.1243976757801756871658,-0.2002672475586080858001,\ +-0.8369527550627472445299,-0.5501861155367867572963,-0.4142018271607930679501,\ +0.0805610771656549429220,1.1377543872793591805959,0.0358630657002049213489,\ +-0.7784293535508046701921,0.1468114639619267913773,0.8017875463824070125796,\ +0.9541283226908341408290,0.2570812112878080313294,0.5669583797452802942374,\ +-0.5124357940757415796895,-1.0874670623228419596984,0.1679748561443953069894,\ +1.0653376770396050243761,1.4418584607257751706300,0.4931419934636970814346,\ +0.8961862868877283894165,1.9862847823434610639026,-0.1823693074986679762972,\ +-1.4947586037652456081304,0.2872503175279246256935,0.0312925927822978733328,\ +0.6112211190486463996407,-0.7772375221664085120921,1.1093137211625221372202,\ +0.0442238350338455751820,1.6762117307909378816078,-0.6876351157010545112058,\ +-1.22967891951066876643,-0.1299578267276684795384,1.6975824415216096419101,\ +1.308926550069704708434,-1.098941911191897657929,0.8471934585094353931112,\ +-0.4433269337102597185130,-0.7837315591442685080992,0.9116218827858540985076,\ +-1.0105858633572861737804,0.4876488481804939212338,0.0655402107055627763943,\ +-0.2953709263667435580558,0.6148227532021686148056,-0.4034374023520052587877,\ +0.5833631341612930398810,-0.5528588193199002187583,-0.2778100246524093375200,\ +2.382193101614083818873,-0.5178234271111435971235,-0.6905004153871671102038,\ +1.1100538942612350190586,0.4362472672541874985086,1.6185312525007526929244,\ +-0.2435431173062182208522,1.3489566990051822248375,0.7594498437474611618470,\ +-0.2810994191894010674204,0.0572337467470783664569,-0.2986850540752242211262,\ +0.3080328437634018978741,-1.063898707867213300204,-0.4732241206771939379117,\ +0.4359979545522715271844,-1.1975945596394972358922,-2.0463590761656762495591,\ +-1.6981361097863292286547,-0.3298420709745075729558,0.6443404115154376388119,\ +1.1582132747946760620295,-0.1360263343598554774960,1.1191856336437415730956,\ +-0.3857336264473540388131,-0.9009857125105711350699,-0.6654259233895634118028,\ +0.8142113557520732625150,-0.7421459588282103281287,-0.7442082361451903826932,\ +-0.7150337980929084569226,0.9101123379002086233314,1.6512593716591941195304,\ +0.5444875921569681809231,-1.4717893200735545633506,-0.2233299046672752585785,\ +-0.0991741463892287511417,-0.9902546973703609811679,-1.376446086882661790085,\ +-1.7488399727971684072259,1.8239775508132596293365,-0.2630036367047015599674,\ +-0.5010962842642737724574,-0.5862555775092695986572,-1.3195380346103915414346,\ +-0.3864449051827200110054,-0.0225200748008141174439,-0.9526576040369814091235,\ +1.6155833271255157779223,1.2505121957121025921822,-0.1546296525315759562424,\ +0.7865497689541539605429,-0.6949758322935190024694,-0.4332203785337710999492,\ +0.6084666055394067907258,0.2648887243137521552150,-0.3173806367287662633103,\ +-0.9277748648924035723695,-0.6967437125955047161341,0.0106825075357279020843,\ +0.7977499585474604471003,0.9612439572909651230859,0.6750778949370804804531,\ +0.0690725368983376858401,-1.8076399886892613455558,-0.2596249600654364497743,\ +0.6728882350569161951981,-0.4537439012069451327314,0.695587590556807633391,\ +1.2463414096089968641223,-0.2637405473740589423315,-0.8045531944567444471161,\ +0.2829556705817293793537,0.1166763530431780965246,1.0028892209395869894450,\ +0.4234280063942446603598,0.6056937191431178701961,-1.4168714241399820163991,\ +-0.7415110426654055730822,-1.6002352979874459038001,-0.0441220186662526561716,\ +-0.6809183287313597121582,0.2835255852521558761481,0.2496331067144885174081,\ +0.1563210463282909690186,-1.006767784835231216434,-0.6458091780006059989816,\ +-2.529451976430145521135,-0.4966644528621277365765,0.3057445000796202294602,\ +0.0051108872162743653259,0.3463692486733729314352,0.4684023556979828861735,\ +-2.0819698824296395400779,-1.8736446723365958177965,0.5032045449115828406050,\ +1.0514506638411960093293,-0.5657157774822674234372,-0.2842153768346438180714,\ +0.1431506224954579853392,1.0806316268163596028273} + +/* +#define RESULT {-1.4744610660983759053977+%i*1.5707963267948965579990,\ +-3.2795029213225106445861+%i*1.5707963267948965579990,0.2422041646840577544531,\ +-0.5752297863073998485106+%i*1.5707963267948965579990,\ +0.7121630945985538696519-%i*1.5707963267948965579990,0.4243803995861772371256,\ +-0.1906833812311178877330,0.3372689843733094883227,0.5416475837340712917722,\ +-0.5861506043378337249550,-0.2077349615310257191503,-0.8651650049502660477785,\ +-1.0241615832881652004005,-0.6504743749122398055462,-0.5519965631116492410513,\ +-0.4691302795139216663678+%i*1.5707963267948965579990,\ +0.4584432136447526562328-%i*1.5707963267948965579990,\ +0.9076183700076346783092-%i*1.5707963267948965579990,\ +0.9185087029260963209509-%i*1.5707963267948965579990,0.1102422571172131521289,\ +-0.0648124440153749203919,0.0281882007066550886731,0.1358484485857832935185,\ +2.1004370090239423696232-%i*1.5707963267948965579990,\ +1.0924991774831627200371-%i*1.5707963267948965579990,-0.8060125587957032156083,\ +1.0172227264061333151801,1.736042493622687921118,-0.1863533018119427342452,\ +-0.7549561185313359290561,-0.4614170985204111286038,0.3046041145449288611857,\ +-1.8166306469319770666715,-0.9326970536559181512715,\ +3.1325332888309622703105-%i*1.5707963267948965579990,\ +-1.3792397781139973389486+%i*1.5707963267948965579990,\ +-1.5415589891296013203004+%i*1.5707963267948965579990,-0.0171150886014554831638,\ +-0.6712634278717346525411,0.1296776288627018158817,\ +0.7449048409492748934468-%i*1.5707963267948965579990,\ +-0.8355728364335629487769+%i*1.5707963267948965579990,\ +1.0237167786809893144095-%i*1.5707963267948965579990,-0.4002250855702985665729,\ +0.5275261647661907415952-%i*1.5707963267948965579990,-0.6365188485604326151801,\ +0.593818237113303393215,-1.1086074290970830968917+%i*1.5707963267948965579990,\ +0.5559215037224033428842-%i*1.5707963267948965579990,\ +-1.4188800488983950298660+%i*1.5707963267948965579990,-0.2030109524350925953584,\ +-1.2109116806527058241016,-0.618648185057067423465,-0.4406726279385401179312,\ +0.0807360417981298622569,1.3710194541092590725384-%i*1.5707963267948965579990,\ +0.0358784527834248925804,-1.041372191940861169357,0.1478800901804916689830,\ +1.1035975394582797637355,1.8759258138597765253053,0.2629805384285096581110,\ +0.6430289187352878910175,-0.5660273762902281458054,\ +-1.5862221930864266461469+%i*1.5707963267948965579990,0.1695819872689824647782,\ +1.7267400811821158601589-%i*1.5707963267948965579990,\ +0.8547625432037965209631-%i*1.5707963267948965579990,0.5402035003963170378682,\ +1.4525009288261496731565,0.5539201036322172200244-%i*1.5707963267948965579990,\ +-0.1844324167806210001963,-0.8089386385243267918455+%i*1.5707963267948965579990,\ +0.2955667016509896383170,0.0313028129649670083801,0.7108684384800065814147,\ +-1.0383547009634652713572,1.4799479994581337116699-%i*1.5707963267948965579990,\ +0.0442526991314810200229,0.6878256510027744852209-%i*1.5707963267948965579990,\ +-0.8434557413354200061661,-1.1364652701643074284021+%i*1.5707963267948965579990,\ +-0.1306969520152806707447,0.6762452782098172798797-%i*1.5707963267948965579990,\ +1.005717225984443130571-%i*1.5707963267948965579990,\ +-1.5273278613167085016045+%i*1.5707963267948965579990,1.2461250150575873263392,\ +-0.4763639926970618110325,-1.0549712063383256399618,1.5370414589157994633695,\ +-2.6233309837037732670240+%i*1.5707963267948965579990,0.5329709825316656379712,\ +0.0656342963912304455665,-0.3044404175419783142864,0.7166384348283165728333,\ +-0.4277478080499193535680,0.6675457063378462674308,-0.6224892627320329774321,\ +-0.2853073726746037097612,0.4474264519637772830052-%i*1.5707963267948965579990,\ +-0.5733611255013777441292,-0.8489115589330021860448,\ +1.4767492874056193929988-%i*1.5707963267948965579990,0.4675865941091252309114,\ +0.7215105644264150352996-%i*1.5707963267948965579990,-0.2485372004835029458025,\ +0.9533893539015392271097-%i*1.5707963267948965579990,0.9949139163386880868600,\ +-0.2888754177942080558772,0.0572963634231402757502,-0.3080752338091528041986,\ +0.3183705746036424866219,-1.7375264548714035583998+%i*1.5707963267948965579990,\ +-0.5142166878802835183748,0.4672787235144033601841,\ +-1.2044507032201230423141+%i*1.5707963267948965579990,\ +-0.5343152701155061690130+%i*1.5707963267948965579990,\ +-0.6759512002250491757849+%i*1.5707963267948965579990,-0.3426510354825004212032,\ +0.7655602779397917556636,1.3065460037453791031226-%i*1.5707963267948965579990,\ +-0.1368747459554155443406,1.4390524672743967293798-%i*1.5707963267948965579990,\ +-0.4067781526762131449892,-1.4774318344439005823432,-0.8024889348769219665769,\ +1.1393982155849557980076,-0.9552396245178285116850,-0.9598461538853348962164,\ +-0.8974087416560057040016,1.5281783215878395054688,\ +0.7019410287263873060581-%i*1.5707963267948965579990,0.6105122611902852325372,\ +-0.8280825291376695540535+%i*1.5707963267948965579990,-0.2271580885894484980181,\ +-0.0995012215536074662303,-2.6596162554083884188572,\ +-0.9212932842045244985485+%i*1.5707963267948965579990,\ +-0.6502044836894653734305+%i*1.5707963267948965579990,\ +0.6158791818865629874580-%i*1.5707963267948965579990,-0.2693325220287110521866,\ +-0.5507689268125864900938,-0.6719415444836209783119,\ +-0.9911235054617995032800+%i*1.5707963267948965579990,-0.4076140317144636981972,\ +-0.0225238830066269123120,-1.8597701914697917224828,\ +0.7233360518064337885136-%i*1.5707963267948965579990,\ +1.0977027535066357089022-%i*1.5707963267948965579990,-0.1558800560054872108573,\ +1.0623189198966227486665,-0.8575163748144335462698,-0.463854325361329367094,\ +0.7064828873383774965333,0.2713587745389601235679,-0.3287316374977890531817,\ +-1.6421667900158274377986,-0.8609439745036365776443,0.0106829139117793642938,\ +1.092393189014539744974,1.9620237692362385573119,0.8200147353723576948425,\ +0.0691827011392311119753,-0.6229915735462322468052+%i*1.5707963267948965579990,\ +-0.2657062181808059753152,0.8160024961656430209089,-0.4894047987117864928486,\ +0.8587006143920951073412,1.1051698569402153005115-%i*1.5707963267948965579990,\ +-0.2701243583599451381083,-1.1113900272171266525589,0.2908920738530955119039,\ +0.1172101729688146409813,3.2706795664298211612220-%i*1.5707963267948965579990,\ +0.4518615589828762768576,0.7020915980292293800957,\ +-0.8787256719819279693340+%i*1.5707963267948965579990,-0.9538277279422371357498,\ +-0.7330177387440419689568+%i*1.5707963267948965579990,-0.0441506837064596646680,\ +-0.8308242272476199508091,0.2915116980546684222197,0.2550214973106580407247,\ +0.1576133484131722883870,-2.8460534045826286764225+%i*1.5707963267948965579990,\ +-0.768075815339287371053,-0.4181165627609883528315+%i*1.5707963267948965579990,\ +-0.5448685867460187903788,0.3158443034854154785052,0.0051109317177532613205,\ +0.3613121056785816853640,0.5080216801947243787652,\ +-0.5233928099098102970643+%i*1.5707963267948965579990,\ +-0.5953313420807592182271+%i*1.5707963267948965579990,0.5535880446904775098460,\ +1.842839548963430384987-%i*1.5707963267948965579990,-0.6411995769353845409100,\ +-0.2922619465382557679689,0.1441406428551997020993,\ +1.6252679142635939602002-%i*1.5707963267948965579990} +*/ +#define ZSOURCER {0.1566312085376346807664,-0.9832172164912469369824,-0.4352704306190940952703,\ +0.5411529581857100756892,-0.4189678441885264503775,-0.3123240835354778588417,\ +-0.6429953452754243459211,0.5746034575341304462270,0.0583200256392587754184,\ +-0.7281504683187327575666,0.4564682359303286474095,1.2276307555220513645367,\ +1.0722151830463704236251,-0.8694353593641974686790,0.4560977429718384712487,\ +0.922397585949679688078,0.3447492619094876808994,-1.2072516069836567442763,\ +-3.0311848873460989217676,-0.5227521113472203273531,-0.9127256852426085531604,\ +0.9702908997340189412029,0.7984557906741573951592,-0.374280495762714437991,\ +0.2178224309624917087724,-0.7621335705740988064605,0.4017588191443041689688,\ +0.0259981222714757570502,-2.250132425948803138738,0.5878367273362664624514,\ +2.3809410297786541832465,0.1486053165381447105364,0.101236219868174881498,\ +0.6421364318076420163450,-0.6540329098904471560871,-0.5416580949191436289425,\ +0.9514918150544823260972,-1.267340977798151469003,-0.8455403103569121281424,\ +-0.364558782701674466420,-1.0697180418170626481356,0.1606013529586497734503,\ +-1.6656989490484364058176,0.4667927145215887141383,-0.0128825329067423742513,\ +0.9947195275346620846335,0.8275102004468978256213,0.2927543106645062453985,\ +-0.9280170868066852651879,-0.3636959897126564866809,1.4783506936052415170479,\ +2.4281448731590140610592,-0.0602106018714212570808,1.541843889601811401491,\ +1.341076792855444343999,-1.9789304036759756133534,-0.3294688652910273685137,\ +0.622286327382227888450,-0.6118557906779339417014,0.7459354816620213934897,\ +-0.4040802511755230974622,0.6577039363065745325443,-0.5486081684530353941298,\ +0.3927975474240214537325,0.7894975295935096060163,-0.1452945797743281086678,\ +0.1437495883505973681693,0.4103084241265512188690,0.1795141291570316322002,\ +-2.0420270362087347137958,-1.0136631446624102537157,-0.6372521675576777733241,\ +-0.2601528835939894701568,1.1986221523039410907785,1.601129898882974078589,\ +-1.2343266797475058726974,0.9483471983582205666607,-0.0424058145973261885198,\ +0.5150673339403005757120,0.0937153808744289607002,0.4638195050716256706558,\ +0.2202932903531656105844,-0.6924450714085558233890,-0.6889026252552187257194,\ +0.4927201161848878685490,0.3688430529148965519859,-0.1495056200185169992256,\ +0.0956460878099940903230,0.8967077311519383586713,0.7486850824131056070243,\ +-0.3635393959060023716390,2.72178097931810514254,0.8872833757746945160250,\ +0.9893578306194498184212,0.8262130885403843327808,1.8679166202704664545564,\ +0.5569566531470352410693,-0.0576405625178402075681,0.8001172842696224751791,\ +0.4480121632350138050072,-0.2882322764074837784243,-0.2677211241656151097246,\ +0.2862315832454170316801,0.9463381000719524038800,-1.574827516423719320215,\ +1.7962971923614798885893,0.9930237578825827915452,1.17225507537484907594,\ +-0.9161863233099263315040,0.1421586828731320473196,-0.1430347256308386882928,\ +-0.4683233849545334614994,-0.3180446316984328336552,-0.0576576190062656410151,\ +0.6249620545306199259628,0.7539731616235149092020,-0.1134181356790778527621,\ +-0.3551074647649283821949,-1.5743164879335251882253,-0.3132427332940839193043,\ +-0.5345549536487770314608,-0.3108292305558989498948,-0.0698678127822071615149,\ +1.9098270701284520978191,0.3087451523556873911325,0.792464324566980904407,\ +-0.7089070907362685636244,-1.69657580301203281259,0.2839165766617411379436,\ +-1.9503478026750964424707,-0.8383432843348773699788,0.4243701560501659808544,\ +1.0206422864827822127864,0.1651260412410127109695,-2.4565661716609770159891,\ +1.3581676364949575308572,1.5976518292284813682613,1.038096252933477403602,\ +-0.2179395863297476365616,0.1906211564102877620286,0.1220518503007956001571,\ +1.7007780598076820410824,2.3461749520518053735429,-0.7583114756702955538969,\ +0.1563580374722161325796,0.9458374821601646109670,1.106385383701591562655,\ +1.857413924600636034867,0.9819266230329063427362,0.1010843883126317094279,\ +-0.0394749928167329941497,0.9565452494078602319050,-1.164240263162510835571,\ +-0.0360262254241734622418,-0.4279483181417821913151,0.0207154879461370518279,\ +0.1331812668838084079415,0.0637098112636336894044,0.5563753726211196903861,\ +2.170691821782472885616,-1.4105863647114469383581,-0.3956456917805734052607,\ +-0.7536155387925271842420,-0.1512156734265959479036,-1.0252674376565367175829,\ +0.9250804906985814479725,0.0319417929504777348138,-0.3662171854280546479110,\ +0.9733260674698945846828,-0.2668109355235854240895,0.9653716053391865337119,\ +0.5007936673782547032374,-0.1208939822530236685161,1.0971085072938426829836,\ +0.2029604338428208087919,0.3746473304704570073120,0.9561076870030955632274,\ +1.1282520720814495085449,1.5637873924930061342309,0.4739411474762828535567,\ +-0.9908999627117486275196,0.4483771591380850130015,0.7638174840760570960541,\ +1.21967084705659489785,-1.1141855892005874117956,0.3637931277318062761594,\ +0.0172116174170295101187,-0.5359859794230503737822,1.7180258735531828140353,\ +-0.4389711879238100133982,-0.5289769194381308548003,-0.2349363816328474963147,\ +-1.770826942434098993928,-0.2698746134406798669048,-1.6219764795098883247704,\ +-0.4683402918639187895167,0.4233140865550635290049,0.5072350201185169549234,\ +1.846909249365268790299,0.8538988411566506009365} + +#define ZSOURCEI {-1.2880264074010461250452,-0.9681461673606511775247,0.8819263929226937026584,\ +-0.2968181427237222558269,0.3676169132810200301797,-1.4546278949302484662098,\ +-0.4969724671301882223950,-1.3684785326259825133377,0.3201951876584711031981,\ +0.0925515282972030062236,-1.3629699188377910612502,1.3008264376880041002238,\ +-1.312881117519760332257,0.7519787618494813141723,-0.349314202941638340949,\ +-0.6612113457421112672208,-0.1912192548186895935114,-0.2871763408135362682927,\ +2.1040662039819300055399,0.6770601919983177952034,-0.9998765495359557275989,\ +1.0320694267454630921321,0.5184250597548623051836,0.3020078279774962016,\ +-0.2426203970909892593255,1.085343122387009806573,0.3728224888143483184422,\ +0.3597109342835585477083,-0.5464095547489105086925,-0.0522892744113094345981,\ +-0.0037796004128336437196,1.3386616898503973516199,-0.8603866811447716811401,\ +-0.215138661778858181206,-0.1519505658345833010170,-0.0684049031594022166614,\ +0.3134237083474871732314,-0.2552970754123656815793,1.0371924512876768975644,\ +-2.4944520251764212837031,-0.9105655292839007763916,-0.5967335487543307115388,\ +-0.6520109300715212219401,1.891233309015407648701,-0.7688305781614098721732,\ +0.1640648747943601049037,-0.613585069751534706306,-0.2234197861121311190491,\ +1.9233974415188206386063,0.315204859780382373735,0.4595542257467975510998,\ +-1.1764564844019769207506,-2.1928435621757311757563,-0.3567337876240649907622,\ +1.4844812942744205486179,0.2127167501638982105572,0.326665566953199926203,\ +-0.3823116465408597508535,1.1195697860125490841199,0.3156195041989769412005,\ +-1.3411228504687704443654,1.2817926351994635147946,-0.8385592799769060468051,\ +0.2920629737538525949603,0.4117329700106473477916,0.8168979807640022183790,\ +0.6114286447089312126479,-0.9103003485572774833301,0.0883797323534893930486,\ +-0.8309636819350860736932,0.300088746736916378577,-0.9870316877320252091366,\ +0.0574605523525985317779,-0.0055294403676948468418,-0.4910286442216560409690,\ +-0.9282905300686704608282,-0.9620222168730435674533,1.5101979946106838248454,\ +0.16215452036647093337,0.8355679951054210130579,0.2598273768449387843837,\ +-0.8781794540671359339257,-0.0960593767304002976726,-0.8457942620552999501982,\ +-1.5126206512504021262089,0.0267016916333849170517,-0.0455102979008666919114,\ +-0.9512410833653791586428,-0.1410038404270228529214,0.8526701417894808621156,\ +-0.5427383894147087550763,0.3670995115141847953133,-0.4196045805115825033660,\ +-0.861511165291383607112,-0.5242638386479363532544,-1.0690056931583220567461,\ +-1.204258995571379831091,-0.1994216356488724417595,-0.651264013076401249158,\ +-1.2804046190990912013064,-0.1189798590125256405603,0.2757828726342566594276,\ +0.1186787898486535430820,-0.9717707229710241811915,-0.2337132662497607982210,\ +-1.2810105417899781965474,0.4516508120864454189913,-1.7941677742351858082515,\ +1.2424962452829722003855,-0.1452111265545129592525,0.803374036348334819024,\ +2.2359407014896999221776,0.0801276770871145183062,0.1489247936009177042394,\ +0.3146211320275099643240,-1.49119197842913098206,-0.8212344459793755602206,\ +-1.3094646972226284820096,-0.2661055404338998897629,0.2164009824597608044883,\ +0.4021554472831923576770,1.0836546525394512574536,-0.8330897968467666503400,\ +-1.2783354864784060023197,1.0944391027576960695455,0.5158321013729825210703,\ +0.5039256424604841022585,-1.1530018443600813515815,0.5567649276400054025871,\ +1.5507245891800580661624,2.0511800424609365478545,0.2003839203406024560561,\ +-0.5188228347179002497569,-0.5014579405716672599880,0.2409475853154263991218,\ +-1.2895515809257553918599,1.3505164949531500706570,-1.7662555890569775485233,\ +0.0695313390316097817978,0.4857809488385180229919,-1.54949381746834280449,\ +-0.5022279078645265348868,-0.4715667339089154030951,0.9071363416804920642988,\ +-0.0090747242741150424550,-1.426140714401586517823,0.0902619806757116310836,\ +-0.7111783918397256432087,0.4421886947944868029303,1.3229936148586256550175,\ +0.0399972677459073389095,-0.2744759605679197855821,-0.6365722011642755973071,\ +0.0838977431731276618310,-0.0154779602574307128399,1.3680369604712516728995,\ +0.8578728691952266505183,0.9477645632263477226687,0.4034044727794333096149,\ +-0.1637512612660888822180,-1.521579761721328916124,0.7389202762668894974851,\ +1.6242287608009475796678,0.0251523200085141500348,-0.2296479198161843759962,\ +0.3374847554612029343346,1.0988696857027278053209,0.6720077941707034430152,\ +1.6284314621145825618953,1.2811365743500131575416,-0.6480287734962971724073,\ +0.4079918994040774293808,-0.6857363255654103095793,0.1644734231427373016832,\ +-0.9707468997532966437092,-1.0103908741767126944211,-0.3245462572729273520444,\ +0.3569008288111439886059,1.1707819570142721232742,0.0931015649413182710958,\ +1.2605162559518456877328,-0.2998099303847839292025,-1.8576048661033506270712,\ +0.3542284165121863948045,-0.3606813370588974332343,-0.1691565053601437607078,\ +-1.3723457158075849093848,-0.3869812789951324605298,1.327934065790971063237,\ +0.6883264291332520379285,1.1636463404567130019984,-1.6679940626595868291560,\ +-1.1660526540945894691248,2.4012435579972462029730,1.8717476066252398680945,\ +0.6269431765551266577674,-0.7276289505214773578601,0.5485159953217271233683,\ +-1.0371187436769986334184,2.282202076649753941240} + +#define ZRESULTR {0.0586345786159515672264,-0.4119079581767730036113,-0.2376773392005311347219,\ +0.5274985111723742292611,-0.3785076402666358030835,-0.0984442400006558665515,\ +-0.5157322835496214175066,0.1877549307968403857760,0.0529309487949000886942,\ +-0.8980782630098248509043,0.1535280327645664466552,0.3347825460369071581823,\ +0.3118103625565722958335,-0.4854100811784345381739,0.4200271027799429846006,\ +0.558160367722654870981,0.3440445808210612077538,-0.9190853850068781971672,\ +-0.2206972238733744262618,-0.3495146734241325048309,-0.3828254526784128919381,\ +0.3837160824181031770763,0.6067122840309074893739,-0.3528285483819846302112,\ +0.2081338122939639656561,-0.3109916924279712002743,0.3607981848765179355709,\ +0.0230220619188065515892,-0.4409843876587154487545,0.6706334235337022553480,\ +0.4476928944367338791821,0.0530051009287677843407,0.0580922710665942171326,\ +0.6889248635636368023327,-0.7403179849986993854571,-0.6014835481325517818618,\ +0.9148458682398055152873,-0.9100406392834269331260,-0.3512629496668798201320,\ +-0.0497281250251861567380,-0.4533232590993708788218,0.1183827451686376569517,\ +-0.5400714293963024825729,0.0986159601519734224651,-0.0080964813496256192449,\ +1.2504251172076377152109,0.553383982176059552316,0.2851532314993195926789,\ +-0.1735373380028721046475,-0.3392884681219434650501,0.6674877635610125814480,\ +0.3361668249120546292374,-0.0103608516149833115860,0.6876886023380593959686,\ +0.2994018975364160506381,-0.5461669463711513738957,-0.3036470157958083837535,\ +0.5659099835134179246054,-0.2522688982901432619421,0.73840604848731461463,\ +-0.1399717847889199173750,0.2285367773899925347703,-0.3073816797691770186240,\ +0.3738323046463303267473,0.6895008314715558306318,-0.0869179912549136179933,\ +0.1045814791078650968226,0.2183617419002600035238,0.1799962512946713666384,\ +-0.4306170362358095471400,-0.956790010441086580251,-0.2988659063401313820130,\ +-0.26528818791890551587,1.2018988344435987958292,0.6134078020904577543959,\ +-0.4635409097157874858119,0.4066731412601408690577,-0.0129216461290907521503,\ +0.5459518490067882812156,0.0551242941387568297085,0.4571890743247491450951,\ +0.1235106929418888221939,-0.8301715333893021631084,-0.3700021952100086553017,\ +0.1433522018206848380739,0.3867313699737674470569,-0.1503114555841373045642,\ +0.0501390172375495365986,1.193524050554648274769,0.3916234392819171183930,\ +-0.2811037877759303138525,0.3767282302151824247005,0.7464338830239950484113,\ +0.4613726054161970124845,0.6177367275920276901147,0.3993738908711506052640,\ +0.2139276426895061200550,-0.0554860078847602203322,0.5165924809229520686671,\ +0.1633124027176871273515,-0.2918709165103665625907,-0.2528080890770357247455,\ +0.2897583915934112130941,0.4021736360794072595581,-0.713539018877845987454,\ +0.3562716257530119112751,0.7547097044407786725628,0.2233423544188815612621,\ +-0.3032157270895312062287,0.1400739703409606129458,-0.0867211925226533952848,\ +-0.0758855325499612903828,-0.3269646450472631915574,-0.0564625318897502212478,\ +0.6090972295195002939039,0.2104281878811394279616,-0.0676285383445118792878,\ +-0.1277092508406163506862,-0.7041149381903939463712,-0.3071683332013411815709,\ +-0.4736979352269045095980,-0.1404550230528205378988,-0.0412179517191962191403,\ +0.3529283428251930310182,0.1380434056063472858522,0.6051661095195016715209,\ +-0.5594498837332433360814,-0.3889971602159096875084,0.2168075281019664068971,\ +-0.3028666557798217473518,-0.1458483340857026078208,0.4293137169051447488144,\ +0.6953697523295457871839,0.1321249855766219449826,-0.4265596445818128912286,\ +0.3486234081846604770938,0.3421608935025099995642,0.2115120471977689209364,\ +-0.2203370156751261743633,0.1545639581145290264441,0.0357922784779254460341,\ +0.5794250482661091883330,0.4312552311016552564205,-0.3727620017605887681178,\ +0.1576377379130869393897,0.2624856474568436071060,1.3577286999442579329411,\ +0.4860182340340697959569,0.7617714539289787145648,0.0366834217396586823035,\ +-0.0394322693273299676453,0.9807192175900326658322,-0.6164954700307514467994,\ +-0.0357893654572665059765,-0.4572287236587250780495,0.0072135289476597582586,\ +0.0765359692550191955673,0.0335408660165012612042,0.4931690601828112585636,\ +0.4939993220457917777466,-0.296325232124018844715,-0.2516901659302647753513,\ +-0.1874945429943649932714,-0.1522841974461120184703,-1.0886404519839611992893,\ +0.8661426586684568551533,0.0144669239838038730245,-0.2498600121525025030689,\ +0.2258303913936256790418,-0.0996627600161344717744,0.5798388843647412915772,\ +0.4402912178536843579302,-0.0821496253311937152386,1.1995498265712831731378,\ +0.1037875988793510867447,0.1808411497687466285011,0.9003994950861190504909,\ +0.8693703906397208802659,0.3871229651004495231348,0.5084262016718109622460,\ +-0.3127921352240150554280,0.4284515458646944163768,0.1566612259199449408431,\ +0.8425254932446538669311,-0.8675086878856705929763,0.3679908151081396905369,\ +0.0059690185652748976169,-0.4818927853047598741654,0.3475368987720111602080,\ +-0.2928677403656957944911,-0.21281918945471237081,-0.0615315656203920743894,\ +-0.3828854358877186170318,-0.0395445045895176927608,-0.2453056840726963727661,\ +-0.3319274210060903507191,0.2716611153754885932265,0.3885772436850290501020,\ +0.4083161225294907326067,0.1256636073410991871757} + +#define ZRESULTI {-0.9150826723701824816359,-1.0038007968241344780580,0.7761168535216221853190,\ +-0.3822213477951738047622,0.4088073079437265500147,-0.9829838814461281382151,\ +-0.6207924428978939257462,-0.9924436424002488488227,0.3107781745847606469368,\ +0.190823563908477877860,-0.9717930993017909191423,1.1362832817249874928223,\ +-1.0952400709881249252220,0.8906629459042527674484,-0.4031733379746096357366,\ +-0.8926214809458651311402,-0.2125955165236021182640,-1.1626545105534673574255,\ +1.4098114180999468114663,0.6875898477221956683891,-0.9827065462915589577619,\ +1.0122682558571856059615,0.7403338169936454216113,0.3329978318477040399870,\ +-0.2487126175192662380642,0.9535461622187894059621,0.4086259224331897366156,\ +0.3454903551399998162807,-1.4480476267508943788442,-0.0795552773231696652712,\ +-1.5699867995861691571946,0.9329922799220887741356,-0.7134073946597112581003,\ +-0.3357762973784728099957,-0.2527252112264842809353,-0.0962463379406888058787,\ +0.7882465889811950399135,-1.2456800812145352175264,0.9674854545265952898703,\ +-1.1957951138140576752278,-1.0308375326751320066876,-0.5464592420922904647540,\ +-1.3032325007401501792970,1.1035601617683621356036,-0.6554945586705149818130,\ +0.8103435172856551238496,-0.8103372317467707475203,-0.2385573277010208381732,\ +1.1587938021757215878438,0.3435431890072572769235,1.279788873802896409515,\ +-1.3915550484745486947702,-1.143175630086853633571,-1.3493948361964505089361,\ +1.180878018812092644652,1.4994549779312595916281,0.3471363780379303487500,\ +-0.5114436565324694816681,0.922077454999635448551,0.5359370502466848096290,\ +-0.9575622722618749582679,0.9840232928412098178939,-0.7866361736794498238368,\ +0.3275153905103054818859,0.6621644080795368036974,0.6911787537867797315272,\ +0.5555203262090003812901,-0.7845741854114917090968,0.0910458923193785268912,\ +-1.367532424689007264362,0.8821163892946874973688,-0.8805618815721650838313,\ +0.0615381817744835926676,-1.5581379012861951149915,-1.3216226160366340014463,\ +-1.1059140418930615279436,-0.9879008462145800750775,0.986169123983388073995,\ +0.2146596902165759102044,0.6986026791593697993221,0.3134566221055383739014,\ +-0.7342575229927524871343,-0.1797145584041555665955,-0.8413107892059722425770,\ +-1.019619130948550722593,0.0308925093685123823561,-0.0465149720271331584831,\ +-0.7628135267341744629732,-0.5063811875785856342347,0.8689285269800102184945,\ +-0.5424489267017504889878,1.5149231207825908374076,-0.7635699257253423244407,\ +-0.9835608360649982229162,-0.7651335213236122312352,-1.3047698554262849857110,\ +-0.9383103802342007693227,-0.1974540431056293898759,-0.8100733516290339331078,\ +-0.9439058311312691351702,-0.1288637100697393178539,0.2871927052822376702501,\ +0.1283857487876574610119,-0.9893521517129132414325,-1.4229736910621084700068,\ +-1.278268082403663186142,0.88910168768678732309,-1.1784373117164359534570,\ +1.03935358865908744619,-0.1470722349218777647017,0.6828818013490814964328,\ +1.1635383473949738597497,0.0888393991592487247688,0.1483135488190464867930,\ +0.4446342289575472839225,-1.055940453660143329984,-0.6913288042725108661912,\ +-0.9407243087808065951094,-1.4053508981321376491991,0.2342864098211708545616,\ +0.4844410101414913238926,0.8475776035888460402390,-0.6960123633858344982528,\ +-1.3016421578221382127083,0.8519589639880413844963,0.7342440505866469901974,\ +0.6668635124458689444893,-1.2591545397069716649696,0.535024814500131951078,\ +1.30226369708141054282,1.1661057476987222170095,0.2373787574293542146364,\ +-0.9309471081116736934646,-0.4736579850459717855315,1.5236251088004300058287,\ +-1.171065543003733777638,1.2334327135159162125433,-1.153213069447322158823,\ +0.0728510737378383066432,0.4639741641063248600574,-0.9996734202650466860618,\ +-1.3518108187607991155232,-1.4723273061328936428538,0.8933558949405833171653,\ +-0.0093018535376701225181,-1.0826576750905823054438,1.2404141733855511553486,\ +-1.3465428092378513014182,0.8747309046321107839361,0.9253397074562169644096,\ +0.0400381835355557713640,-0.7765785126027255902414,-1.0546807717631738743336,\ +0.0838092326986521196641,-0.0189446011407611511479,0.9396543988269212555053,\ +0.7141040044798073749277,0.7596541492574908627233,0.4957818734457210552158,\ +-1.5271090619693206136276,-1.1987057982776780917789,0.6860846415801318265437,\ +1.0836815939774062655943,0.0257348439490480244973,-0.8966457616590515211641,\ +0.7629454929184202871539,0.8326995831057554253718,0.6358947917453465770166,\ +1.122174794910343109677,0.9210086183100237855470,-0.9179542949015334629692,\ +0.4753128844824887067055,-0.6057418122474197419436,1.0912054352763760345368,\ +-0.7811598998629154522177,-0.8252118132068452238670,-0.8003932093064218822320,\ +1.040963230413896711823,1.2239764586679500180111,0.1191234084420016575701,\ +1.064003892301497833373,-0.3509788166940612241795,-1.1278108079499422622405,\ +1.1420720075136889803957,-1.0231852297083139369249,-0.1916370368791805167685,\ +-0.941129540386991148004,-0.4709650954727132576849,1.2604683484747309929475,\ +0.6665567013842946808566,0.9183588395793375047660,-1.0371195264398431756803,\ +-1.276620042706810842503,1.1799805845600985776400,1.255793767839696428723,\ +0.6354974793467924598644,-0.6865980682751140484754,0.5939555774818401356896,\ +-1.3024651432778990844952,1.197724373266410013983} + +#define RESULT {-1.4744610660983759053977,-3.2795029213225106445861,0.2422041646840577544531,\ +-0.5752297863073998485106,0.7121630945985538696519,0.4243803995861772371256,\ +-0.1906833812311178877330,0.3372689843733094883227,0.5416475837340712917722,\ +-0.5861506043378337249550,-0.2077349615310257191503,-0.8651650049502660477785,\ +-1.0241615832881652004005,-0.6504743749122398055462,-0.5519965631116492410513,\ +-0.4691302795139216663678,0.4584432136447526562328,0.9076183700076346783092,\ +0.9185087029260963209509,0.1102422571172131521289,-0.0648124440153749203919,\ +0.0281882007066550886731,0.1358484485857832935185,2.1004370090239423696232,\ +1.0924991774831627200371,-0.8060125587957032156083,1.0172227264061333151801,\ +1.736042493622687921118,-0.1863533018119427342452,-0.7549561185313359290561,\ +-0.4614170985204111286038,0.3046041145449288611857,-1.8166306469319770666715,\ +-0.9326970536559181512715,3.1325332888309622703105,-1.3792397781139973389486,\ +-1.5415589891296013203004,-0.0171150886014554831638,-0.6712634278717346525411,\ +0.1296776288627018158817,0.7449048409492748934468,-0.8355728364335629487769,\ +1.0237167786809893144095,-0.4002250855702985665729,0.5275261647661907415952,\ +-0.6365188485604326151801,0.593818237113303393215,-1.1086074290970830968917,\ +0.5559215037224033428842,-1.4188800488983950298660,-0.2030109524350925953584,\ +-1.2109116806527058241016,-0.618648185057067423465,-0.4406726279385401179312,\ +0.0807360417981298622569,1.3710194541092590725384,0.0358784527834248925804,\ +-1.041372191940861169357,0.1478800901804916689830,1.1035975394582797637355,\ +1.8759258138597765253053,0.2629805384285096581110,0.6430289187352878910175,\ +-0.5660273762902281458054,-1.5862221930864266461469,0.1695819872689824647782,\ +1.7267400811821158601589,0.8547625432037965209631,0.5402035003963170378682,\ +1.4525009288261496731565,0.5539201036322172200244,-0.1844324167806210001963,\ +-0.8089386385243267918455,0.2955667016509896383170,0.0313028129649670083801,\ +0.7108684384800065814147,-1.0383547009634652713572,1.4799479994581337116699,\ +0.0442526991314810200229,0.6878256510027744852209,-0.8434557413354200061661,\ +-1.1364652701643074284021,-0.1306969520152806707447,0.6762452782098172798797,\ +1.005717225984443130571,-1.5273278613167085016045,1.2461250150575873263392,\ +-0.4763639926970618110325,-1.0549712063383256399618,1.5370414589157994633695,\ +-2.6233309837037732670240,0.5329709825316656379712,0.0656342963912304455665,\ +-0.3044404175419783142864,0.7166384348283165728333,-0.4277478080499193535680,\ +0.6675457063378462674308,-0.6224892627320329774321,-0.2853073726746037097612,\ +0.4474264519637772830052,-0.5733611255013777441292,-0.8489115589330021860448,\ +1.4767492874056193929988,0.4675865941091252309114,0.7215105644264150352996,\ +-0.2485372004835029458025,0.9533893539015392271097,0.9949139163386880868600,\ +-0.2888754177942080558772,0.0572963634231402757502,-0.3080752338091528041986,\ +0.3183705746036424866219,-1.7375264548714035583998,-0.5142166878802835183748,\ +0.4672787235144033601841,-1.2044507032201230423141,-0.5343152701155061690130,\ +-0.6759512002250491757849,-0.3426510354825004212032,0.7655602779397917556636,\ +1.3065460037453791031226,-0.1368747459554155443406,1.4390524672743967293798,\ +-0.4067781526762131449892,-1.4774318344439005823432,-0.8024889348769219665769,\ +1.1393982155849557980076,-0.9552396245178285116850,-0.9598461538853348962164,\ +-0.8974087416560057040016,1.5281783215878395054688,0.7019410287263873060581,\ +0.6105122611902852325372,-0.8280825291376695540535,-0.2271580885894484980181,\ +-0.0995012215536074662303,-2.6596162554083884188572,-0.9212932842045244985485,\ +-0.6502044836894653734305,0.6158791818865629874580,-0.2693325220287110521866,\ +-0.5507689268125864900938,-0.6719415444836209783119,-0.9911235054617995032800,\ +-0.4076140317144636981972,-0.0225238830066269123120,-1.8597701914697917224828,\ +0.7233360518064337885136,1.0977027535066357089022,-0.1558800560054872108573,\ +1.0623189198966227486665,-0.8575163748144335462698,-0.463854325361329367094,\ +0.7064828873383774965333,0.2713587745389601235679,-0.3287316374977890531817,\ +-1.6421667900158274377986,-0.8609439745036365776443,0.0106829139117793642938,\ +1.092393189014539744974,1.9620237692362385573119,0.8200147353723576948425,\ +0.0691827011392311119753,-0.6229915735462322468052,-0.2657062181808059753152,\ +0.8160024961656430209089,-0.4894047987117864928486,0.8587006143920951073412,\ +1.1051698569402153005115,-0.2701243583599451381083,-1.1113900272171266525589,\ +0.2908920738530955119039,0.1172101729688146409813,3.2706795664298211612220,\ +0.4518615589828762768576,0.7020915980292293800957,-0.8787256719819279693340,\ +-0.9538277279422371357498,-0.7330177387440419689568,-0.0441506837064596646680,\ +-0.8308242272476199508091,0.2915116980546684222197,0.2550214973106580407247,\ +0.1576133484131722883870,-2.8460534045826286764225,-0.768075815339287371053,\ +-0.4181165627609883528315,-0.5448685867460187903788,0.3158443034854154785052,\ +0.0051109317177532613205,0.3613121056785816853640,0.5080216801947243787652,\ +-0.5233928099098102970643,-0.5953313420807592182271,0.5535880446904775098460,\ +1.842839548963430384987,-0.6411995769353845409100,-0.2922619465382557679689,\ +0.1441406428551997020993,1.6252679142635939602002} + + +void datanhsTest() { + double in[]= SOURCE; + double res[]= RESULT; + double out; + int i=0; + + for (i=0;i<200;i++){ + out=datanhs(in[i]); + if (disnans(out)) assert(1); + else { + assert( ( (fabs(out-res[i])) / (fabs(out)) ) <3e-15); + } + } +} + +void zatanhsTest() { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zatanhs(in); + assert( ( (fabs(zreals(out)-resR[i])) / (fabs(zreals(out))) ) <3e-15); + assert( ( (fabs(zimags(out)-resI[i])) / (fabs(zimags(out))) ) <3e-15); + } + out=zatanhs((DoubleComplex(2.0/10.0,11.0/10.0))); + assert( ( (fabs(zreals(out)-0.0898435002269743487879)) / (fabs(zreals(out))) ) <3e-15); + assert( ( (fabs(zimags(out)-0.8419736541926906570055)) / (fabs(zimags(out))) ) <1e-15); + +} + +void datanhaTest(void) { + double in[]= SOURCE; + double res[]=RESULT; + double out[200]; + int i=0; + + datanha(in,200,out); + for (i=0;i<200;i++){ + if (disnans(out[i])) assert(1); + else assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <3e-15); + } +} + +void zatanhaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zatanha(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(zreals(out[i])-resR[i])) / (fabs(zreals(out[i]))) ) <3e-15); + assert( ( (fabs(zimags(out[i])-resI[i])) / (fabs(zimags(out[i]))) ) <3e-15); + } +} + + + +int testAtanh() { + printf("\n>>>> Double Hyperbolic Arctangeant Tests\n"); + datanhsTest(); + zatanhsTest(); + datanhaTest(); + zatanhaTest(); + return 0; +} + +int main() { + assert(testAtanh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/testFloatAtanh.c b/2.3-1/src/c/elementaryFunctions/atanh/testFloatAtanh.c new file mode 100644 index 00000000..3addb959 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/testFloatAtanh.c @@ -0,0 +1,600 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testAtanh.h" +#include "isnan.h" + + +#define SOURCE {-1.1105866164187250255679f,-1.0028386111936116176224f,0.2375765916352992890292f,\ +-1.9260782734203465427214f,1.6339029335662884623304f,0.4006142544568777608127f,\ +-0.1884054141613809019162f,0.3250370808239260722594f,0.4942341130822986983162f,\ +-0.5271214361991748420522f,-0.2047974713791562706433f,-0.6989092545405519718571f,\ +-0.7715561486980614391840f,-0.571989225566208348006f,-0.5020150984917894909643f,\ +-2.2857334641783242368263f,2.332010485133160226923f,1.3889136138977253853710f,\ +1.3789467621494246873937f,0.1097978131481585906126f,-0.0647218447158609960779f,\ +0.0281807372021152316433f,0.1350188864488831574917f,1.0304207301469319180143f,\ +1.2534650597477734468299f,-0.6673847151191693027883f,0.7687329161404042876526f,\ +0.9397659613234893294376f,-0.1842256540708016310237f,-0.6380964000421092130466f,\ +-0.4312384814994691395462f,0.2955203345655439961526f,-0.9485014036835781592316f,\ +-0.7318488744075331009498f,1.0038104194654713374746f,-1.1353561092070965088396f,\ +-1.0960321876977914268281f,-0.0171134176442899188508f,-0.5858103496627128370378f,\ +0.1289555865425900393895f,1.5820296359767425098397f,-1.4631497998103890623156f,\ +1.2963845181574007447978f,-0.3801415377268548834166f,2.06830447887869084411f,\ +-0.5625246161593648874799f,0.5326361661049561213588f,-1.2444472935191353002438f,\ +1.98041335297601972520f,-1.1243976757801756871658f,-0.2002672475586080858001f,\ +-0.8369527550627472445299f,-0.5501861155367867572963f,-0.4142018271607930679501f,\ +0.0805610771656549429220f,1.1377543872793591805959f,0.0358630657002049213489f,\ +-0.7784293535508046701921f,0.1468114639619267913773f,0.8017875463824070125796f,\ +0.9541283226908341408290f,0.2570812112878080313294f,0.5669583797452802942374f,\ +-0.5124357940757415796895f,-1.0874670623228419596984f,0.1679748561443953069894f,\ +1.0653376770396050243761f,1.4418584607257751706300f,0.4931419934636970814346f,\ +0.8961862868877283894165f,1.9862847823434610639026f,-0.1823693074986679762972f,\ +-1.4947586037652456081304f,0.2872503175279246256935f,0.0312925927822978733328f,\ +0.6112211190486463996407f,-0.7772375221664085120921f,1.1093137211625221372202f,\ +0.0442238350338455751820f,1.6762117307909378816078f,-0.6876351157010545112058f,\ +-1.22967891951066876643f,-0.1299578267276684795384f,1.6975824415216096419101f,\ +1.308926550069704708434f,-1.098941911191897657929f,0.8471934585094353931112f,\ +-0.4433269337102597185130f,-0.7837315591442685080992f,0.9116218827858540985076f,\ +-1.0105858633572861737804f,0.4876488481804939212338f,0.0655402107055627763943f,\ +-0.2953709263667435580558f,0.6148227532021686148056f,-0.4034374023520052587877f,\ +0.5833631341612930398810f,-0.5528588193199002187583f,-0.2778100246524093375200f,\ +2.382193101614083818873f,-0.5178234271111435971235f,-0.6905004153871671102038f,\ +1.1100538942612350190586f,0.4362472672541874985086f,1.6185312525007526929244f,\ +-0.2435431173062182208522f,1.3489566990051822248375f,0.7594498437474611618470f,\ +-0.2810994191894010674204f,0.0572337467470783664569f,-0.2986850540752242211262f,\ +0.3080328437634018978741f,-1.063898707867213300204f,-0.4732241206771939379117f,\ +0.4359979545522715271844f,-1.1975945596394972358922f,-2.0463590761656762495591f,\ +-1.6981361097863292286547f,-0.3298420709745075729558f,0.6443404115154376388119f,\ +1.1582132747946760620295f,-0.1360263343598554774960f,1.1191856336437415730956f,\ +-0.3857336264473540388131f,-0.9009857125105711350699f,-0.6654259233895634118028f,\ +0.8142113557520732625150f,-0.7421459588282103281287f,-0.7442082361451903826932f,\ +-0.7150337980929084569226f,0.9101123379002086233314f,1.6512593716591941195304f,\ +0.5444875921569681809231f,-1.4717893200735545633506f,-0.2233299046672752585785f,\ +-0.0991741463892287511417f,-0.9902546973703609811679f,-1.376446086882661790085f,\ +-1.7488399727971684072259f,1.8239775508132596293365f,-0.2630036367047015599674f,\ +-0.5010962842642737724574f,-0.5862555775092695986572f,-1.3195380346103915414346f,\ +-0.3864449051827200110054f,-0.0225200748008141174439f,-0.9526576040369814091235f,\ +1.6155833271255157779223f,1.2505121957121025921822f,-0.1546296525315759562424f,\ +0.7865497689541539605429f,-0.6949758322935190024694f,-0.4332203785337710999492f,\ +0.6084666055394067907258f,0.2648887243137521552150f,-0.3173806367287662633103f,\ +-0.9277748648924035723695f,-0.6967437125955047161341f,0.0106825075357279020843f,\ +0.7977499585474604471003f,0.9612439572909651230859f,0.6750778949370804804531f,\ +0.0690725368983376858401f,-1.8076399886892613455558f,-0.2596249600654364497743f,\ +0.6728882350569161951981f,-0.4537439012069451327314f,0.695587590556807633391f,\ +1.2463414096089968641223f,-0.2637405473740589423315f,-0.8045531944567444471161f,\ +0.2829556705817293793537f,0.1166763530431780965246f,1.0028892209395869894450f,\ +0.4234280063942446603598f,0.6056937191431178701961f,-1.4168714241399820163991f,\ +-0.7415110426654055730822f,-1.6002352979874459038001f,-0.0441220186662526561716f,\ +-0.6809183287313597121582f,0.2835255852521558761481f,0.2496331067144885174081f,\ +0.1563210463282909690186f,-1.006767784835231216434f,-0.6458091780006059989816f,\ +-2.529451976430145521135f,-0.4966644528621277365765f,0.3057445000796202294602f,\ +0.0051108872162743653259f,0.3463692486733729314352f,0.4684023556979828861735f,\ +-2.0819698824296395400779f,-1.8736446723365958177965f,0.5032045449115828406050f,\ +1.0514506638411960093293f,-0.5657157774822674234372f,-0.2842153768346438180714f,\ +0.1431506224954579853392f,1.0806316268163596028273f} + +#define RESULT {-1.4744610660983759053977f,-3.2795029213225106445861f,0.2422041646840577544531f,\ +-0.5752297863073998485106f,0.7121630945985538696519f,0.4243803995861772371256f,\ +-0.1906833812311178877330f,0.3372689843733094883227f,0.5416475837340712917722f,\ +-0.5861506043378337249550f,-0.2077349615310257191503f,-0.8651650049502660477785f,\ +-1.0241615832881652004005f,-0.6504743749122398055462f,-0.5519965631116492410513f,\ +-0.4691302795139216663678f,0.4584432136447526562328f,0.9076183700076346783092f,\ +0.9185087029260963209509f,0.1102422571172131521289f,-0.0648124440153749203919f,\ +0.0281882007066550886731f,0.1358484485857832935185f,2.1004370090239423696232f,\ +1.0924991774831627200371f,-0.8060125587957032156083f,1.0172227264061333151801f,\ +1.736042493622687921118f,-0.1863533018119427342452f,-0.7549561185313359290561f,\ +-0.4614170985204111286038f,0.3046041145449288611857f,-1.8166306469319770666715f,\ +-0.9326970536559181512715f,3.1325332888309622703105f,-1.3792397781139973389486f,\ +-1.5415589891296013203004f,-0.0171150886014554831638f,-0.6712634278717346525411f,\ +0.1296776288627018158817f,0.7449048409492748934468f,-0.8355728364335629487769f,\ +1.0237167786809893144095f,-0.4002250855702985665729f,0.5275261647661907415952f,\ +-0.6365188485604326151801f,0.593818237113303393215f,-1.1086074290970830968917f,\ +0.5559215037224033428842f,-1.4188800488983950298660f,-0.2030109524350925953584f,\ +-1.2109116806527058241016f,-0.618648185057067423465f,-0.4406726279385401179312f,\ +0.0807360417981298622569f,1.3710194541092590725384f,0.0358784527834248925804f,\ +-1.041372191940861169357f,0.1478800901804916689830f,1.1035975394582797637355f,\ +1.8759258138597765253053f,0.2629805384285096581110f,0.6430289187352878910175f,\ +-0.5660273762902281458054f,-1.5862221930864266461469f,0.1695819872689824647782f,\ +1.7267400811821158601589f,0.8547625432037965209631f,0.5402035003963170378682f,\ +1.4525009288261496731565f,0.5539201036322172200244f,-0.1844324167806210001963f,\ +-0.8089386385243267918455f,0.2955667016509896383170f,0.0313028129649670083801f,\ +0.7108684384800065814147f,-1.0383547009634652713572f,1.4799479994581337116699f,\ +0.0442526991314810200229f,0.6878256510027744852209f,-0.8434557413354200061661f,\ +-1.1364652701643074284021f,-0.1306969520152806707447f,0.6762452782098172798797f,\ +1.005717225984443130571f,-1.5273278613167085016045f,1.2461250150575873263392f,\ +-0.4763639926970618110325f,-1.0549712063383256399618f,1.5370414589157994633695f,\ +-2.6233309837037732670240f,0.5329709825316656379712f,0.0656342963912304455665f,\ +-0.3044404175419783142864f,0.7166384348283165728333f,-0.4277478080499193535680f,\ +0.6675457063378462674308f,-0.6224892627320329774321f,-0.2853073726746037097612f,\ +0.4474264519637772830052f,-0.5733611255013777441292f,-0.8489115589330021860448f,\ +1.4767492874056193929988f,0.4675865941091252309114f,0.7215105644264150352996f,\ +-0.2485372004835029458025f,0.9533893539015392271097f,0.9949139163386880868600f,\ +-0.2888754177942080558772f,0.0572963634231402757502f,-0.3080752338091528041986f,\ +0.3183705746036424866219f,-1.7375264548714035583998f,-0.5142166878802835183748f,\ +0.4672787235144033601841f,-1.2044507032201230423141f,-0.5343152701155061690130f,\ +-0.6759512002250491757849f,-0.3426510354825004212032f,0.7655602779397917556636f,\ +1.3065460037453791031226f,-0.1368747459554155443406f,1.4390524672743967293798f,\ +-0.4067781526762131449892f,-1.4774318344439005823432f,-0.8024889348769219665769f,\ +1.1393982155849557980076f,-0.9552396245178285116850f,-0.9598461538853348962164f,\ +-0.8974087416560057040016f,1.5281783215878395054688f,0.7019410287263873060581f,\ +0.6105122611902852325372f,-0.8280825291376695540535f,-0.2271580885894484980181f,\ +-0.0995012215536074662303f,-2.6596162554083884188572f,-0.9212932842045244985485f,\ +-0.6502044836894653734305f,0.6158791818865629874580f,-0.2693325220287110521866f,\ +-0.5507689268125864900938f,-0.6719415444836209783119f,-0.9911235054617995032800f,\ +-0.4076140317144636981972f,-0.0225238830066269123120f,-1.8597701914697917224828f,\ +0.7233360518064337885136f,1.0977027535066357089022f,-0.1558800560054872108573f,\ +1.0623189198966227486665f,-0.8575163748144335462698f,-0.463854325361329367094f,\ +0.7064828873383774965333f,0.2713587745389601235679f,-0.3287316374977890531817f,\ +-1.6421667900158274377986f,-0.8609439745036365776443f,0.0106829139117793642938f,\ +1.092393189014539744974f,1.9620237692362385573119f,0.8200147353723576948425f,\ +0.0691827011392311119753f,-0.6229915735462322468052f,-0.2657062181808059753152f,\ +0.8160024961656430209089f,-0.4894047987117864928486f,0.8587006143920951073412f,\ +1.1051698569402153005115f,-0.2701243583599451381083f,-1.1113900272171266525589f,\ +0.2908920738530955119039f,0.1172101729688146409813f,3.2706795664298211612220f,\ +0.4518615589828762768576f,0.7020915980292293800957f,-0.8787256719819279693340f,\ +-0.9538277279422371357498f,-0.7330177387440419689568f,-0.0441506837064596646680f,\ +-0.8308242272476199508091f,0.2915116980546684222197f,0.2550214973106580407247f,\ +0.1576133484131722883870f,-2.8460534045826286764225f,-0.768075815339287371053f,\ +-0.4181165627609883528315f,-0.5448685867460187903788f,0.3158443034854154785052f,\ +0.0051109317177532613205f,0.3613121056785816853640f,0.5080216801947243787652f,\ +-0.5233928099098102970643f,-0.5953313420807592182271f,0.5535880446904775098460f,\ +1.842839548963430384987f,-0.6411995769353845409100f,-0.2922619465382557679689f,\ +0.1441406428551997020993f,1.6252679142635939602002f} +/* +#define RESULT2 {-1.4744610660983759053977+%i*1.5707963267948965579990f,\ +-3.2795029213225106445861+%i*1.5707963267948965579990f,0.2422041646840577544531f,\ +-0.5752297863073998485106+%i*1.5707963267948965579990f,\ +0.7121630945985538696519-%i*1.5707963267948965579990f,0.4243803995861772371256f,\ +-0.1906833812311178877330f,0.3372689843733094883227f,0.5416475837340712917722f,\ +-0.5861506043378337249550f,-0.2077349615310257191503f,-0.8651650049502660477785f,\ +-1.0241615832881652004005f,-0.6504743749122398055462f,-0.5519965631116492410513f,\ +-0.4691302795139216663678+%i*1.5707963267948965579990f,\ +0.4584432136447526562328-%i*1.5707963267948965579990f,\ +0.9076183700076346783092-%i*1.5707963267948965579990f,\ +0.9185087029260963209509-%i*1.5707963267948965579990f,0.1102422571172131521289f,\ +-0.0648124440153749203919f,0.0281882007066550886731f,0.1358484485857832935185f,\ +2.1004370090239423696232-%i*1.5707963267948965579990f,\ +1.0924991774831627200371-%i*1.5707963267948965579990f,-0.8060125587957032156083f,\ +1.0172227264061333151801f,1.736042493622687921118f,-0.1863533018119427342452f,\ +-0.7549561185313359290561f,-0.4614170985204111286038f,0.3046041145449288611857f,\ +-1.8166306469319770666715f,-0.9326970536559181512715f,\ +3.1325332888309622703105-%i*1.5707963267948965579990f,\ +-1.3792397781139973389486+%i*1.5707963267948965579990f,\ +-1.5415589891296013203004+%i*1.5707963267948965579990f,-0.0171150886014554831638f,\ +-0.6712634278717346525411f,0.1296776288627018158817f,\ +0.7449048409492748934468-%i*1.5707963267948965579990f,\ +-0.8355728364335629487769+%i*1.5707963267948965579990f,\ +1.0237167786809893144095-%i*1.5707963267948965579990f,-0.4002250855702985665729f,\ +0.5275261647661907415952-%i*1.5707963267948965579990f,-0.6365188485604326151801f,\ +0.593818237113303393215f,-1.1086074290970830968917+%i*1.5707963267948965579990f,\ +0.5559215037224033428842-%i*1.5707963267948965579990f,\ +-1.4188800488983950298660+%i*1.5707963267948965579990f,-0.2030109524350925953584f,\ +-1.2109116806527058241016f,-0.618648185057067423465f,-0.4406726279385401179312f,\ +0.0807360417981298622569f,1.3710194541092590725384-%i*1.5707963267948965579990f,\ +0.0358784527834248925804f,-1.041372191940861169357f,0.1478800901804916689830f,\ +1.1035975394582797637355f,1.8759258138597765253053f,0.2629805384285096581110f,\ +0.6430289187352878910175f,-0.5660273762902281458054f,\ +-1.5862221930864266461469+%i*1.5707963267948965579990f,0.1695819872689824647782f,\ +1.7267400811821158601589-%i*1.5707963267948965579990f,\ +0.8547625432037965209631-%i*1.5707963267948965579990f,0.5402035003963170378682f,\ +1.4525009288261496731565f,0.5539201036322172200244-%i*1.5707963267948965579990f,\ +-0.1844324167806210001963f,-0.8089386385243267918455+%i*1.5707963267948965579990f,\ +0.2955667016509896383170f,0.0313028129649670083801f,0.7108684384800065814147f,\ +-1.0383547009634652713572f,1.4799479994581337116699-%i*1.5707963267948965579990f,\ +0.0442526991314810200229f,0.6878256510027744852209-%i*1.5707963267948965579990f,\ +-0.8434557413354200061661f,-1.1364652701643074284021+%i*1.5707963267948965579990f,\ +-0.1306969520152806707447f,0.6762452782098172798797-%i*1.5707963267948965579990f,\ +1.005717225984443130571-%i*1.5707963267948965579990f,\ +-1.5273278613167085016045+%i*1.5707963267948965579990f,1.2461250150575873263392f,\ +-0.4763639926970618110325f,-1.0549712063383256399618f,1.5370414589157994633695f,\ +-2.6233309837037732670240+%i*1.5707963267948965579990f,0.5329709825316656379712f,\ +0.0656342963912304455665f,-0.3044404175419783142864f,0.7166384348283165728333f,\ +-0.4277478080499193535680f,0.6675457063378462674308f,-0.6224892627320329774321f,\ +-0.2853073726746037097612f,0.4474264519637772830052-%i*1.5707963267948965579990f,\ +-0.5733611255013777441292f,-0.8489115589330021860448f,\ +1.4767492874056193929988-%i*1.5707963267948965579990f,0.4675865941091252309114f,\ +0.7215105644264150352996-%i*1.5707963267948965579990f,-0.2485372004835029458025f,\ +0.9533893539015392271097-%i*1.5707963267948965579990f,0.9949139163386880868600f,\ +-0.2888754177942080558772f,0.0572963634231402757502f,-0.3080752338091528041986f,\ +0.3183705746036424866219f,-1.7375264548714035583998+%i*1.5707963267948965579990f,\ +-0.5142166878802835183748f,0.4672787235144033601841f,\ +-1.2044507032201230423141+%i*1.5707963267948965579990f,\ +-0.5343152701155061690130+%i*1.5707963267948965579990f,\ +-0.6759512002250491757849+%i*1.5707963267948965579990f,-0.3426510354825004212032f,\ +0.7655602779397917556636f,1.3065460037453791031226-%i*1.5707963267948965579990f,\ +-0.1368747459554155443406f,1.4390524672743967293798-%i*1.5707963267948965579990f,\ +-0.4067781526762131449892f,-1.4774318344439005823432f,-0.8024889348769219665769f,\ +1.1393982155849557980076f,-0.9552396245178285116850f,-0.9598461538853348962164f,\ +-0.8974087416560057040016f,1.5281783215878395054688f,\ +0.7019410287263873060581-%i*1.5707963267948965579990f,0.6105122611902852325372f,\ +-0.8280825291376695540535+%i*1.5707963267948965579990f,-0.2271580885894484980181f,\ +-0.0995012215536074662303f,-2.6596162554083884188572f,\ +-0.9212932842045244985485+%i*1.5707963267948965579990f,\ +-0.6502044836894653734305+%i*1.5707963267948965579990f,\ +0.6158791818865629874580-%i*1.5707963267948965579990f,-0.2693325220287110521866f,\ +-0.5507689268125864900938f,-0.6719415444836209783119f,\ +-0.9911235054617995032800+%i*1.5707963267948965579990f,-0.4076140317144636981972f,\ +-0.0225238830066269123120f,-1.8597701914697917224828f,\ +0.7233360518064337885136-%i*1.5707963267948965579990f,\ +1.0977027535066357089022-%i*1.5707963267948965579990f,-0.1558800560054872108573f,\ +1.0623189198966227486665f,-0.8575163748144335462698f,-0.463854325361329367094f,\ +0.7064828873383774965333f,0.2713587745389601235679f,-0.3287316374977890531817f,\ +-1.6421667900158274377986f,-0.8609439745036365776443f,0.0106829139117793642938f,\ +1.092393189014539744974f,1.9620237692362385573119f,0.8200147353723576948425f,\ +0.0691827011392311119753f,-0.6229915735462322468052+%i*1.5707963267948965579990f,\ +-0.2657062181808059753152f,0.8160024961656430209089f,-0.4894047987117864928486f,\ +0.8587006143920951073412f,1.1051698569402153005115-%i*1.5707963267948965579990f,\ +-0.2701243583599451381083f,-1.1113900272171266525589f,0.2908920738530955119039f,\ +0.1172101729688146409813f,3.2706795664298211612220-%i*1.5707963267948965579990f,\ +0.4518615589828762768576f,0.7020915980292293800957f,\ +-0.8787256719819279693340+%i*1.5707963267948965579990f,-0.9538277279422371357498f,\ +-0.7330177387440419689568+%i*1.5707963267948965579990f,-0.0441506837064596646680f,\ +-0.8308242272476199508091f,0.2915116980546684222197f,0.2550214973106580407247f,\ +0.1576133484131722883870f,-2.8460534045826286764225+%i*1.5707963267948965579990f,\ +-0.768075815339287371053f,-0.4181165627609883528315+%i*1.5707963267948965579990f,\ +-0.5448685867460187903788f,0.3158443034854154785052f,0.0051109317177532613205f,\ +0.3613121056785816853640f,0.5080216801947243787652f,\ +-0.5233928099098102970643+%i*1.5707963267948965579990f,\ +-0.5953313420807592182271+%i*1.5707963267948965579990f,0.5535880446904775098460f,\ +1.842839548963430384987-%i*1.5707963267948965579990f,-0.6411995769353845409100f,\ +-0.2922619465382557679689f,0.1441406428551997020993f,\ +1.6252679142635939602002-%i*1.5707963267948965579990f} +*/ +#define CSOURCER {0.1566312085376346807664f,-0.9832172164912469369824f,-0.4352704306190940952703f,\ +0.5411529581857100756892f,-0.4189678441885264503775f,-0.3123240835354778588417f,\ +-0.6429953452754243459211f,0.5746034575341304462270f,0.0583200256392587754184f,\ +-0.7281504683187327575666f,0.4564682359303286474095f,1.2276307555220513645367f,\ +1.0722151830463704236251f,-0.8694353593641974686790f,0.4560977429718384712487f,\ +0.922397585949679688078f,0.3447492619094876808994f,-1.2072516069836567442763f,\ +-3.0311848873460989217676f,-0.5227521113472203273531f,-0.9127256852426085531604f,\ +0.9702908997340189412029f,0.7984557906741573951592f,-0.374280495762714437991f,\ +0.2178224309624917087724f,-0.7621335705740988064605f,0.4017588191443041689688f,\ +0.0259981222714757570502f,-2.250132425948803138738f,0.5878367273362664624514f,\ +2.3809410297786541832465f,0.1486053165381447105364f,0.101236219868174881498f,\ +0.6421364318076420163450f,-0.6540329098904471560871f,-0.5416580949191436289425f,\ +0.9514918150544823260972f,-1.267340977798151469003f,-0.8455403103569121281424f,\ +-0.364558782701674466420f,-1.0697180418170626481356f,0.1606013529586497734503f,\ +-1.6656989490484364058176f,0.4667927145215887141383f,-0.0128825329067423742513f,\ +0.9947195275346620846335f,0.8275102004468978256213f,0.2927543106645062453985f,\ +-0.9280170868066852651879f,-0.3636959897126564866809f,1.4783506936052415170479f,\ +2.4281448731590140610592f,-0.0602106018714212570808f,1.541843889601811401491f,\ +1.341076792855444343999f,-1.9789304036759756133534f,-0.3294688652910273685137f,\ +0.622286327382227888450f,-0.6118557906779339417014f,0.7459354816620213934897f,\ +-0.4040802511755230974622f,0.6577039363065745325443f,-0.5486081684530353941298f,\ +0.3927975474240214537325f,0.7894975295935096060163f,-0.1452945797743281086678f,\ +0.1437495883505973681693f,0.4103084241265512188690f,0.1795141291570316322002f,\ +-2.0420270362087347137958f,-1.0136631446624102537157f,-0.6372521675576777733241f,\ +-0.2601528835939894701568f,1.1986221523039410907785f,1.601129898882974078589f,\ +-1.2343266797475058726974f,0.9483471983582205666607f,-0.0424058145973261885198f,\ +0.5150673339403005757120f,0.0937153808744289607002f,0.4638195050716256706558f,\ +0.2202932903531656105844f,-0.6924450714085558233890f,-0.6889026252552187257194f,\ +0.4927201161848878685490f,0.3688430529148965519859f,-0.1495056200185169992256f,\ +0.0956460878099940903230f,0.8967077311519383586713f,0.7486850824131056070243f,\ +-0.3635393959060023716390f,2.72178097931810514254f,0.8872833757746945160250f,\ +0.9893578306194498184212f,0.8262130885403843327808f,1.8679166202704664545564f,\ +0.5569566531470352410693f,-0.0576405625178402075681f,0.8001172842696224751791f,\ +0.4480121632350138050072f,-0.2882322764074837784243f,-0.2677211241656151097246f,\ +0.2862315832454170316801f,0.9463381000719524038800f,-1.574827516423719320215f,\ +1.7962971923614798885893f,0.9930237578825827915452f,1.17225507537484907594f,\ +-0.9161863233099263315040f,0.1421586828731320473196f,-0.1430347256308386882928f,\ +-0.4683233849545334614994f,-0.3180446316984328336552f,-0.0576576190062656410151f,\ +0.6249620545306199259628f,0.7539731616235149092020f,-0.1134181356790778527621f,\ +-0.3551074647649283821949f,-1.5743164879335251882253f,-0.3132427332940839193043f,\ +-0.5345549536487770314608f,-0.3108292305558989498948f,-0.0698678127822071615149f,\ +1.9098270701284520978191f,0.3087451523556873911325f,0.792464324566980904407f,\ +-0.7089070907362685636244f,-1.69657580301203281259f,0.2839165766617411379436f,\ +-1.9503478026750964424707f,-0.8383432843348773699788f,0.4243701560501659808544f,\ +1.0206422864827822127864f,0.1651260412410127109695f,-2.4565661716609770159891f,\ +1.3581676364949575308572f,1.5976518292284813682613f,1.038096252933477403602f,\ +-0.2179395863297476365616f,0.1906211564102877620286f,0.1220518503007956001571f,\ +1.7007780598076820410824f,2.3461749520518053735429f,-0.7583114756702955538969f,\ +0.1563580374722161325796f,0.9458374821601646109670f,1.106385383701591562655f,\ +1.857413924600636034867f,0.9819266230329063427362f,0.1010843883126317094279f,\ +-0.0394749928167329941497f,0.9565452494078602319050f,-1.164240263162510835571f,\ +-0.0360262254241734622418f,-0.4279483181417821913151f,0.0207154879461370518279f,\ +0.1331812668838084079415f,0.0637098112636336894044f,0.5563753726211196903861f,\ +2.170691821782472885616f,-1.4105863647114469383581f,-0.3956456917805734052607f,\ +-0.7536155387925271842420f,-0.1512156734265959479036f,-1.0252674376565367175829f,\ +0.9250804906985814479725f,0.0319417929504777348138f,-0.3662171854280546479110f,\ +0.9733260674698945846828f,-0.2668109355235854240895f,0.9653716053391865337119f,\ +0.5007936673782547032374f,-0.1208939822530236685161f,1.0971085072938426829836f,\ +0.2029604338428208087919f,0.3746473304704570073120f,0.9561076870030955632274f,\ +1.1282520720814495085449f,1.5637873924930061342309f,0.4739411474762828535567f,\ +-0.9908999627117486275196f,0.4483771591380850130015f,0.7638174840760570960541f,\ +1.21967084705659489785f,-1.1141855892005874117956f,0.3637931277318062761594f,\ +0.0172116174170295101187f,-0.5359859794230503737822f,1.7180258735531828140353f,\ +-0.4389711879238100133982f,-0.5289769194381308548003f,-0.2349363816328474963147f,\ +-1.770826942434098993928f,-0.2698746134406798669048f,-1.6219764795098883247704f,\ +-0.4683402918639187895167f,0.4233140865550635290049f,0.5072350201185169549234f,\ +1.846909249365268790299f,0.8538988411566506009365f} + +#define CSOURCEI {-1.2880264074010461250452f,-0.9681461673606511775247f,0.8819263929226937026584f,\ +-0.2968181427237222558269f,0.3676169132810200301797f,-1.4546278949302484662098f,\ +-0.4969724671301882223950f,-1.3684785326259825133377f,0.3201951876584711031981f,\ +0.0925515282972030062236f,-1.3629699188377910612502f,1.3008264376880041002238f,\ +-1.312881117519760332257f,0.7519787618494813141723f,-0.349314202941638340949f,\ +-0.6612113457421112672208f,-0.1912192548186895935114f,-0.2871763408135362682927f,\ +2.1040662039819300055399f,0.6770601919983177952034f,-0.9998765495359557275989f,\ +1.0320694267454630921321f,0.5184250597548623051836f,0.3020078279774962016f,\ +-0.2426203970909892593255f,1.085343122387009806573f,0.3728224888143483184422f,\ +0.3597109342835585477083f,-0.5464095547489105086925f,-0.0522892744113094345981f,\ +-0.0037796004128336437196f,1.3386616898503973516199f,-0.8603866811447716811401f,\ +-0.215138661778858181206f,-0.1519505658345833010170f,-0.0684049031594022166614f,\ +0.3134237083474871732314f,-0.2552970754123656815793f,1.0371924512876768975644f,\ +-2.4944520251764212837031f,-0.9105655292839007763916f,-0.5967335487543307115388f,\ +-0.6520109300715212219401f,1.891233309015407648701f,-0.7688305781614098721732f,\ +0.1640648747943601049037f,-0.613585069751534706306f,-0.2234197861121311190491f,\ +1.9233974415188206386063f,0.315204859780382373735f,0.4595542257467975510998f,\ +-1.1764564844019769207506f,-2.1928435621757311757563f,-0.3567337876240649907622f,\ +1.4844812942744205486179f,0.2127167501638982105572f,0.326665566953199926203f,\ +-0.3823116465408597508535f,1.1195697860125490841199f,0.3156195041989769412005f,\ +-1.3411228504687704443654f,1.2817926351994635147946f,-0.8385592799769060468051f,\ +0.2920629737538525949603f,0.4117329700106473477916f,0.8168979807640022183790f,\ +0.6114286447089312126479f,-0.9103003485572774833301f,0.0883797323534893930486f,\ +-0.8309636819350860736932f,0.300088746736916378577f,-0.9870316877320252091366f,\ +0.0574605523525985317779f,-0.0055294403676948468418f,-0.4910286442216560409690f,\ +-0.9282905300686704608282f,-0.9620222168730435674533f,1.5101979946106838248454f,\ +0.16215452036647093337f,0.8355679951054210130579f,0.2598273768449387843837f,\ +-0.8781794540671359339257f,-0.0960593767304002976726f,-0.8457942620552999501982f,\ +-1.5126206512504021262089f,0.0267016916333849170517f,-0.0455102979008666919114f,\ +-0.9512410833653791586428f,-0.1410038404270228529214f,0.8526701417894808621156f,\ +-0.5427383894147087550763f,0.3670995115141847953133f,-0.4196045805115825033660f,\ +-0.861511165291383607112f,-0.5242638386479363532544f,-1.0690056931583220567461f,\ +-1.204258995571379831091f,-0.1994216356488724417595f,-0.651264013076401249158f,\ +-1.2804046190990912013064f,-0.1189798590125256405603f,0.2757828726342566594276f,\ +0.1186787898486535430820f,-0.9717707229710241811915f,-0.2337132662497607982210f,\ +-1.2810105417899781965474f,0.4516508120864454189913f,-1.7941677742351858082515f,\ +1.2424962452829722003855f,-0.1452111265545129592525f,0.803374036348334819024f,\ +2.2359407014896999221776f,0.0801276770871145183062f,0.1489247936009177042394f,\ +0.3146211320275099643240f,-1.49119197842913098206f,-0.8212344459793755602206f,\ +-1.3094646972226284820096f,-0.2661055404338998897629f,0.2164009824597608044883f,\ +0.4021554472831923576770f,1.0836546525394512574536f,-0.8330897968467666503400f,\ +-1.2783354864784060023197f,1.0944391027576960695455f,0.5158321013729825210703f,\ +0.5039256424604841022585f,-1.1530018443600813515815f,0.5567649276400054025871f,\ +1.5507245891800580661624f,2.0511800424609365478545f,0.2003839203406024560561f,\ +-0.5188228347179002497569f,-0.5014579405716672599880f,0.2409475853154263991218f,\ +-1.2895515809257553918599f,1.3505164949531500706570f,-1.7662555890569775485233f,\ +0.0695313390316097817978f,0.4857809488385180229919f,-1.54949381746834280449f,\ +-0.5022279078645265348868f,-0.4715667339089154030951f,0.9071363416804920642988f,\ +-0.0090747242741150424550f,-1.426140714401586517823f,0.0902619806757116310836f,\ +-0.7111783918397256432087f,0.4421886947944868029303f,1.3229936148586256550175f,\ +0.0399972677459073389095f,-0.2744759605679197855821f,-0.6365722011642755973071f,\ +0.0838977431731276618310f,-0.0154779602574307128399f,1.3680369604712516728995f,\ +0.8578728691952266505183f,0.9477645632263477226687f,0.4034044727794333096149f,\ +-0.1637512612660888822180f,-1.521579761721328916124f,0.7389202762668894974851f,\ +1.6242287608009475796678f,0.0251523200085141500348f,-0.2296479198161843759962f,\ +0.3374847554612029343346f,1.0988696857027278053209f,0.6720077941707034430152f,\ +1.6284314621145825618953f,1.2811365743500131575416f,-0.6480287734962971724073f,\ +0.4079918994040774293808f,-0.6857363255654103095793f,0.1644734231427373016832f,\ +-0.9707468997532966437092f,-1.0103908741767126944211f,-0.3245462572729273520444f,\ +0.3569008288111439886059f,1.1707819570142721232742f,0.0931015649413182710958f,\ +1.2605162559518456877328f,-0.2998099303847839292025f,-1.8576048661033506270712f,\ +0.3542284165121863948045f,-0.3606813370588974332343f,-0.1691565053601437607078f,\ +-1.3723457158075849093848f,-0.3869812789951324605298f,1.327934065790971063237f,\ +0.6883264291332520379285f,1.1636463404567130019984f,-1.6679940626595868291560f,\ +-1.1660526540945894691248f,2.4012435579972462029730f,1.8717476066252398680945f,\ +0.6269431765551266577674f,-0.7276289505214773578601f,0.5485159953217271233683f,\ +-1.0371187436769986334184f,2.282202076649753941240f} + +#define CRESULTR {0.0586345786159515672264f,-0.4119079581767730036113f,-0.2376773392005311347219f,\ +0.5274985111723742292611f,-0.3785076402666358030835f,-0.0984442400006558665515f,\ +-0.5157322835496214175066f,0.1877549307968403857760f,0.0529309487949000886942f,\ +-0.8980782630098248509043f,0.1535280327645664466552f,0.3347825460369071581823f,\ +0.3118103625565722958335f,-0.4854100811784345381739f,0.4200271027799429846006f,\ +0.558160367722654870981f,0.3440445808210612077538f,-0.9190853850068781971672f,\ +-0.2206972238733744262618f,-0.3495146734241325048309f,-0.3828254526784128919381f,\ +0.3837160824181031770763f,0.6067122840309074893739f,-0.3528285483819846302112f,\ +0.2081338122939639656561f,-0.3109916924279712002743f,0.3607981848765179355709f,\ +0.0230220619188065515892f,-0.4409843876587154487545f,0.6706334235337022553480f,\ +0.4476928944367338791821f,0.0530051009287677843407f,0.0580922710665942171326f,\ +0.6889248635636368023327f,-0.7403179849986993854571f,-0.6014835481325517818618f,\ +0.9148458682398055152873f,-0.9100406392834269331260f,-0.3512629496668798201320f,\ +-0.0497281250251861567380f,-0.4533232590993708788218f,0.1183827451686376569517f,\ +-0.5400714293963024825729f,0.0986159601519734224651f,-0.0080964813496256192449f,\ +1.2504251172076377152109f,0.553383982176059552316f,0.2851532314993195926789f,\ +-0.1735373380028721046475f,-0.3392884681219434650501f,0.6674877635610125814480f,\ +0.3361668249120546292374f,-0.0103608516149833115860f,0.6876886023380593959686f,\ +0.2994018975364160506381f,-0.5461669463711513738957f,-0.3036470157958083837535f,\ +0.5659099835134179246054f,-0.2522688982901432619421f,0.73840604848731461463f,\ +-0.1399717847889199173750f,0.2285367773899925347703f,-0.3073816797691770186240f,\ +0.3738323046463303267473f,0.6895008314715558306318f,-0.0869179912549136179933f,\ +0.1045814791078650968226f,0.2183617419002600035238f,0.1799962512946713666384f,\ +-0.4306170362358095471400f,-0.956790010441086580251f,-0.2988659063401313820130f,\ +-0.26528818791890551587f,1.2018988344435987958292f,0.6134078020904577543959f,\ +-0.4635409097157874858119f,0.4066731412601408690577f,-0.0129216461290907521503f,\ +0.5459518490067882812156f,0.0551242941387568297085f,0.4571890743247491450951f,\ +0.1235106929418888221939f,-0.8301715333893021631084f,-0.3700021952100086553017f,\ +0.1433522018206848380739f,0.3867313699737674470569f,-0.1503114555841373045642f,\ +0.0501390172375495365986f,1.193524050554648274769f,0.3916234392819171183930f,\ +-0.2811037877759303138525f,0.3767282302151824247005f,0.7464338830239950484113f,\ +0.4613726054161970124845f,0.6177367275920276901147f,0.3993738908711506052640f,\ +0.2139276426895061200550f,-0.0554860078847602203322f,0.5165924809229520686671f,\ +0.1633124027176871273515f,-0.2918709165103665625907f,-0.2528080890770357247455f,\ +0.2897583915934112130941f,0.4021736360794072595581f,-0.713539018877845987454f,\ +0.3562716257530119112751f,0.7547097044407786725628f,0.2233423544188815612621f,\ +-0.3032157270895312062287f,0.1400739703409606129458f,-0.0867211925226533952848f,\ +-0.0758855325499612903828f,-0.3269646450472631915574f,-0.0564625318897502212478f,\ +0.6090972295195002939039f,0.2104281878811394279616f,-0.0676285383445118792878f,\ +-0.1277092508406163506862f,-0.7041149381903939463712f,-0.3071683332013411815709f,\ +-0.4736979352269045095980f,-0.1404550230528205378988f,-0.0412179517191962191403f,\ +0.3529283428251930310182f,0.1380434056063472858522f,0.6051661095195016715209f,\ +-0.5594498837332433360814f,-0.3889971602159096875084f,0.2168075281019664068971f,\ +-0.3028666557798217473518f,-0.1458483340857026078208f,0.4293137169051447488144f,\ +0.6953697523295457871839f,0.1321249855766219449826f,-0.4265596445818128912286f,\ +0.3486234081846604770938f,0.3421608935025099995642f,0.2115120471977689209364f,\ +-0.2203370156751261743633f,0.1545639581145290264441f,0.0357922784779254460341f,\ +0.5794250482661091883330f,0.4312552311016552564205f,-0.3727620017605887681178f,\ +0.1576377379130869393897f,0.2624856474568436071060f,1.3577286999442579329411f,\ +0.4860182340340697959569f,0.7617714539289787145648f,0.0366834217396586823035f,\ +-0.0394322693273299676453f,0.9807192175900326658322f,-0.6164954700307514467994f,\ +-0.0357893654572665059765f,-0.4572287236587250780495f,0.0072135289476597582586f,\ +0.0765359692550191955673f,0.0335408660165012612042f,0.4931690601828112585636f,\ +0.4939993220457917777466f,-0.296325232124018844715f,-0.2516901659302647753513f,\ +-0.1874945429943649932714f,-0.1522841974461120184703f,-1.0886404519839611992893f,\ +0.8661426586684568551533f,0.0144669239838038730245f,-0.2498600121525025030689f,\ +0.2258303913936256790418f,-0.0996627600161344717744f,0.5798388843647412915772f,\ +0.4402912178536843579302f,-0.0821496253311937152386f,1.1995498265712831731378f,\ +0.1037875988793510867447f,0.1808411497687466285011f,0.9003994950861190504909f,\ +0.8693703906397208802659f,0.3871229651004495231348f,0.5084262016718109622460f,\ +-0.3127921352240150554280f,0.4284515458646944163768f,0.1566612259199449408431f,\ +0.8425254932446538669311f,-0.8675086878856705929763f,0.3679908151081396905369f,\ +0.0059690185652748976169f,-0.4818927853047598741654f,0.3475368987720111602080f,\ +-0.2928677403656957944911f,-0.21281918945471237081f,-0.0615315656203920743894f,\ +-0.3828854358877186170318f,-0.0395445045895176927608f,-0.2453056840726963727661f,\ +-0.3319274210060903507191f,0.2716611153754885932265f,0.3885772436850290501020f,\ +0.4083161225294907326067f,0.1256636073410991871757f} + +#define CRESULTI {-0.9150826723701824816359f,-1.0038007968241344780580f,0.7761168535216221853190f,\ +-0.3822213477951738047622f,0.4088073079437265500147f,-0.9829838814461281382151f,\ +-0.6207924428978939257462f,-0.9924436424002488488227f,0.3107781745847606469368f,\ +0.190823563908477877860f,-0.9717930993017909191423f,1.1362832817249874928223f,\ +-1.0952400709881249252220f,0.8906629459042527674484f,-0.4031733379746096357366f,\ +-0.8926214809458651311402f,-0.2125955165236021182640f,-1.1626545105534673574255f,\ +1.4098114180999468114663f,0.6875898477221956683891f,-0.9827065462915589577619f,\ +1.0122682558571856059615f,0.7403338169936454216113f,0.3329978318477040399870f,\ +-0.2487126175192662380642f,0.9535461622187894059621f,0.4086259224331897366156f,\ +0.3454903551399998162807f,-1.4480476267508943788442f,-0.0795552773231696652712f,\ +-1.5699867995861691571946f,0.9329922799220887741356f,-0.7134073946597112581003f,\ +-0.3357762973784728099957f,-0.2527252112264842809353f,-0.0962463379406888058787f,\ +0.7882465889811950399135f,-1.2456800812145352175264f,0.9674854545265952898703f,\ +-1.1957951138140576752278f,-1.0308375326751320066876f,-0.5464592420922904647540f,\ +-1.3032325007401501792970f,1.1035601617683621356036f,-0.6554945586705149818130f,\ +0.8103435172856551238496f,-0.8103372317467707475203f,-0.2385573277010208381732f,\ +1.1587938021757215878438f,0.3435431890072572769235f,1.279788873802896409515f,\ +-1.3915550484745486947702f,-1.143175630086853633571f,-1.3493948361964505089361f,\ +1.180878018812092644652f,1.4994549779312595916281f,0.3471363780379303487500f,\ +-0.5114436565324694816681f,0.922077454999635448551f,0.5359370502466848096290f,\ +-0.9575622722618749582679f,0.9840232928412098178939f,-0.7866361736794498238368f,\ +0.3275153905103054818859f,0.6621644080795368036974f,0.6911787537867797315272f,\ +0.5555203262090003812901f,-0.7845741854114917090968f,0.0910458923193785268912f,\ +-1.367532424689007264362f,0.8821163892946874973688f,-0.8805618815721650838313f,\ +0.0615381817744835926676f,-1.5581379012861951149915f,-1.3216226160366340014463f,\ +-1.1059140418930615279436f,-0.9879008462145800750775f,0.986169123983388073995f,\ +0.2146596902165759102044f,0.6986026791593697993221f,0.3134566221055383739014f,\ +-0.7342575229927524871343f,-0.1797145584041555665955f,-0.8413107892059722425770f,\ +-1.019619130948550722593f,0.0308925093685123823561f,-0.0465149720271331584831f,\ +-0.7628135267341744629732f,-0.5063811875785856342347f,0.8689285269800102184945f,\ +-0.5424489267017504889878f,1.5149231207825908374076f,-0.7635699257253423244407f,\ +-0.9835608360649982229162f,-0.7651335213236122312352f,-1.3047698554262849857110f,\ +-0.9383103802342007693227f,-0.1974540431056293898759f,-0.8100733516290339331078f,\ +-0.9439058311312691351702f,-0.1288637100697393178539f,0.2871927052822376702501f,\ +0.1283857487876574610119f,-0.9893521517129132414325f,-1.4229736910621084700068f,\ +-1.278268082403663186142f,0.88910168768678732309f,-1.1784373117164359534570f,\ +1.03935358865908744619f,-0.1470722349218777647017f,0.6828818013490814964328f,\ +1.1635383473949738597497f,0.0888393991592487247688f,0.1483135488190464867930f,\ +0.4446342289575472839225f,-1.055940453660143329984f,-0.6913288042725108661912f,\ +-0.9407243087808065951094f,-1.4053508981321376491991f,0.2342864098211708545616f,\ +0.4844410101414913238926f,0.8475776035888460402390f,-0.6960123633858344982528f,\ +-1.3016421578221382127083f,0.8519589639880413844963f,0.7342440505866469901974f,\ +0.6668635124458689444893f,-1.2591545397069716649696f,0.535024814500131951078f,\ +1.30226369708141054282f,1.1661057476987222170095f,0.2373787574293542146364f,\ +-0.9309471081116736934646f,-0.4736579850459717855315f,1.5236251088004300058287f,\ +-1.171065543003733777638f,1.2334327135159162125433f,-1.153213069447322158823f,\ +0.0728510737378383066432f,0.4639741641063248600574f,-0.9996734202650466860618f,\ +-1.3518108187607991155232f,-1.4723273061328936428538f,0.8933558949405833171653f,\ +-0.0093018535376701225181f,-1.0826576750905823054438f,1.2404141733855511553486f,\ +-1.3465428092378513014182f,0.8747309046321107839361f,0.9253397074562169644096f,\ +0.0400381835355557713640f,-0.7765785126027255902414f,-1.0546807717631738743336f,\ +0.0838092326986521196641f,-0.0189446011407611511479f,0.9396543988269212555053f,\ +0.7141040044798073749277f,0.7596541492574908627233f,0.4957818734457210552158f,\ +-1.5271090619693206136276f,-1.1987057982776780917789f,0.6860846415801318265437f,\ +1.0836815939774062655943f,0.0257348439490480244973f,-0.8966457616590515211641f,\ +0.7629454929184202871539f,0.8326995831057554253718f,0.6358947917453465770166f,\ +1.122174794910343109677f,0.9210086183100237855470f,-0.9179542949015334629692f,\ +0.4753128844824887067055f,-0.6057418122474197419436f,1.0912054352763760345368f,\ +-0.7811598998629154522177f,-0.8252118132068452238670f,-0.8003932093064218822320f,\ +1.040963230413896711823f,1.2239764586679500180111f,0.1191234084420016575701f,\ +1.064003892301497833373f,-0.3509788166940612241795f,-1.1278108079499422622405f,\ +1.1420720075136889803957f,-1.0231852297083139369249f,-0.1916370368791805167685f,\ +-0.941129540386991148004f,-0.4709650954727132576849f,1.2604683484747309929475f,\ +0.6665567013842946808566f,0.9183588395793375047660f,-1.0371195264398431756803f,\ +-1.276620042706810842503f,1.1799805845600985776400f,1.255793767839696428723f,\ +0.6354974793467924598644f,-0.6865980682751140484754f,0.5939555774818401356896f,\ +-1.3024651432778990844952f,1.197724373266410013983f} + + + + + +void satanhsTest() { + float in[]= SOURCE; + float res[]= RESULT; + float out; + int i=0; + + for (i=0;i<200;i++){ + out=satanhs(in[i]); + if (sisnans(out)) assert(1); + else assert( ( (fabs(out-res[i])) / (fabs(out)) ) <3e-6); + } +} + +void catanhsTest() { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in, out; + int i=0; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=catanhs(in); + assert( ( (fabs(creals(out)-resR[i])) / (fabs(creals(out))) ) <1e-6); + assert( ( (fabs(cimags(out)-resI[i])) / (fabs(cimags(out))) ) <1e-6); + } +} + +void satanhaTest(void) { + float in[]= SOURCE; + float res[]=RESULT; + float out[200]; + int i=0; + + satanha(in,200,out); + for (i=0;i<200;i++){ + if (sisnans(out[i])) assert(1); + else assert( ( (fabs(out[i]-res[i])) / (fabs(out[i])) ) <3e-6); + } +} + +void catanhaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200], out[200]; + int i=0; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + catanha(in,200,out); + for (i=0;i<200;i++){ + assert( ( (fabs(creals(out[i])-resR[i])) / (fabs(creals(out[i]))) ) <1e-6); + assert( ( (fabs(cimags(out[i])-resI[i])) / (fabs(cimags(out[i]))) ) <1e-6); + } +} + +int testAtanh() { + printf("\n>>>> Float Hyperbolic Arctangeant Tests\n"); + satanhsTest(); + catanhsTest(); + satanhaTest(); + catanhaTest(); + return 0; +} + +int main() { + assert(testAtanh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/zatanha.c b/2.3-1/src/c/elementaryFunctions/atanh/zatanha.c new file mode 100644 index 00000000..e35af912 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/zatanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "atanh.h" + +void zatanha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zatanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/atanh/zatanhs.c b/2.3-1/src/c/elementaryFunctions/atanh/zatanhs.c new file mode 100644 index 00000000..7fb81126 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/atanh/zatanhs.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// METHOD +// based on the formula atanh(z) = i atan(-i z) +*/ + +#include "atanh.h" +#include "atan.h" + +doubleComplex zatanhs(doubleComplex z) { + doubleComplex minus_i_z = DoubleComplex(zimags(z), -zreals(z)); + doubleComplex atan_minus_i_z = zatans(minus_i_z); + return DoubleComplex(-zimags(atan_minus_i_z), zreals(atan_minus_i_z)); +} diff --git a/2.3-1/src/c/elementaryFunctions/auxiliaryFunctions_Import.def b/2.3-1/src/c/elementaryFunctions/auxiliaryFunctions_Import.def new file mode 100644 index 00000000..ee7e26e6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/auxiliaryFunctions_Import.def @@ -0,0 +1,8 @@ +LIBRARY auxiliaryFunctions.dll + + +EXPORTS +sabss +dabss +spythags +dpythags \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/ceil/Makefile.am b/2.3-1/src/c/elementaryFunctions/ceil/Makefile.am new file mode 100644 index 00000000..26723826 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/Makefile.am @@ -0,0 +1,60 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libCeil_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libCeil.la + +libCeil_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/ceil.h + +SRC = sceils.c \ + dceils.c \ + cceils.c \ + zceils.c \ + sceila.c \ + dceila.c \ + cceila.c \ + zceila.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/ceil/libCeil.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatCeil testDoubleCeil + +TESTS = testFloatCeil testDoubleCeil + +# +# -*- Ceil Tests -*- +# +testFloatCeil_SOURCES = testFloatCeil.c +testFloatCeil_CFLAGS = $(check_INCLUDES) +testFloatCeil_LDADD = $(check_LDADD) + +testDoubleCeil_SOURCES = testDoubleCeil.c +testDoubleCeil_CFLAGS = $(check_INCLUDES) +testDoubleCeil_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/ceil/Makefile.in b/2.3-1/src/c/elementaryFunctions/ceil/Makefile.in new file mode 100644 index 00000000..0283e108 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/Makefile.in @@ -0,0 +1,788 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatCeil$(EXEEXT) testDoubleCeil$(EXEEXT) +TESTS = testFloatCeil$(EXEEXT) testDoubleCeil$(EXEEXT) +subdir = src/c/elementaryFunctions/ceil +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libCeil_la_LIBADD = +am__objects_1 = +am__objects_2 = libCeil_la-sceils.lo libCeil_la-dceils.lo \ + libCeil_la-cceils.lo libCeil_la-zceils.lo libCeil_la-sceila.lo \ + libCeil_la-dceila.lo libCeil_la-cceila.lo libCeil_la-zceila.lo +am_libCeil_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libCeil_la_OBJECTS = $(am_libCeil_la_OBJECTS) +libCeil_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libCeil_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleCeil_OBJECTS = testDoubleCeil-testDoubleCeil.$(OBJEXT) +testDoubleCeil_OBJECTS = $(am_testDoubleCeil_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/ceil/libCeil.la +testDoubleCeil_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleCeil_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleCeil_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatCeil_OBJECTS = testFloatCeil-testFloatCeil.$(OBJEXT) +testFloatCeil_OBJECTS = $(am_testFloatCeil_OBJECTS) +testFloatCeil_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatCeil_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatCeil_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libCeil_la_SOURCES) $(testDoubleCeil_SOURCES) \ + $(testFloatCeil_SOURCES) +DIST_SOURCES = $(libCeil_la_SOURCES) $(testDoubleCeil_SOURCES) \ + $(testFloatCeil_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libCeil_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libCeil.la +libCeil_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/ceil.h +SRC = sceils.c \ + dceils.c \ + cceils.c \ + zceils.c \ + sceila.c \ + dceila.c \ + cceila.c \ + zceila.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/ceil/libCeil.la \ + @LIBMATH@ + + +# +# -*- Ceil Tests -*- +# +testFloatCeil_SOURCES = testFloatCeil.c +testFloatCeil_CFLAGS = $(check_INCLUDES) +testFloatCeil_LDADD = $(check_LDADD) +testDoubleCeil_SOURCES = testDoubleCeil.c +testDoubleCeil_CFLAGS = $(check_INCLUDES) +testDoubleCeil_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/ceil/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/ceil/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libCeil.la: $(libCeil_la_OBJECTS) $(libCeil_la_DEPENDENCIES) + $(libCeil_la_LINK) -rpath $(pkglibdir) $(libCeil_la_OBJECTS) $(libCeil_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleCeil$(EXEEXT): $(testDoubleCeil_OBJECTS) $(testDoubleCeil_DEPENDENCIES) + @rm -f testDoubleCeil$(EXEEXT) + $(testDoubleCeil_LINK) $(testDoubleCeil_OBJECTS) $(testDoubleCeil_LDADD) $(LIBS) +testFloatCeil$(EXEEXT): $(testFloatCeil_OBJECTS) $(testFloatCeil_DEPENDENCIES) + @rm -f testFloatCeil$(EXEEXT) + $(testFloatCeil_LINK) $(testFloatCeil_OBJECTS) $(testFloatCeil_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-cceila.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-cceils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-dceila.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-dceils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-sceila.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-sceils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-zceila.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCeil_la-zceils.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleCeil-testDoubleCeil.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatCeil-testFloatCeil.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libCeil_la-sceils.lo: sceils.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-sceils.lo -MD -MP -MF $(DEPDIR)/libCeil_la-sceils.Tpo -c -o libCeil_la-sceils.lo `test -f 'sceils.c' || echo '$(srcdir)/'`sceils.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-sceils.Tpo $(DEPDIR)/libCeil_la-sceils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sceils.c' object='libCeil_la-sceils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-sceils.lo `test -f 'sceils.c' || echo '$(srcdir)/'`sceils.c + +libCeil_la-dceils.lo: dceils.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-dceils.lo -MD -MP -MF $(DEPDIR)/libCeil_la-dceils.Tpo -c -o libCeil_la-dceils.lo `test -f 'dceils.c' || echo '$(srcdir)/'`dceils.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-dceils.Tpo $(DEPDIR)/libCeil_la-dceils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dceils.c' object='libCeil_la-dceils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-dceils.lo `test -f 'dceils.c' || echo '$(srcdir)/'`dceils.c + +libCeil_la-cceils.lo: cceils.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-cceils.lo -MD -MP -MF $(DEPDIR)/libCeil_la-cceils.Tpo -c -o libCeil_la-cceils.lo `test -f 'cceils.c' || echo '$(srcdir)/'`cceils.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-cceils.Tpo $(DEPDIR)/libCeil_la-cceils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cceils.c' object='libCeil_la-cceils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-cceils.lo `test -f 'cceils.c' || echo '$(srcdir)/'`cceils.c + +libCeil_la-zceils.lo: zceils.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-zceils.lo -MD -MP -MF $(DEPDIR)/libCeil_la-zceils.Tpo -c -o libCeil_la-zceils.lo `test -f 'zceils.c' || echo '$(srcdir)/'`zceils.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-zceils.Tpo $(DEPDIR)/libCeil_la-zceils.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zceils.c' object='libCeil_la-zceils.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-zceils.lo `test -f 'zceils.c' || echo '$(srcdir)/'`zceils.c + +libCeil_la-sceila.lo: sceila.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-sceila.lo -MD -MP -MF $(DEPDIR)/libCeil_la-sceila.Tpo -c -o libCeil_la-sceila.lo `test -f 'sceila.c' || echo '$(srcdir)/'`sceila.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-sceila.Tpo $(DEPDIR)/libCeil_la-sceila.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sceila.c' object='libCeil_la-sceila.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-sceila.lo `test -f 'sceila.c' || echo '$(srcdir)/'`sceila.c + +libCeil_la-dceila.lo: dceila.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-dceila.lo -MD -MP -MF $(DEPDIR)/libCeil_la-dceila.Tpo -c -o libCeil_la-dceila.lo `test -f 'dceila.c' || echo '$(srcdir)/'`dceila.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-dceila.Tpo $(DEPDIR)/libCeil_la-dceila.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dceila.c' object='libCeil_la-dceila.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-dceila.lo `test -f 'dceila.c' || echo '$(srcdir)/'`dceila.c + +libCeil_la-cceila.lo: cceila.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-cceila.lo -MD -MP -MF $(DEPDIR)/libCeil_la-cceila.Tpo -c -o libCeil_la-cceila.lo `test -f 'cceila.c' || echo '$(srcdir)/'`cceila.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-cceila.Tpo $(DEPDIR)/libCeil_la-cceila.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cceila.c' object='libCeil_la-cceila.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-cceila.lo `test -f 'cceila.c' || echo '$(srcdir)/'`cceila.c + +libCeil_la-zceila.lo: zceila.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -MT libCeil_la-zceila.lo -MD -MP -MF $(DEPDIR)/libCeil_la-zceila.Tpo -c -o libCeil_la-zceila.lo `test -f 'zceila.c' || echo '$(srcdir)/'`zceila.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCeil_la-zceila.Tpo $(DEPDIR)/libCeil_la-zceila.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zceila.c' object='libCeil_la-zceila.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCeil_la_CFLAGS) $(CFLAGS) -c -o libCeil_la-zceila.lo `test -f 'zceila.c' || echo '$(srcdir)/'`zceila.c + +testDoubleCeil-testDoubleCeil.o: testDoubleCeil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCeil_CFLAGS) $(CFLAGS) -MT testDoubleCeil-testDoubleCeil.o -MD -MP -MF $(DEPDIR)/testDoubleCeil-testDoubleCeil.Tpo -c -o testDoubleCeil-testDoubleCeil.o `test -f 'testDoubleCeil.c' || echo '$(srcdir)/'`testDoubleCeil.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCeil-testDoubleCeil.Tpo $(DEPDIR)/testDoubleCeil-testDoubleCeil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCeil.c' object='testDoubleCeil-testDoubleCeil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCeil_CFLAGS) $(CFLAGS) -c -o testDoubleCeil-testDoubleCeil.o `test -f 'testDoubleCeil.c' || echo '$(srcdir)/'`testDoubleCeil.c + +testDoubleCeil-testDoubleCeil.obj: testDoubleCeil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCeil_CFLAGS) $(CFLAGS) -MT testDoubleCeil-testDoubleCeil.obj -MD -MP -MF $(DEPDIR)/testDoubleCeil-testDoubleCeil.Tpo -c -o testDoubleCeil-testDoubleCeil.obj `if test -f 'testDoubleCeil.c'; then $(CYGPATH_W) 'testDoubleCeil.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCeil.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCeil-testDoubleCeil.Tpo $(DEPDIR)/testDoubleCeil-testDoubleCeil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCeil.c' object='testDoubleCeil-testDoubleCeil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCeil_CFLAGS) $(CFLAGS) -c -o testDoubleCeil-testDoubleCeil.obj `if test -f 'testDoubleCeil.c'; then $(CYGPATH_W) 'testDoubleCeil.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCeil.c'; fi` + +testFloatCeil-testFloatCeil.o: testFloatCeil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCeil_CFLAGS) $(CFLAGS) -MT testFloatCeil-testFloatCeil.o -MD -MP -MF $(DEPDIR)/testFloatCeil-testFloatCeil.Tpo -c -o testFloatCeil-testFloatCeil.o `test -f 'testFloatCeil.c' || echo '$(srcdir)/'`testFloatCeil.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCeil-testFloatCeil.Tpo $(DEPDIR)/testFloatCeil-testFloatCeil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCeil.c' object='testFloatCeil-testFloatCeil.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCeil_CFLAGS) $(CFLAGS) -c -o testFloatCeil-testFloatCeil.o `test -f 'testFloatCeil.c' || echo '$(srcdir)/'`testFloatCeil.c + +testFloatCeil-testFloatCeil.obj: testFloatCeil.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCeil_CFLAGS) $(CFLAGS) -MT testFloatCeil-testFloatCeil.obj -MD -MP -MF $(DEPDIR)/testFloatCeil-testFloatCeil.Tpo -c -o testFloatCeil-testFloatCeil.obj `if test -f 'testFloatCeil.c'; then $(CYGPATH_W) 'testFloatCeil.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCeil.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCeil-testFloatCeil.Tpo $(DEPDIR)/testFloatCeil-testFloatCeil.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCeil.c' object='testFloatCeil-testFloatCeil.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCeil_CFLAGS) $(CFLAGS) -c -o testFloatCeil-testFloatCeil.obj `if test -f 'testFloatCeil.c'; then $(CYGPATH_W) 'testFloatCeil.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCeil.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/ceil/cceila.c b/2.3-1/src/c/elementaryFunctions/ceil/cceila.c new file mode 100644 index 00000000..b251440e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/cceila.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ceil.h" + +void cceila(floatComplex* x, int size, floatComplex* out) { + int i = 0; + for (i=0;i +#include "ceil.h" + +floatComplex cceils(floatComplex x) { + float ceilReal = ceilf(creals(x)); + float ceilImag = ceilf(cimags(x)); + + return FloatComplex(ceilReal, ceilImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/ceil/dceila.c b/2.3-1/src/c/elementaryFunctions/ceil/dceila.c new file mode 100644 index 00000000..d21a9914 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/dceila.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ceil.h" + +void dceila(double* x, int size, double* out) { + int i = 0; + for (i=0;i +#include "ceil.h" + +double dceils(double x) { + return (ceil(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/ceil/sceila.c b/2.3-1/src/c/elementaryFunctions/ceil/sceila.c new file mode 100644 index 00000000..217536b1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/sceila.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ceil.h" + +void sceila(float* x, int size, float* out) { + int i = 0; + for (i=0;i +#include "ceil.h" + +float sceils(float x) { + return (ceilf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/ceil/testDoubleCeil.c b/2.3-1/src/c/elementaryFunctions/ceil/testDoubleCeil.c new file mode 100644 index 00000000..29b42c42 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/testDoubleCeil.c @@ -0,0 +1,153 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "ceil.h" + + + +static void dceilsTest(void) { + assert ((fabs( dceils(-2) - (-2))/fabs(dceils(-2)))<1e-16); + assert ((fabs( dceils(-1.9) - (-1))/fabs(dceils(-1.9)))<1e-16); + assert ((fabs( dceils(-1.8) - (-1))/fabs(dceils(-1.8)))<1e-16); + assert ((fabs( dceils(-1.7) - (-1))/fabs(dceils(-1.7)))<1e-16); + assert ((fabs( dceils(-1.6) - (-1))/fabs(dceils(-1.6)))<1e-16); + assert ((fabs( dceils(-1.5) - (-1))/fabs(dceils(-1.5)))<1e-16); + assert ((fabs( dceils(-1.4) - (-1))/fabs(dceils(-1.4)))<1e-16); + assert ((fabs( dceils(-1.3) - (-1))/fabs(dceils(-1.3)))<1e-16); + assert ((fabs( dceils(-1.2) - (-1))/fabs(dceils(-1.2)))<1e-16); + assert ((fabs( dceils(-1.1) - (-1))/fabs(dceils(-1.1)))<1e-16); + assert ((fabs( dceils(-1.0) - (-1))/fabs(dceils(-1.0)))<1e-16); + assert (fabs( dceils(-.9))<1e-16); + assert ((fabs( dceils(1.0) - (1))/fabs(dceils(1.0)))<1e-16); + assert ((fabs( dceils(1.1) - (2))/fabs(dceils(1.1)))<1e-16); + assert ((fabs( dceils(1.2) - (2))/fabs(dceils(1.2)))<1e-16); + assert ((fabs( dceils(1.3) - (2))/fabs(dceils(1.3)))<1e-16); + assert ((fabs( dceils(1.4) - (2))/fabs(dceils(1.4)))<1e-16); + assert ((fabs( dceils(1.5) - (2))/fabs(dceils(1.9)))<1e-16); + assert ((fabs( dceils(1.6) - (2))/fabs(dceils(1.9)))<1e-16); + assert ((fabs( dceils(1.7) - (2))/fabs(dceils(1.9)))<1e-16); + assert ((fabs( dceils(1.8) - (2))/fabs(dceils(1.9)))<1e-16); + assert ((fabs( dceils(1.9) - (2))/fabs(dceils(1.9)))<1e-16); + assert ((fabs( dceils(2.0) - (2))/fabs(dceils(2.0)))<1e-16); + +} + +static void zceilsTest(void) { + doubleComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=DoubleComplex(-2,1); + out = zceils(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.9,1.1); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.8,1.2); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.7,1.3); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.6,1.4); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.5,1.5); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.6); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.3,1.7); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.2,1.8); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.1,1.9); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.0,2.0); + out = zceils(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-.9,.9); + out = zceils(in); + assert (fabs( zreals(out))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + +} + +static void dceilaTest(void) { + int i; + double in[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double res[10]={2,2,-2,-3,-4,7,5,5,0,1}; + double out[10]; + + dceila(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert (fabs(out[i]-res[i])==0); +} + +static void zceilaTest(void) { + int i; + double inR[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double inI[10]={5.4,1.8,1.4,-4.0,-2.7,-0.3,1.5,1.4,7.3,-4.6}; + double resR[10]={2,2,-2,-3,-4,7,5,5,0,1}; + double resI[10]={6,2,2,-4,-2,0,2,2,8,-4}; + doubleComplex out[10],*in; + + in=DoubleComplexMatrix(inR,inI,10); + zceila(in,10,out); + + for (i=0;i<10;i++){ + if (zreals(out[i])!=0) assert(fabs(zreals(out[i])-resR[i])/fabs(zreals(out[i]))<1e-16); + else assert(fabs(zreals(out[i])-resR[i]) <1e-16); + if (zimags(out[i])!=0) assert(fabs(zimags(out[i])-resI[i])/fabs(zimags(out[i]))<1e-16); + else assert(fabs(zimags(out[i])-resI[i]) <1e-16); + } + +} + + +static int testCeil() { + printf("\n>>>> Double Ceil Tests\n"); + dceilsTest(); + zceilsTest(); + dceilaTest(); + zceilaTest(); + + return 0; +} + +int main() { + assert(testCeil() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/ceil/testFloatCeil.c b/2.3-1/src/c/elementaryFunctions/ceil/testFloatCeil.c new file mode 100644 index 00000000..f3ded89b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/testFloatCeil.c @@ -0,0 +1,149 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "ceil.h" + + +static void sceilsTest(void) { + + assert ((fabs( sceils(-2) - (-2))/fabs(sceils(-2)))<1e-16); + assert ((fabs( sceils(-1.9f) - (-1))/fabs(sceils(-1.9f)))<1e-16); + assert ((fabs( sceils(-1.8f) - (-1))/fabs(sceils(-1.8f)))<1e-16); + assert ((fabs( sceils(-1.7f) - (-1))/fabs(sceils(-1.7f)))<1e-16); + assert ((fabs( sceils(-1.6f) - (-1))/fabs(sceils(-1.6f)))<1e-16); + assert ((fabs( sceils(-1.5f) - (-1))/fabs(sceils(-1.5f)))<1e-16); + assert ((fabs( sceils(-1.4f) - (-1))/fabs(sceils(-1.4f)))<1e-16); + assert ((fabs( sceils(-1.3f) - (-1))/fabs(sceils(-1.3f)))<1e-16); + assert ((fabs( sceils(-1.2f) - (-1))/fabs(sceils(-1.2f)))<1e-16); + assert ((fabs( sceils(-1.1f) - (-1))/fabs(sceils(-1.1f)))<1e-16); + assert ((fabs( sceils(-1.0f) - (-1))/fabs(sceils(-1.0f)))<1e-16); + assert (fabs( sceils(-.9f))<1e-16); + assert ((fabs( sceils(1.0f) - (1))/fabs(sceils(1.0f)))<1e-16); + assert ((fabs( sceils(1.1f) - (2))/fabs(sceils(1.1f)))<1e-16); + assert ((fabs( sceils(1.2f) - (2))/fabs(sceils(1.2f)))<1e-16); + assert ((fabs( sceils(1.3f) - (2))/fabs(sceils(1.3f)))<1e-16); + assert ((fabs( sceils(1.4f) - (2))/fabs(sceils(1.4f)))<1e-16); + assert ((fabs( sceils(1.5f) - (2))/fabs(sceils(1.5f)))<1e-16); + assert ((fabs( sceils(1.6f) - (2))/fabs(sceils(1.6f)))<1e-16); + assert ((fabs( sceils(1.7f) - (2))/fabs(sceils(1.7f)))<1e-16); + assert ((fabs( sceils(1.8f) - (2))/fabs(sceils(1.8f)))<1e-16); + assert ((fabs( sceils(1.9f) - (2))/fabs(sceils(1.9f)))<1e-16); + assert ((fabs( sceils(2.0f) - (2))/fabs(sceils(2.0f)))<1e-16); +} + +static void cceilsTest(void) { + floatComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=FloatComplex(-2,1); + out = cceils(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.9f,1.1f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.8f,1.2f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.7f,1.3f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.6f,1.4f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.5f,1.5f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.4f,1.6f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.3f,1.7f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.2f,1.8f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.1f,1.9f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.0f,2.0f); + out = cceils(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-.9f,.9f); + out = cceils(in); + assert (fabs( creals(out))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); +} + +static void sceilaTest(void) { + int i; + float in[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float res[10]={2,2,-2,-3,-4,7,5,5,0,1}; + float out[10]; + + sceila(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i])<1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); +} + +static void cceilaTest(void) { + int i; + float inR[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float inI[10]={5.4f,1.8f,1.4f,-4.0f,-2.7f,-0.3f,1.5f,1.4f,7.3f,-4.6f}; + float resR[10]={2,2,-2,-3,-4,7,5,5,0,1}; + float resI[10]={6,2,2,-4,-2,0,2,2,8,-4}; + floatComplex out[10],*in; + + in=FloatComplexMatrix(inR,inI,10); + cceila(in,10,out); + + for (i=0;i<10;i++){ + if(creals(out[i])!=0) assert(fabs(creals(out[i])-resR[i])/fabs(creals(out[i]))<1e-16); + else assert(fabs(creals(out[i])-resR[i]) <1e-16); + if(cimags(out[i])!=0) assert(fabs(cimags(out[i])-resI[i])/fabs(cimags(out[i]))<1e-16); + else assert(fabs(cimags(out[i])-resI[i]) <1e-16); + } +} + +static int testCeil() { + printf("\n>>>> Float Ceil Tests\n"); + sceilsTest(); + cceilsTest(); + sceilaTest(); + cceilaTest(); + + return 0; +} + +int main() { + assert(testCeil() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/ceil/zceila.c b/2.3-1/src/c/elementaryFunctions/ceil/zceila.c new file mode 100644 index 00000000..292726b1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/ceil/zceila.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ceil.h" + +void zceila(doubleComplex* x, int size, doubleComplex* out) { + int i = 0; + for (i=0;i +#include "ceil.h" + +doubleComplex zceils(doubleComplex x) { + double ceilReal = ceil(zreals(x)); + double ceilImag = ceil(zimags(x)); + + return DoubleComplex(ceilReal, ceilImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/Makefile.am b/2.3-1/src/c/elementaryFunctions/cos/Makefile.am new file mode 100644 index 00000000..890675be --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/Makefile.am @@ -0,0 +1,71 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libCos_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libCos.la + +libCos_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/cos.h + +SRC = scoss.c \ + dcoss.c \ + ccoss.c \ + zcoss.c \ + scosa.c \ + dcosa.c \ + ccosa.c \ + zcosa.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatCos testDoubleCos + +TESTS = testFloatCos testDoubleCos + +# +# -*- Cosine Tests -*- +# +testFloatCos_SOURCES = ../../includes/constant.h testCos.h testFloatCos.c +testFloatCos_CFLAGS = $(check_INCLUDES) +testFloatCos_LDADD = $(check_LDADD) + +testDoubleCos_SOURCES = ../../includes/constant.h testCos.h testDoubleCos.c +testDoubleCos_CFLAGS = $(check_INCLUDES) +testDoubleCos_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/cos/Makefile.in b/2.3-1/src/c/elementaryFunctions/cos/Makefile.in new file mode 100644 index 00000000..748b9283 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/Makefile.in @@ -0,0 +1,810 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatCos$(EXEEXT) testDoubleCos$(EXEEXT) +TESTS = testFloatCos$(EXEEXT) testDoubleCos$(EXEEXT) +subdir = src/c/elementaryFunctions/cos +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libCos_la_LIBADD = +am__objects_1 = +am__objects_2 = libCos_la-scoss.lo libCos_la-dcoss.lo \ + libCos_la-ccoss.lo libCos_la-zcoss.lo libCos_la-scosa.lo \ + libCos_la-dcosa.lo libCos_la-ccosa.lo libCos_la-zcosa.lo +am_libCos_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libCos_la_OBJECTS = $(am_libCos_la_OBJECTS) +libCos_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libCos_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleCos_OBJECTS = testDoubleCos-testDoubleCos.$(OBJEXT) +testDoubleCos_OBJECTS = $(am_testDoubleCos_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la +testDoubleCos_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleCos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleCos_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatCos_OBJECTS = testFloatCos-testFloatCos.$(OBJEXT) +testFloatCos_OBJECTS = $(am_testFloatCos_OBJECTS) +testFloatCos_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatCos_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatCos_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libCos_la_SOURCES) $(testDoubleCos_SOURCES) \ + $(testFloatCos_SOURCES) +DIST_SOURCES = $(libCos_la_SOURCES) $(testDoubleCos_SOURCES) \ + $(testFloatCos_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libCos_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libCos.la +libCos_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/cos.h +SRC = scoss.c \ + dcoss.c \ + ccoss.c \ + zcoss.c \ + scosa.c \ + dcosa.c \ + ccosa.c \ + zcosa.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + + +# +# -*- Cosine Tests -*- +# +testFloatCos_SOURCES = ../../includes/constant.h testCos.h testFloatCos.c +testFloatCos_CFLAGS = $(check_INCLUDES) +testFloatCos_LDADD = $(check_LDADD) +testDoubleCos_SOURCES = ../../includes/constant.h testCos.h testDoubleCos.c +testDoubleCos_CFLAGS = $(check_INCLUDES) +testDoubleCos_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/cos/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/cos/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libCos.la: $(libCos_la_OBJECTS) $(libCos_la_DEPENDENCIES) + $(libCos_la_LINK) -rpath $(pkglibdir) $(libCos_la_OBJECTS) $(libCos_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleCos$(EXEEXT): $(testDoubleCos_OBJECTS) $(testDoubleCos_DEPENDENCIES) + @rm -f testDoubleCos$(EXEEXT) + $(testDoubleCos_LINK) $(testDoubleCos_OBJECTS) $(testDoubleCos_LDADD) $(LIBS) +testFloatCos$(EXEEXT): $(testFloatCos_OBJECTS) $(testFloatCos_DEPENDENCIES) + @rm -f testFloatCos$(EXEEXT) + $(testFloatCos_LINK) $(testFloatCos_OBJECTS) $(testFloatCos_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-ccosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-ccoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-dcosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-dcoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-scosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-scoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-zcosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCos_la-zcoss.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleCos-testDoubleCos.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatCos-testFloatCos.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libCos_la-scoss.lo: scoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-scoss.lo -MD -MP -MF $(DEPDIR)/libCos_la-scoss.Tpo -c -o libCos_la-scoss.lo `test -f 'scoss.c' || echo '$(srcdir)/'`scoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-scoss.Tpo $(DEPDIR)/libCos_la-scoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scoss.c' object='libCos_la-scoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-scoss.lo `test -f 'scoss.c' || echo '$(srcdir)/'`scoss.c + +libCos_la-dcoss.lo: dcoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-dcoss.lo -MD -MP -MF $(DEPDIR)/libCos_la-dcoss.Tpo -c -o libCos_la-dcoss.lo `test -f 'dcoss.c' || echo '$(srcdir)/'`dcoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-dcoss.Tpo $(DEPDIR)/libCos_la-dcoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcoss.c' object='libCos_la-dcoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-dcoss.lo `test -f 'dcoss.c' || echo '$(srcdir)/'`dcoss.c + +libCos_la-ccoss.lo: ccoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-ccoss.lo -MD -MP -MF $(DEPDIR)/libCos_la-ccoss.Tpo -c -o libCos_la-ccoss.lo `test -f 'ccoss.c' || echo '$(srcdir)/'`ccoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-ccoss.Tpo $(DEPDIR)/libCos_la-ccoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccoss.c' object='libCos_la-ccoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-ccoss.lo `test -f 'ccoss.c' || echo '$(srcdir)/'`ccoss.c + +libCos_la-zcoss.lo: zcoss.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-zcoss.lo -MD -MP -MF $(DEPDIR)/libCos_la-zcoss.Tpo -c -o libCos_la-zcoss.lo `test -f 'zcoss.c' || echo '$(srcdir)/'`zcoss.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-zcoss.Tpo $(DEPDIR)/libCos_la-zcoss.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcoss.c' object='libCos_la-zcoss.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-zcoss.lo `test -f 'zcoss.c' || echo '$(srcdir)/'`zcoss.c + +libCos_la-scosa.lo: scosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-scosa.lo -MD -MP -MF $(DEPDIR)/libCos_la-scosa.Tpo -c -o libCos_la-scosa.lo `test -f 'scosa.c' || echo '$(srcdir)/'`scosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-scosa.Tpo $(DEPDIR)/libCos_la-scosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scosa.c' object='libCos_la-scosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-scosa.lo `test -f 'scosa.c' || echo '$(srcdir)/'`scosa.c + +libCos_la-dcosa.lo: dcosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-dcosa.lo -MD -MP -MF $(DEPDIR)/libCos_la-dcosa.Tpo -c -o libCos_la-dcosa.lo `test -f 'dcosa.c' || echo '$(srcdir)/'`dcosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-dcosa.Tpo $(DEPDIR)/libCos_la-dcosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcosa.c' object='libCos_la-dcosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-dcosa.lo `test -f 'dcosa.c' || echo '$(srcdir)/'`dcosa.c + +libCos_la-ccosa.lo: ccosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-ccosa.lo -MD -MP -MF $(DEPDIR)/libCos_la-ccosa.Tpo -c -o libCos_la-ccosa.lo `test -f 'ccosa.c' || echo '$(srcdir)/'`ccosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-ccosa.Tpo $(DEPDIR)/libCos_la-ccosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccosa.c' object='libCos_la-ccosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-ccosa.lo `test -f 'ccosa.c' || echo '$(srcdir)/'`ccosa.c + +libCos_la-zcosa.lo: zcosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -MT libCos_la-zcosa.lo -MD -MP -MF $(DEPDIR)/libCos_la-zcosa.Tpo -c -o libCos_la-zcosa.lo `test -f 'zcosa.c' || echo '$(srcdir)/'`zcosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCos_la-zcosa.Tpo $(DEPDIR)/libCos_la-zcosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcosa.c' object='libCos_la-zcosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCos_la_CFLAGS) $(CFLAGS) -c -o libCos_la-zcosa.lo `test -f 'zcosa.c' || echo '$(srcdir)/'`zcosa.c + +testDoubleCos-testDoubleCos.o: testDoubleCos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCos_CFLAGS) $(CFLAGS) -MT testDoubleCos-testDoubleCos.o -MD -MP -MF $(DEPDIR)/testDoubleCos-testDoubleCos.Tpo -c -o testDoubleCos-testDoubleCos.o `test -f 'testDoubleCos.c' || echo '$(srcdir)/'`testDoubleCos.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCos-testDoubleCos.Tpo $(DEPDIR)/testDoubleCos-testDoubleCos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCos.c' object='testDoubleCos-testDoubleCos.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCos_CFLAGS) $(CFLAGS) -c -o testDoubleCos-testDoubleCos.o `test -f 'testDoubleCos.c' || echo '$(srcdir)/'`testDoubleCos.c + +testDoubleCos-testDoubleCos.obj: testDoubleCos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCos_CFLAGS) $(CFLAGS) -MT testDoubleCos-testDoubleCos.obj -MD -MP -MF $(DEPDIR)/testDoubleCos-testDoubleCos.Tpo -c -o testDoubleCos-testDoubleCos.obj `if test -f 'testDoubleCos.c'; then $(CYGPATH_W) 'testDoubleCos.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCos.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCos-testDoubleCos.Tpo $(DEPDIR)/testDoubleCos-testDoubleCos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCos.c' object='testDoubleCos-testDoubleCos.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCos_CFLAGS) $(CFLAGS) -c -o testDoubleCos-testDoubleCos.obj `if test -f 'testDoubleCos.c'; then $(CYGPATH_W) 'testDoubleCos.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCos.c'; fi` + +testFloatCos-testFloatCos.o: testFloatCos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCos_CFLAGS) $(CFLAGS) -MT testFloatCos-testFloatCos.o -MD -MP -MF $(DEPDIR)/testFloatCos-testFloatCos.Tpo -c -o testFloatCos-testFloatCos.o `test -f 'testFloatCos.c' || echo '$(srcdir)/'`testFloatCos.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCos-testFloatCos.Tpo $(DEPDIR)/testFloatCos-testFloatCos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCos.c' object='testFloatCos-testFloatCos.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCos_CFLAGS) $(CFLAGS) -c -o testFloatCos-testFloatCos.o `test -f 'testFloatCos.c' || echo '$(srcdir)/'`testFloatCos.c + +testFloatCos-testFloatCos.obj: testFloatCos.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCos_CFLAGS) $(CFLAGS) -MT testFloatCos-testFloatCos.obj -MD -MP -MF $(DEPDIR)/testFloatCos-testFloatCos.Tpo -c -o testFloatCos-testFloatCos.obj `if test -f 'testFloatCos.c'; then $(CYGPATH_W) 'testFloatCos.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCos.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCos-testFloatCos.Tpo $(DEPDIR)/testFloatCos-testFloatCos.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCos.c' object='testFloatCos-testFloatCos.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCos_CFLAGS) $(CFLAGS) -c -o testFloatCos-testFloatCos.obj `if test -f 'testFloatCos.c'; then $(CYGPATH_W) 'testFloatCos.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCos.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/cos/ccosa.c b/2.3-1/src/c/elementaryFunctions/cos/ccosa.c new file mode 100644 index 00000000..fbc421c6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/ccosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" + +void ccosa(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ccoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/ccoss.c b/2.3-1/src/c/elementaryFunctions/cos/ccoss.c new file mode 100644 index 00000000..cee27a6e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/ccoss.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" +#include "sin.h" +#include "cosh.h" +#include "sinh.h" + +floatComplex ccoss(floatComplex z) { + float real = creals(z); + float imag = cimags(z); + + return FloatComplex(scoss(real) * scoshs(imag), + -ssins(real) * ssinhs(imag)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/dcosa.c b/2.3-1/src/c/elementaryFunctions/cos/dcosa.c new file mode 100644 index 00000000..3a3242be --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/dcosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" + +void dcosa(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dcoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/dcoss.c b/2.3-1/src/c/elementaryFunctions/cos/dcoss.c new file mode 100644 index 00000000..4614bd8a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/dcoss.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "cos.h" + +double dcoss(double x) { + return (cos(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/scosa.c b/2.3-1/src/c/elementaryFunctions/cos/scosa.c new file mode 100644 index 00000000..19930636 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/scosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" + +void scosa(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = scoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/scoss.c b/2.3-1/src/c/elementaryFunctions/cos/scoss.c new file mode 100644 index 00000000..9a3ca059 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/scoss.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "cos.h" + +float scoss(float x) { + return (cosf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/testCos.h b/2.3-1/src/c/elementaryFunctions/cos/testCos.h new file mode 100644 index 00000000..11be0542 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/testCos.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTCOS_H_ +#define _TESTCOS_H_ + +#include +#include +#include +#include "cos.h" +#include "constant.h" + + +void scossTest(void); + +void dcossTest(void); + +void ccossTest(void); + +void zcossTest(void); + +void scosaTest(void); + +void dcosaTest(void); + +void ccosaTest(void); + +void zcosaTest(void); + +int testCos(void); + +#endif /* ! _TESTCOS_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/cos/testDoubleCos.c b/2.3-1/src/c/elementaryFunctions/cos/testDoubleCos.c new file mode 100644 index 00000000..d53d4aa6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/testDoubleCos.c @@ -0,0 +1,496 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testCos.h" + +#define SOURCE {0.6087216374946681218816,-0.4914009399790010834685,0.2966492127240239473629,\ +-1.0120131171793795843428,-2.1768580524449996360659,0.0399891371904198267284,\ +0.3264664449949340463419,0.3928915710000103755917,-0.9023248339668938911018,\ +-0.7061054028011619632110,0.6351420537982425118528,1.7243031942788638044561,\ +-1.193843423508647916265,-0.6699486724870092890782,0.9455390047179551560319,\ +-0.7269584830448905243827,0.0587220167793607444873,0.7465722023081590164040,\ +-1.8115798920517958148224,-2.7758706356233147083401,1.6672616062636114175888,\ +-0.0836705642425854267952,0.3278617890836109105557,-0.4784618803967296551960,\ +-1.5167866307363953026766,0.3278666902123760218402,1.4583399615307341967707,\ +0.1568728504489345088,0.8788327319516627822438,0.6503974594047504664829,\ +-1.2192475208695570110251,1.1760897921697979207067,-1.8443279857673484656289,\ +0.7800878370874437806037,-1.7143820612787801227483,-1.2442138561935551788196,\ +-0.5030865876060848229656,-0.7500891916411158710787,0.0131204357988426462828,\ +-1.3051873378120935065283,-0.4721103394959948462706,-1.08171405175402890464,\ +0.1772346225663179453136,0.0709726766378662859980,0.5997183167182360552516,\ +-0.7982542475055777186910,1.1146919091581586336304,-0.5226194052411643475864,\ +-0.3280122727754089528851,0.0845844607820355476324,-0.4076056231156577891461,\ +2.671024580732940023609,0.2751537532064078916960,0.6141628828811964702084,\ +-0.7694928564341785293124,1.5452838740749164081478,1.2047554263319388834219,\ +-0.4418728868867642933793,-2.3845314085200706166745,-0.4507303538478215632068,\ +-1.2843948816610906149549,0.6258568994217935665958,0.5221599455292258440409,\ +0.6881147826420792590341,-1.5350411433640571701176,-0.9627472135269001807245,\ +-0.5218069771892938080171,0.1257945676013507985136,-1.6629602539620385037722,\ +-0.1168122168368753571732,0.6319751771097191772597,0.0279680711838030011951,\ +-1.0789454333610759562134,-2.2539675570413915117740,0.0159524501831603895963,\ +0.7246005623822228125519,1.3584241656028799294376,0.1335331404272114830256,\ +0.8003059664568770159576,-1.5933335032689068810896,-0.2766963701941145270524,\ +-0.1259819476132254256751,-2.1871819624452908392698,-0.0027183437417650840526,\ +0.0895441283705892265843,-0.0655528187812533247314,0.0082181667448872272597,\ +-0.1292799439278431716804,0.8059814954561199673577,-1.0227158239595737221350,\ +-1.1728578375397291644333,0.3095622814458759419765,0.4085150016548139140227,\ +0.4376992889872045044974,3.0932123457325086945957,-0.2404500241757465406334,\ +-0.2553482065690487190501,1.0058683512127921666490,1.8395637792194936555035,\ +0.3411429898658094317376,-3.0536685582128435534344,-0.1095788307430261981912,\ +1.6414918920137913094237,-1.0744672373614887472826,1.5353378953533194373193,\ +-0.8528406784492137404641,-0.7422456212235352124296,0.1342811638770788351671,\ +-1.6549750406888592557664,-0.7256367869747750720677,-0.0862485588565954086615,\ +-0.0561038363580659213414,-0.0030846890449726638815,0.2539566584786872027735,\ +-2.255576969911772700073,-1.7353562843564334094992,1.4790955315931679781016,\ +-0.6277258320505759714436,-0.874734985447433444072,1.7535503835541961237254,\ +-0.8019918985373268860428,0.2826253943812546687298,0.9297345065408313402600,\ +-0.1628091770786383452041,-0.5361503318172788912221,-0.1559543394910963276523,\ +0.4214606760227143644748,1.9422068405845787086861,1.126122745997659491124,\ +-0.3806596390838080656849,0.2838150495409667017910,0.5356418000869134221631,\ +-0.8698259506453359657385,-1.4811954887734988250969,-0.6640101248288414748089,\ +-0.8768395331826340788339,0.1637943427647920169310,0.8023136616688257838348,\ +1.9190648920981443481537,-1.1659867862660415749332,0.9175250832331292016875,\ +-0.4629851548188154697350,1.1531379126231540155345,1.280357188491430875388,\ +0.8752030571429955108087,-1.80360898378670553299,0.5261137866109517613467,\ +0.0015036147858927245008,-0.9395126502065724860557,0.1254332133415215488892,\ +0.7981010350443900058792,-0.7787639258289269506008,-2.211373434923878722458,\ +0.4245313340753193442900,0.4777310697112210347015,-0.7091015173222630085803,\ +2.5269774755909995000991,-0.5189834616032670266961,0.7465455379507028865760,\ +1.6922232637382539355286,-0.7527036628439752741215,-0.1791091421294778995854,\ +-1.143803039940205490410,-0.3557089242818732288676,-2.5859928945830414903639,\ +-0.4620292997028574988327,2.1043646801028508264153,0.2700104378784371483846,\ +-0.5683100411735593215923,0.0576234736047250076241,-0.3494123351876678440497,\ +-0.6437179916333417573071,1.1183843932324186720706,-1.7070244497383502135790,\ +-0.5423910203569126675660,1.478528409100926088726,1.4635937207455358421981,\ +0.9926533118110351106012,-0.7069946768514858703725,-0.7247022468472048561949,\ +0.0958136359005943571976,-0.3502577985930430126693,-0.7552136456030923428173,\ +0.4974020403078212582137,-1.1482817888259779781635,-0.2861580091485689814057,\ +-0.5017215979538576231533,-0.6146143460074020570261,-0.8743941016318307335453,\ +0.6112858348465053381915,1.1276508199848169766710,-0.6796253617896085286176,\ +1.0967206821241466396799,0.3644470031679390431556,0.2076189090924974445240,\ +-0.5458105472995297136052,-0.0671640776881476525562,0.9301013215147568846675,\ +1.4191187165731935504454,1.9739542618337482249302} + +#define RESULT {0.8203796801888452172591,0.8816726743563225721090,0.9563213494741442666225,\ +0.5301548730715204271746,-0.5696350270974277485436,0.9992005409985472708101,\ +0.9471814588690369296486,0.9238058529293791121262,0.6197871850499613310959,\ +0.7608947481851529026642,0.8049874252319156875402,-0.1529046956055711559141,\ +0.3680890208730970281081,0.7838535385146575551474,0.5853059322813873865954,\ +0.7471992477828661716188,0.9982763577574981228580,0.7340210854728602685171,\ +-0.2384636600673788464633,-0.9338657938993391027793,-0.0963157386477964672089,\ +0.9965016599751398418405,0.9467330527147245211594,0.8877041448701339376726,\ +0.0539834417486552073373,0.9467314744445589624888,0.1122194864288899307514,\ +0.9877206673462950448084,0.6380503687973807513956,0.7958431986465404062159,\ +0.3443523016260275904088,0.3845373047091283913446,-0.2701334763293031793197,\ +0.7108517612540402597077,-0.1430928615933441672148,0.32080801483743826008,\ +0.8760985949432102959378,0.7316280694838999121288,0.9999139283169750092028,\ +0.2624969502467918158750,0.8906105597759395031687,0.4698159512131697135295,\ +0.9843350146218102780793,0.9974824965990314318276,0.8254946325091827574738,\ +0.6979579732366844035951,0.4404541009116093031039,0.8665146735535679267670,\ +0.9466845833195259851678,0.9964248667932769087940,0.9180726139212290748404,\ +-0.8913108719456435125039,0.9623834350402660220425,0.8172561425171237514675,\ +0.718263617781651042549,0.0255096851968806929978,0.3579214307842031317364,\ +0.903952340447022550940,-0.7268574491788566405148,0.9001291834726419249790,\ +0.2825020879048804056666,0.8104614523160890149356,0.8667439221341659560949,\ +0.7724446547102603588542,0.0357475654825572253248,0.5712673305171682702763,\ +0.8669199123046601451748,0.9920982915300309290529,-0.0920335062605047438122,\ +0.9931852073290609039802,0.8068622676403011118040,0.9996089189905136285219,\ +0.4722581851967700972139,-0.6312557202207959017315,0.9998727623649044105036,\ +0.7487642434889083542515,0.2107793581335721255776,0.9910976901702407415584,\ +0.6964871898378746095659,-0.0225352686591101247782,0.961963168947402524900,\ +0.992074764843193790398,-0.5780897184534614652307,0.9999963053059259809885,\ +0.9959936026023269439733,0.997852183268367110003,0.9999662310577351886920,\ +0.9916549805054094557377,0.6924034092861499622984,0.5210498486203913870440,\ +0.3875187390378670992952,0.9524670084743368514424,0.9177117455650365407394,\ +0.9057292314266010002655,-0.9988299011655918935304,0.9712309045685737496356,\ +0.9675754035185222257098,0.5353549836201899614352,-0.2655433409023978952312,\ +0.9423728774251888262725,-0.9961371662051550224248,0.9940022450449995661259,\ +-0.0706366921418750404182,0.4762007884740003804680,0.0354510015922323284965,\ +0.65784633984897000758,0.7369525027778347503471,0.9909978235616448971612,\ +-0.0840793332663393455650,0.7480769942249303472437,0.9962828981406220973938,\ +0.9984265925479938186271,0.9999952423505205079124,0.9679259470687455735316,\ +-0.632503122148043273043,-0.1638182491633654591645,0.0915723300147998908738,\ +0.8093652317898135661878,0.6412002458492904732879,-0.1817384524188947747536,\ +0.6952764275967198148720,0.9603265844478726664946,0.5980467860661466961147,\ +0.9867758355724630670025,0.8596815738538068352170,0.9878637498486452228619,\ +0.9124923605358673528443,-0.3629301323805959045288,0.4301632279198022157374,\ +0.9284197599136463363578,0.959994136496382766133,0.8599412360983218484023,\ +0.6449595684306472787028,0.0894809955848772375919,0.7875272110120042912129,\ +0.6395838526894777054110,0.9866156703762346547038,0.6950451267922697073942,\ +-0.3412708317791682266495,0.3938437014688686566011,0.6077873470346980555590,\ +0.8947232532371431901197,0.405621261011146261311,0.2863729991092465732017,\ +0.6408409897588510650834,-0.2307152077489570130009,0.8647651606784810818240,\ +0.9999988695715007480658,0.5901815182487093469632,0.9921435633684139165922,\ +0.6980676864202854936536,0.7117823002210422744795,-0.5976582378696937425389,\ +0.9112318735935986957486,0.8880403834946687391394,0.7589472311619362976387,\ +-0.8169954127513406882954,0.8683238289487801297994,0.7340391936884439472166,\ +-0.1211287602524158124595,0.7298432754851863490941,0.9840027922687679673430,\ +0.414135922956764768177,0.9373998379717353168772,-0.8495842484392269744475,\ +0.8951497493851807707443,-0.5086089166239101677647,0.9637681122030780089815,\ +0.8428117284541520870533,0.9983402269892645009008,0.9395740596053013815592,\ +0.7998698514817192961601,0.4371360854041511645462,-0.1358071578606558360569,\ +0.8564769211630707257399,0.0921370549444396474970,0.1069973881579713986811,\ +0.5464696941763740323239,0.7603174194154225240538,0.7486968394521967828936,\ +0.9954133840567818136691,0.9392842830606296100626,0.7281251176521188472890,\ +0.8788251271401545938744,0.4100551583355765972172,0.9593354263834207307227,\ +0.8767558837388640391453,0.8169958925140410332943,0.6414617938312918710153,\ +0.8189107275146941811172,0.4287832557249183773607,0.7778082340710044118026,\ +0.4565162294470550552461,0.9343210101535780465198,0.9785245037094734144034,\ +0.8547068075395470865274,0.9977453410917197507146,0.5977527578720709389160,\ +0.1510966938752993093953,-0.3923250465140346587845} + +#define ZSOURCER {0.8652785065984375245662,-1.3368838685782120645484,1.6264408224927449087005,\ +-1.8690897079220740728545,0.9951518628175756164822,-1.688893672224414332916,\ +-0.7497508971113807652031,0.8268999681758193442960,2.2753757356206412154620,\ +-0.3872960166494098244172,-0.0799160908491712979052,-0.1884631346495315440404,\ +0.2094439405660133701748,0.3401928613448036986533,-1.2494684410199645707706,\ +-0.2979401746978811993394,-0.5157853813810977516852,0.7932915899466403963913,\ +1.5620570356415210966361,-0.844359823617092053460,-1.0437648196696975855247,\ +1.932990034770735388037,0.1853438341489616059121,-0.9962801836788344189699,\ +-0.5388351087532706751304,0.6070505636662814064053,1.5888625026588754085566,\ +0.2617832537783132407228,1.1970490473872079650874,0.12578128394682370,\ +1.39770280807620150831,0.2099988595145213798876,0.3421775699723230701466,\ +-1.8782261453279518459425,-0.6664189835307311460255,0.8127373993936040097452,\ +0.3767873922208855863580,-0.6374952135371538819442,-0.974468710244571822976,\ +-0.6722228555627711710230,0.8585099013504803311392,0.2446046980188737729467,\ +-0.9043973313471151964649,0.1358880163960933251666,-0.7695067786636404782996,\ +-0.8938327489087023458580,-1.9114553148531847615033,1.0171770494404650531095,\ +0.1835886481619793952902,-0.3163377812153213564095,-0.9195862784206330076131,\ +-0.1072018571251609070361,-1.7348283435296543153470,-1.0280015900042309695550,\ +-0.1045837022850216735392,-1.5256722999247080974072,1.1084725864612092749439,\ +0.6805135215035358342561,1.6689686098271181435848,0.2989927467898484958475,\ +-0.5006434061857586437227,0.7116857998261418849495,0.2485278541920327155523,\ +-0.6900291112600369647367,-0.6267355965803992345897,-0.4282667464892624953343,\ +-0.7336468298863978443336,-0.3574021092257179676999,0.2860336762162377644003,\ +1.1425687805503488281289,0.6919758815746888114262,0.8010668577124011591195,\ +1.7767980155474207837329,0.197833004692656910795,-1.8362538605563030191803,\ +0.3869279168511000066566,0.5325960336459322208569,0.0883113910959548165103,\ +-2.6418732644466236259007,-0.6564988101863107328171,-0.5566003466732061255584,\ +-1.479779603028395396080,0.1430519638431400619716,0.4320971393139262928251,\ +-0.3181852113191626640898,0.5371570151959671468589,1.4535234978041589037900,\ +0.3101271616559506116850,-1.340732344843439172166,2.060471964067395411746,\ +-0.0787601433757613156317,-1.0771984898755455617447,0.5648344207720079612756,\ +-0.3508614616179664413842,-0.9690830277765453137917,0.5156195652795886319453,\ +-0.5293387239139798472465,-0.9571359764302782568990,-0.2269082544310593585468,\ +0.4895059752188103407988,-0.2522128725839323237778,-1.4975804078553673903684,\ +-0.1603766798935232218426,0.1464267186008629817451,2.1615853347433549025425,\ +0.0399126120226646896594,-0.5544284809990485118902,0.5328414558183197646812,\ +0.3907850242802237139550,-0.3787774013072854883966,0.8417359908290755754479,\ +0.3176700186731257757877,1.592244506660871694592,-0.9951932381029318097632,\ +0.0410951006109449151760,-0.5188832355843150390129,-0.4767385649438746209050,\ +-0.3777777846485093071749,0.7910209775449256186519,-0.7086741723196363640369,\ +-2.3537808974280172158444,0.3583714955858253170540,-2.508952017613233387294,\ +2.087806522953977506063,0.2382312089001768218299,1.9833918106929020463980,\ +-2.167582574594525635092,-1.401225926702102553278,0.4640426253451597760069,\ +-0.3076759844353880168910,-0.7615259380675128975113,-1.1385700743993105721330,\ +-0.4270402705994392755784,-0.0367498239842839885538,-0.9128849844856976591956,\ +-1.9549432857416617626001,-0.8811112725878604834406,2.9821802878266292502474,\ +-1.7022507648063245344616,1.2487885639051212738337,0.0676735499770482057391,\ +-0.2367248998667950132813,-0.5285347231086527930444,0.7141648125067473484862,\ +-0.5878970571029352720771,-1.1459325979718588683909,0.4680548872241794833293,\ +-0.6843012596069305564228,0.5355357649056337043803,0.1540760632792411710668,\ +-0.6157450195036280327088,-1.41787024661118454816,-0.4570344170862304378211,\ +-0.1411796126420029884319,-0.6614438004746325816541,1.5436797442842080663183,\ +-0.0655012358215935341921,-1.0114218055676069685234,0.1895887411932805077797,\ +-1.2984646974992717360919,-0.5015613008687210827574,-1.162209366222186623929,\ +-2.509167640329787563047,-0.4405707024000362626026,-0.3943332184880063984167,\ +1.2805404560028668115024,-0.3061569333239507750832,-1.1420665340809226240282,\ +1.0167026164121319986577,1.958453071130288769552,-0.8471715882458593638304,\ +2.5258191429986913689731,-0.2048087265120654143491,-0.4182027716366760183853,\ +-0.3527210857802417498519,-0.5595241893671244470809,-0.6478265699785845654901,\ +-1.0507861982209916185127,0.7848448646063929112771,-0.1328983392812562724927,\ +-0.8579290931640745077047,-1.0403775604411991118070,-0.0520608986196072903718,\ +1.276568442453563045902,1.4203725991168176800983,-0.1287251249804796937592,\ +-1.959471210760952208929,0.3404865901494299462726,0.3700863012564228338164,\ +0.9399888255640819201275,0.4874471402488251836616,-0.9277526481559981164082,\ +1.4687996535197915815019,0.6577767757776173951356,-0.2596038157216366548674,\ +1.1286217610308955094922,0.0284581900701165874112,-1.2794761544488175708523,\ +-1.1137434890242723373177,-2.2955389951107569856958} + +#define ZSOURCEI {0.1918412521642277324130,0.4822328106056159024995,2.4722523083922975928317,\ +-0.1999085627658134245443,0.2290361675784305939274,0.1385769022152809337722,\ +-0.1308449665803144978948,1.8188246235702238973175,-1.360744719214450615397,\ +-0.8851525561710794631765,1.8831231089443882797951,-0.7390687967111120304509,\ +1.1162950684058663419762,0.5417636328738030249141,0.9074880499974204983715,\ +0.1136822955664789497332,0.5661113725007503871822,0.7795296942845783005893,\ +0.5870328147250098993482,0.0887163653774847987821,1.3588131422838234385608,\ +-0.7770801239208607880116,-2.1816983571681287656929,-0.6867928574771322569603,\ +3.132774112529277399375,-0.5876856927977032185595,-0.5468023513790022383,\ +0.3644381766801820243806,0.9444714440193706650462,-1.0355805625638589972937,\ +1.6339838311734231623973,2.3222150378340997711746,0.7603859366849585743608,\ +-1.7528561088374936538514,-0.2830657824851525727894,-0.5082187590533610022092,\ +1.2854936372804377509027,-0.1071924175739472628877,0.0680608377011317072780,\ +1.2478214718780462622050,0.2022362844423137018257,-1.1601145695370460586560,\ +-1.3732471859884713971667,-0.0871747108156779304533,0.3318121744832343011922,\ +0.813877556086732623086,0.6766249185129517007553,0.2594423975862346631871,\ +-1.2199874507987620297911,-0.9897424388234272729648,-1.5501341727479884813334,\ +1.3236241898041882780745,-0.6342132090900320928739,-0.4029346079915554490469,\ +1.3618162247590774871497,-1.2268551088323862430229,-0.0165544865341302541162,\ +0.4697449293077746168557,0.5129232238932224241523,-1.2864890116754716942182,\ +-0.5815154649104360418121,0.0042198993973377365435,0.4217149352171605802830,\ +-0.3269590438815029309616,-0.2713027722538356445448,0.9981558319993941719162,\ +-2.0584511427735407984585,0.6360071281896889638929,0.7792532924825519291545,\ +0.8152290078526440719742,0.302690835462471330430,0.7846292874622610158397,\ +1.3471935456922272678071,0.0235796939592457371893,0.8341783427284864549378,\ +-0.8042305059271110945218,1.2811212643144183065402,1.109535684815037281936,\ +1.5542750631114032877633,0.2918299696375577512164,1.0694551283559152743408,\ +1.2577061015533308463432,-2.904044346742185922494,-0.2870782813229341146055,\ +-1.2760057024544790849063,0.283985753428556031430,-1.3175328345022150333676,\ +0.8988284250430720323521,-1.8112538507045783386928,-1.0995994665801063217003,\ +-0.4449820788080595668212,0.5855247264136794749234,-0.7093745947817804431423,\ +0.1905828492221817993535,-0.5445080014401588730522,-1.365437721272832805042,\ +-0.6751146881456216997108,-1.1868018509166287088874,-0.8652762231421259331299,\ +1.3117247998219794258290,-0.2796512899932403484193,-0.2218002038379895402009,\ +-1.9751109128000410297687,0.1122673197507930292760,1.2555755229270146866583,\ +-1.9515162530964744735940,0.1977614186013104402573,0.2974354172914404070838,\ +-0.4957061458086293725955,-1.5054836292812976417110,-0.6943524973783626874635,\ +-0.4602840002479897663079,1.3936515683502606055555,-0.0740340331806867979481,\ +-0.6177784175603027172485,-0.2145874798022777973916,0.8980342752260660477148,\ +0.0337374057866826476682,-1.1446268541982025368497,-1.2555511561156762478930,\ +0.8386583904487018292784,-2.446562477109361033456,1.5119860122449106931697,\ +0.1869337784232076582480,-0.3349553867803892748256,0.131542782393392315710,\ +0.0174597275898690194873,1.778529610135566318974,0.618702552545296935449,\ +-1.6771343167918386640736,0.7435693095206714620105,-0.5379787827929278787309,\ +-1.5913674625260130213178,0.1780898508541619018608,-0.25671563034338790166,\ +-0.2862788634729842573989,-0.4906498481756356722094,0.3900012521547605026662,\ +-1.84205336065016078706,-1.5234366963806009742655,0.2365255965998115661453,\ +-1.7320610820689275044515,-0.2834038205636343343841,-1.5009852265404577398300,\ +1.7422292049682128745047,-0.2436614706579122158203,1.0689605525655874185276,\ +2.3690635117400145048805,-0.1930577380634317663510,0.2735573868128330365934,\ +1.5569516288681788385162,0.7150292123422491430418,0.5468099984878278529976,\ +-1.5473048247641658647922,-0.4396944448158471852039,0.3112403247843043563314,\ +-1.26537605009678144619,-2.3950841704590355440985,-0.2592078718414222993083,\ +-0.4387845364322502383914,0.7187054098642295940635,-1.2095433748027486497989,\ +0.1746582197927172008800,-1.1207357315790709151315,-1.2331864421831437717003,\ +1.040361177077658849655,-0.7973568364198504454521,0.4368277956791839500283,\ +1.3732228487397339922182,-1.520585040532598242180,1.0844121210894082096843,\ +-0.6034908039898051468342,1.691270204422151035573,-1.0147637811434373489305,\ +-1.543831005555790003569,-0.1908715944289217369967,-0.9777526617402377828725,\ +-0.5011593951678696701180,-0.6581745867398813842897,-1.222568274664002307972,\ +0.5739764929054486097826,-0.8178919175936580909791,-0.0839772392176704185474,\ +-2.2467727407263837768880,0.5311634003342166066020,0.0127028917577170375602,\ +1.4336465735979566638036,1.140130846486164140074,0.7078292602873598182711,\ +0.6419172762011019495176,-0.7752020495699509794463,-0.2227250211522007472542,\ +0.1418062472773869153730,0.3461143754334283229035,0.9346610138588777871860,\ +-1.1766714696487656777180,-1.155321545637316260624,-1.0348373990480448370022,\ +-0.4377198927182634480282,0.5342901632756290597470} + +#define ZRESULTR {0.6603968316049805276080,0.2592621892570787789367,-0.3318454617138371642859,\ +-0.2997813790812504652905,0.5587163403231363290047,-0.1189561420345783687713,\ +0.7381324458324397541631,2.142136719995466176414,-1.3458078751828295160919,\ +1.3129764303388649082649,3.3523257180963095258619,1.2630048090441925445759,\ +1.6535623505413692413413,1.0844508507590295831591,0.4550473771130031930277,\ +0.9621269818830543441024,1.013062998048058771516,0.9256575460351638140466,\ +0.0102887155976816024872,0.6668255580964917994535,1.0432946799591633624260,\ +-0.4668000327046901709593,4.4102457143090099123128,0.6767097030615227826189,\ +9.8624279257033951040512,0.9672974379596046556884,-0.0208338391589294388839,\ +1.0307881917288705952984,0.5404196044618572170037,1.5733521090107187578866,\ +0.4580812522816201659559,5.0350486020971887413111,1.2277369531593618212639,\ +-0.8994082908263842934815,0.8177424613018864363312,0.7782283917530580241717,\ +1.8099404305650070856615,0.8082102149385829159556,0.5629089875114635654896,\ +1.4748501127652635656062,0.6669768846821123586821,1.699726699407153374111,\ +1.298577834389474938703,0.9945484939786765066216,0.7581576733086236030701,\ +0.8456096567246286221931,-0.4135520032774342991111,0.5435636589621466452371,\ +1.810248147243165517395,1.4551350063240526822028,1.4924370356604863552263,\ +2.0000431078502241000194,-0.1972543510483453221838,0.5590324784918681011447,\ +2.068372118994307395923,0.0835345805491203158288,0.4460902185747692705320,\ +0.8645923158579836842463,-0.1111931823350623821378,1.8617144830169030100819,\ +1.02983082411914805832,0.7572686801513547338871,1.0567502136654132183224,\ +0.8128189945963255613748,0.8399378223031567225476,1.4017511305320988768131,\ +2.956644273924759147576,1.132754400798835492381,1.265693867178816711672,\ +0.5610629520868651853860,0.8055306977755860575741,0.9213852223586275203004,\ +-0.4199962882323669544071,0.9807673830270958736932,-0.3590470367287647013299,\ +1.2420524197984359471292,1.6706050779946230999684,1.6747789118158156185245,\ +-2.16927668845889520810,0.8261050353521025568782,1.3826822282594428692448,\ +0.1727680624199215975167,9.057823043102500193413,0.9457668311290795548629,\ +1.833812877114292083647,0.8940453644463330906689,0.2341249670166324903242,\ +1.363576337757532064288,0.7162232362688260023376,-0.7845189065148089335722,\ +1.097237008647440115183,0.5573625517969845732935,1.0662662205819704031029,\ +0.9561831479074293094200,0.6520642360884429944434,1.8151009640860991112277,\ +1.0674278234021243871865,1.0313090898160910402481,1.3624555698791520619295,\ +1.757155073751679230654,1.0064753136983999315390,0.0749572440340378898238,\ +3.6259465360107721032534,0.9955398364095786600814,-1.0568745874589622336,\ +3.5878460752889553830869,0.8668812254131966765769,0.8997505054992860351604,\ +1.040555384796898463762,2.1965462296781987916461,0.8333142225488954224488,\ +1.0523855335407785727142,-0.0458709738274477793474,0.5458332569596060501738,\ +1.195961273756254605871,0.8884437146730177481402,1.2715015087988947861675,\ +0.9300156339115848158627,1.2162605499523735375078,1.4405129668915395146911,\ +-0.9683533444224800001976,5.4479898316980985839564,-1.9178644985834492064924,\ +-0.5029446665597729904107,1.0267816742413071740003,-0.4044626121435637711166,\ +-0.5620727987859718277619,0.5138734552212488315703,1.0709367349326839313761,\ +2.6385439370616894372290,0.9332628709668898681073,0.4809878535892211925962,\ +2.3274184357315248483644,1.0152140200890447108151,0.6317250697033859330176,\ +-0.390230756302790915413,0.7144330074150475606842,-1.0633635201019895344388,\ +-0.4238985166974506557658,0.7604701169947127858961,1.0257495217324759106958,\ +2.8333209029821588842424,0.8984586856426056700187,1.7791621377373312284931,\ +2.4485583447413197255571,0.4244935342539479794510,1.4527777983860266086680,\ +4.1768674382240673637057,0.8760717584983536143639,1.025358467451832122919,\ +2.0225373659775809365158,0.1929591577071132768584,1.0348979760988403775457,\ +2.4313713775277490114490,0.8666224950927583492444,0.0284371329577691699109,\ +1.9091763626738669223926,2.934604495210217045553,1.0152593733387236252241,\ +0.2952893892910067874524,1.1132087589342971600814,0.7251532821639393722180,\ +-0.8189305685602711326609,1.5345662883929571673747,1.7188713168135731912400,\ +0.4555641729620423796554,1.273008943337736509349,0.4560137683691281029752,\ +1.1053164018215166919390,-0.9060167575034622222674,1.0910838839542402745053,\ +-0.9695473009615381831949,2.7466955042474223702698,1.4261078323829836644876,\ +2.297318046615583586600,0.8629928731306283351543,1.2099030156571450866920,\ +0.5606054313387058840590,0.8663522170995916482639,1.8289146898108739058841,\ +0.7647265415048952741373,0.6847484857113015355168,1.0021685183539132957264,\ +1.3866261204365910586489,0.1714987437851132057176,0.9918063704778133926609,\ +-0.8398571556569223162114,1.624536447087556512159,1.17576217917109437927,\ +0.7155426268638502840247,1.1625689563760244205071,0.6145684296686997338810,\ +0.1028453801776162412907,0.8392286126386587774562,1.4202930257299617444744,\ +0.7599315975784372012569,1.74429364867563263530,0.4552293130713663815712,\ +0.4842614797058485409664,-0.759839135565466450295} + +#define ZRESULTI {-0.146941580724984616202,0.4874941601771347610139,-5.8732506000776529830887,\ +-0.1923557391894928081388,-0.1938092227520436805488,0.1380525220047903456333,\ +-0.0894197912409416678647,-2.2083871916990625017263,1.38762940282270652581,\ +-0.379707247416236348680,0.2563331150684992620903,-0.1514182976925468326890,\ +-0.2833925825567581990860,-0.1897432487381172094842,0.9841855659814751078329,\ +0.0334435644614089755411,0.2943712296517632109882,-0.6135431940236653058918,\ +-0.6213108038265401367184,0.0664065988188502348555,1.5707022449109617756591,\ +0.8020378110570226537490,0.8061058304221635495423,-0.6229364595259883063960,\ +5.873854580840536243613,0.3548772564844954735541,0.5743671991358663131422,\ +-0.0964195772855189620065,-1.015948375800173053563,0.1544112964905340057431,\ +-2.427720301875694985938,-1.0527358981959802353146,-0.2804463002040958885530,\ +-2.667664304679369102757,-0.1773304122311009645152,0.3851475525760940099573,\ +-0.6144403782537597447089,-0.0639215126270850642065,0.0563572709924226103451,\ +0.9949983775946195097006,-0.1541120072724549983079,0.3483472405495082191429,\ +-1.4521802331617248427165,0.0118245383836800051908,0.2351284238449595775933,\ +0.7067939417094389886742,0.6875306193270583898780,-0.2231728770983253673510,\ +0.2822282491943420845715,-0.3606863345205877369182,-1.789492973412827536706,\ +0.1867542931864467348202,-0.6684973125435003105110,-0.3544323112754915183764,\ +0.1903651481757896168912,-1.5570503331148395353978,0.0148172477875626266292,\ +-0.3065501441038122609761,-0.5331323204569118345830,0.4924734236714592428008,\ +-0.2951210995789439461845,-0.0027560721209946860942,-0.1068344484336290478588,\ +-0.2118570413928013151939,-0.1610793407630224660654,0.4868738628243398092188,\ +-2.579960937463402714798,0.2378086541486917060428,-0.2428029308169650513083,\ +-0.8265359232776167131007,-0.1960976284506159017518,-0.6230605514253650945022,\ +-1.755406116186124965139,-0.0046349019875992188491,0.9016172621635419881514,\ +0.3372605888766848636351,-0.8436494304870341132130,-0.1192082555849750258314,\ +1.0830200228715931576318,0.1806566116072005345750,0.6790264707808069122308,\ +1.609828137915977341876,1.2968382390971706641380,0.1218796661012466753249,\ +-0.5166846594494688416077,-0.1472753279361777856149,1.7212963380251158351797,\ +-0.3127599294310591804269,-2.89888504993117113173,1.1780998114195078141364,\ +-0.0361775267207019371463,0.5456053298268405127303,0.4123679880285295307196,\ +0.0659019050150095875296,-0.4713866341281334748636,0.9028599597514885832794,\ +-0.3674007976866919822356,-1.2146233237644410429823,-0.2198736582857065691154,\ +-0.8094828887322721433506,-0.0706994284778254822310,-0.2230241649514515533959,\ +-0.5643984283124198197967,-0.0164146852495472492239,-1.3391611472776376867699,\ +0.1376079760459386902571,0.1047929421413649753170,-0.1533297870650806860038,\ +0.1966501815957944765412,-0.7921571860524847519258,0.5604745942609183906313,\ +0.1489022072975806909589,-1.8902500881495403195487,-0.0621612461401919516590,\ +0.0270260228763795351536,-0.1072348104191992446133,0.4697601544599027123539,\ +0.0124466007411300864927,1.0036512376933612866736,-1.049412060795365198018,\ +0.6666269392002136529030,2.010144371510963257066,1.2757551800142050701936,\ +-0.1634497680436179101182,0.0805305413426501415231,-0.1208519512813724661182,\ +0.0144424770778995917309,2.8348773781599185817015,-0.2949185744370810824400,\ +-0.7818376664535492404084,0.5616872313168002062156,-0.5124110438039969350754,\ +-0.9747306641614861266731,0.0065779403553887496811,-0.205370183808804979142,\ +-0.269054670595636091779,-0.3938808526857590086578,-0.0634893958645683514908,\ +-3.0489600352607997280074,2.072697136598120604134,-0.0161438616695122189038,\ +-0.6420425137334005993850,-0.144832386550082847787,1.3961681016866522853093,\ +1.534869934827646220654,-0.2242019675630647912445,-0.5795004710241905554469,\ +3.3483419852888491874410,0.0991308462877908275201,-0.0425076535895645771235,\ +1.309216767461068409162,0.7684601350295457988793,0.2535070961278987344834,\ +-0.3156127379694732559834,-0.278872470151356244283,-0.3161734445550384298151,\ +-0.106765701893629952335,-4.6100082079818358593570,0.0493978828262259944681,\ +-0.4363059774746961272385,0.3760761368145200678192,-1.4011279329067940491171,\ +0.1037666142610354780285,-0.5844725415055048722834,-0.6033334328120393275086,\ +-1.1866522252940947534938,-0.2666075239397875384917,0.4100487177769164826024,\ +-1.570972740050773142073,2.0165334475753500242945,0.9815781508770222707483,\ +0.3701172711568467832421,0.5330671903876023076663,-0.4865756887562372456912,\ +-0.7719024118076073248673,-0.101927682205751976574,-0.6886382760934363078675,\ +-0.4533487312581489514507,0.4994598581237761347751,-0.2054810163364952091403,\ +0.4584447177031794051771,-0.7868410449880314239124,-0.0043750939988532102504,\ +4.4747804523350742655907,-0.5502105833706960602569,0.0016307130557308498371,\ +1.83024619927524345719,-0.4687597592810309743427,-0.2779394557997144632466,\ +-0.5547224826362566751925,0.400556327585974369931,-0.1797184375596841132694,\ +-0.1415425280521077078255,-0.2158502978608074218680,0.2764160437046866980459,\ +1.326476685000083532984,0.0406909700160508550071,-1.1778701919064038516893,\ +-0.4054547584096580559176,0.419311934137157338309} + + +void dcossTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dcoss(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zcossTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zcoss(in); + assert( fabs(zreals(out)-resR[i]) < 3e-15); + assert( fabs(zimags(out)-resI[i]) < 3e-15); + } +} + +void dcosaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dcosa(in,200,out); + for (i=0;i<200;i++){ + assert( fabs(out[i]-res[i]) < 1e-15); + } +} + +void zcosaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zcosa(in,200,out); + for (i=0;i<200;i++){ + assert( fabs(zreals(out[i])-resR[i]) < 3e-14); + assert( fabs(zimags(out[i])-resI[i]) < 3e-14); + } +} + + + +int testCos(void) { + printf("\n>>>> Double Cosine Tests\n"); + dcossTest(); + zcossTest(); + dcosaTest(); + zcosaTest(); + return 0; +} + +int main(void) { + assert(testCos() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/testFloatCos.c b/2.3-1/src/c/elementaryFunctions/cos/testFloatCos.c new file mode 100644 index 00000000..98353b3d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/testFloatCos.c @@ -0,0 +1,494 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testCos.h" + +#define SOURCE {0.6087216374946681218816f,-0.4914009399790010834685f,0.2966492127240239473629f,\ +-1.0120131171793795843428f,-2.1768580524449996360659f,0.0399891371904198267284f,\ +0.3264664449949340463419f,0.3928915710000103755917f,-0.9023248339668938911018f,\ +-0.7061054028011619632110f,0.6351420537982425118528f,1.7243031942788638044561f,\ +-1.193843423508647916265f,-0.6699486724870092890782f,0.9455390047179551560319f,\ +-0.7269584830448905243827f,0.0587220167793607444873f,0.7465722023081590164040f,\ +-1.8115798920517958148224f,-2.7758706356233147083401f,1.6672616062636114175888f,\ +-0.0836705642425854267952f,0.3278617890836109105557f,-0.4784618803967296551960f,\ +-1.5167866307363953026766f,0.3278666902123760218402f,1.4583399615307341967707f,\ +0.1568728504489345088f,0.8788327319516627822438f,0.6503974594047504664829f,\ +-1.2192475208695570110251f,1.1760897921697979207067f,-1.8443279857673484656289f,\ +0.7800878370874437806037f,-1.7143820612787801227483f,-1.2442138561935551788196f,\ +-0.5030865876060848229656f,-0.7500891916411158710787f,0.0131204357988426462828f,\ +-1.3051873378120935065283f,-0.4721103394959948462706f,-1.08171405175402890464f,\ +0.1772346225663179453136f,0.0709726766378662859980f,0.5997183167182360552516f,\ +-0.7982542475055777186910f,1.1146919091581586336304f,-0.5226194052411643475864f,\ +-0.3280122727754089528851f,0.0845844607820355476324f,-0.4076056231156577891461f,\ +2.671024580732940023609f,0.2751537532064078916960f,0.6141628828811964702084f,\ +-0.7694928564341785293124f,1.5452838740749164081478f,1.2047554263319388834219f,\ +-0.4418728868867642933793f,-2.3845314085200706166745f,-0.4507303538478215632068f,\ +-1.2843948816610906149549f,0.6258568994217935665958f,0.5221599455292258440409f,\ +0.6881147826420792590341f,-1.5350411433640571701176f,-0.9627472135269001807245f,\ +-0.5218069771892938080171f,0.1257945676013507985136f,-1.6629602539620385037722f,\ +-0.1168122168368753571732f,0.6319751771097191772597f,0.0279680711838030011951f,\ +-1.0789454333610759562134f,-2.2539675570413915117740f,0.0159524501831603895963f,\ +0.7246005623822228125519f,1.3584241656028799294376f,0.1335331404272114830256f,\ +0.8003059664568770159576f,-1.5933335032689068810896f,-0.2766963701941145270524f,\ +-0.1259819476132254256751f,-2.1871819624452908392698f,-0.0027183437417650840526f,\ +0.0895441283705892265843f,-0.0655528187812533247314f,0.0082181667448872272597f,\ +-0.1292799439278431716804f,0.8059814954561199673577f,-1.0227158239595737221350f,\ +-1.1728578375397291644333f,0.3095622814458759419765f,0.4085150016548139140227f,\ +0.4376992889872045044974f,3.0932123457325086945957f,-0.2404500241757465406334f,\ +-0.2553482065690487190501f,1.0058683512127921666490f,1.8395637792194936555035f,\ +0.3411429898658094317376f,-3.0536685582128435534344f,-0.1095788307430261981912f,\ +1.6414918920137913094237f,-1.0744672373614887472826f,1.5353378953533194373193f,\ +-0.8528406784492137404641f,-0.7422456212235352124296f,0.1342811638770788351671f,\ +-1.6549750406888592557664f,-0.7256367869747750720677f,-0.0862485588565954086615f,\ +-0.0561038363580659213414f,-0.0030846890449726638815f,0.2539566584786872027735f,\ +-2.255576969911772700073f,-1.7353562843564334094992f,1.4790955315931679781016f,\ +-0.6277258320505759714436f,-0.874734985447433444072f,1.7535503835541961237254f,\ +-0.8019918985373268860428f,0.2826253943812546687298f,0.9297345065408313402600f,\ +-0.1628091770786383452041f,-0.5361503318172788912221f,-0.1559543394910963276523f,\ +0.4214606760227143644748f,1.9422068405845787086861f,1.126122745997659491124f,\ +-0.3806596390838080656849f,0.2838150495409667017910f,0.5356418000869134221631f,\ +-0.8698259506453359657385f,-1.4811954887734988250969f,-0.6640101248288414748089f,\ +-0.8768395331826340788339f,0.1637943427647920169310f,0.8023136616688257838348f,\ +1.9190648920981443481537f,-1.1659867862660415749332f,0.9175250832331292016875f,\ +-0.4629851548188154697350f,1.1531379126231540155345f,1.280357188491430875388f,\ +0.8752030571429955108087f,-1.80360898378670553299f,0.5261137866109517613467f,\ +0.0015036147858927245008f,-0.9395126502065724860557f,0.1254332133415215488892f,\ +0.7981010350443900058792f,-0.7787639258289269506008f,-2.211373434923878722458f,\ +0.4245313340753193442900f,0.4777310697112210347015f,-0.7091015173222630085803f,\ +2.5269774755909995000991f,-0.5189834616032670266961f,0.7465455379507028865760f,\ +1.6922232637382539355286f,-0.7527036628439752741215f,-0.1791091421294778995854f,\ +-1.143803039940205490410f,-0.3557089242818732288676f,-2.5859928945830414903639f,\ +-0.4620292997028574988327f,2.1043646801028508264153f,0.2700104378784371483846f,\ +-0.5683100411735593215923f,0.0576234736047250076241f,-0.3494123351876678440497f,\ +-0.6437179916333417573071f,1.1183843932324186720706f,-1.7070244497383502135790f,\ +-0.5423910203569126675660f,1.478528409100926088726f,1.4635937207455358421981f,\ +0.9926533118110351106012f,-0.7069946768514858703725f,-0.7247022468472048561949f,\ +0.0958136359005943571976f,-0.3502577985930430126693f,-0.7552136456030923428173f,\ +0.4974020403078212582137f,-1.1482817888259779781635f,-0.2861580091485689814057f,\ +-0.5017215979538576231533f,-0.6146143460074020570261f,-0.8743941016318307335453f,\ +0.6112858348465053381915f,1.1276508199848169766710f,-0.6796253617896085286176f,\ +1.0967206821241466396799f,0.3644470031679390431556f,0.2076189090924974445240f,\ +-0.5458105472995297136052f,-0.0671640776881476525562f,0.9301013215147568846675f,\ +1.4191187165731935504454f,1.9739542618337482249302f} + +#define RESULT {0.8203796801888452172591f,0.8816726743563225721090f,0.9563213494741442666225f,\ +0.5301548730715204271746f,-0.5696350270974277485436f,0.9992005409985472708101f,\ +0.9471814588690369296486f,0.9238058529293791121262f,0.6197871850499613310959f,\ +0.7608947481851529026642f,0.8049874252319156875402f,-0.1529046956055711559141f,\ +0.3680890208730970281081f,0.7838535385146575551474f,0.5853059322813873865954f,\ +0.7471992477828661716188f,0.9982763577574981228580f,0.7340210854728602685171f,\ +-0.2384636600673788464633f,-0.9338657938993391027793f,-0.0963157386477964672089f,\ +0.9965016599751398418405f,0.9467330527147245211594f,0.8877041448701339376726f,\ +0.0539834417486552073373f,0.9467314744445589624888f,0.1122194864288899307514f,\ +0.9877206673462950448084f,0.6380503687973807513956f,0.7958431986465404062159f,\ +0.3443523016260275904088f,0.3845373047091283913446f,-0.2701334763293031793197f,\ +0.7108517612540402597077f,-0.1430928615933441672148f,0.32080801483743826008f,\ +0.8760985949432102959378f,0.7316280694838999121288f,0.9999139283169750092028f,\ +0.2624969502467918158750f,0.8906105597759395031687f,0.4698159512131697135295f,\ +0.9843350146218102780793f,0.9974824965990314318276f,0.8254946325091827574738f,\ +0.6979579732366844035951f,0.4404541009116093031039f,0.8665146735535679267670f,\ +0.9466845833195259851678f,0.9964248667932769087940f,0.9180726139212290748404f,\ +-0.8913108719456435125039f,0.9623834350402660220425f,0.8172561425171237514675f,\ +0.718263617781651042549f,0.0255096851968806929978f,0.3579214307842031317364f,\ +0.903952340447022550940f,-0.7268574491788566405148f,0.9001291834726419249790f,\ +0.2825020879048804056666f,0.8104614523160890149356f,0.8667439221341659560949f,\ +0.7724446547102603588542f,0.0357475654825572253248f,0.5712673305171682702763f,\ +0.8669199123046601451748f,0.9920982915300309290529f,-0.0920335062605047438122f,\ +0.9931852073290609039802f,0.8068622676403011118040f,0.9996089189905136285219f,\ +0.4722581851967700972139f,-0.6312557202207959017315f,0.9998727623649044105036f,\ +0.7487642434889083542515f,0.2107793581335721255776f,0.9910976901702407415584f,\ +0.6964871898378746095659f,-0.0225352686591101247782f,0.961963168947402524900f,\ +0.992074764843193790398f,-0.5780897184534614652307f,0.9999963053059259809885f,\ +0.9959936026023269439733f,0.997852183268367110003f,0.9999662310577351886920f,\ +0.9916549805054094557377f,0.6924034092861499622984f,0.5210498486203913870440f,\ +0.3875187390378670992952f,0.9524670084743368514424f,0.9177117455650365407394f,\ +0.9057292314266010002655f,-0.9988299011655918935304f,0.9712309045685737496356f,\ +0.9675754035185222257098f,0.5353549836201899614352f,-0.2655433409023978952312f,\ +0.9423728774251888262725f,-0.9961371662051550224248f,0.9940022450449995661259f,\ +-0.0706366921418750404182f,0.4762007884740003804680f,0.0354510015922323284965f,\ +0.65784633984897000758f,0.7369525027778347503471f,0.9909978235616448971612f,\ +-0.0840793332663393455650f,0.7480769942249303472437f,0.9962828981406220973938f,\ +0.9984265925479938186271f,0.9999952423505205079124f,0.9679259470687455735316f,\ +-0.632503122148043273043f,-0.1638182491633654591645f,0.0915723300147998908738f,\ +0.8093652317898135661878f,0.6412002458492904732879f,-0.1817384524188947747536f,\ +0.6952764275967198148720f,0.9603265844478726664946f,0.5980467860661466961147f,\ +0.9867758355724630670025f,0.8596815738538068352170f,0.9878637498486452228619f,\ +0.9124923605358673528443f,-0.3629301323805959045288f,0.4301632279198022157374f,\ +0.9284197599136463363578f,0.959994136496382766133f,0.8599412360983218484023f,\ +0.6449595684306472787028f,0.0894809955848772375919f,0.7875272110120042912129f,\ +0.6395838526894777054110f,0.9866156703762346547038f,0.6950451267922697073942f,\ +-0.3412708317791682266495f,0.3938437014688686566011f,0.6077873470346980555590f,\ +0.8947232532371431901197f,0.405621261011146261311f,0.2863729991092465732017f,\ +0.6408409897588510650834f,-0.2307152077489570130009f,0.8647651606784810818240f,\ +0.9999988695715007480658f,0.5901815182487093469632f,0.9921435633684139165922f,\ +0.6980676864202854936536f,0.7117823002210422744795f,-0.5976582378696937425389f,\ +0.9112318735935986957486f,0.8880403834946687391394f,0.7589472311619362976387f,\ +-0.8169954127513406882954f,0.8683238289487801297994f,0.7340391936884439472166f,\ +-0.1211287602524158124595f,0.7298432754851863490941f,0.9840027922687679673430f,\ +0.414135922956764768177f,0.9373998379717353168772f,-0.8495842484392269744475f,\ +0.8951497493851807707443f,-0.5086089166239101677647f,0.9637681122030780089815f,\ +0.8428117284541520870533f,0.9983402269892645009008f,0.9395740596053013815592f,\ +0.7998698514817192961601f,0.4371360854041511645462f,-0.1358071578606558360569f,\ +0.8564769211630707257399f,0.0921370549444396474970f,0.1069973881579713986811f,\ +0.5464696941763740323239f,0.7603174194154225240538f,0.7486968394521967828936f,\ +0.9954133840567818136691f,0.9392842830606296100626f,0.7281251176521188472890f,\ +0.8788251271401545938744f,0.4100551583355765972172f,0.9593354263834207307227f,\ +0.8767558837388640391453f,0.8169958925140410332943f,0.6414617938312918710153f,\ +0.8189107275146941811172f,0.4287832557249183773607f,0.7778082340710044118026f,\ +0.4565162294470550552461f,0.9343210101535780465198f,0.9785245037094734144034f,\ +0.8547068075395470865274f,0.9977453410917197507146f,0.5977527578720709389160f,\ +0.1510966938752993093953f,-0.3923250465140346587845f} + +#define CSOURCER {0.8652785065984375245662f,-1.3368838685782120645484f,1.6264408224927449087005f,\ +-1.8690897079220740728545f,0.9951518628175756164822f,-1.688893672224414332916f,\ +-0.7497508971113807652031f,0.8268999681758193442960f,2.2753757356206412154620f,\ +-0.3872960166494098244172f,-0.0799160908491712979052f,-0.1884631346495315440404f,\ +0.2094439405660133701748f,0.3401928613448036986533f,-1.2494684410199645707706f,\ +-0.2979401746978811993394f,-0.5157853813810977516852f,0.7932915899466403963913f,\ +1.5620570356415210966361f,-0.844359823617092053460f,-1.0437648196696975855247f,\ +1.932990034770735388037f,0.1853438341489616059121f,-0.9962801836788344189699f,\ +-0.5388351087532706751304f,0.6070505636662814064053f,1.5888625026588754085566f,\ +0.2617832537783132407228f,1.1970490473872079650874f,0.12578128394682370f,\ +1.39770280807620150831f,0.2099988595145213798876f,0.3421775699723230701466f,\ +-1.8782261453279518459425f,-0.6664189835307311460255f,0.8127373993936040097452f,\ +0.3767873922208855863580f,-0.6374952135371538819442f,-0.974468710244571822976f,\ +-0.6722228555627711710230f,0.8585099013504803311392f,0.2446046980188737729467f,\ +-0.9043973313471151964649f,0.1358880163960933251666f,-0.7695067786636404782996f,\ +-0.8938327489087023458580f,-1.9114553148531847615033f,1.0171770494404650531095f,\ +0.1835886481619793952902f,-0.3163377812153213564095f,-0.9195862784206330076131f,\ +-0.1072018571251609070361f,-1.7348283435296543153470f,-1.0280015900042309695550f,\ +-0.1045837022850216735392f,-1.5256722999247080974072f,1.1084725864612092749439f,\ +0.6805135215035358342561f,1.6689686098271181435848f,0.2989927467898484958475f,\ +-0.5006434061857586437227f,0.7116857998261418849495f,0.2485278541920327155523f,\ +-0.6900291112600369647367f,-0.6267355965803992345897f,-0.4282667464892624953343f,\ +-0.7336468298863978443336f,-0.3574021092257179676999f,0.2860336762162377644003f,\ +1.1425687805503488281289f,0.6919758815746888114262f,0.8010668577124011591195f,\ +1.7767980155474207837329f,0.197833004692656910795f,-1.8362538605563030191803f,\ +0.3869279168511000066566f,0.5325960336459322208569f,0.0883113910959548165103f,\ +-2.6418732644466236259007f,-0.6564988101863107328171f,-0.5566003466732061255584f,\ +-1.479779603028395396080f,0.1430519638431400619716f,0.4320971393139262928251f,\ +-0.3181852113191626640898f,0.5371570151959671468589f,1.4535234978041589037900f,\ +0.3101271616559506116850f,-1.340732344843439172166f,2.060471964067395411746f,\ +-0.0787601433757613156317f,-1.0771984898755455617447f,0.5648344207720079612756f,\ +-0.3508614616179664413842f,-0.9690830277765453137917f,0.5156195652795886319453f,\ +-0.5293387239139798472465f,-0.9571359764302782568990f,-0.2269082544310593585468f,\ +0.4895059752188103407988f,-0.2522128725839323237778f,-1.4975804078553673903684f,\ +-0.1603766798935232218426f,0.1464267186008629817451f,2.1615853347433549025425f,\ +0.0399126120226646896594f,-0.5544284809990485118902f,0.5328414558183197646812f,\ +0.3907850242802237139550f,-0.3787774013072854883966f,0.8417359908290755754479f,\ +0.3176700186731257757877f,1.592244506660871694592f,-0.9951932381029318097632f,\ +0.0410951006109449151760f,-0.5188832355843150390129f,-0.4767385649438746209050f,\ +-0.3777777846485093071749f,0.7910209775449256186519f,-0.7086741723196363640369f,\ +-2.3537808974280172158444f,0.3583714955858253170540f,-2.508952017613233387294f,\ +2.087806522953977506063f,0.2382312089001768218299f,1.9833918106929020463980f,\ +-2.167582574594525635092f,-1.401225926702102553278f,0.4640426253451597760069f,\ +-0.3076759844353880168910f,-0.7615259380675128975113f,-1.1385700743993105721330f,\ +-0.4270402705994392755784f,-0.0367498239842839885538f,-0.9128849844856976591956f,\ +-1.9549432857416617626001f,-0.8811112725878604834406f,2.9821802878266292502474f,\ +-1.7022507648063245344616f,1.2487885639051212738337f,0.0676735499770482057391f,\ +-0.2367248998667950132813f,-0.5285347231086527930444f,0.7141648125067473484862f,\ +-0.5878970571029352720771f,-1.1459325979718588683909f,0.4680548872241794833293f,\ +-0.6843012596069305564228f,0.5355357649056337043803f,0.1540760632792411710668f,\ +-0.6157450195036280327088f,-1.41787024661118454816f,-0.4570344170862304378211f,\ +-0.1411796126420029884319f,-0.6614438004746325816541f,1.5436797442842080663183f,\ +-0.0655012358215935341921f,-1.0114218055676069685234f,0.1895887411932805077797f,\ +-1.2984646974992717360919f,-0.5015613008687210827574f,-1.162209366222186623929f,\ +-2.509167640329787563047f,-0.4405707024000362626026f,-0.3943332184880063984167f,\ +1.2805404560028668115024f,-0.3061569333239507750832f,-1.1420665340809226240282f,\ +1.0167026164121319986577f,1.958453071130288769552f,-0.8471715882458593638304f,\ +2.5258191429986913689731f,-0.2048087265120654143491f,-0.4182027716366760183853f,\ +-0.3527210857802417498519f,-0.5595241893671244470809f,-0.6478265699785845654901f,\ +-1.0507861982209916185127f,0.7848448646063929112771f,-0.1328983392812562724927f,\ +-0.8579290931640745077047f,-1.0403775604411991118070f,-0.0520608986196072903718f,\ +1.276568442453563045902f,1.4203725991168176800983f,-0.1287251249804796937592f,\ +-1.959471210760952208929f,0.3404865901494299462726f,0.3700863012564228338164f,\ +0.9399888255640819201275f,0.4874471402488251836616f,-0.9277526481559981164082f,\ +1.4687996535197915815019f,0.6577767757776173951356f,-0.2596038157216366548674f,\ +1.1286217610308955094922f,0.0284581900701165874112f,-1.2794761544488175708523f,\ +-1.1137434890242723373177f,-2.2955389951107569856958f} + +#define CSOURCEI {0.1918412521642277324130f,0.4822328106056159024995f,2.4722523083922975928317f,\ +-0.1999085627658134245443f,0.2290361675784305939274f,0.1385769022152809337722f,\ +-0.1308449665803144978948f,1.8188246235702238973175f,-1.360744719214450615397f,\ +-0.8851525561710794631765f,1.8831231089443882797951f,-0.7390687967111120304509f,\ +1.1162950684058663419762f,0.5417636328738030249141f,0.9074880499974204983715f,\ +0.1136822955664789497332f,0.5661113725007503871822f,0.7795296942845783005893f,\ +0.5870328147250098993482f,0.0887163653774847987821f,1.3588131422838234385608f,\ +-0.7770801239208607880116f,-2.1816983571681287656929f,-0.6867928574771322569603f,\ +3.132774112529277399375f,-0.5876856927977032185595f,-0.5468023513790022383f,\ +0.3644381766801820243806f,0.9444714440193706650462f,-1.0355805625638589972937f,\ +1.6339838311734231623973f,2.3222150378340997711746f,0.7603859366849585743608f,\ +-1.7528561088374936538514f,-0.2830657824851525727894f,-0.5082187590533610022092f,\ +1.2854936372804377509027f,-0.1071924175739472628877f,0.0680608377011317072780f,\ +1.2478214718780462622050f,0.2022362844423137018257f,-1.1601145695370460586560f,\ +-1.3732471859884713971667f,-0.0871747108156779304533f,0.3318121744832343011922f,\ +0.813877556086732623086f,0.6766249185129517007553f,0.2594423975862346631871f,\ +-1.2199874507987620297911f,-0.9897424388234272729648f,-1.5501341727479884813334f,\ +1.3236241898041882780745f,-0.6342132090900320928739f,-0.4029346079915554490469f,\ +1.3618162247590774871497f,-1.2268551088323862430229f,-0.0165544865341302541162f,\ +0.4697449293077746168557f,0.5129232238932224241523f,-1.2864890116754716942182f,\ +-0.5815154649104360418121f,0.0042198993973377365435f,0.4217149352171605802830f,\ +-0.3269590438815029309616f,-0.2713027722538356445448f,0.9981558319993941719162f,\ +-2.0584511427735407984585f,0.6360071281896889638929f,0.7792532924825519291545f,\ +0.8152290078526440719742f,0.302690835462471330430f,0.7846292874622610158397f,\ +1.3471935456922272678071f,0.0235796939592457371893f,0.8341783427284864549378f,\ +-0.8042305059271110945218f,1.2811212643144183065402f,1.109535684815037281936f,\ +1.5542750631114032877633f,0.2918299696375577512164f,1.0694551283559152743408f,\ +1.2577061015533308463432f,-2.904044346742185922494f,-0.2870782813229341146055f,\ +-1.2760057024544790849063f,0.283985753428556031430f,-1.3175328345022150333676f,\ +0.8988284250430720323521f,-1.8112538507045783386928f,-1.0995994665801063217003f,\ +-0.4449820788080595668212f,0.5855247264136794749234f,-0.7093745947817804431423f,\ +0.1905828492221817993535f,-0.5445080014401588730522f,-1.365437721272832805042f,\ +-0.6751146881456216997108f,-1.1868018509166287088874f,-0.8652762231421259331299f,\ +1.3117247998219794258290f,-0.2796512899932403484193f,-0.2218002038379895402009f,\ +-1.9751109128000410297687f,0.1122673197507930292760f,1.2555755229270146866583f,\ +-1.9515162530964744735940f,0.1977614186013104402573f,0.2974354172914404070838f,\ +-0.4957061458086293725955f,-1.5054836292812976417110f,-0.6943524973783626874635f,\ +-0.4602840002479897663079f,1.3936515683502606055555f,-0.0740340331806867979481f,\ +-0.6177784175603027172485f,-0.2145874798022777973916f,0.8980342752260660477148f,\ +0.0337374057866826476682f,-1.1446268541982025368497f,-1.2555511561156762478930f,\ +0.8386583904487018292784f,-2.446562477109361033456f,1.5119860122449106931697f,\ +0.1869337784232076582480f,-0.3349553867803892748256f,0.131542782393392315710f,\ +0.0174597275898690194873f,1.778529610135566318974f,0.618702552545296935449f,\ +-1.6771343167918386640736f,0.7435693095206714620105f,-0.5379787827929278787309f,\ +-1.5913674625260130213178f,0.1780898508541619018608f,-0.25671563034338790166f,\ +-0.2862788634729842573989f,-0.4906498481756356722094f,0.3900012521547605026662f,\ +-1.84205336065016078706f,-1.5234366963806009742655f,0.2365255965998115661453f,\ +-1.7320610820689275044515f,-0.2834038205636343343841f,-1.5009852265404577398300f,\ +1.7422292049682128745047f,-0.2436614706579122158203f,1.0689605525655874185276f,\ +2.3690635117400145048805f,-0.1930577380634317663510f,0.2735573868128330365934f,\ +1.5569516288681788385162f,0.7150292123422491430418f,0.5468099984878278529976f,\ +-1.5473048247641658647922f,-0.4396944448158471852039f,0.3112403247843043563314f,\ +-1.26537605009678144619f,-2.3950841704590355440985f,-0.2592078718414222993083f,\ +-0.4387845364322502383914f,0.7187054098642295940635f,-1.2095433748027486497989f,\ +0.1746582197927172008800f,-1.1207357315790709151315f,-1.2331864421831437717003f,\ +1.040361177077658849655f,-0.7973568364198504454521f,0.4368277956791839500283f,\ +1.3732228487397339922182f,-1.520585040532598242180f,1.0844121210894082096843f,\ +-0.6034908039898051468342f,1.691270204422151035573f,-1.0147637811434373489305f,\ +-1.543831005555790003569f,-0.1908715944289217369967f,-0.9777526617402377828725f,\ +-0.5011593951678696701180f,-0.6581745867398813842897f,-1.222568274664002307972f,\ +0.5739764929054486097826f,-0.8178919175936580909791f,-0.0839772392176704185474f,\ +-2.2467727407263837768880f,0.5311634003342166066020f,0.0127028917577170375602f,\ +1.4336465735979566638036f,1.140130846486164140074f,0.7078292602873598182711f,\ +0.6419172762011019495176f,-0.7752020495699509794463f,-0.2227250211522007472542f,\ +0.1418062472773869153730f,0.3461143754334283229035f,0.9346610138588777871860f,\ +-1.1766714696487656777180f,-1.155321545637316260624f,-1.0348373990480448370022f,\ +-0.4377198927182634480282f,0.5342901632756290597470f} + +#define CRESULTR {0.6603968316049805276080f,0.2592621892570787789367f,-0.3318454617138371642859f,\ +-0.2997813790812504652905f,0.5587163403231363290047f,-0.1189561420345783687713f,\ +0.7381324458324397541631f,2.142136719995466176414f,-1.3458078751828295160919f,\ +1.3129764303388649082649f,3.3523257180963095258619f,1.2630048090441925445759f,\ +1.6535623505413692413413f,1.0844508507590295831591f,0.4550473771130031930277f,\ +0.9621269818830543441024f,1.013062998048058771516f,0.9256575460351638140466f,\ +0.0102887155976816024872f,0.6668255580964917994535f,1.0432946799591633624260f,\ +-0.4668000327046901709593f,4.4102457143090099123128f,0.6767097030615227826189f,\ +9.8624279257033951040512f,0.9672974379596046556884f,-0.0208338391589294388839f,\ +1.0307881917288705952984f,0.5404196044618572170037f,1.5733521090107187578866f,\ +0.4580812522816201659559f,5.0350486020971887413111f,1.2277369531593618212639f,\ +-0.8994082908263842934815f,0.8177424613018864363312f,0.7782283917530580241717f,\ +1.8099404305650070856615f,0.8082102149385829159556f,0.5629089875114635654896f,\ +1.4748501127652635656062f,0.6669768846821123586821f,1.699726699407153374111f,\ +1.298577834389474938703f,0.9945484939786765066216f,0.7581576733086236030701f,\ +0.8456096567246286221931f,-0.4135520032774342991111f,0.5435636589621466452371f,\ +1.810248147243165517395f,1.4551350063240526822028f,1.4924370356604863552263f,\ +2.0000431078502241000194f,-0.1972543510483453221838f,0.5590324784918681011447f,\ +2.068372118994307395923f,0.0835345805491203158288f,0.4460902185747692705320f,\ +0.8645923158579836842463f,-0.1111931823350623821378f,1.8617144830169030100819f,\ +1.02983082411914805832f,0.7572686801513547338871f,1.0567502136654132183224f,\ +0.8128189945963255613748f,0.8399378223031567225476f,1.4017511305320988768131f,\ +2.956644273924759147576f,1.132754400798835492381f,1.265693867178816711672f,\ +0.5610629520868651853860f,0.8055306977755860575741f,0.9213852223586275203004f,\ +-0.4199962882323669544071f,0.9807673830270958736932f,-0.3590470367287647013299f,\ +1.2420524197984359471292f,1.6706050779946230999684f,1.6747789118158156185245f,\ +-2.16927668845889520810f,0.8261050353521025568782f,1.3826822282594428692448f,\ +0.1727680624199215975167f,9.057823043102500193413f,0.9457668311290795548629f,\ +1.833812877114292083647f,0.8940453644463330906689f,0.2341249670166324903242f,\ +1.363576337757532064288f,0.7162232362688260023376f,-0.7845189065148089335722f,\ +1.097237008647440115183f,0.5573625517969845732935f,1.0662662205819704031029f,\ +0.9561831479074293094200f,0.6520642360884429944434f,1.8151009640860991112277f,\ +1.0674278234021243871865f,1.0313090898160910402481f,1.3624555698791520619295f,\ +1.757155073751679230654f,1.0064753136983999315390f,0.0749572440340378898238f,\ +3.6259465360107721032534f,0.9955398364095786600814f,-1.0568745874589622336f,\ +3.5878460752889553830869f,0.8668812254131966765769f,0.8997505054992860351604f,\ +1.040555384796898463762f,2.1965462296781987916461f,0.8333142225488954224488f,\ +1.0523855335407785727142f,-0.0458709738274477793474f,0.5458332569596060501738f,\ +1.195961273756254605871f,0.8884437146730177481402f,1.2715015087988947861675f,\ +0.9300156339115848158627f,1.2162605499523735375078f,1.4405129668915395146911f,\ +-0.9683533444224800001976f,5.4479898316980985839564f,-1.9178644985834492064924f,\ +-0.5029446665597729904107f,1.0267816742413071740003f,-0.4044626121435637711166f,\ +-0.5620727987859718277619f,0.5138734552212488315703f,1.0709367349326839313761f,\ +2.6385439370616894372290f,0.9332628709668898681073f,0.4809878535892211925962f,\ +2.3274184357315248483644f,1.0152140200890447108151f,0.6317250697033859330176f,\ +-0.390230756302790915413f,0.7144330074150475606842f,-1.0633635201019895344388f,\ +-0.4238985166974506557658f,0.7604701169947127858961f,1.0257495217324759106958f,\ +2.8333209029821588842424f,0.8984586856426056700187f,1.7791621377373312284931f,\ +2.4485583447413197255571f,0.4244935342539479794510f,1.4527777983860266086680f,\ +4.1768674382240673637057f,0.8760717584983536143639f,1.025358467451832122919f,\ +2.0225373659775809365158f,0.1929591577071132768584f,1.0348979760988403775457f,\ +2.4313713775277490114490f,0.8666224950927583492444f,0.0284371329577691699109f,\ +1.9091763626738669223926f,2.934604495210217045553f,1.0152593733387236252241f,\ +0.2952893892910067874524f,1.1132087589342971600814f,0.7251532821639393722180f,\ +-0.8189305685602711326609f,1.5345662883929571673747f,1.7188713168135731912400f,\ +0.4555641729620423796554f,1.273008943337736509349f,0.4560137683691281029752f,\ +1.1053164018215166919390f,-0.9060167575034622222674f,1.0910838839542402745053f,\ +-0.9695473009615381831949f,2.7466955042474223702698f,1.4261078323829836644876f,\ +2.297318046615583586600f,0.8629928731306283351543f,1.2099030156571450866920f,\ +0.5606054313387058840590f,0.8663522170995916482639f,1.8289146898108739058841f,\ +0.7647265415048952741373f,0.6847484857113015355168f,1.0021685183539132957264f,\ +1.3866261204365910586489f,0.1714987437851132057176f,0.9918063704778133926609f,\ +-0.8398571556569223162114f,1.624536447087556512159f,1.17576217917109437927f,\ +0.7155426268638502840247f,1.1625689563760244205071f,0.6145684296686997338810f,\ +0.1028453801776162412907f,0.8392286126386587774562f,1.4202930257299617444744f,\ +0.7599315975784372012569f,1.74429364867563263530f,0.4552293130713663815712f,\ +0.4842614797058485409664f,-0.759839135565466450295f} + +#define CRESULTI {-0.146941580724984616202f,0.4874941601771347610139f,-5.8732506000776529830887f,\ +-0.1923557391894928081388f,-0.1938092227520436805488f,0.1380525220047903456333f,\ +-0.0894197912409416678647f,-2.2083871916990625017263f,1.38762940282270652581f,\ +-0.379707247416236348680f,0.2563331150684992620903f,-0.1514182976925468326890f,\ +-0.2833925825567581990860f,-0.1897432487381172094842f,0.9841855659814751078329f,\ +0.0334435644614089755411f,0.2943712296517632109882f,-0.6135431940236653058918f,\ +-0.6213108038265401367184f,0.0664065988188502348555f,1.5707022449109617756591f,\ +0.8020378110570226537490f,0.8061058304221635495423f,-0.6229364595259883063960f,\ +5.873854580840536243613f,0.3548772564844954735541f,0.5743671991358663131422f,\ +-0.0964195772855189620065f,-1.015948375800173053563f,0.1544112964905340057431f,\ +-2.427720301875694985938f,-1.0527358981959802353146f,-0.2804463002040958885530f,\ +-2.667664304679369102757f,-0.1773304122311009645152f,0.3851475525760940099573f,\ +-0.6144403782537597447089f,-0.0639215126270850642065f,0.0563572709924226103451f,\ +0.9949983775946195097006f,-0.1541120072724549983079f,0.3483472405495082191429f,\ +-1.4521802331617248427165f,0.0118245383836800051908f,0.2351284238449595775933f,\ +0.7067939417094389886742f,0.6875306193270583898780f,-0.2231728770983253673510f,\ +0.2822282491943420845715f,-0.3606863345205877369182f,-1.789492973412827536706f,\ +0.1867542931864467348202f,-0.6684973125435003105110f,-0.3544323112754915183764f,\ +0.1903651481757896168912f,-1.5570503331148395353978f,0.0148172477875626266292f,\ +-0.3065501441038122609761f,-0.5331323204569118345830f,0.4924734236714592428008f,\ +-0.2951210995789439461845f,-0.0027560721209946860942f,-0.1068344484336290478588f,\ +-0.2118570413928013151939f,-0.1610793407630224660654f,0.4868738628243398092188f,\ +-2.579960937463402714798f,0.2378086541486917060428f,-0.2428029308169650513083f,\ +-0.8265359232776167131007f,-0.1960976284506159017518f,-0.6230605514253650945022f,\ +-1.755406116186124965139f,-0.0046349019875992188491f,0.9016172621635419881514f,\ +0.3372605888766848636351f,-0.8436494304870341132130f,-0.1192082555849750258314f,\ +1.0830200228715931576318f,0.1806566116072005345750f,0.6790264707808069122308f,\ +1.609828137915977341876f,1.2968382390971706641380f,0.1218796661012466753249f,\ +-0.5166846594494688416077f,-0.1472753279361777856149f,1.7212963380251158351797f,\ +-0.3127599294310591804269f,-2.89888504993117113173f,1.1780998114195078141364f,\ +-0.0361775267207019371463f,0.5456053298268405127303f,0.4123679880285295307196f,\ +0.0659019050150095875296f,-0.4713866341281334748636f,0.9028599597514885832794f,\ +-0.3674007976866919822356f,-1.2146233237644410429823f,-0.2198736582857065691154f,\ +-0.8094828887322721433506f,-0.0706994284778254822310f,-0.2230241649514515533959f,\ +-0.5643984283124198197967f,-0.0164146852495472492239f,-1.3391611472776376867699f,\ +0.1376079760459386902571f,0.1047929421413649753170f,-0.1533297870650806860038f,\ +0.1966501815957944765412f,-0.7921571860524847519258f,0.5604745942609183906313f,\ +0.1489022072975806909589f,-1.8902500881495403195487f,-0.0621612461401919516590f,\ +0.0270260228763795351536f,-0.1072348104191992446133f,0.4697601544599027123539f,\ +0.0124466007411300864927f,1.0036512376933612866736f,-1.049412060795365198018f,\ +0.6666269392002136529030f,2.010144371510963257066f,1.2757551800142050701936f,\ +-0.1634497680436179101182f,0.0805305413426501415231f,-0.1208519512813724661182f,\ +0.0144424770778995917309f,2.8348773781599185817015f,-0.2949185744370810824400f,\ +-0.7818376664535492404084f,0.5616872313168002062156f,-0.5124110438039969350754f,\ +-0.9747306641614861266731f,0.0065779403553887496811f,-0.205370183808804979142f,\ +-0.269054670595636091779f,-0.3938808526857590086578f,-0.0634893958645683514908f,\ +-3.0489600352607997280074f,2.072697136598120604134f,-0.0161438616695122189038f,\ +-0.6420425137334005993850f,-0.144832386550082847787f,1.3961681016866522853093f,\ +1.534869934827646220654f,-0.2242019675630647912445f,-0.5795004710241905554469f,\ +3.3483419852888491874410f,0.0991308462877908275201f,-0.0425076535895645771235f,\ +1.309216767461068409162f,0.7684601350295457988793f,0.2535070961278987344834f,\ +-0.3156127379694732559834f,-0.278872470151356244283f,-0.3161734445550384298151f,\ +-0.106765701893629952335f,-4.6100082079818358593570f,0.0493978828262259944681f,\ +-0.4363059774746961272385f,0.3760761368145200678192f,-1.4011279329067940491171f,\ +0.1037666142610354780285f,-0.5844725415055048722834f,-0.6033334328120393275086f,\ +-1.1866522252940947534938f,-0.2666075239397875384917f,0.4100487177769164826024f,\ +-1.570972740050773142073f,2.0165334475753500242945f,0.9815781508770222707483f,\ +0.3701172711568467832421f,0.5330671903876023076663f,-0.4865756887562372456912f,\ +-0.7719024118076073248673f,-0.101927682205751976574f,-0.6886382760934363078675f,\ +-0.4533487312581489514507f,0.4994598581237761347751f,-0.2054810163364952091403f,\ +0.4584447177031794051771f,-0.7868410449880314239124f,-0.0043750939988532102504f,\ +4.4747804523350742655907f,-0.5502105833706960602569f,0.0016307130557308498371f,\ +1.83024619927524345719f,-0.4687597592810309743427f,-0.2779394557997144632466f,\ +-0.5547224826362566751925f,0.400556327585974369931f,-0.1797184375596841132694f,\ +-0.1415425280521077078255f,-0.2158502978608074218680f,0.2764160437046866980459f,\ +1.326476685000083532984f,0.0406909700160508550071f,-1.1778701919064038516893f,\ +-0.4054547584096580559176f,0.419311934137157338309f} + + +void scossTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=scoss(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-6); + } +} + +void ccossTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=ccoss(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<3e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void scosaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i; + + scosa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-6); + } +} + +void ccosaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + ccosa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<3e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testCos(void) { + printf("\n>>>> Float Cosine Tests\n"); + scossTest(); + ccossTest(); + scosaTest(); + ccosaTest(); + return 0; +} + +int main(void) { + assert(testCos() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/zcosa.c b/2.3-1/src/c/elementaryFunctions/cos/zcosa.c new file mode 100644 index 00000000..76a4f2d6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/zcosa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" + +void zcosa(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zcoss(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cos/zcoss.c b/2.3-1/src/c/elementaryFunctions/cos/zcoss.c new file mode 100644 index 00000000..4fd5d3f0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cos/zcoss.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cos.h" +#include "sin.h" +#include "cosh.h" +#include "sinh.h" + +doubleComplex zcoss(doubleComplex z) { + double real = zreals(z); + double imag = zimags(z); + + return DoubleComplex(dcoss(real) * dcoshs(imag), + -dsins(real) * dsinhs(imag)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/Makefile.am b/2.3-1/src/c/elementaryFunctions/cosh/Makefile.am new file mode 100644 index 00000000..4d28f07e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/Makefile.am @@ -0,0 +1,70 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libCosh_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libCosh.la + +libCosh_la_SOURCES = $(HEAD) $(SRC) + +SRC = scoshs.c \ + dcoshs.c \ + ccoshs.c \ + zcoshs.c \ + scosha.c \ + dcosha.c \ + ccosha.c \ + zcosha.c + +HEAD = ../includes/cosh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatCosh testDoubleCosh + +TESTS = testFloatCosh testDoubleCosh + +# +# -*- Hyperbolic Cosine Tests -*- +# +testFloatCosh_SOURCES = testCosh.h testFloatCosh.c +testFloatCosh_CFLAGS = $(check_INCLUDES) +testFloatCosh_LDADD = $(check_LDADD) + +testDoubleCosh_SOURCES = testCosh.h testDoubleCosh.c +testDoubleCosh_CFLAGS = $(check_INCLUDES) +testDoubleCosh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/cosh/Makefile.in b/2.3-1/src/c/elementaryFunctions/cosh/Makefile.in new file mode 100644 index 00000000..33c9a89c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/Makefile.in @@ -0,0 +1,811 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatCosh$(EXEEXT) testDoubleCosh$(EXEEXT) +TESTS = testFloatCosh$(EXEEXT) testDoubleCosh$(EXEEXT) +subdir = src/c/elementaryFunctions/cosh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libCosh_la_LIBADD = +am__objects_1 = +am__objects_2 = libCosh_la-scoshs.lo libCosh_la-dcoshs.lo \ + libCosh_la-ccoshs.lo libCosh_la-zcoshs.lo libCosh_la-scosha.lo \ + libCosh_la-dcosha.lo libCosh_la-ccosha.lo libCosh_la-zcosha.lo +am_libCosh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libCosh_la_OBJECTS = $(am_libCosh_la_OBJECTS) +libCosh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libCosh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleCosh_OBJECTS = testDoubleCosh-testDoubleCosh.$(OBJEXT) +testDoubleCosh_OBJECTS = $(am_testDoubleCosh_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la +testDoubleCosh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleCosh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleCosh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatCosh_OBJECTS = testFloatCosh-testFloatCosh.$(OBJEXT) +testFloatCosh_OBJECTS = $(am_testFloatCosh_OBJECTS) +testFloatCosh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatCosh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatCosh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libCosh_la_SOURCES) $(testDoubleCosh_SOURCES) \ + $(testFloatCosh_SOURCES) +DIST_SOURCES = $(libCosh_la_SOURCES) $(testDoubleCosh_SOURCES) \ + $(testFloatCosh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libCosh_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libCosh.la +libCosh_la_SOURCES = $(HEAD) $(SRC) +SRC = scoshs.c \ + dcoshs.c \ + ccoshs.c \ + zcoshs.c \ + scosha.c \ + dcosha.c \ + ccosha.c \ + zcosha.c + +HEAD = ../includes/cosh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic Cosine Tests -*- +# +testFloatCosh_SOURCES = testCosh.h testFloatCosh.c +testFloatCosh_CFLAGS = $(check_INCLUDES) +testFloatCosh_LDADD = $(check_LDADD) +testDoubleCosh_SOURCES = testCosh.h testDoubleCosh.c +testDoubleCosh_CFLAGS = $(check_INCLUDES) +testDoubleCosh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/cosh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/cosh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libCosh.la: $(libCosh_la_OBJECTS) $(libCosh_la_DEPENDENCIES) + $(libCosh_la_LINK) -rpath $(pkglibdir) $(libCosh_la_OBJECTS) $(libCosh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleCosh$(EXEEXT): $(testDoubleCosh_OBJECTS) $(testDoubleCosh_DEPENDENCIES) + @rm -f testDoubleCosh$(EXEEXT) + $(testDoubleCosh_LINK) $(testDoubleCosh_OBJECTS) $(testDoubleCosh_LDADD) $(LIBS) +testFloatCosh$(EXEEXT): $(testFloatCosh_OBJECTS) $(testFloatCosh_DEPENDENCIES) + @rm -f testFloatCosh$(EXEEXT) + $(testFloatCosh_LINK) $(testFloatCosh_OBJECTS) $(testFloatCosh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-ccosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-ccoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-dcosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-dcoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-scosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-scoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-zcosha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCosh_la-zcoshs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleCosh-testDoubleCosh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatCosh-testFloatCosh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libCosh_la-scoshs.lo: scoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-scoshs.lo -MD -MP -MF $(DEPDIR)/libCosh_la-scoshs.Tpo -c -o libCosh_la-scoshs.lo `test -f 'scoshs.c' || echo '$(srcdir)/'`scoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-scoshs.Tpo $(DEPDIR)/libCosh_la-scoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scoshs.c' object='libCosh_la-scoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-scoshs.lo `test -f 'scoshs.c' || echo '$(srcdir)/'`scoshs.c + +libCosh_la-dcoshs.lo: dcoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-dcoshs.lo -MD -MP -MF $(DEPDIR)/libCosh_la-dcoshs.Tpo -c -o libCosh_la-dcoshs.lo `test -f 'dcoshs.c' || echo '$(srcdir)/'`dcoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-dcoshs.Tpo $(DEPDIR)/libCosh_la-dcoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcoshs.c' object='libCosh_la-dcoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-dcoshs.lo `test -f 'dcoshs.c' || echo '$(srcdir)/'`dcoshs.c + +libCosh_la-ccoshs.lo: ccoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-ccoshs.lo -MD -MP -MF $(DEPDIR)/libCosh_la-ccoshs.Tpo -c -o libCosh_la-ccoshs.lo `test -f 'ccoshs.c' || echo '$(srcdir)/'`ccoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-ccoshs.Tpo $(DEPDIR)/libCosh_la-ccoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccoshs.c' object='libCosh_la-ccoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-ccoshs.lo `test -f 'ccoshs.c' || echo '$(srcdir)/'`ccoshs.c + +libCosh_la-zcoshs.lo: zcoshs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-zcoshs.lo -MD -MP -MF $(DEPDIR)/libCosh_la-zcoshs.Tpo -c -o libCosh_la-zcoshs.lo `test -f 'zcoshs.c' || echo '$(srcdir)/'`zcoshs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-zcoshs.Tpo $(DEPDIR)/libCosh_la-zcoshs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcoshs.c' object='libCosh_la-zcoshs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-zcoshs.lo `test -f 'zcoshs.c' || echo '$(srcdir)/'`zcoshs.c + +libCosh_la-scosha.lo: scosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-scosha.lo -MD -MP -MF $(DEPDIR)/libCosh_la-scosha.Tpo -c -o libCosh_la-scosha.lo `test -f 'scosha.c' || echo '$(srcdir)/'`scosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-scosha.Tpo $(DEPDIR)/libCosh_la-scosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scosha.c' object='libCosh_la-scosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-scosha.lo `test -f 'scosha.c' || echo '$(srcdir)/'`scosha.c + +libCosh_la-dcosha.lo: dcosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-dcosha.lo -MD -MP -MF $(DEPDIR)/libCosh_la-dcosha.Tpo -c -o libCosh_la-dcosha.lo `test -f 'dcosha.c' || echo '$(srcdir)/'`dcosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-dcosha.Tpo $(DEPDIR)/libCosh_la-dcosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcosha.c' object='libCosh_la-dcosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-dcosha.lo `test -f 'dcosha.c' || echo '$(srcdir)/'`dcosha.c + +libCosh_la-ccosha.lo: ccosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-ccosha.lo -MD -MP -MF $(DEPDIR)/libCosh_la-ccosha.Tpo -c -o libCosh_la-ccosha.lo `test -f 'ccosha.c' || echo '$(srcdir)/'`ccosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-ccosha.Tpo $(DEPDIR)/libCosh_la-ccosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccosha.c' object='libCosh_la-ccosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-ccosha.lo `test -f 'ccosha.c' || echo '$(srcdir)/'`ccosha.c + +libCosh_la-zcosha.lo: zcosha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -MT libCosh_la-zcosha.lo -MD -MP -MF $(DEPDIR)/libCosh_la-zcosha.Tpo -c -o libCosh_la-zcosha.lo `test -f 'zcosha.c' || echo '$(srcdir)/'`zcosha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libCosh_la-zcosha.Tpo $(DEPDIR)/libCosh_la-zcosha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcosha.c' object='libCosh_la-zcosha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libCosh_la_CFLAGS) $(CFLAGS) -c -o libCosh_la-zcosha.lo `test -f 'zcosha.c' || echo '$(srcdir)/'`zcosha.c + +testDoubleCosh-testDoubleCosh.o: testDoubleCosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCosh_CFLAGS) $(CFLAGS) -MT testDoubleCosh-testDoubleCosh.o -MD -MP -MF $(DEPDIR)/testDoubleCosh-testDoubleCosh.Tpo -c -o testDoubleCosh-testDoubleCosh.o `test -f 'testDoubleCosh.c' || echo '$(srcdir)/'`testDoubleCosh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCosh-testDoubleCosh.Tpo $(DEPDIR)/testDoubleCosh-testDoubleCosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCosh.c' object='testDoubleCosh-testDoubleCosh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCosh_CFLAGS) $(CFLAGS) -c -o testDoubleCosh-testDoubleCosh.o `test -f 'testDoubleCosh.c' || echo '$(srcdir)/'`testDoubleCosh.c + +testDoubleCosh-testDoubleCosh.obj: testDoubleCosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCosh_CFLAGS) $(CFLAGS) -MT testDoubleCosh-testDoubleCosh.obj -MD -MP -MF $(DEPDIR)/testDoubleCosh-testDoubleCosh.Tpo -c -o testDoubleCosh-testDoubleCosh.obj `if test -f 'testDoubleCosh.c'; then $(CYGPATH_W) 'testDoubleCosh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCosh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleCosh-testDoubleCosh.Tpo $(DEPDIR)/testDoubleCosh-testDoubleCosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleCosh.c' object='testDoubleCosh-testDoubleCosh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleCosh_CFLAGS) $(CFLAGS) -c -o testDoubleCosh-testDoubleCosh.obj `if test -f 'testDoubleCosh.c'; then $(CYGPATH_W) 'testDoubleCosh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleCosh.c'; fi` + +testFloatCosh-testFloatCosh.o: testFloatCosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCosh_CFLAGS) $(CFLAGS) -MT testFloatCosh-testFloatCosh.o -MD -MP -MF $(DEPDIR)/testFloatCosh-testFloatCosh.Tpo -c -o testFloatCosh-testFloatCosh.o `test -f 'testFloatCosh.c' || echo '$(srcdir)/'`testFloatCosh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCosh-testFloatCosh.Tpo $(DEPDIR)/testFloatCosh-testFloatCosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCosh.c' object='testFloatCosh-testFloatCosh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCosh_CFLAGS) $(CFLAGS) -c -o testFloatCosh-testFloatCosh.o `test -f 'testFloatCosh.c' || echo '$(srcdir)/'`testFloatCosh.c + +testFloatCosh-testFloatCosh.obj: testFloatCosh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCosh_CFLAGS) $(CFLAGS) -MT testFloatCosh-testFloatCosh.obj -MD -MP -MF $(DEPDIR)/testFloatCosh-testFloatCosh.Tpo -c -o testFloatCosh-testFloatCosh.obj `if test -f 'testFloatCosh.c'; then $(CYGPATH_W) 'testFloatCosh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCosh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatCosh-testFloatCosh.Tpo $(DEPDIR)/testFloatCosh-testFloatCosh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatCosh.c' object='testFloatCosh-testFloatCosh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatCosh_CFLAGS) $(CFLAGS) -c -o testFloatCosh-testFloatCosh.obj `if test -f 'testFloatCosh.c'; then $(CYGPATH_W) 'testFloatCosh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatCosh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/cosh/ccosha.c b/2.3-1/src/c/elementaryFunctions/cosh/ccosha.c new file mode 100644 index 00000000..57e2ed4d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/ccosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cosh.h" + +void ccosha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ccoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/ccoshs.c b/2.3-1/src/c/elementaryFunctions/cosh/ccoshs.c new file mode 100644 index 00000000..4504bec9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/ccoshs.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cosh.h" +#include "cos.h" + +/** ch(z) = cos(i.z) */ +floatComplex ccoshs(floatComplex z) { + + return (ccoss(FloatComplex(-cimags(z), creals(z)))); +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/dcosha.c b/2.3-1/src/c/elementaryFunctions/cosh/dcosha.c new file mode 100644 index 00000000..9b8ce3b2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/dcosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cosh.h" + +void dcosha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dcoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/dcoshs.c b/2.3-1/src/c/elementaryFunctions/cosh/dcoshs.c new file mode 100644 index 00000000..78131389 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/dcoshs.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// cosh(z) = 0.5 (exp(|z|) + exp(-|z|)) +// = 0.5 ( y + 1/y ) with y = exp(|z|) +*/ + +#include +#include "cosh.h" +#include "exp.h" +#include "abs.h" + +double dcoshs(double x) { + double y = dexps(dabss(x)); + return (0.5 * (y + 1.0/y)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/scosha.c b/2.3-1/src/c/elementaryFunctions/cosh/scosha.c new file mode 100644 index 00000000..8ac948a1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/scosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cosh.h" + +void scosha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = scoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/scoshs.c b/2.3-1/src/c/elementaryFunctions/cosh/scoshs.c new file mode 100644 index 00000000..3e8a1e18 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/scoshs.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* +// cosh(z) = 0.5 (exp(|z|) + exp(-|z|)) +// = 0.5 ( y + 1/y ) with y = exp(|z|) +*/ + +#include +#include "cosh.h" +#include "exp.h" +#include "abs.h" + +float scoshs(float x) { + float y = sexps(sabss(x)); + return (0.5f * (y + 1.0f / y)); +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/testCosh.h b/2.3-1/src/c/elementaryFunctions/cosh/testCosh.h new file mode 100644 index 00000000..a4de725c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/testCosh.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTCOSH_H_ +#define _TESTCOSH_H_ + +#include +#include +#include +#include "cosh.h" +#include "constant.h" + +void scoshsTest(void); + +void dcoshsTest(void); + +void ccoshsTest(void); + +void zcoshsTest(void); + +void scoshaTest(void); + +void dcoshaTest(void); + +void ccoshaTest(void); + +void zcoshaTest(void); + +int testCosh(void); + +#endif /*! _TESTCOSH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/cosh/testDoubleCosh.c b/2.3-1/src/c/elementaryFunctions/cosh/testDoubleCosh.c new file mode 100644 index 00000000..ef3b5289 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/testDoubleCosh.c @@ -0,0 +1,507 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testCosh.h" + +#define SOURCE {-1.205685175775274453613,-0.8333271236779051793775,1.2335774322243386880160,\ +0.3311018349037936903123,-0.8052653369328224286505,0.1998487851928297531767,\ +-0.8705427356398579563646,0.1975294304937466050021,0.9239335793216870706956,\ +0.2378506537628061745515,0.0049366873129022617595,-0.669236585027300545647,\ +1.0653101376824569701540,-0.3369456198746673680766,0.6204667311042414423738,\ +1.6283002068610463730636,0.7206914942876857521625,1.7221990362694574727698,\ +-1.0902216302137626158242,0.2874486754733126536721,-1.2122889745482419154854,\ +1.8215917027079053802652,2.8016558959521908889201,0.4050930510541474460773,\ +0.0617355341334478585624,-0.4301267567705842620462,-0.8284509700102783424924,\ +1.0256901078279201389165,1.525021231170059277105,-1.3197460532844016434240,\ +-0.4460647093896898951471,0.5045503141647188494190,-0.8098965560197782798113,\ +0.4268132043604428993433,-1.1336964590865461488534,1.127146072313511160345,\ +-0.9122705295277132586662,-0.3089065753248803058995,-2.3178211651402826909418,\ +1.1439933378277502562526,0.7005552213939509886842,0.4233298618301614135717,\ +-2.5208275627904130899992,-0.2816183187535069021301,0.7467093404219694585677,\ +0.7637510409783198062073,0.3396503036180347767647,-0.9747149605661590276995,\ +0.1472242280982364037722,0.9901921384491637612157,-1.2197737051905059857404,\ +-0.4607952353595122785279,-0.9492383290419380559300,1.4160381392623584417834,\ +-0.2758297498115374613015,1.7324484611160422264931,1.1368999048747294722261,\ +0.8568173351546003457813,0.3519313905007281362280,-0.8897875910518927566883,\ +0.2244273879422930551009,0.2394303391704008243668,-1.0382487030291693841377,\ +-1.0129167707607047432816,-0.3443356316152397234021,0.9904626758703307665144,\ +-0.5700286524862564485616,-1.2143893416629112369520,-0.7653327397314562130504,\ +0.5932733856160632424093,1.0109636831448121085941,-0.2591906321322083317504,\ +-0.6337213759172125593366,-1.3891534527523830000462,-0.7588209965122667544080,\ +-0.7751521002127067516696,-0.2569588781664822740858,-1.1144881209346948480743,\ +1.3683403773429958505403,-1.3171565382517111952865,-2.0066059395312958457680,\ +1.1665757372971858885080,0.1803963656727911035738,-1.4583403177666438566007,\ +-2.0738880513575592701159,-0.7736713589363241050378,-0.4690505767289738225934,\ +0.5290181646318501407222,-0.6366436437236088208280,-0.1514973533385992610079,\ +-0.4939237897364461837846,1.2009977647347911400288,-0.4479171393972471992839,\ +0.7962022364285237241432,1.0553131168098721648363,0.6399283922940391944323,\ +0.6404945676646236485396,0.4718907579921589601213,-1.1669004068172705856909,\ +0.8239670665751658296116,-0.5209824870944876895607,-0.5564774733886624913382,\ +0.677433403214317775287,-0.9826152250790042286255,-0.2301482766849789196595,\ +1.5256623976111793883348,-0.0141042499939363699668,-0.2206563911375283293381,\ +-1.2404617973010751974527,0.4956722425079039262563,-0.9198528977539149886766,\ +-0.9204208417497926619788,0.8313756689801026222852,0.3180154749624292120913,\ +0.2494121392443543194783,1.9786862305439512077498,-0.7539887840478504132946,\ +-0.2522144002260635065049,1.4817018679370650424687,-1.1886013018444978595056,\ +0.3497827881131843619222,0.0164051036269147361424,-0.3356971818656850903295,\ +1.5387250556465030815190,-2.2939395533776552049687,0.5463520678571377464650,\ +-0.6249598247747292223409,-0.3795057983233444121041,-0.6817850926970092650947,\ +0.1137639445438838742275,-0.3667643438770555319728,0.7811095630972452186214,\ +-0.6491897518190495874890,-0.4116889792407164572197,2.2135576248798094489700,\ +-0.8117887004060938549443,0.543890637094475826174,-0.4300056333049381840361,\ +-1.1073264735386671997475,1.9600404811338050237168,-1.1810889471038799047875,\ +-1.5998650464994574882382,0.2370987431342703177783,-1.1837915340560738464148,\ +-1.3250738110530209112881,0.9867165393345800339375,-0.4254735979103318466166,\ +-0.1977286302171261667127,-1.3843612904745590252986,0.0058770971600078198913,\ +1.6513137110120594819307,-1.9479686718307542836470,-1.1853539723928359084226,\ +-0.1952876876932538308118,-0.3910952467587283098993,2.6051477231429984726674,\ +-1.1685665444554920178177,0.4303553159707447783866,0.4980619697002917622974,\ +-0.5945099409025637049453,0.6251723753612481448982,0.5667367529854526742028,\ +0.2583522627447231712061,-1.117334797621551301106,-0.1572947959550771157566,\ +-0.1675843890566963978461,-0.4415529643720014774111,0.0296777742804143623845,\ +0.950535269366517221457,-0.2023353295590510914082,1.2240649283812428116391,\ +0.8408743467009373029342,0.7289489292828028599303,-0.3650480390020546805907,\ +0.7141089622210116116818,-1.6330473677930090747878,-1.2120035333729530790947,\ +2.5522160888662996924836,0.4631064145940361198583,-0.0364246441804653570129,\ +0.7308349560709582748430,-1.059234312724760096458,-1.5608743035213317185,\ +0.7865883787823105821602,-0.1899223202317779357617,-0.4035214553331447628892,\ +1.4993140466900047869103,1.2050329976249689600820,-0.2109320691913422751718,\ +0.0478227589320652582416,1.1080187662760754285785,0.3698710666565526716809,\ +-1.8629885917707584841452,0.1117850228517819205498,0.9930250182564113181627,\ +1.2533428090752711803191,0.5303160507909902010582,0.2252859052932770778099,\ +-0.7558035543285445134742,1.1653980888802857318609} + +#define RESULT {1.819266428064204577097,1.3677812549451693335811,1.8623697303215194231996,\ +1.0553168123818659207558,1.3421296845542964870646,1.0200363222965405096687,\ +1.403465448863383979727,1.0195724536239654245406,1.4580674176636316818900,\ +1.0284200725097112361084,1.0000121854655601438822,1.2324226844271635172845,\ +1.6231798706546742838697,1.0573052784271492754442,1.1987446423322825062030,\ +2.64573472675944731947,1.2711350583337506225945,2.8877476825709762486838,\ +1.6555376604226368364436,1.0415986209192817923963,1.829342489722003417540,\ +3.171729047671292711641,8.2663047019615358834699,1.0831783845382449982253,\ +1.0019062434070211686787,1.0939395186073928023518,1.3632471669518277934685,\ +1.5737842316817938215223,2.4064287835907673951397,2.0048370085520934580359,\ +1.1011474483510161892497,1.1300087947090773354830,1.3462897763229764169779,\ +1.0924759182927643585970,1.7144810122297002852321,1.7053954010120264683792,\ +1.4457904936509571314218,1.048092245021622570533,5.126007634597746331906,\ +1.7289119973762236970316,1.2555903810189259495189,1.0909502538663513604433,\ +6.2596397068650517780952,1.03991721163594563748,1.2919843250699158954120,\ +1.3061137606130501787050,1.0582378205813938176760,1.5138557575271749389145,\ +1.0108570760043096292691,1.5316284576789631621807,1.8408591504389772985917,\ +1.1080580118223748442574,1.4853883271417620548505,2.1817178624460376035188,\ +1.0382828245407387246502,2.9156663093555850174710,1.7189510624849844155904,\ +1.390081256029065626123,1.0625696729809925855648,1.4226777259325882329932,\ +1.0252897080419871578272,1.0288006377558764903313,1.5891703898572226982822,\ +1.558389589207426872974,1.0598715893830090717,1.5319423704594259394440,\ +1.1669134763143933497531,1.8325639262468249590654,1.3074443355436990987783,\ +1.1812094824791219416227,1.5560581683472911596056,1.0337783603024415235438,\ +1.20761220067196339834,2.1303694894256701708457,1.3019874017358665785338,\ +1.3157780065006974279385,1.0331959861022277369358,1.6880453716815839726451,\ +2.0916769731603670479103,2.000344096331303500591,3.7862367743494589333864,\ +1.7612050492619382158210,1.016315598810441089839,2.2657204820986769355784,\ +4.0406956659153259181494,1.3145132010698166169504,1.1120358920747182018829,\ +1.1432241110320022769997,1.2095957312624510127108,1.0114976895400229484068,\ +1.1244804773055134816673,1.8121625561683152305648,1.1020033178144590380043,\ +1.3340717665795371882353,1.6104789889363373411868,1.2118376325588768871455,\ +1.2122253780682052948237,1.1134219567585550425548,1.7616758393639733171199,\ +1.3591064226145659343814,1.1388088791439558988827,1.1588706347019575026991,\ +1.2383685118981913042546,1.5228821862471519921201,1.0266012226158198750170,\ +2.4078326713444666573594,1.00009946658283555010,1.0244435586923690273409,\ +1.8732301190987417083278,1.1253813439974511556585,1.4537494816372256156711,\ +1.4543489946263667977888,1.3659627989922018542757,1.0509945293445170921842,\ +1.0312647772215886021741,3.68574234301369418887,1.2979736367142225006432,\ +1.0319750139115386744493,2.3138394341351444793986,1.7935669311616093679618,\ +1.061800258350523940010,1.0001345667304306630285,1.0568774415753066087120,\ +2.4366507835843460583192,5.0073927789679837374592,1.1530000373394655444059,\ +1.2017269174685778487799,1.0728807813362080114672,1.2415589372685298386045,\ +1.0064780997777151849704,1.0680153713756039834948,1.3208958764713327749263,\ +1.2182291644802725194552,1.0859476120918869490595,4.6287577582643999463130,\ +1.3479977392146349490787,1.1515908109414143556393,1.0938858068153072267137,\ +1.6783490081276506433738,3.6202335893551729206763,1.782432142455154355787,\ +2.5771439034538188295187,1.0282398297270358700217,1.786426290897340729558,\ +2.014123198363930722365,1.5276055774381211982,1.0918876182447221356853,\ +1.019612078038364622046,2.1213794605936713288941,1.0000172701852236833986,\ +2.7028112826383159372767,3.5784939357816578642257,1.7887413660887121480414,\ +1.0191293197498234590626,1.0774575372953134611009,6.8035582731627464170288,\ +1.764094760751516499653,1.0940409161295887585652,1.1266181837435944590453,\ +1.1819878003429369339727,1.2018685976750431709803,1.1649400331120620677439,\ +1.03355898490236453036,1.6919235891909962798962,1.0123963536864837298168,\ +1.0140751587041334502715,1.0990787112389970303639,1.0004404174672476557362,\ +1.4868140745992959317334,1.02053972356750688455,1.847508472372893173485,\ +1.3748631970003435398553,1.2776582369190518928548,1.0673732569157268201820,\ +1.2659971203245654614022,2.6573926189895762384197,1.8289053177424414720065,\ +6.4567128779259412851843,1.1091640429888753871523,1.0006634506999989575604,\ +1.2791603587689326371191,1.61544148317066760256,2.4864680737312045977205,\ +1.3256439332679719189656,1.0180895207546800662612,1.0825255238019519943293,\ +2.3509495822805339670936,1.8182756477804529193776,1.0223287733363202178793,\ +1.001143726087694751925,1.679282557162007583074,1.0691856802487731403772,\ +3.2990857486037623580444,1.0062544545151006492034,1.5349210973541418390198,\ +1.8937893477592186997072,1.1439441561926790846826,1.0254843822262098562703,\ +1.2994774746280413069144,1.7594989466591723914490} + +#define ZSOURCER {-0.8912345066950769778558,-0.0058415661764856371616,0.8327394520710053038570,\ +-1.3031116495573464852953,1.3063996947557070527068,-0.3291212350984021872691,\ +-0.4314780628860441225036,0.3257069146291299843732,0.2704533752036020199938,\ +0.3948286552396417792288,1.7413456505609685720515,-0.0929389968439678221257,\ +-1.7740482961163070996236,-0.9310406640182858906130,1.0558482448966843847415,\ +0.5302093445317125341987,0.9099214704748677107204,-1.3248358105760951186625,\ +-0.5468817390748145212953,-0.8462613338460863721124,-0.8447436284186202737345,\ +-1.201032047282137193989,0.0724835993626015417934,0.0038054949984360143984,\ +-0.1410382163048108095094,-1.7842189597096504982687,0.0501420738427398662851,\ +-0.2334922077300364828822,1.5945984531602754863400,-0.3238241601909672695569,\ +1.513308285995593083229,1.5778451444411625281816,1.3691912706993336623640,\ +1.748251159750787042668,0.6019009531079806407661,0.0153371667399079970179,\ +-2.11368074169300124154,0.0736235546297408505190,1.16364818469077779817,\ +-1.7239586420846975123311,-0.1812698216235553161368,1.3506264987504341679170,\ +0.1572244306209917286132,0.0637660966151842728555,-0.1712993899334549763314,\ +1.9516485698976029361518,2.845403039274271073111,0.2554082947132658709677,\ +0.3587738434809014664850,1.6800084635178351710749,-0.7143150645295742728891,\ +0.3176042681985608573392,0.1918613409687800752668,-0.8669525494355047046113,\ +-2.486482303849266717322,-0.3399076190046602663486,-0.0275599140270330646152,\ +0.0760891140551305106277,0.0175525149136643889014,-1.0447511992604696651199,\ +0.5928194662003063442057,0.5337685538183976063920,-0.1083277352156265110894,\ +1.3163705916013288543809,1.6481947619041572572485,-0.0366427588652487520871,\ +-2.24532677610144792979,1.1646157862674424432470,0.1931514629705824159789,\ +-2.0280558458213828743055,-1.588195044157987734224,1.217389599860282611843,\ +-0.7923310676779923289459,0.4657912238712272334773,0.6341322794098591675294,\ +-0.2308714073795904986319,0.0959191686134504700734,-0.4119590516116395373380,\ +0.9909317687163362586844,-1.1184985773424866994930,0.3764360122586650203580,\ +1.0283807947333536425560,0.4399875767202614529339,-0.4587329057670580523265,\ +-0.8383371473991714228902,1.8010370613667443517869,0.3638310348854316700340,\ +0.5630372956104594539539,0.5158868637708874382852,0.6872616626544041373847,\ +-0.0355020269914341005113,0.8259138693919667595367,0.6872047295901000385498,\ +0.0739287007414783509107,-0.7662836697323893719869,0.4114094358620231095536,\ +0.9046891131020067255974,0.7464765051550138474923,-1.2447871833324788415354,\ +0.6121845724663061982795,1.2932746927561220573466,-1.3794546951962081138277,\ +-1.0054979370864329801805,0.304912140043878954199,2.2462341404304981828943,\ +0.8089620929537136850840,0.9035087652875184449641,1.3506573247795918835124,\ +0.7844818177699410810533,-0.0679273669198190016560,0.4928294105013013015615,\ +-1.096446680245239946316,1.737658266453646849214,1.2019686032899719041467,\ +0.1928095667884118236124,-1.5186389453508686298022,-1.2473448039026917566,\ +-1.489337044442988755577,1.4654430117361589847036,-0.3194353686893170451988,\ +0.9845148496238763646815,0.6602210723100759848236,0.8588563891948870487880,\ +-1.9910804060218119104775,-0.6479512615308331557884,0.3691293678246713727553,\ +-0.71770775009329423888,0.0044545145586906377197,-1.7569208392800599316530,\ +2.0338706868044176268029,-2.1630248696548646236693,-0.8178753147165283010622,\ +-1.3281476236021181325242,0.6822623476118111485178,0.7066790730643729423477,\ +-0.423530195967014910785,-0.8514600115056394358248,0.1911450421094866014560,\ +-0.0937215291541069195347,0.5968058072572121064425,0.1973784591490661544100,\ +-1.6526328643143648466918,2.1042236280016610727728,-2.19182144090441122231,\ +-1.2142537279036162978230,-0.1183253697043944729916,-0.8801137301237593746350,\ +-0.9900854927608483402324,-0.4110378213905900302017,-1.0605052107018932971982,\ +2.0298978504498510488929,0.9198308522281034571577,1.4593911606425682414567,\ +1.313234307458837291094,1.5294344184237567141338,0.6175875795682116420338,\ +0.2031917147194874651017,1.5255721310550354186120,0.9034041242193133758320,\ +-0.7761278947312221232480,-0.4993921694234899066878,-0.4357874013090125009384,\ +0.3873324791493603647119,-0.4467287463644364353677,-0.2545033653001004259053,\ +-1.3746540854818518617719,-0.1477740272607140914474,-1.5074443625622220288562,\ +-1.6715013742258788553841,0.9592226709426125985658,1.3640187263976746301353,\ +0.7890452102613630946948,1.2129240708363580036888,-0.9486821752491236825477,\ +-0.4274439849602727492517,1.6129284060703097392,0.9379949480470993750103,\ +-0.5596964661999650481050,-0.7987634619537844482551,0.0324112900849305857198,\ +1.314201571181351946294,1.0612990922031533269632,0.9227327442687582870207,\ +1.0844570327567082390630,-0.7983322787922396690519,0.4385271461747112797802,\ +0.0024102971394308028881,-1.0118154904234695212750,0.0705293335731081022510,\ +0.0697245903762851448882,-0.1632285547093744459968,-0.3480161062719534514898,\ +0.7985173205564675136259,0.1109596610185162313122,2.1081890906632976268043,\ +0.4892671398131347992866,1.0240089881181213549155,1.4852757378982723857064,\ +1.0644644981998814259327,-0.3570451345877300175502} + +#define ZSOURCEI {-0.9898306808620782604180,0.3667210055378663513537,-0.0115516846422681774414,\ +0.8852998822794806432768,-1.1751393894807391493629,-0.0206719580996688329089,\ +0.7962831267090092479677,-0.3570515343460327617464,1.1412480529936015472003,\ +0.9660799200593181979002,-1.500080296017527903274,1.5242908911731756216312,\ +1.105363493233324723164,-1.4826475597643153925276,-0.0160696607830907479963,\ +-1.1650712441016521925263,-1.5029224597675916452744,-0.1699343140216190151115,\ +0.7034171630892511739575,0.78048631235475940393,0.3572706186066606504070,\ +-0.6408324378966977485916,-0.0937081428320361148332,-0.5995006453733843221343,\ +1.998069767982257660677,-1.4952437710179469210203,-0.0218783914582419587724,\ +0.6948934249723224265693,0.1340798946938218938474,0.89984980932311908752,\ +-0.2284707639451582783519,-1.9920610974541457238729,0.3296873301478878692805,\ +0.8334316663655645385234,0.6017800660861944983537,0.3195021884236714515559,\ +0.8984984730147690390467,-1.9683562813815465020184,-0.2621383110944355832039,\ +-0.6316753727255608463764,-0.0591493996271135885623,0.4809775893765277920977,\ +0.6120565292662866196949,0.6937256492244192607188,-1.4222204429149998272663,\ +0.8456412639793806640398,0.5364524335270092203487,-0.5058105404615705902316,\ +-1.5311811141279494385969,0.0523506509744253098471,-0.5845520117472021714988,\ +1.1469635617104527725019,-0.1258479133308397501789,0.5773840158286764889795,\ +-1.1474331349335626928365,-0.3322391415499996170091,0.9929767773460509427963,\ +-1.660441950926221155171,-1.0585630798226148829855,-0.5685726288282663132279,\ +2.5350425363467468109491,1.1303214701472124037451,0.5096756039133761850835,\ +0.5467199129804439783342,1.4455896704702442256973,0.2077882393389256510119,\ +1.3512301851415178255422,0.2700167751147149464153,-0.6941424124437390874576,\ +0.5635246670082925124490,0.5834755445761464764942,0.9008533966882129595533,\ +-1.170120921094221611014,-0.0177589837851252312084,-0.2475436907499060923410,\ +0.4245903735389653377297,1.3061684980078611673093,-0.5518911372967175710258,\ +-0.1216398923828668349190,-0.1029994384259720480168,-0.1089806892178883240829,\ +1.0016946254399594629092,0.2334205918306470894930,0.9399822370279485861388,\ +-0.5987819428189028458931,1.4171477596181012437171,-0.0511681877729818074263,\ +-1.239060328697855206670,0.1921278548938223085241,0.5833400770787767752878,\ +0.1323798905411992243852,0.0725274151024776908558,1.517150104931189957824,\ +-0.2298162704468252326429,-0.4156880360427151477332,-1.2865870850947289660837,\ +0.2915127708019566443731,-0.4334207057720374511867,0.6674221275639458106355,\ +-0.1336045597099253245954,0.2151665632136103845085,-0.3174957202806932832218,\ +0.9961380035737125160367,1.5546597091479958940852,-1.3388468039798184783251,\ +-0.5065257499177515665423,-1.0639142786788362560202,-0.2959444267422965957337,\ +-1.960038123367497275851,-2.1398034807947201585421,1.3019428580756020608078,\ +-0.3083046332207799999914,0.2621552778202266842378,0.5195575373923391193642,\ +1.56243573209724884165,0.2068570860697496183178,-1.0570132216452536866313,\ +-0.5904609039323533981047,-1.8482550680523897046470,-1.291460161650367144404,\ +-0.7557326141240545691602,-1.0579108981634606223565,1.2726680818341371548286,\ +0.8679294400149879518125,0.1923087263308917160831,-0.7207099055968289036400,\ +-0.9810187619058614583167,-1.1007025532949878954270,1.0502610988542768755138,\ +2.1328376492581355705624,0.2517811686949605887165,0.0286045569084023044992,\ +0.5426452678085846859091,1.0007501149236575077595,-0.1483667758019126259317,\ +0.6740034918705165578601,-0.7882925718203834808406,-0.7561945904807015894633,\ +0.5978999579905148742398,-1.0006972818202708452873,-0.8844110367528469351939,\ +0.0563203493770412927377,0.0010532695687821122445,-2.2465253729529170989565,\ +1.141716522775603870343,-0.4500026076505115879556,0.9053568457125464874480,\ +1.1182847109018192455210,0.8014435340539697305573,0.7353172667964483766312,\ +-1.0684850588765142376246,-0.8549786389844856726583,3.744686089807424789200,\ +0.2152832470021692201634,-0.8813298598480671097732,1.096456876472062580419,\ +0.3072305150928033579127,-0.0799524082246828721177,-0.0588190904677381790067,\ +-1.1720572424194137806097,1.4720320544391665151807,0.0931276494198173265815,\ +0.555984015411468357470,0.8773397145008163811042,0.3438026639727968514215,\ +0.2511717975861258445036,-0.4806220734748062883845,0.1665649861790623464941,\ +-0.9011922058627225284866,-1.3882654124150977104080,-1.0995275754970570414315,\ +-0.2796226936636541648973,1.8675624576106222285432,-0.6479880884779005700835,\ +-1.2193765127792735025736,-0.4210708606718742141872,1.074252254135527273604,\ +0.5620287257728261431922,-0.5121392183328929981201,0.0495074962957085112913,\ +-1.483551847645206089865,-0.1477396930496895632867,0.4331368024681788719832,\ +-0.1336623009706502385185,-0.5252621832336971108290,0.6576305030526226058640,\ +-2.5329417269156695446952,-0.3644974785307753539776,-3.0957701776748671740336,\ +-1.5563868957442139606684,-1.3037172144407160878643,0.1173565633554439491260,\ +-1.4546337195274263720535,0.8077473947731041992171,0.5608831835142086275070,\ +-0.2032753128403547993042,2.1656548569001641268983,-1.0352617083883073334505,\ +0.0703447174899709398721,0.9001420266818445092838} + +#define ZRESULTR {0.7816146272263719829709,0.9335239938948984850242,1.3671418657595642009994,\ +1.251053426889690234347,0.7638235407866506010421,1.05442571981112132029,\ +0.7654863707154079266459,0.9870695051633786576417,0.4317842171461107048103,\ +0.6134213525393761301530,0.2077424772758102444747,0.0466895952950193357522,\ +1.360861123120397309094,0.1290276167481773372803,1.6109467398934755877349,\ +0.4514742994866134950804,0.0978899773240222564885,1.9847014656066033211346,\ +0.8795516810834358434334,0.9805643961019996357464,1.2914771272713012617572,\ +1.45266805020831779593,0.9982291599155850292391,0.8256234470461548680120,\ +-0.4185192299594263642959,0.2310786951961565083291,1.0010177538173574696145,\ +0.7891557184270517888436,2.5416517088949488467620,0.6546112908226877635798,\ +2.3190840475863043756988,-1.0326993872554559583676,1.9805065587758790002226,\ +1.9896627954528611770257,0.9782130127113016770934,0.9495035596250852583111,\ +2.6155274562386430226013,-0.3882195415344683042669,1.6969468407328636150311,\ +2.3343766660435352200409,1.0146967843242544748961,1.8258003683547168183310,\ +0.8286050933424484732370,0.7704328385697075676219,0.1502070282359266317762,\ +2.3818436251417942628450,7.4205579165122914631070,0.9034699872486960936513,\ +0.0421812525739015259374,2.772183837530781680414,1.05592364033954333458,\ +0.4321743126982589000562,1.0104075090452335761171,1.172999728469012792331,\ +2.4859521407117588509550,1.0004516930864140178414,0.546406215495572333829,\ +-0.0897848836255507876114,0.4902005853747226638006,1.3459428245240352417511,\ +-0.9702703286402243332276,0.4885630407318873325018,0.8780295479347596243613,\ +1.70760011581548409865,0.3365500801559331289781,0.9791465640129676240022,\ +1.0399586044108937166186,1.694655018871175533590,0.782984551558400743154,\ +3.2677601373666536055396,2.1277760759506403332,1.14078060084558496889,\ +0.5190124031043247265771,1.1102812125309757806946,1.1710705982540408065518,\ +0.9356000257245263851402,0.2627541871520008842644,0.9248192933983879759907,\ +1.521163371222483906564,1.6845378275230893372338,1.06533482774366716761,\ +0.8498389444062255382306,1.0685794539652364587567,0.652956087446700861321,\ +1.1336945232455741816580,0.4760496137462009169639,1.0655234579631518432308,\ +0.3786859524519583519719,1.1151440885209693565372,1.0396183182135259048806,\ +0.9918753196058325283246,1.3573231183580980463432,0.0667878216615050979144,\ +0.9763703551872023878033,1.1968339368077574036420,0.3044649077728942554444,\ +1.3772502379038416009394,1.17234744424829684384,1.4766671247289078205966,\ +1.1826761905568310417891,1.9143513147617730041361,2.0066566439861803772260,\ +0.8422630906406018969079,0.0168918363185286551920,1.0985590427740710151028,\ +1.1765072536632881217145,0.6974498887881349640239,1.9699828668985011059789,\ +-0.5023701162984575141479,-0.5400394193341752080428,0.2985422403364683119342,\ +1.5853347023892305767134,2.8298681106779470795232,1.57430200098008077347,\ +0.0085163822819922137264,2.34150280392945697727,0.9260267598505396158259,\ +1.935359947414732717519,-0.624580203843195791436,0.2899045962478056792655,\ +1.1098967555784207128511,0.6015796718407534493522,0.4088898624506622225816,\ +2.4110975561220100438220,1.194926943855234124925,0.8031086031385790136028,\ +0.7056759527365589201864,0.4529743829467441917913,1.4838629998186587677367,\ +-2.0715572287647061600069,4.2672653505633393322682,1.3529709414016093393940,\ +1.7293958649615748246475,0.6702228972280770413761,1.246418198725941284266,\ +0.8524596514683829839854,0.9764536278838282790105,0.7407821510692440547530,\ +0.8301521851442831279044,0.6387195724636756111181,0.6461301327556139284525,\ +2.7018352901688040823558,4.1613347047505291342873,-2.8343681862783589586741,\ +0.7623226303646806201186,0.9067568500030595002315,0.8723652455116047699235,\ +0.6696132906174546706168,0.7552700261493744404717,1.1992371819877765126705,\ +1.8643427000471699539474,0.9539854852947572405597,-1.8677739580920826867327,\ +1.9475448138625472971341,1.5369506397672023645384,0.5466606741068265051808,\ +0.9729193674298542982015,2.3999437957484786032580,1.4341047292357653741846,\ +0.5111837868275163065945,0.1111569790233604693164,1.091716362873146328738,\ +0.9138969247921984173644,0.7040484777727061826980,0.9721353920795816616618,\ +2.0373197284299586762302,0.8964067096914249965778,2.3355486655682877739082,\ +1.7093760866374785312161,0.2716303051904848664400,0.9460612941094431738165,\ +1.2762143042912967860758,-0.5352378220939374431353,1.1838129188764214827501,\ +0.3761598820395333775402,2.3805545048605618596582,0.7017854493503786761366,\ +0.9822084988099225588698,1.1648832392783827760496,0.9992994024245958062380,\ +0.1738523619678353504536,1.6004378914991708171556,1.3222645989799672872067,\ +1.6332603440938282535200,1.1558588483310223704592,0.8687697917589873863875,\ +-0.8204224950713523423218,1.4547791700377004087130,-1.0014359468702989097721,\ +0.0144439712508898226995,0.2674388703277625345400,1.0538721408636444465401,\ +0.1548583219344299433118,0.6953871836582313781250,3.5373520681952288491345,\ +1.0989946596859092586840,-0.8807918395297148483891,1.18456726702104053750,\ +1.6180875245455190736266,0.6615360547308598571092} + +#define ZRESULTI {0.8476313539717991174527,-0.0020945428347154504238,-0.0107702820990110675198,\ +-1.3194799051731675998411,-1.5788424410279275900137,0.0069265821924918190636,\ +-0.3180628434269115456523,-0.1158623505001605547005,0.2488922702434745726219,\ +0.3333162069042073238911,-2.7579550935532486377610,-0.0929722217314629395535,\ +-2.558018975124945360022,1.0673421965913736375597,-0.0202992468302341001751,\ +-0.5103135313335316336492,-1.0383893485568700398858,0.2955939972849115360276,\ +-0.3716363644745803163083,-0.669112301980219426056,-0.3318327753869652063656,\ +0.9035686841735829366584,-0.0067883075736271340089,-0.0021471806447879195068,\ +-0.1287847092516060110157,2.8852450693166233897102,-0.0010974001216119489213,\ +-0.1508680801994282949519,0.315705921414520418455,-0.2580859369524737267909,\ +-0.4893903475844605388545,-2.116294802120160856163,0.5953479459460185863051,\ +2.0617504351927595784844,0.3616928144472888462246,0.0048175006267416721831,\ +-3.1913265982599425818478,-0.0679428805767179483377,-0.3743690366783002931861,\ +1.6027053949682106281927,0.0107745309683946743906,0.8329399053511026274066,\ +0.0907062192789129806414,0.0408000708558418981320,0.1702419063491371065133,\ +2.5813113904964448686030,4.3826942657913274814518,-0.1250993995488117738191,\ +-0.366232782627764485994,0.1355060901825991537262,0.4285644238647245418683,\ +0.2943941929388677047896,-0.0242296816969479640591,-0.5347582943284873158163,\ +5.440972259812645539512,0.1130116459854922927875,-0.0230886388762507679950,\ +-0.0758567265188389433517,-0.0153004723200108137121,0.6705905748883707051533,\ +0.3580727041769314333841,0.5060754117432990639713,-0.0529558939424066774104,\ +0.8998620364333704824134,2.4830051583371242074350,-0.0075609544367582562363,\ +-4.5567155472995342080367,0.3858035723583744802667,-0.1243338609096430735779,\ +-1.9945093918095539997637,-1.2920941940088974675405,1.2080631306058675633608,\ +0.8083456169264077173509,-0.0085739065252298622688,-0.1660020282935961710713,\ +-0.0959540597572042242014,0.0927222427996397119410,0.2221508503381195154258,\ +-0.1409070089536773040528,0.1405249830722395676386,-0.0419169397939630830607,\ +1.0272672902510724401992,0.1050876648914500499643,-0.3835786757949954384195,\ +0.5298437409836795897178,2.9106995454114534815915,-0.0190217208337024913656,\ +-0.5609150372475696366692,0.1029355491400509997613,0.4090658874763115071538,\ +-0.0046870241505978906330,0.0668889266782490693464,0.7415168418856862286859,\ +-0.0168562013052173872985,0.3406253082923152986083,-0.4061399877851155082453,\ +0.2969570085375197732169,-0.3434409399238548266098,-0.9854495385788534234095,\ +-0.0867374346127948586682,0.3597999966335438393195,0.5808295174480837541608,\ +-0.9935741356819206560047,0.3096185219585154135835,-4.5479921396771585406782,\ +-0.4366900670417938612466,-0.9018465944214471008422,-0.5250881076401040514767,\ +-0.8025691478992442728924,0.0572684987995472974398,0.4945930961405698988997,\ +0.4034972398433521179051,0.7137454043276676429741,0.7512128888062908904644,\ +0.1939996418115135512483,-0.4464039676558783642513,1.3907357608014461192170,\ +1.17156541392215607367,-1.9708685366549760775712,0.3123022444724680712902,\ +-0.7896872395843760328304,-0.6179850212857144198253,0.9256883067644073870284,\ +-2.7417718288371224488742,-0.1326893078962607386284,-0.2491649089658723725815,\ +0.6490031468453125729212,-0.0039713278584005608923,-2.4386883505629461943442,\ +3.178543851545130305425,-1.0690676099739919724385,-0.0260882664072711288605,\ +-0.9060493921002102934992,0.6199896062130800800105,-0.1133779208230118323852,\ +-0.2723070216270195298414,0.6794632710962359434248,-0.1319558520667497847345,\ +-0.0528338647750857190455,-0.53278022650161005469,-0.1536737960232173183517,\ +-0.1415472283443244549961,0.0042545728383564943367,3.4486281529351474617329,\ +-1.3962363760387317412892,0.0515879186128369374154,-0.7852445756480942451461,\ +-1.0432119477148995567717,-0.3036586016327645909385,-0.8524640219222514581077,\ +-3.278864600929186412515,-0.7961629883628608128632,-1.1545100621855832745410,\ +0.3684195377039459207147,-1.6970666375940057779559,0.5849997270051815467795,\ +0.0618729525386339657134,-0.1749203390283090575608,-0.0606310989665877000943,\ +0.7892429044220883316285,-0.5178739198482895655928,-0.0418201497112469372519,\ +0.2095761220035197158751,-0.3550942958596610687927,-0.0867144455279654918778,\ +-0.4598945931287213850780,0.0685694193597463919065,-0.3559389766660929765862,\ +2.0119894555407911163059,-1.0947444956011096461879,-1.6288470340375438283331,\ +-0.2410820142960599099524,1.4659778142858674865323,0.6624490343288035321123,\ +0.4136536130989748594189,-0.9846866209581750517543,0.9510859925791920188587,\ +-0.3140825904492373088495,0.4344001304574144906034,0.0016042272632115935332,\ +-1.7199780122539785054414,-0.1872506113405222882839,0.4446357342161921244461,\ +-0.1745599221993578142875,0.4442139130537332003534,0.2767209124711134116126,\ +-0.0013781156561338940309,0.4254643497866397727769,-0.0032333769526939463469,\ +-0.0697738544158777868054,0.1581414947349125965648,-0.0415758240738434495243,\ +-0.8801521218406083146846,0.0803587769045229632914,2.1574882446469239027920,\ +-0.1027605757720615048401,1.0043017952229080780313,-1.8015810020856124484823,\ +0.0897692625606805599814,-0.2856956371820633111547} + + + + +void dcoshsTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dcoshs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zcoshsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zcoshs(in); + assert( fabs(zreals(out) - resR[i]) < 1e-14); + assert( fabs(zimags(out) - resI[i]) < 1e-14); + } +} + +void dcoshaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + double mon_test[9]={1,8,3,2,8,4,3,4,5}; + double mon_res[9]={1.5430806348152437124099,1490.4791612521778461087,10.06766199577776710328, + 3.7621956910836313880964,1490.4791612521778461087,27.308232836016486544395, + 10.06766199577776710328,27.308232836016486544395,74.209948524787861856566}; + double mon_out[9]; + dcosha(in,200,out); + + dcosha(mon_test,9,mon_out); + + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } + + for (i=0;i<9;i++){ + assert(( (fabs(mon_out[i]-mon_res[i]))/(fabs(mon_out[i])) )<3e-16); + } +} + +void zcoshaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zcosha(in,200,out); + for (i=0;i<200;i++){ + assert( fabs(zreals(out[i]) - resR[i]) < 3e-15); + assert( fabs(zimags(out[i]) - resI[i]) < 3e-15); + } +} + +int testCosh(void) { + printf("\n>>>> Double Hyperbolic Cosine Tests\n"); + dcoshsTest(); + zcoshsTest(); + dcoshaTest(); + zcoshaTest(); + return 0; +} + +int main(void) { + assert(testCosh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/testFloatCosh.c b/2.3-1/src/c/elementaryFunctions/cosh/testFloatCosh.c new file mode 100644 index 00000000..979d8d64 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/testFloatCosh.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testCosh.h" + +#define SOURCE {-1.205685175775274453613f,-0.8333271236779051793775f,1.2335774322243386880160f,\ +0.3311018349037936903123f,-0.8052653369328224286505f,0.1998487851928297531767f,\ +-0.8705427356398579563646f,0.1975294304937466050021f,0.9239335793216870706956f,\ +0.2378506537628061745515f,0.0049366873129022617595f,-0.669236585027300545647f,\ +1.0653101376824569701540f,-0.3369456198746673680766f,0.6204667311042414423738f,\ +1.6283002068610463730636f,0.7206914942876857521625f,1.7221990362694574727698f,\ +-1.0902216302137626158242f,0.2874486754733126536721f,-1.2122889745482419154854f,\ +1.8215917027079053802652f,2.8016558959521908889201f,0.4050930510541474460773f,\ +0.0617355341334478585624f,-0.4301267567705842620462f,-0.8284509700102783424924f,\ +1.0256901078279201389165f,1.525021231170059277105f,-1.3197460532844016434240f,\ +-0.4460647093896898951471f,0.5045503141647188494190f,-0.8098965560197782798113f,\ +0.4268132043604428993433f,-1.1336964590865461488534f,1.127146072313511160345f,\ +-0.9122705295277132586662f,-0.3089065753248803058995f,-2.3178211651402826909418f,\ +1.1439933378277502562526f,0.7005552213939509886842f,0.4233298618301614135717f,\ +-2.5208275627904130899992f,-0.2816183187535069021301f,0.7467093404219694585677f,\ +0.7637510409783198062073f,0.3396503036180347767647f,-0.9747149605661590276995f,\ +0.1472242280982364037722f,0.9901921384491637612157f,-1.2197737051905059857404f,\ +-0.4607952353595122785279f,-0.9492383290419380559300f,1.4160381392623584417834f,\ +-0.2758297498115374613015f,1.7324484611160422264931f,1.1368999048747294722261f,\ +0.8568173351546003457813f,0.3519313905007281362280f,-0.8897875910518927566883f,\ +0.2244273879422930551009f,0.2394303391704008243668f,-1.0382487030291693841377f,\ +-1.0129167707607047432816f,-0.3443356316152397234021f,0.9904626758703307665144f,\ +-0.5700286524862564485616f,-1.2143893416629112369520f,-0.7653327397314562130504f,\ +0.5932733856160632424093f,1.0109636831448121085941f,-0.2591906321322083317504f,\ +-0.6337213759172125593366f,-1.3891534527523830000462f,-0.7588209965122667544080f,\ +-0.7751521002127067516696f,-0.2569588781664822740858f,-1.1144881209346948480743f,\ +1.3683403773429958505403f,-1.3171565382517111952865f,-2.0066059395312958457680f,\ +1.1665757372971858885080f,0.1803963656727911035738f,-1.4583403177666438566007f,\ +-2.0738880513575592701159f,-0.7736713589363241050378f,-0.4690505767289738225934f,\ +0.5290181646318501407222f,-0.6366436437236088208280f,-0.1514973533385992610079f,\ +-0.4939237897364461837846f,1.2009977647347911400288f,-0.4479171393972471992839f,\ +0.7962022364285237241432f,1.0553131168098721648363f,0.6399283922940391944323f,\ +0.6404945676646236485396f,0.4718907579921589601213f,-1.1669004068172705856909f,\ +0.8239670665751658296116f,-0.5209824870944876895607f,-0.5564774733886624913382f,\ +0.677433403214317775287f,-0.9826152250790042286255f,-0.2301482766849789196595f,\ +1.5256623976111793883348f,-0.0141042499939363699668f,-0.2206563911375283293381f,\ +-1.2404617973010751974527f,0.4956722425079039262563f,-0.9198528977539149886766f,\ +-0.9204208417497926619788f,0.8313756689801026222852f,0.3180154749624292120913f,\ +0.2494121392443543194783f,1.9786862305439512077498f,-0.7539887840478504132946f,\ +-0.2522144002260635065049f,1.4817018679370650424687f,-1.1886013018444978595056f,\ +0.3497827881131843619222f,0.0164051036269147361424f,-0.3356971818656850903295f,\ +1.5387250556465030815190f,-2.2939395533776552049687f,0.5463520678571377464650f,\ +-0.6249598247747292223409f,-0.3795057983233444121041f,-0.6817850926970092650947f,\ +0.1137639445438838742275f,-0.3667643438770555319728f,0.7811095630972452186214f,\ +-0.6491897518190495874890f,-0.4116889792407164572197f,2.2135576248798094489700f,\ +-0.8117887004060938549443f,0.543890637094475826174f,-0.4300056333049381840361f,\ +-1.1073264735386671997475f,1.9600404811338050237168f,-1.1810889471038799047875f,\ +-1.5998650464994574882382f,0.2370987431342703177783f,-1.1837915340560738464148f,\ +-1.3250738110530209112881f,0.9867165393345800339375f,-0.4254735979103318466166f,\ +-0.1977286302171261667127f,-1.3843612904745590252986f,0.0058770971600078198913f,\ +1.6513137110120594819307f,-1.9479686718307542836470f,-1.1853539723928359084226f,\ +-0.1952876876932538308118f,-0.3910952467587283098993f,2.6051477231429984726674f,\ +-1.1685665444554920178177f,0.4303553159707447783866f,0.4980619697002917622974f,\ +-0.5945099409025637049453f,0.6251723753612481448982f,0.5667367529854526742028f,\ +0.2583522627447231712061f,-1.117334797621551301106f,-0.1572947959550771157566f,\ +-0.1675843890566963978461f,-0.4415529643720014774111f,0.0296777742804143623845f,\ +0.950535269366517221457f,-0.2023353295590510914082f,1.2240649283812428116391f,\ +0.8408743467009373029342f,0.7289489292828028599303f,-0.3650480390020546805907f,\ +0.7141089622210116116818f,-1.6330473677930090747878f,-1.2120035333729530790947f,\ +2.5522160888662996924836f,0.4631064145940361198583f,-0.0364246441804653570129f,\ +0.7308349560709582748430f,-1.059234312724760096458f,-1.5608743035213317185f,\ +0.7865883787823105821602f,-0.1899223202317779357617f,-0.4035214553331447628892f,\ +1.4993140466900047869103f,1.2050329976249689600820f,-0.2109320691913422751718f,\ +0.0478227589320652582416f,1.1080187662760754285785f,0.3698710666565526716809f,\ +-1.8629885917707584841452f,0.1117850228517819205498f,0.9930250182564113181627f,\ +1.2533428090752711803191f,0.5303160507909902010582f,0.2252859052932770778099f,\ +-0.7558035543285445134742f,1.1653980888802857318609f} + +#define RESULT {1.819266428064204577097f,1.3677812549451693335811f,1.8623697303215194231996f,\ +1.0553168123818659207558f,1.3421296845542964870646f,1.0200363222965405096687f,\ +1.403465448863383979727f,1.0195724536239654245406f,1.4580674176636316818900f,\ +1.0284200725097112361084f,1.0000121854655601438822f,1.2324226844271635172845f,\ +1.6231798706546742838697f,1.0573052784271492754442f,1.1987446423322825062030f,\ +2.64573472675944731947f,1.2711350583337506225945f,2.8877476825709762486838f,\ +1.6555376604226368364436f,1.0415986209192817923963f,1.829342489722003417540f,\ +3.171729047671292711641f,8.2663047019615358834699f,1.0831783845382449982253f,\ +1.0019062434070211686787f,1.0939395186073928023518f,1.3632471669518277934685f,\ +1.5737842316817938215223f,2.4064287835907673951397f,2.0048370085520934580359f,\ +1.1011474483510161892497f,1.1300087947090773354830f,1.3462897763229764169779f,\ +1.0924759182927643585970f,1.7144810122297002852321f,1.7053954010120264683792f,\ +1.4457904936509571314218f,1.048092245021622570533f,5.126007634597746331906f,\ +1.7289119973762236970316f,1.2555903810189259495189f,1.0909502538663513604433f,\ +6.2596397068650517780952f,1.03991721163594563748f,1.2919843250699158954120f,\ +1.3061137606130501787050f,1.0582378205813938176760f,1.5138557575271749389145f,\ +1.0108570760043096292691f,1.5316284576789631621807f,1.8408591504389772985917f,\ +1.1080580118223748442574f,1.4853883271417620548505f,2.1817178624460376035188f,\ +1.0382828245407387246502f,2.9156663093555850174710f,1.7189510624849844155904f,\ +1.390081256029065626123f,1.0625696729809925855648f,1.4226777259325882329932f,\ +1.0252897080419871578272f,1.0288006377558764903313f,1.5891703898572226982822f,\ +1.558389589207426872974f,1.0598715893830090717f,1.5319423704594259394440f,\ +1.1669134763143933497531f,1.8325639262468249590654f,1.3074443355436990987783f,\ +1.1812094824791219416227f,1.5560581683472911596056f,1.0337783603024415235438f,\ +1.20761220067196339834f,2.1303694894256701708457f,1.3019874017358665785338f,\ +1.3157780065006974279385f,1.0331959861022277369358f,1.6880453716815839726451f,\ +2.0916769731603670479103f,2.000344096331303500591f,3.7862367743494589333864f,\ +1.7612050492619382158210f,1.016315598810441089839f,2.2657204820986769355784f,\ +4.0406956659153259181494f,1.3145132010698166169504f,1.1120358920747182018829f,\ +1.1432241110320022769997f,1.2095957312624510127108f,1.0114976895400229484068f,\ +1.1244804773055134816673f,1.8121625561683152305648f,1.1020033178144590380043f,\ +1.3340717665795371882353f,1.6104789889363373411868f,1.2118376325588768871455f,\ +1.2122253780682052948237f,1.1134219567585550425548f,1.7616758393639733171199f,\ +1.3591064226145659343814f,1.1388088791439558988827f,1.1588706347019575026991f,\ +1.2383685118981913042546f,1.5228821862471519921201f,1.0266012226158198750170f,\ +2.4078326713444666573594f,1.00009946658283555010f,1.0244435586923690273409f,\ +1.8732301190987417083278f,1.1253813439974511556585f,1.4537494816372256156711f,\ +1.4543489946263667977888f,1.3659627989922018542757f,1.0509945293445170921842f,\ +1.0312647772215886021741f,3.68574234301369418887f,1.2979736367142225006432f,\ +1.0319750139115386744493f,2.3138394341351444793986f,1.7935669311616093679618f,\ +1.061800258350523940010f,1.0001345667304306630285f,1.0568774415753066087120f,\ +2.4366507835843460583192f,5.0073927789679837374592f,1.1530000373394655444059f,\ +1.2017269174685778487799f,1.0728807813362080114672f,1.2415589372685298386045f,\ +1.0064780997777151849704f,1.0680153713756039834948f,1.3208958764713327749263f,\ +1.2182291644802725194552f,1.0859476120918869490595f,4.6287577582643999463130f,\ +1.3479977392146349490787f,1.1515908109414143556393f,1.0938858068153072267137f,\ +1.6783490081276506433738f,3.6202335893551729206763f,1.782432142455154355787f,\ +2.5771439034538188295187f,1.0282398297270358700217f,1.786426290897340729558f,\ +2.014123198363930722365f,1.5276055774381211982f,1.0918876182447221356853f,\ +1.019612078038364622046f,2.1213794605936713288941f,1.0000172701852236833986f,\ +2.7028112826383159372767f,3.5784939357816578642257f,1.7887413660887121480414f,\ +1.0191293197498234590626f,1.0774575372953134611009f,6.8035582731627464170288f,\ +1.764094760751516499653f,1.0940409161295887585652f,1.1266181837435944590453f,\ +1.1819878003429369339727f,1.2018685976750431709803f,1.1649400331120620677439f,\ +1.03355898490236453036f,1.6919235891909962798962f,1.0123963536864837298168f,\ +1.0140751587041334502715f,1.0990787112389970303639f,1.0004404174672476557362f,\ +1.4868140745992959317334f,1.02053972356750688455f,1.847508472372893173485f,\ +1.3748631970003435398553f,1.2776582369190518928548f,1.0673732569157268201820f,\ +1.2659971203245654614022f,2.6573926189895762384197f,1.8289053177424414720065f,\ +6.4567128779259412851843f,1.1091640429888753871523f,1.0006634506999989575604f,\ +1.2791603587689326371191f,1.61544148317066760256f,2.4864680737312045977205f,\ +1.3256439332679719189656f,1.0180895207546800662612f,1.0825255238019519943293f,\ +2.3509495822805339670936f,1.8182756477804529193776f,1.0223287733363202178793f,\ +1.001143726087694751925f,1.679282557162007583074f,1.0691856802487731403772f,\ +3.2990857486037623580444f,1.0062544545151006492034f,1.5349210973541418390198f,\ +1.8937893477592186997072f,1.1439441561926790846826f,1.0254843822262098562703f,\ +1.2994774746280413069144f,1.7594989466591723914490f} + +#define CSOURCER {-0.8912345066950769778558f,-0.0058415661764856371616f,0.8327394520710053038570f,\ +-1.3031116495573464852953f,1.3063996947557070527068f,-0.3291212350984021872691f,\ +-0.4314780628860441225036f,0.3257069146291299843732f,0.2704533752036020199938f,\ +0.3948286552396417792288f,1.7413456505609685720515f,-0.0929389968439678221257f,\ +-1.7740482961163070996236f,-0.9310406640182858906130f,1.0558482448966843847415f,\ +0.5302093445317125341987f,0.9099214704748677107204f,-1.3248358105760951186625f,\ +-0.5468817390748145212953f,-0.8462613338460863721124f,-0.8447436284186202737345f,\ +-1.201032047282137193989f,0.0724835993626015417934f,0.0038054949984360143984f,\ +-0.1410382163048108095094f,-1.7842189597096504982687f,0.0501420738427398662851f,\ +-0.2334922077300364828822f,1.5945984531602754863400f,-0.3238241601909672695569f,\ +1.513308285995593083229f,1.5778451444411625281816f,1.3691912706993336623640f,\ +1.748251159750787042668f,0.6019009531079806407661f,0.0153371667399079970179f,\ +-2.11368074169300124154f,0.0736235546297408505190f,1.16364818469077779817f,\ +-1.7239586420846975123311f,-0.1812698216235553161368f,1.3506264987504341679170f,\ +0.1572244306209917286132f,0.0637660966151842728555f,-0.1712993899334549763314f,\ +1.9516485698976029361518f,2.845403039274271073111f,0.2554082947132658709677f,\ +0.3587738434809014664850f,1.6800084635178351710749f,-0.7143150645295742728891f,\ +0.3176042681985608573392f,0.1918613409687800752668f,-0.8669525494355047046113f,\ +-2.486482303849266717322f,-0.3399076190046602663486f,-0.0275599140270330646152f,\ +0.0760891140551305106277f,0.0175525149136643889014f,-1.0447511992604696651199f,\ +0.5928194662003063442057f,0.5337685538183976063920f,-0.1083277352156265110894f,\ +1.3163705916013288543809f,1.6481947619041572572485f,-0.0366427588652487520871f,\ +-2.24532677610144792979f,1.1646157862674424432470f,0.1931514629705824159789f,\ +-2.0280558458213828743055f,-1.588195044157987734224f,1.217389599860282611843f,\ +-0.7923310676779923289459f,0.4657912238712272334773f,0.6341322794098591675294f,\ +-0.2308714073795904986319f,0.0959191686134504700734f,-0.4119590516116395373380f,\ +0.9909317687163362586844f,-1.1184985773424866994930f,0.3764360122586650203580f,\ +1.0283807947333536425560f,0.4399875767202614529339f,-0.4587329057670580523265f,\ +-0.8383371473991714228902f,1.8010370613667443517869f,0.3638310348854316700340f,\ +0.5630372956104594539539f,0.5158868637708874382852f,0.6872616626544041373847f,\ +-0.0355020269914341005113f,0.8259138693919667595367f,0.6872047295901000385498f,\ +0.0739287007414783509107f,-0.7662836697323893719869f,0.4114094358620231095536f,\ +0.9046891131020067255974f,0.7464765051550138474923f,-1.2447871833324788415354f,\ +0.6121845724663061982795f,1.2932746927561220573466f,-1.3794546951962081138277f,\ +-1.0054979370864329801805f,0.304912140043878954199f,2.2462341404304981828943f,\ +0.8089620929537136850840f,0.9035087652875184449641f,1.3506573247795918835124f,\ +0.7844818177699410810533f,-0.0679273669198190016560f,0.4928294105013013015615f,\ +-1.096446680245239946316f,1.737658266453646849214f,1.2019686032899719041467f,\ +0.1928095667884118236124f,-1.5186389453508686298022f,-1.2473448039026917566f,\ +-1.489337044442988755577f,1.4654430117361589847036f,-0.3194353686893170451988f,\ +0.9845148496238763646815f,0.6602210723100759848236f,0.8588563891948870487880f,\ +-1.9910804060218119104775f,-0.6479512615308331557884f,0.3691293678246713727553f,\ +-0.71770775009329423888f,0.0044545145586906377197f,-1.7569208392800599316530f,\ +2.0338706868044176268029f,-2.1630248696548646236693f,-0.8178753147165283010622f,\ +-1.3281476236021181325242f,0.6822623476118111485178f,0.7066790730643729423477f,\ +-0.423530195967014910785f,-0.8514600115056394358248f,0.1911450421094866014560f,\ +-0.0937215291541069195347f,0.5968058072572121064425f,0.1973784591490661544100f,\ +-1.6526328643143648466918f,2.1042236280016610727728f,-2.19182144090441122231f,\ +-1.2142537279036162978230f,-0.1183253697043944729916f,-0.8801137301237593746350f,\ +-0.9900854927608483402324f,-0.4110378213905900302017f,-1.0605052107018932971982f,\ +2.0298978504498510488929f,0.9198308522281034571577f,1.4593911606425682414567f,\ +1.313234307458837291094f,1.5294344184237567141338f,0.6175875795682116420338f,\ +0.2031917147194874651017f,1.5255721310550354186120f,0.9034041242193133758320f,\ +-0.7761278947312221232480f,-0.4993921694234899066878f,-0.4357874013090125009384f,\ +0.3873324791493603647119f,-0.4467287463644364353677f,-0.2545033653001004259053f,\ +-1.3746540854818518617719f,-0.1477740272607140914474f,-1.5074443625622220288562f,\ +-1.6715013742258788553841f,0.9592226709426125985658f,1.3640187263976746301353f,\ +0.7890452102613630946948f,1.2129240708363580036888f,-0.9486821752491236825477f,\ +-0.4274439849602727492517f,1.6129284060703097392f,0.9379949480470993750103f,\ +-0.5596964661999650481050f,-0.7987634619537844482551f,0.0324112900849305857198f,\ +1.314201571181351946294f,1.0612990922031533269632f,0.9227327442687582870207f,\ +1.0844570327567082390630f,-0.7983322787922396690519f,0.4385271461747112797802f,\ +0.0024102971394308028881f,-1.0118154904234695212750f,0.0705293335731081022510f,\ +0.0697245903762851448882f,-0.1632285547093744459968f,-0.3480161062719534514898f,\ +0.7985173205564675136259f,0.1109596610185162313122f,2.1081890906632976268043f,\ +0.4892671398131347992866f,1.0240089881181213549155f,1.4852757378982723857064f,\ +1.0644644981998814259327f,-0.3570451345877300175502f} + +#define CSOURCEI {-0.9898306808620782604180f,0.3667210055378663513537f,-0.0115516846422681774414f,\ +0.8852998822794806432768f,-1.1751393894807391493629f,-0.0206719580996688329089f,\ +0.7962831267090092479677f,-0.3570515343460327617464f,1.1412480529936015472003f,\ +0.9660799200593181979002f,-1.500080296017527903274f,1.5242908911731756216312f,\ +1.105363493233324723164f,-1.4826475597643153925276f,-0.0160696607830907479963f,\ +-1.1650712441016521925263f,-1.5029224597675916452744f,-0.1699343140216190151115f,\ +0.7034171630892511739575f,0.78048631235475940393f,0.3572706186066606504070f,\ +-0.6408324378966977485916f,-0.0937081428320361148332f,-0.5995006453733843221343f,\ +1.998069767982257660677f,-1.4952437710179469210203f,-0.0218783914582419587724f,\ +0.6948934249723224265693f,0.1340798946938218938474f,0.89984980932311908752f,\ +-0.2284707639451582783519f,-1.9920610974541457238729f,0.3296873301478878692805f,\ +0.8334316663655645385234f,0.6017800660861944983537f,0.3195021884236714515559f,\ +0.8984984730147690390467f,-1.9683562813815465020184f,-0.2621383110944355832039f,\ +-0.6316753727255608463764f,-0.0591493996271135885623f,0.4809775893765277920977f,\ +0.6120565292662866196949f,0.6937256492244192607188f,-1.4222204429149998272663f,\ +0.8456412639793806640398f,0.5364524335270092203487f,-0.5058105404615705902316f,\ +-1.5311811141279494385969f,0.0523506509744253098471f,-0.5845520117472021714988f,\ +1.1469635617104527725019f,-0.1258479133308397501789f,0.5773840158286764889795f,\ +-1.1474331349335626928365f,-0.3322391415499996170091f,0.9929767773460509427963f,\ +-1.660441950926221155171f,-1.0585630798226148829855f,-0.5685726288282663132279f,\ +2.5350425363467468109491f,1.1303214701472124037451f,0.5096756039133761850835f,\ +0.5467199129804439783342f,1.4455896704702442256973f,0.2077882393389256510119f,\ +1.3512301851415178255422f,0.2700167751147149464153f,-0.6941424124437390874576f,\ +0.5635246670082925124490f,0.5834755445761464764942f,0.9008533966882129595533f,\ +-1.170120921094221611014f,-0.0177589837851252312084f,-0.2475436907499060923410f,\ +0.4245903735389653377297f,1.3061684980078611673093f,-0.5518911372967175710258f,\ +-0.1216398923828668349190f,-0.1029994384259720480168f,-0.1089806892178883240829f,\ +1.0016946254399594629092f,0.2334205918306470894930f,0.9399822370279485861388f,\ +-0.5987819428189028458931f,1.4171477596181012437171f,-0.0511681877729818074263f,\ +-1.239060328697855206670f,0.1921278548938223085241f,0.5833400770787767752878f,\ +0.1323798905411992243852f,0.0725274151024776908558f,1.517150104931189957824f,\ +-0.2298162704468252326429f,-0.4156880360427151477332f,-1.2865870850947289660837f,\ +0.2915127708019566443731f,-0.4334207057720374511867f,0.6674221275639458106355f,\ +-0.1336045597099253245954f,0.2151665632136103845085f,-0.3174957202806932832218f,\ +0.9961380035737125160367f,1.5546597091479958940852f,-1.3388468039798184783251f,\ +-0.5065257499177515665423f,-1.0639142786788362560202f,-0.2959444267422965957337f,\ +-1.960038123367497275851f,-2.1398034807947201585421f,1.3019428580756020608078f,\ +-0.3083046332207799999914f,0.2621552778202266842378f,0.5195575373923391193642f,\ +1.56243573209724884165f,0.2068570860697496183178f,-1.0570132216452536866313f,\ +-0.5904609039323533981047f,-1.8482550680523897046470f,-1.291460161650367144404f,\ +-0.7557326141240545691602f,-1.0579108981634606223565f,1.2726680818341371548286f,\ +0.8679294400149879518125f,0.1923087263308917160831f,-0.7207099055968289036400f,\ +-0.9810187619058614583167f,-1.1007025532949878954270f,1.0502610988542768755138f,\ +2.1328376492581355705624f,0.2517811686949605887165f,0.0286045569084023044992f,\ +0.5426452678085846859091f,1.0007501149236575077595f,-0.1483667758019126259317f,\ +0.6740034918705165578601f,-0.7882925718203834808406f,-0.7561945904807015894633f,\ +0.5978999579905148742398f,-1.0006972818202708452873f,-0.8844110367528469351939f,\ +0.0563203493770412927377f,0.0010532695687821122445f,-2.2465253729529170989565f,\ +1.141716522775603870343f,-0.4500026076505115879556f,0.9053568457125464874480f,\ +1.1182847109018192455210f,0.8014435340539697305573f,0.7353172667964483766312f,\ +-1.0684850588765142376246f,-0.8549786389844856726583f,3.744686089807424789200f,\ +0.2152832470021692201634f,-0.8813298598480671097732f,1.096456876472062580419f,\ +0.3072305150928033579127f,-0.0799524082246828721177f,-0.0588190904677381790067f,\ +-1.1720572424194137806097f,1.4720320544391665151807f,0.0931276494198173265815f,\ +0.555984015411468357470f,0.8773397145008163811042f,0.3438026639727968514215f,\ +0.2511717975861258445036f,-0.4806220734748062883845f,0.1665649861790623464941f,\ +-0.9011922058627225284866f,-1.3882654124150977104080f,-1.0995275754970570414315f,\ +-0.2796226936636541648973f,1.8675624576106222285432f,-0.6479880884779005700835f,\ +-1.2193765127792735025736f,-0.4210708606718742141872f,1.074252254135527273604f,\ +0.5620287257728261431922f,-0.5121392183328929981201f,0.0495074962957085112913f,\ +-1.483551847645206089865f,-0.1477396930496895632867f,0.4331368024681788719832f,\ +-0.1336623009706502385185f,-0.5252621832336971108290f,0.6576305030526226058640f,\ +-2.5329417269156695446952f,-0.3644974785307753539776f,-3.0957701776748671740336f,\ +-1.5563868957442139606684f,-1.3037172144407160878643f,0.1173565633554439491260f,\ +-1.4546337195274263720535f,0.8077473947731041992171f,0.5608831835142086275070f,\ +-0.2032753128403547993042f,2.1656548569001641268983f,-1.0352617083883073334505f,\ +0.0703447174899709398721f,0.9001420266818445092838f} + +#define CRESULTR {0.7816146272263719829709f,0.9335239938948984850242f,1.3671418657595642009994f,\ +1.251053426889690234347f,0.7638235407866506010421f,1.05442571981112132029f,\ +0.7654863707154079266459f,0.9870695051633786576417f,0.4317842171461107048103f,\ +0.6134213525393761301530f,0.2077424772758102444747f,0.0466895952950193357522f,\ +1.360861123120397309094f,0.1290276167481773372803f,1.6109467398934755877349f,\ +0.4514742994866134950804f,0.0978899773240222564885f,1.9847014656066033211346f,\ +0.8795516810834358434334f,0.9805643961019996357464f,1.2914771272713012617572f,\ +1.45266805020831779593f,0.9982291599155850292391f,0.8256234470461548680120f,\ +-0.4185192299594263642959f,0.2310786951961565083291f,1.0010177538173574696145f,\ +0.7891557184270517888436f,2.5416517088949488467620f,0.6546112908226877635798f,\ +2.3190840475863043756988f,-1.0326993872554559583676f,1.9805065587758790002226f,\ +1.9896627954528611770257f,0.9782130127113016770934f,0.9495035596250852583111f,\ +2.6155274562386430226013f,-0.3882195415344683042669f,1.6969468407328636150311f,\ +2.3343766660435352200409f,1.0146967843242544748961f,1.8258003683547168183310f,\ +0.8286050933424484732370f,0.7704328385697075676219f,0.1502070282359266317762f,\ +2.3818436251417942628450f,7.4205579165122914631070f,0.9034699872486960936513f,\ +0.0421812525739015259374f,2.772183837530781680414f,1.05592364033954333458f,\ +0.4321743126982589000562f,1.0104075090452335761171f,1.172999728469012792331f,\ +2.4859521407117588509550f,1.0004516930864140178414f,0.546406215495572333829f,\ +-0.0897848836255507876114f,0.4902005853747226638006f,1.3459428245240352417511f,\ +-0.9702703286402243332276f,0.4885630407318873325018f,0.8780295479347596243613f,\ +1.70760011581548409865f,0.3365500801559331289781f,0.9791465640129676240022f,\ +1.0399586044108937166186f,1.694655018871175533590f,0.782984551558400743154f,\ +3.2677601373666536055396f,2.1277760759506403332f,1.14078060084558496889f,\ +0.5190124031043247265771f,1.1102812125309757806946f,1.1710705982540408065518f,\ +0.9356000257245263851402f,0.2627541871520008842644f,0.9248192933983879759907f,\ +1.521163371222483906564f,1.6845378275230893372338f,1.06533482774366716761f,\ +0.8498389444062255382306f,1.0685794539652364587567f,0.652956087446700861321f,\ +1.1336945232455741816580f,0.4760496137462009169639f,1.0655234579631518432308f,\ +0.3786859524519583519719f,1.1151440885209693565372f,1.0396183182135259048806f,\ +0.9918753196058325283246f,1.3573231183580980463432f,0.0667878216615050979144f,\ +0.9763703551872023878033f,1.1968339368077574036420f,0.3044649077728942554444f,\ +1.3772502379038416009394f,1.17234744424829684384f,1.4766671247289078205966f,\ +1.1826761905568310417891f,1.9143513147617730041361f,2.0066566439861803772260f,\ +0.8422630906406018969079f,0.0168918363185286551920f,1.0985590427740710151028f,\ +1.1765072536632881217145f,0.6974498887881349640239f,1.9699828668985011059789f,\ +-0.5023701162984575141479f,-0.5400394193341752080428f,0.2985422403364683119342f,\ +1.5853347023892305767134f,2.8298681106779470795232f,1.57430200098008077347f,\ +0.0085163822819922137264f,2.34150280392945697727f,0.9260267598505396158259f,\ +1.935359947414732717519f,-0.624580203843195791436f,0.2899045962478056792655f,\ +1.1098967555784207128511f,0.6015796718407534493522f,0.4088898624506622225816f,\ +2.4110975561220100438220f,1.194926943855234124925f,0.8031086031385790136028f,\ +0.7056759527365589201864f,0.4529743829467441917913f,1.4838629998186587677367f,\ +-2.0715572287647061600069f,4.2672653505633393322682f,1.3529709414016093393940f,\ +1.7293958649615748246475f,0.6702228972280770413761f,1.246418198725941284266f,\ +0.8524596514683829839854f,0.9764536278838282790105f,0.7407821510692440547530f,\ +0.8301521851442831279044f,0.6387195724636756111181f,0.6461301327556139284525f,\ +2.7018352901688040823558f,4.1613347047505291342873f,-2.8343681862783589586741f,\ +0.7623226303646806201186f,0.9067568500030595002315f,0.8723652455116047699235f,\ +0.6696132906174546706168f,0.7552700261493744404717f,1.1992371819877765126705f,\ +1.8643427000471699539474f,0.9539854852947572405597f,-1.8677739580920826867327f,\ +1.9475448138625472971341f,1.5369506397672023645384f,0.5466606741068265051808f,\ +0.9729193674298542982015f,2.3999437957484786032580f,1.4341047292357653741846f,\ +0.5111837868275163065945f,0.1111569790233604693164f,1.091716362873146328738f,\ +0.9138969247921984173644f,0.7040484777727061826980f,0.9721353920795816616618f,\ +2.0373197284299586762302f,0.8964067096914249965778f,2.3355486655682877739082f,\ +1.7093760866374785312161f,0.2716303051904848664400f,0.9460612941094431738165f,\ +1.2762143042912967860758f,-0.5352378220939374431353f,1.1838129188764214827501f,\ +0.3761598820395333775402f,2.3805545048605618596582f,0.7017854493503786761366f,\ +0.9822084988099225588698f,1.1648832392783827760496f,0.9992994024245958062380f,\ +0.1738523619678353504536f,1.6004378914991708171556f,1.3222645989799672872067f,\ +1.6332603440938282535200f,1.1558588483310223704592f,0.8687697917589873863875f,\ +-0.8204224950713523423218f,1.4547791700377004087130f,-1.0014359468702989097721f,\ +0.0144439712508898226995f,0.2674388703277625345400f,1.0538721408636444465401f,\ +0.1548583219344299433118f,0.6953871836582313781250f,3.5373520681952288491345f,\ +1.0989946596859092586840f,-0.8807918395297148483891f,1.18456726702104053750f,\ +1.6180875245455190736266f,0.6615360547308598571092f} + +#define CRESULTI {0.8476313539717991174527f,-0.0020945428347154504238f,-0.0107702820990110675198f,\ +-1.3194799051731675998411f,-1.5788424410279275900137f,0.0069265821924918190636f,\ +-0.3180628434269115456523f,-0.1158623505001605547005f,0.2488922702434745726219f,\ +0.3333162069042073238911f,-2.7579550935532486377610f,-0.0929722217314629395535f,\ +-2.558018975124945360022f,1.0673421965913736375597f,-0.0202992468302341001751f,\ +-0.5103135313335316336492f,-1.0383893485568700398858f,0.2955939972849115360276f,\ +-0.3716363644745803163083f,-0.669112301980219426056f,-0.3318327753869652063656f,\ +0.9035686841735829366584f,-0.0067883075736271340089f,-0.0021471806447879195068f,\ +-0.1287847092516060110157f,2.8852450693166233897102f,-0.0010974001216119489213f,\ +-0.1508680801994282949519f,0.315705921414520418455f,-0.2580859369524737267909f,\ +-0.4893903475844605388545f,-2.116294802120160856163f,0.5953479459460185863051f,\ +2.0617504351927595784844f,0.3616928144472888462246f,0.0048175006267416721831f,\ +-3.1913265982599425818478f,-0.0679428805767179483377f,-0.3743690366783002931861f,\ +1.6027053949682106281927f,0.0107745309683946743906f,0.8329399053511026274066f,\ +0.0907062192789129806414f,0.0408000708558418981320f,0.1702419063491371065133f,\ +2.5813113904964448686030f,4.3826942657913274814518f,-0.1250993995488117738191f,\ +-0.366232782627764485994f,0.1355060901825991537262f,0.4285644238647245418683f,\ +0.2943941929388677047896f,-0.0242296816969479640591f,-0.5347582943284873158163f,\ +5.440972259812645539512f,0.1130116459854922927875f,-0.0230886388762507679950f,\ +-0.0758567265188389433517f,-0.0153004723200108137121f,0.6705905748883707051533f,\ +0.3580727041769314333841f,0.5060754117432990639713f,-0.0529558939424066774104f,\ +0.8998620364333704824134f,2.4830051583371242074350f,-0.0075609544367582562363f,\ +-4.5567155472995342080367f,0.3858035723583744802667f,-0.1243338609096430735779f,\ +-1.9945093918095539997637f,-1.2920941940088974675405f,1.2080631306058675633608f,\ +0.8083456169264077173509f,-0.0085739065252298622688f,-0.1660020282935961710713f,\ +-0.0959540597572042242014f,0.0927222427996397119410f,0.2221508503381195154258f,\ +-0.1409070089536773040528f,0.1405249830722395676386f,-0.0419169397939630830607f,\ +1.0272672902510724401992f,0.1050876648914500499643f,-0.3835786757949954384195f,\ +0.5298437409836795897178f,2.9106995454114534815915f,-0.0190217208337024913656f,\ +-0.5609150372475696366692f,0.1029355491400509997613f,0.4090658874763115071538f,\ +-0.0046870241505978906330f,0.0668889266782490693464f,0.7415168418856862286859f,\ +-0.0168562013052173872985f,0.3406253082923152986083f,-0.4061399877851155082453f,\ +0.2969570085375197732169f,-0.3434409399238548266098f,-0.9854495385788534234095f,\ +-0.0867374346127948586682f,0.3597999966335438393195f,0.5808295174480837541608f,\ +-0.9935741356819206560047f,0.3096185219585154135835f,-4.5479921396771585406782f,\ +-0.4366900670417938612466f,-0.9018465944214471008422f,-0.5250881076401040514767f,\ +-0.8025691478992442728924f,0.0572684987995472974398f,0.4945930961405698988997f,\ +0.4034972398433521179051f,0.7137454043276676429741f,0.7512128888062908904644f,\ +0.1939996418115135512483f,-0.4464039676558783642513f,1.3907357608014461192170f,\ +1.17156541392215607367f,-1.9708685366549760775712f,0.3123022444724680712902f,\ +-0.7896872395843760328304f,-0.6179850212857144198253f,0.9256883067644073870284f,\ +-2.7417718288371224488742f,-0.1326893078962607386284f,-0.2491649089658723725815f,\ +0.6490031468453125729212f,-0.0039713278584005608923f,-2.4386883505629461943442f,\ +3.178543851545130305425f,-1.0690676099739919724385f,-0.0260882664072711288605f,\ +-0.9060493921002102934992f,0.6199896062130800800105f,-0.1133779208230118323852f,\ +-0.2723070216270195298414f,0.6794632710962359434248f,-0.1319558520667497847345f,\ +-0.0528338647750857190455f,-0.53278022650161005469f,-0.1536737960232173183517f,\ +-0.1415472283443244549961f,0.0042545728383564943367f,3.4486281529351474617329f,\ +-1.3962363760387317412892f,0.0515879186128369374154f,-0.7852445756480942451461f,\ +-1.0432119477148995567717f,-0.3036586016327645909385f,-0.8524640219222514581077f,\ +-3.278864600929186412515f,-0.7961629883628608128632f,-1.1545100621855832745410f,\ +0.3684195377039459207147f,-1.6970666375940057779559f,0.5849997270051815467795f,\ +0.0618729525386339657134f,-0.1749203390283090575608f,-0.0606310989665877000943f,\ +0.7892429044220883316285f,-0.5178739198482895655928f,-0.0418201497112469372519f,\ +0.2095761220035197158751f,-0.3550942958596610687927f,-0.0867144455279654918778f,\ +-0.4598945931287213850780f,0.0685694193597463919065f,-0.3559389766660929765862f,\ +2.0119894555407911163059f,-1.0947444956011096461879f,-1.6288470340375438283331f,\ +-0.2410820142960599099524f,1.4659778142858674865323f,0.6624490343288035321123f,\ +0.4136536130989748594189f,-0.9846866209581750517543f,0.9510859925791920188587f,\ +-0.3140825904492373088495f,0.4344001304574144906034f,0.0016042272632115935332f,\ +-1.7199780122539785054414f,-0.1872506113405222882839f,0.4446357342161921244461f,\ +-0.1745599221993578142875f,0.4442139130537332003534f,0.2767209124711134116126f,\ +-0.0013781156561338940309f,0.4254643497866397727769f,-0.0032333769526939463469f,\ +-0.0697738544158777868054f,0.1581414947349125965648f,-0.0415758240738434495243f,\ +-0.8801521218406083146846f,0.0803587769045229632914f,2.1574882446469239027920f,\ +-0.1027605757720615048401f,1.0043017952229080780313f,-1.8015810020856124484823f,\ +0.0897692625606805599814f,-0.2856956371820633111547f} + + + + +void scoshsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=scoshs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } +} + +void ccoshsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=ccoshs(in); + assert( fabs(creals(out) - resR[i]) < 3e-6); + assert( fabs(cimags(out) - resI[i]) < 3e-6); + } +} + +void scoshaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + scosha(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void ccoshaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + ccosha(in,200,out); + for (i=0;i<200;i++){ + assert( fabs(creals(out[i]) - resR[i]) < 3e-6); + assert( fabs(cimags(out[i]) - resI[i]) < 3e-6); + } +} + + +int testCosh(void) { + printf("\n>>>> Hyperbolic Cosine Tests\n"); + scoshsTest(); + ccoshsTest(); + scoshaTest(); + ccoshaTest(); + return 0; +} + +int main(void) { + assert(testCosh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/zcosha.c b/2.3-1/src/c/elementaryFunctions/cosh/zcosha.c new file mode 100644 index 00000000..a7f59136 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/zcosha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cosh.h" + +void zcosha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zcoshs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/cosh/zcoshs.c b/2.3-1/src/c/elementaryFunctions/cosh/zcoshs.c new file mode 100644 index 00000000..a4c072fd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/cosh/zcoshs.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/** cosh(z) = cos(i z) */ + +#include "cosh.h" +#include "cos.h" + +doubleComplex zcoshs(doubleComplex z) { + + return (zcoss(DoubleComplex(-zimags(z), zreals(z)))); +} diff --git a/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj b/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj new file mode 100644 index 00000000..e1029fb7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj @@ -0,0 +1,1562 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {72B46833-B150-432D-B231-3E0ECD91E190} + elementaryFunctions + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL + + + Disabled + includes;../type;../../../includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ELEMENTARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + auxiliaryFunctions.lib;$(SolutionDir)bin/lapack.lib;%(AdditionalDependencies) + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(TargetName).lib + MachineX86 + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL + + + Disabled + includes;../type;../../../includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;ELEMENTARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + auxiliaryFunctions.lib;$(SolutionDir)bin/lapack.lib;%(AdditionalDependencies) + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(TargetName).lib + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL + + + MaxSpeed + true + includes;../type;../../../includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ELEMENTARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + auxiliaryFunctions.lib;$(SolutionDir)bin/lapack.lib;%(AdditionalDependencies) + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(TargetName).lib + MachineX86 + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL + + + MaxSpeed + true + includes;../type;../../../includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;ELEMENTARYFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + auxiliaryFunctions.lib;$(SolutionDir)bin/lapack.lib;%(AdditionalDependencies) + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(TargetName).lib + + + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + Cdecl + Cdecl + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {9b622a66-546a-4b33-b947-0a189d259d37} + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + + + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj.filters b/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj.filters new file mode 100644 index 00000000..9e1965f4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/elementaryFunctions.vcxproj.filters @@ -0,0 +1,857 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {4bee642b-618e-469b-abbb-eff706945f07} + + + {ce931ede-d037-4ced-b097-92fd8c44e069} + + + {a8546fc3-383f-4383-ab59-ad6b9f0319ec} + + + {a788e4a0-a4b2-41bd-b10d-9cfeaca3390b} + + + {d934660b-0e2a-44d6-a91e-9b777ba1e76a} + + + {0401cf0d-8c1d-4104-92b7-c2e740e3f5d8} + + + {89eb0e32-9870-4ec7-ab20-71e89163d7be} + + + {41ffb68f-186c-40d4-8ecb-5a209b6d9b08} + + + {5b0722e6-d501-4970-8d47-3c1b7ae104eb} + + + {b7e65ad6-ee23-4d3d-b67a-8188c23f6fee} + + + {8d46a382-248e-4adc-8a5e-40b774a6c9d0} + + + {efdcd1db-4220-4673-bdaf-a61ae5e52ea4} + + + {ed1d39df-750e-4527-9044-38629af8526e} + + + {193ec9fc-48c2-4348-9482-73ef57611c73} + + + {03cefff6-72be-41a3-bdec-cc72b7f3a9b4} + + + {683da905-d30d-4c01-a338-b907b0be88e7} + + + {d7fd467d-508c-4ed4-8434-d61218dffe7a} + + + {266d09c3-4a01-4e53-a9cc-7885a75a7e10} + + + {133460ee-f6d2-42ba-a012-ee666d0cf20f} + + + {72dd8568-bd55-44b7-ac43-dadb2121a65b} + + + {7a1ea842-b75a-4359-9203-362b01b580de} + + + {ef365c2a-d020-4c72-b3d4-41d7faea88a0} + + + {dd4fce50-1f87-44a2-8d9d-94749d675564} + + + {5cec6d7f-51e5-4028-9d7f-84674c7d83ed} + + + {623a519d-2b90-41f1-819c-bedef22f3aeb} + + + {c2f3668b-9d41-4ccb-9871-f857d72c9e0a} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acos + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\acosh + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asin + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\asinh + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan + + + Source Files\atan2 + + + Source Files\atan2 + + + Source Files\atan2 + + + Source Files\atan2 + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\atanh + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\ceil + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cos + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\cosh + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\exp10 + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\fix + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\floor + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\int + + + Source Files\lnp1m1 + + + Source Files\lnp1m1 + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log1p + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\log10 + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\pow + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\round + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sin + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sinh + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\sqrt + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tan + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + Source Files\tanh + + + + + Source Files\acos + + + Source Files\acosh + + + Source Files\asin + + + Source Files\asinh + + + Source Files\atan + + + Source Files\atan2 + + + Source Files\atanh + + + Source Files\ceil + + + Source Files\cos + + + Source Files\cosh + + + Source Files\exp + + + Source Files\exp10 + + + Source Files\fix + + + Source Files\floor + + + Source Files\int + + + Source Files\lnp1m1 + + + Source Files\log + + + Source Files\log1p + + + Source Files\log10 + + + Source Files\pow + + + Source Files\round + + + Source Files\sin + + + Source Files\sinh + + + Source Files\sqrt + + + Source Files\tan + + + Source Files\tanh + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/elementaryFunctions/exp/Makefile.am b/2.3-1/src/c/elementaryFunctions/exp/Makefile.am new file mode 100644 index 00000000..f8c73aa5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libExp_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libExp.la + +libExp_la_SOURCES = $(HEAD) $(SRC) + +SRC = sexps.c \ + dexps.c \ + cexps.c \ + zexps.c \ + sexpa.c \ + dexpa.c \ + cexpa.c \ + zexpa.c + +HEAD = ../includes/exp.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatExp testDoubleExp + +TESTS = testFloatExp testDoubleExp + +testFloatExp_SOURCES = testExp.h testFloatExp.c +testFloatExp_CFLAGS = $(check_INCLUDES) +testFloatExp_LDADD = $(check_LDADD) + +testDoubleExp_SOURCES = testExp.h testDoubleExp.c +testDoubleExp_CFLAGS = $(check_INCLUDES) +testDoubleExp_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/exp/Makefile.in b/2.3-1/src/c/elementaryFunctions/exp/Makefile.in new file mode 100644 index 00000000..230e0b3a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/Makefile.in @@ -0,0 +1,804 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatExp$(EXEEXT) testDoubleExp$(EXEEXT) +TESTS = testFloatExp$(EXEEXT) testDoubleExp$(EXEEXT) +subdir = src/c/elementaryFunctions/exp +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libExp_la_LIBADD = +am__objects_1 = +am__objects_2 = libExp_la-sexps.lo libExp_la-dexps.lo \ + libExp_la-cexps.lo libExp_la-zexps.lo libExp_la-sexpa.lo \ + libExp_la-dexpa.lo libExp_la-cexpa.lo libExp_la-zexpa.lo +am_libExp_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libExp_la_OBJECTS = $(am_libExp_la_OBJECTS) +libExp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libExp_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleExp_OBJECTS = testDoubleExp-testDoubleExp.$(OBJEXT) +testDoubleExp_OBJECTS = $(am_testDoubleExp_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleExp_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleExp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleExp_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatExp_OBJECTS = testFloatExp-testFloatExp.$(OBJEXT) +testFloatExp_OBJECTS = $(am_testFloatExp_OBJECTS) +testFloatExp_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatExp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatExp_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libExp_la_SOURCES) $(testDoubleExp_SOURCES) \ + $(testFloatExp_SOURCES) +DIST_SOURCES = $(libExp_la_SOURCES) $(testDoubleExp_SOURCES) \ + $(testFloatExp_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libExp_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libExp.la +libExp_la_SOURCES = $(HEAD) $(SRC) +SRC = sexps.c \ + dexps.c \ + cexps.c \ + zexps.c \ + sexpa.c \ + dexpa.c \ + cexpa.c \ + zexpa.c + +HEAD = ../includes/exp.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +testFloatExp_SOURCES = testExp.h testFloatExp.c +testFloatExp_CFLAGS = $(check_INCLUDES) +testFloatExp_LDADD = $(check_LDADD) +testDoubleExp_SOURCES = testExp.h testDoubleExp.c +testDoubleExp_CFLAGS = $(check_INCLUDES) +testDoubleExp_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/exp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/exp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libExp.la: $(libExp_la_OBJECTS) $(libExp_la_DEPENDENCIES) + $(libExp_la_LINK) -rpath $(pkglibdir) $(libExp_la_OBJECTS) $(libExp_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleExp$(EXEEXT): $(testDoubleExp_OBJECTS) $(testDoubleExp_DEPENDENCIES) + @rm -f testDoubleExp$(EXEEXT) + $(testDoubleExp_LINK) $(testDoubleExp_OBJECTS) $(testDoubleExp_LDADD) $(LIBS) +testFloatExp$(EXEEXT): $(testFloatExp_OBJECTS) $(testFloatExp_DEPENDENCIES) + @rm -f testFloatExp$(EXEEXT) + $(testFloatExp_LINK) $(testFloatExp_OBJECTS) $(testFloatExp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-cexpa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-cexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-dexpa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-dexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-sexpa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-sexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-zexpa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp_la-zexps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleExp-testDoubleExp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatExp-testFloatExp.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libExp_la-sexps.lo: sexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-sexps.lo -MD -MP -MF $(DEPDIR)/libExp_la-sexps.Tpo -c -o libExp_la-sexps.lo `test -f 'sexps.c' || echo '$(srcdir)/'`sexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-sexps.Tpo $(DEPDIR)/libExp_la-sexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexps.c' object='libExp_la-sexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-sexps.lo `test -f 'sexps.c' || echo '$(srcdir)/'`sexps.c + +libExp_la-dexps.lo: dexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-dexps.lo -MD -MP -MF $(DEPDIR)/libExp_la-dexps.Tpo -c -o libExp_la-dexps.lo `test -f 'dexps.c' || echo '$(srcdir)/'`dexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-dexps.Tpo $(DEPDIR)/libExp_la-dexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexps.c' object='libExp_la-dexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-dexps.lo `test -f 'dexps.c' || echo '$(srcdir)/'`dexps.c + +libExp_la-cexps.lo: cexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-cexps.lo -MD -MP -MF $(DEPDIR)/libExp_la-cexps.Tpo -c -o libExp_la-cexps.lo `test -f 'cexps.c' || echo '$(srcdir)/'`cexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-cexps.Tpo $(DEPDIR)/libExp_la-cexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexps.c' object='libExp_la-cexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-cexps.lo `test -f 'cexps.c' || echo '$(srcdir)/'`cexps.c + +libExp_la-zexps.lo: zexps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-zexps.lo -MD -MP -MF $(DEPDIR)/libExp_la-zexps.Tpo -c -o libExp_la-zexps.lo `test -f 'zexps.c' || echo '$(srcdir)/'`zexps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-zexps.Tpo $(DEPDIR)/libExp_la-zexps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexps.c' object='libExp_la-zexps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-zexps.lo `test -f 'zexps.c' || echo '$(srcdir)/'`zexps.c + +libExp_la-sexpa.lo: sexpa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-sexpa.lo -MD -MP -MF $(DEPDIR)/libExp_la-sexpa.Tpo -c -o libExp_la-sexpa.lo `test -f 'sexpa.c' || echo '$(srcdir)/'`sexpa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-sexpa.Tpo $(DEPDIR)/libExp_la-sexpa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexpa.c' object='libExp_la-sexpa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-sexpa.lo `test -f 'sexpa.c' || echo '$(srcdir)/'`sexpa.c + +libExp_la-dexpa.lo: dexpa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-dexpa.lo -MD -MP -MF $(DEPDIR)/libExp_la-dexpa.Tpo -c -o libExp_la-dexpa.lo `test -f 'dexpa.c' || echo '$(srcdir)/'`dexpa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-dexpa.Tpo $(DEPDIR)/libExp_la-dexpa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexpa.c' object='libExp_la-dexpa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-dexpa.lo `test -f 'dexpa.c' || echo '$(srcdir)/'`dexpa.c + +libExp_la-cexpa.lo: cexpa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-cexpa.lo -MD -MP -MF $(DEPDIR)/libExp_la-cexpa.Tpo -c -o libExp_la-cexpa.lo `test -f 'cexpa.c' || echo '$(srcdir)/'`cexpa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-cexpa.Tpo $(DEPDIR)/libExp_la-cexpa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexpa.c' object='libExp_la-cexpa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-cexpa.lo `test -f 'cexpa.c' || echo '$(srcdir)/'`cexpa.c + +libExp_la-zexpa.lo: zexpa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -MT libExp_la-zexpa.lo -MD -MP -MF $(DEPDIR)/libExp_la-zexpa.Tpo -c -o libExp_la-zexpa.lo `test -f 'zexpa.c' || echo '$(srcdir)/'`zexpa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp_la-zexpa.Tpo $(DEPDIR)/libExp_la-zexpa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexpa.c' object='libExp_la-zexpa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp_la_CFLAGS) $(CFLAGS) -c -o libExp_la-zexpa.lo `test -f 'zexpa.c' || echo '$(srcdir)/'`zexpa.c + +testDoubleExp-testDoubleExp.o: testDoubleExp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -MT testDoubleExp-testDoubleExp.o -MD -MP -MF $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo -c -o testDoubleExp-testDoubleExp.o `test -f 'testDoubleExp.c' || echo '$(srcdir)/'`testDoubleExp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo $(DEPDIR)/testDoubleExp-testDoubleExp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp.c' object='testDoubleExp-testDoubleExp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -c -o testDoubleExp-testDoubleExp.o `test -f 'testDoubleExp.c' || echo '$(srcdir)/'`testDoubleExp.c + +testDoubleExp-testDoubleExp.obj: testDoubleExp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -MT testDoubleExp-testDoubleExp.obj -MD -MP -MF $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo -c -o testDoubleExp-testDoubleExp.obj `if test -f 'testDoubleExp.c'; then $(CYGPATH_W) 'testDoubleExp.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleExp-testDoubleExp.Tpo $(DEPDIR)/testDoubleExp-testDoubleExp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp.c' object='testDoubleExp-testDoubleExp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp_CFLAGS) $(CFLAGS) -c -o testDoubleExp-testDoubleExp.obj `if test -f 'testDoubleExp.c'; then $(CYGPATH_W) 'testDoubleExp.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp.c'; fi` + +testFloatExp-testFloatExp.o: testFloatExp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -MT testFloatExp-testFloatExp.o -MD -MP -MF $(DEPDIR)/testFloatExp-testFloatExp.Tpo -c -o testFloatExp-testFloatExp.o `test -f 'testFloatExp.c' || echo '$(srcdir)/'`testFloatExp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatExp-testFloatExp.Tpo $(DEPDIR)/testFloatExp-testFloatExp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp.c' object='testFloatExp-testFloatExp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -c -o testFloatExp-testFloatExp.o `test -f 'testFloatExp.c' || echo '$(srcdir)/'`testFloatExp.c + +testFloatExp-testFloatExp.obj: testFloatExp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -MT testFloatExp-testFloatExp.obj -MD -MP -MF $(DEPDIR)/testFloatExp-testFloatExp.Tpo -c -o testFloatExp-testFloatExp.obj `if test -f 'testFloatExp.c'; then $(CYGPATH_W) 'testFloatExp.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatExp-testFloatExp.Tpo $(DEPDIR)/testFloatExp-testFloatExp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp.c' object='testFloatExp-testFloatExp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp_CFLAGS) $(CFLAGS) -c -o testFloatExp-testFloatExp.obj `if test -f 'testFloatExp.c'; then $(CYGPATH_W) 'testFloatExp.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/exp/cexpa.c b/2.3-1/src/c/elementaryFunctions/exp/cexpa.c new file mode 100644 index 00000000..1c98e0e0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/cexpa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" + +void cexpa(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cexps(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/cexps.c b/2.3-1/src/c/elementaryFunctions/exp/cexps.c new file mode 100644 index 00000000..3be3b01f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/cexps.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" +#include "cos.h" +#include "sin.h" + +floatComplex cexps(floatComplex z) { + float real = creals(z); + float imag = cimags(z); + + return FloatComplex(sexps(real)*scoss(imag), + sexps(real)*ssins(imag)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/dexpa.c b/2.3-1/src/c/elementaryFunctions/exp/dexpa.c new file mode 100644 index 00000000..3907b174 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/dexpa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" + +void dexpa(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dexps(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/dexps.c b/2.3-1/src/c/elementaryFunctions/exp/dexps.c new file mode 100644 index 00000000..c244c684 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/dexps.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "exp.h" + +double dexps(double x) { + return (exp(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/sexpa.c b/2.3-1/src/c/elementaryFunctions/exp/sexpa.c new file mode 100644 index 00000000..733e4b37 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/sexpa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" + +void sexpa(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sexps(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/sexps.c b/2.3-1/src/c/elementaryFunctions/exp/sexps.c new file mode 100644 index 00000000..643e8873 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/sexps.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "exp.h" + +float sexps(float x) { + return (expf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/testDoubleExp.c b/2.3-1/src/c/elementaryFunctions/exp/testDoubleExp.c new file mode 100644 index 00000000..a56e13fd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/testDoubleExp.c @@ -0,0 +1,499 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testExp.h" + +#define SOURCE {0.2179693998688542744269,-0.0965447246339290049422,0.7336822469173450711466,\ +0.1536179219946321450330,2.4661907147341337598334,0.6332832861607330388054,\ +0.4890665386763063948727,-1.2667347141842044688786,0.1055086446255857485221,\ +-0.5936826571652784600985,-0.7816336465253074239357,-1.2815191120322371176599,\ +-0.9972908908531801230879,-0.5763370349806613557320,0.3762718127153176217448,\ +-0.8343599392689131644119,-1.0647534449045219506758,0.8534997909421322415113,\ +0.4306578956143343739349,0.5321132560429659985601,1.5974906319789743402993,\ +0.7312358120089610391545,0.4431279991113933891533,0.0087064913021668820237,\ +-0.8280501749431711244753,-1.0000194068543815095751,-0.8231062295149559338014,\ +-1.014391306624823796412,0.9121054970139131912177,-0.3855306050210344781526,\ +-0.2598191828862038144088,-0.0831341089570867414205,1.6949336044621277075350,\ +0.2429392861367114797577,1.8753502720069497033961,0.1984146246369250243813,\ +-0.7119008641532499348514,0.2504295152565002013922,1.8412596530958635909769,\ +-0.8228059182439799723596,0.6769888144769687920999,-0.4970822573553836942750,\ +0.0527831065241245664388,0.9397902577952749192391,-0.1148979773734264131502,\ +0.0647134776331551031525,0.3730550115687696344224,1.8451193005461747898011,\ +-0.5388550697275177325807,0.9483924031089353556823,0.0149553330989996690475,\ +0.3492458987360779198994,0.6782119558587149654727,-1.0638111247721440122405,\ +-0.0013200516387791912543,0.5311672327771198576229,-0.6446734157979014945283,\ +0.7518088875179287366990,-0.6321033286458267452801,-1.7783294717850963717609,\ +-0.9695340176537615706209,0.0585248375044749719054,-0.4174672618194515405499,\ +1.067002270541741681953,-0.1107931733964626630495,0.9733263412399585368107,\ +-1.5676178926909869471018,1.5082394419009976793689,1.4975531724590585014312,\ +0.0773364211376570409584,0.8296923447513622207339,-0.9966607229071756668404,\ +-0.5179876589725144198084,0.4414952679928694223577,-0.8736872755871413209761,\ +-0.0349791375435402618344,0.9274876201813765375093,0.4517463561226834900530,\ +-0.9961910310034214344199,-0.4760507657625145383484,0.2735565496341169633432,\ +-0.8683706445498747816814,-0.5819104976015757602070,1.0334934603683001430596,\ +1.3664069352627037368109,0.7304950466471921144418,-2.2795501799654798169570,\ +-0.3686784792993444970222,-1.2288389604009317679356,-1.372993238103811464157,\ +0.4327366693143714915237,-2.5372469745505505933636,-0.6466940204055214858059,\ +0.3727678446055545102844,-1.2012067538727111415398,-0.4120248811585083825726,\ +-0.1824358873620524901238,-0.7071004997444696460462,-0.0734584462405756949410,\ +0.4857107830752938615326,-1.5839443933479926407415,-2.6376393427060378371607,\ +-0.1810786671588598961691,0.8157163062709066325695,-0.3867087459826359374659,\ +0.4198660262170845203222,-0.6048459538042058047935,0.7659922557941690746119,\ +0.7134643264223192726803,0.1349874125377001632398,0.9411487010623025284417,\ +-2.1973029826905001726800,-1.9520696706230427075468,-1.2525761477383645647876,\ +0.3859074186443228193788,2.7807429866034785170825,-0.4523923998873963236989,\ +1.585571863180605944876,-0.8857651118640259557679,1.3802479208151854361830,\ +-0.3327040930736118173883,-0.2328335442849216174732,-0.7859150581069940244561,\ +-0.7298755566585160003967,-0.2812060079915064125800,-0.5573134267677620767856,\ +-0.5509002031358800621774,1.5296906305375963519566,-0.5702710404977533453774,\ +-1.3692402567978680938410,0.1826473558262797503016,0.1798346311903204763905,\ +0.4425890891364235302241,-0.9017692018513575602512,-1.4772671313778520385540,\ +0.4118240527515873439235,-0.3831680771908100302525,-1.7286187555088927680913,\ +0.9581454530897092203290,-0.4289057042708049327651,-1.2735233142733974887051,\ +0.7534058867095866363073,0.4695440194018555835065,-1.4064759963786124252749,\ +0.4697098567590811124539,-0.4910731440349740406504,0.9955428392828012951199,\ +1.1510113490256201895789,-0.1082632054930593029640,0.4856574660939540488691,\ +2.8432492089162182402617,-0.2526776656626389394589,-2.1526240294434693112180,\ +-0.1700067035996372932782,-1.2942848891673066624719,0.3501843381023743151381,\ +0.1214335524018897854992,-0.0093577680302103644072,-0.8404790744305570271422,\ +-0.2709432496692772418534,2.129923383430207373124,0.1924976275921922719281,\ +-0.9958949135265199315015,0.5029057807067898178133,2.1223686722196575260568,\ +0.0454634212534271303641,0.9495546668659169409210,0.9477155819428292327089,\ +2.5219360071943213164047,0.6965268573783115479969,1.0778432726775772909633,\ +-2.5098595900849196560500,0.4486528645511871360441,-0.4241938936353907840804,\ +-0.1335517966712884141423,-0.1078744374453666915459,0.2327494623534509532448,\ +0.9351842746020352370451,0.5235744811910800766697,-0.0660252647673259390748,\ +-0.5945113005344258017004,0.8805986363667026584068,1.4189560003612493588321,\ +1.409077916250558226707,0.696455894185944335284,0.90951587071067696577,\ +-0.3637587731642325517001,-0.6227550415243503501017,-0.8451138025419450139353,\ +-0.9376931811420606832641,-0.5548689487135263220807,-0.5854929781645817898905,\ +1.2660172290794624583299,0.5877121654077364087954,-1.2764933780334013491142,\ +0.7392453034050661120347,0.3032161878585472591929,-0.4000095029594706308451,\ +0.6502681159628262985706,1.845716594779029051665} + +#define RESULT {1.2435490142739233920821,0.9079692880976051316821,2.0827356520772775105854,\ +1.1660452814005672905751,11.777497445956059962668,1.8837854434705150197260,\ +1.6307932268341887027674,0.2817501160466636123125,1.1112757110437740948328,\ +0.5522896416607726566284,0.4576577492819154380221,0.2776152512958051654657,\ +0.3688774179340663095239,0.5619530154526948262372,1.456843068428832488337,\ +0.4341522763440999188589,0.3448128596551297553319,2.347849472141609439291,\ +1.5382692112870990364115,1.7025263838493789325668,4.9406190246302923441135,\ +2.0776466024256405873416,1.5575716893750450875444,1.0087445030337489626504,\ +0.43690033557496926742,0.3678723018579735937195,0.4390656952911728971856,\ +0.3626230889407328072949,2.489558777574301107194,0.6800896814511222521205,\ +0.7711910177313587855252,0.9202277281636028760659,5.4462843442294808227189,\ +1.2749912121263455855313,6.5231035807982653551562,1.219467910454189230052,\ +0.4907105362925133218432,1.2845770436515608903250,6.3044747124787887671005,\ +0.4391975714691279120139,1.9679429600133448996502,0.6083029443616727593991,\ +1.054200971008417697661,2.5594445384876851612432,0.8914570880611734082777,\ +1.0668533032547884431551,1.4521642234675371518904,6.3288547811978252966014,\ +0.5834158405874197983465,2.5815562199289581180039,1.0150677236735847763782,\ +1.4179978313495280595191,1.9703515051800046808950,0.3451379368940441505487,\ +0.9986808192461388289374,1.7009165158858785549256,0.5248339165868535216575,\ +2.120832897097891578397,0.5314727626805419991030,0.1689200974890469886258,\ +0.3792597252702665788782,1.0602713198612101486162,0.6587130565620143984873,\ +2.9066530672450663352890,0.8951238652136722651065,2.6467337728218058856555,\ +0.2085413590449486931355,4.5187682330848559786318,4.4707365550132545095607,\ +1.0804054865026515575011,2.2926132972391299880144,0.3691099459169989716045,\ +0.5957181306287809841038,1.5550306685748274126979,0.4174096039635283306168,\ +0.9656255613686579586386,2.5281495201925832105871,1.5710534099579722688844,\ +0.3692833545913285497875,0.6212319441335979464114,1.314631699051673319190,\ +0.4196347266560193634000,0.5588297032433613420466,2.810868359578304609414,\ +3.921236098173682904644,2.076108123684798468,0.1023302265504790059536,\ +0.6916477537748028092679,0.2926321380214171319345,0.2533474941164985949626,\ +1.5414702508327886576467,0.0790838201409621577298,0.5237745054427331847791,\ +1.4517472697479263388232,0.3008309638501235339092,0.6623077968618373834175,\ +0.8332380633061603480982,0.4930717885873925898643,0.9291747556935816554358,\ +1.6253298553258777037200,0.2051642515979318348585,0.0715299280520010488660,\ +0.8343697186187617464981,2.2607945137747993413768,0.6792889117422631350962,\ +1.521757666329790259496,0.5461585538073224777023,2.1511277850444776582606,\ +2.0410498879452951825897,1.1445223776283628414063,2.5629237613167004106174,\ +0.1111023997465931806294,0.141979915628105440861,0.2857676680597394103245,\ +1.470948482105968180278,16.13100161483945527152,0.6361045134063019190762,\ +4.882082463582880116348,0.4123985215384664559934,3.9758872105147431419425,\ +0.7169823228043985530,0.7922854429887553617817,0.4557025166581872288596,\ +0.4819689641868314944340,0.7548728096296193346149,0.5727457220779371693808,\ +0.5764306720519700721894,4.61674832039780813631,0.5653721791738470781041,\ +0.2543000889430159783267,1.2003910225327127925254,1.1970193970806983774224,\ +1.5567325245923557819339,0.4058509918676029837314,0.2282606431186239848152,\ +1.5095688084830436448414,0.681698311719268423836,0.1775294522772180583203,\ +2.606857448284196188126,0.6512213336764225424247,0.279843904757457517807,\ +2.1242225714533806701922,1.5992647932168715385615,0.2450051627087996841681,\ +1.5995300330564117263776,0.6119693104596294341846,2.706192970479794457361,\ +3.1613885606985867582353,0.8973913670061375302822,1.6252431999544321161721,\ +17.171468681707562353722,0.7767182044255251938125,0.1161789005908738792172,\ +0.8436591610241814809257,0.2740938017114021296727,1.4193291609241254214169,\ +1.129114336496770620855,0.9906858796267230538035,0.4315037514894317638436,\ +0.7626597763715156075293,8.4142221179071938763627,1.2122736276966128432520,\ +0.3693927220385589405005,1.6535190604459728547226,8.350894611450568660871,\ +1.0465127237901119539032,2.5845584134924157737601,2.579809559192972390207,\ +12.452681823131790395109,2.0067707887308077197019,2.9383355238494659467108,\ +0.0812796509085991214505,1.5662008789775083705820,0.6542970055839620879823,\ +0.8749821466412209813868,0.8977403119208263726492,1.2620652448583575822028,\ +2.547682887735915890914,1.6880507842731462542218,0.9361072134619135010070,\ +0.5518321800737933102710,2.4123433907357978434050,4.132803541818598880297,\ +4.0921803308889375117019,2.0066283869219931901284,2.4831200911745119341845,\ +0.6950588413666404230540,0.5364644180251368910106,0.4295084762729607374965,\ +0.3915299831612857883734,0.5741474990346947526731,0.5568312884718313870991,\ +3.546698706809571000065,1.7998659059051445030519,0.2790139835869558937453,\ +2.094354315836046254162,1.3542071959523713786666,0.6703136760416763539894,\ +1.916054484944200275720,6.3326360988263932227937} + +#define ZSOURCER {0.4962097263673624913949,0.8910778018246798826141,0.0947801220713381104011,\ +-0.4603936178711778848260,-1.0252845699539288037982,-0.98492140788616533431,\ +0.6666841978684399094846,-0.8284280082188715255143,-0.8087801325930177309687,\ +0.4980076621960153326896,0.7628920854029445086653,2.8126683658021311984498,\ +1.691339266824742670892,-0.658296432197564951316,-0.8165943259043131341457,\ +-0.153838313722479663737,1.0488069232465311308999,0.8083896014295570697783,\ +-2.5696290069516263265825,-0.1755006665720788838758,-0.4111892069294727503070,\ +0.4347439848326261624401,0.2238731702156319669506,0.1031628567688149950010,\ +-0.8488244709313933489270,-1.4082269940133023133910,-0.5694039300480933096793,\ +0.6847821865673663355167,-0.2355866905280663559097,0.126244929305970754463,\ +-0.7524531768104696372035,1.547744870456928323321,1.9472508676223883039569,\ +0.4418443111187473348878,-1.2649638329504953038196,-1.8396310805312170444381,\ +-1.8200055182230749917238,-0.2830037881038854896687,1.0167783703917296911357,\ +-1.3736934824588333814432,-1.6523791477656657455952,2.0750211192468381860010,\ +-2.2299199681252757088146,0.0617102387651526432255,-0.1883752530215108134115,\ +0.2017498149536396945258,-0.3785108864619266544338,1.4258759859183376406122,\ +-0.2179348061181922979745,0.1732283900046150681984,0.1667406411484310679860,\ +-0.6517590587731293405582,0.2359187276296556834421,0.2867271206877638478616,\ +0.0606400241806124770672,-0.0258227029380159664451,0.0208448589487377940188,\ +-0.1006137675958410082622,0.6887664099542869511339,0.1558887949250353788244,\ +0.8324928725743804269754,-0.3151516259195137337201,-0.3438938576674008262835,\ +0.0533533125037666533519,1.410105419112359426137,-0.72771444778030081046,\ +-0.0273112350183467821052,-0.1234715201495915903873,1.6876811670344133986532,\ +1.7843408966113634139816,0.4553194681918236175200,-2.482440448619641859551,\ +-0.5647234157267987386675,0.4002741476630126693514,2.0575413657607160011764,\ +0.9910894257133318063779,-0.8534666223545112062610,1.0313921190741603961527,\ +-0.5817813998765138938651,0.6420267245927361310365,-0.9597162563373448085358,\ +0.1578963713606084673380,-0.3170234887209238405781,1.1563426252866808585651,\ +-1.9325017123145520336891,0.6854693920869295853393,-0.5604369008834102494632,\ +-2.2658178544445064517276,-0.3315993869783789849137,-0.3992162906900829644208,\ +-1.538475385459755262474,0.7929279218821023711428,0.4799096678735629839530,\ +0.3842559929950347674676,-0.2870732232583454446306,-0.5902902430980193626553,\ +-0.7496420812260378152558,-0.5047035567506975572982,0.2586980379965187482050,\ +1.5714132313006403673938,-1.0578766388700049372318,0.7485548459128271714391,\ +-1.3801279040397811392893,0.4597603556312274686313,1.6137862227144141868962,\ +-1.2277987398411676078780,0.2068847811693011184975,-0.2479337336106740286024,\ +-0.3541997324021416981843,0.1707344260894599619061,-1.1381496515511626554940,\ +-0.8140025532586576684224,0.0735093571009233642810,0.3035280587071761959628,\ +-0.2782846453257922791913,1.6871692459980407452491,-1.323166422518824214549,\ +-0.0753800807237546693917,-0.4003058770927516718530,0.4033101968714281615469,\ +0.1113491527432870636938,-0.8349617120636146916368,-0.6907116891918870793532,\ +-0.0170584241359153961082,0.8194033291997417922659,0.1556399708519044799981,\ +0.1516310573630105518195,0.7495489249293494360415,0.1716685606331417590642,\ +0.4519531238973814590842,0.9288803038597209793537,-2.3544674327002401703623,\ +-0.4112942143200571387673,-1.3097240599804396143924,-0.6114852145918039383332,\ +-0.8710601639646612381895,0.3633484479767548624984,-0.3041452834723618048329,\ +-1.3937055405477738467823,-0.5975281694506322516247,-0.6997444046104884796122,\ +-0.3196851144737095085091,1.09857442199734944843,-1.77236020622582612916,\ +-0.0885003512087364219152,1.3820373060805490883496,-0.3478356988431264840145,\ +-1.5917082966936921817336,-1.2805101534361520432270,0.2630673092127150392017,\ +0.3354398592128065015316,0.3056832398609472534190,-0.3465598133034439864986,\ +-0.0149898968435104897046,-0.8499089854435717406034,1.1188306614388350279654,\ +-0.6366826455916885230124,0.7478712286232889194793,-1.1407898077101095157815,\ +1.7416298413146675816421,-0.6492757257758221545174,0.9050061520410521698210,\ +-0.7214302149042788325772,0.1880549880800692907901,-0.6074290437972867939820,\ +-0.3926402375420063872724,-2.1738375226761288416810,-0.3077758151743882342188,\ +-1.4339354091797107404460,0.5131602976051053977002,0.0609103217068958785463,\ +-0.0915059705228822850565,0.2851713506321221225370,0.3850345796175008161732,\ +0.5344891195679912776484,-0.3352957511414503266600,0.5011675332336322785665,\ +0.9817842562968046582483,0.3201410638941641906285,2.908782756663177426759,\ +-0.8167435983319983883177,-0.6395703111646185989869,0.4768832439562080693918,\ +-2.3940570181394389415175,1.181268742272832517060,0.7860988797801938821053,\ +0.2080213710796271764369,-0.0657191135894376471382,2.2596861347367309669210,\ +0.7576187360739459197845,0.0816850726713814895286,0.713209526903904489359,\ +1.0221713946590338384368,-1.3357158672812421418286,-1.3632163488573514342761,\ +-0.1933486222136764076662,0.1054205318382937656141,0.8628332102807707570946,\ +0.6890069943729065782279,-0.1425645528482178403529} + +#define ZSOURCEI {0.4187679309893236334617,0.9571040727588696617190,1.172760842677368797737,\ +0.8367787345559263290085,0.0537934646406551114639,-0.3937773223205939254754,\ +1.7876375988580777143255,-0.5864530819794440130721,-0.9799596671663597380331,\ +-1.435491321041636902933,-0.7958478780018579668010,0.5425829186077295585022,\ +-0.6690160051984340716658,0.4469912205186009623858,-0.2043520888417388603475,\ +-0.4718547031305261874046,1.2345904036110504353729,0.2305518055397126619965,\ +1.0780366202665678798667,0.4904320988250001067676,-0.2652022209879114633679,\ +-0.9976659763947106629445,-1.349099117857334384496,-0.4904839979026296425957,\ +0.5445911400019642911730,1.5676016792969027502380,0.9705535858979048580153,\ +1.562322752104617240576,0.9312705713450669664510,-1.491064034017491879425,\ +0.5387480326121706353248,0.2780267771815282396020,-0.6792511192992195523388,\ +-1.7001946270260519522566,1.1064967394734230854425,0.6449691334115315033415,\ +1.010191395265231717460,0.7617257042808376343856,0.7130320908537892687917,\ +1.3873980946032253847022,1.0464400502880701893105,0.7743318486747019502303,\ +-1.0385544825558827852774,0.2570923151837984921286,-0.8100639413180467096609,\ +0.9637587964856539901604,1.5615765140914361630564,0.5804915960065005764434,\ +-0.2022297555607953933876,0.6091855774356720321094,-0.5513582447276994535912,\ +-0.4240953703415643594177,-0.8690915476323599619946,-1.0352497689734347918744,\ +0.3275700398280019243202,-0.7970043301223290743707,0.2341992112983941609627,\ +-0.2288430429610794625273,1.213479264737873375424,0.9031823906644896871043,\ +1.4754958638303785622981,1.6520423035243945175665,0.8178319166692843422695,\ +-0.4286042039456253727181,0.4413804125451418203241,-0.8566414495458910538517,\ +-1.3669367412247732662678,2.0376720143917643746079,-1.8253356531263227324757,\ +1.5266365006585700392350,0.1161871811298216261576,-0.6659495480394291844206,\ +-0.5450277852280467349999,1.2558648076421243811041,-0.7854748651398538727975,\ +-2.1498185127975446562232,-1.4516576281976432127863,0.4432114256783392658434,\ +-0.0042605582120147401926,-0.0805101613497762047533,-1.1324416682104487819061,\ +0.1150256099470636506066,1.3050405907321147580546,-1.0622634828383090699333,\ +-1.35922814179336781670,-1.703726701643710983447,-0.282327674589286536921,\ +1.4699227361546476355869,1.2714945342939698580409,0.8438338325656443705824,\ +1.6086130230417976516577,-0.8654237444216958952126,-2.1306341506077157710308,\ +0.4262366479533865049056,1.2202306126621282889033,-0.4781944951046422920271,\ +2.2327961471769124379705,0.6988675202840052280706,-1.1016041402782228431079,\ +-0.0366155088206388534822,0.9663901570211483882389,-0.3288372819689815984567,\ +1.8550047995758884855633,-0.9247532047817873523954,-1.1547662665953339899971,\ +1.4270134659704167834349,-0.2267973730507581442417,1.4593991828148868972193,\ +-0.8205572609516469384516,-0.3297213070039397009303,-0.5787995844520394950194,\ +1.8452573890170231862840,-0.5998455574460443973095,0.5461062118050383773493,\ +0.3989213456307151295377,0.6223400150931739371885,-0.661605777551548035476,\ +-0.806522789665139905324,-0.2812497112451433634028,-0.4100128914055168882768,\ +-1.50945722493549672194,0.4603669785905236677692,-0.4126050173509914209546,\ +1.6611257451475334168123,-0.8697907951355576816610,0.6696537851786207307114,\ +-0.5134482200325719558620,0.1007092240430608326429,1.2778361566544564897896,\ +1.2322028231309287704676,0.2307590408528507608388,1.5263506644977615778203,\ +-0.8569947230359247214437,1.1048772379802629384216,-0.2109985124170330184068,\ +-0.0551453334787995949617,0.1230778288705814127457,-1.423405390861443020611,\ +-0.394586285353004440069,-0.2879823286948200999902,0.1062021177580684955233,\ +-0.6907035832345697068391,0.3653158847737960068791,0.9338855454474609407711,\ +-0.4120224826154939568035,-0.1450379965292624417916,-0.9040960399672915981384,\ +-0.3390386771829260181832,1.625054083669380089461,0.4716305826679590418316,\ +0.6165901874856758446697,0.4270688825812783973035,-0.8343519087812022450024,\ +-0.5142102680242138790234,-0.3269678763130224319333,-0.4453255190855087697344,\ +-1.2280852212014194968503,0.0988020658802584578195,0.7533305302295955074854,\ +0.1183515262592216288340,0.4361801271894044096378,-1.203233821600386388440,\ +0.6270203182178656353685,-0.2147899120281239748742,-1.6199408065241285293,\ +-0.3813310069938283253244,-0.952339709740829487572,-1.3753328967678597472002,\ +0.1397812751994848834425,1.043902134788026403456,1.1627380196617531638026,\ +-1.0121704799221244996943,1.0517816399459063436694,0.0479426304050067017548,\ +-1.9256009187313227748461,0.0702119825151238802219,-1.5960860779727858993482,\ +0.3892567541356096727512,-0.3405739777798729162051,-2.3927967690864724303879,\ +1.4571677327957668346414,1.7033833498531005812282,1.4103109856750082329313,\ +0.8887233594164675176685,1.085007779468186495109,-0.1517851031708108977547,\ +-1.4279908879739833249545,0.8317119599758505676945,-0.100625285489182120235,\ +-0.0641469431098572184791,0.9441650291895723468016,1.7557389523285045207501,\ +-1.4553402741895795635685,0.8280178925672729839391,0.3768033744738639723160,\ +0.769460862052703697955,1.7363387952951863102413,0.2883880023549790228010,\ +0.1937130526956079012990,0.7931867418127547253448} + +#define ZRESULTR {1.5005579968888511643854,1.4038788522636540534450,0.4261430281005708642361,\ +0.4227040163485943913280,0.3581755188101993225835,0.3448856718113299524298,\ +-0.4190544272790215352131,0.3637606739341552875011,0.2481133547640819725366,\ +0.221957537083997319405,1.5004406253943489701896,14.262372555443052490887,\ +4.2569132214783609313713,0.4668662514373775884735,0.4327387090783468837074,\ +0.7637186245018753316671,0.9416373255706453893055,2.1849079400266222528160,\ +0.0362192687509753849517,0.7401390786280732658753,0.6396875438787329448687,\ +0.8375646978007738052696,0.2750576263630330475785,0.9779650400990845815485,\ +0.3660147454727735727431,0.0007813344853740371429,0.3196234331185683896770,\ +0.0168057767355581332003,0.4715477957119850183076,0.0903652551480593341227,\ +0.4044631913155857239062,4.5203389894684722349893,5.4536105990647092411905,\ +-0.2007273149144214174910,0.1263903817022170861240,0.1269607449461356840636,\ +0.0861483947375209779818,0.5452795580354135029921,2.0908477302753070148356,\ +0.0461711120003356623176,0.0959224290498517928594,5.6938820505915233027849,\ +0.0545714270555244795879,1.0286954018234739649529,0.5710758281447196882397,\ +0.6979532622664902374865,0.0063143806135506170760,3.4798191533417077714319,\ +0.7877896535828416979541,0.9752288031986856564615,1.0063735441532775105600,\ +0.4749622284565679919410,0.8172752232835529540012,0.6797654131732457916115,\ +1.0060191413953609718135,0.6810372893714221609329,0.9931890911476703998062,\ +0.8807071418681532426476,0.6964662788868779541573,0.7235561661943166189559,\ +0.2187683453764143193254,-0.0592182210929489902251,0.4848204523909904195555,\ +0.9593919417277750882889,3.7038010572869821679376,0.3163625232453476932015,\ +0.1969961410854516870028,-0.3978181614570159285726,-1.361462433143773242961,\ +0.2629151417766518727959,1.5660468223975476664833,0.0656893454691978989635,\ +0.4861465273206775350445,0.4622214272783724542393,5.5338903531227128240744,\ +-1.474264258662732141048,0.0506254763419271280878,2.5339495141019958701634,\ +0.5588967788586440832432,1.8941728912398605455536,0.1625651067402884841773,\ +1.1633063892460699940,0.191283239298288054719,1.547496475194143350507,\ +0.0304040029736053936393,-0.2630510364909662279764,0.5483550218772245132826,\ +0.0104474069781232917903,0.2116381376777875800155,0.4458460510519014485808,\ +-0.0081176195921236100894,1.4326892345597483924280,-0.8581368290819433308769,\ +1.3371299915531948965253,0.2577287469128092811665,0.4920040313161565537214,\ +-0.2904655234170689381834,0.462163508824150970344,0.5856645720520745612703,\ +4.81021957957627943614,0.1973001680885165531887,2.0006745533290084537725,\ +-0.0705330419570823624609,0.9534341938168940933096,2.0294673010324730810794,\ +0.0419743009154483204259,1.198346516707147646486,0.0867559391436964755240,\ +0.4784523700257174994022,1.1222795076752876131110,0.2682227152927741387067,\ +-0.1200874658138830208820,0.8883849124062789259781,1.1576031776174615650632,\ +0.6976356512079191496412,4.3909706615004120422441,0.2101052025810229428870,\ +0.6417663596495127853458,0.6437857682896207522916,1.3727122635941697570416,\ +0.0685209480693795836004,0.3887184828749501441791,0.4591565751761637059758,\ +-0.0886808967743262233085,1.4635680657432861284661,0.9160726657458563293446,\ +1.0136746786541579457008,2.1053235388732902677589,0.3428728910762353088160,\ +0.5219502401364545240980,2.4645660104152655733856,0.0042184623117796499203,\ +0.4339378404381282194890,0.1212485246955130047120,0.5305120745426482598006,\ +0.4178714460322863755160,1.42725807301201368382,0.1083449257198766668697,\ +0.2290848259097614525448,0.5275132726780440428627,0.4939136954488312358791,\ +0.5598904753492991437369,2.8019267774958218630843,0.1010607343958155046604,\ +0.838703631682240602,3.9411880425167020725041,0.4367206268973685134860,\ +0.1919888550719570374792,-0.0150705892655913463452,1.1588916915452081024540,\ +1.1410183495054209146247,1.2356219575708369262657,0.4749404480211336654349,\ +0.8577273295080861670314,0.4048075578221899673004,2.7627080603314042583918,\ +0.1777810656017677348739,2.1021956426305754561668,0.2330964886175431460824,\ +5.66671671967639412060,0.4735105506685184928450,0.8882739731815125772130,\ +0.3935986079583607688548,1.1791667609118299253623,-0.0267606605538480354922,\ +0.6267669571981022702545,0.0659441611256419563114,0.1427681092204574897497,\ +0.2360440610261224370081,0.8400442654362825223302,0.4217500256271256020568,\ +0.4836741737176751265714,0.659708006511050548681,1.4679764549267637629981,\ +-0.5928767353529774686294,0.7133645918582519618312,-0.0417400106828591799246,\ +2.46953429512858368966,1.2982129272812710230056,-13.430164449559464756589,\ +0.0501008887550637785346,-0.0697374371031275891442,0.2574407425697148865673,\ +0.0575298048786480678563,1.5214153238495213837922,2.1695830700438989424583,\ +0.1752306830704533635590,0.6307656294349494041640,9.5316214402790411241995,\ +2.1288031244453153867369,0.6363319322612546180551,-0.3752333236632875990146,\ +0.3201657030914684676226,0.1778562682310512732542,0.2378885254191149545289,\ +0.5920073359495072740089,-0.1831081087669608753465,2.2719985676152019138385,\ +1.9544837479586136819165,0.6083604660209539494176} + +#define ZRESULTI {0.66789173388469347259,1.9929317082415038964172,1.0134693185160317252524,\ +0.4685368189063157107199,0.0192861086704356442245,-0.1432921900711904839021,\ +1.9021551721948490865088,-0.2416937871379007396477,-0.3698944066530311935992,\ +-1.630400797414071512037,-1.53213128993891678498,8.5994415909131678432686,\ +-3.3657446415150640284253,0.2237921440211748103088,-0.0896829281433757230513,\ +-0.3897266612271670926937,2.6944436446476398572258,0.5128535974480390446928,\ +0.0674551867661900700357,0.3951923071518532726287,-0.1737389326052603821804,\ +-1.2977574398167355251843,-1.220297105474789312041,-0.5222431149169146635813,\ +0.2216906290760837783260,0.2445752865761168237668,0.4669490113374816231406,\ +1.983268587510182312528,0.6339653057626817300729,-1.1309555970451541373478,\ +0.2417594109687444814405,1.2901913158229225686568,-4.40337349863430294050,\ +-1.5425684980543696855904,0.2523692809573465090089,0.0955121010048793767089,\ +0.1372242993017437351355,0.5200557398879992465623,1.8081956965026793060503,\ +0.2489243937541025242233,0.1658522561714183829462,5.5692357559437404290748,\ +-0.0926616074754614826858,0.2704548071084568183764,-0.5999663537818090697229,\ +1.0049457307841926922976,0.6848514061793418150614,2.2823134654584236180597,\ +-0.1615224571979621548401,0.6804242491001384340876,-0.6188951521875099004433,\ +-0.2144424405243884335093,-0.9669529580119747835809,-1.1455586484969144667190,\ +0.3418574459217512129250,-0.6970321107785095726683,0.2369522455719338394076,\ +-0.2051372202341115724700,1.8654869710971573315561,0.9177784888023613474317,\ +2.2886105642667078363672,0.7272712824943110554443,0.5173355346085974915127,\ +-0.4383775740596613790245,1.7499274197824987719940,-0.3649863488832993385635,\ +-0.9529087376623858185454,0.7892565481221736067852,-5.2327138940157267299469,\ +5.9498471753939741191175,0.1827777741034706804335,-0.0516109653428112533091,\ +-0.2947431961312417803001,1.4188420873857061632606,-5.534739336307598733811,\ +-2.255013513539458447354,-0.4229165121855131270756,1.2028903349471207206989,\ +-0.0023812266691438442427,-0.1528305178806574626815,-0.3467892290786088183019,\ +0.1344033089941876202289,0.7027456808048029301972,-2.7761066302583010667604,\ +-0.1415572225289876973076,-1.9671936933888867216069,-0.1590647203810587884121,\ +0.1032177704018006486608,0.6858644064375456483873,0.5012535303694961585919,\ +0.2145546901849673948615,-1.6825191334017586264338,-1.3692428047734856999540,\ +0.6071558835309880386433,0.7048129294793062937785,-0.2550146122571063656004,\ +0.3727193608915256306524,0.388381095349859650767,-1.1552707405821953656755,\ +-0.1762073913025017923850,0.2856835610783352019659,-0.6826826797070948416035,\ +0.2414553165222597663764,-1.2645359787455874300832,-4.5934329346040874142432,\ +0.2899138963758796094794,-0.2765396421605960108892,0.7755744714874250878012,\ +-0.5133371708548779555059,-0.3840592062347947810430,-0.1752712350242682792789,\ +0.4264971552447213154480,-0.6075754177972138014852,0.7035454748522144141631,\ +0.2940690048846716919684,3.1502912129208726632612,-0.1636049555981854697340,\ +-0.66946985566275640789,-0.1859947683471395718513,-0.5966446238894932418972,\ +-1.1156829506070020663344,0.1927677941084386115111,-0.2009874518146967659060,\ +0.9790782744873792742268,-1.7340674208694739633074,0.7252463079270474732851,\ +-0.5716056662861231929540,0.2127452321317529204681,1.1366978856910239237266,\ +1.4821597980401888250412,0.5790353877850622499324,0.0948502955617512716335,\ +-0.5009900731541635510169,0.2411262068342296116530,-0.1136285464587050847429,\ +-0.0230670473414846290139,0.1765562266540864622133,-0.7297546590556842627251,\ +-0.0953969444497970303631,-0.1562582727501122537017,0.0526527844386815990774,\ +-0.4627604755682861448207,1.0716924742142539539458,0.1366141387590569244992,\ +-0.3665452417574971422098,-0.5756642515297435425126,-0.5549906098825418965248,\ +-0.0677059511108183409434,0.2774865464288255867409,0.5910566892682205253351,\ +0.8087239218207783464365,0.5623045509398011398972,-0.5238753172271245484026,\ +-0.4845296390188432167356,-0.1372866414817625335676,-1.3186482320231969200819,\ +-0.4982790611331439079024,0.2083797712931309276119,0.2186064764396851156647,\ +0.6738135687471651369407,0.2207138713569412324933,-2.3068359206298949537484,\ +0.2851861631055106482968,-0.2572412622481385358064,-0.5440918958783450554151,\ +-0.2513065277256731899769,-0.0926726651078676189055,-0.7210825269104839119194,\ +0.0332111240217310629830,1.4439889712068714189286,0.9755400591442719981927,\ +-0.7738329957764321642699,1.1548413262354173536295,0.0704326239228644929158,\ +-1.6002810307194081929083,0.0501692094503282184914,-1.6501195063537017482247,\ +1.012969261434880197115,-0.4600643435261628222399,-12.481321255158581706723,\ +0.4390187012381037146014,0.5228891202405995253244,1.5903431490098800527022,\ +0.0708411654197008272549,2.8815196278940593543894,-0.3318628781486120393751,\ +-1.218706228014425851924,0.6920752550579561956923,-0.9623724741584287478702,\ +-0.1367438235977035676516,0.8789505770880949864221,2.005732337058288017317,\ +-2.760719914038102906773,0.1937015573007111746140,0.0941350707005644549152,\ +0.5734318083679456057311,1.095987006643926342520,0.6740067391703287169591,\ +0.3834169282796987543449,0.6179115751021659885822} + + + + +void dexpsTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dexps(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } + + assert(( (fabs(exp(3)-20.085536923187671476398))/(exp(3)) )<3e-16); + +} + +void zexpsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zexps(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dexpaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dexpa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } +} + +void zexpaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=DoubleComplex(inR[i],inI[i]); + } + zexpa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testExp(void) { + printf("\n>>>> Double Hyperbolic Cosine Tests\n"); + dexpsTest(); + zexpsTest(); + dexpaTest(); + zexpaTest(); + return 0; +} + +int main(void) { + assert( testExp() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/testExp.h b/2.3-1/src/c/elementaryFunctions/exp/testExp.h new file mode 100644 index 00000000..6f0a879f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/testExp.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTEXP_H_ +#define _TESTEXP_H_ + +#include +#include +#include +#include "exp.h" +#include "constant.h" + + +void sexpsTest(void); + +void dexpsTest(void); + +void cexpsTest(void); + +void zexpsTest(void); + +void sexpaTest(void); + +void dexpaTest(void); + +void cexpaTest(void); + +void zexpaTest(void); + +int testExp(void); + +#endif /* ! _TESTEXP_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/exp/testFloatExp.c b/2.3-1/src/c/elementaryFunctions/exp/testFloatExp.c new file mode 100644 index 00000000..f1099d4c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/testFloatExp.c @@ -0,0 +1,514 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testExp.h" + +#define SOURCE {0.2179693998688542744269f,-0.0965447246339290049422f,0.7336822469173450711466f,\ +0.1536179219946321450330f,2.4661907147341337598334f,0.6332832861607330388054f,\ +0.4890665386763063948727f,-1.2667347141842044688786f,0.1055086446255857485221f,\ +-0.5936826571652784600985f,-0.7816336465253074239357f,-1.2815191120322371176599f,\ +-0.9972908908531801230879f,-0.5763370349806613557320f,0.3762718127153176217448f,\ +-0.8343599392689131644119f,-1.0647534449045219506758f,0.8534997909421322415113f,\ +0.4306578956143343739349f,0.5321132560429659985601f,1.5974906319789743402993f,\ +0.7312358120089610391545f,0.4431279991113933891533f,0.0087064913021668820237f,\ +-0.8280501749431711244753f,-1.0000194068543815095751f,-0.8231062295149559338014f,\ +-1.014391306624823796412f,0.9121054970139131912177f,-0.3855306050210344781526f,\ +-0.2598191828862038144088f,-0.0831341089570867414205f,1.6949336044621277075350f,\ +0.2429392861367114797577f,1.8753502720069497033961f,0.1984146246369250243813f,\ +-0.7119008641532499348514f,0.2504295152565002013922f,1.8412596530958635909769f,\ +-0.8228059182439799723596f,0.6769888144769687920999f,-0.4970822573553836942750f,\ +0.0527831065241245664388f,0.9397902577952749192391f,-0.1148979773734264131502f,\ +0.0647134776331551031525f,0.3730550115687696344224f,1.8451193005461747898011f,\ +-0.5388550697275177325807f,0.9483924031089353556823f,0.0149553330989996690475f,\ +0.3492458987360779198994f,0.6782119558587149654727f,-1.0638111247721440122405f,\ +-0.0013200516387791912543f,0.5311672327771198576229f,-0.6446734157979014945283f,\ +0.7518088875179287366990f,-0.6321033286458267452801f,-1.7783294717850963717609f,\ +-0.9695340176537615706209f,0.0585248375044749719054f,-0.4174672618194515405499f,\ +1.067002270541741681953f,-0.1107931733964626630495f,0.9733263412399585368107f,\ +-1.5676178926909869471018f,1.5082394419009976793689f,1.4975531724590585014312f,\ +0.0773364211376570409584f,0.8296923447513622207339f,-0.9966607229071756668404f,\ +-0.5179876589725144198084f,0.4414952679928694223577f,-0.8736872755871413209761f,\ +-0.0349791375435402618344f,0.9274876201813765375093f,0.4517463561226834900530f,\ +-0.9961910310034214344199f,-0.4760507657625145383484f,0.2735565496341169633432f,\ +-0.8683706445498747816814f,-0.5819104976015757602070f,1.0334934603683001430596f,\ +1.3664069352627037368109f,0.7304950466471921144418f,-2.2795501799654798169570f,\ +-0.3686784792993444970222f,-1.2288389604009317679356f,-1.372993238103811464157f,\ +0.4327366693143714915237f,-2.5372469745505505933636f,-0.6466940204055214858059f,\ +0.3727678446055545102844f,-1.2012067538727111415398f,-0.4120248811585083825726f,\ +-0.1824358873620524901238f,-0.7071004997444696460462f,-0.0734584462405756949410f,\ +0.4857107830752938615326f,-1.5839443933479926407415f,-2.6376393427060378371607f,\ +-0.1810786671588598961691f,0.8157163062709066325695f,-0.3867087459826359374659f,\ +0.4198660262170845203222f,-0.6048459538042058047935f,0.7659922557941690746119f,\ +0.7134643264223192726803f,0.1349874125377001632398f,0.9411487010623025284417f,\ +-2.1973029826905001726800f,-1.9520696706230427075468f,-1.2525761477383645647876f,\ +0.3859074186443228193788f,2.7807429866034785170825f,-0.4523923998873963236989f,\ +1.585571863180605944876f,-0.8857651118640259557679f,1.3802479208151854361830f,\ +-0.3327040930736118173883f,-0.2328335442849216174732f,-0.7859150581069940244561f,\ +-0.7298755566585160003967f,-0.2812060079915064125800f,-0.5573134267677620767856f,\ +-0.5509002031358800621774f,1.5296906305375963519566f,-0.5702710404977533453774f,\ +-1.3692402567978680938410f,0.1826473558262797503016f,0.1798346311903204763905f,\ +0.4425890891364235302241f,-0.9017692018513575602512f,-1.4772671313778520385540f,\ +0.4118240527515873439235f,-0.3831680771908100302525f,-1.7286187555088927680913f,\ +0.9581454530897092203290f,-0.4289057042708049327651f,-1.2735233142733974887051f,\ +0.7534058867095866363073f,0.4695440194018555835065f,-1.4064759963786124252749f,\ +0.4697098567590811124539f,-0.4910731440349740406504f,0.9955428392828012951199f,\ +1.1510113490256201895789f,-0.1082632054930593029640f,0.4856574660939540488691f,\ +2.8432492089162182402617f,-0.2526776656626389394589f,-2.1526240294434693112180f,\ +-0.1700067035996372932782f,-1.2942848891673066624719f,0.3501843381023743151381f,\ +0.1214335524018897854992f,-0.0093577680302103644072f,-0.8404790744305570271422f,\ +-0.2709432496692772418534f,2.129923383430207373124f,0.1924976275921922719281f,\ +-0.9958949135265199315015f,0.5029057807067898178133f,2.1223686722196575260568f,\ +0.0454634212534271303641f,0.9495546668659169409210f,0.9477155819428292327089f,\ +2.5219360071943213164047f,0.6965268573783115479969f,1.0778432726775772909633f,\ +-2.5098595900849196560500f,0.4486528645511871360441f,-0.4241938936353907840804f,\ +-0.1335517966712884141423f,-0.1078744374453666915459f,0.2327494623534509532448f,\ +0.9351842746020352370451f,0.5235744811910800766697f,-0.0660252647673259390748f,\ +-0.5945113005344258017004f,0.8805986363667026584068f,1.4189560003612493588321f,\ +1.409077916250558226707f,0.696455894185944335284f,0.90951587071067696577f,\ +-0.3637587731642325517001f,-0.6227550415243503501017f,-0.8451138025419450139353f,\ +-0.9376931811420606832641f,-0.5548689487135263220807f,-0.5854929781645817898905f,\ +1.2660172290794624583299f,0.5877121654077364087954f,-1.2764933780334013491142f,\ +0.7392453034050661120347f,0.3032161878585472591929f,-0.4000095029594706308451f,\ +0.6502681159628262985706f,1.845716594779029051665f} + +#define RESULT {1.2435490142739233920821f,0.9079692880976051316821f,2.0827356520772775105854f,\ +1.1660452814005672905751f,11.777497445956059962668f,1.8837854434705150197260f,\ +1.6307932268341887027674f,0.2817501160466636123125f,1.1112757110437740948328f,\ +0.5522896416607726566284f,0.4576577492819154380221f,0.2776152512958051654657f,\ +0.3688774179340663095239f,0.5619530154526948262372f,1.456843068428832488337f,\ +0.4341522763440999188589f,0.3448128596551297553319f,2.347849472141609439291f,\ +1.5382692112870990364115f,1.7025263838493789325668f,4.9406190246302923441135f,\ +2.0776466024256405873416f,1.5575716893750450875444f,1.0087445030337489626504f,\ +0.43690033557496926742f,0.3678723018579735937195f,0.4390656952911728971856f,\ +0.3626230889407328072949f,2.489558777574301107194f,0.6800896814511222521205f,\ +0.7711910177313587855252f,0.9202277281636028760659f,5.4462843442294808227189f,\ +1.2749912121263455855313f,6.5231035807982653551562f,1.219467910454189230052f,\ +0.4907105362925133218432f,1.2845770436515608903250f,6.3044747124787887671005f,\ +0.4391975714691279120139f,1.9679429600133448996502f,0.6083029443616727593991f,\ +1.054200971008417697661f,2.5594445384876851612432f,0.8914570880611734082777f,\ +1.0668533032547884431551f,1.4521642234675371518904f,6.3288547811978252966014f,\ +0.5834158405874197983465f,2.5815562199289581180039f,1.0150677236735847763782f,\ +1.4179978313495280595191f,1.9703515051800046808950f,0.3451379368940441505487f,\ +0.9986808192461388289374f,1.7009165158858785549256f,0.5248339165868535216575f,\ +2.120832897097891578397f,0.5314727626805419991030f,0.1689200974890469886258f,\ +0.3792597252702665788782f,1.0602713198612101486162f,0.6587130565620143984873f,\ +2.9066530672450663352890f,0.8951238652136722651065f,2.6467337728218058856555f,\ +0.2085413590449486931355f,4.5187682330848559786318f,4.4707365550132545095607f,\ +1.0804054865026515575011f,2.2926132972391299880144f,0.3691099459169989716045f,\ +0.5957181306287809841038f,1.5550306685748274126979f,0.4174096039635283306168f,\ +0.9656255613686579586386f,2.5281495201925832105871f,1.5710534099579722688844f,\ +0.3692833545913285497875f,0.6212319441335979464114f,1.314631699051673319190f,\ +0.4196347266560193634000f,0.5588297032433613420466f,2.810868359578304609414f,\ +3.921236098173682904644f,2.076108123684798468f,0.1023302265504790059536f,\ +0.6916477537748028092679f,0.2926321380214171319345f,0.2533474941164985949626f,\ +1.5414702508327886576467f,0.0790838201409621577298f,0.5237745054427331847791f,\ +1.4517472697479263388232f,0.3008309638501235339092f,0.6623077968618373834175f,\ +0.8332380633061603480982f,0.4930717885873925898643f,0.9291747556935816554358f,\ +1.6253298553258777037200f,0.2051642515979318348585f,0.0715299280520010488660f,\ +0.8343697186187617464981f,2.2607945137747993413768f,0.6792889117422631350962f,\ +1.521757666329790259496f,0.5461585538073224777023f,2.1511277850444776582606f,\ +2.0410498879452951825897f,1.1445223776283628414063f,2.5629237613167004106174f,\ +0.1111023997465931806294f,0.141979915628105440861f,0.2857676680597394103245f,\ +1.470948482105968180278f,16.13100161483945527152f,0.6361045134063019190762f,\ +4.882082463582880116348f,0.4123985215384664559934f,3.9758872105147431419425f,\ +0.7169823228043985530f,0.7922854429887553617817f,0.4557025166581872288596f,\ +0.4819689641868314944340f,0.7548728096296193346149f,0.5727457220779371693808f,\ +0.5764306720519700721894f,4.61674832039780813631f,0.5653721791738470781041f,\ +0.2543000889430159783267f,1.2003910225327127925254f,1.1970193970806983774224f,\ +1.5567325245923557819339f,0.4058509918676029837314f,0.2282606431186239848152f,\ +1.5095688084830436448414f,0.681698311719268423836f,0.1775294522772180583203f,\ +2.606857448284196188126f,0.6512213336764225424247f,0.279843904757457517807f,\ +2.1242225714533806701922f,1.5992647932168715385615f,0.2450051627087996841681f,\ +1.5995300330564117263776f,0.6119693104596294341846f,2.706192970479794457361f,\ +3.1613885606985867582353f,0.8973913670061375302822f,1.6252431999544321161721f,\ +17.171468681707562353722f,0.7767182044255251938125f,0.1161789005908738792172f,\ +0.8436591610241814809257f,0.2740938017114021296727f,1.4193291609241254214169f,\ +1.129114336496770620855f,0.9906858796267230538035f,0.4315037514894317638436f,\ +0.7626597763715156075293f,8.4142221179071938763627f,1.2122736276966128432520f,\ +0.3693927220385589405005f,1.6535190604459728547226f,8.350894611450568660871f,\ +1.0465127237901119539032f,2.5845584134924157737601f,2.579809559192972390207f,\ +12.452681823131790395109f,2.0067707887308077197019f,2.9383355238494659467108f,\ +0.0812796509085991214505f,1.5662008789775083705820f,0.6542970055839620879823f,\ +0.8749821466412209813868f,0.8977403119208263726492f,1.2620652448583575822028f,\ +2.547682887735915890914f,1.6880507842731462542218f,0.9361072134619135010070f,\ +0.5518321800737933102710f,2.4123433907357978434050f,4.132803541818598880297f,\ +4.0921803308889375117019f,2.0066283869219931901284f,2.4831200911745119341845f,\ +0.6950588413666404230540f,0.5364644180251368910106f,0.4295084762729607374965f,\ +0.3915299831612857883734f,0.5741474990346947526731f,0.5568312884718313870991f,\ +3.546698706809571000065f,1.7998659059051445030519f,0.2790139835869558937453f,\ +2.094354315836046254162f,1.3542071959523713786666f,0.6703136760416763539894f,\ +1.916054484944200275720f,6.3326360988263932227937f} + +#define CSOURCER {0.4962097263673624913949f,0.8910778018246798826141f,0.0947801220713381104011f,\ +-0.4603936178711778848260f,-1.0252845699539288037982f,-0.98492140788616533431f,\ +0.6666841978684399094846f,-0.8284280082188715255143f,-0.8087801325930177309687f,\ +0.4980076621960153326896f,0.7628920854029445086653f,2.8126683658021311984498f,\ +1.691339266824742670892f,-0.658296432197564951316f,-0.8165943259043131341457f,\ +-0.153838313722479663737f,1.0488069232465311308999f,0.8083896014295570697783f,\ +-2.5696290069516263265825f,-0.1755006665720788838758f,-0.4111892069294727503070f,\ +0.4347439848326261624401f,0.2238731702156319669506f,0.1031628567688149950010f,\ +-0.8488244709313933489270f,-1.4082269940133023133910f,-0.5694039300480933096793f,\ +0.6847821865673663355167f,-0.2355866905280663559097f,0.126244929305970754463f,\ +-0.7524531768104696372035f,1.547744870456928323321f,1.9472508676223883039569f,\ +0.4418443111187473348878f,-1.2649638329504953038196f,-1.8396310805312170444381f,\ +-1.8200055182230749917238f,-0.2830037881038854896687f,1.0167783703917296911357f,\ +-1.3736934824588333814432f,-1.6523791477656657455952f,2.0750211192468381860010f,\ +-2.2299199681252757088146f,0.0617102387651526432255f,-0.1883752530215108134115f,\ +0.2017498149536396945258f,-0.3785108864619266544338f,1.4258759859183376406122f,\ +-0.2179348061181922979745f,0.1732283900046150681984f,0.1667406411484310679860f,\ +-0.6517590587731293405582f,0.2359187276296556834421f,0.2867271206877638478616f,\ +0.0606400241806124770672f,-0.0258227029380159664451f,0.0208448589487377940188f,\ +-0.1006137675958410082622f,0.6887664099542869511339f,0.1558887949250353788244f,\ +0.8324928725743804269754f,-0.3151516259195137337201f,-0.3438938576674008262835f,\ +0.0533533125037666533519f,1.410105419112359426137f,-0.72771444778030081046f,\ +-0.0273112350183467821052f,-0.1234715201495915903873f,1.6876811670344133986532f,\ +1.7843408966113634139816f,0.4553194681918236175200f,-2.482440448619641859551f,\ +-0.5647234157267987386675f,0.4002741476630126693514f,2.0575413657607160011764f,\ +0.9910894257133318063779f,-0.8534666223545112062610f,1.0313921190741603961527f,\ +-0.5817813998765138938651f,0.6420267245927361310365f,-0.9597162563373448085358f,\ +0.1578963713606084673380f,-0.3170234887209238405781f,1.1563426252866808585651f,\ +-1.9325017123145520336891f,0.6854693920869295853393f,-0.5604369008834102494632f,\ +-2.2658178544445064517276f,-0.3315993869783789849137f,-0.3992162906900829644208f,\ +-1.538475385459755262474f,0.7929279218821023711428f,0.4799096678735629839530f,\ +0.3842559929950347674676f,-0.2870732232583454446306f,-0.5902902430980193626553f,\ +-0.7496420812260378152558f,-0.5047035567506975572982f,0.2586980379965187482050f,\ +1.5714132313006403673938f,-1.0578766388700049372318f,0.7485548459128271714391f,\ +-1.3801279040397811392893f,0.4597603556312274686313f,1.6137862227144141868962f,\ +-1.2277987398411676078780f,0.2068847811693011184975f,-0.2479337336106740286024f,\ +-0.3541997324021416981843f,0.1707344260894599619061f,-1.1381496515511626554940f,\ +-0.8140025532586576684224f,0.0735093571009233642810f,0.3035280587071761959628f,\ +-0.2782846453257922791913f,1.6871692459980407452491f,-1.323166422518824214549f,\ +-0.0753800807237546693917f,-0.4003058770927516718530f,0.4033101968714281615469f,\ +0.1113491527432870636938f,-0.8349617120636146916368f,-0.6907116891918870793532f,\ +-0.0170584241359153961082f,0.8194033291997417922659f,0.1556399708519044799981f,\ +0.1516310573630105518195f,0.7495489249293494360415f,0.1716685606331417590642f,\ +0.4519531238973814590842f,0.9288803038597209793537f,-2.3544674327002401703623f,\ +-0.4112942143200571387673f,-1.3097240599804396143924f,-0.6114852145918039383332f,\ +-0.8710601639646612381895f,0.3633484479767548624984f,-0.3041452834723618048329f,\ +-1.3937055405477738467823f,-0.5975281694506322516247f,-0.6997444046104884796122f,\ +-0.3196851144737095085091f,1.09857442199734944843f,-1.77236020622582612916f,\ +-0.0885003512087364219152f,1.3820373060805490883496f,-0.3478356988431264840145f,\ +-1.5917082966936921817336f,-1.2805101534361520432270f,0.2630673092127150392017f,\ +0.3354398592128065015316f,0.3056832398609472534190f,-0.3465598133034439864986f,\ +-0.0149898968435104897046f,-0.8499089854435717406034f,1.1188306614388350279654f,\ +-0.6366826455916885230124f,0.7478712286232889194793f,-1.1407898077101095157815f,\ +1.7416298413146675816421f,-0.6492757257758221545174f,0.9050061520410521698210f,\ +-0.7214302149042788325772f,0.1880549880800692907901f,-0.6074290437972867939820f,\ +-0.3926402375420063872724f,-2.1738375226761288416810f,-0.3077758151743882342188f,\ +-1.4339354091797107404460f,0.5131602976051053977002f,0.0609103217068958785463f,\ +-0.0915059705228822850565f,0.2851713506321221225370f,0.3850345796175008161732f,\ +0.5344891195679912776484f,-0.3352957511414503266600f,0.5011675332336322785665f,\ +0.9817842562968046582483f,0.3201410638941641906285f,2.908782756663177426759f,\ +-0.8167435983319983883177f,-0.6395703111646185989869f,0.4768832439562080693918f,\ +-2.3940570181394389415175f,1.181268742272832517060f,0.7860988797801938821053f,\ +0.2080213710796271764369f,-0.0657191135894376471382f,2.2596861347367309669210f,\ +0.7576187360739459197845f,0.0816850726713814895286f,0.713209526903904489359f,\ +1.0221713946590338384368f,-1.3357158672812421418286f,-1.3632163488573514342761f,\ +-0.1933486222136764076662f,0.1054205318382937656141f,0.8628332102807707570946f,\ +0.6890069943729065782279f,-0.1425645528482178403529f} + +#define CSOURCEI {0.4187679309893236334617f,0.9571040727588696617190f,1.172760842677368797737f,\ +0.8367787345559263290085f,0.0537934646406551114639f,-0.3937773223205939254754f,\ +1.7876375988580777143255f,-0.5864530819794440130721f,-0.9799596671663597380331f,\ +-1.435491321041636902933f,-0.7958478780018579668010f,0.5425829186077295585022f,\ +-0.6690160051984340716658f,0.4469912205186009623858f,-0.2043520888417388603475f,\ +-0.4718547031305261874046f,1.2345904036110504353729f,0.2305518055397126619965f,\ +1.0780366202665678798667f,0.4904320988250001067676f,-0.2652022209879114633679f,\ +-0.9976659763947106629445f,-1.349099117857334384496f,-0.4904839979026296425957f,\ +0.5445911400019642911730f,1.5676016792969027502380f,0.9705535858979048580153f,\ +1.562322752104617240576f,0.9312705713450669664510f,-1.491064034017491879425f,\ +0.5387480326121706353248f,0.2780267771815282396020f,-0.6792511192992195523388f,\ +-1.7001946270260519522566f,1.1064967394734230854425f,0.6449691334115315033415f,\ +1.010191395265231717460f,0.7617257042808376343856f,0.7130320908537892687917f,\ +1.3873980946032253847022f,1.0464400502880701893105f,0.7743318486747019502303f,\ +-1.0385544825558827852774f,0.2570923151837984921286f,-0.8100639413180467096609f,\ +0.9637587964856539901604f,1.5615765140914361630564f,0.5804915960065005764434f,\ +-0.2022297555607953933876f,0.6091855774356720321094f,-0.5513582447276994535912f,\ +-0.4240953703415643594177f,-0.8690915476323599619946f,-1.0352497689734347918744f,\ +0.3275700398280019243202f,-0.7970043301223290743707f,0.2341992112983941609627f,\ +-0.2288430429610794625273f,1.213479264737873375424f,0.9031823906644896871043f,\ +1.4754958638303785622981f,1.6520423035243945175665f,0.8178319166692843422695f,\ +-0.4286042039456253727181f,0.4413804125451418203241f,-0.8566414495458910538517f,\ +-1.3669367412247732662678f,2.0376720143917643746079f,-1.8253356531263227324757f,\ +1.5266365006585700392350f,0.1161871811298216261576f,-0.6659495480394291844206f,\ +-0.5450277852280467349999f,1.2558648076421243811041f,-0.7854748651398538727975f,\ +-2.1498185127975446562232f,-1.4516576281976432127863f,0.4432114256783392658434f,\ +-0.0042605582120147401926f,-0.0805101613497762047533f,-1.1324416682104487819061f,\ +0.1150256099470636506066f,1.3050405907321147580546f,-1.0622634828383090699333f,\ +-1.35922814179336781670f,-1.703726701643710983447f,-0.282327674589286536921f,\ +1.4699227361546476355869f,1.2714945342939698580409f,0.8438338325656443705824f,\ +1.6086130230417976516577f,-0.8654237444216958952126f,-2.1306341506077157710308f,\ +0.4262366479533865049056f,1.2202306126621282889033f,-0.4781944951046422920271f,\ +2.2327961471769124379705f,0.6988675202840052280706f,-1.1016041402782228431079f,\ +-0.0366155088206388534822f,0.9663901570211483882389f,-0.3288372819689815984567f,\ +1.8550047995758884855633f,-0.9247532047817873523954f,-1.1547662665953339899971f,\ +1.4270134659704167834349f,-0.2267973730507581442417f,1.4593991828148868972193f,\ +-0.8205572609516469384516f,-0.3297213070039397009303f,-0.5787995844520394950194f,\ +1.8452573890170231862840f,-0.5998455574460443973095f,0.5461062118050383773493f,\ +0.3989213456307151295377f,0.6223400150931739371885f,-0.661605777551548035476f,\ +-0.806522789665139905324f,-0.2812497112451433634028f,-0.4100128914055168882768f,\ +-1.50945722493549672194f,0.4603669785905236677692f,-0.4126050173509914209546f,\ +1.6611257451475334168123f,-0.8697907951355576816610f,0.6696537851786207307114f,\ +-0.5134482200325719558620f,0.1007092240430608326429f,1.2778361566544564897896f,\ +1.2322028231309287704676f,0.2307590408528507608388f,1.5263506644977615778203f,\ +-0.8569947230359247214437f,1.1048772379802629384216f,-0.2109985124170330184068f,\ +-0.0551453334787995949617f,0.1230778288705814127457f,-1.423405390861443020611f,\ +-0.394586285353004440069f,-0.2879823286948200999902f,0.1062021177580684955233f,\ +-0.6907035832345697068391f,0.3653158847737960068791f,0.9338855454474609407711f,\ +-0.4120224826154939568035f,-0.1450379965292624417916f,-0.9040960399672915981384f,\ +-0.3390386771829260181832f,1.625054083669380089461f,0.4716305826679590418316f,\ +0.6165901874856758446697f,0.4270688825812783973035f,-0.8343519087812022450024f,\ +-0.5142102680242138790234f,-0.3269678763130224319333f,-0.4453255190855087697344f,\ +-1.2280852212014194968503f,0.0988020658802584578195f,0.7533305302295955074854f,\ +0.1183515262592216288340f,0.4361801271894044096378f,-1.203233821600386388440f,\ +0.6270203182178656353685f,-0.2147899120281239748742f,-1.6199408065241285293f,\ +-0.3813310069938283253244f,-0.952339709740829487572f,-1.3753328967678597472002f,\ +0.1397812751994848834425f,1.043902134788026403456f,1.1627380196617531638026f,\ +-1.0121704799221244996943f,1.0517816399459063436694f,0.0479426304050067017548f,\ +-1.9256009187313227748461f,0.0702119825151238802219f,-1.5960860779727858993482f,\ +0.3892567541356096727512f,-0.3405739777798729162051f,-2.3927967690864724303879f,\ +1.4571677327957668346414f,1.7033833498531005812282f,1.4103109856750082329313f,\ +0.8887233594164675176685f,1.085007779468186495109f,-0.1517851031708108977547f,\ +-1.4279908879739833249545f,0.8317119599758505676945f,-0.100625285489182120235f,\ +-0.0641469431098572184791f,0.9441650291895723468016f,1.7557389523285045207501f,\ +-1.4553402741895795635685f,0.8280178925672729839391f,0.3768033744738639723160f,\ +0.769460862052703697955f,1.7363387952951863102413f,0.2883880023549790228010f,\ +0.1937130526956079012990f,0.7931867418127547253448f} + +#define CRESULTR {1.5005579968888511643854f,1.4038788522636540534450f,0.4261430281005708642361f,\ +0.4227040163485943913280f,0.3581755188101993225835f,0.3448856718113299524298f,\ +-0.4190544272790215352131f,0.3637606739341552875011f,0.2481133547640819725366f,\ +0.221957537083997319405f,1.5004406253943489701896f,14.262372555443052490887f,\ +4.2569132214783609313713f,0.4668662514373775884735f,0.4327387090783468837074f,\ +0.7637186245018753316671f,0.9416373255706453893055f,2.1849079400266222528160f,\ +0.0362192687509753849517f,0.7401390786280732658753f,0.6396875438787329448687f,\ +0.8375646978007738052696f,0.2750576263630330475785f,0.9779650400990845815485f,\ +0.3660147454727735727431f,0.0007813344853740371429f,0.3196234331185683896770f,\ +0.0168057767355581332003f,0.4715477957119850183076f,0.0903652551480593341227f,\ +0.4044631913155857239062f,4.5203389894684722349893f,5.4536105990647092411905f,\ +-0.2007273149144214174910f,0.1263903817022170861240f,0.1269607449461356840636f,\ +0.0861483947375209779818f,0.5452795580354135029921f,2.0908477302753070148356f,\ +0.0461711120003356623176f,0.0959224290498517928594f,5.6938820505915233027849f,\ +0.0545714270555244795879f,1.0286954018234739649529f,0.5710758281447196882397f,\ +0.6979532622664902374865f,0.0063143806135506170760f,3.4798191533417077714319f,\ +0.7877896535828416979541f,0.9752288031986856564615f,1.0063735441532775105600f,\ +0.4749622284565679919410f,0.8172752232835529540012f,0.6797654131732457916115f,\ +1.0060191413953609718135f,0.6810372893714221609329f,0.9931890911476703998062f,\ +0.8807071418681532426476f,0.6964662788868779541573f,0.7235561661943166189559f,\ +0.2187683453764143193254f,-0.0592182210929489902251f,0.4848204523909904195555f,\ +0.9593919417277750882889f,3.7038010572869821679376f,0.3163625232453476932015f,\ +0.1969961410854516870028f,-0.3978181614570159285726f,-1.361462433143773242961f,\ +0.2629151417766518727959f,1.5660468223975476664833f,0.0656893454691978989635f,\ +0.4861465273206775350445f,0.4622214272783724542393f,5.5338903531227128240744f,\ +-1.474264258662732141048f,0.0506254763419271280878f,2.5339495141019958701634f,\ +0.5588967788586440832432f,1.8941728912398605455536f,0.1625651067402884841773f,\ +1.1633063892460699940f,0.191283239298288054719f,1.547496475194143350507f,\ +0.0304040029736053936393f,-0.2630510364909662279764f,0.5483550218772245132826f,\ +0.0104474069781232917903f,0.2116381376777875800155f,0.4458460510519014485808f,\ +-0.0081176195921236100894f,1.4326892345597483924280f,-0.8581368290819433308769f,\ +1.3371299915531948965253f,0.2577287469128092811665f,0.4920040313161565537214f,\ +-0.2904655234170689381834f,0.462163508824150970344f,0.5856645720520745612703f,\ +4.81021957957627943614f,0.1973001680885165531887f,2.0006745533290084537725f,\ +-0.0705330419570823624609f,0.9534341938168940933096f,2.0294673010324730810794f,\ +0.0419743009154483204259f,1.198346516707147646486f,0.0867559391436964755240f,\ +0.4784523700257174994022f,1.1222795076752876131110f,0.2682227152927741387067f,\ +-0.1200874658138830208820f,0.8883849124062789259781f,1.1576031776174615650632f,\ +0.6976356512079191496412f,4.3909706615004120422441f,0.2101052025810229428870f,\ +0.6417663596495127853458f,0.6437857682896207522916f,1.3727122635941697570416f,\ +0.0685209480693795836004f,0.3887184828749501441791f,0.4591565751761637059758f,\ +-0.0886808967743262233085f,1.4635680657432861284661f,0.9160726657458563293446f,\ +1.0136746786541579457008f,2.1053235388732902677589f,0.3428728910762353088160f,\ +0.5219502401364545240980f,2.4645660104152655733856f,0.0042184623117796499203f,\ +0.4339378404381282194890f,0.1212485246955130047120f,0.5305120745426482598006f,\ +0.4178714460322863755160f,1.42725807301201368382f,0.1083449257198766668697f,\ +0.2290848259097614525448f,0.5275132726780440428627f,0.4939136954488312358791f,\ +0.5598904753492991437369f,2.8019267774958218630843f,0.1010607343958155046604f,\ +0.838703631682240602f,3.9411880425167020725041f,0.4367206268973685134860f,\ +0.1919888550719570374792f,-0.0150705892655913463452f,1.1588916915452081024540f,\ +1.1410183495054209146247f,1.2356219575708369262657f,0.4749404480211336654349f,\ +0.8577273295080861670314f,0.4048075578221899673004f,2.7627080603314042583918f,\ +0.1777810656017677348739f,2.1021956426305754561668f,0.2330964886175431460824f,\ +5.66671671967639412060f,0.4735105506685184928450f,0.8882739731815125772130f,\ +0.3935986079583607688548f,1.1791667609118299253623f,-0.0267606605538480354922f,\ +0.6267669571981022702545f,0.0659441611256419563114f,0.1427681092204574897497f,\ +0.2360440610261224370081f,0.8400442654362825223302f,0.4217500256271256020568f,\ +0.4836741737176751265714f,0.659708006511050548681f,1.4679764549267637629981f,\ +-0.5928767353529774686294f,0.7133645918582519618312f,-0.0417400106828591799246f,\ +2.46953429512858368966f,1.2982129272812710230056f,-13.430164449559464756589f,\ +0.0501008887550637785346f,-0.0697374371031275891442f,0.2574407425697148865673f,\ +0.0575298048786480678563f,1.5214153238495213837922f,2.1695830700438989424583f,\ +0.1752306830704533635590f,0.6307656294349494041640f,9.5316214402790411241995f,\ +2.1288031244453153867369f,0.6363319322612546180551f,-0.3752333236632875990146f,\ +0.3201657030914684676226f,0.1778562682310512732542f,0.2378885254191149545289f,\ +0.5920073359495072740089f,-0.1831081087669608753465f,2.2719985676152019138385f,\ +1.9544837479586136819165f,0.6083604660209539494176f} + +#define CRESULTI {0.66789173388469347259f,1.9929317082415038964172f,1.0134693185160317252524f,\ +0.4685368189063157107199f,0.0192861086704356442245f,-0.1432921900711904839021f,\ +1.9021551721948490865088f,-0.2416937871379007396477f,-0.3698944066530311935992f,\ +-1.630400797414071512037f,-1.53213128993891678498f,8.5994415909131678432686f,\ +-3.3657446415150640284253f,0.2237921440211748103088f,-0.0896829281433757230513f,\ +-0.3897266612271670926937f,2.6944436446476398572258f,0.5128535974480390446928f,\ +0.0674551867661900700357f,0.3951923071518532726287f,-0.1737389326052603821804f,\ +-1.2977574398167355251843f,-1.220297105474789312041f,-0.5222431149169146635813f,\ +0.2216906290760837783260f,0.2445752865761168237668f,0.4669490113374816231406f,\ +1.983268587510182312528f,0.6339653057626817300729f,-1.1309555970451541373478f,\ +0.2417594109687444814405f,1.2901913158229225686568f,-4.40337349863430294050f,\ +-1.5425684980543696855904f,0.2523692809573465090089f,0.0955121010048793767089f,\ +0.1372242993017437351355f,0.5200557398879992465623f,1.8081956965026793060503f,\ +0.2489243937541025242233f,0.1658522561714183829462f,5.5692357559437404290748f,\ +-0.0926616074754614826858f,0.2704548071084568183764f,-0.5999663537818090697229f,\ +1.0049457307841926922976f,0.6848514061793418150614f,2.2823134654584236180597f,\ +-0.1615224571979621548401f,0.6804242491001384340876f,-0.6188951521875099004433f,\ +-0.2144424405243884335093f,-0.9669529580119747835809f,-1.1455586484969144667190f,\ +0.3418574459217512129250f,-0.6970321107785095726683f,0.2369522455719338394076f,\ +-0.2051372202341115724700f,1.8654869710971573315561f,0.9177784888023613474317f,\ +2.2886105642667078363672f,0.7272712824943110554443f,0.5173355346085974915127f,\ +-0.4383775740596613790245f,1.7499274197824987719940f,-0.3649863488832993385635f,\ +-0.9529087376623858185454f,0.7892565481221736067852f,-5.2327138940157267299469f,\ +5.9498471753939741191175f,0.1827777741034706804335f,-0.0516109653428112533091f,\ +-0.2947431961312417803001f,1.4188420873857061632606f,-5.534739336307598733811f,\ +-2.255013513539458447354f,-0.4229165121855131270756f,1.2028903349471207206989f,\ +-0.0023812266691438442427f,-0.1528305178806574626815f,-0.3467892290786088183019f,\ +0.1344033089941876202289f,0.7027456808048029301972f,-2.7761066302583010667604f,\ +-0.1415572225289876973076f,-1.9671936933888867216069f,-0.1590647203810587884121f,\ +0.1032177704018006486608f,0.6858644064375456483873f,0.5012535303694961585919f,\ +0.2145546901849673948615f,-1.6825191334017586264338f,-1.3692428047734856999540f,\ +0.6071558835309880386433f,0.7048129294793062937785f,-0.2550146122571063656004f,\ +0.3727193608915256306524f,0.388381095349859650767f,-1.1552707405821953656755f,\ +-0.1762073913025017923850f,0.2856835610783352019659f,-0.6826826797070948416035f,\ +0.2414553165222597663764f,-1.2645359787455874300832f,-4.5934329346040874142432f,\ +0.2899138963758796094794f,-0.2765396421605960108892f,0.7755744714874250878012f,\ +-0.5133371708548779555059f,-0.3840592062347947810430f,-0.1752712350242682792789f,\ +0.4264971552447213154480f,-0.6075754177972138014852f,0.7035454748522144141631f,\ +0.2940690048846716919684f,3.1502912129208726632612f,-0.1636049555981854697340f,\ +-0.66946985566275640789f,-0.1859947683471395718513f,-0.5966446238894932418972f,\ +-1.1156829506070020663344f,0.1927677941084386115111f,-0.2009874518146967659060f,\ +0.9790782744873792742268f,-1.7340674208694739633074f,0.7252463079270474732851f,\ +-0.5716056662861231929540f,0.2127452321317529204681f,1.1366978856910239237266f,\ +1.4821597980401888250412f,0.5790353877850622499324f,0.0948502955617512716335f,\ +-0.5009900731541635510169f,0.2411262068342296116530f,-0.1136285464587050847429f,\ +-0.0230670473414846290139f,0.1765562266540864622133f,-0.7297546590556842627251f,\ +-0.0953969444497970303631f,-0.1562582727501122537017f,0.0526527844386815990774f,\ +-0.4627604755682861448207f,1.0716924742142539539458f,0.1366141387590569244992f,\ +-0.3665452417574971422098f,-0.5756642515297435425126f,-0.5549906098825418965248f,\ +-0.0677059511108183409434f,0.2774865464288255867409f,0.5910566892682205253351f,\ +0.8087239218207783464365f,0.5623045509398011398972f,-0.5238753172271245484026f,\ +-0.4845296390188432167356f,-0.1372866414817625335676f,-1.3186482320231969200819f,\ +-0.4982790611331439079024f,0.2083797712931309276119f,0.2186064764396851156647f,\ +0.6738135687471651369407f,0.2207138713569412324933f,-2.3068359206298949537484f,\ +0.2851861631055106482968f,-0.2572412622481385358064f,-0.5440918958783450554151f,\ +-0.2513065277256731899769f,-0.0926726651078676189055f,-0.7210825269104839119194f,\ +0.0332111240217310629830f,1.4439889712068714189286f,0.9755400591442719981927f,\ +-0.7738329957764321642699f,1.1548413262354173536295f,0.0704326239228644929158f,\ +-1.6002810307194081929083f,0.0501692094503282184914f,-1.6501195063537017482247f,\ +1.012969261434880197115f,-0.4600643435261628222399f,-12.481321255158581706723f,\ +0.4390187012381037146014f,0.5228891202405995253244f,1.5903431490098800527022f,\ +0.0708411654197008272549f,2.8815196278940593543894f,-0.3318628781486120393751f,\ +-1.218706228014425851924f,0.6920752550579561956923f,-0.9623724741584287478702f,\ +-0.1367438235977035676516f,0.8789505770880949864221f,2.005732337058288017317f,\ +-2.760719914038102906773f,0.1937015573007111746140f,0.0941350707005644549152f,\ +0.5734318083679456057311f,1.095987006643926342520f,0.6740067391703287169591f,\ +0.3834169282796987543449f,0.6179115751021659885822f} + + + + +void sexpsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=sexps(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } + + assert(( (fabs(sexps(0)-1))/(fabs(sexps(0))) )<1e-6); + assert(( (fabs(sexps(1)-2.7182818284590450907956))/(fabs(sexps(1))) )<1e-6); + assert(( (fabs(sexps(2)-7.3890560989306504069418))/(fabs(sexps(2))) )<1e-6); + assert(( (fabs(sexps(3)-20.085536923187671476398))/(fabs(sexps(3))) )<1e-6); + assert(( (fabs(sexps(4)-54.598150033144236203952))/(fabs(sexps(4))) )<1e-6); + assert(( (fabs(sexps(5)-148.41315910257662835647))/(fabs(sexps(5))) )<1e-6); + assert(( (fabs(sexps(6)-403.42879349273533762243))/(fabs(sexps(6))) )<1e-6); + assert(( (fabs(sexps(7)-1096.6331584284580458188))/(fabs(sexps(7))) )<1e-6); +} + +void cexpsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=cexps(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<8e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void sexpaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + float mon_test[6]={1.0f,4.0f,2.0f,5.0f,3.0f,6.0f}; + float result_mon_test[6]={2.7182818284590450907956f,54.598150033144236203952f,7.3890560989306504069418f, + 148.41315910257662835647f,20.085536923187671476398f,403.42879349273533762243f}; + float out_mon_test[6]; + j=1; + sexpa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } + sexpa(mon_test,6,out_mon_test); + for (i=0;i<6;i++){ + assert(( (fabs(out_mon_test[i]-result_mon_test[i]))/(fabs(out_mon_test[i])) )<1e-6); + } +} + +void cexpaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in[200],out[200]; + int i; + + for (i=0;i<200;i++){ + in[i]=FloatComplex(inR[i],inI[i]); + } + cexpa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<8e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + + +int testExp(void) { + printf("\n>>>> Float Exp Tests\n"); + sexpsTest(); + cexpsTest(); + sexpaTest(); + cexpaTest(); + return 0; +} + +int main(void) { + assert(testExp() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/zexpa.c b/2.3-1/src/c/elementaryFunctions/exp/zexpa.c new file mode 100644 index 00000000..c4c8df38 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/zexpa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" + +void zexpa(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zexps(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp/zexps.c b/2.3-1/src/c/elementaryFunctions/exp/zexps.c new file mode 100644 index 00000000..4de8877d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp/zexps.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp.h" +#include "cos.h" +#include "sin.h" + +doubleComplex zexps(doubleComplex z) { + double real = zreals(z); + double imag = zimags(z); + + return DoubleComplex(dexps(real)*dcoss(imag), + dexps(real)*dsins(imag)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/Makefile.am b/2.3-1/src/c/elementaryFunctions/exp10/Makefile.am new file mode 100644 index 00000000..bc258bbd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/Makefile.am @@ -0,0 +1,71 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libExp10_la_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libExp10.la + +libExp10_la_SOURCES = $(HEAD) $(SRC) + +SRC = sexp10s.c \ + dexp10s.c \ + cexp10s.c \ + zexp10s.c \ + sexp10a.c \ + dexp10a.c \ + cexp10a.c \ + zexp10a.c + +HEAD = ../includes/exp10.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp10/libExp10.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatExp10 testDoubleExp10 + +TESTS = testFloatExp10 testDoubleExp10 + +testFloatExp10_SOURCES = testExp10.h testFloatExp10.c +testFloatExp10_CFLAGS = $(check_INCLUDES) +testFloatExp10_LDADD = $(check_LDADD) + +testDoubleExp10_SOURCES = testExp10.h testDoubleExp10.c +testDoubleExp10_CFLAGS = $(check_INCLUDES) +testDoubleExp10_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/exp10/Makefile.in b/2.3-1/src/c/elementaryFunctions/exp10/Makefile.in new file mode 100644 index 00000000..ca4c18f4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/Makefile.in @@ -0,0 +1,817 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatExp10$(EXEEXT) testDoubleExp10$(EXEEXT) +TESTS = testFloatExp10$(EXEEXT) testDoubleExp10$(EXEEXT) +subdir = src/c/elementaryFunctions/exp10 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libExp10_la_LIBADD = +am__objects_1 = +am__objects_2 = libExp10_la-sexp10s.lo libExp10_la-dexp10s.lo \ + libExp10_la-cexp10s.lo libExp10_la-zexp10s.lo \ + libExp10_la-sexp10a.lo libExp10_la-dexp10a.lo \ + libExp10_la-cexp10a.lo libExp10_la-zexp10a.lo +am_libExp10_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libExp10_la_OBJECTS = $(am_libExp10_la_OBJECTS) +libExp10_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libExp10_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleExp10_OBJECTS = \ + testDoubleExp10-testDoubleExp10.$(OBJEXT) +testDoubleExp10_OBJECTS = $(am_testDoubleExp10_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp10/libExp10.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleExp10_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleExp10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleExp10_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatExp10_OBJECTS = testFloatExp10-testFloatExp10.$(OBJEXT) +testFloatExp10_OBJECTS = $(am_testFloatExp10_OBJECTS) +testFloatExp10_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatExp10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatExp10_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libExp10_la_SOURCES) $(testDoubleExp10_SOURCES) \ + $(testFloatExp10_SOURCES) +DIST_SOURCES = $(libExp10_la_SOURCES) $(testDoubleExp10_SOURCES) \ + $(testFloatExp10_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libExp10_la_CFLAGS = -I ../../type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libExp10.la +libExp10_la_SOURCES = $(HEAD) $(SRC) +SRC = sexp10s.c \ + dexp10s.c \ + cexp10s.c \ + zexp10s.c \ + sexp10a.c \ + dexp10a.c \ + cexp10a.c \ + zexp10a.c + +HEAD = ../includes/exp10.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp10/libExp10.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +testFloatExp10_SOURCES = testExp10.h testFloatExp10.c +testFloatExp10_CFLAGS = $(check_INCLUDES) +testFloatExp10_LDADD = $(check_LDADD) +testDoubleExp10_SOURCES = testExp10.h testDoubleExp10.c +testDoubleExp10_CFLAGS = $(check_INCLUDES) +testDoubleExp10_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/exp10/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/exp10/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libExp10.la: $(libExp10_la_OBJECTS) $(libExp10_la_DEPENDENCIES) + $(libExp10_la_LINK) -rpath $(pkglibdir) $(libExp10_la_OBJECTS) $(libExp10_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleExp10$(EXEEXT): $(testDoubleExp10_OBJECTS) $(testDoubleExp10_DEPENDENCIES) + @rm -f testDoubleExp10$(EXEEXT) + $(testDoubleExp10_LINK) $(testDoubleExp10_OBJECTS) $(testDoubleExp10_LDADD) $(LIBS) +testFloatExp10$(EXEEXT): $(testFloatExp10_OBJECTS) $(testFloatExp10_DEPENDENCIES) + @rm -f testFloatExp10$(EXEEXT) + $(testFloatExp10_LINK) $(testFloatExp10_OBJECTS) $(testFloatExp10_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-cexp10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-cexp10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-dexp10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-dexp10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-sexp10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-sexp10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-zexp10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libExp10_la-zexp10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleExp10-testDoubleExp10.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatExp10-testFloatExp10.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libExp10_la-sexp10s.lo: sexp10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-sexp10s.lo -MD -MP -MF $(DEPDIR)/libExp10_la-sexp10s.Tpo -c -o libExp10_la-sexp10s.lo `test -f 'sexp10s.c' || echo '$(srcdir)/'`sexp10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-sexp10s.Tpo $(DEPDIR)/libExp10_la-sexp10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexp10s.c' object='libExp10_la-sexp10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-sexp10s.lo `test -f 'sexp10s.c' || echo '$(srcdir)/'`sexp10s.c + +libExp10_la-dexp10s.lo: dexp10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-dexp10s.lo -MD -MP -MF $(DEPDIR)/libExp10_la-dexp10s.Tpo -c -o libExp10_la-dexp10s.lo `test -f 'dexp10s.c' || echo '$(srcdir)/'`dexp10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-dexp10s.Tpo $(DEPDIR)/libExp10_la-dexp10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexp10s.c' object='libExp10_la-dexp10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-dexp10s.lo `test -f 'dexp10s.c' || echo '$(srcdir)/'`dexp10s.c + +libExp10_la-cexp10s.lo: cexp10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-cexp10s.lo -MD -MP -MF $(DEPDIR)/libExp10_la-cexp10s.Tpo -c -o libExp10_la-cexp10s.lo `test -f 'cexp10s.c' || echo '$(srcdir)/'`cexp10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-cexp10s.Tpo $(DEPDIR)/libExp10_la-cexp10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexp10s.c' object='libExp10_la-cexp10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-cexp10s.lo `test -f 'cexp10s.c' || echo '$(srcdir)/'`cexp10s.c + +libExp10_la-zexp10s.lo: zexp10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-zexp10s.lo -MD -MP -MF $(DEPDIR)/libExp10_la-zexp10s.Tpo -c -o libExp10_la-zexp10s.lo `test -f 'zexp10s.c' || echo '$(srcdir)/'`zexp10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-zexp10s.Tpo $(DEPDIR)/libExp10_la-zexp10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexp10s.c' object='libExp10_la-zexp10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-zexp10s.lo `test -f 'zexp10s.c' || echo '$(srcdir)/'`zexp10s.c + +libExp10_la-sexp10a.lo: sexp10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-sexp10a.lo -MD -MP -MF $(DEPDIR)/libExp10_la-sexp10a.Tpo -c -o libExp10_la-sexp10a.lo `test -f 'sexp10a.c' || echo '$(srcdir)/'`sexp10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-sexp10a.Tpo $(DEPDIR)/libExp10_la-sexp10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexp10a.c' object='libExp10_la-sexp10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-sexp10a.lo `test -f 'sexp10a.c' || echo '$(srcdir)/'`sexp10a.c + +libExp10_la-dexp10a.lo: dexp10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-dexp10a.lo -MD -MP -MF $(DEPDIR)/libExp10_la-dexp10a.Tpo -c -o libExp10_la-dexp10a.lo `test -f 'dexp10a.c' || echo '$(srcdir)/'`dexp10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-dexp10a.Tpo $(DEPDIR)/libExp10_la-dexp10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexp10a.c' object='libExp10_la-dexp10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-dexp10a.lo `test -f 'dexp10a.c' || echo '$(srcdir)/'`dexp10a.c + +libExp10_la-cexp10a.lo: cexp10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-cexp10a.lo -MD -MP -MF $(DEPDIR)/libExp10_la-cexp10a.Tpo -c -o libExp10_la-cexp10a.lo `test -f 'cexp10a.c' || echo '$(srcdir)/'`cexp10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-cexp10a.Tpo $(DEPDIR)/libExp10_la-cexp10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexp10a.c' object='libExp10_la-cexp10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-cexp10a.lo `test -f 'cexp10a.c' || echo '$(srcdir)/'`cexp10a.c + +libExp10_la-zexp10a.lo: zexp10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -MT libExp10_la-zexp10a.lo -MD -MP -MF $(DEPDIR)/libExp10_la-zexp10a.Tpo -c -o libExp10_la-zexp10a.lo `test -f 'zexp10a.c' || echo '$(srcdir)/'`zexp10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libExp10_la-zexp10a.Tpo $(DEPDIR)/libExp10_la-zexp10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexp10a.c' object='libExp10_la-zexp10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libExp10_la_CFLAGS) $(CFLAGS) -c -o libExp10_la-zexp10a.lo `test -f 'zexp10a.c' || echo '$(srcdir)/'`zexp10a.c + +testDoubleExp10-testDoubleExp10.o: testDoubleExp10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -MT testDoubleExp10-testDoubleExp10.o -MD -MP -MF $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo -c -o testDoubleExp10-testDoubleExp10.o `test -f 'testDoubleExp10.c' || echo '$(srcdir)/'`testDoubleExp10.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo $(DEPDIR)/testDoubleExp10-testDoubleExp10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp10.c' object='testDoubleExp10-testDoubleExp10.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -c -o testDoubleExp10-testDoubleExp10.o `test -f 'testDoubleExp10.c' || echo '$(srcdir)/'`testDoubleExp10.c + +testDoubleExp10-testDoubleExp10.obj: testDoubleExp10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -MT testDoubleExp10-testDoubleExp10.obj -MD -MP -MF $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo -c -o testDoubleExp10-testDoubleExp10.obj `if test -f 'testDoubleExp10.c'; then $(CYGPATH_W) 'testDoubleExp10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp10.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleExp10-testDoubleExp10.Tpo $(DEPDIR)/testDoubleExp10-testDoubleExp10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleExp10.c' object='testDoubleExp10-testDoubleExp10.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleExp10_CFLAGS) $(CFLAGS) -c -o testDoubleExp10-testDoubleExp10.obj `if test -f 'testDoubleExp10.c'; then $(CYGPATH_W) 'testDoubleExp10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleExp10.c'; fi` + +testFloatExp10-testFloatExp10.o: testFloatExp10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -MT testFloatExp10-testFloatExp10.o -MD -MP -MF $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo -c -o testFloatExp10-testFloatExp10.o `test -f 'testFloatExp10.c' || echo '$(srcdir)/'`testFloatExp10.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo $(DEPDIR)/testFloatExp10-testFloatExp10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp10.c' object='testFloatExp10-testFloatExp10.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -c -o testFloatExp10-testFloatExp10.o `test -f 'testFloatExp10.c' || echo '$(srcdir)/'`testFloatExp10.c + +testFloatExp10-testFloatExp10.obj: testFloatExp10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -MT testFloatExp10-testFloatExp10.obj -MD -MP -MF $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo -c -o testFloatExp10-testFloatExp10.obj `if test -f 'testFloatExp10.c'; then $(CYGPATH_W) 'testFloatExp10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp10.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatExp10-testFloatExp10.Tpo $(DEPDIR)/testFloatExp10-testFloatExp10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatExp10.c' object='testFloatExp10-testFloatExp10.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatExp10_CFLAGS) $(CFLAGS) -c -o testFloatExp10-testFloatExp10.obj `if test -f 'testFloatExp10.c'; then $(CYGPATH_W) 'testFloatExp10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatExp10.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/exp10/cexp10a.c b/2.3-1/src/c/elementaryFunctions/exp10/cexp10a.c new file mode 100644 index 00000000..6245c801 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/cexp10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" + +void cexp10a(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = cexp10s(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/cexp10s.c b/2.3-1/src/c/elementaryFunctions/exp10/cexp10s.c new file mode 100644 index 00000000..479909a7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/cexp10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" +#include "pow.h" + +floatComplex cexp10s(floatComplex z) { + return cpows(FloatComplex(10.0f, 0.0f), z); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/dexp10a.c b/2.3-1/src/c/elementaryFunctions/exp10/dexp10a.c new file mode 100644 index 00000000..137754d8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/dexp10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" + +void dexp10a(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dexp10s(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/dexp10s.c b/2.3-1/src/c/elementaryFunctions/exp10/dexp10s.c new file mode 100644 index 00000000..29ae40fe --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/dexp10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "exp10.h" + +double dexp10s(double x) { + return (pow(10, x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/sexp10a.c b/2.3-1/src/c/elementaryFunctions/exp10/sexp10a.c new file mode 100644 index 00000000..aa6cc0eb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/sexp10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" + +void sexp10a(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = sexp10s(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/sexp10s.c b/2.3-1/src/c/elementaryFunctions/exp10/sexp10s.c new file mode 100644 index 00000000..8f428293 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/sexp10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "exp10.h" + +float sexp10s(float x) { + return (powf(10,x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/testDoubleExp10.c b/2.3-1/src/c/elementaryFunctions/exp10/testDoubleExp10.c new file mode 100644 index 00000000..2f4b2559 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/testDoubleExp10.c @@ -0,0 +1,496 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testExp10.h" + +#define SOURCE {0.3796988371759653091431,0.3062356826849281787872,0.3880051793530583381653,\ +0.1047293278388679027557,0.7603831812739372253418,0.0340930395759642124176,\ +0.1423966242000460624695,0.5554559468291699886322,0.8031897451728582382202,\ +0.5183992316015064716339,0.1518561029806733131409,0.5884730662219226360321,\ +0.2545093484222888946533,0.9992679939605295658112,0.6398976957425475120544,\ +0.5506716123782098293304,0.4607007671147584915161,0.5933007937856018543243,\ +0.6538193570449948310852,0.4168340521864593029022,0.9910155385732650756836,\ +0.3720780410803854465485,0.7061824081465601921082,0.5780865414999425411224,\ +0.602319641038775444031,0.5715096746571362018585,0.0549629041925072669983,\ +0.1205854485742747784,0.0143620483577251434326,0.0257951230742037296295,\ +0.8411248764023184776306,0.4381882525049149990082,0.4643401596695184707642,\ +0.4197426405735313892365,0.8023654492571949958801,0.5228588166646659374237,\ +0.5095121040940284729004,0.4531980180181562900543,0.7817818326875567436218,\ +0.776557037141174077988,0.0466059204190969467163,0.5113326688297092914581,\ +0.7502101892605423927307,0.6883628661744296550751,0.0167756117880344390869,\ +0.9345410899259150028229,0.5609863763675093650818,0.2205847105942666530609,\ +0.7648540753871202468872,0.4816976976580917835236,0.1558785634115338325500,\ +0.2476022052578628063202,0.5216529071331024169922,0.0805230387486517429352,\ +0.4409417239949107170105,0.8911933614872395992279,0.9780590813606977462769,\ +0.4588093762286007404327,0.5510440031066536903381,0.0960960905067622661591,\ +0.4196785055100917816162,0.7502556503750383853912,0.7218149593099951744080,\ +0.2895541018806397914886,0.3907764498144388198853,0.6686618146486580371857,\ +0.4877656819298863410950,0.4685971769504249095917,0.3562648519873619079590,\ +0.3442325466312468051910,0.4253307832404971122742,0.5588058172725141048431,\ +0.3304864969104528427124,0.4157403339631855487823,0.1595822656527161598206,\ +0.3883102680556476116180,0.9415460713207721710205,0.4722979352809488773346,\ +0.8533652639016509056091,0.1207739165984094142914,0.8999380934983491897583,\ +0.4384902161546051502228,0.8976056622341275215149,0.4911110657267272472382,\ +0.3402217179536819458008,0.9966153600253164768219,0.0215395865961909294128,\ +0.6876890822313725948334,0.0044924151152372360229,0.6397854541428387165070,\ +0.5416147718206048011780,0.2247649203054606914520,0.7364005260169506072998,\ +0.4496364505030214786530,0.9678138038143515586853,0.6489060199819505214691,\ +0.2544666919857263565063,0.1923975017853081226349,0.6861492367461323738098,\ +0.4231455805711448192596,0.6734441593289375305176,0.8270696722902357578278,\ +0.9360805852338671684265,0.8326222090981900691986,0.7424779590219259262085,\ +0.0194640238769352436066,0.8016031915321946144104,0.2554539437405765056610,\ +0.2688109613955020904541,0.7558490769006311893463,0.4347589677199721336365,\ +0.6425966522656381130219,0.6957868058234453201294,0.6499576461501419544220,\ +0.2303190128877758979797,0.5504368054680526256561,0.3038997054100036621094,\ +0.0371030517853796482086,0.1703881053254008293152,0.5698686256073415279388,\ +0.0036411266773939132690,0.4491547052748501300812,0.0576810697093605995178,\ +0.4956056098453700542450,0.1888933442533016204834,0.5641230703331530094147,\ +0.8562210192903876304626,0.0794764286838471889496,0.6196198705583810806274,\ +0.2241039988584816455841,0.8582094730809330940247,0.7114551994018256664276,\ +0.8026027604937553405762,0.6153324418701231479645,0.8958183480426669120789,\ +0.8721761344932019710541,0.8389767911285161972046,0.2040955354459583759308,\ +0.3166538262739777565002,0.7006825651042163372040,0.2073105163872241973877,\ +0.5222550616599619388580,0.9416420971974730491638,0.52116033947095274925,\ +0.4509841967374086380005,0.3961292845197021961212,0.7240869747474789619446,\ +0.6724055963568389415741,0.2386146038770675659180,0.7124841609038412570953,\ +0.3286493895575404167175,0.4837769134901463985443,0.7662767004221677780151,\ +0.3153839264996349811554,0.3489987561479210853577,0.7413818310014903545380,\ +0.9702721945941448211670,0.1276510567404329776764,0.3828862151131033897400,\ +0.4882477498613297939301,0.5191949699074029922485,0.0906856027431786060333,\ +0.6833897503092885017395,0.5022272053174674510956,0.0540433898568153381348,\ +0.0163939022459089756012,0.6050811810418963432312,0.2953875153325498104095,\ +0.6451294776052236557007,0.9449766655452549457550,0.5638650292530655860901,\ +0.9786348040215671062469,0.9345349706709384918213,0.1023264364339411258698,\ +0.7292392617091536521912,0.8353224000893533229828,0.9328642506152391433716,\ +0.0507844281382858753204,0.1677279071882367134094,0.9475936102680861949921,\ +0.9390441477298736572266,0.1270067342557013034821,0.6562355486676096916199,\ +0.7192088677547872066498,0.5519206207245588302612,0.7606899146921932697296,\ +0.8840736905112862586975,0.6386072556488215923309,0.2424023114144802093506,\ +0.7679059565998613834381,0.2624090006574988365173,0.1259524053893983364105,\ +0.4549009744077920913696,0.2127966103143990039825,0.0598834278061985969543,\ +0.8079127701930701732635,0.7068187817931175231934,0.9313771002925932407379,\ +0.0831561936065554618835,0.0639262734912335872650} + +#define RESULT {2.3971700177038997026102,2.0241173275316319823958,2.4434596929789558217294,\ +1.2727096230040590985055,5.7594787634974791146192,1.0816656533775219628524,\ +1.3880228773309635226241,3.5929894899598955326780,6.3560857138200033134012,\ +3.2991285007258008832309,1.4185874159639277891642,3.8767970491010381728358,\ +1.7968397576993500042164,9.9831591347336789965539,4.3641301682226361080552,\ +3.5536251298653307451048,2.8886888633814562510338,3.9201329280029257873252,\ +4.506292282304419138939,2.6111634148093250118450,9.7952503109731186015097,\ +2.3554725153952857930051,5.0837291957799548569596,3.7851800417010572630261,\ +4.0023921772430028909184,3.7282899025795783742865,1.1349138714412994044523,\ +1.3200350064956956064322,1.033622723333016191205,1.0611948240957502775927,\ +6.9362522133054556050524,2.7427628125876060138921,2.9129978203666571090480,\ +2.6287097779191044288893,6.3440332316119087963102,3.3331803790647938079417,\ +3.232303288716906752853,2.8392132821292248578970,6.0503685885843978553567,\ +5.97801550527315583849,1.1132838793654469267125,3.245881561190152808649,\ +5.6261355226100322468596,4.879360051235307693673,1.0393830059871540516525,\ +8.600844382521195541358,3.6390362044693791432337,1.6618227902609816748480,\ +5.8190766171103653903174,3.0317800975513509165182,1.4317874896288145247780,\ +1.7684883582783652578030,3.3239379437878064926792,1.2037132434952326764943,\ +2.7602074516612016275019,7.7838303437469935630588,9.5073412259646765676280,\ +2.876135722709581621359,3.5566735327883938211357,1.2476595365735951848052,\ +2.6283216080771176770270,5.626724486525223944966,5.2700527142503661437445,\ +1.947843685866482488223,2.4591014722412456450229,4.6629613384726322777851,\ +3.0744375934314547293980,2.941691847776138235560,2.2712495380631962937912,\ +2.2091873443061853521385,2.6627523904580243652163,3.620810677149941980701,\ +2.1403583776871992760960,2.60459578833533411668,1.44405011565138674534,\ +2.4451768086326421958177,8.7406971172900771449576,2.9668660249388048022468,\ +7.1345282822869320327186,1.3206079780376647203610,7.9421501528532889579992,\ +2.7446705104699793409395,7.899610206034289205945,3.0982115292188217026137,\ +2.188878814912672332582,9.9223686842029490406958,1.050847236808647444661,\ +4.8717958623764170411619,1.0103978539346472054206,4.3630024226971446665857,\ +3.4802846963616036468636,1.6778955425132806578148,5.4500504945081766905446,\ +2.8160246398239912046790,9.2856819400663770380788,4.4555982016116564281560,\ +1.7966632806306144232167,1.5573904303972738727424,4.8545528865355054293218,\ +2.6493880955344351058045,4.7145924820058668913703,6.715365764647851953839,\ +8.6313869205483300106607,6.8017741785747647398352,5.5268535777229557126589,\ +1.0458370517364794505255,6.3329081834648581761371,1.8007521573290650174215,\ +1.8569959706339840277423,5.6996616704912836937069,2.7211906353565828986518,\ +4.39133583975054442305,4.9634860523035060353436,4.4664003219774368602657,\ +1.6994915629457518768675,3.5517043359266669000363,2.0132592604656482926373,\ +1.089188511318553986840,1.4804307775633922528158,3.7142285642082217833604,\ +1.0084192481976341770888,2.8129026699324310989425,1.142039354028792752516,\ +3.1304416262076188992580,1.5448749964710146720392,3.6654143041103313116480,\ +7.181596810407055997416,1.200815897009761545888,4.1650466551411478022260,\ +1.6753440162955879344509,7.21455374553604489307,5.1458272136838258958846,\ +6.3475007446385660614396,4.1241309049764449667919,7.8671666160643907161898,\ +7.450340721306332625318,6.9020291813359317956156,1.5999099356849897368704,\ +2.0732602743658210542321,5.0197555099972408498843,1.6117976431404783532741,\ +3.3285498202301311287954,8.7426299668587681424015,3.3201701404059416056214,\ +2.824777184045289768477,2.4895983330428896884712,5.297695284941288385028,\ +4.7033315715610184426509,1.7322660897889763376156,5.1580335293393115847493,\ +2.1313235787699511547544,3.0463297621649392254994,5.8381695091926415486228,\ +2.0672068075526839336931,2.2335658257207593457849,5.5129217858217156589262,\ +9.3383940240121710019139,1.3416865210022335119788,2.414828068089148516151,\ +3.0778521213560718905455,3.3051788871815572790069,1.2322124790790967008292,\ +4.8238050773970124751600,3.1785365175695079464901,1.1325135056912927211670,\ +1.038469874168215900667,4.0279231974946911876145,1.97418348876764548905,\ +4.4170211379151878006155,8.8100153590470213771368,3.663237102755284801958,\ +9.5199529943728755654320,8.6007231965720354338600,1.2656873409568392130353,\ +5.3609192017188229684166,6.8441954007674699056452,8.5676999890922083125133,\ +1.1240468894427289026083,1.471390362736320067683,8.8632624680127776173322,\ +8.690487669968261386089,1.3396974608773437598330,4.5314328497492990521778,\ +5.2385231533328031616747,3.5638598811998751791918,5.7635480038278910086547,\ +7.6572652334911666116568,4.351182064426246220989,1.7474401555184173595592,\ +5.8601125417902917291713,1.8298226565740485227707,1.336449046213224356450,\ +2.8503682671020214023372,1.6322873327021125700043,1.1478454784492588824918,\ +6.4255864384701686375934,5.0911838672535516536755,8.538411872415464287656,\ +1.211033602346728965671,1.1585806569998515769271} + +#define ZSOURCER {0.0521394181996583938599,0.4229906541295349597931,0.9028727160766720771790,\ +0.270216043572872877121,0.4369520992040634155273,0.0152578153647482395172,\ +0.6548111913725733757019,0.0449309810064733028412,0.2133925389498472213745,\ +0.5342523609288036823273,0.7069207737222313880920,0.2409008811227977275848,\ +0.2901745550334453582764,0.7550916881300508975983,0.2289740880951285362244,\ +0.4858699417673051357269,0.6168978903442621231079,0.8581895199604332447052,\ +0.9484143527224659919739,0.2478762450627982616425,0.3616605177521705627441,\ +0.4686846160329878330231,0.0340223712846636772156,0.5221414058469235897064,\ +0.3054678197950124740601,0.2017288585193455219269,0.4932554000988602638245,\ +0.3831945951096713542938,0.9221886433660984039307,0.8073847130872309207916,\ +0.3020078903064131736755,0.2459809384308755397797,0.1128082294017076492310,\ +0.5088820648379623889923,0.9855441050603985786438,0.1797042894177138805389,\ +0.0627280175685882568359,0.6279844292439520359039,0.8693526117131114006042,\ +0.1181543781422078609467,0.1908623259514570236206,0.0912145380862057209015,\ +0.7186726490035653114319,0.310268334578722715378,0.6592819057404994964600,\ +0.9106893003918230533600,0.9854423692449927330017,0.8546765870414674282074,\ +0.4121543709188699722290,0.2333141383714973926544,0.3814189555123448371887,\ +0.6619831356219947338104,0.212731502950191497803,0.0520866983570158481598,\ +0.9962206138297915458679,0.6885302006267011165619,0.6471334304660558700562,\ +0.1732599367387592792511,0.6790404403582215309143,0.7853972460143268108368,\ +0.5636796839535236358643,0.5331145809032022953033,0.9027821635827422142029,\ +0.0063843778334558010101,0.9165171254426240921021,0.4580909651704132556915,\ +0.8293677615001797676086,0.7187301176600158214569,0.4822947531938552856445,\ +0.9620302417315542697906,0.7949669538065791130066,0.3603135510347783565521,\ +0.4186353813856840133667,0.6742749665863811969757,0.9338985690847039222717,\ +0.18709085090085864067,0.1331541948020458221436,0.4923790604807436466217,\ +0.1599537869915366172791,0.8545161760412156581879,0.4317741785198450088501,\ +0.5531771448440849781036,0.2238912554457783699036,0.1766969445161521434784,\ +0.4150884225964546203613,0.6159632527269423007965,0.0658540828153491020203,\ +0.9070334821008145809174,0.0915193017572164535522,0.4515289147384464740753,\ +0.1814587051048874855042,0.8840930457226932048798,0.1760245300829410552979,\ +0.3308106199838221073151,0.2203056281432509422302,0.3864682218991219997406,\ +0.0431000906974077224731,0.2068966520018875598907,0.5356620447710156440735,\ +0.0403697001747786998749,0.3028300404548645019531,0.6841432997025549411774,\ +0.9040663270279765129089,0.1237034215591847896576,0.9687331896275281906128,\ +0.3681504433043301105499,0.1336043933406472206116,0.6103821019642055034637,\ +0.6861566565930843353271,0.6903465152718126773834,0.779607950709760189056,\ +0.7986211306415498256683,0.9899662975221872329712,0.8009328362531960010529,\ +0.6865246118977665901184,0.8669688436202704906464,0.0602840110659599304199,\ +0.6239373260177671909332,0.5747098876163363456726,0.2018211721442639827728,\ +0.9450219180434942245483,0.6681275893934071063995,0.3908910537138581275940,\ +0.8401706661097705364227,0.7179634161293506622314,0.6875333772040903568268,\ +0.6410528933629393577576,0.8713398925028741359711,0.5411411095410585403442,\ +0.7853284222073853015900,0.4244953142479062080383,0.1414492088370025157928,\ +0.1002616137266159057617,0.0548216500319540500641,0.3878128407523036003113,\ +0.1043689115904271602631,0.3819272350519895553589,0.3513077651150524616241,\ +0.3175459811463952064514,0.1629057596437633037567,0.2614045254886150360107,\ +0.2885272116400301456451,0.5902544697746634483337,0.3439738727174699306488,\ +0.8696897123008966445923,0.0534855094738304615021,0.1987623842433094978333,\ +0.6515000048093497753143,0.2086210027337074279785,0.1333819651044905185699,\ +0.5733251376077532768250,0.9408131926320493221283,0.9827877636998891830444,\ +0.5483977575786411762238,0.9164683455601334571838,0.6582687790505588054657,\ +0.1169865764677524566650,0.6840933994390070438385,0.2702485686168074607849,\ +0.2898568115197122097015,0.9279741663485765457153,0.3171655726619064807892,\ +0.0346859293058514595032,0.8625448155216872692,0.4192672073841094970703,\ +0.9283133395947515964508,0.1561186043545603752136,0.3421049430035054683685,\ +0.6677390020340681076050,0.8959637288935482501984,0.7042291918769478797913,\ +0.2711754958145320415497,0.7707630358636379241943,0.6646066964603960514069,\ +0.0564929535612463951111,0.4913068241439759731293,0.3226534072309732437134,\ +0.4814894613809883594513,0.4087979318574070930481,0.2927415999583899974823,\ +0.8891521319746971130371,0.7954202168621122837067,0.8309869421645998954773,\ +0.8356794654391705989838,0.4487133231014013290405,0.9114312161691486835480,\ +0.5860714400187134742737,0.186776056420058012009,0.2693342454731464385986,\ +0.9950512335635721683502,0.9318672632798552513123,0.8146264008246362209320,\ +0.1896832454949617385864,0.0199374002404510974884,0.1238022493198513984680,\ +0.8879826921038329601288,0.7732745558023452758789,0.7526164152659475803375,\ +0.8376457272097468376160,0.2204564376734197139740} + +#define ZSOURCEI {0.3044399749487638473511,0.3680851315148174762726,0.7309098849073052406311,\ +0.2054549823515117168427,0.0948474220931529998779,0.7900205166079103946686,\ +0.3616730114445090293884,0.5851024067960679531097,0.0693163666874170303345,\ +0.3493489888496696949005,0.1835746141150593757629,0.3968948009423911571503,\ +0.0996801331639289855957,0.8549251281656324863434,0.8357324106618762016296,\ +0.9418399124406278133392,0.0554450806230306625366,0.6700697620399296283722,\ +0.4463311964645981788635,0.1178311700932681560516,0.0399966575205326080322,\ +0.8887174264527857303619,0.1686335867270827293396,0.9620060822926461696625,\ +0.781102331355214118958,0.2049232018180191516876,0.6681626336649060249329,\ +0.7458390104584395885468,0.6444613933563232421875,0.5694789239205420017242,\ +0.7798063186928629875183,0.4667183174751698970795,0.2390516381710767745972,\ +0.2273887698538601398468,0.0535939196124672889709,0.0797578911297023296356,\ +0.0830229185521602630615,0.2299542189575731754303,0.4078942527994513511658,\ +0.3135930425487458705902,0.2988875750452280044556,0.0152183887548744678497,\ +0.6087857903912663459778,0.4139107796363532543182,0.8067577406764030456543,\ +0.1505197458900511264801,0.7943486524745821952820,0.6584644555114209651947,\ +0.9843795206397771835327,0.8309051920659840106964,0.7626284742727875709534,\ +0.9873227919451892375946,0.2627140469849109649658,0.2271525249816477298737,\ +0.242022148333489894867,0.5921032777987420558929,0.6258154083043336868286,\ +0.2771522742696106433868,0.8628354417160153388977,0.8079399424605071544647,\ +0.4837554544210433959961,0.0143989124335348606110,0.0487624881789088249207,\ +0.1519355042837560176849,0.8873454760760068893433,0.0273414407856762409210,\ +0.5470371553674340248108,0.8518478940241038799286,0.5534047596156597137451,\ +0.1433433503843843936920,0.8160062870010733604431,0.7087611532770097255707,\ +0.6693260166794061660767,0.9310019579716026782990,0.9888748200610280036926,\ +0.6374907079152762889862,0.9456876888871192932129,0.1145771169103682041168,\ +0.6323727769777178764343,0.7284730165265500545502,0.8856631275266408920288,\ +0.4942793031223118305206,0.0190941328182816505432,0.1748895938508212566376,\ +0.7399766482412815093994,0.4661670760251581668854,0.1322575574740767478943,\ +0.9087754092179238796234,0.11615646071732044220,0.7354039144702255725861,\ +0.1216390328481793403625,0.2898616599850356578827,0.7108344733715057373047,\ +0.3166244276799261569977,0.4294263450428843498230,0.6909029199741780757904,\ +0.1338429730385541915894,0.4151599411852657794952,0.3047454515472054481506,\ +0.323238662909716367722,0.2928581796586513519287,0.2828734577633440494537,\ +0.9256087234243750572205,0.1463391608558595180511,0.3073406759649515151978,\ +0.6423539933748543262482,0.8470350624993443489075,0.2050857576541602611542,\ +0.4205227121710777282715,0.7732202881015837192535,0.9940918935462832450867,\ +0.2385355173610150814056,0.87819238565862178802,0.8542838920839130878448,\ +0.9186090314760804176331,0.9039202476851642131805,0.2430246956646442413330,\ +0.6553216264583170413971,0.5383144235238432884216,0.4596298984251916408539,\ +0.1132094729691743850708,0.1722074192948639392853,0.0771417664363980293274,\ +0.2509303349070250988007,0.7141261845827102661133,0.2991535165347158908844,\ +0.4254599986597895622253,0.8421654864214360714,0.3318156134337186813354,\ +0.1318110679276287555695,0.6389746675267815589905,0.1391938696615397930145,\ +0.0569984130561351776123,0.9949800879694521427155,0.7950511714443564414978,\ +0.3458094871602952480316,0.8083905372768640518188,0.7886787918396294116974,\ +0.9252098770812153816223,0.0978971007280051708221,0.1040655449032783508301,\ +0.7463223063386976718903,0.2425431115552783012390,0.6190718798898160457611,\ +0.5496137794107198715210,0.1987607558257877826691,0.3828040296211838722229,\ +0.2415534253232181072235,0.5118484236299991607666,0.4379267231561243534088,\ +0.8779173558577895164490,0.1360241672955453395844,0.9468084294348955154419,\ +0.2738420856185257434845,0.5806620018556714057922,0.5942221391014754772186,\ +0.8508083224296569824219,0.378734225872904062271,0.2592755584046244621277,\ +0.7080181255005300045013,0.3032848816365003585815,0.0120116178877651691437,\ +0.0807306626811623573303,0.7887271861545741558075,0.5701906941831111907959,\ +0.2198487878777086734772,0.2014332404360175132751,0.3704045540653169155121,\ +0.2366845849901437759399,0.103130650240927934647,0.1840926231816411018372,\ +0.1408759090118110179901,0.8378689214587211608887,0.2475062184967100620270,\ +0.4595135403797030448914,0.6442520259879529476166,0.9563237931579351425171,\ +0.9093016912229359149933,0.552059986628592014313,0.0986777986399829387665,\ +0.2551880665123462677002,0.0510429129935801029205,0.287540963850915431976,\ +0.1730656377039849758148,0.4155373144894838333130,0.8203372103162109851837,\ +0.7022680984809994697571,0.0665632444433867931366,0.4468086212873458862305,\ +0.5658646025694906711578,0.8720351336523890495300,0.7345057590864598751068,\ +0.3390222620218992233276,0.9842283879406750202179,0.3797692963853478431702,\ +0.6046022842638194561005,0.5255502574145793914795,0.4914151043631136417389,\ +0.6406045397743582725525,0.6271067834459245204926} + +#define ZRESULTR {0.8616789149319691309969,1.7528026973616770423092,-0.8951576871785223987743,\ +1.65839939772781952421,2.670002318435218402470,-0.2545370391954314692740,\ +3.0388538062879217882539,0.2458549627872582132859,1.613753544958956620547,\ +2.373140931257777808128,4.6441801233654604885714,1.0634345748771927286924,\ +1.8994737292284431529055,-2.2038440203063891509316,-0.5865941523645769040129,\ +-1.7230123422001577537799,4.1053385752577806755426,0.2012772387479372093733,\ +4.5889850773872540301568,1.7048706561180972940406,2.2898980543543361321213,\ +-1.3470616397449584056289,1.000979918376255772827,-1.998745505240199671348,\ +-0.4562266859878671976247,1.4173389563254865652908,0.1005345377926576272420,\ +-0.3529055360142766550879,0.7252834368660135977436,1.6469252220572825340383,\ +-0.4467771279955162211373,0.8387209999987794706300,1.1050928340202259558822,\ +2.7952258554924300781863,9.5990623048041356923932,1.4870960004060611581167,\ +1.1343408485170072275139,3.664612325782657276108,4.3703600670610898148993,\ +0.9850722877732481785884,1.1986551091809227731488,1.2329567566066641504108,\ +0.8800935914266996284994,1.1832797973754654030643,-1.2910350436339537161246,\ +7.6571266019263468649569,-2.4697863053099986530015,0.3907140975028082774401,\ +-1.655858606271026545187,-0.5746050598208488624508,-0.4432229757632685229751,\ +-2.9672355970693655713433,1.3424314109887605095395,0.9766924789772336579219,\ +8.4134496859782270661299,1.0052614992336186272581,0.5743785834192948192012,\ +1.1969550027714319639927,-1.929705102086765711178,-1.7419725915375741109870,\ +1.6154412531361730387403,3.4109538321538344085582,7.9439933441705683492273,\ +0.9533381558732610949747,-3.7544424962625675412653,2.8656935239804841586420,\ +2.0671417342103679537502,-1.992605711686495695290,0.8871291147322790671126,\ +8.6682584526683399417379,-1.8914875129526329544660,-0.1401839917101320720505,\ +0.0776428549278006530088,-2.560598020200964608506,-5.5730608716054170770349,\ +0.1580601872370170912774,-0.7747638844786981504598,2.9997587850927698305270,\ +0.1654170760372596638010,-0.7609360918468449641594,-1.2203777718239325889016,\ +1.4986628046871217634362,1.6729053694884241654250,1.381936351079181113377,\ +-0.3450348611667466425246,1.9706824980594530583033,1.1101876800122791877357,\ +-4.0234586128898426338196,1.1906849924222373537930,-0.3456983902450189716227,\ +1.459474884821820195313,6.0143936939361175575414,-0.0988538832443286719087,\ +1.597480633260187854461,0.9129179205342567993142,-0.0488550375477847867445,\ +1.0523032581716083022627,0.9288642069528815214952,2.6218635570145862878633,\ +0.8072263924219229558332,1.5687383989731884526009,3.842899231404802939949,\ +-4.2624261266025849081984,1.2547786671163203564561,7.0708952400269708959968,\ +0.2138025786160810681746,-0.5039897261739162415140,3.6311482225254705369366,\ +2.7511697563589119219785,-1.0199337285771719052718,-3.9613785741953506658319,\ +5.3644844232216355450760,-4.261894060044243204288,-2.440577323716713653567,\ +-2.5162841502447741426352,-3.5973154891472156613474,0.9736685483701841281601,\ +0.2600685777468328963025,1.2216142738714919069309,0.7803738463829824612006,\ +8.5132680918277277015704,4.2958732896863782713126,2.4210488328114880829389,\ +5.79755622526757630197,-0.3837915438103189358365,3.75964173341358565139,\ +2.4386368546342671592697,-2.6776116153796971630641,2.5102046010802867570533,\ +5.821177306248865868099,0.2640059162189042352153,1.31446884371506267364,\ +1.2488505950260830879017,-0.7482976046844636019983,-0.6275966789165404735584,\ +0.8893791469828959961319,-0.6903683581860716733658,-0.5450973252013330272447,\ +-1.1028092549899868313190,1.4183297900536229185775,1.773434980128008042755,\ +-0.2859252183654940604463,3.3012839410905678860786,0.3197431184385559066463,\ +2.2263782918939738487,1.0146592610810074575056,1.0051892636742449926857,\ +3.8066700246852320788093,0.6179593115281443171938,0.7249522760637888696422,\ +-1.6307732738859830323719,8.3014440376437921287334,-5.5006403965152692592255,\ +2.8552972304138433123910,1.9111692714948702587208,0.9158531650125845136046,\ +-0.4956155140563224259509,3.1079184772588979157604,1.5408715933614589577161,\ +-0.1158617194706384467828,6.4886221326459514457952,2.0749108619541400955200,\ +1.0644832532013759340828,-1.769719547358157507588,0.6696790607045245424800,\ +7.4150575771959807980238,1.2812290258043323998294,1.4461251309266722753222,\ +3.9789946052408695642555,7.6489498856535602655526,4.6130068144799594165306,\ +1.7697609579312818528507,-2.069533011859056692572,3.8895055335340873448047,\ +0.5587033140125831076617,0.2704103697575463982616,-1.2405136002402707973147,\ +-1.5134557095053997599621,0.7566012248243810800474,1.9117596963451992664318,\ +6.447932326957059423478,6.2003146906774571078813,5.344469754581457898723,\ +6.3131049040564706231748,1.6189521464425622454542,-2.550619599252561098268,\ +-0.1781945407584817342439,1.5193399835582135359857,0.9590574537903557850171,\ +2.6165522176992435099407,-3.6188103766399173366608,-0.7842216609502735691350,\ +1.0995885822264845899099,-0.6708497380942372023682,0.8529889923514888394607,\ +1.3729938244229744626068,2.0937757207972880202362,2.4059764571152468803916,\ +0.6578397026948303860650,0.2101416292188336421010} + +#define ZRESULTI {0.7272548245748866602156,1.9854303798419310478351,7.9457339679995211412233,\ +0.8488412125630352411676,0.5925642663233093854203,1.0039936024574043216262,\ +3.3414071705695578273776,1.081403318108233868600,0.2597757190370896807075,\ +2.4651157060741901716483,2.0890001084665330566281,1.3789900497554921088295,\ +0.4437915251064282751159,5.2455794258294652365748,1.5894481231762551676212,\ +2.5300661616939024156636,0.5269825145414556155643,7.2114139192406465639351,\ +7.6023759189514121814568,0.474253708603649237752,0.2114880398457448518190,\ +2.615809838094426353905,0.40946194724304191270,2.660538085383924222782,\ +1.96836124960102032411,0.7232671662286862535041,3.111923291962274351619,\ +2.3906358097335185242116,8.3281383621146503060118,6.2028635418634419096406,\ +1.9540840065283944237962,1.5494625392422922693925,0.678202414336372183534,\ +1.6137618479690827300033,1.1906180579664376040228,0.2762165158082148241903,\ +0.2195296884715036700442,2.1446447456633843664520,5.9741482912408789829328,\ +0.867597682821533044972,0.9856997170507159067299,0.0432225133986508733286,\ +5.157507023966152459593,1.6654420749486735786604,4.3768952511866894283799,\ +2.7654687058579336955688,9.3496470896606780343063,7.1454288620924977237792,\ +1.9826603369952136013410,1.6118978629668390123442,2.3655185893491501580854,\ +3.5043054723514432957643,0.9281385166491339377970,0.5631636514321668451899,\ +5.2429430139302253266465,4.7766052326802679317552,4.4001190809809767046090,\ +0.8877792684794596489439,4.368513033448009785786,5.8469722698220429890625,\ +3.2860624631665138473124,0.1131306785331901154645,0.8957170057781025374055,\ +0.3478275260751592101727,7.3475483360254925102595,0.1806513152317329173879,\ +6.4267295981620362610442,4.8385133662587431757629,2.9034462647978491744993,\ +2.9696777404396668131881,5.9431363200854443462617,2.288232180725223052775,\ +2.6208664370161969259243,3.9693733894002809492463,6.5342907486237020719955,\ +1.5303355006050158859665,1.1162736854609731640409,0.8102944693911555695820,\ +1.4357885386399356075771,7.1128736564949752718690,2.4113210957685655699834,\ +3.2448135685253003401840,0.0735981604163226527104,0.5886735706121437594618,\ +2.5776994154551164939448,3.629648394334391792171,0.3489446690644626425382,\ +6.9989048057282028381110,0.3262782224609265258053,2.8071160078618211386470,\ +0.4198114062820728631387,4.7398318369933782889802,1.4965081339145251959621,\ +1.4268961804460684739126,1.3873315379595159146930,2.4343374430326063517782,\ +0.3349767990169579268134,1.3153540511429153703205,2.2160059373349834110911,\ +0.7434370339011254769090,1.253936082334201174149,2.929523877257661279572,\ +6.7911802335851190193239,0.4395719515095502516466,6.0491461603781946365643,\ +2.324454495134102849363,1.263389181071626898856,1.8546860110985297076525,\ +3.9998192433092101261,4.7944107664763828680066,4.5331878790851858340716,\ +3.2834478309428574149820,8.7932187934310537258398,5.8331542843869588210737,\ +4.1564133542481211947006,6.4227435117275550879867,0.6098783468239901139896,\ +4.1986123528738117371972,3.5516439676096513977654,1.3871043178012487651074,\ +2.2708618645232787613963,1.7986812579372670750644,0.4346204841779990335482,\ +3.7800771946382365484851,5.2094034804655127146589,3.0955575196143279015359,\ +3.6332179827516117853747,6.9371912371180162182327,2.4051741186173338782339,\ +1.8230887730163647386661,2.6444893659134645069742,0.4363389413001144689908,\ +0.1648513733929060642858,0.8527852017899220093966,2.3603668450398678224644,\ +0.9089049761135811200674,2.308482167770112614136,2.1783058145209865941183,\ +1.760657933306752465086,0.3252423522775149677955,0.4332745364849133751228,\ +1.922093093505325978043,2.0627370874500741138036,2.184596685297794049774,\ +7.065327858525169979487,0.4997624596555385045882,1.2195103000378291202566,\ +2.3664724579469695875389,1.4939021538810592915070,1.1500903795661745476764,\ +3.3700776947908237524132,2.6885676432811540514933,7.8817788746511769915060,\ +2.0842223123540501994455,8.0258609977666459656120,4.459626216287859712395,\ +1.211699888667206126414,3.6993867326108555992903,1.0474037470444790276503,\ +1.9457553430070655409168,5.4468957190088280739815,0.0574020495019843535189,\ +0.200187099983916316770,7.068768975957844702407,2.5390022146337085651169,\ +4.1109611351982495719426,0.6408861046921948689814,1.6557914176531909333789,\ +2.4121782951381569581883,1.8513041911556680219064,2.0815970551782250197448,\ +0.5950929849744456268112,5.5238367721873160576251,2.4925246722707656843454,\ +0.9924655082402137340480,3.0877905115051524909120,1.6970418763867407552226,\ +2.6253251426459978112860,2.4490847102298514137431,0.4420113886405674930025,\ +4.2948005817238108505762,0.7321010758042626465070,4.1657752085548631626466,\ +2.6579704039050806585465,2.2968127063505034968216,7.7460044759776618406022,\ +3.851297516891551087070,0.2347062006554227753252,1.5927846479405329827017,\ +9.5341720234343370066199,7.7442521101341821321284,6.478396320140080710814,\ +1.0891470158039435744968,0.8038176255057727370712,1.0202487324661473344634,\ +7.6035293179001266494765,5.5512724543076572558675,5.1202912658114749788751,\ +6.849389505178533177343,1.6479880468591965314573} + + + + +void dexp10sTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dexp10s(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zexp10sTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zexp10s(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dexp10aTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dexp10a(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } +} + +void zexp10aTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + zexp10a(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testExp10(void) { + printf("\n>>>> Double 10-Base Exponential Tests\n"); + dexp10sTest(); + zexp10sTest(); + dexp10aTest(); + zexp10aTest(); + return 0; +} + +int main(void) { + assert(testExp10() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/testExp10.h b/2.3-1/src/c/elementaryFunctions/exp10/testExp10.h new file mode 100644 index 00000000..8e3bbdbd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/testExp10.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTEXP10_H_ +#define _TESTEXP10_H_ + +#include +#include +#include +#include "exp10.h" +#include "constant.h" + + +void sexp10sTest(void); + +void dexp10sTest(void); + +void cexp10sTest(void); + +void zexp10sTest(void); + +void sexp10aTest(void); + +void dexp10aTest(void); + +void cexp10aTest(void); + +void zexp10aTest(void); + +int testExp10(void); + +#endif /* ! _TESTEXP10_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/exp10/testFloatExp10.c b/2.3-1/src/c/elementaryFunctions/exp10/testFloatExp10.c new file mode 100644 index 00000000..234c66dd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/testFloatExp10.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testExp10.h" + +#define SOURCE {0.3796988371759653091431f,0.3062356826849281787872f,0.3880051793530583381653f,\ +0.1047293278388679027557f,0.7603831812739372253418f,0.0340930395759642124176f,\ +0.1423966242000460624695f,0.5554559468291699886322f,0.8031897451728582382202f,\ +0.5183992316015064716339f,0.1518561029806733131409f,0.5884730662219226360321f,\ +0.2545093484222888946533f,0.9992679939605295658112f,0.6398976957425475120544f,\ +0.5506716123782098293304f,0.4607007671147584915161f,0.5933007937856018543243f,\ +0.6538193570449948310852f,0.4168340521864593029022f,0.9910155385732650756836f,\ +0.3720780410803854465485f,0.7061824081465601921082f,0.5780865414999425411224f,\ +0.602319641038775444031f,0.5715096746571362018585f,0.0549629041925072669983f,\ +0.1205854485742747784f,0.0143620483577251434326f,0.0257951230742037296295f,\ +0.8411248764023184776306f,0.4381882525049149990082f,0.4643401596695184707642f,\ +0.4197426405735313892365f,0.8023654492571949958801f,0.5228588166646659374237f,\ +0.5095121040940284729004f,0.4531980180181562900543f,0.7817818326875567436218f,\ +0.776557037141174077988f,0.0466059204190969467163f,0.5113326688297092914581f,\ +0.7502101892605423927307f,0.6883628661744296550751f,0.0167756117880344390869f,\ +0.9345410899259150028229f,0.5609863763675093650818f,0.2205847105942666530609f,\ +0.7648540753871202468872f,0.4816976976580917835236f,0.1558785634115338325500f,\ +0.2476022052578628063202f,0.5216529071331024169922f,0.0805230387486517429352f,\ +0.4409417239949107170105f,0.8911933614872395992279f,0.9780590813606977462769f,\ +0.4588093762286007404327f,0.5510440031066536903381f,0.0960960905067622661591f,\ +0.4196785055100917816162f,0.7502556503750383853912f,0.7218149593099951744080f,\ +0.2895541018806397914886f,0.3907764498144388198853f,0.6686618146486580371857f,\ +0.4877656819298863410950f,0.4685971769504249095917f,0.3562648519873619079590f,\ +0.3442325466312468051910f,0.4253307832404971122742f,0.5588058172725141048431f,\ +0.3304864969104528427124f,0.4157403339631855487823f,0.1595822656527161598206f,\ +0.3883102680556476116180f,0.9415460713207721710205f,0.4722979352809488773346f,\ +0.8533652639016509056091f,0.1207739165984094142914f,0.8999380934983491897583f,\ +0.4384902161546051502228f,0.8976056622341275215149f,0.4911110657267272472382f,\ +0.3402217179536819458008f,0.9966153600253164768219f,0.0215395865961909294128f,\ +0.6876890822313725948334f,0.0044924151152372360229f,0.6397854541428387165070f,\ +0.5416147718206048011780f,0.2247649203054606914520f,0.7364005260169506072998f,\ +0.4496364505030214786530f,0.9678138038143515586853f,0.6489060199819505214691f,\ +0.2544666919857263565063f,0.1923975017853081226349f,0.6861492367461323738098f,\ +0.4231455805711448192596f,0.6734441593289375305176f,0.8270696722902357578278f,\ +0.9360805852338671684265f,0.8326222090981900691986f,0.7424779590219259262085f,\ +0.0194640238769352436066f,0.8016031915321946144104f,0.2554539437405765056610f,\ +0.2688109613955020904541f,0.7558490769006311893463f,0.4347589677199721336365f,\ +0.6425966522656381130219f,0.6957868058234453201294f,0.6499576461501419544220f,\ +0.2303190128877758979797f,0.5504368054680526256561f,0.3038997054100036621094f,\ +0.0371030517853796482086f,0.1703881053254008293152f,0.5698686256073415279388f,\ +0.0036411266773939132690f,0.4491547052748501300812f,0.0576810697093605995178f,\ +0.4956056098453700542450f,0.1888933442533016204834f,0.5641230703331530094147f,\ +0.8562210192903876304626f,0.0794764286838471889496f,0.6196198705583810806274f,\ +0.2241039988584816455841f,0.8582094730809330940247f,0.7114551994018256664276f,\ +0.8026027604937553405762f,0.6153324418701231479645f,0.8958183480426669120789f,\ +0.8721761344932019710541f,0.8389767911285161972046f,0.2040955354459583759308f,\ +0.3166538262739777565002f,0.7006825651042163372040f,0.2073105163872241973877f,\ +0.5222550616599619388580f,0.9416420971974730491638f,0.52116033947095274925f,\ +0.4509841967374086380005f,0.3961292845197021961212f,0.7240869747474789619446f,\ +0.6724055963568389415741f,0.2386146038770675659180f,0.7124841609038412570953f,\ +0.3286493895575404167175f,0.4837769134901463985443f,0.7662767004221677780151f,\ +0.3153839264996349811554f,0.3489987561479210853577f,0.7413818310014903545380f,\ +0.9702721945941448211670f,0.1276510567404329776764f,0.3828862151131033897400f,\ +0.4882477498613297939301f,0.5191949699074029922485f,0.0906856027431786060333f,\ +0.6833897503092885017395f,0.5022272053174674510956f,0.0540433898568153381348f,\ +0.0163939022459089756012f,0.6050811810418963432312f,0.2953875153325498104095f,\ +0.6451294776052236557007f,0.9449766655452549457550f,0.5638650292530655860901f,\ +0.9786348040215671062469f,0.9345349706709384918213f,0.1023264364339411258698f,\ +0.7292392617091536521912f,0.8353224000893533229828f,0.9328642506152391433716f,\ +0.0507844281382858753204f,0.1677279071882367134094f,0.9475936102680861949921f,\ +0.9390441477298736572266f,0.1270067342557013034821f,0.6562355486676096916199f,\ +0.7192088677547872066498f,0.5519206207245588302612f,0.7606899146921932697296f,\ +0.8840736905112862586975f,0.6386072556488215923309f,0.2424023114144802093506f,\ +0.7679059565998613834381f,0.2624090006574988365173f,0.1259524053893983364105f,\ +0.4549009744077920913696f,0.2127966103143990039825f,0.0598834278061985969543f,\ +0.8079127701930701732635f,0.7068187817931175231934f,0.9313771002925932407379f,\ +0.0831561936065554618835f,0.0639262734912335872650f} + +#define RESULT {2.3971700177038997026102f,2.0241173275316319823958f,2.4434596929789558217294f,\ +1.2727096230040590985055f,5.7594787634974791146192f,1.0816656533775219628524f,\ +1.3880228773309635226241f,3.5929894899598955326780f,6.3560857138200033134012f,\ +3.2991285007258008832309f,1.4185874159639277891642f,3.8767970491010381728358f,\ +1.7968397576993500042164f,9.9831591347336789965539f,4.3641301682226361080552f,\ +3.5536251298653307451048f,2.8886888633814562510338f,3.9201329280029257873252f,\ +4.506292282304419138939f,2.6111634148093250118450f,9.7952503109731186015097f,\ +2.3554725153952857930051f,5.0837291957799548569596f,3.7851800417010572630261f,\ +4.0023921772430028909184f,3.7282899025795783742865f,1.1349138714412994044523f,\ +1.3200350064956956064322f,1.033622723333016191205f,1.0611948240957502775927f,\ +6.9362522133054556050524f,2.7427628125876060138921f,2.9129978203666571090480f,\ +2.6287097779191044288893f,6.3440332316119087963102f,3.3331803790647938079417f,\ +3.232303288716906752853f,2.8392132821292248578970f,6.0503685885843978553567f,\ +5.97801550527315583849f,1.1132838793654469267125f,3.245881561190152808649f,\ +5.6261355226100322468596f,4.879360051235307693673f,1.0393830059871540516525f,\ +8.600844382521195541358f,3.6390362044693791432337f,1.6618227902609816748480f,\ +5.8190766171103653903174f,3.0317800975513509165182f,1.4317874896288145247780f,\ +1.7684883582783652578030f,3.3239379437878064926792f,1.2037132434952326764943f,\ +2.7602074516612016275019f,7.7838303437469935630588f,9.5073412259646765676280f,\ +2.876135722709581621359f,3.5566735327883938211357f,1.2476595365735951848052f,\ +2.6283216080771176770270f,5.626724486525223944966f,5.2700527142503661437445f,\ +1.947843685866482488223f,2.4591014722412456450229f,4.6629613384726322777851f,\ +3.0744375934314547293980f,2.941691847776138235560f,2.2712495380631962937912f,\ +2.2091873443061853521385f,2.6627523904580243652163f,3.620810677149941980701f,\ +2.1403583776871992760960f,2.60459578833533411668f,1.44405011565138674534f,\ +2.4451768086326421958177f,8.7406971172900771449576f,2.9668660249388048022468f,\ +7.1345282822869320327186f,1.3206079780376647203610f,7.9421501528532889579992f,\ +2.7446705104699793409395f,7.899610206034289205945f,3.0982115292188217026137f,\ +2.188878814912672332582f,9.9223686842029490406958f,1.050847236808647444661f,\ +4.8717958623764170411619f,1.0103978539346472054206f,4.3630024226971446665857f,\ +3.4802846963616036468636f,1.6778955425132806578148f,5.4500504945081766905446f,\ +2.8160246398239912046790f,9.2856819400663770380788f,4.4555982016116564281560f,\ +1.7966632806306144232167f,1.5573904303972738727424f,4.8545528865355054293218f,\ +2.6493880955344351058045f,4.7145924820058668913703f,6.715365764647851953839f,\ +8.6313869205483300106607f,6.8017741785747647398352f,5.5268535777229557126589f,\ +1.0458370517364794505255f,6.3329081834648581761371f,1.8007521573290650174215f,\ +1.8569959706339840277423f,5.6996616704912836937069f,2.7211906353565828986518f,\ +4.39133583975054442305f,4.9634860523035060353436f,4.4664003219774368602657f,\ +1.6994915629457518768675f,3.5517043359266669000363f,2.0132592604656482926373f,\ +1.089188511318553986840f,1.4804307775633922528158f,3.7142285642082217833604f,\ +1.0084192481976341770888f,2.8129026699324310989425f,1.142039354028792752516f,\ +3.1304416262076188992580f,1.5448749964710146720392f,3.6654143041103313116480f,\ +7.181596810407055997416f,1.200815897009761545888f,4.1650466551411478022260f,\ +1.6753440162955879344509f,7.21455374553604489307f,5.1458272136838258958846f,\ +6.3475007446385660614396f,4.1241309049764449667919f,7.8671666160643907161898f,\ +7.450340721306332625318f,6.9020291813359317956156f,1.5999099356849897368704f,\ +2.0732602743658210542321f,5.0197555099972408498843f,1.6117976431404783532741f,\ +3.3285498202301311287954f,8.7426299668587681424015f,3.3201701404059416056214f,\ +2.824777184045289768477f,2.4895983330428896884712f,5.297695284941288385028f,\ +4.7033315715610184426509f,1.7322660897889763376156f,5.1580335293393115847493f,\ +2.1313235787699511547544f,3.0463297621649392254994f,5.8381695091926415486228f,\ +2.0672068075526839336931f,2.2335658257207593457849f,5.5129217858217156589262f,\ +9.3383940240121710019139f,1.3416865210022335119788f,2.414828068089148516151f,\ +3.0778521213560718905455f,3.3051788871815572790069f,1.2322124790790967008292f,\ +4.8238050773970124751600f,3.1785365175695079464901f,1.1325135056912927211670f,\ +1.038469874168215900667f,4.0279231974946911876145f,1.97418348876764548905f,\ +4.4170211379151878006155f,8.8100153590470213771368f,3.663237102755284801958f,\ +9.5199529943728755654320f,8.6007231965720354338600f,1.2656873409568392130353f,\ +5.3609192017188229684166f,6.8441954007674699056452f,8.5676999890922083125133f,\ +1.1240468894427289026083f,1.471390362736320067683f,8.8632624680127776173322f,\ +8.690487669968261386089f,1.3396974608773437598330f,4.5314328497492990521778f,\ +5.2385231533328031616747f,3.5638598811998751791918f,5.7635480038278910086547f,\ +7.6572652334911666116568f,4.351182064426246220989f,1.7474401555184173595592f,\ +5.8601125417902917291713f,1.8298226565740485227707f,1.336449046213224356450f,\ +2.8503682671020214023372f,1.6322873327021125700043f,1.1478454784492588824918f,\ +6.4255864384701686375934f,5.0911838672535516536755f,8.538411872415464287656f,\ +1.211033602346728965671f,1.1585806569998515769271f} + +#define CSOURCER {0.0521394181996583938599f,0.4229906541295349597931f,0.9028727160766720771790f,\ +0.270216043572872877121f,0.4369520992040634155273f,0.0152578153647482395172f,\ +0.6548111913725733757019f,0.0449309810064733028412f,0.2133925389498472213745f,\ +0.5342523609288036823273f,0.7069207737222313880920f,0.2409008811227977275848f,\ +0.2901745550334453582764f,0.7550916881300508975983f,0.2289740880951285362244f,\ +0.4858699417673051357269f,0.6168978903442621231079f,0.8581895199604332447052f,\ +0.9484143527224659919739f,0.2478762450627982616425f,0.3616605177521705627441f,\ +0.4686846160329878330231f,0.0340223712846636772156f,0.5221414058469235897064f,\ +0.3054678197950124740601f,0.2017288585193455219269f,0.4932554000988602638245f,\ +0.3831945951096713542938f,0.9221886433660984039307f,0.8073847130872309207916f,\ +0.3020078903064131736755f,0.2459809384308755397797f,0.1128082294017076492310f,\ +0.5088820648379623889923f,0.9855441050603985786438f,0.1797042894177138805389f,\ +0.0627280175685882568359f,0.6279844292439520359039f,0.8693526117131114006042f,\ +0.1181543781422078609467f,0.1908623259514570236206f,0.0912145380862057209015f,\ +0.7186726490035653114319f,0.310268334578722715378f,0.6592819057404994964600f,\ +0.9106893003918230533600f,0.9854423692449927330017f,0.8546765870414674282074f,\ +0.4121543709188699722290f,0.2333141383714973926544f,0.3814189555123448371887f,\ +0.6619831356219947338104f,0.212731502950191497803f,0.0520866983570158481598f,\ +0.9962206138297915458679f,0.6885302006267011165619f,0.6471334304660558700562f,\ +0.1732599367387592792511f,0.6790404403582215309143f,0.7853972460143268108368f,\ +0.5636796839535236358643f,0.5331145809032022953033f,0.9027821635827422142029f,\ +0.0063843778334558010101f,0.9165171254426240921021f,0.4580909651704132556915f,\ +0.8293677615001797676086f,0.7187301176600158214569f,0.4822947531938552856445f,\ +0.9620302417315542697906f,0.7949669538065791130066f,0.3603135510347783565521f,\ +0.4186353813856840133667f,0.6742749665863811969757f,0.9338985690847039222717f,\ +0.18709085090085864067f,0.1331541948020458221436f,0.4923790604807436466217f,\ +0.1599537869915366172791f,0.8545161760412156581879f,0.4317741785198450088501f,\ +0.5531771448440849781036f,0.2238912554457783699036f,0.1766969445161521434784f,\ +0.4150884225964546203613f,0.6159632527269423007965f,0.0658540828153491020203f,\ +0.9070334821008145809174f,0.0915193017572164535522f,0.4515289147384464740753f,\ +0.1814587051048874855042f,0.8840930457226932048798f,0.1760245300829410552979f,\ +0.3308106199838221073151f,0.2203056281432509422302f,0.3864682218991219997406f,\ +0.0431000906974077224731f,0.2068966520018875598907f,0.5356620447710156440735f,\ +0.0403697001747786998749f,0.3028300404548645019531f,0.6841432997025549411774f,\ +0.9040663270279765129089f,0.1237034215591847896576f,0.9687331896275281906128f,\ +0.3681504433043301105499f,0.1336043933406472206116f,0.6103821019642055034637f,\ +0.6861566565930843353271f,0.6903465152718126773834f,0.779607950709760189056f,\ +0.7986211306415498256683f,0.9899662975221872329712f,0.8009328362531960010529f,\ +0.6865246118977665901184f,0.8669688436202704906464f,0.0602840110659599304199f,\ +0.6239373260177671909332f,0.5747098876163363456726f,0.2018211721442639827728f,\ +0.9450219180434942245483f,0.6681275893934071063995f,0.3908910537138581275940f,\ +0.8401706661097705364227f,0.7179634161293506622314f,0.6875333772040903568268f,\ +0.6410528933629393577576f,0.8713398925028741359711f,0.5411411095410585403442f,\ +0.7853284222073853015900f,0.4244953142479062080383f,0.1414492088370025157928f,\ +0.1002616137266159057617f,0.0548216500319540500641f,0.3878128407523036003113f,\ +0.1043689115904271602631f,0.3819272350519895553589f,0.3513077651150524616241f,\ +0.3175459811463952064514f,0.1629057596437633037567f,0.2614045254886150360107f,\ +0.2885272116400301456451f,0.5902544697746634483337f,0.3439738727174699306488f,\ +0.8696897123008966445923f,0.0534855094738304615021f,0.1987623842433094978333f,\ +0.6515000048093497753143f,0.2086210027337074279785f,0.1333819651044905185699f,\ +0.5733251376077532768250f,0.9408131926320493221283f,0.9827877636998891830444f,\ +0.5483977575786411762238f,0.9164683455601334571838f,0.6582687790505588054657f,\ +0.1169865764677524566650f,0.6840933994390070438385f,0.2702485686168074607849f,\ +0.2898568115197122097015f,0.9279741663485765457153f,0.3171655726619064807892f,\ +0.0346859293058514595032f,0.8625448155216872692f,0.4192672073841094970703f,\ +0.9283133395947515964508f,0.1561186043545603752136f,0.3421049430035054683685f,\ +0.6677390020340681076050f,0.8959637288935482501984f,0.7042291918769478797913f,\ +0.2711754958145320415497f,0.7707630358636379241943f,0.6646066964603960514069f,\ +0.0564929535612463951111f,0.4913068241439759731293f,0.3226534072309732437134f,\ +0.4814894613809883594513f,0.4087979318574070930481f,0.2927415999583899974823f,\ +0.8891521319746971130371f,0.7954202168621122837067f,0.8309869421645998954773f,\ +0.8356794654391705989838f,0.4487133231014013290405f,0.9114312161691486835480f,\ +0.5860714400187134742737f,0.186776056420058012009f,0.2693342454731464385986f,\ +0.9950512335635721683502f,0.9318672632798552513123f,0.8146264008246362209320f,\ +0.1896832454949617385864f,0.0199374002404510974884f,0.1238022493198513984680f,\ +0.8879826921038329601288f,0.7732745558023452758789f,0.7526164152659475803375f,\ +0.8376457272097468376160f,0.2204564376734197139740f} + +#define CSOURCEI {0.3044399749487638473511f,0.3680851315148174762726f,0.7309098849073052406311f,\ +0.2054549823515117168427f,0.0948474220931529998779f,0.7900205166079103946686f,\ +0.3616730114445090293884f,0.5851024067960679531097f,0.0693163666874170303345f,\ +0.3493489888496696949005f,0.1835746141150593757629f,0.3968948009423911571503f,\ +0.0996801331639289855957f,0.8549251281656324863434f,0.8357324106618762016296f,\ +0.9418399124406278133392f,0.0554450806230306625366f,0.6700697620399296283722f,\ +0.4463311964645981788635f,0.1178311700932681560516f,0.0399966575205326080322f,\ +0.8887174264527857303619f,0.1686335867270827293396f,0.9620060822926461696625f,\ +0.781102331355214118958f,0.2049232018180191516876f,0.6681626336649060249329f,\ +0.7458390104584395885468f,0.6444613933563232421875f,0.5694789239205420017242f,\ +0.7798063186928629875183f,0.4667183174751698970795f,0.2390516381710767745972f,\ +0.2273887698538601398468f,0.0535939196124672889709f,0.0797578911297023296356f,\ +0.0830229185521602630615f,0.2299542189575731754303f,0.4078942527994513511658f,\ +0.3135930425487458705902f,0.2988875750452280044556f,0.0152183887548744678497f,\ +0.6087857903912663459778f,0.4139107796363532543182f,0.8067577406764030456543f,\ +0.1505197458900511264801f,0.7943486524745821952820f,0.6584644555114209651947f,\ +0.9843795206397771835327f,0.8309051920659840106964f,0.7626284742727875709534f,\ +0.9873227919451892375946f,0.2627140469849109649658f,0.2271525249816477298737f,\ +0.242022148333489894867f,0.5921032777987420558929f,0.6258154083043336868286f,\ +0.2771522742696106433868f,0.8628354417160153388977f,0.8079399424605071544647f,\ +0.4837554544210433959961f,0.0143989124335348606110f,0.0487624881789088249207f,\ +0.1519355042837560176849f,0.8873454760760068893433f,0.0273414407856762409210f,\ +0.5470371553674340248108f,0.8518478940241038799286f,0.5534047596156597137451f,\ +0.1433433503843843936920f,0.8160062870010733604431f,0.7087611532770097255707f,\ +0.6693260166794061660767f,0.9310019579716026782990f,0.9888748200610280036926f,\ +0.6374907079152762889862f,0.9456876888871192932129f,0.1145771169103682041168f,\ +0.6323727769777178764343f,0.7284730165265500545502f,0.8856631275266408920288f,\ +0.4942793031223118305206f,0.0190941328182816505432f,0.1748895938508212566376f,\ +0.7399766482412815093994f,0.4661670760251581668854f,0.1322575574740767478943f,\ +0.9087754092179238796234f,0.11615646071732044220f,0.7354039144702255725861f,\ +0.1216390328481793403625f,0.2898616599850356578827f,0.7108344733715057373047f,\ +0.3166244276799261569977f,0.4294263450428843498230f,0.6909029199741780757904f,\ +0.1338429730385541915894f,0.4151599411852657794952f,0.3047454515472054481506f,\ +0.323238662909716367722f,0.2928581796586513519287f,0.2828734577633440494537f,\ +0.9256087234243750572205f,0.1463391608558595180511f,0.3073406759649515151978f,\ +0.6423539933748543262482f,0.8470350624993443489075f,0.2050857576541602611542f,\ +0.4205227121710777282715f,0.7732202881015837192535f,0.9940918935462832450867f,\ +0.2385355173610150814056f,0.87819238565862178802f,0.8542838920839130878448f,\ +0.9186090314760804176331f,0.9039202476851642131805f,0.2430246956646442413330f,\ +0.6553216264583170413971f,0.5383144235238432884216f,0.4596298984251916408539f,\ +0.1132094729691743850708f,0.1722074192948639392853f,0.0771417664363980293274f,\ +0.2509303349070250988007f,0.7141261845827102661133f,0.2991535165347158908844f,\ +0.4254599986597895622253f,0.8421654864214360714f,0.3318156134337186813354f,\ +0.1318110679276287555695f,0.6389746675267815589905f,0.1391938696615397930145f,\ +0.0569984130561351776123f,0.9949800879694521427155f,0.7950511714443564414978f,\ +0.3458094871602952480316f,0.8083905372768640518188f,0.7886787918396294116974f,\ +0.9252098770812153816223f,0.0978971007280051708221f,0.1040655449032783508301f,\ +0.7463223063386976718903f,0.2425431115552783012390f,0.6190718798898160457611f,\ +0.5496137794107198715210f,0.1987607558257877826691f,0.3828040296211838722229f,\ +0.2415534253232181072235f,0.5118484236299991607666f,0.4379267231561243534088f,\ +0.8779173558577895164490f,0.1360241672955453395844f,0.9468084294348955154419f,\ +0.2738420856185257434845f,0.5806620018556714057922f,0.5942221391014754772186f,\ +0.8508083224296569824219f,0.378734225872904062271f,0.2592755584046244621277f,\ +0.7080181255005300045013f,0.3032848816365003585815f,0.0120116178877651691437f,\ +0.0807306626811623573303f,0.7887271861545741558075f,0.5701906941831111907959f,\ +0.2198487878777086734772f,0.2014332404360175132751f,0.3704045540653169155121f,\ +0.2366845849901437759399f,0.103130650240927934647f,0.1840926231816411018372f,\ +0.1408759090118110179901f,0.8378689214587211608887f,0.2475062184967100620270f,\ +0.4595135403797030448914f,0.6442520259879529476166f,0.9563237931579351425171f,\ +0.9093016912229359149933f,0.552059986628592014313f,0.0986777986399829387665f,\ +0.2551880665123462677002f,0.0510429129935801029205f,0.287540963850915431976f,\ +0.1730656377039849758148f,0.4155373144894838333130f,0.8203372103162109851837f,\ +0.7022680984809994697571f,0.0665632444433867931366f,0.4468086212873458862305f,\ +0.5658646025694906711578f,0.8720351336523890495300f,0.7345057590864598751068f,\ +0.3390222620218992233276f,0.9842283879406750202179f,0.3797692963853478431702f,\ +0.6046022842638194561005f,0.5255502574145793914795f,0.4914151043631136417389f,\ +0.6406045397743582725525f,0.6271067834459245204926f} + +#define CRESULTR {0.8616789149319691309969f,1.7528026973616770423092f,-0.8951576871785223987743f,\ +1.65839939772781952421f,2.670002318435218402470f,-0.2545370391954314692740f,\ +3.0388538062879217882539f,0.2458549627872582132859f,1.613753544958956620547f,\ +2.373140931257777808128f,4.6441801233654604885714f,1.0634345748771927286924f,\ +1.8994737292284431529055f,-2.2038440203063891509316f,-0.5865941523645769040129f,\ +-1.7230123422001577537799f,4.1053385752577806755426f,0.2012772387479372093733f,\ +4.5889850773872540301568f,1.7048706561180972940406f,2.2898980543543361321213f,\ +-1.3470616397449584056289f,1.000979918376255772827f,-1.998745505240199671348f,\ +-0.4562266859878671976247f,1.4173389563254865652908f,0.1005345377926576272420f,\ +-0.3529055360142766550879f,0.7252834368660135977436f,1.6469252220572825340383f,\ +-0.4467771279955162211373f,0.8387209999987794706300f,1.1050928340202259558822f,\ +2.7952258554924300781863f,9.5990623048041356923932f,1.4870960004060611581167f,\ +1.1343408485170072275139f,3.664612325782657276108f,4.3703600670610898148993f,\ +0.9850722877732481785884f,1.1986551091809227731488f,1.2329567566066641504108f,\ +0.8800935914266996284994f,1.1832797973754654030643f,-1.2910350436339537161246f,\ +7.6571266019263468649569f,-2.4697863053099986530015f,0.3907140975028082774401f,\ +-1.655858606271026545187f,-0.5746050598208488624508f,-0.4432229757632685229751f,\ +-2.9672355970693655713433f,1.3424314109887605095395f,0.9766924789772336579219f,\ +8.4134496859782270661299f,1.0052614992336186272581f,0.5743785834192948192012f,\ +1.1969550027714319639927f,-1.929705102086765711178f,-1.7419725915375741109870f,\ +1.6154412531361730387403f,3.4109538321538344085582f,7.9439933441705683492273f,\ +0.9533381558732610949747f,-3.7544424962625675412653f,2.8656935239804841586420f,\ +2.0671417342103679537502f,-1.992605711686495695290f,0.8871291147322790671126f,\ +8.6682584526683399417379f,-1.8914875129526329544660f,-0.1401839917101320720505f,\ +0.0776428549278006530088f,-2.560598020200964608506f,-5.5730608716054170770349f,\ +0.1580601872370170912774f,-0.7747638844786981504598f,2.9997587850927698305270f,\ +0.1654170760372596638010f,-0.7609360918468449641594f,-1.2203777718239325889016f,\ +1.4986628046871217634362f,1.6729053694884241654250f,1.381936351079181113377f,\ +-0.3450348611667466425246f,1.9706824980594530583033f,1.1101876800122791877357f,\ +-4.0234586128898426338196f,1.1906849924222373537930f,-0.3456983902450189716227f,\ +1.459474884821820195313f,6.0143936939361175575414f,-0.0988538832443286719087f,\ +1.597480633260187854461f,0.9129179205342567993142f,-0.0488550375477847867445f,\ +1.0523032581716083022627f,0.9288642069528815214952f,2.6218635570145862878633f,\ +0.8072263924219229558332f,1.5687383989731884526009f,3.842899231404802939949f,\ +-4.2624261266025849081984f,1.2547786671163203564561f,7.0708952400269708959968f,\ +0.2138025786160810681746f,-0.5039897261739162415140f,3.6311482225254705369366f,\ +2.7511697563589119219785f,-1.0199337285771719052718f,-3.9613785741953506658319f,\ +5.3644844232216355450760f,-4.261894060044243204288f,-2.440577323716713653567f,\ +-2.5162841502447741426352f,-3.5973154891472156613474f,0.9736685483701841281601f,\ +0.2600685777468328963025f,1.2216142738714919069309f,0.7803738463829824612006f,\ +8.5132680918277277015704f,4.2958732896863782713126f,2.4210488328114880829389f,\ +5.79755622526757630197f,-0.3837915438103189358365f,3.75964173341358565139f,\ +2.4386368546342671592697f,-2.6776116153796971630641f,2.5102046010802867570533f,\ +5.821177306248865868099f,0.2640059162189042352153f,1.31446884371506267364f,\ +1.2488505950260830879017f,-0.7482976046844636019983f,-0.6275966789165404735584f,\ +0.8893791469828959961319f,-0.6903683581860716733658f,-0.5450973252013330272447f,\ +-1.1028092549899868313190f,1.4183297900536229185775f,1.773434980128008042755f,\ +-0.2859252183654940604463f,3.3012839410905678860786f,0.3197431184385559066463f,\ +2.2263782918939738487f,1.0146592610810074575056f,1.0051892636742449926857f,\ +3.8066700246852320788093f,0.6179593115281443171938f,0.7249522760637888696422f,\ +-1.6307732738859830323719f,8.3014440376437921287334f,-5.5006403965152692592255f,\ +2.8552972304138433123910f,1.9111692714948702587208f,0.9158531650125845136046f,\ +-0.4956155140563224259509f,3.1079184772588979157604f,1.5408715933614589577161f,\ +-0.1158617194706384467828f,6.4886221326459514457952f,2.0749108619541400955200f,\ +1.0644832532013759340828f,-1.769719547358157507588f,0.6696790607045245424800f,\ +7.4150575771959807980238f,1.2812290258043323998294f,1.4461251309266722753222f,\ +3.9789946052408695642555f,7.6489498856535602655526f,4.6130068144799594165306f,\ +1.7697609579312818528507f,-2.069533011859056692572f,3.8895055335340873448047f,\ +0.5587033140125831076617f,0.2704103697575463982616f,-1.2405136002402707973147f,\ +-1.5134557095053997599621f,0.7566012248243810800474f,1.9117596963451992664318f,\ +6.447932326957059423478f,6.2003146906774571078813f,5.344469754581457898723f,\ +6.3131049040564706231748f,1.6189521464425622454542f,-2.550619599252561098268f,\ +-0.1781945407584817342439f,1.5193399835582135359857f,0.9590574537903557850171f,\ +2.6165522176992435099407f,-3.6188103766399173366608f,-0.7842216609502735691350f,\ +1.0995885822264845899099f,-0.6708497380942372023682f,0.8529889923514888394607f,\ +1.3729938244229744626068f,2.0937757207972880202362f,2.4059764571152468803916f,\ +0.6578397026948303860650f,0.2101416292188336421010f} + +#define CRESULTI {0.7272548245748866602156f,1.9854303798419310478351f,7.9457339679995211412233f,\ +0.8488412125630352411676f,0.5925642663233093854203f,1.0039936024574043216262f,\ +3.3414071705695578273776f,1.081403318108233868600f,0.2597757190370896807075f,\ +2.4651157060741901716483f,2.0890001084665330566281f,1.3789900497554921088295f,\ +0.4437915251064282751159f,5.2455794258294652365748f,1.5894481231762551676212f,\ +2.5300661616939024156636f,0.5269825145414556155643f,7.2114139192406465639351f,\ +7.6023759189514121814568f,0.474253708603649237752f,0.2114880398457448518190f,\ +2.615809838094426353905f,0.40946194724304191270f,2.660538085383924222782f,\ +1.96836124960102032411f,0.7232671662286862535041f,3.111923291962274351619f,\ +2.3906358097335185242116f,8.3281383621146503060118f,6.2028635418634419096406f,\ +1.9540840065283944237962f,1.5494625392422922693925f,0.678202414336372183534f,\ +1.6137618479690827300033f,1.1906180579664376040228f,0.2762165158082148241903f,\ +0.2195296884715036700442f,2.1446447456633843664520f,5.9741482912408789829328f,\ +0.867597682821533044972f,0.9856997170507159067299f,0.0432225133986508733286f,\ +5.157507023966152459593f,1.6654420749486735786604f,4.3768952511866894283799f,\ +2.7654687058579336955688f,9.3496470896606780343063f,7.1454288620924977237792f,\ +1.9826603369952136013410f,1.6118978629668390123442f,2.3655185893491501580854f,\ +3.5043054723514432957643f,0.9281385166491339377970f,0.5631636514321668451899f,\ +5.2429430139302253266465f,4.7766052326802679317552f,4.4001190809809767046090f,\ +0.8877792684794596489439f,4.368513033448009785786f,5.8469722698220429890625f,\ +3.2860624631665138473124f,0.1131306785331901154645f,0.8957170057781025374055f,\ +0.3478275260751592101727f,7.3475483360254925102595f,0.1806513152317329173879f,\ +6.4267295981620362610442f,4.8385133662587431757629f,2.9034462647978491744993f,\ +2.9696777404396668131881f,5.9431363200854443462617f,2.288232180725223052775f,\ +2.6208664370161969259243f,3.9693733894002809492463f,6.5342907486237020719955f,\ +1.5303355006050158859665f,1.1162736854609731640409f,0.8102944693911555695820f,\ +1.4357885386399356075771f,7.1128736564949752718690f,2.4113210957685655699834f,\ +3.2448135685253003401840f,0.0735981604163226527104f,0.5886735706121437594618f,\ +2.5776994154551164939448f,3.629648394334391792171f,0.3489446690644626425382f,\ +6.9989048057282028381110f,0.3262782224609265258053f,2.8071160078618211386470f,\ +0.4198114062820728631387f,4.7398318369933782889802f,1.4965081339145251959621f,\ +1.4268961804460684739126f,1.3873315379595159146930f,2.4343374430326063517782f,\ +0.3349767990169579268134f,1.3153540511429153703205f,2.2160059373349834110911f,\ +0.7434370339011254769090f,1.253936082334201174149f,2.929523877257661279572f,\ +6.7911802335851190193239f,0.4395719515095502516466f,6.0491461603781946365643f,\ +2.324454495134102849363f,1.263389181071626898856f,1.8546860110985297076525f,\ +3.9998192433092101261f,4.7944107664763828680066f,4.5331878790851858340716f,\ +3.2834478309428574149820f,8.7932187934310537258398f,5.8331542843869588210737f,\ +4.1564133542481211947006f,6.4227435117275550879867f,0.6098783468239901139896f,\ +4.1986123528738117371972f,3.5516439676096513977654f,1.3871043178012487651074f,\ +2.2708618645232787613963f,1.7986812579372670750644f,0.4346204841779990335482f,\ +3.7800771946382365484851f,5.2094034804655127146589f,3.0955575196143279015359f,\ +3.6332179827516117853747f,6.9371912371180162182327f,2.4051741186173338782339f,\ +1.8230887730163647386661f,2.6444893659134645069742f,0.4363389413001144689908f,\ +0.1648513733929060642858f,0.8527852017899220093966f,2.3603668450398678224644f,\ +0.9089049761135811200674f,2.308482167770112614136f,2.1783058145209865941183f,\ +1.760657933306752465086f,0.3252423522775149677955f,0.4332745364849133751228f,\ +1.922093093505325978043f,2.0627370874500741138036f,2.184596685297794049774f,\ +7.065327858525169979487f,0.4997624596555385045882f,1.2195103000378291202566f,\ +2.3664724579469695875389f,1.4939021538810592915070f,1.1500903795661745476764f,\ +3.3700776947908237524132f,2.6885676432811540514933f,7.8817788746511769915060f,\ +2.0842223123540501994455f,8.0258609977666459656120f,4.459626216287859712395f,\ +1.211699888667206126414f,3.6993867326108555992903f,1.0474037470444790276503f,\ +1.9457553430070655409168f,5.4468957190088280739815f,0.0574020495019843535189f,\ +0.200187099983916316770f,7.068768975957844702407f,2.5390022146337085651169f,\ +4.1109611351982495719426f,0.6408861046921948689814f,1.6557914176531909333789f,\ +2.4121782951381569581883f,1.8513041911556680219064f,2.0815970551782250197448f,\ +0.5950929849744456268112f,5.5238367721873160576251f,2.4925246722707656843454f,\ +0.9924655082402137340480f,3.0877905115051524909120f,1.6970418763867407552226f,\ +2.6253251426459978112860f,2.4490847102298514137431f,0.4420113886405674930025f,\ +4.2948005817238108505762f,0.7321010758042626465070f,4.1657752085548631626466f,\ +2.6579704039050806585465f,2.2968127063505034968216f,7.7460044759776618406022f,\ +3.851297516891551087070f,0.2347062006554227753252f,1.5927846479405329827017f,\ +9.5341720234343370066199f,7.7442521101341821321284f,6.478396320140080710814f,\ +1.0891470158039435744968f,0.8038176255057727370712f,1.0202487324661473344634f,\ +7.6035293179001266494765f,5.5512724543076572558675f,5.1202912658114749788751f,\ +6.849389505178533177343f,1.6479880468591965314573f} + + + + +void sexp10sTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=sexp10s(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } +} + +void cexp10sTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=cexp10s(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<8e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void sexp10aTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + sexp10a(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void cexp10aTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + cexp10a(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<8e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testExp10(void) { + printf("\n>>>> Float 10-Base Exponential Tests\n"); + sexp10sTest(); + cexp10sTest(); + sexp10aTest(); + cexp10aTest(); + return 0; +} + +int main(void) { + assert(testExp10() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/zexp10a.c b/2.3-1/src/c/elementaryFunctions/exp10/zexp10a.c new file mode 100644 index 00000000..10413355 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/zexp10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" + +void zexp10a(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zexp10s(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/exp10/zexp10s.c b/2.3-1/src/c/elementaryFunctions/exp10/zexp10s.c new file mode 100644 index 00000000..6d1ebfd6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/exp10/zexp10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "exp10.h" +#include "pow.h" + +doubleComplex zexp10s(doubleComplex z) { + return zpows(DoubleComplex(10.0, 0.0), z); +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/Makefile.am b/2.3-1/src/c/elementaryFunctions/fix/Makefile.am new file mode 100644 index 00000000..a1d1cfdf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/Makefile.am @@ -0,0 +1,60 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libFix_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFix.la + +libFix_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/fix.h + +SRC = sfixs.c \ + dfixs.c \ + cfixs.c \ + zfixs.c \ + sfixa.c \ + dfixa.c \ + cfixa.c \ + zfixa.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatFix testDoubleFix + +TESTS = testFloatFix testDoubleFix + +# +# -*- Fix Tests -*- +# +testFloatFix_SOURCES = testFloatFix.c +testFloatFix_CFLAGS = $(check_INCLUDES) +testFloatFix_LDADD = $(check_LDADD) + +testDoubleFix_SOURCES = testDoubleFix.c +testDoubleFix_CFLAGS = $(check_INCLUDES) +testDoubleFix_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/fix/Makefile.in b/2.3-1/src/c/elementaryFunctions/fix/Makefile.in new file mode 100644 index 00000000..49c3c5cd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/Makefile.in @@ -0,0 +1,788 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatFix$(EXEEXT) testDoubleFix$(EXEEXT) +TESTS = testFloatFix$(EXEEXT) testDoubleFix$(EXEEXT) +subdir = src/c/elementaryFunctions/fix +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFix_la_LIBADD = +am__objects_1 = +am__objects_2 = libFix_la-sfixs.lo libFix_la-dfixs.lo \ + libFix_la-cfixs.lo libFix_la-zfixs.lo libFix_la-sfixa.lo \ + libFix_la-dfixa.lo libFix_la-cfixa.lo libFix_la-zfixa.lo +am_libFix_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libFix_la_OBJECTS = $(am_libFix_la_OBJECTS) +libFix_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libFix_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleFix_OBJECTS = testDoubleFix-testDoubleFix.$(OBJEXT) +testDoubleFix_OBJECTS = $(am_testDoubleFix_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la +testDoubleFix_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleFix_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleFix_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatFix_OBJECTS = testFloatFix-testFloatFix.$(OBJEXT) +testFloatFix_OBJECTS = $(am_testFloatFix_OBJECTS) +testFloatFix_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatFix_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatFix_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFix_la_SOURCES) $(testDoubleFix_SOURCES) \ + $(testFloatFix_SOURCES) +DIST_SOURCES = $(libFix_la_SOURCES) $(testDoubleFix_SOURCES) \ + $(testFloatFix_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libFix_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFix.la +libFix_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/fix.h +SRC = sfixs.c \ + dfixs.c \ + cfixs.c \ + zfixs.c \ + sfixa.c \ + dfixa.c \ + cfixa.c \ + zfixa.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la \ + @LIBMATH@ + + +# +# -*- Fix Tests -*- +# +testFloatFix_SOURCES = testFloatFix.c +testFloatFix_CFLAGS = $(check_INCLUDES) +testFloatFix_LDADD = $(check_LDADD) +testDoubleFix_SOURCES = testDoubleFix.c +testDoubleFix_CFLAGS = $(check_INCLUDES) +testDoubleFix_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/fix/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/fix/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFix.la: $(libFix_la_OBJECTS) $(libFix_la_DEPENDENCIES) + $(libFix_la_LINK) -rpath $(pkglibdir) $(libFix_la_OBJECTS) $(libFix_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleFix$(EXEEXT): $(testDoubleFix_OBJECTS) $(testDoubleFix_DEPENDENCIES) + @rm -f testDoubleFix$(EXEEXT) + $(testDoubleFix_LINK) $(testDoubleFix_OBJECTS) $(testDoubleFix_LDADD) $(LIBS) +testFloatFix$(EXEEXT): $(testFloatFix_OBJECTS) $(testFloatFix_DEPENDENCIES) + @rm -f testFloatFix$(EXEEXT) + $(testFloatFix_LINK) $(testFloatFix_OBJECTS) $(testFloatFix_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-cfixa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-cfixs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-dfixa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-dfixs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-sfixa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-sfixs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-zfixa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFix_la-zfixs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleFix-testDoubleFix.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatFix-testFloatFix.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libFix_la-sfixs.lo: sfixs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-sfixs.lo -MD -MP -MF $(DEPDIR)/libFix_la-sfixs.Tpo -c -o libFix_la-sfixs.lo `test -f 'sfixs.c' || echo '$(srcdir)/'`sfixs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-sfixs.Tpo $(DEPDIR)/libFix_la-sfixs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfixs.c' object='libFix_la-sfixs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-sfixs.lo `test -f 'sfixs.c' || echo '$(srcdir)/'`sfixs.c + +libFix_la-dfixs.lo: dfixs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-dfixs.lo -MD -MP -MF $(DEPDIR)/libFix_la-dfixs.Tpo -c -o libFix_la-dfixs.lo `test -f 'dfixs.c' || echo '$(srcdir)/'`dfixs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-dfixs.Tpo $(DEPDIR)/libFix_la-dfixs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfixs.c' object='libFix_la-dfixs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-dfixs.lo `test -f 'dfixs.c' || echo '$(srcdir)/'`dfixs.c + +libFix_la-cfixs.lo: cfixs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-cfixs.lo -MD -MP -MF $(DEPDIR)/libFix_la-cfixs.Tpo -c -o libFix_la-cfixs.lo `test -f 'cfixs.c' || echo '$(srcdir)/'`cfixs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-cfixs.Tpo $(DEPDIR)/libFix_la-cfixs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfixs.c' object='libFix_la-cfixs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-cfixs.lo `test -f 'cfixs.c' || echo '$(srcdir)/'`cfixs.c + +libFix_la-zfixs.lo: zfixs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-zfixs.lo -MD -MP -MF $(DEPDIR)/libFix_la-zfixs.Tpo -c -o libFix_la-zfixs.lo `test -f 'zfixs.c' || echo '$(srcdir)/'`zfixs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-zfixs.Tpo $(DEPDIR)/libFix_la-zfixs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfixs.c' object='libFix_la-zfixs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-zfixs.lo `test -f 'zfixs.c' || echo '$(srcdir)/'`zfixs.c + +libFix_la-sfixa.lo: sfixa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-sfixa.lo -MD -MP -MF $(DEPDIR)/libFix_la-sfixa.Tpo -c -o libFix_la-sfixa.lo `test -f 'sfixa.c' || echo '$(srcdir)/'`sfixa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-sfixa.Tpo $(DEPDIR)/libFix_la-sfixa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfixa.c' object='libFix_la-sfixa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-sfixa.lo `test -f 'sfixa.c' || echo '$(srcdir)/'`sfixa.c + +libFix_la-dfixa.lo: dfixa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-dfixa.lo -MD -MP -MF $(DEPDIR)/libFix_la-dfixa.Tpo -c -o libFix_la-dfixa.lo `test -f 'dfixa.c' || echo '$(srcdir)/'`dfixa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-dfixa.Tpo $(DEPDIR)/libFix_la-dfixa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfixa.c' object='libFix_la-dfixa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-dfixa.lo `test -f 'dfixa.c' || echo '$(srcdir)/'`dfixa.c + +libFix_la-cfixa.lo: cfixa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-cfixa.lo -MD -MP -MF $(DEPDIR)/libFix_la-cfixa.Tpo -c -o libFix_la-cfixa.lo `test -f 'cfixa.c' || echo '$(srcdir)/'`cfixa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-cfixa.Tpo $(DEPDIR)/libFix_la-cfixa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfixa.c' object='libFix_la-cfixa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-cfixa.lo `test -f 'cfixa.c' || echo '$(srcdir)/'`cfixa.c + +libFix_la-zfixa.lo: zfixa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -MT libFix_la-zfixa.lo -MD -MP -MF $(DEPDIR)/libFix_la-zfixa.Tpo -c -o libFix_la-zfixa.lo `test -f 'zfixa.c' || echo '$(srcdir)/'`zfixa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFix_la-zfixa.Tpo $(DEPDIR)/libFix_la-zfixa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfixa.c' object='libFix_la-zfixa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFix_la_CFLAGS) $(CFLAGS) -c -o libFix_la-zfixa.lo `test -f 'zfixa.c' || echo '$(srcdir)/'`zfixa.c + +testDoubleFix-testDoubleFix.o: testDoubleFix.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFix_CFLAGS) $(CFLAGS) -MT testDoubleFix-testDoubleFix.o -MD -MP -MF $(DEPDIR)/testDoubleFix-testDoubleFix.Tpo -c -o testDoubleFix-testDoubleFix.o `test -f 'testDoubleFix.c' || echo '$(srcdir)/'`testDoubleFix.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFix-testDoubleFix.Tpo $(DEPDIR)/testDoubleFix-testDoubleFix.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFix.c' object='testDoubleFix-testDoubleFix.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFix_CFLAGS) $(CFLAGS) -c -o testDoubleFix-testDoubleFix.o `test -f 'testDoubleFix.c' || echo '$(srcdir)/'`testDoubleFix.c + +testDoubleFix-testDoubleFix.obj: testDoubleFix.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFix_CFLAGS) $(CFLAGS) -MT testDoubleFix-testDoubleFix.obj -MD -MP -MF $(DEPDIR)/testDoubleFix-testDoubleFix.Tpo -c -o testDoubleFix-testDoubleFix.obj `if test -f 'testDoubleFix.c'; then $(CYGPATH_W) 'testDoubleFix.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFix.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFix-testDoubleFix.Tpo $(DEPDIR)/testDoubleFix-testDoubleFix.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFix.c' object='testDoubleFix-testDoubleFix.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFix_CFLAGS) $(CFLAGS) -c -o testDoubleFix-testDoubleFix.obj `if test -f 'testDoubleFix.c'; then $(CYGPATH_W) 'testDoubleFix.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFix.c'; fi` + +testFloatFix-testFloatFix.o: testFloatFix.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFix_CFLAGS) $(CFLAGS) -MT testFloatFix-testFloatFix.o -MD -MP -MF $(DEPDIR)/testFloatFix-testFloatFix.Tpo -c -o testFloatFix-testFloatFix.o `test -f 'testFloatFix.c' || echo '$(srcdir)/'`testFloatFix.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFix-testFloatFix.Tpo $(DEPDIR)/testFloatFix-testFloatFix.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFix.c' object='testFloatFix-testFloatFix.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFix_CFLAGS) $(CFLAGS) -c -o testFloatFix-testFloatFix.o `test -f 'testFloatFix.c' || echo '$(srcdir)/'`testFloatFix.c + +testFloatFix-testFloatFix.obj: testFloatFix.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFix_CFLAGS) $(CFLAGS) -MT testFloatFix-testFloatFix.obj -MD -MP -MF $(DEPDIR)/testFloatFix-testFloatFix.Tpo -c -o testFloatFix-testFloatFix.obj `if test -f 'testFloatFix.c'; then $(CYGPATH_W) 'testFloatFix.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFix.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFix-testFloatFix.Tpo $(DEPDIR)/testFloatFix-testFloatFix.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFix.c' object='testFloatFix-testFloatFix.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFix_CFLAGS) $(CFLAGS) -c -o testFloatFix-testFloatFix.obj `if test -f 'testFloatFix.c'; then $(CYGPATH_W) 'testFloatFix.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFix.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/fix/cfixa.c b/2.3-1/src/c/elementaryFunctions/fix/cfixa.c new file mode 100644 index 00000000..525d7393 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/cfixa.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fix.h" + +void cfixa(floatComplex* x, int size, floatComplex* out) { + int i = 0; + for (i=0;i +#include "fix.h" + +floatComplex cfixs(floatComplex x) { + float fixReal = 0, fixImag = 0; + + if (creals(x)>=0) fixReal = floorf(creals(x)); + else fixReal = ceilf(creals(x)); + + if (cimags(x)>=0) fixImag = floorf(cimags(x)); + else fixImag = ceilf(cimags(x)); + + return FloatComplex(fixReal, fixImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/dfixa.c b/2.3-1/src/c/elementaryFunctions/fix/dfixa.c new file mode 100644 index 00000000..4d000ca1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/dfixa.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fix.h" + +void dfixa(double* x, int size, double* out) { + int i = 0; + for (i=0;i +#include "fix.h" + +double dfixs(double x) { + if (x>=0) return floor(x); + else return ceil(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/sfixa.c b/2.3-1/src/c/elementaryFunctions/fix/sfixa.c new file mode 100644 index 00000000..4b27dae2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/sfixa.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fix.h" + +void sfixa(float* x, int size, float* out) { + int i = 0; + for (i=0;i +#include "fix.h" + +float sfixs(float x) { + if (x>=0) return floorf(x); + else return ceilf(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/testDoubleFix.c b/2.3-1/src/c/elementaryFunctions/fix/testDoubleFix.c new file mode 100644 index 00000000..2d7c6cb5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/testDoubleFix.c @@ -0,0 +1,150 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "fix.h" + +static void dfixsTest(void) { + assert ((fabs( dfixs(-2) - (-2))/fabs(dfixs(-2)))<1e-16); + assert ((fabs( dfixs(-1.9) - (-1))/fabs(dfixs(-1.9)))<1e-16); + assert ((fabs( dfixs(-1.8) - (-1))/fabs(dfixs(-1.8)))<1e-16); + assert ((fabs( dfixs(-1.7) - (-1))/fabs(dfixs(-1.7)))<1e-16); + assert ((fabs( dfixs(-1.6) - (-1))/fabs(dfixs(-1.6)))<1e-16); + assert ((fabs( dfixs(-1.5) - (-1))/fabs(dfixs(-1.5)))<1e-16); + assert ((fabs( dfixs(-1.4) - (-1))/fabs(dfixs(-1.4)))<1e-16); + assert ((fabs( dfixs(-1.3) - (-1))/fabs(dfixs(-1.3)))<1e-16); + assert ((fabs( dfixs(-1.2) - (-1))/fabs(dfixs(-1.2)))<1e-16); + assert ((fabs( dfixs(-1.1) - (-1))/fabs(dfixs(-1.1)))<1e-16); + assert ((fabs( dfixs(-1.0) - (-1))/fabs(dfixs(-1.0)))<1e-16); + assert (fabs( dfixs(-.9))<1e-16); + assert ((fabs( dfixs(1.0) - (1))/fabs(dfixs(1.0)))<1e-16); + assert ((fabs( dfixs(1.1) - (1))/fabs(dfixs(1.1)))<1e-16); + assert ((fabs( dfixs(1.2) - (1))/fabs(dfixs(1.2)))<1e-16); + assert ((fabs( dfixs(1.3) - (1))/fabs(dfixs(1.3)))<1e-16); + assert ((fabs( dfixs(1.4) - (1))/fabs(dfixs(1.4)))<1e-16); + assert ((fabs( dfixs(1.5) - (1))/fabs(dfixs(1.5)))<1e-16); + assert ((fabs( dfixs(1.6) - (1))/fabs(dfixs(1.6)))<1e-16); + assert ((fabs( dfixs(1.7) - (1))/fabs(dfixs(1.7)))<1e-16); + assert ((fabs( dfixs(1.8) - (1))/fabs(dfixs(1.8)))<1e-16); + assert ((fabs( dfixs(1.9) - (1))/fabs(dfixs(1.9)))<1e-16); + assert ((fabs( dfixs(2.0) - (2))/fabs(dfixs(2.0)))<1e-16); + +} + +static void zfixsTest(void) { + doubleComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=DoubleComplex(-2,1); + out = zfixs(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.9,1.1); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.8,1.2); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.7,1.3); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.6,1.4); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.5,1.5); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.6); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.3,1.7); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.2,1.8); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.1,1.9); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.0,2.0); + out = zfixs(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-.9,.9); + out = zfixs(in); + assert (fabs( zreals(out))<1e-16); + assert (fabs( zimags(out))<1e-16); +} + +static void dfixaTest(void) { + int i; + double in[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double res[10]={1,2,-2,-3,-4,6,4,4,0,0}; + double out[10]; + + dfixa(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert (fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); + +} + +static void zfixaTest(void) { + int i; + double inR[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double inI[10]={5.4,1.8,1.4,-4.0,-2.7,-0.3,1.5,1.4,7.3,-4.6}; + double resR[10]={1,2,-2,-3,-4,6,4,4,0,0}; + double resI[10]={5,1,1,-4,-2,0,1,1,7,-4}; + doubleComplex out[10],*in; + + in=DoubleComplexMatrix(inR,inI,10); + zfixa(in,10,out); + + for (i=0;i<10;i++){ + if (zreals(out[i])!=0) assert(fabs(zreals(out[i])-resR[i])/fabs(zreals(out[i])) <1e-16); + else assert(fabs(zreals(out[i])-resR[i]) <1e-16); + if (zimags(out[i])!=0) assert(fabs(zimags(out[i])-resI[i])/fabs(zimags(out[i])) <1e-16); + else assert(fabs(zimags(out[i])-resI[i]) <1e-16); + } + +} + + +static int testFix() { + printf("\n>>>> Double Fix Tests\n"); + dfixsTest(); + zfixsTest(); + dfixaTest(); + zfixaTest(); + + return 0; +} + +int main() { + assert(testFix() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/testFloatFix.c b/2.3-1/src/c/elementaryFunctions/fix/testFloatFix.c new file mode 100644 index 00000000..44d5596c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/testFloatFix.c @@ -0,0 +1,148 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "fix.h" + + +static void sfixsTest(void) { + assert ((fabs( sfixs(-2) - (-2))/fabs(sfixs(-2)))<1e-16); + assert ((fabs( sfixs(-1.9f) - (-1))/fabs(sfixs(-1.9f)))<1e-16); + assert ((fabs( sfixs(-1.8f) - (-1))/fabs(sfixs(-1.8f)))<1e-16); + assert ((fabs( sfixs(-1.7f) - (-1))/fabs(sfixs(-1.7f)))<1e-16); + assert ((fabs( sfixs(-1.6f) - (-1))/fabs(sfixs(-1.6f)))<1e-16); + assert ((fabs( sfixs(-1.5f) - (-1))/fabs(sfixs(-1.5f)))<1e-16); + assert ((fabs( sfixs(-1.4f) - (-1))/fabs(sfixs(-1.4f)))<1e-16); + assert ((fabs( sfixs(-1.3f) - (-1))/fabs(sfixs(-1.3f)))<1e-16); + assert ((fabs( sfixs(-1.2f) - (-1))/fabs(sfixs(-1.2f)))<1e-16); + assert ((fabs( sfixs(-1.1f) - (-1))/fabs(sfixs(-1.1f)))<1e-16); + assert ((fabs( sfixs(-1.0f) - (-1))/fabs(sfixs(-1.0f)))<1e-16); + assert (fabs( sfixs(-.9f))<1e-16); + assert ((fabs( sfixs(1.0f) - (1))/fabs(sfixs(1.0f)))<1e-16); + assert ((fabs( sfixs(1.1f) - (1))/fabs(sfixs(1.1f)))<1e-16); + assert ((fabs( sfixs(1.2f) - (1))/fabs(sfixs(1.2f)))<1e-16); + assert ((fabs( sfixs(1.3f) - (1))/fabs(sfixs(1.3f)))<1e-16); + assert ((fabs( sfixs(1.4f) - (1))/fabs(sfixs(1.4f)))<1e-16); + assert ((fabs( sfixs(1.5f) - (1))/fabs(sfixs(1.5f)))<1e-16); + assert ((fabs( sfixs(1.6f) - (1))/fabs(sfixs(1.6f)))<1e-16); + assert ((fabs( sfixs(1.7f) - (1))/fabs(sfixs(1.7f)))<1e-16); + assert ((fabs( sfixs(1.8f) - (1))/fabs(sfixs(1.8f)))<1e-16); + assert ((fabs( sfixs(1.9f) - (1))/fabs(sfixs(1.9f)))<1e-16); + assert ((fabs( sfixs(2.0f) - (2))/fabs(sfixs(2.0f)))<1e-16); +} + +static void cfixsTest(void) { + floatComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=FloatComplex(-2,1); + out = cfixs(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.9f,1.1f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.8f,1.2f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.7f,1.3f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.6f,1.4f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.5f,1.5f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.4f,1.6f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.3f,1.7f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.2f,1.8f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.1f,1.9f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.0f,2.0f); + out = cfixs(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-.9f,.9f); + out = cfixs(in); + assert (fabs( creals(out))<1e-16); + assert (fabs( cimags(out))<1e-16); +} + +static void sfixaTest(void) { + int i; + float in[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float res[10]={1,2,-2,-3,-4,6,4,4,0,0}; + float out[10]; + + sfixa(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); +} + +static void cfixaTest(void) { + int i; + float inR[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float inI[10]={5.4f,1.8f,1.4f,-4.0f,-2.7f,-0.3f,1.5f,1.4f,7.3f,-4.6f}; + float resR[10]={1,2,-2,-3,-4,6,4,4,0,0}; + float resI[10]={5,1,1,-4,-2,0,1,1,7,-4}; + floatComplex out[10],*in; + + in=FloatComplexMatrix(inR,inI,10); + cfixa(in,10,out); + + for (i=0;i<10;i++){ + if (creals(out[i])!=0) assert(fabs(creals(out[i])-resR[i])/fabs(creals(out[i])) <1e-16); + else assert(fabs(creals(out[i])-resR[i]) <1e-16); + if (cimags(out[i])!=0) assert(fabs(cimags(out[i])-resI[i])/fabs(cimags(out[i])) <1e-16); + else assert(fabs(cimags(out[i])-resI[i]) <1e-16); + } + +} + +static int testFix() { + printf("\n>>>> Float Fix Tests\n"); + sfixsTest(); + cfixsTest(); + sfixaTest(); + cfixaTest(); + + return 0; +} + +int main() { + assert(testFix() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/fix/zfixa.c b/2.3-1/src/c/elementaryFunctions/fix/zfixa.c new file mode 100644 index 00000000..6c04fc6e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/fix/zfixa.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fix.h" + +void zfixa(doubleComplex* x, int size, doubleComplex* out) { + int i = 0; + for (i=0;i +#include "fix.h" + +doubleComplex zfixs(doubleComplex x) { + double fixReal = 0, fixImag = 0; + + if (zreals(x)>=0) fixReal = floor(zreals(x)); + else fixReal = ceil(zreals(x)); + + if (zimags(x)>=0) fixImag = floor(zimags(x)); + else fixImag = ceil(zimags(x)); + + return DoubleComplex(fixReal, fixImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/Makefile.am b/2.3-1/src/c/elementaryFunctions/floor/Makefile.am new file mode 100644 index 00000000..469d2c1a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/Makefile.am @@ -0,0 +1,60 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libFloor_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFloor.la + +libFloor_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/floor.h + +SRC = sfloors.c \ + dfloors.c \ + cfloors.c \ + zfloors.c \ + sfloora.c \ + dfloora.c \ + cfloora.c \ + zfloora.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/floor/libFloor.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatFloor testDoubleFloor + +TESTS = testFloatFloor testDoubleFloor + +# +# -*- Floor Tests -*- +# +testFloatFloor_SOURCES = testFloatFloor.c +testFloatFloor_CFLAGS = $(check_INCLUDES) +testFloatFloor_LDADD = $(check_LDADD) + +testDoubleFloor_SOURCES = testDoubleFloor.c +testDoubleFloor_CFLAGS = $(check_INCLUDES) +testDoubleFloor_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/floor/Makefile.in b/2.3-1/src/c/elementaryFunctions/floor/Makefile.in new file mode 100644 index 00000000..ad636fe3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/Makefile.in @@ -0,0 +1,790 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatFloor$(EXEEXT) testDoubleFloor$(EXEEXT) +TESTS = testFloatFloor$(EXEEXT) testDoubleFloor$(EXEEXT) +subdir = src/c/elementaryFunctions/floor +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFloor_la_LIBADD = +am__objects_1 = +am__objects_2 = libFloor_la-sfloors.lo libFloor_la-dfloors.lo \ + libFloor_la-cfloors.lo libFloor_la-zfloors.lo \ + libFloor_la-sfloora.lo libFloor_la-dfloora.lo \ + libFloor_la-cfloora.lo libFloor_la-zfloora.lo +am_libFloor_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libFloor_la_OBJECTS = $(am_libFloor_la_OBJECTS) +libFloor_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libFloor_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleFloor_OBJECTS = \ + testDoubleFloor-testDoubleFloor.$(OBJEXT) +testDoubleFloor_OBJECTS = $(am_testDoubleFloor_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/floor/libFloor.la +testDoubleFloor_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleFloor_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleFloor_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatFloor_OBJECTS = testFloatFloor-testFloatFloor.$(OBJEXT) +testFloatFloor_OBJECTS = $(am_testFloatFloor_OBJECTS) +testFloatFloor_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatFloor_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatFloor_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFloor_la_SOURCES) $(testDoubleFloor_SOURCES) \ + $(testFloatFloor_SOURCES) +DIST_SOURCES = $(libFloor_la_SOURCES) $(testDoubleFloor_SOURCES) \ + $(testFloatFloor_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libFloor_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFloor.la +libFloor_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/floor.h +SRC = sfloors.c \ + dfloors.c \ + cfloors.c \ + zfloors.c \ + sfloora.c \ + dfloora.c \ + cfloora.c \ + zfloora.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/floor/libFloor.la \ + @LIBMATH@ + + +# +# -*- Floor Tests -*- +# +testFloatFloor_SOURCES = testFloatFloor.c +testFloatFloor_CFLAGS = $(check_INCLUDES) +testFloatFloor_LDADD = $(check_LDADD) +testDoubleFloor_SOURCES = testDoubleFloor.c +testDoubleFloor_CFLAGS = $(check_INCLUDES) +testDoubleFloor_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/floor/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/floor/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFloor.la: $(libFloor_la_OBJECTS) $(libFloor_la_DEPENDENCIES) + $(libFloor_la_LINK) -rpath $(pkglibdir) $(libFloor_la_OBJECTS) $(libFloor_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleFloor$(EXEEXT): $(testDoubleFloor_OBJECTS) $(testDoubleFloor_DEPENDENCIES) + @rm -f testDoubleFloor$(EXEEXT) + $(testDoubleFloor_LINK) $(testDoubleFloor_OBJECTS) $(testDoubleFloor_LDADD) $(LIBS) +testFloatFloor$(EXEEXT): $(testFloatFloor_OBJECTS) $(testFloatFloor_DEPENDENCIES) + @rm -f testFloatFloor$(EXEEXT) + $(testFloatFloor_LINK) $(testFloatFloor_OBJECTS) $(testFloatFloor_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-cfloora.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-cfloors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-dfloora.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-dfloors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-sfloora.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-sfloors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-zfloora.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFloor_la-zfloors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleFloor-testDoubleFloor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatFloor-testFloatFloor.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libFloor_la-sfloors.lo: sfloors.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-sfloors.lo -MD -MP -MF $(DEPDIR)/libFloor_la-sfloors.Tpo -c -o libFloor_la-sfloors.lo `test -f 'sfloors.c' || echo '$(srcdir)/'`sfloors.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-sfloors.Tpo $(DEPDIR)/libFloor_la-sfloors.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfloors.c' object='libFloor_la-sfloors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-sfloors.lo `test -f 'sfloors.c' || echo '$(srcdir)/'`sfloors.c + +libFloor_la-dfloors.lo: dfloors.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-dfloors.lo -MD -MP -MF $(DEPDIR)/libFloor_la-dfloors.Tpo -c -o libFloor_la-dfloors.lo `test -f 'dfloors.c' || echo '$(srcdir)/'`dfloors.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-dfloors.Tpo $(DEPDIR)/libFloor_la-dfloors.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfloors.c' object='libFloor_la-dfloors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-dfloors.lo `test -f 'dfloors.c' || echo '$(srcdir)/'`dfloors.c + +libFloor_la-cfloors.lo: cfloors.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-cfloors.lo -MD -MP -MF $(DEPDIR)/libFloor_la-cfloors.Tpo -c -o libFloor_la-cfloors.lo `test -f 'cfloors.c' || echo '$(srcdir)/'`cfloors.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-cfloors.Tpo $(DEPDIR)/libFloor_la-cfloors.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfloors.c' object='libFloor_la-cfloors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-cfloors.lo `test -f 'cfloors.c' || echo '$(srcdir)/'`cfloors.c + +libFloor_la-zfloors.lo: zfloors.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-zfloors.lo -MD -MP -MF $(DEPDIR)/libFloor_la-zfloors.Tpo -c -o libFloor_la-zfloors.lo `test -f 'zfloors.c' || echo '$(srcdir)/'`zfloors.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-zfloors.Tpo $(DEPDIR)/libFloor_la-zfloors.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfloors.c' object='libFloor_la-zfloors.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-zfloors.lo `test -f 'zfloors.c' || echo '$(srcdir)/'`zfloors.c + +libFloor_la-sfloora.lo: sfloora.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-sfloora.lo -MD -MP -MF $(DEPDIR)/libFloor_la-sfloora.Tpo -c -o libFloor_la-sfloora.lo `test -f 'sfloora.c' || echo '$(srcdir)/'`sfloora.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-sfloora.Tpo $(DEPDIR)/libFloor_la-sfloora.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfloora.c' object='libFloor_la-sfloora.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-sfloora.lo `test -f 'sfloora.c' || echo '$(srcdir)/'`sfloora.c + +libFloor_la-dfloora.lo: dfloora.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-dfloora.lo -MD -MP -MF $(DEPDIR)/libFloor_la-dfloora.Tpo -c -o libFloor_la-dfloora.lo `test -f 'dfloora.c' || echo '$(srcdir)/'`dfloora.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-dfloora.Tpo $(DEPDIR)/libFloor_la-dfloora.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfloora.c' object='libFloor_la-dfloora.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-dfloora.lo `test -f 'dfloora.c' || echo '$(srcdir)/'`dfloora.c + +libFloor_la-cfloora.lo: cfloora.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-cfloora.lo -MD -MP -MF $(DEPDIR)/libFloor_la-cfloora.Tpo -c -o libFloor_la-cfloora.lo `test -f 'cfloora.c' || echo '$(srcdir)/'`cfloora.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-cfloora.Tpo $(DEPDIR)/libFloor_la-cfloora.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfloora.c' object='libFloor_la-cfloora.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-cfloora.lo `test -f 'cfloora.c' || echo '$(srcdir)/'`cfloora.c + +libFloor_la-zfloora.lo: zfloora.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -MT libFloor_la-zfloora.lo -MD -MP -MF $(DEPDIR)/libFloor_la-zfloora.Tpo -c -o libFloor_la-zfloora.lo `test -f 'zfloora.c' || echo '$(srcdir)/'`zfloora.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFloor_la-zfloora.Tpo $(DEPDIR)/libFloor_la-zfloora.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfloora.c' object='libFloor_la-zfloora.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFloor_la_CFLAGS) $(CFLAGS) -c -o libFloor_la-zfloora.lo `test -f 'zfloora.c' || echo '$(srcdir)/'`zfloora.c + +testDoubleFloor-testDoubleFloor.o: testDoubleFloor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFloor_CFLAGS) $(CFLAGS) -MT testDoubleFloor-testDoubleFloor.o -MD -MP -MF $(DEPDIR)/testDoubleFloor-testDoubleFloor.Tpo -c -o testDoubleFloor-testDoubleFloor.o `test -f 'testDoubleFloor.c' || echo '$(srcdir)/'`testDoubleFloor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFloor-testDoubleFloor.Tpo $(DEPDIR)/testDoubleFloor-testDoubleFloor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFloor.c' object='testDoubleFloor-testDoubleFloor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFloor_CFLAGS) $(CFLAGS) -c -o testDoubleFloor-testDoubleFloor.o `test -f 'testDoubleFloor.c' || echo '$(srcdir)/'`testDoubleFloor.c + +testDoubleFloor-testDoubleFloor.obj: testDoubleFloor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFloor_CFLAGS) $(CFLAGS) -MT testDoubleFloor-testDoubleFloor.obj -MD -MP -MF $(DEPDIR)/testDoubleFloor-testDoubleFloor.Tpo -c -o testDoubleFloor-testDoubleFloor.obj `if test -f 'testDoubleFloor.c'; then $(CYGPATH_W) 'testDoubleFloor.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFloor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFloor-testDoubleFloor.Tpo $(DEPDIR)/testDoubleFloor-testDoubleFloor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFloor.c' object='testDoubleFloor-testDoubleFloor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFloor_CFLAGS) $(CFLAGS) -c -o testDoubleFloor-testDoubleFloor.obj `if test -f 'testDoubleFloor.c'; then $(CYGPATH_W) 'testDoubleFloor.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFloor.c'; fi` + +testFloatFloor-testFloatFloor.o: testFloatFloor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFloor_CFLAGS) $(CFLAGS) -MT testFloatFloor-testFloatFloor.o -MD -MP -MF $(DEPDIR)/testFloatFloor-testFloatFloor.Tpo -c -o testFloatFloor-testFloatFloor.o `test -f 'testFloatFloor.c' || echo '$(srcdir)/'`testFloatFloor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFloor-testFloatFloor.Tpo $(DEPDIR)/testFloatFloor-testFloatFloor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFloor.c' object='testFloatFloor-testFloatFloor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFloor_CFLAGS) $(CFLAGS) -c -o testFloatFloor-testFloatFloor.o `test -f 'testFloatFloor.c' || echo '$(srcdir)/'`testFloatFloor.c + +testFloatFloor-testFloatFloor.obj: testFloatFloor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFloor_CFLAGS) $(CFLAGS) -MT testFloatFloor-testFloatFloor.obj -MD -MP -MF $(DEPDIR)/testFloatFloor-testFloatFloor.Tpo -c -o testFloatFloor-testFloatFloor.obj `if test -f 'testFloatFloor.c'; then $(CYGPATH_W) 'testFloatFloor.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFloor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFloor-testFloatFloor.Tpo $(DEPDIR)/testFloatFloor-testFloatFloor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFloor.c' object='testFloatFloor-testFloatFloor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFloor_CFLAGS) $(CFLAGS) -c -o testFloatFloor-testFloatFloor.obj `if test -f 'testFloatFloor.c'; then $(CYGPATH_W) 'testFloatFloor.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFloor.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/floor/cfloora.c b/2.3-1/src/c/elementaryFunctions/floor/cfloora.c new file mode 100644 index 00000000..941e8316 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/cfloora.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "floor.h" + +void cfloora(floatComplex* x, int size, floatComplex* out) { + int i = 0; + for (i=0;i +#include "floor.h" + +floatComplex cfloors(floatComplex x) { + float floorReal = floorf(creals(x)); + float floorImag = floorf(cimags(x)); + + return FloatComplex(floorReal, floorImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/dfloora.c b/2.3-1/src/c/elementaryFunctions/floor/dfloora.c new file mode 100644 index 00000000..fd70b53e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/dfloora.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "floor.h" + +void dfloora(double* x, int size, double* out) { + int i = 0; + for (i=0;i +#include "floor.h" + +double dfloors(double x) { + return (floor(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/sfloora.c b/2.3-1/src/c/elementaryFunctions/floor/sfloora.c new file mode 100644 index 00000000..9a549e2a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/sfloora.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "floor.h" + +void sfloora(float* x, int size, float* out) { + int i = 0; + for (i=0;i +#include "floor.h" + +float sfloors(float x) { + return (floorf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/testDoubleFloor.c b/2.3-1/src/c/elementaryFunctions/floor/testDoubleFloor.c new file mode 100644 index 00000000..71e0b36f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/testDoubleFloor.c @@ -0,0 +1,152 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "floor.h" + + +static void dfloorsTest(void) { + assert ((fabs( dfloors(-2) - (-2))/fabs(dfloors(-2)))<1e-16); + assert ((fabs( dfloors(-1.9) - (-2))/fabs(dfloors(-1.9)))<1e-16); + assert ((fabs( dfloors(-1.8) - (-2))/fabs(dfloors(-1.8)))<1e-16); + assert ((fabs( dfloors(-1.7) - (-2))/fabs(dfloors(-1.7)))<1e-16); + assert ((fabs( dfloors(-1.6) - (-2))/fabs(dfloors(-1.6)))<1e-16); + assert ((fabs( dfloors(-1.5) - (-2))/fabs(dfloors(-1.5)))<1e-16); + assert ((fabs( dfloors(-1.4) - (-2))/fabs(dfloors(-1.4)))<1e-16); + assert ((fabs( dfloors(-1.3) - (-2))/fabs(dfloors(-1.3)))<1e-16); + assert ((fabs( dfloors(-1.2) - (-2))/fabs(dfloors(-1.2)))<1e-16); + assert ((fabs( dfloors(-1.1) - (-2))/fabs(dfloors(-1.1)))<1e-16); + assert ((fabs( dfloors(-1.0) - (-1))/fabs(dfloors(-1.0)))<1e-16); + assert ((fabs( dfloors(-0.9) - (-1))/fabs(dfloors(-0.9)))<1e-16); + assert ((fabs( dfloors(1.0) - (1))/fabs(dfloors(1.0)))<1e-16); + assert ((fabs( dfloors(1.1) - (1))/fabs(dfloors(1.1)))<1e-16); + assert ((fabs( dfloors(1.2) - (1))/fabs(dfloors(1.2)))<1e-16); + assert ((fabs( dfloors(1.3) - (1))/fabs(dfloors(1.3)))<1e-16); + assert ((fabs( dfloors(1.4) - (1))/fabs(dfloors(1.4)))<1e-16); + assert ((fabs( dfloors(1.5) - (1))/fabs(dfloors(1.5)))<1e-16); + assert ((fabs( dfloors(1.6) - (1))/fabs(dfloors(1.6)))<1e-16); + assert ((fabs( dfloors(1.7) - (1))/fabs(dfloors(1.7)))<1e-16); + assert ((fabs( dfloors(1.8) - (1))/fabs(dfloors(1.8)))<1e-16); + assert ((fabs( dfloors(1.9) - (1))/fabs(dfloors(1.9)))<1e-16); + assert ((fabs( dfloors(2.0) - (2))/fabs(dfloors(2.0)))<1e-16); + +} + +static void zfloorsTest(void) { + doubleComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=DoubleComplex(-2,1); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.9,1.1); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.8,1.2); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.7,1.3); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.6,1.4); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.5,1.5); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.6); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.3,1.7); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.2,1.8); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.1,1.9); + out = zfloors(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.0,2.0); + out = zfloors(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-.9,.9); + out = zfloors(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert (fabs( zimags(out))<1e-16); + +} + +static void dflooraTest(void) { + int i; + double in[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double res[10]={1,2,-2,-4,-5,6,4,4,-1,0}; + double out[10]; + + dfloora(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) < 1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); +} + +static void zflooraTest(void) { + int i; + double inR[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double inI[10]={5.4,1.8,1.4,-4.0,-2.7,-0.3,1.5,1.4,7.3,-4.6}; + double resR[10]={1,2,-2,-4,-5,6,4,4,-1,0}; + double resI[10]={5,1,1,-4,-3,-1,1,1,7,-5}; + doubleComplex out[10],*in; + + in=DoubleComplexMatrix(inR,inI,10); + zfloora(in,10,out); + + for (i=0;i<10;i++){ + if (zreals(out[i])!=0) assert( fabs(zreals(out[i])-resR[i])/fabs(zreals(out[i])) < 1e-16); + else assert(fabs(zreals(out[i])-resR[i]) <1e-16); + if (zimags(out[i])!=0) assert( fabs(zimags(out[i])-resI[i])/fabs(zimags(out[i])) < 1e-16); + else assert(fabs(zimags(out[i])-resI[i]) <1e-16); + } + +} + + +static int testFloor() { + printf("\n>>>> Double Floor Tests\n"); + dfloorsTest(); + zfloorsTest(); + dflooraTest(); + zflooraTest(); + + return 0; +} + +int main() { + assert(testFloor() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/testFloatFloor.c b/2.3-1/src/c/elementaryFunctions/floor/testFloatFloor.c new file mode 100644 index 00000000..df49ee0d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/testFloatFloor.c @@ -0,0 +1,147 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "floor.h" + +static void sfloorsTest(void) { + assert ((fabs( sfloors(-2) - (-2))/fabs(sfloors(-2)))<1e-16); + assert ((fabs( sfloors(-1.9f) - (-2))/fabs(sfloors(-1.9f)))<1e-16); + assert ((fabs( sfloors(-1.8f) - (-2))/fabs(sfloors(-1.8f)))<1e-16); + assert ((fabs( sfloors(-1.7f) - (-2))/fabs(sfloors(-1.7f)))<1e-16); + assert ((fabs( sfloors(-1.6f) - (-2))/fabs(sfloors(-1.6f)))<1e-16); + assert ((fabs( sfloors(-1.5f) - (-2))/fabs(sfloors(-1.5f)))<1e-16); + assert ((fabs( sfloors(-1.4f) - (-2))/fabs(sfloors(-1.4f)))<1e-16); + assert ((fabs( sfloors(-1.3f) - (-2))/fabs(sfloors(-1.3f)))<1e-16); + assert ((fabs( sfloors(-1.2f) - (-2))/fabs(sfloors(-1.2f)))<1e-16); + assert ((fabs( sfloors(-1.1f) - (-2))/fabs(sfloors(-1.1f)))<1e-16); + assert ((fabs( sfloors(-1.0f) - (-1))/fabs(sfloors(-1.0f)))<1e-16); + assert ((fabs( sfloors(-0.9f) - (-1))/fabs(sfloors(-0.9f)))<1e-16); + assert ((fabs( sfloors(1.0f) - (1))/fabs(sfloors(1.0f)))<1e-16); + assert ((fabs( sfloors(1.1f) - (1))/fabs(sfloors(1.1f)))<1e-16); + assert ((fabs( sfloors(1.2f) - (1))/fabs(sfloors(1.2f)))<1e-16); + assert ((fabs( sfloors(1.3f) - (1))/fabs(sfloors(1.3f)))<1e-16); + assert ((fabs( sfloors(1.4f) - (1))/fabs(sfloors(1.4f)))<1e-16); + assert ((fabs( sfloors(1.5f) - (1))/fabs(sfloors(1.5f)))<1e-16); + assert ((fabs( sfloors(1.6f) - (1))/fabs(sfloors(1.6f)))<1e-16); + assert ((fabs( sfloors(1.7f) - (1))/fabs(sfloors(1.7f)))<1e-16); + assert ((fabs( sfloors(1.8f) - (1))/fabs(sfloors(1.8f)))<1e-16); + assert ((fabs( sfloors(1.9f) - (1))/fabs(sfloors(1.9f)))<1e-16); + assert ((fabs( sfloors(2.0f) - (2))/fabs(sfloors(2.0f)))<1e-16); +} + +static void cfloorsTest(void) { + floatComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=FloatComplex(-2,1); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.9f,1.1f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.8f,1.2f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.7f,1.3f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.6f,1.4f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.5f,1.5f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.4f,1.6f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.3f,1.7f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.2f,1.8f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.1f,1.9f); + out = cfloors(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.0f,2.0f); + out = cfloors(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-.9f,.9f); + out = cfloors(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert (fabs( cimags(out))<1e-16); + +} + +static void sflooraTest(void) { + int i; + float in[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float res[10]={1,2,-2,-4,-5,6,4,4,-1,0}; + float out[10]; + + sfloora(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); +} + +static void cflooraTest(void) { + int i; + float inR[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float inI[10]={5.4f,1.8f,1.4f,-4.0f,-2.7f,-0.3f,1.5f,1.4f,7.3f,-4.6f}; + float resR[10]={1,2,-2,-4,-5,6,4,4,-1,0}; + float resI[10]={5,1,1,-4,-3,-1,1,1,7,-5}; + floatComplex out[10],*in; + + in=FloatComplexMatrix(inR,inI,10); + cfloora(in,10,out); + + for (i=0;i<10;i++){ + if (creals(out[i])!=0) assert(fabs(creals(out[i])-resR[i])/fabs(creals(out[i])) <1e-16); + else assert(fabs(creals(out[i])-resR[i]) <1e-16); + if (cimags(out[i])!=0) assert(fabs(cimags(out[i])-resI[i])/fabs(cimags(out[i])) <1e-16); + else assert(fabs(cimags(out[i])-resI[i]) <1e-16); + } +} + +static int testFloor() { + printf("\n>>>> Float Floor Tests\n"); + sfloorsTest(); + cfloorsTest(); + sflooraTest(); + cflooraTest(); + + return 0; +} + +int main() { + assert(testFloor() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/floor/zfloora.c b/2.3-1/src/c/elementaryFunctions/floor/zfloora.c new file mode 100644 index 00000000..a6386c39 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/floor/zfloora.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "floor.h" + +void zfloora(doubleComplex* x, int size, doubleComplex* out) { + int i = 0; + for (i=0;i +#include "floor.h" + +doubleComplex zfloors(doubleComplex x) { + double floorReal = floor(zreals(x)); + double floorImag = floor(zimags(x)); + + return DoubleComplex(floorReal, floorImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/includes/acos.h b/2.3-1/src/c/elementaryFunctions/includes/acos.h new file mode 100644 index 00000000..6b68c025 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/acos.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ACOS_H__ +#define __ACOS_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/* +** Compute ArcCosine for different types . +*/ + +/* +** \brief Float ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT float sacoss(float in); + +/* +** \brief Double ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT double dacoss(double in); + +/* +** \brief Float Complex ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT floatComplex cacoss(floatComplex in); + +/* +** \brief Double Complex ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT doubleComplex zacoss(doubleComplex in); + +/* +** \brief Float Matrix ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sacosa(float* in, int size, float* out); + +/* +** \brief Double Matrix ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dacosa(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void cacosa(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zacosa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ACOS_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/acosh.h b/2.3-1/src/c/elementaryFunctions/includes/acosh.h new file mode 100644 index 00000000..ed7aa6aa --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/acosh.h @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ACOSH_H__ +#define __ACOSH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* +** Compute Hyperbolic Hyperbolic ArcCosine for different types . +*/ + +/* +** \brief Float Hyperbolic ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT float sacoshs(float in); + +/* +** \brief Double Hyperbolic ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT double dacoshs(double in); + +/* +** \brief Float Complex Hyperbolic ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT floatComplex cacoshs(floatComplex in); + +/* +** \brief Double Complex Hyperbolic ArcCosine function +** \param in : input array value. +*/ +EXTERN_ELEMFUNCT doubleComplex zacoshs(doubleComplex in); + +/* +** \brief Float Matrix Hyperbolic ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sacosha(float* in, int size, float* out); + +/* +** \brief Double Matrix Hyperbolic ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dacosha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Hyperbolic ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void cacosha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Hyperbolic ArcCosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zacosha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__ACOSH_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/asin.h b/2.3-1/src/c/elementaryFunctions/includes/asin.h new file mode 100644 index 00000000..3a28df18 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/asin.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ASIN_H__ +#define __ASIN_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Compute ArcSine for different types . +*/ + +/* +** \brief Float ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float sasins(float in); + +/* +** \brief Double ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dasins(double in); + +/* +** \brief Float Complex ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex casins(floatComplex in); + +/* +** \brief Double Complex ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zasins(doubleComplex in); + +/* +** \brief Float Matrix ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sasina(float* in, int size, float* out); + +/* +** \brief Double Matrix ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dasina(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void casina(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zasina(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__ASIN_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/asinh.h b/2.3-1/src/c/elementaryFunctions/includes/asinh.h new file mode 100644 index 00000000..9df597a5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/asinh.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ASINH_H__ +#define __ASINH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Compute Hyperbolic ArcSine for different types . +*/ + +/* +** \brief Float Hyperbolic ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float sasinhs(float in); + +/* +** \brief Double Hyperbolic ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dasinhs(double in); + +/* +** \brief Float Complex Hyperbolic ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex casinhs(floatComplex in); + +/* +** \brief Double Complex Hyperbolic ArcSine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zasinhs(doubleComplex in); + +/* +** \brief Float Matrix Hyperbolic ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sasinha(float* in, int size, float* out); + +/* +** \brief Double Matrix Hyperbolic ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dasinha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Hyperbolic ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void casinha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Hyperbolic ArcSine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zasinha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__ASINH_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/atan.h b/2.3-1/src/c/elementaryFunctions/includes/atan.h new file mode 100644 index 00000000..b6a4cf0a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/atan.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ATAN_H__ +#define __ATAN_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Compute ArcTangeant for different types . +*/ + +/* +** \brief Float ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float satans(float in); + +/* +** \brief Double ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double datans(double in); + +/* +** \brief Float Complex ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex catans(floatComplex in); + +/* +** \brief Double Complex ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zatans(doubleComplex in); + +/* +** \brief Float Matrix ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void satana(float* in, int size, float* out); + +/* +** \brief Double Matrix ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void datana(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void catana(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zatana(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__ATAN_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/atan2.h b/2.3-1/src/c/elementaryFunctions/includes/atan2.h new file mode 100644 index 00000000..83aeebe2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/atan2.h @@ -0,0 +1,57 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ATAN2_H__ +#define __ATAN2_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Compute arctan with two parameters . +*/ + + +/* +** \brief Float arc tangent function +*/ +EXTERN_ELEMFUNCT float satan2s ( float x , float y ); + +/* +** \brief Double arc tangent function +*/ +EXTERN_ELEMFUNCT double datan2s ( double x , double y); + + +/* +** \brief array's Float arc tangent function +*/ +EXTERN_ELEMFUNCT void satan2a (float* in1, int size1, float* in2, int size2, float* out) ; + +/* +** \brief array's Double arc tangent function +*/ +EXTERN_ELEMFUNCT void datan2a (double* in1, int size1, double* in2, int size2, double* out) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif /* !__EXP10_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/atanh.h b/2.3-1/src/c/elementaryFunctions/includes/atanh.h new file mode 100644 index 00000000..32fe1789 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/atanh.h @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ATANH_H__ +#define __ATANH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Compute Hyperbolic ArcTangeant for different types . +*/ + +/* +** \brief Float Hyperbolic ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float satanhs(float in); + +/* +** \brief Double Hyperbolic ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double datanhs(double in); + +/* +** \brief Float Complex Hyperbolic ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex catanhs(floatComplex in); + +/* +** \brief Double Complex Hyperbolic ArcTangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zatanhs(doubleComplex in); + +/* +** \brief Float Matrix Hyperbolic ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void satanha(float* in, int size, float* out); + +/* +** \brief Double Matrix Hyperbolic ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void datanha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Hyperbolic ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void catanha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Hyperbolic ArcTangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zatanha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__ATANH_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/ceil.h b/2.3-1/src/c/elementaryFunctions/includes/ceil.h new file mode 100644 index 00000000..960b8b3b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/ceil.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CEIL_H__ +#define __CEIL_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif +/* + ceil(x) returns an integer matrix made of rounded up elements +*/ + +EXTERN_ELEMFUNCT float sceils(float in); + +EXTERN_ELEMFUNCT double dceils(double in); + +EXTERN_ELEMFUNCT floatComplex cceils(floatComplex in); + +EXTERN_ELEMFUNCT doubleComplex zceils(doubleComplex in); + +EXTERN_ELEMFUNCT void sceila(float* in, int size, float* out); + +EXTERN_ELEMFUNCT void dceila(double* in, int size, double* out); + +EXTERN_ELEMFUNCT void cceila(floatComplex* in, int size, floatComplex* out); + +EXTERN_ELEMFUNCT void zceila(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__CEIL_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/cos.h b/2.3-1/src/c/elementaryFunctions/includes/cos.h new file mode 100644 index 00000000..5d573b1e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/cos.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __COS_H__ +#define __COS_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Cosine for different types . +*/ + +/* +** \brief Float Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float scoss(float in); + +/* +** \brief Double Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dcoss(double in); + +/* +** \brief Float Complex Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex ccoss(floatComplex in); + +/* +** \brief Double Complex Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zcoss(doubleComplex in); + +/* +** \brief Float Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void scosa(float* in, int size, float* out); + +/* +** \brief Double Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dcosa(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ccosa(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zcosa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__COS_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/cosh.h b/2.3-1/src/c/elementaryFunctions/includes/cosh.h new file mode 100644 index 00000000..0cbf8eb4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/cosh.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __COSH_H__ +#define __COSH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Cosine for different types . +*/ + +/* +** \brief Float Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float scoshs(float in); + +/* +** \brief Double Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dcoshs(double in); + +/* +** \brief Float Complex Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex ccoshs(floatComplex in); + +/* +** \brief Double Complex Cosine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zcoshs(doubleComplex in); + +/* +** \brief Float Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void scosha(float* in, int size, float* out); + +/* +** \brief Double Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dcosha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ccosha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Cosine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zcosha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__COSH_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/dynlib_elementaryfunctions.h b/2.3-1/src/c/elementaryFunctions/includes/dynlib_elementaryfunctions.h new file mode 100644 index 00000000..5037696f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/dynlib_elementaryfunctions.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_ELEMENTARYFUNCTIONS_H__ +#define __DYNLIB_ELEMENTARYFUNCTIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if ELEMENTARYFUNCTIONS_EXPORTS + #define EXTERN_ELEMFUNCT __declspec (dllexport) + #else + #define EXTERN_ELEMFUNCT __declspec (dllimport) + #endif +#else + #define EXTERN_ELEMFUNCT +#endif + +#endif /* __DYNLIB_ELEMENTARYFUNCTIONS_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/exp.h b/2.3-1/src/c/elementaryFunctions/includes/exp.h new file mode 100644 index 00000000..297a5769 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/exp.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __EXP_H__ +#define __EXP_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Exponential for different types . +*/ + +/* +** \brief Float Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float sexps(float in); + +/* +** \brief Double Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dexps(double in); + +/* +** \brief Float Complex Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex cexps(floatComplex in); + +/* +** \brief Double Complex Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zexps(doubleComplex in); + +/* +** \brief Float Matrix Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sexpa(float* in, int size, float* out); + +/* +** \brief Double Matrix Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dexpa(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void cexpa(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zexpa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__EXP_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/exp10.h b/2.3-1/src/c/elementaryFunctions/includes/exp10.h new file mode 100644 index 00000000..56a1d999 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/exp10.h @@ -0,0 +1,90 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __EXP10_H__ +#define __EXP10_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute 10 based Exponential for different types . +*/ + +/* +** \brief Float 10 based Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float sexp10s(float in); + +/* +** \brief Double Exp10onential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dexp10s(double in); + +/* +** \brief Float Complex 10 based Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex cexp10s(floatComplex in); + +/* +** \brief Double Complex 10 based Exponential function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zexp10s(doubleComplex in); + +/* +** \brief Float Matrix 10 based Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sexp10a(float* in, int size, float* out); + +/* +** \brief Double Matrix 10 based Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dexp10a(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix 10 based Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void cexp10a(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix 10 based Exponential function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zexp10a(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__EXP10_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/fix.h b/2.3-1/src/c/elementaryFunctions/includes/fix.h new file mode 100644 index 00000000..504a63c1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/fix.h @@ -0,0 +1,52 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FIX_H__ +#define __FIX_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* + fix(x) returns an integer matrix made of nearest rounded integers toward zero,i.e, y=sign(x).*floor(abs(x)). Same as int. + In these functions, I take the formula : + if x>=0 y=floor(x) + else y=ceil(x) +*/ + +EXTERN_ELEMFUNCT float sfixs(float in); + +EXTERN_ELEMFUNCT double dfixs(double in); + +EXTERN_ELEMFUNCT floatComplex cfixs(floatComplex in); + +EXTERN_ELEMFUNCT doubleComplex zfixs(doubleComplex in); + +EXTERN_ELEMFUNCT void sfixa(float* in, int size, float* out); + +EXTERN_ELEMFUNCT void dfixa(double* in, int size, double* out); + +EXTERN_ELEMFUNCT void cfixa(floatComplex* in, int size, floatComplex* out); + +EXTERN_ELEMFUNCT void zfixa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__FIX_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/floor.h b/2.3-1/src/c/elementaryFunctions/includes/floor.h new file mode 100644 index 00000000..971cdf65 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/floor.h @@ -0,0 +1,49 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FLOOR_H__ +#define __FLOOR_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* + floor(x) returns an integer matrix made of nearest rounded down integers. +*/ + +EXTERN_ELEMFUNCT float sfloors(float in); + +EXTERN_ELEMFUNCT double dfloors(double in); + +EXTERN_ELEMFUNCT floatComplex cfloors(floatComplex in); + +EXTERN_ELEMFUNCT doubleComplex zfloors(doubleComplex in); + +EXTERN_ELEMFUNCT void sfloora(float* in, int size, float* out); + +EXTERN_ELEMFUNCT void dfloora(double* in, int size, double* out); + +EXTERN_ELEMFUNCT void cfloora(floatComplex* in, int size, floatComplex* out); + +EXTERN_ELEMFUNCT void zfloora(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__FLOOR_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/int.h b/2.3-1/src/c/elementaryFunctions/includes/int.h new file mode 100644 index 00000000..53985887 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/int.h @@ -0,0 +1,49 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __INT_H__ +#define __INT_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* + int(X) returns the integer part of the real matrix X. Same as fix. +*/ + +EXTERN_ELEMFUNCT float sints(float in); + +EXTERN_ELEMFUNCT double dints(double in); + +EXTERN_ELEMFUNCT floatComplex cints(floatComplex in); + +EXTERN_ELEMFUNCT doubleComplex zints(doubleComplex in); + +EXTERN_ELEMFUNCT void sinta(float* in, int size, float* out); + +EXTERN_ELEMFUNCT void dinta(double* in, int size, double* out); + +EXTERN_ELEMFUNCT void cinta(floatComplex* in, int size, floatComplex* out); + +EXTERN_ELEMFUNCT void zinta(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__INT_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/lnp1m1.h b/2.3-1/src/c/elementaryFunctions/includes/lnp1m1.h new file mode 100644 index 00000000..e5f37515 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/lnp1m1.h @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LNP1M1_H__ +#define __LNP1M1_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute v = log ( (1 + s)/(1 - s) ) for different types . +*/ + +/* +** \brief Float Lnp1m1 function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float slnp1m1s(float in); + +/* +** \brief Double Lnp1m1 function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dlnp1m1s(double in); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__LNP1M1_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/log.h b/2.3-1/src/c/elementaryFunctions/includes/log.h new file mode 100644 index 00000000..9fb5e75b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/log.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LOG_H__ +#define __LOG_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Logarithm for different types . +*/ + +/* +** \brief Float Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float slogs(float in); + +/* +** \brief Double Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dlogs(double in); + +/* +** \brief Float Complex Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex clogs(floatComplex in); + +/* +** \brief Double Complex Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zlogs(doubleComplex in); + +/* +** \brief Float Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void sloga(float* in, int size, float* out); + +/* +** \brief Double Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dloga(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void cloga(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zloga(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__LOG_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/log10.h b/2.3-1/src/c/elementaryFunctions/includes/log10.h new file mode 100644 index 00000000..a595424e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/log10.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LOG10_H__ +#define __LOG10_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Ten based Logarithm for different types . +*/ + +/* +** \brief Float Ten based Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float slog10s(float in); + +/* +** \brief Double Ten based Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dlog10s(double in); + +/* +** \brief Float Complex Ten based Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex clog10s(floatComplex in); + +/* +** \brief Double Complex Ten based Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zlog10s(doubleComplex in); + +/* +** \brief Float Matrix Ten based Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void slog10a(float* in, int size, float* out); + +/* +** \brief Double Matrix Ten based Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dlog10a(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Ten based Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void clog10a(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Ten based Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zlog10a(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__LOG10_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/log1p.h b/2.3-1/src/c/elementaryFunctions/includes/log1p.h new file mode 100644 index 00000000..58b93d07 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/log1p.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LOG1P_H__ +#define __LOG1P_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Logarithm for different types . +*/ + +/* +** \brief Float Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float slog1ps(float in); + +/* +** \brief Double Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dlog1ps(double in); + +/* +** \brief Float Complex Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex clog1ps(floatComplex in); + +/* +** \brief Double Complex Logarithm function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zlog1ps(doubleComplex in); + +/* +** \brief Float Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void slog1pa(float* in, int size, float* out); + +/* +** \brief Double Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dlog1pa(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void clog1pa(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Logarithm function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zlog1pa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__LOG1P_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/pow.h b/2.3-1/src/c/elementaryFunctions/includes/pow.h new file mode 100644 index 00000000..ec8216d8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/pow.h @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __POW_H__ +#define __POW_H__ + +#include "dynlib_elementaryfunctions.h" +#include "multiplication.h" + +#ifdef __cplusplus +extern "C" { +#endif +EXTERN_ELEMFUNCT float spows(float value, float expand); + +EXTERN_ELEMFUNCT double dpows(double value, double expand); + +EXTERN_ELEMFUNCT floatComplex cpows(floatComplex value, floatComplex expand); + +EXTERN_ELEMFUNCT doubleComplex zpows(doubleComplex value, doubleComplex expand); + +EXTERN_ELEMFUNCT void spowa(float *value, int size, float* expand, float *out); + +EXTERN_ELEMFUNCT void dpowa(double *value, int size, double* expand, double *out); + +EXTERN_ELEMFUNCT void cpowa(floatComplex *value, int size, floatComplex* expand, floatComplex *out); + +EXTERN_ELEMFUNCT void zpowa(doubleComplex *value, int size, doubleComplex* expand, doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__POW_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/round.h b/2.3-1/src/c/elementaryFunctions/includes/round.h new file mode 100644 index 00000000..1c3c0cea --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/round.h @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ROUND_H__ +#define __ROUND_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* + round(x) rounds the elements of x to the nearest integers. +*/ + +EXTERN_ELEMFUNCT float srounds(float in); + +EXTERN_ELEMFUNCT double drounds(double in); + +EXTERN_ELEMFUNCT floatComplex crounds(floatComplex in); + +EXTERN_ELEMFUNCT doubleComplex zrounds(doubleComplex in); + +EXTERN_ELEMFUNCT void srounda(float* in, int size, float* out); + +EXTERN_ELEMFUNCT void drounda(double* in, int size, double* out); + +EXTERN_ELEMFUNCT void crounda(floatComplex* in, int size, floatComplex* out); + +EXTERN_ELEMFUNCT void zrounda(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ROUND_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/sin.h b/2.3-1/src/c/elementaryFunctions/includes/sin.h new file mode 100644 index 00000000..198b0665 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/sin.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SIN_H__ +#define __SIN_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Sine for different types . +*/ + +/* +** \brief Float Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float ssins(float in); + +/* +** \brief Double Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dsins(double in); + +/* +** \brief Float Complex Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex csins(floatComplex in); + +/* +** \brief Double Complex Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zsins(doubleComplex in); + +/* +** \brief Float Matrix Sine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ssina(float* in, int size, float* out); + +/* +** \brief Double Matrix Sine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dsina(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Sine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void csina(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Sine function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zsina(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__SIN_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/sinh.h b/2.3-1/src/c/elementaryFunctions/includes/sinh.h new file mode 100644 index 00000000..c052a901 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/sinh.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SINH_H__ +#define __SINH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Sine for different types . +*/ + +/* +** \brief Float Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float ssinhs(float in); + +/* +** \brief Double Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dsinhs(double in); + +/* +** \brief Float Complex Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex csinhs(floatComplex in); + +/* +** \brief Double Complex Sine function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zsinhs(doubleComplex in); + +/* +** \brief Float Matrix Sine function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ssinha(float* in, int size, float* out); + +/* +** \brief Double Matrix Sine function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dsinha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Sine function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void csinha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Sine function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zsinha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__SINH_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/sqrt.h b/2.3-1/src/c/elementaryFunctions/includes/sqrt.h new file mode 100644 index 00000000..7885c9c2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/sqrt.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SQRT_H__ +#define __SQRT_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Square Root for different types . +*/ + +/* +** \brief Float Square Root function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float ssqrts(float in); + +/* +** \brief Double Square Root function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dsqrts(double in); + +/* +** \brief Float Complex Square Root function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex csqrts(floatComplex in); + +/* +** \brief Double Complex Square Root function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex zsqrts(doubleComplex in); + +/* +** \brief Float Matrix Square Root function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ssqrta(float* in, int size, float* out); + +/* +** \brief Double Matrix Square Root function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dsqrta(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Square Root function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void csqrta(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Square Root function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void zsqrta(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__SQRT_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/includes/tan.h b/2.3-1/src/c/elementaryFunctions/includes/tan.h new file mode 100644 index 00000000..77ef7868 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/tan.h @@ -0,0 +1,89 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TAN_H__ +#define __TAN_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Tangeant for different types . +*/ + +/* +** \brief Float Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float stans(float in); + +/* +** \brief Double Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dtans(double in); + +/* +** \brief Float Complex Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex ctans(floatComplex in); + +/* +** \brief Double Complex Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex ztans(doubleComplex in); + +/* +** \brief Float Matrix Tangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void stana(float* in, int size, float* out); + +/* +** \brief Double Matrix Tangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dtana(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Tangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ctana(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Tangeant function +** \param in : input array value. +** \param out : input array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ztana(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__TAN_H__ */ + diff --git a/2.3-1/src/c/elementaryFunctions/includes/tanh.h b/2.3-1/src/c/elementaryFunctions/includes/tanh.h new file mode 100644 index 00000000..9ff440cf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/includes/tanh.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __TANH_H__ +#define __TANH_H__ + +#include "dynlib_elementaryfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** Compute Hyperbolic Tangeant for different types . +*/ + +/* +** \brief Float Hyperbolic Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT float stanhs(float in); + +/* +** \brief Double Hyperbolic Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT double dtanhs(double in); + +/* +** \brief Float Complex Hyperbolic Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT floatComplex ctanhs(floatComplex in); + +/* +** \brief Double Complex Hyperbolic Tangeant function +** \param in : input value. +*/ +EXTERN_ELEMFUNCT doubleComplex ztanhs(doubleComplex in); + +/* +** \brief Float Matrix Hyperbolic Tangeant function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void stanha(float* in, int size, float* out); + +/* +** \brief Double Matrix Hyperbolic Tangeant function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void dtanha(double* in, int size, double* out); + +/* +** \brief Float Complex Matrix Hyperbolic Tangeant function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ctanha(floatComplex* in, int size, floatComplex* out); + +/* +** \brief Double Complex Matrix Hyperbolic Tangeant function +** \param in : input array value. +** \param out : output array value. +** \param size : the size of in and out arrays. +*/ +EXTERN_ELEMFUNCT void ztanha(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__TANH_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/int/Makefile.am b/2.3-1/src/c/elementaryFunctions/int/Makefile.am new file mode 100644 index 00000000..be6e6617 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/Makefile.am @@ -0,0 +1,61 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libInt_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libInt.la + +libInt_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/int.h + +SRC = sints.c \ + dints.c \ + cints.c \ + zints.c \ + sinta.c \ + dinta.c \ + cinta.c \ + zinta.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/int/libInt.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatInt testDoubleInt + +TESTS = testFloatInt testDoubleInt + +# +# -*- Int Tests -*- +# +testFloatInt_SOURCES = testFloatInt.c +testFloatInt_CFLAGS = $(check_INCLUDES) +testFloatInt_LDADD = $(check_LDADD) + +testDoubleInt_SOURCES = testDoubleInt.c +testDoubleInt_CFLAGS = $(check_INCLUDES) +testDoubleInt_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/int/Makefile.in b/2.3-1/src/c/elementaryFunctions/int/Makefile.in new file mode 100644 index 00000000..524944c0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/Makefile.in @@ -0,0 +1,790 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatInt$(EXEEXT) testDoubleInt$(EXEEXT) +TESTS = testFloatInt$(EXEEXT) testDoubleInt$(EXEEXT) +subdir = src/c/elementaryFunctions/int +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libInt_la_LIBADD = +am__objects_1 = +am__objects_2 = libInt_la-sints.lo libInt_la-dints.lo \ + libInt_la-cints.lo libInt_la-zints.lo libInt_la-sinta.lo \ + libInt_la-dinta.lo libInt_la-cinta.lo libInt_la-zinta.lo +am_libInt_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libInt_la_OBJECTS = $(am_libInt_la_OBJECTS) +libInt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libInt_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleInt_OBJECTS = testDoubleInt-testDoubleInt.$(OBJEXT) +testDoubleInt_OBJECTS = $(am_testDoubleInt_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/int/libInt.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la +testDoubleInt_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleInt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleInt_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatInt_OBJECTS = testFloatInt-testFloatInt.$(OBJEXT) +testFloatInt_OBJECTS = $(am_testFloatInt_OBJECTS) +testFloatInt_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatInt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatInt_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libInt_la_SOURCES) $(testDoubleInt_SOURCES) \ + $(testFloatInt_SOURCES) +DIST_SOURCES = $(libInt_la_SOURCES) $(testDoubleInt_SOURCES) \ + $(testFloatInt_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libInt_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libInt.la +libInt_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/int.h +SRC = sints.c \ + dints.c \ + cints.c \ + zints.c \ + sinta.c \ + dinta.c \ + cinta.c \ + zinta.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/int/libInt.la \ + $(top_builddir)/src/c/elementaryFunctions/fix/libFix.la \ + @LIBMATH@ + + +# +# -*- Int Tests -*- +# +testFloatInt_SOURCES = testFloatInt.c +testFloatInt_CFLAGS = $(check_INCLUDES) +testFloatInt_LDADD = $(check_LDADD) +testDoubleInt_SOURCES = testDoubleInt.c +testDoubleInt_CFLAGS = $(check_INCLUDES) +testDoubleInt_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/int/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/int/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libInt.la: $(libInt_la_OBJECTS) $(libInt_la_DEPENDENCIES) + $(libInt_la_LINK) -rpath $(pkglibdir) $(libInt_la_OBJECTS) $(libInt_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleInt$(EXEEXT): $(testDoubleInt_OBJECTS) $(testDoubleInt_DEPENDENCIES) + @rm -f testDoubleInt$(EXEEXT) + $(testDoubleInt_LINK) $(testDoubleInt_OBJECTS) $(testDoubleInt_LDADD) $(LIBS) +testFloatInt$(EXEEXT): $(testFloatInt_OBJECTS) $(testFloatInt_DEPENDENCIES) + @rm -f testFloatInt$(EXEEXT) + $(testFloatInt_LINK) $(testFloatInt_OBJECTS) $(testFloatInt_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-cinta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-cints.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-dinta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-dints.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-sinta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-sints.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-zinta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libInt_la-zints.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleInt-testDoubleInt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatInt-testFloatInt.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libInt_la-sints.lo: sints.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-sints.lo -MD -MP -MF $(DEPDIR)/libInt_la-sints.Tpo -c -o libInt_la-sints.lo `test -f 'sints.c' || echo '$(srcdir)/'`sints.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-sints.Tpo $(DEPDIR)/libInt_la-sints.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sints.c' object='libInt_la-sints.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-sints.lo `test -f 'sints.c' || echo '$(srcdir)/'`sints.c + +libInt_la-dints.lo: dints.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-dints.lo -MD -MP -MF $(DEPDIR)/libInt_la-dints.Tpo -c -o libInt_la-dints.lo `test -f 'dints.c' || echo '$(srcdir)/'`dints.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-dints.Tpo $(DEPDIR)/libInt_la-dints.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dints.c' object='libInt_la-dints.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-dints.lo `test -f 'dints.c' || echo '$(srcdir)/'`dints.c + +libInt_la-cints.lo: cints.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-cints.lo -MD -MP -MF $(DEPDIR)/libInt_la-cints.Tpo -c -o libInt_la-cints.lo `test -f 'cints.c' || echo '$(srcdir)/'`cints.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-cints.Tpo $(DEPDIR)/libInt_la-cints.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cints.c' object='libInt_la-cints.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-cints.lo `test -f 'cints.c' || echo '$(srcdir)/'`cints.c + +libInt_la-zints.lo: zints.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-zints.lo -MD -MP -MF $(DEPDIR)/libInt_la-zints.Tpo -c -o libInt_la-zints.lo `test -f 'zints.c' || echo '$(srcdir)/'`zints.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-zints.Tpo $(DEPDIR)/libInt_la-zints.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zints.c' object='libInt_la-zints.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-zints.lo `test -f 'zints.c' || echo '$(srcdir)/'`zints.c + +libInt_la-sinta.lo: sinta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-sinta.lo -MD -MP -MF $(DEPDIR)/libInt_la-sinta.Tpo -c -o libInt_la-sinta.lo `test -f 'sinta.c' || echo '$(srcdir)/'`sinta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-sinta.Tpo $(DEPDIR)/libInt_la-sinta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinta.c' object='libInt_la-sinta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-sinta.lo `test -f 'sinta.c' || echo '$(srcdir)/'`sinta.c + +libInt_la-dinta.lo: dinta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-dinta.lo -MD -MP -MF $(DEPDIR)/libInt_la-dinta.Tpo -c -o libInt_la-dinta.lo `test -f 'dinta.c' || echo '$(srcdir)/'`dinta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-dinta.Tpo $(DEPDIR)/libInt_la-dinta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinta.c' object='libInt_la-dinta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-dinta.lo `test -f 'dinta.c' || echo '$(srcdir)/'`dinta.c + +libInt_la-cinta.lo: cinta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-cinta.lo -MD -MP -MF $(DEPDIR)/libInt_la-cinta.Tpo -c -o libInt_la-cinta.lo `test -f 'cinta.c' || echo '$(srcdir)/'`cinta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-cinta.Tpo $(DEPDIR)/libInt_la-cinta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinta.c' object='libInt_la-cinta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-cinta.lo `test -f 'cinta.c' || echo '$(srcdir)/'`cinta.c + +libInt_la-zinta.lo: zinta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -MT libInt_la-zinta.lo -MD -MP -MF $(DEPDIR)/libInt_la-zinta.Tpo -c -o libInt_la-zinta.lo `test -f 'zinta.c' || echo '$(srcdir)/'`zinta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libInt_la-zinta.Tpo $(DEPDIR)/libInt_la-zinta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinta.c' object='libInt_la-zinta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libInt_la_CFLAGS) $(CFLAGS) -c -o libInt_la-zinta.lo `test -f 'zinta.c' || echo '$(srcdir)/'`zinta.c + +testDoubleInt-testDoubleInt.o: testDoubleInt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleInt_CFLAGS) $(CFLAGS) -MT testDoubleInt-testDoubleInt.o -MD -MP -MF $(DEPDIR)/testDoubleInt-testDoubleInt.Tpo -c -o testDoubleInt-testDoubleInt.o `test -f 'testDoubleInt.c' || echo '$(srcdir)/'`testDoubleInt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleInt-testDoubleInt.Tpo $(DEPDIR)/testDoubleInt-testDoubleInt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleInt.c' object='testDoubleInt-testDoubleInt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleInt_CFLAGS) $(CFLAGS) -c -o testDoubleInt-testDoubleInt.o `test -f 'testDoubleInt.c' || echo '$(srcdir)/'`testDoubleInt.c + +testDoubleInt-testDoubleInt.obj: testDoubleInt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleInt_CFLAGS) $(CFLAGS) -MT testDoubleInt-testDoubleInt.obj -MD -MP -MF $(DEPDIR)/testDoubleInt-testDoubleInt.Tpo -c -o testDoubleInt-testDoubleInt.obj `if test -f 'testDoubleInt.c'; then $(CYGPATH_W) 'testDoubleInt.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleInt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleInt-testDoubleInt.Tpo $(DEPDIR)/testDoubleInt-testDoubleInt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleInt.c' object='testDoubleInt-testDoubleInt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleInt_CFLAGS) $(CFLAGS) -c -o testDoubleInt-testDoubleInt.obj `if test -f 'testDoubleInt.c'; then $(CYGPATH_W) 'testDoubleInt.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleInt.c'; fi` + +testFloatInt-testFloatInt.o: testFloatInt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatInt_CFLAGS) $(CFLAGS) -MT testFloatInt-testFloatInt.o -MD -MP -MF $(DEPDIR)/testFloatInt-testFloatInt.Tpo -c -o testFloatInt-testFloatInt.o `test -f 'testFloatInt.c' || echo '$(srcdir)/'`testFloatInt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatInt-testFloatInt.Tpo $(DEPDIR)/testFloatInt-testFloatInt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatInt.c' object='testFloatInt-testFloatInt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatInt_CFLAGS) $(CFLAGS) -c -o testFloatInt-testFloatInt.o `test -f 'testFloatInt.c' || echo '$(srcdir)/'`testFloatInt.c + +testFloatInt-testFloatInt.obj: testFloatInt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatInt_CFLAGS) $(CFLAGS) -MT testFloatInt-testFloatInt.obj -MD -MP -MF $(DEPDIR)/testFloatInt-testFloatInt.Tpo -c -o testFloatInt-testFloatInt.obj `if test -f 'testFloatInt.c'; then $(CYGPATH_W) 'testFloatInt.c'; else $(CYGPATH_W) '$(srcdir)/testFloatInt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatInt-testFloatInt.Tpo $(DEPDIR)/testFloatInt-testFloatInt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatInt.c' object='testFloatInt-testFloatInt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatInt_CFLAGS) $(CFLAGS) -c -o testFloatInt-testFloatInt.obj `if test -f 'testFloatInt.c'; then $(CYGPATH_W) 'testFloatInt.c'; else $(CYGPATH_W) '$(srcdir)/testFloatInt.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/int/cinta.c b/2.3-1/src/c/elementaryFunctions/int/cinta.c new file mode 100644 index 00000000..a567b7af --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/cinta.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fix.h" +#include "int.h" + +void cinta(floatComplex* x, int size, floatComplex* out) { + cfixa(x,size,out); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/cints.c b/2.3-1/src/c/elementaryFunctions/int/cints.c new file mode 100644 index 00000000..0a3fad2f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/cints.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +floatComplex cints(floatComplex x) { + return cfixs(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/dinta.c b/2.3-1/src/c/elementaryFunctions/int/dinta.c new file mode 100644 index 00000000..5e34f757 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/dinta.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +void dinta(double* x, int size, double* out) { + dfixa(x,size,out); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/dints.c b/2.3-1/src/c/elementaryFunctions/int/dints.c new file mode 100644 index 00000000..82150665 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/dints.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +double dints(double x) { + return dfixs(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/sinta.c b/2.3-1/src/c/elementaryFunctions/int/sinta.c new file mode 100644 index 00000000..0035db05 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/sinta.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +void sinta(float* x, int size, float* out) { + sfixa(x,size,out); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/sints.c b/2.3-1/src/c/elementaryFunctions/int/sints.c new file mode 100644 index 00000000..dd65a526 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/sints.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +float sints(float x) { + return sfixs(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/testDoubleInt.c b/2.3-1/src/c/elementaryFunctions/int/testDoubleInt.c new file mode 100644 index 00000000..f5bf78b8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/testDoubleInt.c @@ -0,0 +1,160 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "int.h" + +static void dintsTest(void) { + /* FIXME : results could be differents of what wanted because of C number + where 1 can be 0.99999999999992347 + This example fail : + for(i=-2;i<-1;i+=.1){ + out = dints(i); + } + In the case of -1, -1 wasn't -1 exactly so error + */ + assert ((fabs( dints(-2) - (-2))/fabs(dints(-2)))<1e-16); + assert ((fabs( dints(-1.9) - (-1))/fabs(dints(-1.9)))<1e-16); + assert ((fabs( dints(-1.8) - (-1))/fabs(dints(-1.8)))<1e-16); + assert ((fabs( dints(-1.7) - (-1))/fabs(dints(-1.7)))<1e-16); + assert ((fabs( dints(-1.6) - (-1))/fabs(dints(-1.6)))<1e-16); + assert ((fabs( dints(-1.5) - (-1))/fabs(dints(-1.5)))<1e-16); + assert ((fabs( dints(-1.4) - (-1))/fabs(dints(-1.4)))<1e-16); + assert ((fabs( dints(-1.3) - (-1))/fabs(dints(-1.3)))<1e-16); + assert ((fabs( dints(-1.2) - (-1))/fabs(dints(-1.2)))<1e-16); + assert ((fabs( dints(-1.1) - (-1))/fabs(dints(-1.1)))<1e-16); + assert ((fabs( dints(-1.0) - (-1))/fabs(dints(-1.0)))<1e-16); + assert (fabs( dints(-.9))<1e-16); + assert ((fabs( dints(1.0) - (1))/fabs(dints(1.0)))<1e-16); + assert ((fabs( dints(1.1) - (1))/fabs(dints(1.1)))<1e-16); + assert ((fabs( dints(1.2) - (1))/fabs(dints(1.2)))<1e-16); + assert ((fabs( dints(1.3) - (1))/fabs(dints(1.3)))<1e-16); + assert ((fabs( dints(1.4) - (1))/fabs(dints(1.4)))<1e-16); + assert ((fabs( dints(1.5) - (1))/fabs(dints(1.5)))<1e-16); + assert ((fabs( dints(1.6) - (1))/fabs(dints(1.6)))<1e-16); + assert ((fabs( dints(1.7) - (1))/fabs(dints(1.7)))<1e-16); + assert ((fabs( dints(1.8) - (1))/fabs(dints(1.8)))<1e-16); + assert ((fabs( dints(1.9) - (1))/fabs(dints(1.9)))<1e-16); + assert ((fabs( dints(2.0) - (2))/fabs(dints(2.0)))<1e-16); + +} + +static void zintsTest(void) { + doubleComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=DoubleComplex(-2,1); + out = zints(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.9,1.1); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.8,1.2); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.7,1.3); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.6,1.4); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.5,1.5); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.6); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.3,1.7); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.2,1.8); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.9); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.0,2.0); + out = zints(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-.9,.9); + out = zints(in); + assert (fabs( zreals(out))<1e-16); + assert (fabs( zimags(out))<1e-16); +} + +static void dintaTest(void) { + int i; + double in[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double res[10]={1,2,-2,-3,-4,6,4,4,0,0}; + double out[10]; + + dinta(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); + + + +} + +static void zintaTest(void) { + int i; + double inR[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double inI[10]={5.4,1.8,1.4,-4.0,-2.7,-0.3,1.5,1.4,7.3,-4.6}; + double resR[10]={1,2,-2,-3,-4,6,4,4,0,0}; + double resI[10]={5,1,1,-4,-2,0,1,1,7,-4}; + doubleComplex out[10],*in; + + in=DoubleComplexMatrix(inR,inI,10); + zinta(in,10,out); + + for (i=0;i<10;i++){ + if(zreals(out[i])!=0) assert(fabs(zreals(out[i])-resR[i])/ fabs(zreals(out[i]))<1e-16); + assert(fabs(zreals(out[i])-resR[i]) <1e-16); + if(zimags(out[i])!=0) assert(fabs(zimags(out[i])-resI[i])/ fabs(zimags(out[i]))<1e-16); + assert(fabs(zimags(out[i])-resI[i]) <1e-16); + } +} + + +static int testInt() { + printf("\n>>>> Double Int Tests\n"); + dintsTest(); + zintsTest(); + dintaTest(); + zintaTest(); + + return 0; +} + +int main() { + assert(testInt() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/int/testFloatInt.c b/2.3-1/src/c/elementaryFunctions/int/testFloatInt.c new file mode 100644 index 00000000..923ebf5b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/testFloatInt.c @@ -0,0 +1,149 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "int.h" + +static void sintsTest(void) { + + assert ((fabs( sints(-2) - (-2))/fabs(sints(-2)))<1e-16); + assert ((fabs( sints(-1.9f) - (-1))/fabs(sints(-1.9f)))<1e-16); + assert ((fabs( sints(-1.8f) - (-1))/fabs(sints(-1.8f)))<1e-16); + assert ((fabs( sints(-1.7f) - (-1))/fabs(sints(-1.7f)))<1e-16); + assert ((fabs( sints(-1.6f) - (-1))/fabs(sints(-1.6f)))<1e-16); + assert ((fabs( sints(-1.5f) - (-1))/fabs(sints(-1.5f)))<1e-16); + assert ((fabs( sints(-1.4f) - (-1))/fabs(sints(-1.4f)))<1e-16); + assert ((fabs( sints(-1.3f) - (-1))/fabs(sints(-1.3f)))<1e-16); + assert ((fabs( sints(-1.2f) - (-1))/fabs(sints(-1.2f)))<1e-16); + assert ((fabs( sints(-1.1f) - (-1))/fabs(sints(-1.1f)))<1e-16); + assert ((fabs( sints(-1.0f) - (-1))/fabs(sints(-1.0f)))<1e-16); + assert (fabs( sints(-.9f))<1e-16); + assert ((fabs( sints(1.0f) - (1))/fabs(sints(1.0f)))<1e-16); + assert ((fabs( sints(1.1f) - (1))/fabs(sints(1.1f)))<1e-16); + assert ((fabs( sints(1.2f) - (1))/fabs(sints(1.2f)))<1e-16); + assert ((fabs( sints(1.3f) - (1))/fabs(sints(1.3f)))<1e-16); + assert ((fabs( sints(1.4f) - (1))/fabs(sints(1.4f)))<1e-16); + assert ((fabs( sints(1.5f) - (1))/fabs(sints(1.5f)))<1e-16); + assert ((fabs( sints(1.6f) - (1))/fabs(sints(1.6f)))<1e-16); + assert ((fabs( sints(1.7f) - (1))/fabs(sints(1.7f)))<1e-16); + assert ((fabs( sints(1.8f) - (1))/fabs(sints(1.8f)))<1e-16); + assert ((fabs( sints(1.9f) - (1))/fabs(sints(1.9f)))<1e-16); + assert ((fabs( sints(2.0f) - (2))/fabs(sints(2.0f)))<1e-16); +} + +static void cintsTest(void) { + floatComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=FloatComplex(-2,1); + out = cints(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.9f,1.1f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.8f,1.2f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.7f,1.3f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.6f,1.4f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.5f,1.5f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.4f,1.6f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.3f,1.7f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.2f,1.8f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.1f,1.9f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.0f,2.0f); + out = cints(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-.9f,.9f); + out = cints(in); + assert (fabs( creals(out))<1e-16); + assert (fabs( cimags(out))<1e-16); +} + +static void sintaTest(void) { + int i; + float in[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float res[10]={1,2,-2,-3,-4,6,4,4,0,0}; + float out[10]; + + sinta(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); + +} + +static void cintaTest(void) { + int i; + float inR[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float inI[10]={5.4f,1.8f,1.4f,-4.0f,-2.7f,-0.3f,1.5f,1.4f,7.3f,-4.6f}; + float resR[10]={1,2,-2,-3,-4,6,4,4,0,0}; + float resI[10]={5,1,1,-4,-2,0,1,1,7,-4}; + floatComplex out[10],*in; + + in=FloatComplexMatrix(inR,inI,10); + cinta(in,10,out); + + for (i=0;i<10;i++){ + if (creals(out[i])!=0) assert(fabs(creals(out[i])-resR[i])/fabs(creals(out[i])) <1e-16); + else assert(fabs(creals(out[i])-resR[i]) <1e-16); + if (cimags(out[i])!=0) assert(fabs(cimags(out[i])-resI[i])/fabs(cimags(out[i])) <1e-16); + else assert(fabs(cimags(out[i])-resI[i]) <1e-16); + } +} + +static int testInt() { + printf("\n>>>> Float Int Tests\n"); + sintsTest(); + cintsTest(); + sintaTest(); + cintaTest(); + + return 0; +} + +int main() { + assert(testInt() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/int/zinta.c b/2.3-1/src/c/elementaryFunctions/int/zinta.c new file mode 100644 index 00000000..1d6392be --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/zinta.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fix.h" +#include "int.h" + +void zinta(doubleComplex* x, int size, doubleComplex* out) { + zfixa(x,size,out); +} diff --git a/2.3-1/src/c/elementaryFunctions/int/zints.c b/2.3-1/src/c/elementaryFunctions/int/zints.c new file mode 100644 index 00000000..1c014a57 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/int/zints.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fix.h" +#include "int.h" + +doubleComplex zints(doubleComplex x) { + return zfixs(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h new file mode 100644 index 00000000..8e5c7042 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_OpDotHat.h @@ -0,0 +1,139 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPDOTHAT_H__ +#define __INT_OPDOTHAT_H__ + + +/* Scalar - Scalar */ +#define s0s0OpDotHats0(in1, in2) spows(in1, in2) + +#define d0d0OpDotHatd0(in1, in2) dpows(in1, in2) + +#define c0c0OpDotHatc0(in1, in2) cpows(in1, in2) + +#define z0z0OpDotHatz0(in1, in2) zpows(in1, in2) + +#define s0c0OpDotHatc0(in1, in2) cpows(FloatComplex(in1,0), in2) + +#define c0s0OpDotHatc0(in1, in2) cpows(in1, FloatComplex(in2,0)) + +#define d0z0OpDotHatz0(in1, in2) zpows(DoubleComplex(in1,0), in2) + +#define z0d0OpDotHatz0(in1, in2) zpows(in1, DoubleComplex(in2,0)) + + +/* Scalar - Matrix */ +#define s0s2OpDotHats2(in1, in2, size, out) {int i=0;\ + for (i=0;i +** +** +** Copyright POLIBA 2008 +*/ +/* + 1. Search for sqrt in INIT_FillSCI2LibCDirs.sci + 2. Search for // --- Function List Class. --- in INIT_FillSCI2LibCDirs.sci + 3. You will find + PrintStringInfo('s0'+ArgSeparator+'s0',ClassFileName,'file','y'); + PrintStringInfo('s0'+ArgSeparator+'c0',ClassFileName,'file','y'); + PrintStringInfo('d0'+ArgSeparator+'d0',ClassFileName,'file','y'); + PrintStringInfo('d0'+ArgSeparator+'z0',ClassFileName,'file','y'); + PrintStringInfo('c0'+ArgSeparator+'c0',ClassFileName,'file','y'); + PrintStringInfo('z0'+ArgSeparator+'z0',ClassFileName,'file','y'); + + PrintStringInfo('s2'+ArgSeparator+'s2',ClassFileName,'file','y'); + PrintStringInfo('s2'+ArgSeparator+'c2',ClassFileName,'file','y'); + PrintStringInfo('d2'+ArgSeparator+'d2',ClassFileName,'file','y'); + PrintStringInfo('d2'+ArgSeparator+'z2',ClassFileName,'file','y'); + PrintStringInfo('c2'+ArgSeparator+'c2',ClassFileName,'file','y'); + PrintStringInfo('z2'+ArgSeparator+'z2',ClassFileName,'file','y'); + 4. These are all the functions to be implemented. + 5. According to functions available in src you have to generate the mapping between + functions in step3 and functions in src. +*/ + +#ifndef __INT_SQRT_H__ +#define __INT_SQRT_H__ + +#define s0sqrts0(in) ssqrts(in) + +#define s0sqrtc0(in) csqrts(FloatComplex(in,0)) + +#define d0sqrtd0(in) dsqrts(in) + +#define d0sqrtz0(in) zsqrts(DoubleComplex(in,0)) + +#define c0sqrtc0(in) csqrts(in) + +#define z0sqrtz0(in) zsqrts(in) + +#define s2sqrts2(in,size,out) ssqrta(in, size[0]*size[1], out) + +#define s2sqrtc2(in,size,out) csqrta(FloatComplexMatrix(in,0), size[0]*size[1], out) + +#define d2sqrtd2(in,size,out) dsqrta(in, size[0]*size[1], out) + +#define d2sqrtz2(in,size,out) zsqrta(DoubleComplexMatrix(in,0), size[0]*size[1], out) + +#define c2sqrtc2(in,size,out) csqrta(in, size[0]*size[1], out) + +#define z2sqrtz2(in,size,out) zsqrta(in, size[0]*size[1], out) + +#endif /* !__INT_SQRT_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_tan.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_tan.h new file mode 100644 index 00000000..c2c3df2e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_tan.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TAN_H__ +#define __INT_TAN_H__ + +#define s0tans0(in) stans(in) + +#define d0tand0(in) dtans(in) + +#define c0tanc0(in) ctans(in) + +#define z0tanz0(in) ztans(in) + +#define s2tans2(in,size,out) stana(in, size[0]*size[1], out) + +#define d2tand2(in,size,out) dtana(in, size[0]*size[1], out) + +#define c2tanc2(in,size,out) ctana(in, size[0]*size[1], out) + +#define z2tanz2(in,size,out) ztana(in, size[0]*size[1], out) + +#endif /* !__INT_TAN_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/interfaces/int_tanh.h b/2.3-1/src/c/elementaryFunctions/interfaces/int_tanh.h new file mode 100644 index 00000000..1819d3a1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/interfaces/int_tanh.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TANH_H__ +#define __INT_TANH_H__ + +#define s0tanhs0(in) stanhs(in) + +#define d0tanhd0(in) dtanhs(in) + +#define c0tanhc0(in) ctanhs(in) + +#define z0tanhz0(in) ztanhs(in) + +#define s2tanhs2(in,size,out) stanha(in, size[0]*size[1], out) + +#define d2tanhd2(in,size,out) dtanha(in, size[0]*size[1], out) + +#define c2tanhc2(in,size,out) ctanha(in, size[0]*size[1], out) + +#define z2tanhz2(in,size,out) ztanha(in, size[0]*size[1], out) + +#endif /* !__INT_TANH_H__ */ diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.am b/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.am new file mode 100644 index 00000000..16cd3465 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.am @@ -0,0 +1,56 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libLnp1m1_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libLnp1m1.la + +libLnp1m1_la_SOURCES = $(HEAD) $(SRC) + +SRC = slnp1m1s.c \ + dlnp1m1s.c + +HEAD = $(top_builddir)/src/c/elementaryFunctions/includes/lnp1m1.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatLnp1m1 testDoubleLnp1m1 + +TESTS = testFloatLnp1m1 testDoubleLnp1m1 + +testFloatLnp1m1_SOURCES = testLnp1m1.h testFloatLnp1m1.c +testFloatLnp1m1_CFLAGS = $(check_INCLUDES) +testFloatLnp1m1_LDADD = $(check_LDADD) + +testDoubleLnp1m1_SOURCES = testLnp1m1.h testDoubleLnp1m1.c +testDoubleLnp1m1_CFLAGS = $(check_INCLUDES) +testDoubleLnp1m1_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.in b/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.in new file mode 100644 index 00000000..e3ddeef3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/Makefile.in @@ -0,0 +1,743 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatLnp1m1$(EXEEXT) testDoubleLnp1m1$(EXEEXT) +TESTS = testFloatLnp1m1$(EXEEXT) testDoubleLnp1m1$(EXEEXT) +subdir = src/c/elementaryFunctions/lnp1m1 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLnp1m1_la_LIBADD = +am__objects_1 = +am__objects_2 = libLnp1m1_la-slnp1m1s.lo libLnp1m1_la-dlnp1m1s.lo +am_libLnp1m1_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libLnp1m1_la_OBJECTS = $(am_libLnp1m1_la_OBJECTS) +libLnp1m1_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLnp1m1_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLnp1m1_OBJECTS = \ + testDoubleLnp1m1-testDoubleLnp1m1.$(OBJEXT) +testDoubleLnp1m1_OBJECTS = $(am_testDoubleLnp1m1_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleLnp1m1_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleLnp1m1_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLnp1m1_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLnp1m1_OBJECTS = \ + testFloatLnp1m1-testFloatLnp1m1.$(OBJEXT) +testFloatLnp1m1_OBJECTS = $(am_testFloatLnp1m1_OBJECTS) +testFloatLnp1m1_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatLnp1m1_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLnp1m1_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLnp1m1_la_SOURCES) $(testDoubleLnp1m1_SOURCES) \ + $(testFloatLnp1m1_SOURCES) +DIST_SOURCES = $(libLnp1m1_la_SOURCES) $(testDoubleLnp1m1_SOURCES) \ + $(testFloatLnp1m1_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLnp1m1_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLnp1m1.la +libLnp1m1_la_SOURCES = $(HEAD) $(SRC) +SRC = slnp1m1s.c \ + dlnp1m1s.c + +HEAD = $(top_builddir)/src/c/elementaryFunctions/includes/lnp1m1.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +testFloatLnp1m1_SOURCES = testLnp1m1.h testFloatLnp1m1.c +testFloatLnp1m1_CFLAGS = $(check_INCLUDES) +testFloatLnp1m1_LDADD = $(check_LDADD) +testDoubleLnp1m1_SOURCES = testLnp1m1.h testDoubleLnp1m1.c +testDoubleLnp1m1_CFLAGS = $(check_INCLUDES) +testDoubleLnp1m1_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/lnp1m1/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/lnp1m1/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLnp1m1.la: $(libLnp1m1_la_OBJECTS) $(libLnp1m1_la_DEPENDENCIES) + $(libLnp1m1_la_LINK) -rpath $(pkglibdir) $(libLnp1m1_la_OBJECTS) $(libLnp1m1_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLnp1m1$(EXEEXT): $(testDoubleLnp1m1_OBJECTS) $(testDoubleLnp1m1_DEPENDENCIES) + @rm -f testDoubleLnp1m1$(EXEEXT) + $(testDoubleLnp1m1_LINK) $(testDoubleLnp1m1_OBJECTS) $(testDoubleLnp1m1_LDADD) $(LIBS) +testFloatLnp1m1$(EXEEXT): $(testFloatLnp1m1_OBJECTS) $(testFloatLnp1m1_DEPENDENCIES) + @rm -f testFloatLnp1m1$(EXEEXT) + $(testFloatLnp1m1_LINK) $(testFloatLnp1m1_OBJECTS) $(testFloatLnp1m1_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLnp1m1_la-dlnp1m1s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLnp1m1_la-slnp1m1s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLnp1m1_la-slnp1m1s.lo: slnp1m1s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLnp1m1_la_CFLAGS) $(CFLAGS) -MT libLnp1m1_la-slnp1m1s.lo -MD -MP -MF $(DEPDIR)/libLnp1m1_la-slnp1m1s.Tpo -c -o libLnp1m1_la-slnp1m1s.lo `test -f 'slnp1m1s.c' || echo '$(srcdir)/'`slnp1m1s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLnp1m1_la-slnp1m1s.Tpo $(DEPDIR)/libLnp1m1_la-slnp1m1s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slnp1m1s.c' object='libLnp1m1_la-slnp1m1s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLnp1m1_la_CFLAGS) $(CFLAGS) -c -o libLnp1m1_la-slnp1m1s.lo `test -f 'slnp1m1s.c' || echo '$(srcdir)/'`slnp1m1s.c + +libLnp1m1_la-dlnp1m1s.lo: dlnp1m1s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLnp1m1_la_CFLAGS) $(CFLAGS) -MT libLnp1m1_la-dlnp1m1s.lo -MD -MP -MF $(DEPDIR)/libLnp1m1_la-dlnp1m1s.Tpo -c -o libLnp1m1_la-dlnp1m1s.lo `test -f 'dlnp1m1s.c' || echo '$(srcdir)/'`dlnp1m1s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLnp1m1_la-dlnp1m1s.Tpo $(DEPDIR)/libLnp1m1_la-dlnp1m1s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlnp1m1s.c' object='libLnp1m1_la-dlnp1m1s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLnp1m1_la_CFLAGS) $(CFLAGS) -c -o libLnp1m1_la-dlnp1m1s.lo `test -f 'dlnp1m1s.c' || echo '$(srcdir)/'`dlnp1m1s.c + +testDoubleLnp1m1-testDoubleLnp1m1.o: testDoubleLnp1m1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLnp1m1_CFLAGS) $(CFLAGS) -MT testDoubleLnp1m1-testDoubleLnp1m1.o -MD -MP -MF $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Tpo -c -o testDoubleLnp1m1-testDoubleLnp1m1.o `test -f 'testDoubleLnp1m1.c' || echo '$(srcdir)/'`testDoubleLnp1m1.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Tpo $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLnp1m1.c' object='testDoubleLnp1m1-testDoubleLnp1m1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLnp1m1_CFLAGS) $(CFLAGS) -c -o testDoubleLnp1m1-testDoubleLnp1m1.o `test -f 'testDoubleLnp1m1.c' || echo '$(srcdir)/'`testDoubleLnp1m1.c + +testDoubleLnp1m1-testDoubleLnp1m1.obj: testDoubleLnp1m1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLnp1m1_CFLAGS) $(CFLAGS) -MT testDoubleLnp1m1-testDoubleLnp1m1.obj -MD -MP -MF $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Tpo -c -o testDoubleLnp1m1-testDoubleLnp1m1.obj `if test -f 'testDoubleLnp1m1.c'; then $(CYGPATH_W) 'testDoubleLnp1m1.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLnp1m1.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Tpo $(DEPDIR)/testDoubleLnp1m1-testDoubleLnp1m1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLnp1m1.c' object='testDoubleLnp1m1-testDoubleLnp1m1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLnp1m1_CFLAGS) $(CFLAGS) -c -o testDoubleLnp1m1-testDoubleLnp1m1.obj `if test -f 'testDoubleLnp1m1.c'; then $(CYGPATH_W) 'testDoubleLnp1m1.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLnp1m1.c'; fi` + +testFloatLnp1m1-testFloatLnp1m1.o: testFloatLnp1m1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLnp1m1_CFLAGS) $(CFLAGS) -MT testFloatLnp1m1-testFloatLnp1m1.o -MD -MP -MF $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Tpo -c -o testFloatLnp1m1-testFloatLnp1m1.o `test -f 'testFloatLnp1m1.c' || echo '$(srcdir)/'`testFloatLnp1m1.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Tpo $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLnp1m1.c' object='testFloatLnp1m1-testFloatLnp1m1.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLnp1m1_CFLAGS) $(CFLAGS) -c -o testFloatLnp1m1-testFloatLnp1m1.o `test -f 'testFloatLnp1m1.c' || echo '$(srcdir)/'`testFloatLnp1m1.c + +testFloatLnp1m1-testFloatLnp1m1.obj: testFloatLnp1m1.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLnp1m1_CFLAGS) $(CFLAGS) -MT testFloatLnp1m1-testFloatLnp1m1.obj -MD -MP -MF $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Tpo -c -o testFloatLnp1m1-testFloatLnp1m1.obj `if test -f 'testFloatLnp1m1.c'; then $(CYGPATH_W) 'testFloatLnp1m1.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLnp1m1.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Tpo $(DEPDIR)/testFloatLnp1m1-testFloatLnp1m1.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLnp1m1.c' object='testFloatLnp1m1-testFloatLnp1m1.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLnp1m1_CFLAGS) $(CFLAGS) -c -o testFloatLnp1m1-testFloatLnp1m1.obj `if test -f 'testFloatLnp1m1.c'; then $(CYGPATH_W) 'testFloatLnp1m1.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLnp1m1.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c b/2.3-1/src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c new file mode 100644 index 00000000..7e1759be --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/dlnp1m1s.c @@ -0,0 +1,77 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "lnp1m1.h" +#include "abs.h" + +/* + PURPOSE : Compute v = log ( (1 + s)/(1 - s) ) + for small s, this is for |s| < SLIM = 0.20 + + ALGORITHM : + 1/ if |s| is "very small" we use a truncated + taylor dvp (by keeping 3 terms) from : + 2 4 6 + t = 2 * s * ( 1 + 1/3 s + 1/5 s + [ 1/7 s + ....] ) + 2 4 + t = 2 * s * ( 1 + 1/3 s + 1/5 s + er) + + The limit E until we use this formula may be simply + gotten so that the negliged part er is such that : + 2 4 + (#) er <= epsm * ( 1 + 1/3 s + 1/5 s ) for all |s|<= E + + As er = 1/7 s^6 + 1/9 s^8 + ... + er <= 1/7 * s^6 ( 1 + s^2 + s^4 + ...) = 1/7 s^6/(1-s^2) + + the inequality (#) is forced if : + + 1/7 s^6 / (1-s^2) <= epsm * ( 1 + 1/3 s^2 + 1/5 s^4 ) + + s^6 <= 7 epsm * (1 - 2/3 s^2 - 3/15 s^4 - 1/5 s^6) + + So that E is very near (7 epsm)^(1/6) (approximately 3.032d-3): + + 2/ For larger |s| we used a minimax polynome : + + yi = s * (2 + d3 s^3 + d5 s^5 .... + d13 s^13 + d15 s^15) + + This polynome was computed (by some remes algorithm) following + (*) the sin(x) example (p 39) of the book : + + "ELEMENTARY FUNCTIONS" + "Algorithms and implementation" + J.M. Muller (Birkhauser) + + (*) without the additionnal raffinement to get the first coefs + very near floating point numbers) +*/ +double dlnp1m1s(double Var) +{ + static double D3 = 0.66666666666672679472; + static double D5 = 0.39999999996176889299; + static double D7 = 0.28571429392829380980; + static double D9 = 0.22222138684562683797; + static double D11 = 0.18186349187499222459; + static double D13 = 0.15250315884469364710; + static double D15 = 0.15367270224757008114; + static double E = 3.032E-3; + static double C3 = 2.0/3.0; + static double C5 = 2.0/5.0; + + double S2 = Var * Var; + if( dabss(Var) <= E) + return Var * (2 + S2 * (C3 + C5 * S2)); + else + return Var * (2 + S2 * (D3 + S2 * (D5 + S2 * (D7 + S2 * (D9 + S2 * (D11 + S2 * (D13 + S2 * D15))))))); +} diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/slnp1m1s.c b/2.3-1/src/c/elementaryFunctions/lnp1m1/slnp1m1s.c new file mode 100644 index 00000000..9940810c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/slnp1m1s.c @@ -0,0 +1,77 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "lnp1m1.h" +#include "abs.h" + +/* + PURPOSE : Compute v = log ( (1 + s)/(1 - s) ) + for small s, this is for |s| < SLIM = 0.20 + + ALGORITHM : + 1/ if |s| is "very small" we use a truncated + taylor dvp (by keeping 3 terms) from : + 2 4 6 + t = 2 * s * ( 1 + 1/3 s + 1/5 s + [ 1/7 s + ....] ) + 2 4 + t = 2 * s * ( 1 + 1/3 s + 1/5 s + er) + + The limit E until we use this formula may be simply + gotten so that the negliged part er is such that : + 2 4 + (#) er <= epsm * ( 1 + 1/3 s + 1/5 s ) for all |s|<= E + + As er = 1/7 s^6 + 1/9 s^8 + ... + er <= 1/7 * s^6 ( 1 + s^2 + s^4 + ...) = 1/7 s^6/(1-s^2) + + the inequality (#) is forced if : + + 1/7 s^6 / (1-s^2) <= epsm * ( 1 + 1/3 s^2 + 1/5 s^4 ) + + s^6 <= 7 epsm * (1 - 2/3 s^2 - 3/15 s^4 - 1/5 s^6) + + So that E is very near (7 epsm)^(1/6) (approximately 3.032d-3): + + 2/ For larger |s| we used a minimax polynome : + + yi = s * (2 + d3 s^3 + d5 s^5 .... + d13 s^13 + d15 s^15) + + This polynome was computed (by some remes algorithm) following + (*) the sin(x) example (p 39) of the book : + + "ELEMENTARY FUNCTIONS" + "Algorithms and implementation" + J.M. Muller (Birkhauser) + + (*) without the additionnal raffinement to get the first coefs + very near floating point numbers) +*/ +float slnp1m1s(float Var) +{ + static float D3 = 0.66666666666672679472f; + static float D5 = 0.39999999996176889299f; + static float D7 = 0.28571429392829380980f; + static float D9 = 0.22222138684562683797f; + static float D11 = 0.18186349187499222459f; + static float D13 = 0.15250315884469364710f; + static float D15 = 0.15367270224757008114f; + static float E = 3.032E-3f; + static float C3 = 2.0f/3.0f; + static float C5 = 2.0f/5.0f; + + float S2 = Var * Var; + if( sabss(Var) <= E) + return Var * (2 + S2 * (C3 + C5 * S2)); + else + return Var * (2 + S2 * (D3 + S2 * (D5 + S2 * (D7 + S2 * (D9 + S2 * (D11 + S2 * (D13 + S2 * D15))))))); +} diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/testDoubleLnp1m1.c b/2.3-1/src/c/elementaryFunctions/lnp1m1/testDoubleLnp1m1.c new file mode 100644 index 00000000..701d986c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/testDoubleLnp1m1.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLnp1m1.h" + +void dlnp1m1sTest(void) { + double value = 0; + double maxValue = 1; + double increment = 1e-3; + printf(">> Double scalar\n"); + while (value <= maxValue) + { + printf("dlnp1m1s(%e) = %e\n", value, dlnp1m1s(value)); + value += increment; + } +} + +int testLnp1m1(void) { + printf("\n>>>> Double Lnp1m1 Tests\n"); + dlnp1m1sTest(); + return 0; +} + +int main(void) { + assert(testLnp1m1() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/testFloatLnp1m1.c b/2.3-1/src/c/elementaryFunctions/lnp1m1/testFloatLnp1m1.c new file mode 100644 index 00000000..d144c1bf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/testFloatLnp1m1.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLnp1m1.h" + +void slnp1m1sTest(void) { + float value = 0.0f; + float maxValue = 1.0f; + float increment = 1e-3f; + printf(">> Float scalar\n"); + while (value <= maxValue) + { + printf("slnp1m1s(%e) = %e\n", value, slnp1m1s(value)); + value += increment; + } +} + +int testLnp1m1(void) { + printf("\n>>>> Float Lnp1m1 Tests\n"); + slnp1m1sTest(); + return 0; +} + +int main(void) { + assert(testLnp1m1() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/lnp1m1/testLnp1m1.h b/2.3-1/src/c/elementaryFunctions/lnp1m1/testLnp1m1.h new file mode 100644 index 00000000..888a9238 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/lnp1m1/testLnp1m1.h @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTLNP1M1_H_ +#define _TESTLNP1M1_H_ + +#include +#include +#include "lnp1m1.h" + +void slnp1m1sTest(void); + +void dlnp1m1sTest(void); + +int testLnp1m1(void); + +#endif /* ! _TESTLNP1M1_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/log/Makefile.am b/2.3-1/src/c/elementaryFunctions/log/Makefile.am new file mode 100644 index 00000000..6fd45c8b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libLog_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libLog.la + +libLog_la_SOURCES = $(HEAD) $(SRC) + +SRC = slogs.c \ + dlogs.c \ + clogs.c \ + zlogs.c \ + sloga.c \ + dloga.c \ + cloga.c \ + zloga.c + +HEAD = $(top_builddir)/elementaryFunctions/includes/log.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatLog testDoubleLog + +TESTS = testFloatLog testDoubleLog + +testFloatLog_SOURCES = testLog.h testFloatLog.c +testFloatLog_CFLAGS = $(check_INCLUDES) +testFloatLog_LDADD = $(check_LDADD) + +testDoubleLog_SOURCES = testLog.h testDoubleLog.c +testDoubleLog_CFLAGS = $(check_INCLUDES) +testDoubleLog_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/log/Makefile.in b/2.3-1/src/c/elementaryFunctions/log/Makefile.in new file mode 100644 index 00000000..e5cfa60c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/Makefile.in @@ -0,0 +1,802 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatLog$(EXEEXT) testDoubleLog$(EXEEXT) +TESTS = testFloatLog$(EXEEXT) testDoubleLog$(EXEEXT) +subdir = src/c/elementaryFunctions/log +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLog_la_LIBADD = +am__objects_1 = +am__objects_2 = libLog_la-slogs.lo libLog_la-dlogs.lo \ + libLog_la-clogs.lo libLog_la-zlogs.lo libLog_la-sloga.lo \ + libLog_la-dloga.lo libLog_la-cloga.lo libLog_la-zloga.lo +am_libLog_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libLog_la_OBJECTS = $(am_libLog_la_OBJECTS) +libLog_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLog_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLog_OBJECTS = testDoubleLog-testDoubleLog.$(OBJEXT) +testDoubleLog_OBJECTS = $(am_testDoubleLog_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleLog_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleLog_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLog_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLog_OBJECTS = testFloatLog-testFloatLog.$(OBJEXT) +testFloatLog_OBJECTS = $(am_testFloatLog_OBJECTS) +testFloatLog_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatLog_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLog_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLog_la_SOURCES) $(testDoubleLog_SOURCES) \ + $(testFloatLog_SOURCES) +DIST_SOURCES = $(libLog_la_SOURCES) $(testDoubleLog_SOURCES) \ + $(testFloatLog_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLog_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLog.la +libLog_la_SOURCES = $(HEAD) $(SRC) +SRC = slogs.c \ + dlogs.c \ + clogs.c \ + zlogs.c \ + sloga.c \ + dloga.c \ + cloga.c \ + zloga.c + +HEAD = $(top_builddir)/elementaryFunctions/includes/log.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +testFloatLog_SOURCES = testLog.h testFloatLog.c +testFloatLog_CFLAGS = $(check_INCLUDES) +testFloatLog_LDADD = $(check_LDADD) +testDoubleLog_SOURCES = testLog.h testDoubleLog.c +testDoubleLog_CFLAGS = $(check_INCLUDES) +testDoubleLog_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/log/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/log/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLog.la: $(libLog_la_OBJECTS) $(libLog_la_DEPENDENCIES) + $(libLog_la_LINK) -rpath $(pkglibdir) $(libLog_la_OBJECTS) $(libLog_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLog$(EXEEXT): $(testDoubleLog_OBJECTS) $(testDoubleLog_DEPENDENCIES) + @rm -f testDoubleLog$(EXEEXT) + $(testDoubleLog_LINK) $(testDoubleLog_OBJECTS) $(testDoubleLog_LDADD) $(LIBS) +testFloatLog$(EXEEXT): $(testFloatLog_OBJECTS) $(testFloatLog_DEPENDENCIES) + @rm -f testFloatLog$(EXEEXT) + $(testFloatLog_LINK) $(testFloatLog_OBJECTS) $(testFloatLog_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-cloga.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-clogs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-dloga.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-dlogs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-sloga.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-slogs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-zloga.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog_la-zlogs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLog-testDoubleLog.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLog-testFloatLog.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLog_la-slogs.lo: slogs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-slogs.lo -MD -MP -MF $(DEPDIR)/libLog_la-slogs.Tpo -c -o libLog_la-slogs.lo `test -f 'slogs.c' || echo '$(srcdir)/'`slogs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-slogs.Tpo $(DEPDIR)/libLog_la-slogs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slogs.c' object='libLog_la-slogs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-slogs.lo `test -f 'slogs.c' || echo '$(srcdir)/'`slogs.c + +libLog_la-dlogs.lo: dlogs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-dlogs.lo -MD -MP -MF $(DEPDIR)/libLog_la-dlogs.Tpo -c -o libLog_la-dlogs.lo `test -f 'dlogs.c' || echo '$(srcdir)/'`dlogs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-dlogs.Tpo $(DEPDIR)/libLog_la-dlogs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlogs.c' object='libLog_la-dlogs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-dlogs.lo `test -f 'dlogs.c' || echo '$(srcdir)/'`dlogs.c + +libLog_la-clogs.lo: clogs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-clogs.lo -MD -MP -MF $(DEPDIR)/libLog_la-clogs.Tpo -c -o libLog_la-clogs.lo `test -f 'clogs.c' || echo '$(srcdir)/'`clogs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-clogs.Tpo $(DEPDIR)/libLog_la-clogs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clogs.c' object='libLog_la-clogs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-clogs.lo `test -f 'clogs.c' || echo '$(srcdir)/'`clogs.c + +libLog_la-zlogs.lo: zlogs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-zlogs.lo -MD -MP -MF $(DEPDIR)/libLog_la-zlogs.Tpo -c -o libLog_la-zlogs.lo `test -f 'zlogs.c' || echo '$(srcdir)/'`zlogs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-zlogs.Tpo $(DEPDIR)/libLog_la-zlogs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlogs.c' object='libLog_la-zlogs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-zlogs.lo `test -f 'zlogs.c' || echo '$(srcdir)/'`zlogs.c + +libLog_la-sloga.lo: sloga.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-sloga.lo -MD -MP -MF $(DEPDIR)/libLog_la-sloga.Tpo -c -o libLog_la-sloga.lo `test -f 'sloga.c' || echo '$(srcdir)/'`sloga.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-sloga.Tpo $(DEPDIR)/libLog_la-sloga.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sloga.c' object='libLog_la-sloga.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-sloga.lo `test -f 'sloga.c' || echo '$(srcdir)/'`sloga.c + +libLog_la-dloga.lo: dloga.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-dloga.lo -MD -MP -MF $(DEPDIR)/libLog_la-dloga.Tpo -c -o libLog_la-dloga.lo `test -f 'dloga.c' || echo '$(srcdir)/'`dloga.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-dloga.Tpo $(DEPDIR)/libLog_la-dloga.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dloga.c' object='libLog_la-dloga.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-dloga.lo `test -f 'dloga.c' || echo '$(srcdir)/'`dloga.c + +libLog_la-cloga.lo: cloga.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-cloga.lo -MD -MP -MF $(DEPDIR)/libLog_la-cloga.Tpo -c -o libLog_la-cloga.lo `test -f 'cloga.c' || echo '$(srcdir)/'`cloga.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-cloga.Tpo $(DEPDIR)/libLog_la-cloga.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cloga.c' object='libLog_la-cloga.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-cloga.lo `test -f 'cloga.c' || echo '$(srcdir)/'`cloga.c + +libLog_la-zloga.lo: zloga.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -MT libLog_la-zloga.lo -MD -MP -MF $(DEPDIR)/libLog_la-zloga.Tpo -c -o libLog_la-zloga.lo `test -f 'zloga.c' || echo '$(srcdir)/'`zloga.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog_la-zloga.Tpo $(DEPDIR)/libLog_la-zloga.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zloga.c' object='libLog_la-zloga.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog_la_CFLAGS) $(CFLAGS) -c -o libLog_la-zloga.lo `test -f 'zloga.c' || echo '$(srcdir)/'`zloga.c + +testDoubleLog-testDoubleLog.o: testDoubleLog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog_CFLAGS) $(CFLAGS) -MT testDoubleLog-testDoubleLog.o -MD -MP -MF $(DEPDIR)/testDoubleLog-testDoubleLog.Tpo -c -o testDoubleLog-testDoubleLog.o `test -f 'testDoubleLog.c' || echo '$(srcdir)/'`testDoubleLog.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog-testDoubleLog.Tpo $(DEPDIR)/testDoubleLog-testDoubleLog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog.c' object='testDoubleLog-testDoubleLog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog_CFLAGS) $(CFLAGS) -c -o testDoubleLog-testDoubleLog.o `test -f 'testDoubleLog.c' || echo '$(srcdir)/'`testDoubleLog.c + +testDoubleLog-testDoubleLog.obj: testDoubleLog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog_CFLAGS) $(CFLAGS) -MT testDoubleLog-testDoubleLog.obj -MD -MP -MF $(DEPDIR)/testDoubleLog-testDoubleLog.Tpo -c -o testDoubleLog-testDoubleLog.obj `if test -f 'testDoubleLog.c'; then $(CYGPATH_W) 'testDoubleLog.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog-testDoubleLog.Tpo $(DEPDIR)/testDoubleLog-testDoubleLog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog.c' object='testDoubleLog-testDoubleLog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog_CFLAGS) $(CFLAGS) -c -o testDoubleLog-testDoubleLog.obj `if test -f 'testDoubleLog.c'; then $(CYGPATH_W) 'testDoubleLog.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog.c'; fi` + +testFloatLog-testFloatLog.o: testFloatLog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog_CFLAGS) $(CFLAGS) -MT testFloatLog-testFloatLog.o -MD -MP -MF $(DEPDIR)/testFloatLog-testFloatLog.Tpo -c -o testFloatLog-testFloatLog.o `test -f 'testFloatLog.c' || echo '$(srcdir)/'`testFloatLog.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog-testFloatLog.Tpo $(DEPDIR)/testFloatLog-testFloatLog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog.c' object='testFloatLog-testFloatLog.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog_CFLAGS) $(CFLAGS) -c -o testFloatLog-testFloatLog.o `test -f 'testFloatLog.c' || echo '$(srcdir)/'`testFloatLog.c + +testFloatLog-testFloatLog.obj: testFloatLog.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog_CFLAGS) $(CFLAGS) -MT testFloatLog-testFloatLog.obj -MD -MP -MF $(DEPDIR)/testFloatLog-testFloatLog.Tpo -c -o testFloatLog-testFloatLog.obj `if test -f 'testFloatLog.c'; then $(CYGPATH_W) 'testFloatLog.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog-testFloatLog.Tpo $(DEPDIR)/testFloatLog-testFloatLog.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog.c' object='testFloatLog-testFloatLog.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog_CFLAGS) $(CFLAGS) -c -o testFloatLog-testFloatLog.obj `if test -f 'testFloatLog.c'; then $(CYGPATH_W) 'testFloatLog.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/log/cloga.c b/2.3-1/src/c/elementaryFunctions/log/cloga.c new file mode 100644 index 00000000..6edf1dd0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/cloga.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log.h" + +void cloga(floatComplex* in, int size, floatComplex* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = clogs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log/clogs.c b/2.3-1/src/c/elementaryFunctions/log/clogs.c new file mode 100644 index 00000000..3b9f6911 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/clogs.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log.h" +#include "lapack.h" +#include "log1p.h" +#include "pythag.h" + +floatComplex clogs(floatComplex in) { + static float sR2 = 1.41421356237309504f; + + float _RealIn = creals(in); + float _ImgIn = cimags(in); + + float _RealOut = 0; + float _ImgOut = 0; + + float RMax = (float) getOverflowThreshold(); + float LInf = sqrtf((float) getUnderflowThreshold()); + float LSup = sqrtf(0.5f * RMax); + + float AbsReal = fabsf(_RealIn); + float AbsImg = fabsf(_ImgIn); + + _ImgOut = atan2f(_ImgIn, _RealIn); + + if(_ImgIn > _RealIn) + {/* switch Real part and Imaginary part */ + float Temp = AbsReal; + AbsReal = AbsImg; + AbsImg = Temp; + } + + if((0.5 <= AbsReal) && (AbsReal <= sR2)) + _RealOut = 0.5f * slog1ps((AbsReal - 1.0f) * (AbsReal + 1.0f) + AbsImg * AbsImg); + else if(LInf < AbsImg && AbsReal < LSup) + _RealOut = 0.5f * slogs(AbsReal * AbsReal + AbsImg * AbsImg); + else if(AbsReal > RMax) + _RealOut = AbsReal; + else + { + float Temp = spythags(AbsReal, AbsImg); + if(Temp <= RMax) + { + _RealOut = slogs(Temp); + } + else /* handle rare spurious overflow with : */ + { + float Temp2 = AbsImg/AbsReal; + _RealOut = slogs(AbsReal) + 0.5f * slog1ps(Temp2 * Temp2); + } + } + return FloatComplex(_RealOut, _ImgOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/log/dloga.c b/2.3-1/src/c/elementaryFunctions/log/dloga.c new file mode 100644 index 00000000..e5f7490d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/dloga.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log.h" + +void dloga(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dlogs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log/dlogs.c b/2.3-1/src/c/elementaryFunctions/log/dlogs.c new file mode 100644 index 00000000..c75bef21 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/dlogs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log.h" + +double dlogs(double in) { + return (log(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log/sloga.c b/2.3-1/src/c/elementaryFunctions/log/sloga.c new file mode 100644 index 00000000..e6fab861 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/sloga.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log.h" + +void sloga(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = slogs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log/slogs.c b/2.3-1/src/c/elementaryFunctions/log/slogs.c new file mode 100644 index 00000000..f8e7b61b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/slogs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log.h" + +float slogs(float in) { + return (logf(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log/testDoubleLog.c b/2.3-1/src/c/elementaryFunctions/log/testDoubleLog.c new file mode 100644 index 00000000..89924830 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/testDoubleLog.c @@ -0,0 +1,956 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog.h" + +#define SOURCE {0.3628176329657435417175,0.924179898109287023544,0.5243524145334959030151,\ +0.7886543427594006061554,0.6525151440873742103577,0.2477638195268809795380,\ +0.2364655844867229461670,0.7240293831564486026764,0.8278210600838065147400,\ +0.4287728047929704189301,0.4858888480812311172485,0.5923984018154442310333,\ +0.0949383648112416267395,0.1356843891553580760956,0.9917455688118934631348,\ +0.7212927364744246006012,0.0115638775750994682312,0.0211908905766904354095,\ +0.1524727698415517807007,0.9165380974300205707550,0.4467271203175187110901,\ +0.5868234331719577312469,0.1882771886885166168213,0.4196520284749567508698,\ +0.2730510598048567771912,0.7565603456459939479828,0.9378882069140672683716,\ +0.0586007428355515003204,0.5101847248151898384094,0.5031699347309768199921,\ +0.7783576548099517822266,0.6856653341092169284821,0.1381576983258128166199,\ +0.371037633623927831650,0.6366564910858869552612,0.4961673622019588947296,\ +0.2994064847007393836975,0.2392275254242122173309,0.5618183575570583343506,\ +0.3218038142658770084381,0.1082227518782019615173,0.1685282415710389614105,\ +0.8263800088316202163696,0.4923414406366646289825,0.7863734485581517219543,\ +0.6762332352809607982635,0.0258686169981956481934,0.3594204657711088657379,\ +0.3436427963897585868835,0.2824054299853742122650,0.1450859513133764266968,\ +0.0762176741845905780792,0.5220461571589112281799,0.6713762427680194377899,\ +0.0599394328892230987549,0.7267188713885843753815,0.2224657749757170677185,\ +0.3122289828024804592133,0.4435700643807649612427,0.3983507198281586170197,\ +0.1324583934620022773743,0.8820166247896850109100,0.5455272346735000610352,\ +0.2917219498194754123688,0.7739847479388117790222,0.3354639573954045772552,\ +0.8127403985708951950073,0.4612239454872906208038,0.6898109326139092445374,\ +0.9649041066877543926239,0.8210376314818859100342,0.2802407057024538516998,\ +0.9873316427692770957947,0.294199434574693441391,0.4859610591083765029907,\ +0.2247181800194084644318,0.9585652919486165046692,0.1503968122415244579315,\ +0.0216291621327400207520,0.0688429796136915683746,0.9950710041448473930359,\ +0.7568672685883939266205,0.6163959559053182601929,0.0865804632194340229034,\ +0.5165374809876084327698,0.1916800136677920818329,0.2940570451319217681885,\ +0.3528221980668604373932,0.1317937439307570457458,0.0549608371220529079437,\ +0.929352553561329841614,0.737892795819789171219,0.7509917514398694038391,\ +0.6889848816208541393280,0.8865169286727905273438,0.6891661235131323337555,\ +0.8677108911797404289246,0.7947537912987172603607,0.2496256213635206222534,\ +0.3935408894903957843781,0.7297343472018837928772,0.7888072351925075054169,\ +0.113488640636205673218,0.4145256043411791324615,0.6172473421320319175720,\ +0.7440188056789338588715,0.9038409832864999771118,0.3976829168386757373810,\ +0.9472072543576359748840,0.2581262919120490550995,0.1955799385905265808105,\ +0.9381833248771727085114,0.4226356102153658866882,0.0937463282607495784760,\ +0.9977992679923772811890,0.2042182614095509052277,0.9455819511786103248596,\ +0.9336234177462756633759,0.9743702597916126251221,0.4100225553847849369049,\ +0.5125095760449767112732,0.0948633304797112941742,0.5688196588307619094849,\ +0.7322562676854431629181,0.8108531581237912178040,0.5459008770994842052460,\ +0.5022544711828231811523,0.7634959020651876926422,0.7354982374235987663269,\ +0.0699520572088658809662,0.6130836438387632369995,0.0965849910862743854523,\ +0.5439325878396630287170,0.9187005828134715557098,0.5072866193950176239014,\ +0.1335940570570528507233,0.8688194593414664268494,0.7999687767587602138519,\ +0.9879787657409906387329,0.7131399479694664478302,0.3067426951602101325989,\ +0.5431228461675345897675,0.7330236807465553283691,0.6498145484365522861481,\ +0.8018737239763140678406,0.2859625308774411678314,0.1894423719495534896851,\ +0.7794728656299412250519,0.5433104271069169044495,0.5268451268784701824188,\ +0.1533693112432956695557,0.6041304902173578739166,0.5948378806933760643005,\ +0.8857938847504556179047,0.0043053645640611648560,0.1302204323001205921173,\ +0.9758609728887677192688,0.9183407831005752086639,0.0624175965785980224609,\ +0.9939593323506414890289,0.4122588960453867912292,0.8258536770008504390717,\ +0.0376359503716230392456,0.4675730471499264240265,0.4759115139022469520569,\ +0.4060978214256465435028,0.0392968021333217620850,0.4401316107250750064850,\ +0.3316476037725806236267,0.0877817696891725063324,0.1150833908468484878540,\ +0.9667435702867805957794,0.8103649737313389778137,0.3928376468829810619354,\ +0.7880131229758262634277,0.4798596971668303012848,0.0270724548026919364929,\ +0.6701857983134686946869,0.5602217521518468856812,0.2564360727556049823761,\ +0.2626037681475281715393,0.4447338129393756389618,0.8522944338619709014893,\ +0.2347065494395792484283,0.3277532672509551048279,0.2253599218092858791351,\ +0.3468936551362276077271,0.7743145865388214588165,0.1285835551097989082336,\ +0.1156307714991271495819,0.2054340392351150512695,0.4535544612444937229156,\ +0.6516549764201045036316,0.0710035725496709346771,0.1265540253371000289917,\ +0.4974718545563519001007,0.0879269847646355628967,0.1462626229040324687958,\ +0.715134423226118087769,0.9305738122202455997467} + +#define RESULT {-1.0138549594808059506335,-0.0788485313675790222554,-0.6455912738997077182646,\ +-0.2374271494900490608870,-0.4269209307253117313685,-1.3952793271990111545477,\ +-1.4419526017799386696794,-0.3229233029497151630238,-0.1889582589621221220266,\ +-0.8468280928949678543205,-0.7217753888910144466351,-0.5235758944053595653756,\ +-2.354527389398466841186,-1.9974237581445692946147,-0.0082886876471943305572,\ +-0.3267102095711482134810,-4.459869041610169837497,-3.8541838794260296907623,\ +-1.8807692572941765440930,-0.0871516441756800402940,-0.8058073398690168698266,\ +-0.5330312996797691438289,-1.6698399941066854879068,-0.8683294147345963498452,\ +-1.2980964690333058886296,-0.2789729794097077220094,-0.0641245194730828693697,\ +-2.8370079061049158219987,-0.6729824133243695882811,-0.6868273235307851276588,\ +-0.2505691498856313370602,-0.3773656214470872405364,-1.9793595047655996310709,\ +-0.9914517831797942104544,-0.4515250293249062352174,-0.7008419853775434971155,\ +-1.205953148244055972427,-1.4303401906823356437570,-0.5765766885249945516989,\ +-1.1338131915858427056776,-2.2235636585360341044293,-1.7806519374711546888079,\ +-0.1907005521377241608061,-0.7085828181522180191365,-0.240323473997209546837,\ +-0.3912172398408133022762,-3.6547247438886865111840,-1.0232623619826317629133,\ +-1.0681525436893481995071,-1.264411545554370741584,-1.93042894450046809141,\ +-2.5741618985048786427683,-0.6499992713325659643431,-0.3984255796794416437656,\ +-2.8144206784459675496635,-0.3192155730871417684824,-1.502982009541258934249,\ +-1.1640184411209602011184,-0.8128995091446955534309,-0.9204224561330225373723,\ +-2.0214866944753584476757,-0.1255443741850884864508,-0.6060025488810325544620,\ +-1.231954157015291428934,-0.2562031110919770759971,-1.092240757863258915350,\ +-0.2073435333764902521736,-0.7738715719712579987899,-0.3713377296431035756719,\ +-0.0357265538888332026546,-0.1971863344268207918208,-1.2721063818886333418590,\ +-0.0127492850765575892191,-1.223497392724554932997,-0.7216267835832522736794,\ +-1.4929081951001816896962,-0.0423175999341945593968,-1.8944780628936490618486,\ +-3.8337127761178795282149,-2.6759270254015836698613,-0.0049411834200203501311,\ +-0.2785673796390666367984,-0.483865736386189515539,-2.446681086792801718133,\ +-0.6606074257995434573232,-1.651927892749795789840,-1.2239814994040887352611,\ +-1.0417910371382139711471,-2.026517124423018234580,-2.9011343997056400212387,\ +-0.0732671142462539837226,-0.3039567280501898061118,-0.2863606107139139989037,\ +-0.3725359507043504159185,-0.1204550575726043570857,-0.3722729288835950889336,\ +-0.1418966944811957953121,-0.2297229087732643171282,-1.3877929980613914473508,\ +-0.9325703042223095762253,-0.3150747190128889152483,-0.2372333033314831252092,\ +-2.1760525295696577785520,-0.8806205346832632896437,-0.4824854567490562962107,\ +-0.2956889680183093505050,-0.1011018375069230867958,-0.9221002825850308504130,\ +-0.0542373561426655603768,-1.3543063102932182406590,-1.6317860900845253535607,\ +-0.0638099067725128449302,-0.8612449127611128130155,-2.3671627801172654415041,\ +-0.0022031571770593774348,-1.5885659482121525787335,-0.0559547196755256631695,\ +-0.0686821150485829451382,-0.0259639040526286474231,-0.8915431076633286711086,\ +-0.6684358831783273613425,-2.3553180497276513527538,-0.5641918391516044239964,\ +-0.3116247338224413798713,-0.2096683039932461523058,-0.6053178634921361211951,\ +-0.6886483730214458809371,-0.2698475216395072595610,-0.3072071353764207479742,\ +-2.659945168598087494871,-0.4892539023727084379622,-2.3373319216128076725170,\ +-0.6089299592172232600262,-0.0847950173155939540548,-0.6786791108759814283857,\ +-2.0129495019748864237386,-0.1406199321004115432299,-0.2231825811274127380202,\ +-0.0120940736302183569906,-0.3380775973662459854552,-1.181746009333312530387,\ +-0.6104197485997391314783,-0.3105772710053884000381,-0.4310682668987352861301,\ +-0.2208041349135003439397,-1.25189448766300226445,-1.6636704065163092636226,\ +-0.2491374010581904052675,-0.6100744334370675758805,-0.6408486505219985751580,\ +-1.8749064671471911136535,-0.5039650609751163967687,-0.5194663799859419173188,\ +-0.1212709911627764675091,-5.4478934608177302933996,-2.038526631411456513376,\ +-0.0244351485261014196582,-0.0851867338269072515988,-2.7739080469083896574034,\ +-0.0060589862906551463645,-0.8861037385262900967220,-0.1913376676415258770270,\ +-3.2797955584796012473703,-0.7601996918711692030612,-0.7425233371947113081291,\ +-0.9011612089296217043000,-3.2366121340710831688625,-0.8206814815116268979622,\ +-1.1036823082060371881141,-2.4329014344197728014763,-2.1620982756055884266289,\ +-0.0338219993709664781822,-0.2102705479450195091840,-0.9343588647242980771424,\ +-0.2382405357403041268327,-0.7342615153765646995865,-3.609238495954611991579,\ +-0.4002002941250653034189,-0.5794225876492602456125,-1.36087587445700952671,\ +-1.337108967835097139698,-0.8102793489627861944768,-0.1598232322015146200656,\ +-1.449419270934711789778,-1.1154941876589379301521,-1.4900565023732303959747,\ +-1.05873701535465292167,-0.2557770454111949476328,-2.0511763516400991491651,\ +-2.1573531687271665369110,-1.5826302735280548539265,-0.7906399256902217898002,\ +-0.4282400343889684046772,-2.6450250856057104797969,-2.0670859842226763092299,\ +-0.6982162977399214431884,-2.4312485274946018520836,-1.9223514861397812403254,\ +-0.3352847494467096622905,-0.0719538807151878373469} + + +#define SOURCE2 {2.6395560009405016899109,4.1481037065386772155762,2.8064980218186974525452,\ +1.2800584640353918075562,7.7831285959109663963318,2.1190304495394229888916,\ +1.121354666538536548615,6.8568959552794694900513,1.5312166837975382804871,\ +6.970850601792335510254,8.4155184263363480567932,4.0620247554033994674683,\ +4.09482547547668218613,8.7841258011758327484131,1.1383596854284405708313,\ +1.9983377400785684585571,5.6186607433483004570007,5.8961773291230201721,\ +6.8539796629920601844788,8.9062247332185506820679,5.0422128057107329368591,\ +3.493615407496690750122,3.8737787725403904914856,9.2228986788541078567505,\ +9.4881842611357569694519,3.4353372454643249511719,3.7601187312975525856018,\ +7.3409405630081892013550,2.6157614728435873985291,4.99349383637309074402,\ +2.6385784195736050605774,5.25356308557093143463,5.3762298030778765678406,\ +1.1999255046248435974121,2.2563034901395440101624,6.2740930821746587753296,\ +7.6084325974807143211365,0.4855662025511264801025,6.7239497276023030281067,\ +2.017172696068882942200,3.911573919467628002167,8.3003165572881698608398,\ +5.8787201577797532081604,4.8291792999953031539917,2.2328650346025824546814,\ +8.4008856676518917083740,1.2059959070757031440735,2.8553641680628061294556,\ +8.6075146449729800224304,8.494101651012897491455,5.2570608118548989295959,\ +9.9312098976224660873413,6.4885628735646605491638,9.923190940171480178833,\ +0.5004197778180241584778,7.4855065811425447463989,4.1040589986369013786316,\ +6.0845263302326202392578,8.5442108893766999244690,0.6426467280834913253784,\ +8.279082938097417354584,9.2623437754809856414795,5.6672112690284848213196,\ +5.711638936772942543030,8.1601104838773608207703,0.5689279362559318542481,\ +5.5959366867318749427795,1.2493403162807226181030,7.279222286306321620941,\ +2.6777664758265018463135,5.4653349192813038825989,9.885407658293843269348,\ +7.3956565884873270988464,0.0371731072664260864258,5.9005728596821427345276,\ +3.096467358991503715515,2.5522057106718420982361,6.2518793903291225433350,\ +1.1574173765257000923157,6.1170040909200906753540,6.7839562846347689628601,\ +3.3200952783226966857910,0.2587099233642220497131,5.1744682248681783676147,\ +3.9168732380494475364685,2.4135384149849414825439,5.064434898085892200470,\ +4.2361020017415285110474,2.8937275288626551628113,0.8879321813583374023438,\ +6.2128817522898316383362,3.4549844544380903244019,7.0648676296696066856384,\ +5.2114724926650524139404,2.8704008506610989570618,6.502795079723000526428,\ +0.8813347620889544487000,4.498763345181941986084,7.2272530803456902503967,\ +8.9767962601035833358765,2.4278218811377882957458,4.3377211131155490875244,\ +9.6770532103255391120911,5.0685344357043504714966,5.2329764096066355705261,\ +5.5969475954771041870117,5.6173070007935166358948,4.68176002614200115204,\ +7.794546722434461116791,7.9010718129575252532959,9.8085420625284314155579,\ +8.1870661024004220962524,4.2568723810836672782898,2.4615605548024177551270,\ +9.2295324662700295448303,1.000745808705687522888,4.6782181179150938987732,\ +3.9504976756870746612549,0.3661171020939946174622,5.175368534401059150696,\ +8.3254515705630183219910,6.1048321425914764404297,1.8711117887869477272034,\ +0.1895748358219861984253,8.4335647663101553916931,0.7485948316752910614014,\ +8.5328151332214474678040,0.1245901081711053848267,1.8675393564626574516296,\ +4.920584075152873992920,7.4896081397309899330,9.414957007393240928650,\ +2.1240556007251143455505,5.7950199581682682037354,2.628147569485008716583,\ +4.3609866220504045486450,9.1105451015755534172058,8.0826673656702041625977,\ +8.1026530498638749122620,2.5904283951967954635620,4.1390872886404395103455,\ +3.599927779287099838257,6.91278793383389711380,7.6568587962538003921509,\ +3.572649653069674968720,7.6933998242020606994629,5.4776339093223214149475,\ +0.9622887428849935531616,9.5611717319115996360779,2.2074085660278797149658,\ +0.1432593585923314094544,8.1914897728711366653442,1.3049928424879908561707,\ +9.6820035576820373535156,6.5613814676180481910706,2.4455389659851789474487,\ +5.2831235667690634727478,8.4689256362617015838623,7.8766220854595303535461,\ +1.262082615867257118225,7.8838609857484698295593,3.4530424699187278747559,\ +2.6598573336377739906311,9.7098186518996953964233,8.8752476638182997703552,\ +2.066752854734659194946,8.5251609655097126960754,6.7446978110820055007935,\ +9.152874383144080638886,0.2848597615957260131836,2.367841475643217563629,\ +7.0153435599058866500854,1.2025266280397772789001,8.2874121330678462982178,\ +3.1610729591920971870422,5.30519076623022556305,5.715174819342792034149,\ +0.4780154302716255187988,8.2486197212710976600647,5.7988431211560964584351,\ +2.7918082987889647483826,9.5451109297573566436768,9.0711546363309025764465,\ +3.3601493109017610549927,1.1756130633875727653503,9.2537237703800201416016,\ +7.2636712575331330299377,9.0094979386776685714722,3.9489932497963309288025,\ +5.6551797501742839813232,7.0614896761253476142883,6.7878311965614557266235,\ +4.1329363686963915824890,1.402290873229503631592,4.9523561308160424232483,\ +4.1948772873729467391968,8.6262222891673445701599,2.8575096465647220611572,\ +2.5121363671496510505676,3.389101596549153327942} + + +#define RESULT2 {0.9706107215522056241852,1.4226512916310911638362,1.0319374505428213772973,\ +0.246905751916103338717,2.0519583905069445073366,0.7509586489514044060911,\ +0.1145374781176292794394,1.9252548546825831721208,0.4260626375542267973984,\ +1.9417372548863311987333,2.1300774331528766758481,1.4016815575274605976119,\ +1.4097240974656071177407,2.1729462062921069964716,0.1295883538042104654586,\ +0.6923157050192292327751,1.7260933336118711167728,1.7743042306089458204355,\ +1.9248294562744026059420,2.1867504404929474226549,1.6178450344817050243762,\ +1.2509371333857781660726,1.3542304576599399901227,2.2216893784894660157647,\ +2.2500472625069045662372,1.2341151000295289552611,1.3244505343759986892849,\ +1.993466976516135025221,0.9615552493321314342367,1.6081358323702796830901,\ +0.9702402946929443716684,1.658906529368289861637,1.6819873484154954645931,\ +0.1822594753876470019538,0.8137278503591067746470,1.8364289458354570161447,\ +2.0292571844941731384893,-0.7224396410182910566178,1.9056757389571916672,\ +0.7016968755690818904114,1.3639398299492546673406,2.1162936535075722588317,\ +1.7713390779775688432807,1.5746765360416834500512,0.8032855297427843321856,\ +2.1283371369164427733267,0.1873057044979935803486,1.0491993894614395355092,\ +2.1526356176491328042744,2.1393719992097341986437,1.659572089557145968541,\ +2.2956823132957397959331,1.870041069148148160650,2.294874536928924957380,\ +-0.6923079771535994852982,2.012968695092798743218,1.4119764836513208905444,\ +1.8057488812128539290569,2.1452539646586252786165,-0.4421601177273855043381,\ +2.1137322059948120411832,2.225957124135133913256,1.7346971570693363595694,\ +1.7425060116900870088585,2.0992577085752079923964,-0.5640015026903990591478,\ +1.7220407427170496550417,0.2226156650313379503636,1.9850240276979147502345,\ +0.9849830425057782834486,1.6984254041571493765161,2.2910596958626552321903,\ +2.0008928803872945145770,-3.2921697020833700086939,1.7750494410596528993551,\ +1.1302619000814182470549,0.9369579698639551867956,1.83288212099904845864,\ +0.146191123459191885114,1.8110724490390321950173,1.9145604545765595450035,\ +1.1999934808065779723307,-1.3520478319474638073672,1.6437365753918393718180,\ +1.3652936921609135634270,0.8810938927039604351421,1.62224256150308399071,\ +1.4436435071804869512135,1.0625454734184220928483,-0.1188599112506976002157,\ +1.8266248385955683453119,1.2398179577704631082469,1.9551342798915567477991,\ +1.6508624439841452780087,1.0544516892385875639349,1.8722320967378904832401,\ +-0.1263177455503078638888,1.5038025468266962292319,1.9778590304154859413899,\ +2.194643054750437638489,0.8869945101840888135314,1.4673491210608482493427,\ +2.2697574345222681913015,1.6230517098794554620156,1.6549802193742981781810,\ +1.7222213768989977911161,1.7258523677080592761968,1.5436741131934335058418,\ +2.0534243510350704831069,2.0669984227965598755361,2.2832536450533371663596,\ +2.1025556044304130054456,1.4485347077928583114925,0.9007955206863934582984,\ +2.2224083935232625819367,0.0007455307285780288533,1.5429172933929051758639,\ +1.3738415648213015973766,-1.0048020456777133624371,1.6439105509928255699492,\ +2.1193172771056971726011,1.8090806121136604467381,0.6265327936561931876369,\ +-1.6629714204274992361832,2.1322195493342954719651,-0.2895573875226954974060,\ +2.1439193343978621975054,-2.0827260644551484070064,0.62462171221383455677,\ +1.5934272379201788183423,2.0135164783675794097917,2.24229959570391956802,\ +0.7533272804029441660489,1.7569989208182723583462,0.9662792518179295075953,\ +1.4726983212224467045814,2.209432545000515446532,2.089721937569185339356,\ +2.09219154507008475719,0.951823265584673561257,1.4204753018509210793496,\ +1.2809137839516946399954,1.9333730200617991190626,2.0356018208291457582959,\ +1.273307520236932832702,2.0403627955950214278857,1.700673239349282273025,\ +-0.0384407248228896478159,2.257710285652239079468,0.7918192329452391486910,\ +-1.943098595033752262751,2.1030957827723826270017,0.2661975560760838632746,\ +2.2702688589706512267696,1.8812011703610473922765,0.8942655346201515698112,\ +1.6645175074163265360738,2.136403657202092354339,2.0638991426068855616904,\ +0.2327632262134610163784,2.0648177566830252516183,1.2392557177584351268962,\ +0.9782724873844932389488,2.273137605702431063293,2.183266240754464071472,\ +0.7259787064172199544387,2.1430219045760425800040,1.9087566867408878312773,\ +2.2140679701900434217521,-1.255758284393388990452,0.8619787703734573813819,\ +1.9480996873952269865526,0.1844248666526293323198,2.114737753111020968078,\ +1.1509115140149177580753,1.668685731123507043350,1.7431248863402162285752,\ +-0.7381122661087159420035,2.1100458798366994450646,1.7576584357875708608532,\ +1.0266895216506544131,2.2560290788762715763482,2.205099558817555038814,\ +1.2119854107561658373982,0.1617897676032789000544,2.2250260402856771868585,\ +1.9828853838780200469216,2.1982793473903963210603,1.373460672957984574083,\ +1.73257189512379894403,1.9546560315313432631967,1.9151314791431239825670,\ +1.4189881394992434060498,0.3381072372999247011016,1.5998634493586285643119,\ +1.4338640873752146465137,2.15480666756291494579,1.0499504925567986202140,\ +0.9211335334181942613441,1.2205648705022635880368} + + +#define ZSOURCER {0.3140813848003745079041,0.5769402063451707363129,0.1306138429790735244751,\ +0.0478980806656181812286,0.4500174494460225105286,0.0384718659333884716034,\ +0.483350999653339385986,0.2981918179430067539215,0.7112689120694994926453,\ +0.9268360524438321590424,0.9477838929742574691772,0.1729496796615421772003,\ +0.2750928336754441261292,0.0044281478039920330048,0.0611358620226383209229,\ +0.1950612799264490604401,0.3789803450927138328552,0.2549188635312020778656,\ +0.1764185149222612380981,0.6008180272765457630157,0.3703392641618847846985,\ +0.2908470141701400279999,0.5384815335273742675781,0.8090293356217443943024,\ +0.9260985879227519035339,0.1576966657303273677826,0.9518593531101942062378,\ +0.2709982101805508136749,0.1609848598018288612366,0.8782086591236293315887,\ +0.5091647170484066009521,0.7951062084175646305084,0.8432204117998480796814,\ +0.5806765086017549037933,0.3487791065126657485962,0.9397577759809792041779,\ +0.4363934816792607307434,0.5549766751937568187714,0.9105900451540946960449,\ +0.5684339576400816440582,0.1862502051517367362976,0.0800832151435315608978,\ +0.6585252787917852401733,0.1606054832227528095245,0.9711584830656647682190,\ +0.3668168033473193645477,0.7386338301002979278564,0.9722552285529673099518,\ +0.1349937235936522483826,0.4595781317912042140961,0.5414639282971620559692,\ +0.6397600513882935047150,0.0211964594200253486633,0.4408156829886138439178,\ +0.6374878138303756713867,0.3208820023573935031891,0.4267518399283289909363,\ +0.7819778784178197383881,0.0543234180659055709839,0.9666189108975231647491,\ +0.6948409983888268470764,0.1846996019594371318817,0.3645029179751873016357,\ +0.8176643461920320987701,0.664914294146001338959,0.7559730983339250087738,\ +0.5525381658226251602173,0.7192269531078636646271,0.1989364298060536384583,\ +0.8610532465390861034393,0.1300329938530921936035,0.347959163133054971695,\ +0.5025534434244036674500,0.4978472082875669002533,0.4675923939794301986694,\ +0.9447452803142368793488,0.9599315756931900978088,0.5365384514443576335907,\ +0.8122785724699497222900,0.6470989421941339969635,0.7010180121287703514099,\ +0.6681951484642922878265,0.9593638796359300613403,0.0149199557490646839142,\ +0.6199735002592206001282,0.4061129498295485973358,0.0471306145191192626953,\ +0.8433605083264410495758,0.0635268418118357658386,0.9836421324871480464935,\ +0.4434677045792341232300,0.8565507535822689533234,0.9080012599006295204163,\ +0.4922491232864558696747,0.1930142603814601898193,0.3759337724186480045319,\ +0.2437626412138342857361,0.1035623974166810512543,0.9936000052839517593384,\ +0.5569599089212715625763,0.3858396532014012336731,0.7191527518443763256073,\ +0.1707325801253318786621,0.2878904812969267368317,0.4294657362625002861023,\ +0.8917979537509381771088,0.6188817229121923446655,0.3444608678109943866730,\ +0.0692929709330201148987,0.3619817639701068401337,0.1783103235065937042236,\ +0.8941529677249491214752,0.9010278200730681419373,0.0533773354254662990570,\ +0.4162023533135652542114,0.9438270372338593006134,0.9242387460544705390930,\ +0.8710649865679442882538,0.2808376699686050415039,0.8244629004038870334625,\ +0.4650857029482722282410,0.1462343498133122920990,0.5975636970251798629761,\ +0.3067605351097881793976,0.2377215037122368812561,0.0711208949796855449677,\ +0.8753139786422252655029,0.4413500339724123477936,0.7631150623783469200134,\ +0.9679268277250230312347,0.3924236092716455459595,0.717360940296202898026,\ +0.8640465112403035163879,0.7354763629846274852753,0.0304915383458137512207,\ +0.6331009590066969394684,0.4550241930410265922546,0.3173553734086453914642,\ +0.8250397499650716781616,0.2725940425880253314972,0.3458735281601548194885,\ +0.5352854127995669841766,0.7017193175852298736572,0.9817278520204126834869,\ +0.2777477568015456199646,0.1314821145497262477875,0.366813333705067634583,\ +0.7377605927176773548126,0.9103105561807751655579,0.3637479650788009166718,\ +0.8207867145538330078125,0.3059372254647314548492,0.9788405327126383781433,\ +0.9970494522713124752045,0.4636328797787427902222,0.7769650523550808429718,\ +0.3400075891986489295959,0.0353285889141261577606,0.2607673071324825286865,\ +0.5790986777283251285553,0.1250711670145392417908,0.0372988111339509487152,\ +0.9382179621607065200806,0.5585843441076576709747,0.7192503632977604866028,\ +0.3599752518348395824432,0.6758626028895378112793,0.2222136431373655796051,\ +0.7860159231349825859070,0.1736893891356885433197,0.2674629595130681991577,\ +0.7357366015203297138214,0.0550541067495942115784,0.5923380698077380657196,\ +0.2162457890808582305908,0.7718841419555246829987,0.0926524316892027854919,\ +0.7626169077120721340179,0.7347808051854372024536,0.8017499190755188465118,\ +0.7732572900131344795227,0.2559880572371184825897,0.1179054826498031616,\ +0.9232815303839743137360,0.6709534404799342155457,0.6071323617361485958099,\ +0.4574467372149229049683,0.8206311021931469440460,0.0896153757348656654358,\ +0.3426358769647777080536,0.1674894802272319793701,0.9481152505613863468170,\ +0.9504805644974112510681,0.3436607695184648036957,0.2889420483261346817017,\ +0.5325344172306358814240,0.2558945687487721443176,0.8863505902700126171112,\ +0.0421485081315040588379,0.4876015805639326572418} + +#define ZSOURCEI {0.347978035919368267059,0.2037199228070676326752,0.5962978359311819076538,\ +0.8342303414829075336456,0.6809655660763382911682,0.9127784068696200847626,\ +0.5243799723684787750244,0.7204323844052851200104,0.3259664541110396385193,\ +0.1506391367875039577484,0.9124387521296739578247,0.6345743131823837757111,\ +0.9268973069265484809875,0.7633614349178969860077,0.5918717086315155029297,\ +0.9057438620366156101227,0.3263365356251597404480,0.3912780000828206539154,\ +0.4635267537087202072144,0.0849754814989864826202,0.5800507226958870887756,\ +0.7945564310066401958466,0.3823457323014736175537,0.3010852993465960025787,\ +0.5789428642019629478455,0.2627451247535645961761,0.5713048521429300308228,\ +0.1848654565401375293732,0.9971724869683384895325,0.4520535501651465892792,\ +0.0334019884467124938965,0.4553878181613981723785,0.7851976407691836357117,\ +0.4941168962977826595306,0.9304408635944128036499,0.7621670593507587909698,\ +0.9264887655153870582581,0.7199950958602130413055,0.3973621018230915069580,\ +0.8769331262446939945221,0.6766644334420561790466,0.8431562236510217189789,\ +0.7608711589127779006958,0.8287630719132721424103,0.0037989662960171699524,\ +0.9451942699961364269257,0.6311131268739700317383,0.0763222672976553440094,\ +0.4486519275233149528503,0.1080312891863286495209,0.8351444136351346969604,\ +0.3109649871475994586945,0.1235694894567131996155,0.0363539229147136211395,\ +0.6609512977302074432373,0.9844443709589540958405,0.0688076755031943321228,\ +0.5140342987142503261566,0.3807653579860925674438,0.1549817589111626148224,\ +0.6850274773314595222473,0.0382853033952414989471,0.5224257782101631164551,\ +0.7454454028047621250153,0.4607118470594286918640,0.4753002314828336238861,\ +0.8575385268777608871460,0.8073885519988834857941,0.7132545644417405128479,\ +0.0811268086545169353485,0.5751824118196964263916,0.884696914348751306534,\ +0.5624709790572524070740,0.7315255901776254177094,0.6099120099097490310669,\ +0.0705954921431839466095,0.8552806274965405464172,0.7045627343468368053436,\ +0.5928074717521667480469,0.8517647930420935153961,0.2603117255493998527527,\ +0.8596871509216725826263,0.3943212013691663742065,0.3333164160139858722687,\ +0.2511775353923439979553,0.5570420245639979839325,0.7276714108884334564209,\ +0.9383780122734606266022,0.1971746077761054039001,0.1607607132755219936371,\ +0.7815325502306222915649,0.1760376212187111377716,0.2801528992131352424622,\ +0.4699970218352973461151,0.3507726117968559265137,0.5713973813690245151520,\ +0.4563077641651034355164,0.9214398502372205257416,0.4339873101562261581421,\ +0.3514866163022816181183,0.1816438222303986549377,0.9070622171275317668915,\ +0.7665811367332935333252,0.9807842955924570560455,0.1198607003316283226013,\ +0.0508546582423150539398,0.2581452894955873489380,0.1401008707471191883087,\ +0.5514106499031186103821,0.7882929998449981212616,0.8028824776411056518555,\ +0.2425694861449301242828,0.7024780390784144401550,0.0922905071638524532318,\ +0.4318286012858152389526,0.0804965649731457233429,0.7126307198777794837952,\ +0.6893844078294932842255,0.2756213061511516571045,0.6968217701651155948639,\ +0.4598932703956961631775,0.6099067903123795986176,0.3065654132515192031860,\ +0.0749373403377830982208,0.9619921119883656501770,0.4158898773603141307831,\ +0.3287452235817909240723,0.7406168007291853427887,0.5725225014612078666687,\ +0.9504556744359433650970,0.1849336978048086166382,0.8698030491359531879425,\ +0.6907873982563614845276,0.9524399931542575359344,0.6490485109388828277588,\ +0.9960058168508112430573,0.2040582066401839256287,0.3800008497200906276703,\ +0.9729049820452928543091,0.9110585046000778675079,0.3810073928907513618469,\ +0.7869612383656203746796,0.5560158789157867431641,0.8529843934811651706696,\ +0.4350629774853587150574,0.5956362797878682613373,0.7071880977600812911987,\ +0.5747222309000790119171,0.4764349022880196571350,0.6098947445861995220184,\ +0.9666662178933620452881,0.3874611915089190006256,0.0715632727369666099548,\ +0.6122049516998231410980,0.9575729314237833023071,0.7723352131433784961700,\ +0.1287384750321507453918,0.3884150418452918529510,0.2353963479399681091309,\ +0.6542267077602446079254,0.3286431683227419853210,0.024017625954002141953,\ +0.1042741741985082626343,0.9314296473748981952667,0.8185661518946290016174,\ +0.8156488086096942424774,0.8688247688114643096924,0.3549220249988138675690,\ +0.3890381073579192161560,0.6415715864859521389008,0.4902750719338655471802,\ +0.3509976905770599842072,0.8516392158344388008118,0.1348936217837035655975,\ +0.1156354099512100219727,0.8810075619257986545563,0.8367286501452326774597,\ +0.5032693906687200069427,0.4486711751669645309448,0.9319602106697857379913,\ +0.7298459419980645179749,0.3388367067091166973114,0.4314213804900646209717,\ +0.7317318231798708438873,0.9655342241749167442322,0.2621376193128526210785,\ +0.2050140891224145889282,0.2826355365104973316193,0.3973353477194905281067,\ +0.7437736871652305126190,0.8185287192463874816895,0.3071001493372023105621,\ +0.9627068741247057914734,0.9475456266663968563080,0.6546552237123250961304,\ +0.1992082078941166400909,0.3616109425202012062073,0.9388273353688418865204,\ +0.0409001447260379791260,0.0758434669114649295807} + +#define ZRESULTR {-0.7576646139762764908809,-0.4912662732014974609207,-0.4935831983604013761813,\ +-0.1796001444111503253520,-0.2030603062114124668369,-0.0903746939402042676059,\ +-0.3380442117380291211504,-0.2488385719103628768156,-0.2453827611475934422636,\ +-0.0629419446509737884332,0.2743030686751847802007,-0.4189753318430110562431,\ +-0.0337034837449739430038,-0.2700068328094388236948,-0.5191589716059612502619,\ +-0.0763304013057857499991,-0.6929039668216129266298,-0.7614418400301237177530,\ +-0.7012514181881327468560,-0.4995602487864141960650,-0.3736855282655331400576,\ +-0.1670990767606896909570,-0.4148838171877601843640,-0.1470641870540525808497,\ +0.0881657571965975273010,-1.1827451998005302780115,0.1044920740886167709327,\ +-1.1145963776166571967963,0.0100332050022288142566,-0.0123498399546466911675,\ +-0.6728365416861274983518,-0.0874315516128119363248,0.1416698281269971604335,\ +-0.2712125731855208887744,-0.0063567040970050154788,0.1906009971260032298535,\ +0.0238331967155752874610,-0.0953429917974444041118,-0.0065067191893498198957,\ +0.0440644425532304637172,-0.3540655459766552382028,-0.1661126167793314234444,\ +0.0062509933701612868662,-0.1693877982336349785619,-0.0292579566847096204929,\ +0.0137816953226981269570,-0.0288761524361324552201,-0.0250652390791611112686,\ +-0.7581745137578204118967,-0.7505545612383084375097,-0.0046973071232757198853,\ +-0.3406170651999906873186,-2.0764518222153585114143,-0.8157393323281721952966,\ +-0.0852474852363154095292,0.0348077956215509243254,-0.8387202021909221372198,\ +-0.0663540586103768398329,-0.9554969196553003696337,-0.0212599130834864695483,\ +-0.0245601140031842454792,-1.6679899099681032570430,-0.4509584277017124609443,\ +0.1011698547763601602201,-0.2120439010955574854478,-0.1131958883879479044188,\ +0.0199327284817682297280,0.0781443465987670671247,-0.3004592565973881468366,\ +-0.1451799924584522560878,-0.5281452333714923286223,-0.0505933914241510074294,\ +-0.2819958038859460280889,-0.122323084811984963971,-0.2632782651610236501760,\ +-0.0540558326414990047981,0.2512879183645665981395,-0.1214932149359973512226,\ +0.0055773659320434761794,0.0673704632706614986448,-0.2906343733694730646633,\ +0.0851020319327377705587,0.0365640112295984101576,-1.0976622196833336619903,\ +-0.4020870876485082012763,-0.3719849821436939651953,-0.3158125612041708385469,\ +0.2324359424588408329360,-1.5742845766045041600023,-0.0033130260706617652329,\ +-0.1069329039454427060507,-0.1341564770393289252048,-0.0510429776001832605226,\ +-0.3847912680433241972011,-0.9153668051115183557087,-0.3798345871473772783489,\ +-0.6590618454479428844905,-0.0755413642077243097095,0.0808833545731707098669,\ +-0.417646722764209388234,-0.8522405945532404158982,0.1463133685463073596633,\ +-0.2416082657366604991012,0.0219217192558878656850,-0.8077093656959043466159,\ +-0.1128924015633438332484,-0.3996389102953575300781,-0.9892317511551623754329,\ +-0.5874413267393940873973,-0.1422192352759769073955,-0.1954743580270074387872,\ +-0.0763719684521397823573,0.1332266112260754309382,-2.2385346085566988350024,\ +-0.5112419918132667939759,-0.0541885453710462053345,0.1544990573544810508189,\ +0.1051325180789595692410,-0.9326914829433226028499,0.0764891336322670034598,\ +-0.4245421077023512346216,-0.4665013282915527192962,-0.3980722181205589849107,\ +-1.152706389176620049852,-0.0091123646200983177135,-0.8629224644504486230190,\ +-0.0671956049468366567456,-0.1483256896732535745631,-0.0470857769330114903084,\ +0.3049502630226416100001,-0.8351336293434713509143,0.1199665328310368234144,\ +0.100965515388687754328,0.1851149271955789266109,-0.4311455286578065315695,\ +0.1656739977240755667953,-0.6957805672270640506838,-0.7030137346248552798755,\ +0.2434410334133135511703,-0.0502776447144934607314,-0.6643994214275527054880,\ +-0.0494471424057717073852,-0.1105954430789197057150,0.2627700024490645658304,\ +-0.6613338575819812659162,-0.4943364682181946023753,-0.2273273919604619497381,\ +-0.0669964153308245241591,0.0270809622513717325465,-0.3423076587443550367063,\ +0.2375373770411028651051,-0.7058599113455784612725,-0.0187211007688289424178,\ +0.1570046667576522059218,0.0619494218295955287323,0.0912342621811634557627,\ +-1.0118000314587793919685,-0.9415613562651380386015,-1.04611739737066766764,\ +-0.1350076179226963601909,-1.045153664947628735504,-3.1153566294303054462489,\ +-0.0576346967934074291828,0.0825782285147220879162,0.0858710750707356584854,\ +-0.1147913938093602786994,0.0959901869720326261781,-0.8704897942843184965866,\ +-0.1312205414500346722928,-0.4084692473683823599195,-0.5825265796688483543875,\ +-0.2043543873503067542785,-0.1585071715930248537063,-0.4983971045262390875408,\ +-1.405591688480441803222,0.1581272765392360557524,-0.1721619754559372272862,\ +-0.0902428450071243726249,-0.1497365537505691013287,0.2065025609822116192671,\ +0.0613750886386554700413,-0.8564551079948240497330,-0.804653684520539647096,\ +0.1638887899169061412863,0.1619231669215081825808,-0.4135383706484943022730,\ +-0.6905772083929240245936,-0.1416337472709212619293,-0.8981660716461068449945,\ +-0.1997922350746098307805,-0.1797380100619248022298,-0.0033949848444226812805,\ +0.3022174959979692654422,0.0079098230306947625579,-0.3346557902575436060921,\ +-0.5646231542298842942529,-0.8141969637368523526888,0.2555170413707821830407,\ +-2.8347892907784113525338,-0.7063037006217763869032} + +#define ZRESULTI {0.8365523024247201178127,0.3394374381847692356828,1.355160662925530390410,\ +1.5134434006476746858993,0.9868300791435297147913,1.528673168936313331301,\ +0.8260899014265745687879,1.1783591647662248202977,0.4297253343366602140740,\ +0.1611216299891750081130,0.7663999599077054858398,1.3047144916618338417180,\ +1.2822880914611145541926,1.5649955384218765530591,1.4678689248356304730692,\ +1.3586758006659467312716,0.7108977814935093508808,0.9933651109027943348906,\ +1.2071246910756632253481,0.1405010934420483359464,1.0025763105214653414521,\ +1.21989563358396813086,0.6174353300937470701015,0.3562751652356153653223,\ +0.5587012199090121145062,1.0302380576516638743811,0.5405656721364887618009,\ +0.5986555168040823549092,1.4107360213988626718162,0.4753739371565622318094,\ +0.0655076733245526648952,0.5201329289544929235234,0.7497818580560413614933,\ +0.7050355621930805005704,1.2121540141336599738509,0.6814274485183255958276,\ +1.1306014284455374596661,0.9141116926495304051414,0.4114688990228685949724,\ +0.9956827833608694611200,1.3022000158632660582469,1.4761001233596913184698,\ +0.8573788009054216230354,1.379379585022410426021,0.0039117682490215858332,\ +1.2006025140002900553071,0.7070620318380608226860,0.0783395850399789817065,\ +1.2785255791075276210478,0.2308747034561683952880,0.9955835564035591112031,\ +0.4524376138027601523817,1.4009149235535949262754,0.0822834615192538504358,\ +0.8034667275967887212218,1.2557032585647818212493,0.1598599852603853899158,\ +0.5815258576469973794687,1.4290836436420499833133,0.1589807896730044689537,\ +0.7782863583371778526399,0.2043896563749957318024,0.9616073478994561218869,\ +0.7392289023091881405847,0.6059375681629087795343,0.5612744745893767372991,\ +0.9984170767670760282542,0.8430838000818645650014,1.29879528501095431459,\ +0.0939407915654127262384,1.3484611857054962236191,1.1960714214373144859138,\ +0.8415982269448546437829,0.9732366936364994502995,0.9167206383382787704406,\ +0.0745857498941502189416,0.7278097264573785141195,0.9199632393837048338625,\ +0.6304525502744320331061,0.9211062195464506663356,0.3555526540057888373880,\ +0.9100796877015666641597,0.3899732161636976779384,1.5260640477653748536824,\ +0.3849315818496458763143,0.9408368768631211187525,1.5061175798419510485360,\ +0.838676229611447277001,1.2591119550131308901797,0.1620018843959732390836,\ +1.0546671087981356329522,0.2026968016035011754816,0.299271305708051660321,\ +0.7622771187183752239491,1.067757629024185028754,0.9888735682758375000745,\ +1.0801593307389727449674,1.4588740911245949849473,0.4118082358815949306496,\ +0.5629599662610861310341,0.4399958138718327860239,0.9004381750108224613527,\ +1.3516535386697041687398,1.2852850170743990165789,0.2721670546404741375390,\ +0.0569631738604013462823,0.3951736758236387148102,0.3862903740059538404417,\ +1.4457867030840705346861,1.1403205655573340759901,1.3522555755333163229892,\ +0.264908300074692404369,0.6622029195378335009181,1.0464389789763977045567,\ +0.8038225849224520658254,0.0850815175089563863198,0.6568351393392068970911,\ +0.669491640154789569017,0.7760242270392859742500,0.7016907095208140265896,\ +0.7797846541592131641707,1.335473484345777617222,0.4740136251481967821775,\ +0.2395937042296285568455,1.3285359486862795552753,1.401425714315664317056,\ +0.3592738595863486095183,1.0333805631652628331807,0.6436572543635337151358,\ +0.7762911838119904706090,0.4403927201098556398762,0.8811512979588507210593,\ +0.674423430961778702653,0.9132365009577151360176,1.5238520140402758151765,\ +1.00458246450610100275,0.4215689680173497211335,0.874990498737184374534,\ +0.8674547514202983755638,1.2800682610709759323697,0.8336956783393613124034,\ +0.9734878037135866746254,0.6700663792657182149526,0.7153420705223627606983,\ +1.0026132338500262086711,1.3535381134312993722801,1.0923065980664201646277,\ +0.6618099327465949421878,0.4821732258146940175436,1.033019939116806895640,\ +0.8668307442664776596430,0.9024324853624734465996,0.0729804020494689703602,\ +0.5506621520352920073904,1.1198886719657494825952,0.7824098301910974440077,\ +0.3619529370272654977825,1.4800901440707066036850,0.7343084050589578914980,\ +0.8462379976616437593506,1.2071528313995831815930,0.5720924999360996743292,\ +0.1106864208392598775132,1.0305927183418297499173,0.8498909387724447039858,\ +1.15517062965696792887,0.9096742728488710350021,1.01141253782177353848,\ +0.4595989696224830889371,1.3064089912173471041967,1.071386424855859109684,\ +0.4451357270611538408112,1.5062412806888749727818,0.2239121309027737871666,\ +0.4910523338147070870896,0.8513221989625705532490,1.460513851259993778342,\ +0.5833202395880134893957,0.5481910770820362932554,0.8603624185522980027940,\ +0.7565250407629732221082,0.9237902776741101495972,1.3040155501467787235725,\ +0.6701717740731456540715,0.9634987985586029868301,0.4075854524817449364704,\ +0.4213313914917447000619,0.3316883655770838101873,1.3489670985956061510791,\ +1.1391029061589752480188,1.3689599297259111843061,0.3132420296422914196555,\ +0.7917886209906572769768,1.2228656637749606428400,1.1551462426298317875961,\ +0.3579601167993540777879,0.9549534865181378284760,0.8141418225805733266398,\ +0.7703675837106083168493,0.1543074266086776613616} + + +#define ZSOURCE2R {3.9219759730622172355652,4.6815521270036697387695,3.361602746881544589996,\ +5.3368766140192747116089,2.03906395938247442245,1.5899897180497646331787,\ +0.1818151073530316352844,4.0983706060796976089478,0.1058345986530184745789,\ +1.9653097167611122131348,2.7255953708663582801819,3.4376550372689962387085,\ +2.0337020372971892356873,3.0119446106255054473877,2.7625959040597081184387,\ +2.9445307422429323196411,5.7180739520117640495300,2.141770124435424804688,\ +6.8954616272822022438049,5.8555728476494550704956,4.2041230341419577598572,\ +4.2775720171630382537842,3.1845858739688992500305,5.7618944440037012100220,\ +4.2549022240564227104187,9.7619816288352012634277,2.518960000015795230866,\ +4.3911290075629949569702,0.7593036955222487449646,2.5593801774084568023682,\ +0.6706167431548237800598,7.6511315722018480300903,0.4173615900799632072449,\ +3.438271805644035339356,1.9701673323288559913635,2.1228986512869596481323,\ +3.1403985014185309410095,7.8216253779828548431396,0.5409323470667004585266,\ +9.1902069095522165298462,4.6035157097503542900085,2.9926850274205207824707,\ +0.0291663268581032752991,8.9934705849736928939819,8.3879271661862730979919,\ +4.3437494523823261260986,7.7678761305287480354309,1.3953176606446504592896,\ +1.1506372271105647087097,5.3554199635982513427734,4.3117330456152558326721,\ +6.145384786650538444519,9.2589621385559439659119,0.9938172809779644012451,\ +4.2805786477401852607727,9.431830951943993568420,0.3273952705785632133484,\ +9.2132670804858207702637,9.4490244099870324134827,9.007069906219840049744,\ +8.0943161016330122947693,0.2519542910158634185791,0.0196450622752308845520,\ +5.0752213317900896072388,4.0760429529473185539246,8.4080461412668228149414,\ +5.017265700735151767731,9.1287807654589414596558,4.4357294728979468345642,\ +5.9837839566171169281006,7.7418426470831036567688,7.9220082703977823257446,\ +5.5046048713847994804382,4.0850437059998512268066,7.2174380579963326454163,\ +4.768535858020186424255,6.3930579042062163352966,9.963865298777818679810,\ +1.5747882844880223274231,5.3506936598569154739380,2.1290646074339747428894,\ +5.59145063161849975586,4.304965981282293796539,0.2280548494309186935425,\ +5.7614597817882895469666,7.1491303853690624237061,9.3216359661892056465149,\ +1.2326993141323328018188,2.8655522270128130912781,0.1247995719313621520996,\ +5.7694048294797539710999,3.9386960770934820175171,6.8885837262496352195740,\ +9.7023218311369419097900,8.51576429326087236404,3.3933044690638780593872,\ +8.7725317804142832756042,1.1314024776220321655273,5.2641283208504319190979,\ +5.297394050285220146179,9.2917560925707221031189,9.7654302977025508880615,\ +6.2254639761522412300110,9.822583282366394996643,7.5429888023063540458679,\ +5.4547880962491035461426,7.2860160330310463905334,0.2525969501584768295288,\ +4.0251684701070189476013,0.9831319935619831085205,2.6086253346875309944153,\ +3.6363423336297273635864,1.7466178117319941520691,9.2341394722461700439453,\ +7.6051409030333161354065,5.6402041297405958175659,3.7970651825889945030212,\ +8.7762261740863323211670,8.21742579806596040726,6.787058124318718910217,\ +0.8220098121091723442078,2.5527314469218254089355,7.4444567272439599037170,\ +2.2695036139339208602905,6.836930788122117519379,9.3650726415216922760010,\ +5.0530174048617482185364,2.5248145777732133865356,6.8188397912308573722839,\ +2.8363681584596633911133,1.409485661424696445465,6.7591095995157957077026,\ +4.5126775791868567466736,7.5430292449891567230225,1.3702143030241131782532,\ +6.6082405392080545425415,3.8900542212650179862976,7.001820541918277740479,\ +9.168005720712244510651,2.1228999551385641098022,2.6978330826386809349060,\ +3.1998893804848194122314,0.2321802498772740364075,7.26544727571308612823,\ +1.5340585587546229362488,2.3552638292312622070312,0.8797382796183228492737,\ +7.1059537213295698165894,6.8887275597080588340759,6.5953194908797740936279,\ +1.8151161121204495429993,3.9049659762531518936157,1.5869047446176409721375,\ +6.2407150492072105407715,6.3760355720296502113342,4.2704886104911565780640,\ +1.0716815060004591941833,2.3822965659201145172119,9.4629473658278584480286,\ +4.5766852516680955886841,8.9644787041470408439636,4.4384705275297164916992,\ +8.08956819120794534683,6.8317985069006681442261,0.3401931514963507652283,\ +2.3805456422269344329834,9.4920115964487195014954,2.1827886346727609634399,\ +6.1546878470107913017273,8.3135433867573738098145,7.7340125897899270057678,\ +4.2441909667104482650757,7.262125960551202297211,7.0999773032963275909424,\ +4.7457459988072514533997,9.4386920798569917678833,1.4596485672518610954285,\ +0.7141010463237762451172,6.7337385797873139381409,6.536924717947840690613,\ +1.996896131895482540131,6.01412517949938774109,1.8993748771026730537415,\ +2.5839814636856317520142,0.9878737432882189750671,0.6199027225375175476074,\ +0.4034968325868248939514,7.4001471605151891708374,6.1626600986346602439880,\ +6.5835834480822086334229,2.5145971449092030525208,3.8433500844985246658325,\ +4.3964602379128336906433,6.5407369285821914672852,5.878106378950178623200,\ +6.0208318661898374557495,0.4535020282492041587830,2.0294443331658840179443,\ +7.844273825176060199738,2.6375361625105142593384} + + +#define ZSOURCE2I {4.3832763982936739921570,8.6648589745163917541504,3.7921421090140938758850,\ +7.6687160786241292953491,6.0066213225945830345154,7.85673560574650764465,\ +7.3871155502274632453918,5.5442603398114442825317,9.9291495559737086296082,\ +9.757428467273712158203,3.709622272290289402008,3.0322382133454084396362,\ +9.5195201179012656211853,7.1278580836951732635498,1.192370061762630939484,\ +5.0091631803661584854126,3.2900535268709063529968,4.8089468106627464294434,\ +3.3036959776654839515686,6.3044753577560186386108,2.1171907847747206687927,\ +4.4860231317579746246338,5.9145097108557820320129,6.8067426700145006179810,\ +0.7392961112782359123230,9.4336947053670883178711,1.2863306934013962745667,\ +2.0190807711333036422729,1.9693034281954169273376,8.9286901615560054779053,\ +4.6179189579561352729797,6.2512917164713144302368,7.0597065938636660575867,\ +7.0181696489453315734863,4.0879997471347451210022,0.6362213846296072006226,\ +0.6573933875188231468201,5.3310041315853595733643,0.3315818728879094123840,\ +3.157835649326443672180,3.785823243670165538788,4.6195234358310699462891,\ +6.2873698258772492408752,2.8785153012722730636597,3.2920487364754080772400,\ +4.7192330472171306610107,3.3537696348503232002258,5.5530697200447320938110,\ +1.196080814115703105927,7.6139996573328971862793,4.7909884760156273841858,\ +2.8169692959636449813843,2.380097783170640468597,3.2942054606974124908447,\ +2.3067280324175953865051,2.1362966019660234451294,4.0549980429932475090027,\ +3.0953712016344070434570,6.762971603311598300934,9.7069163154810667037964,\ +5.4417965700849890708923,0.2047479711472988128662,8.9413649635389447212219,\ +3.4903638903051614761353,1.1053651524707674980164,2.0233777537941932678223,\ +1.3046909729018807411194,8.573952978476881980896,6.3780163740739226341248,\ +4.0711227245628833770752,6.6919379355385899543762,2.042601602151989936829,\ +8.3104313490912318229675,0.1221632957458496093750,4.8844617092981934547424,\ +9.549877075478434562683,0.5874312063679099082947,8.2584649138152599334717,\ +2.9807415651157498359680,0.7757596764713525772095,5.8460923237726092338562,\ +7.528713606297969818115,0.5172297963872551918030,5.9586250688880681991577,\ +3.8337053125724196434021,4.9002202786505222320557,5.2727950783446431159973,\ +0.6889454741030931472778,8.843077751807868480682,7.1912937611341476440430,\ +0.6942595774307847023010,1.1522095929831266403198,4.862680672667920589447,\ +7.6715826056897640228271,0.8805298106744885444641,7.0085612777620553970337,\ +1.879138792864978313446,2.0178856328129768371582,4.0628212550655007362366,\ +4.0966569539159536361694,1.769564501009881496429,3.31293122842907905579,\ +0.5184767069295048713684,4.1492417920380830764771,7.2212355909869074821472,\ +0.7746253907680511474609,5.8558783913031220436096,3.7079446297138929367065,\ +2.1161167463287711143494,1.903268527239561080933,5.607953821308910846710,\ +9.4247916433960199356079,6.8177247745916247367859,2.7342410013079643249512,\ +2.0717754075303673744202,1.9379387702792882919312,6.797837591730058193207,\ +5.88365742936730384827,9.331753817386925220490,5.509122880175709724426,\ +8.0405469564720988273621,1.074489727616310119629,7.4039250845089554786682,\ +5.6103316973894834518433,7.6611549546942114830017,7.8306589089334011077881,\ +1.4388314681127667427063,1.6471924725919961929321,3.1774142337962985038757,\ +5.0265956297516822814941,6.9204960623756051064,7.0065794046968221664429,\ +8.8706119870766997337341,6.9797694869339466094971,6.7989911558106541633606,\ +3.6159398127347230911255,2.6739976881071925163269,0.7736870646476745605469,\ +1.494100340642035007477,3.2018390577286481857300,2.0260545751079916954041,\ +4.4988587312400341033936,7.7075743721798062324524,2.4352242145687341690063,\ +2.1261148853227496147156,1.0992341861128807067871,6.9814807781949639320374,\ +4.1509064938873052597046,5.0298188393935561180115,7.51160675659775733948,\ +9.9401472182944416999817,1.82876241393387317657,3.021917375735938549042,\ +3.7854864448308944702148,7.1531985932961106300354,9.5241537224501371383667,\ +4.7039186349138617515564,1.8709417246282100677490,2.55718790460377931595,\ +4.4350660685449838638306,7.2340781940147280693054,8.7619100883603096008301,\ +0.3733208635821938514710,4.2934664245694875717163,3.1572330510243773460388,\ +3.682477343827486038208,1.4587742509320378303528,6.7683792579919099807739,\ +5.2619793592020869255066,4.003625661134719848633,0.0291080260649323463440,\ +3.0681814532727003097534,7.9026939114555716514587,9.5779503695666790008545,\ +6.6892711864784359931946,2.9296159837394952774048,8.2238993747159838676453,\ +0.1798455044627189636231,8.7107013771310448646545,3.1810243334621191024780,\ +5.7244732743129134178162,5.7386581040918827056885,3.4920182498171925544739,\ +7.06729766912758350372,3.5992007283493876457214,4.0523112565279006958008,\ +6.1408105725422501564026,6.5240467619150876998901,0.2951709320768713951111,\ +5.6688958965241909027100,7.1140170888975262641907,4.5884906593710184097290,\ +4.7205173922702670097351,0.6237313523888587951660,0.8544011274352669715881,\ +0.1345641072839498519898,3.5430019116029143333435,6.7193946428596973419189,\ +1.3606189610436558723450,2.1197437215596437454224} + + +#define ZRESULT2R {1.7718546901199148102535,2.2873385372432406548171,1.6228701567171754938101,\ +2.2346263074245684698838,1.8473969837167181218263,2.0814403666906242662549,\ +2.000040135761198101250,1.930738025076279118508,2.2955316341715112926636,\ +2.2979125914561788768253,1.52676863913911398107,1.5225454413433419098567,\ +2.2756589535249842626285,2.0461560089912054216654,1.10158579014350732628,\ +1.7596676151017560663092,1.886619744318301705732,1.6609534913253483079387,\ +2.0341867590624715944614,2.1522631887405574424577,1.5490800609419352884544,\ +1.8243154431583954444562,1.9046961835587756795007,2.1880745312667504443027,\ +1.462943224821960486182,2.6082576924848916988253,1.0397086540972344526068,\ +1.5754847768676314423431,0.746979645400304148595,2.2287521705924668857790,\ +1.5403790183895167409389,2.29053332003721576982,1.9561479629741382879615,\ +2.056062919004959077540,1.5124829204355532130677,0.7957872878063905197621,\ +1.1657936572577645151227,2.247663310479210085902,-0.4549625893688244437918,\ +2.273939094117130466088,1.7851157264602297569667,1.705510493291471751931,\ +1.838553591041654167171,2.2452631537104275061267,2.1984262619387999748710,\ +1.858482175867823826820,2.1354614286115483068329,1.7449625890299069741474,\ +0.5066316450005309279803,2.2309587833094872699746,1.8633839241242127204856,\ +1.9110608576794807511590,2.2575857867741544460216,1.23571911173189863398,\ +1.581562045830424700910,2.2691047577207688057399,1.4031989962500943658341,\ +2.2741179432518765501925,2.4527182982567738989133,2.5833963585371355620168,\ +2.2776279862384747332271,-1.1249835300913728630690,2.1906906716320380112961,\ +1.8180097251363194210683,1.440608273684235829393,2.157337396250079031290,\ +1.6456014738468727198750,2.5276363856092047832647,2.0501201476301127435420,\ +1.9792596577711849548109,2.325636279713856779949,2.1018269082301319627959,\ +2.2993946557097193483798,1.407779382548410174181,2.1650335217497893580685,\ +2.3678319878208848869861,1.8594164774388513006187,2.56043452139564964298,\ +1.2152594801616827258073,1.6876273083151080989239,1.8280452566376663714465,\ +2.2383606348726785562064,1.4669353168458199032642,1.7855716392006990567154,\ +1.9344712649878033072781,2.1595582205209731263551,2.3711393709457433409682,\ +0.3451198452895575252697,2.2295598849908442318224,1.9730216569827605521681,\ +1.7597572254564382010500,1.4119056335367026200345,2.1320313551579719302254,\ +2.5151804905590435801344,2.1472364706413502588589,2.052431577045615185284,\ +2.1940570121896025845842,0.8387289948467516742525,1.8945610375322186058611,\ +1.901605848224737327357,2.2469410116186243620007,2.3333167208432867845147,\ +1.8321040495156570848678,2.3667788410376999763685,2.345870799293293007537,\ +1.7064766326923879180555,2.2351179984798275057756,1.3127927306468758494873,\ +1.5145818637157286712380,0.7618288453812751548355,1.8221250086585414340590,\ +2.3127298919002594601579,1.9513099157402993277799,2.2649290827240116108499,\ +2.0646178740610454660498,1.7857162805439725783430,2.0523808897592226152540,\ +2.357637781206334715023,2.5204455223537904906550,2.1680868421848340510394,\ +2.08969579055791898625,1.0187212773133276222381,2.351321025745570558740,\ +1.8003855797977157404688,2.3290564194645368978343,2.5020530275623595883872,\ +1.6589662323678027178175,1.1034736729371952268508,2.0179385634489594991692,\ +1.7529535621370035958222,1.9548092141654069830992,2.2757671672542376661852,\ +2.2978225629400212959297,2.329897705001075625120,1.9366802551403343723990,\ +2.0192737614105338295190,1.5519072144028889237433,1.9522381258437428996899,\ +2.228825942499146339770,1.3459088341323246496017,1.2160693133443531976923,\ +1.708519320712721833999,2.042657041378174831436,2.0363649964518035773153,\ +0.9638512795498686003270,0.9551846741593900125267,1.951137961258366582129,\ +2.107724763084950492242,2.1435395035941335883933,2.30219731892690226971,\ +2.3129821080069814520641,1.4613961122338947618005,1.2276638750511146280786,\ +1.98774702803650615834,2.2599263943254159769936,2.3454288218721179859472,\ +1.5736974684351636710744,1.1082826047896976451312,2.2826248447267389884985,\ +1.852079302129498561413,2.4440219801181322090144,2.2846216839061130876587,\ +2.0916390604994830049179,2.0880185293365247645170,1.1554676622252344486697,\ +1.4781743340729813773748,2.2621227047071905680298,1.9617338719614783038026,\ +2.0915485321054503309313,2.222172100020261886755,2.0456349034700243016971,\ +1.6557620395745074048932,2.3732960033711649749932,2.4784302018604411621538,\ +2.1043456955600268187823,2.2908052004546388680239,2.1225525715426596384816,\ +-0.3059820602804464440006,2.398801697565509982724,1.9837316998415748248163,\ +1.8021669050328577021958,2.1177911026101683411582,1.3800624471185749531088,\ +2.0182134290564768264176,1.3170274339145702224840,1.4108532825842892144408,\ +1.817110834423457665920,2.2890298175330245911141,1.8196542505912531861867,\ +2.1619335403208914669904,2.0209326327770549269758,1.7893311710629888899859,\ +1.8641960608110765829082,1.882576152038281991352,1.7816883851861540222217,\ +1.7954751269073565556056,1.2730999018963571334240,1.9486466131391497746961,\ +2.074605067637334876451,1.2189909546635331327735} + + +#define ZRESULT2I {0.8408843669071919268987,1.0754371807248737091811,0.8455094310786673839075,\ +0.962808271271232585242,1.2435335418309885202603,1.371120256581034091425,\ +1.5461888319559713433904,0.9342369007616236897817,1.56013775123029430070,\ +1.3720388608498168547811,0.9371355532144381994542,0.7228179279461685036168,\ +1.360325287393417292847,1.1709945644102059958414,0.4074578726347549695319,\ +1.0393742565506918218432,0.5221182542768327827787,1.1517977305599864656926,\ +0.4467977216337457035955,0.8222975857540034683169,0.4665224019878621564139,\ +0.8091797065019556978172,1.0768746352304479074746,0.8683388375483406251831,\ +0.1720341159830799382391,0.7682977019562435838651,0.4721387487057847609506,\ +0.4309811115589534114001,1.20279143843462255070,1.2916347740244560338141,\ +1.4265839008392693365579,0.6850460436644268957807,1.5117462274209296779759,\ +1.1152532149987959275705,1.1217014706271768442747,0.2911766403909815670303,\ +0.2063546073155473614680,0.5982511040925977408023,0.5499105526382754849379,\ +0.3309697617869979402450,0.6882370204600587459964,0.9959451809388051302108,\ +1.5661574844082004620560,0.3097639368523368297304,0.3740022155825183380884,\ +0.8268049495959598482742,0.407572856709710940049,1.3246230944084764757918,\ +0.8047604843662868878695,0.9578156211088914018248,0.8379992820836518196970,\ +0.4298072736875270249968,0.2516111351341220880862,1.2777930133692467773443,\ +0.4942674920588698839197,0.2227403824735175175142,1.4902323819071812138759,\ +0.3241206854947055737704,0.6212066791677098853697,0.8227777158663325263177,\ +0.5918914368525474145599,0.6824004867135488039409,1.5685992315253338702519,\ +0.602441091725517741118,0.2648167750385964080984,0.2361574036342227733698,\ +0.2544057494452062195833,0.7540670573431564882583,0.9631160038064509043565,\ +0.5974222702744066415548,0.7127866343417466055143,0.2523427003112133637508,\ +0.9857721947818851582213,0.0298961055939373325507,0.5949566736712420533806,\ +1.1076852186579833059454,0.0916284996635063769821,0.6920814866116709040966,\ +1.0847494758718594365376,0.1439797822740493671301,1.2215400197911927548944,\ +0.9319943094964961982640,0.1195740768674621451462,1.5325419323859537090726,\ +0.5871287736405550461427,0.6008795873685909283424,0.5147800680430554276512,\ +0.5096442477271476700906,1.2574287319730830247977,1.55344381002968989769,\ +0.1197588579388608048815,0.2845949117488152935174,0.6146775806026560928785,\ +0.6690416852557365956,0.1030338183393550155476,1.1198962694059428901738,\ +0.2110181909408466172096,1.0597850788835401214527,0.6573038229366630069706,\ +0.6582686240328038396186,0.1881909924839933190288,0.3270668956957688000564,\ +0.0830914673081940696742,0.3996821407672082604456,0.763608851537480148863,\ +0.1410651270101331844487,0.677001919140020169685,1.5027782434779339837405,\ +0.4840122714003086690227,1.0939971143713191903402,1.1354027775868176242113,\ +1.2025671422981056846169,1.3200023979900399329068,0.2878762084297626921980,\ +0.2659639364881328793544,0.3309563133803885004447,1.0613976119428301103653,\ +0.5905886949329369750572,0.84881047253311037171,0.6818405058224251691357,\ +1.4689172047242584628890,0.3984077871527766379067,0.7826684691736193189016,\ +1.1863976071520063726439,0.8421875864316380466690,0.6964016273061860440308,\ +0.2774051332309265816001,0.5780614975169666713839,0.4360596809152573194446,\ +1.0570616474517706695480,1.3698760574306645398934,0.8033735187122362786383,\ +1.100195299896877587642,0.7466330742895204153342,1.3719281224888897341430,\ +0.5006805450256617273652,0.6022149721715611692119,0.1100515320096066840261,\ +0.1615487638997855912582,0.9853189831543425203364,0.6441365190650450989196,\ +0.9525486295501676137221,1.540681786544560338825,0.3234105928346787672822,\ +0.9457654725170446807780,0.4366658824494836776964,1.4454467286135332937391,\ +0.5286797419321711544171,0.6306769685466229180548,0.8502600566998695930110,\ +1.3901817278534140953639,0.4379816003966337523146,1.0872460520812594619855,\ +0.5452429334871597976786,0.8427783441184910628863,1.1492861648773524674283,\ +1.346792368827264718689,0.665745289338786183642,0.2639277343938546960267,\ +0.7696845111061191291313,0.6789773815510785626159,1.1019111077295657974418,\ +0.0461157104075398602272,0.5610787453255564605215,1.4634600366382779501606,\ +0.9969191986962234741654,0.1524913254966685227654,1.2588290814744897971877,\ +0.7073635046287626293449,0.4488022872724745648831,0.0037636205385015429094,\ +0.6259389684526723840463,0.8276134607557569244918,0.9328971084913546540918,\ +0.9537519653655091023126,0.3009556732582234217510,1.3951370123387065724785,\ +0.2467179687642131191705,0.9127106501576134345299,0.4528896475979662383793,\ +1.2351598243895067774645,0.7619639996129009551495,1.0726338584530288322583,\ +1.220269965181696392165,1.3029226301867964377124,1.4189980227900089726489,\ +1.5051832236136615250643,0.7225617055791342391302,0.0478600995604049964105,\ +0.710883123025403795836,1.2310328539390928970221,0.8735414139313334436210,\ +0.8209275679220129351421,0.0950735258592600440686,0.1443422571457730618771,\ +0.0223460331642115414552,1.443489200421151252840,1.2774801572114198311425,\ +0.1717450012966928174496,0.6769828145758884918593} + + + + + /* in is between 0 and 1 + in2 between 0 and 10 */ + +void dlogsTest(void) { + + double in[]=SOURCE; + double res[]=RESULT; + double out; + double in2[]=SOURCE2; + double res2[]=RESULT2; + int i; + + for (i=0;i<200;i++){ + out=dlogs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } + + for (i=0;i<200;i++){ + out=dlogs(in2[i]); + assert(( (fabs(out-res2[i]))/(fabs(out)) )<1e-16); + } +} + + +/* FIXME : assert à 10^-14 */ +void zlogsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + double in2R[]=ZSOURCE2R; + double in2I[]=ZSOURCE2I; + double res2R[]=ZRESULT2R; + double res2I[]=ZRESULT2I; + doubleComplex in,in2,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zlogs(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-14); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-14); + } + + + for (i=0;i<200;i++){ + in2=DoubleComplex(in2R[i],in2I[i]); + out=zlogs(in2); + assert(( (fabs(zreals(out)-res2R[i]))/(fabs(zreals(out))) )<3e-14); + assert(( (fabs(zimags(out)-res2I[i]))/(fabs(zimags(out))) )<1e-14); + } +} + +void dlogaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + double in2[]=SOURCE2; + double res2[]=RESULT2; + int i; + + dloga(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } + + dloga(in2,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res2[i]))/(fabs(out[i])) )<1e-16); + } +} + +void zlogaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + double in2R[]=ZSOURCE2R; + double in2I[]=ZSOURCE2I; + double res2R[]=ZRESULT2R; + double res2I[]=ZRESULT2I; + doubleComplex *in,*in2,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + zloga(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-14); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-14); + } + + in2=DoubleComplexMatrix(in2R,in2I,200); + zloga(in2,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-res2R[i]))/(fabs(zreals(out[i]))) )<3e-14); + assert(( (fabs(zimags(out[i])-res2I[i]))/(fabs(zimags(out[i]))) )<1e-14); + } + + +} +int testLog(void) { + printf("\n>>>> Double Logarithm Tests\n"); + dlogsTest(); + zlogsTest(); + dlogaTest(); + zlogaTest(); + return 0; +} + +int main(void) { + assert(testLog() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log/testFloatLog.c b/2.3-1/src/c/elementaryFunctions/log/testFloatLog.c new file mode 100644 index 00000000..1966acf1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/testFloatLog.c @@ -0,0 +1,958 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog.h" + +#define SOURCE {0.3628176329657435417175f,0.924179898109287023544f,0.5243524145334959030151f,\ +0.7886543427594006061554f,0.6525151440873742103577f,0.2477638195268809795380f,\ +0.2364655844867229461670f,0.7240293831564486026764f,0.8278210600838065147400f,\ +0.4287728047929704189301f,0.4858888480812311172485f,0.5923984018154442310333f,\ +0.0949383648112416267395f,0.1356843891553580760956f,0.9917455688118934631348f,\ +0.7212927364744246006012f,0.0115638775750994682312f,0.0211908905766904354095f,\ +0.1524727698415517807007f,0.9165380974300205707550f,0.4467271203175187110901f,\ +0.5868234331719577312469f,0.1882771886885166168213f,0.4196520284749567508698f,\ +0.2730510598048567771912f,0.7565603456459939479828f,0.9378882069140672683716f,\ +0.0586007428355515003204f,0.5101847248151898384094f,0.5031699347309768199921f,\ +0.7783576548099517822266f,0.6856653341092169284821f,0.1381576983258128166199f,\ +0.371037633623927831650f,0.6366564910858869552612f,0.4961673622019588947296f,\ +0.2994064847007393836975f,0.2392275254242122173309f,0.5618183575570583343506f,\ +0.3218038142658770084381f,0.1082227518782019615173f,0.1685282415710389614105f,\ +0.8263800088316202163696f,0.4923414406366646289825f,0.7863734485581517219543f,\ +0.6762332352809607982635f,0.0258686169981956481934f,0.3594204657711088657379f,\ +0.3436427963897585868835f,0.2824054299853742122650f,0.1450859513133764266968f,\ +0.0762176741845905780792f,0.5220461571589112281799f,0.6713762427680194377899f,\ +0.0599394328892230987549f,0.7267188713885843753815f,0.2224657749757170677185f,\ +0.3122289828024804592133f,0.4435700643807649612427f,0.3983507198281586170197f,\ +0.1324583934620022773743f,0.8820166247896850109100f,0.5455272346735000610352f,\ +0.2917219498194754123688f,0.7739847479388117790222f,0.3354639573954045772552f,\ +0.8127403985708951950073f,0.4612239454872906208038f,0.6898109326139092445374f,\ +0.9649041066877543926239f,0.8210376314818859100342f,0.2802407057024538516998f,\ +0.9873316427692770957947f,0.294199434574693441391f,0.4859610591083765029907f,\ +0.2247181800194084644318f,0.9585652919486165046692f,0.1503968122415244579315f,\ +0.0216291621327400207520f,0.0688429796136915683746f,0.9950710041448473930359f,\ +0.7568672685883939266205f,0.6163959559053182601929f,0.0865804632194340229034f,\ +0.5165374809876084327698f,0.1916800136677920818329f,0.2940570451319217681885f,\ +0.3528221980668604373932f,0.1317937439307570457458f,0.0549608371220529079437f,\ +0.929352553561329841614f,0.737892795819789171219f,0.7509917514398694038391f,\ +0.6889848816208541393280f,0.8865169286727905273438f,0.6891661235131323337555f,\ +0.8677108911797404289246f,0.7947537912987172603607f,0.2496256213635206222534f,\ +0.3935408894903957843781f,0.7297343472018837928772f,0.7888072351925075054169f,\ +0.113488640636205673218f,0.4145256043411791324615f,0.6172473421320319175720f,\ +0.7440188056789338588715f,0.9038409832864999771118f,0.3976829168386757373810f,\ +0.9472072543576359748840f,0.2581262919120490550995f,0.1955799385905265808105f,\ +0.9381833248771727085114f,0.4226356102153658866882f,0.0937463282607495784760f,\ +0.9977992679923772811890f,0.2042182614095509052277f,0.9455819511786103248596f,\ +0.9336234177462756633759f,0.9743702597916126251221f,0.4100225553847849369049f,\ +0.5125095760449767112732f,0.0948633304797112941742f,0.5688196588307619094849f,\ +0.7322562676854431629181f,0.8108531581237912178040f,0.5459008770994842052460f,\ +0.5022544711828231811523f,0.7634959020651876926422f,0.7354982374235987663269f,\ +0.0699520572088658809662f,0.6130836438387632369995f,0.0965849910862743854523f,\ +0.5439325878396630287170f,0.9187005828134715557098f,0.5072866193950176239014f,\ +0.1335940570570528507233f,0.8688194593414664268494f,0.7999687767587602138519f,\ +0.9879787657409906387329f,0.7131399479694664478302f,0.3067426951602101325989f,\ +0.5431228461675345897675f,0.7330236807465553283691f,0.6498145484365522861481f,\ +0.8018737239763140678406f,0.2859625308774411678314f,0.1894423719495534896851f,\ +0.7794728656299412250519f,0.5433104271069169044495f,0.5268451268784701824188f,\ +0.1533693112432956695557f,0.6041304902173578739166f,0.5948378806933760643005f,\ +0.8857938847504556179047f,0.0043053645640611648560f,0.1302204323001205921173f,\ +0.9758609728887677192688f,0.9183407831005752086639f,0.0624175965785980224609f,\ +0.9939593323506414890289f,0.4122588960453867912292f,0.8258536770008504390717f,\ +0.0376359503716230392456f,0.4675730471499264240265f,0.4759115139022469520569f,\ +0.4060978214256465435028f,0.0392968021333217620850f,0.4401316107250750064850f,\ +0.3316476037725806236267f,0.0877817696891725063324f,0.1150833908468484878540f,\ +0.9667435702867805957794f,0.8103649737313389778137f,0.3928376468829810619354f,\ +0.7880131229758262634277f,0.4798596971668303012848f,0.0270724548026919364929f,\ +0.6701857983134686946869f,0.5602217521518468856812f,0.2564360727556049823761f,\ +0.2626037681475281715393f,0.4447338129393756389618f,0.8522944338619709014893f,\ +0.2347065494395792484283f,0.3277532672509551048279f,0.2253599218092858791351f,\ +0.3468936551362276077271f,0.7743145865388214588165f,0.1285835551097989082336f,\ +0.1156307714991271495819f,0.2054340392351150512695f,0.4535544612444937229156f,\ +0.6516549764201045036316f,0.0710035725496709346771f,0.1265540253371000289917f,\ +0.4974718545563519001007f,0.0879269847646355628967f,0.1462626229040324687958f,\ +0.715134423226118087769f,0.9305738122202455997467f} + +#define RESULT {-1.0138549594808059506335f,-0.0788485313675790222554f,-0.6455912738997077182646f,\ +-0.2374271494900490608870f,-0.4269209307253117313685f,-1.3952793271990111545477f,\ +-1.4419526017799386696794f,-0.3229233029497151630238f,-0.1889582589621221220266f,\ +-0.8468280928949678543205f,-0.7217753888910144466351f,-0.5235758944053595653756f,\ +-2.354527389398466841186f,-1.9974237581445692946147f,-0.0082886876471943305572f,\ +-0.3267102095711482134810f,-4.459869041610169837497f,-3.8541838794260296907623f,\ +-1.8807692572941765440930f,-0.0871516441756800402940f,-0.8058073398690168698266f,\ +-0.5330312996797691438289f,-1.6698399941066854879068f,-0.8683294147345963498452f,\ +-1.2980964690333058886296f,-0.2789729794097077220094f,-0.0641245194730828693697f,\ +-2.8370079061049158219987f,-0.6729824133243695882811f,-0.6868273235307851276588f,\ +-0.2505691498856313370602f,-0.3773656214470872405364f,-1.9793595047655996310709f,\ +-0.9914517831797942104544f,-0.4515250293249062352174f,-0.7008419853775434971155f,\ +-1.205953148244055972427f,-1.4303401906823356437570f,-0.5765766885249945516989f,\ +-1.1338131915858427056776f,-2.2235636585360341044293f,-1.7806519374711546888079f,\ +-0.1907005521377241608061f,-0.7085828181522180191365f,-0.240323473997209546837f,\ +-0.3912172398408133022762f,-3.6547247438886865111840f,-1.0232623619826317629133f,\ +-1.0681525436893481995071f,-1.264411545554370741584f,-1.93042894450046809141f,\ +-2.5741618985048786427683f,-0.6499992713325659643431f,-0.3984255796794416437656f,\ +-2.8144206784459675496635f,-0.3192155730871417684824f,-1.502982009541258934249f,\ +-1.1640184411209602011184f,-0.8128995091446955534309f,-0.9204224561330225373723f,\ +-2.0214866944753584476757f,-0.1255443741850884864508f,-0.6060025488810325544620f,\ +-1.231954157015291428934f,-0.2562031110919770759971f,-1.092240757863258915350f,\ +-0.2073435333764902521736f,-0.7738715719712579987899f,-0.3713377296431035756719f,\ +-0.0357265538888332026546f,-0.1971863344268207918208f,-1.2721063818886333418590f,\ +-0.0127492850765575892191f,-1.223497392724554932997f,-0.7216267835832522736794f,\ +-1.4929081951001816896962f,-0.0423175999341945593968f,-1.8944780628936490618486f,\ +-3.8337127761178795282149f,-2.6759270254015836698613f,-0.0049411834200203501311f,\ +-0.2785673796390666367984f,-0.483865736386189515539f,-2.446681086792801718133f,\ +-0.6606074257995434573232f,-1.651927892749795789840f,-1.2239814994040887352611f,\ +-1.0417910371382139711471f,-2.026517124423018234580f,-2.9011343997056400212387f,\ +-0.0732671142462539837226f,-0.3039567280501898061118f,-0.2863606107139139989037f,\ +-0.3725359507043504159185f,-0.1204550575726043570857f,-0.3722729288835950889336f,\ +-0.1418966944811957953121f,-0.2297229087732643171282f,-1.3877929980613914473508f,\ +-0.9325703042223095762253f,-0.3150747190128889152483f,-0.2372333033314831252092f,\ +-2.1760525295696577785520f,-0.8806205346832632896437f,-0.4824854567490562962107f,\ +-0.2956889680183093505050f,-0.1011018375069230867958f,-0.9221002825850308504130f,\ +-0.0542373561426655603768f,-1.3543063102932182406590f,-1.6317860900845253535607f,\ +-0.0638099067725128449302f,-0.8612449127611128130155f,-2.3671627801172654415041f,\ +-0.0022031571770593774348f,-1.5885659482121525787335f,-0.0559547196755256631695f,\ +-0.0686821150485829451382f,-0.0259639040526286474231f,-0.8915431076633286711086f,\ +-0.6684358831783273613425f,-2.3553180497276513527538f,-0.5641918391516044239964f,\ +-0.3116247338224413798713f,-0.2096683039932461523058f,-0.6053178634921361211951f,\ +-0.6886483730214458809371f,-0.2698475216395072595610f,-0.3072071353764207479742f,\ +-2.659945168598087494871f,-0.4892539023727084379622f,-2.3373319216128076725170f,\ +-0.6089299592172232600262f,-0.0847950173155939540548f,-0.6786791108759814283857f,\ +-2.0129495019748864237386f,-0.1406199321004115432299f,-0.2231825811274127380202f,\ +-0.0120940736302183569906f,-0.3380775973662459854552f,-1.181746009333312530387f,\ +-0.6104197485997391314783f,-0.3105772710053884000381f,-0.4310682668987352861301f,\ +-0.2208041349135003439397f,-1.25189448766300226445f,-1.6636704065163092636226f,\ +-0.2491374010581904052675f,-0.6100744334370675758805f,-0.6408486505219985751580f,\ +-1.8749064671471911136535f,-0.5039650609751163967687f,-0.5194663799859419173188f,\ +-0.1212709911627764675091f,-5.4478934608177302933996f,-2.038526631411456513376f,\ +-0.0244351485261014196582f,-0.0851867338269072515988f,-2.7739080469083896574034f,\ +-0.0060589862906551463645f,-0.8861037385262900967220f,-0.1913376676415258770270f,\ +-3.2797955584796012473703f,-0.7601996918711692030612f,-0.7425233371947113081291f,\ +-0.9011612089296217043000f,-3.2366121340710831688625f,-0.8206814815116268979622f,\ +-1.1036823082060371881141f,-2.4329014344197728014763f,-2.1620982756055884266289f,\ +-0.0338219993709664781822f,-0.2102705479450195091840f,-0.9343588647242980771424f,\ +-0.2382405357403041268327f,-0.7342615153765646995865f,-3.609238495954611991579f,\ +-0.4002002941250653034189f,-0.5794225876492602456125f,-1.36087587445700952671f,\ +-1.337108967835097139698f,-0.8102793489627861944768f,-0.1598232322015146200656f,\ +-1.449419270934711789778f,-1.1154941876589379301521f,-1.4900565023732303959747f,\ +-1.05873701535465292167f,-0.2557770454111949476328f,-2.0511763516400991491651f,\ +-2.1573531687271665369110f,-1.5826302735280548539265f,-0.7906399256902217898002f,\ +-0.4282400343889684046772f,-2.6450250856057104797969f,-2.0670859842226763092299f,\ +-0.6982162977399214431884f,-2.4312485274946018520836f,-1.9223514861397812403254f,\ +-0.3352847494467096622905f,-0.0719538807151878373469f} + + +#define SOURCE2 {2.6395560009405016899109f,4.1481037065386772155762f,2.8064980218186974525452f,\ +1.2800584640353918075562f,7.7831285959109663963318f,2.1190304495394229888916f,\ +1.121354666538536548615f,6.8568959552794694900513f,1.5312166837975382804871f,\ +6.970850601792335510254f,8.4155184263363480567932f,4.0620247554033994674683f,\ +4.09482547547668218613f,8.7841258011758327484131f,1.1383596854284405708313f,\ +1.9983377400785684585571f,5.6186607433483004570007f,5.8961773291230201721f,\ +6.8539796629920601844788f,8.9062247332185506820679f,5.0422128057107329368591f,\ +3.493615407496690750122f,3.8737787725403904914856f,9.2228986788541078567505f,\ +9.4881842611357569694519f,3.4353372454643249511719f,3.7601187312975525856018f,\ +7.3409405630081892013550f,2.6157614728435873985291f,4.99349383637309074402f,\ +2.6385784195736050605774f,5.25356308557093143463f,5.3762298030778765678406f,\ +1.1999255046248435974121f,2.2563034901395440101624f,6.2740930821746587753296f,\ +7.6084325974807143211365f,0.4855662025511264801025f,6.7239497276023030281067f,\ +2.017172696068882942200f,3.911573919467628002167f,8.3003165572881698608398f,\ +5.8787201577797532081604f,4.8291792999953031539917f,2.2328650346025824546814f,\ +8.4008856676518917083740f,1.2059959070757031440735f,2.8553641680628061294556f,\ +8.6075146449729800224304f,8.494101651012897491455f,5.2570608118548989295959f,\ +9.9312098976224660873413f,6.4885628735646605491638f,9.923190940171480178833f,\ +0.5004197778180241584778f,7.4855065811425447463989f,4.1040589986369013786316f,\ +6.0845263302326202392578f,8.5442108893766999244690f,0.6426467280834913253784f,\ +8.279082938097417354584f,9.2623437754809856414795f,5.6672112690284848213196f,\ +5.711638936772942543030f,8.1601104838773608207703f,0.5689279362559318542481f,\ +5.5959366867318749427795f,1.2493403162807226181030f,7.279222286306321620941f,\ +2.6777664758265018463135f,5.4653349192813038825989f,9.885407658293843269348f,\ +7.3956565884873270988464f,0.0371731072664260864258f,5.9005728596821427345276f,\ +3.096467358991503715515f,2.5522057106718420982361f,6.2518793903291225433350f,\ +1.1574173765257000923157f,6.1170040909200906753540f,6.7839562846347689628601f,\ +3.3200952783226966857910f,0.2587099233642220497131f,5.1744682248681783676147f,\ +3.9168732380494475364685f,2.4135384149849414825439f,5.064434898085892200470f,\ +4.2361020017415285110474f,2.8937275288626551628113f,0.8879321813583374023438f,\ +6.2128817522898316383362f,3.4549844544380903244019f,7.0648676296696066856384f,\ +5.2114724926650524139404f,2.8704008506610989570618f,6.502795079723000526428f,\ +0.8813347620889544487000f,4.498763345181941986084f,7.2272530803456902503967f,\ +8.9767962601035833358765f,2.4278218811377882957458f,4.3377211131155490875244f,\ +9.6770532103255391120911f,5.0685344357043504714966f,5.2329764096066355705261f,\ +5.5969475954771041870117f,5.6173070007935166358948f,4.68176002614200115204f,\ +7.794546722434461116791f,7.9010718129575252532959f,9.8085420625284314155579f,\ +8.1870661024004220962524f,4.2568723810836672782898f,2.4615605548024177551270f,\ +9.2295324662700295448303f,1.000745808705687522888f,4.6782181179150938987732f,\ +3.9504976756870746612549f,0.3661171020939946174622f,5.175368534401059150696f,\ +8.3254515705630183219910f,6.1048321425914764404297f,1.8711117887869477272034f,\ +0.1895748358219861984253f,8.4335647663101553916931f,0.7485948316752910614014f,\ +8.5328151332214474678040f,0.1245901081711053848267f,1.8675393564626574516296f,\ +4.920584075152873992920f,7.4896081397309899330f,9.414957007393240928650f,\ +2.1240556007251143455505f,5.7950199581682682037354f,2.628147569485008716583f,\ +4.3609866220504045486450f,9.1105451015755534172058f,8.0826673656702041625977f,\ +8.1026530498638749122620f,2.5904283951967954635620f,4.1390872886404395103455f,\ +3.599927779287099838257f,6.91278793383389711380f,7.6568587962538003921509f,\ +3.572649653069674968720f,7.6933998242020606994629f,5.4776339093223214149475f,\ +0.9622887428849935531616f,9.5611717319115996360779f,2.2074085660278797149658f,\ +0.1432593585923314094544f,8.1914897728711366653442f,1.3049928424879908561707f,\ +9.6820035576820373535156f,6.5613814676180481910706f,2.4455389659851789474487f,\ +5.2831235667690634727478f,8.4689256362617015838623f,7.8766220854595303535461f,\ +1.262082615867257118225f,7.8838609857484698295593f,3.4530424699187278747559f,\ +2.6598573336377739906311f,9.7098186518996953964233f,8.8752476638182997703552f,\ +2.066752854734659194946f,8.5251609655097126960754f,6.7446978110820055007935f,\ +9.152874383144080638886f,0.2848597615957260131836f,2.367841475643217563629f,\ +7.0153435599058866500854f,1.2025266280397772789001f,8.2874121330678462982178f,\ +3.1610729591920971870422f,5.30519076623022556305f,5.715174819342792034149f,\ +0.4780154302716255187988f,8.2486197212710976600647f,5.7988431211560964584351f,\ +2.7918082987889647483826f,9.5451109297573566436768f,9.0711546363309025764465f,\ +3.3601493109017610549927f,1.1756130633875727653503f,9.2537237703800201416016f,\ +7.2636712575331330299377f,9.0094979386776685714722f,3.9489932497963309288025f,\ +5.6551797501742839813232f,7.0614896761253476142883f,6.7878311965614557266235f,\ +4.1329363686963915824890f,1.402290873229503631592f,4.9523561308160424232483f,\ +4.1948772873729467391968f,8.6262222891673445701599f,2.8575096465647220611572f,\ +2.5121363671496510505676f,3.389101596549153327942f} + + +#define RESULT2 {0.9706107215522056241852f,1.4226512916310911638362f,1.0319374505428213772973f,\ +0.246905751916103338717f,2.0519583905069445073366f,0.7509586489514044060911f,\ +0.1145374781176292794394f,1.9252548546825831721208f,0.4260626375542267973984f,\ +1.9417372548863311987333f,2.1300774331528766758481f,1.4016815575274605976119f,\ +1.4097240974656071177407f,2.1729462062921069964716f,0.1295883538042104654586f,\ +0.6923157050192292327751f,1.7260933336118711167728f,1.7743042306089458204355f,\ +1.9248294562744026059420f,2.1867504404929474226549f,1.6178450344817050243762f,\ +1.2509371333857781660726f,1.3542304576599399901227f,2.2216893784894660157647f,\ +2.2500472625069045662372f,1.2341151000295289552611f,1.3244505343759986892849f,\ +1.993466976516135025221f,0.9615552493321314342367f,1.6081358323702796830901f,\ +0.9702402946929443716684f,1.658906529368289861637f,1.6819873484154954645931f,\ +0.1822594753876470019538f,0.8137278503591067746470f,1.8364289458354570161447f,\ +2.0292571844941731384893f,-0.7224396410182910566178f,1.9056757389571916672f,\ +0.7016968755690818904114f,1.3639398299492546673406f,2.1162936535075722588317f,\ +1.7713390779775688432807f,1.5746765360416834500512f,0.8032855297427843321856f,\ +2.1283371369164427733267f,0.1873057044979935803486f,1.0491993894614395355092f,\ +2.1526356176491328042744f,2.1393719992097341986437f,1.659572089557145968541f,\ +2.2956823132957397959331f,1.870041069148148160650f,2.294874536928924957380f,\ +-0.6923079771535994852982f,2.012968695092798743218f,1.4119764836513208905444f,\ +1.8057488812128539290569f,2.1452539646586252786165f,-0.4421601177273855043381f,\ +2.1137322059948120411832f,2.225957124135133913256f,1.7346971570693363595694f,\ +1.7425060116900870088585f,2.0992577085752079923964f,-0.5640015026903990591478f,\ +1.7220407427170496550417f,0.2226156650313379503636f,1.9850240276979147502345f,\ +0.9849830425057782834486f,1.6984254041571493765161f,2.2910596958626552321903f,\ +2.0008928803872945145770f,-3.2921697020833700086939f,1.7750494410596528993551f,\ +1.1302619000814182470549f,0.9369579698639551867956f,1.83288212099904845864f,\ +0.146191123459191885114f,1.8110724490390321950173f,1.9145604545765595450035f,\ +1.1999934808065779723307f,-1.3520478319474638073672f,1.6437365753918393718180f,\ +1.3652936921609135634270f,0.8810938927039604351421f,1.62224256150308399071f,\ +1.4436435071804869512135f,1.0625454734184220928483f,-0.1188599112506976002157f,\ +1.8266248385955683453119f,1.2398179577704631082469f,1.9551342798915567477991f,\ +1.6508624439841452780087f,1.0544516892385875639349f,1.8722320967378904832401f,\ +-0.1263177455503078638888f,1.5038025468266962292319f,1.9778590304154859413899f,\ +2.194643054750437638489f,0.8869945101840888135314f,1.4673491210608482493427f,\ +2.2697574345222681913015f,1.6230517098794554620156f,1.6549802193742981781810f,\ +1.7222213768989977911161f,1.7258523677080592761968f,1.5436741131934335058418f,\ +2.0534243510350704831069f,2.0669984227965598755361f,2.2832536450533371663596f,\ +2.1025556044304130054456f,1.4485347077928583114925f,0.9007955206863934582984f,\ +2.2224083935232625819367f,0.0007455307285780288533f,1.5429172933929051758639f,\ +1.3738415648213015973766f,-1.0048020456777133624371f,1.6439105509928255699492f,\ +2.1193172771056971726011f,1.8090806121136604467381f,0.6265327936561931876369f,\ +-1.6629714204274992361832f,2.1322195493342954719651f,-0.2895573875226954974060f,\ +2.1439193343978621975054f,-2.0827260644551484070064f,0.62462171221383455677f,\ +1.5934272379201788183423f,2.0135164783675794097917f,2.24229959570391956802f,\ +0.7533272804029441660489f,1.7569989208182723583462f,0.9662792518179295075953f,\ +1.4726983212224467045814f,2.209432545000515446532f,2.089721937569185339356f,\ +2.09219154507008475719f,0.951823265584673561257f,1.4204753018509210793496f,\ +1.2809137839516946399954f,1.9333730200617991190626f,2.0356018208291457582959f,\ +1.273307520236932832702f,2.0403627955950214278857f,1.700673239349282273025f,\ +-0.0384407248228896478159f,2.257710285652239079468f,0.7918192329452391486910f,\ +-1.943098595033752262751f,2.1030957827723826270017f,0.2661975560760838632746f,\ +2.2702688589706512267696f,1.8812011703610473922765f,0.8942655346201515698112f,\ +1.6645175074163265360738f,2.136403657202092354339f,2.0638991426068855616904f,\ +0.2327632262134610163784f,2.0648177566830252516183f,1.2392557177584351268962f,\ +0.9782724873844932389488f,2.273137605702431063293f,2.183266240754464071472f,\ +0.7259787064172199544387f,2.1430219045760425800040f,1.9087566867408878312773f,\ +2.2140679701900434217521f,-1.255758284393388990452f,0.8619787703734573813819f,\ +1.9480996873952269865526f,0.1844248666526293323198f,2.114737753111020968078f,\ +1.1509115140149177580753f,1.668685731123507043350f,1.7431248863402162285752f,\ +-0.7381122661087159420035f,2.1100458798366994450646f,1.7576584357875708608532f,\ +1.0266895216506544131f,2.2560290788762715763482f,2.205099558817555038814f,\ +1.2119854107561658373982f,0.1617897676032789000544f,2.2250260402856771868585f,\ +1.9828853838780200469216f,2.1982793473903963210603f,1.373460672957984574083f,\ +1.73257189512379894403f,1.9546560315313432631967f,1.9151314791431239825670f,\ +1.4189881394992434060498f,0.3381072372999247011016f,1.5998634493586285643119f,\ +1.4338640873752146465137f,2.15480666756291494579f,1.0499504925567986202140f,\ +0.9211335334181942613441f,1.2205648705022635880368f} + + + + + + + + +#define CSOURCER {0.3140813848003745079041f,0.5769402063451707363129f,0.1306138429790735244751f,\ +0.0478980806656181812286f,0.4500174494460225105286f,0.0384718659333884716034f,\ +0.483350999653339385986f,0.2981918179430067539215f,0.7112689120694994926453f,\ +0.9268360524438321590424f,0.9477838929742574691772f,0.1729496796615421772003f,\ +0.2750928336754441261292f,0.0044281478039920330048f,0.0611358620226383209229f,\ +0.1950612799264490604401f,0.3789803450927138328552f,0.2549188635312020778656f,\ +0.1764185149222612380981f,0.6008180272765457630157f,0.3703392641618847846985f,\ +0.2908470141701400279999f,0.5384815335273742675781f,0.8090293356217443943024f,\ +0.9260985879227519035339f,0.1576966657303273677826f,0.9518593531101942062378f,\ +0.2709982101805508136749f,0.1609848598018288612366f,0.8782086591236293315887f,\ +0.5091647170484066009521f,0.7951062084175646305084f,0.8432204117998480796814f,\ +0.5806765086017549037933f,0.3487791065126657485962f,0.9397577759809792041779f,\ +0.4363934816792607307434f,0.5549766751937568187714f,0.9105900451540946960449f,\ +0.5684339576400816440582f,0.1862502051517367362976f,0.0800832151435315608978f,\ +0.6585252787917852401733f,0.1606054832227528095245f,0.9711584830656647682190f,\ +0.3668168033473193645477f,0.7386338301002979278564f,0.9722552285529673099518f,\ +0.1349937235936522483826f,0.4595781317912042140961f,0.5414639282971620559692f,\ +0.6397600513882935047150f,0.0211964594200253486633f,0.4408156829886138439178f,\ +0.6374878138303756713867f,0.3208820023573935031891f,0.4267518399283289909363f,\ +0.7819778784178197383881f,0.0543234180659055709839f,0.9666189108975231647491f,\ +0.6948409983888268470764f,0.1846996019594371318817f,0.3645029179751873016357f,\ +0.8176643461920320987701f,0.664914294146001338959f,0.7559730983339250087738f,\ +0.5525381658226251602173f,0.7192269531078636646271f,0.1989364298060536384583f,\ +0.8610532465390861034393f,0.1300329938530921936035f,0.347959163133054971695f,\ +0.5025534434244036674500f,0.4978472082875669002533f,0.4675923939794301986694f,\ +0.9447452803142368793488f,0.9599315756931900978088f,0.5365384514443576335907f,\ +0.8122785724699497222900f,0.6470989421941339969635f,0.7010180121287703514099f,\ +0.6681951484642922878265f,0.9593638796359300613403f,0.0149199557490646839142f,\ +0.6199735002592206001282f,0.4061129498295485973358f,0.0471306145191192626953f,\ +0.8433605083264410495758f,0.0635268418118357658386f,0.9836421324871480464935f,\ +0.4434677045792341232300f,0.8565507535822689533234f,0.9080012599006295204163f,\ +0.4922491232864558696747f,0.1930142603814601898193f,0.3759337724186480045319f,\ +0.2437626412138342857361f,0.1035623974166810512543f,0.9936000052839517593384f,\ +0.5569599089212715625763f,0.3858396532014012336731f,0.7191527518443763256073f,\ +0.1707325801253318786621f,0.2878904812969267368317f,0.4294657362625002861023f,\ +0.8917979537509381771088f,0.6188817229121923446655f,0.3444608678109943866730f,\ +0.0692929709330201148987f,0.3619817639701068401337f,0.1783103235065937042236f,\ +0.8941529677249491214752f,0.9010278200730681419373f,0.0533773354254662990570f,\ +0.4162023533135652542114f,0.9438270372338593006134f,0.9242387460544705390930f,\ +0.8710649865679442882538f,0.2808376699686050415039f,0.8244629004038870334625f,\ +0.4650857029482722282410f,0.1462343498133122920990f,0.5975636970251798629761f,\ +0.3067605351097881793976f,0.2377215037122368812561f,0.0711208949796855449677f,\ +0.8753139786422252655029f,0.4413500339724123477936f,0.7631150623783469200134f,\ +0.9679268277250230312347f,0.3924236092716455459595f,0.717360940296202898026f,\ +0.8640465112403035163879f,0.7354763629846274852753f,0.0304915383458137512207f,\ +0.6331009590066969394684f,0.4550241930410265922546f,0.3173553734086453914642f,\ +0.8250397499650716781616f,0.2725940425880253314972f,0.3458735281601548194885f,\ +0.5352854127995669841766f,0.7017193175852298736572f,0.9817278520204126834869f,\ +0.2777477568015456199646f,0.1314821145497262477875f,0.366813333705067634583f,\ +0.7377605927176773548126f,0.9103105561807751655579f,0.3637479650788009166718f,\ +0.8207867145538330078125f,0.3059372254647314548492f,0.9788405327126383781433f,\ +0.9970494522713124752045f,0.4636328797787427902222f,0.7769650523550808429718f,\ +0.3400075891986489295959f,0.0353285889141261577606f,0.2607673071324825286865f,\ +0.5790986777283251285553f,0.1250711670145392417908f,0.0372988111339509487152f,\ +0.9382179621607065200806f,0.5585843441076576709747f,0.7192503632977604866028f,\ +0.3599752518348395824432f,0.6758626028895378112793f,0.2222136431373655796051f,\ +0.7860159231349825859070f,0.1736893891356885433197f,0.2674629595130681991577f,\ +0.7357366015203297138214f,0.0550541067495942115784f,0.5923380698077380657196f,\ +0.2162457890808582305908f,0.7718841419555246829987f,0.0926524316892027854919f,\ +0.7626169077120721340179f,0.7347808051854372024536f,0.8017499190755188465118f,\ +0.7732572900131344795227f,0.2559880572371184825897f,0.1179054826498031616f,\ +0.9232815303839743137360f,0.6709534404799342155457f,0.6071323617361485958099f,\ +0.4574467372149229049683f,0.8206311021931469440460f,0.0896153757348656654358f,\ +0.3426358769647777080536f,0.1674894802272319793701f,0.9481152505613863468170f,\ +0.9504805644974112510681f,0.3436607695184648036957f,0.2889420483261346817017f,\ +0.5325344172306358814240f,0.2558945687487721443176f,0.8863505902700126171112f,\ +0.0421485081315040588379f,0.4876015805639326572418f} + +#define CSOURCEI {0.347978035919368267059f,0.2037199228070676326752f,0.5962978359311819076538f,\ +0.8342303414829075336456f,0.6809655660763382911682f,0.9127784068696200847626f,\ +0.5243799723684787750244f,0.7204323844052851200104f,0.3259664541110396385193f,\ +0.1506391367875039577484f,0.9124387521296739578247f,0.6345743131823837757111f,\ +0.9268973069265484809875f,0.7633614349178969860077f,0.5918717086315155029297f,\ +0.9057438620366156101227f,0.3263365356251597404480f,0.3912780000828206539154f,\ +0.4635267537087202072144f,0.0849754814989864826202f,0.5800507226958870887756f,\ +0.7945564310066401958466f,0.3823457323014736175537f,0.3010852993465960025787f,\ +0.5789428642019629478455f,0.2627451247535645961761f,0.5713048521429300308228f,\ +0.1848654565401375293732f,0.9971724869683384895325f,0.4520535501651465892792f,\ +0.0334019884467124938965f,0.4553878181613981723785f,0.7851976407691836357117f,\ +0.4941168962977826595306f,0.9304408635944128036499f,0.7621670593507587909698f,\ +0.9264887655153870582581f,0.7199950958602130413055f,0.3973621018230915069580f,\ +0.8769331262446939945221f,0.6766644334420561790466f,0.8431562236510217189789f,\ +0.7608711589127779006958f,0.8287630719132721424103f,0.0037989662960171699524f,\ +0.9451942699961364269257f,0.6311131268739700317383f,0.0763222672976553440094f,\ +0.4486519275233149528503f,0.1080312891863286495209f,0.8351444136351346969604f,\ +0.3109649871475994586945f,0.1235694894567131996155f,0.0363539229147136211395f,\ +0.6609512977302074432373f,0.9844443709589540958405f,0.0688076755031943321228f,\ +0.5140342987142503261566f,0.3807653579860925674438f,0.1549817589111626148224f,\ +0.6850274773314595222473f,0.0382853033952414989471f,0.5224257782101631164551f,\ +0.7454454028047621250153f,0.4607118470594286918640f,0.4753002314828336238861f,\ +0.8575385268777608871460f,0.8073885519988834857941f,0.7132545644417405128479f,\ +0.0811268086545169353485f,0.5751824118196964263916f,0.884696914348751306534f,\ +0.5624709790572524070740f,0.7315255901776254177094f,0.6099120099097490310669f,\ +0.0705954921431839466095f,0.8552806274965405464172f,0.7045627343468368053436f,\ +0.5928074717521667480469f,0.8517647930420935153961f,0.2603117255493998527527f,\ +0.8596871509216725826263f,0.3943212013691663742065f,0.3333164160139858722687f,\ +0.2511775353923439979553f,0.5570420245639979839325f,0.7276714108884334564209f,\ +0.9383780122734606266022f,0.1971746077761054039001f,0.1607607132755219936371f,\ +0.7815325502306222915649f,0.1760376212187111377716f,0.2801528992131352424622f,\ +0.4699970218352973461151f,0.3507726117968559265137f,0.5713973813690245151520f,\ +0.4563077641651034355164f,0.9214398502372205257416f,0.4339873101562261581421f,\ +0.3514866163022816181183f,0.1816438222303986549377f,0.9070622171275317668915f,\ +0.7665811367332935333252f,0.9807842955924570560455f,0.1198607003316283226013f,\ +0.0508546582423150539398f,0.2581452894955873489380f,0.1401008707471191883087f,\ +0.5514106499031186103821f,0.7882929998449981212616f,0.8028824776411056518555f,\ +0.2425694861449301242828f,0.7024780390784144401550f,0.0922905071638524532318f,\ +0.4318286012858152389526f,0.0804965649731457233429f,0.7126307198777794837952f,\ +0.6893844078294932842255f,0.2756213061511516571045f,0.6968217701651155948639f,\ +0.4598932703956961631775f,0.6099067903123795986176f,0.3065654132515192031860f,\ +0.0749373403377830982208f,0.9619921119883656501770f,0.4158898773603141307831f,\ +0.3287452235817909240723f,0.7406168007291853427887f,0.5725225014612078666687f,\ +0.9504556744359433650970f,0.1849336978048086166382f,0.8698030491359531879425f,\ +0.6907873982563614845276f,0.9524399931542575359344f,0.6490485109388828277588f,\ +0.9960058168508112430573f,0.2040582066401839256287f,0.3800008497200906276703f,\ +0.9729049820452928543091f,0.9110585046000778675079f,0.3810073928907513618469f,\ +0.7869612383656203746796f,0.5560158789157867431641f,0.8529843934811651706696f,\ +0.4350629774853587150574f,0.5956362797878682613373f,0.7071880977600812911987f,\ +0.5747222309000790119171f,0.4764349022880196571350f,0.6098947445861995220184f,\ +0.9666662178933620452881f,0.3874611915089190006256f,0.0715632727369666099548f,\ +0.6122049516998231410980f,0.9575729314237833023071f,0.7723352131433784961700f,\ +0.1287384750321507453918f,0.3884150418452918529510f,0.2353963479399681091309f,\ +0.6542267077602446079254f,0.3286431683227419853210f,0.024017625954002141953f,\ +0.1042741741985082626343f,0.9314296473748981952667f,0.8185661518946290016174f,\ +0.8156488086096942424774f,0.8688247688114643096924f,0.3549220249988138675690f,\ +0.3890381073579192161560f,0.6415715864859521389008f,0.4902750719338655471802f,\ +0.3509976905770599842072f,0.8516392158344388008118f,0.1348936217837035655975f,\ +0.1156354099512100219727f,0.8810075619257986545563f,0.8367286501452326774597f,\ +0.5032693906687200069427f,0.4486711751669645309448f,0.9319602106697857379913f,\ +0.7298459419980645179749f,0.3388367067091166973114f,0.4314213804900646209717f,\ +0.7317318231798708438873f,0.9655342241749167442322f,0.2621376193128526210785f,\ +0.2050140891224145889282f,0.2826355365104973316193f,0.3973353477194905281067f,\ +0.7437736871652305126190f,0.8185287192463874816895f,0.3071001493372023105621f,\ +0.9627068741247057914734f,0.9475456266663968563080f,0.6546552237123250961304f,\ +0.1992082078941166400909f,0.3616109425202012062073f,0.9388273353688418865204f,\ +0.0409001447260379791260f,0.0758434669114649295807f} + +#define CRESULTR {-0.7576646139762764908809f,-0.4912662732014974609207f,-0.4935831983604013761813f,\ +-0.1796001444111503253520f,-0.2030603062114124668369f,-0.0903746939402042676059f,\ +-0.3380442117380291211504f,-0.2488385719103628768156f,-0.2453827611475934422636f,\ +-0.0629419446509737884332f,0.2743030686751847802007f,-0.4189753318430110562431f,\ +-0.0337034837449739430038f,-0.2700068328094388236948f,-0.5191589716059612502619f,\ +-0.0763304013057857499991f,-0.6929039668216129266298f,-0.7614418400301237177530f,\ +-0.7012514181881327468560f,-0.4995602487864141960650f,-0.3736855282655331400576f,\ +-0.1670990767606896909570f,-0.4148838171877601843640f,-0.1470641870540525808497f,\ +0.0881657571965975273010f,-1.1827451998005302780115f,0.1044920740886167709327f,\ +-1.1145963776166571967963f,0.0100332050022288142566f,-0.0123498399546466911675f,\ +-0.6728365416861274983518f,-0.0874315516128119363248f,0.1416698281269971604335f,\ +-0.2712125731855208887744f,-0.0063567040970050154788f,0.1906009971260032298535f,\ +0.0238331967155752874610f,-0.0953429917974444041118f,-0.0065067191893498198957f,\ +0.0440644425532304637172f,-0.3540655459766552382028f,-0.1661126167793314234444f,\ +0.0062509933701612868662f,-0.1693877982336349785619f,-0.0292579566847096204929f,\ +0.0137816953226981269570f,-0.0288761524361324552201f,-0.0250652390791611112686f,\ +-0.7581745137578204118967f,-0.7505545612383084375097f,-0.0046973071232757198853f,\ +-0.3406170651999906873186f,-2.0764518222153585114143f,-0.8157393323281721952966f,\ +-0.0852474852363154095292f,0.0348077956215509243254f,-0.8387202021909221372198f,\ +-0.0663540586103768398329f,-0.9554969196553003696337f,-0.0212599130834864695483f,\ +-0.0245601140031842454792f,-1.6679899099681032570430f,-0.4509584277017124609443f,\ +0.1011698547763601602201f,-0.2120439010955574854478f,-0.1131958883879479044188f,\ +0.0199327284817682297280f,0.0781443465987670671247f,-0.3004592565973881468366f,\ +-0.1451799924584522560878f,-0.5281452333714923286223f,-0.0505933914241510074294f,\ +-0.2819958038859460280889f,-0.122323084811984963971f,-0.2632782651610236501760f,\ +-0.0540558326414990047981f,0.2512879183645665981395f,-0.1214932149359973512226f,\ +0.0055773659320434761794f,0.0673704632706614986448f,-0.2906343733694730646633f,\ +0.0851020319327377705587f,0.0365640112295984101576f,-1.0976622196833336619903f,\ +-0.4020870876485082012763f,-0.3719849821436939651953f,-0.3158125612041708385469f,\ +0.2324359424588408329360f,-1.5742845766045041600023f,-0.0033130260706617652329f,\ +-0.1069329039454427060507f,-0.1341564770393289252048f,-0.0510429776001832605226f,\ +-0.3847912680433241972011f,-0.9153668051115183557087f,-0.3798345871473772783489f,\ +-0.6590618454479428844905f,-0.0755413642077243097095f,0.0808833545731707098669f,\ +-0.417646722764209388234f,-0.8522405945532404158982f,0.1463133685463073596633f,\ +-0.2416082657366604991012f,0.0219217192558878656850f,-0.8077093656959043466159f,\ +-0.1128924015633438332484f,-0.3996389102953575300781f,-0.9892317511551623754329f,\ +-0.5874413267393940873973f,-0.1422192352759769073955f,-0.1954743580270074387872f,\ +-0.0763719684521397823573f,0.1332266112260754309382f,-2.2385346085566988350024f,\ +-0.5112419918132667939759f,-0.0541885453710462053345f,0.1544990573544810508189f,\ +0.1051325180789595692410f,-0.9326914829433226028499f,0.0764891336322670034598f,\ +-0.4245421077023512346216f,-0.4665013282915527192962f,-0.3980722181205589849107f,\ +-1.152706389176620049852f,-0.0091123646200983177135f,-0.8629224644504486230190f,\ +-0.0671956049468366567456f,-0.1483256896732535745631f,-0.0470857769330114903084f,\ +0.3049502630226416100001f,-0.8351336293434713509143f,0.1199665328310368234144f,\ +0.100965515388687754328f,0.1851149271955789266109f,-0.4311455286578065315695f,\ +0.1656739977240755667953f,-0.6957805672270640506838f,-0.7030137346248552798755f,\ +0.2434410334133135511703f,-0.0502776447144934607314f,-0.6643994214275527054880f,\ +-0.0494471424057717073852f,-0.1105954430789197057150f,0.2627700024490645658304f,\ +-0.6613338575819812659162f,-0.4943364682181946023753f,-0.2273273919604619497381f,\ +-0.0669964153308245241591f,0.0270809622513717325465f,-0.3423076587443550367063f,\ +0.2375373770411028651051f,-0.7058599113455784612725f,-0.0187211007688289424178f,\ +0.1570046667576522059218f,0.0619494218295955287323f,0.0912342621811634557627f,\ +-1.0118000314587793919685f,-0.9415613562651380386015f,-1.04611739737066766764f,\ +-0.1350076179226963601909f,-1.045153664947628735504f,-3.1153566294303054462489f,\ +-0.0576346967934074291828f,0.0825782285147220879162f,0.0858710750707356584854f,\ +-0.1147913938093602786994f,0.0959901869720326261781f,-0.8704897942843184965866f,\ +-0.1312205414500346722928f,-0.4084692473683823599195f,-0.5825265796688483543875f,\ +-0.2043543873503067542785f,-0.1585071715930248537063f,-0.4983971045262390875408f,\ +-1.405591688480441803222f,0.1581272765392360557524f,-0.1721619754559372272862f,\ +-0.0902428450071243726249f,-0.1497365537505691013287f,0.2065025609822116192671f,\ +0.0613750886386554700413f,-0.8564551079948240497330f,-0.804653684520539647096f,\ +0.1638887899169061412863f,0.1619231669215081825808f,-0.4135383706484943022730f,\ +-0.6905772083929240245936f,-0.1416337472709212619293f,-0.8981660716461068449945f,\ +-0.1997922350746098307805f,-0.1797380100619248022298f,-0.0033949848444226812805f,\ +0.3022174959979692654422f,0.0079098230306947625579f,-0.3346557902575436060921f,\ +-0.5646231542298842942529f,-0.8141969637368523526888f,0.2555170413707821830407f,\ +-2.8347892907784113525338f,-0.7063037006217763869032f} + +#define CRESULTI {0.8365523024247201178127f,0.3394374381847692356828f,1.355160662925530390410f,\ +1.5134434006476746858993f,0.9868300791435297147913f,1.528673168936313331301f,\ +0.8260899014265745687879f,1.1783591647662248202977f,0.4297253343366602140740f,\ +0.1611216299891750081130f,0.7663999599077054858398f,1.3047144916618338417180f,\ +1.2822880914611145541926f,1.5649955384218765530591f,1.4678689248356304730692f,\ +1.3586758006659467312716f,0.7108977814935093508808f,0.9933651109027943348906f,\ +1.2071246910756632253481f,0.1405010934420483359464f,1.0025763105214653414521f,\ +1.21989563358396813086f,0.6174353300937470701015f,0.3562751652356153653223f,\ +0.5587012199090121145062f,1.0302380576516638743811f,0.5405656721364887618009f,\ +0.5986555168040823549092f,1.4107360213988626718162f,0.4753739371565622318094f,\ +0.0655076733245526648952f,0.5201329289544929235234f,0.7497818580560413614933f,\ +0.7050355621930805005704f,1.2121540141336599738509f,0.6814274485183255958276f,\ +1.1306014284455374596661f,0.9141116926495304051414f,0.4114688990228685949724f,\ +0.9956827833608694611200f,1.3022000158632660582469f,1.4761001233596913184698f,\ +0.8573788009054216230354f,1.379379585022410426021f,0.0039117682490215858332f,\ +1.2006025140002900553071f,0.7070620318380608226860f,0.0783395850399789817065f,\ +1.2785255791075276210478f,0.2308747034561683952880f,0.9955835564035591112031f,\ +0.4524376138027601523817f,1.4009149235535949262754f,0.0822834615192538504358f,\ +0.8034667275967887212218f,1.2557032585647818212493f,0.1598599852603853899158f,\ +0.5815258576469973794687f,1.4290836436420499833133f,0.1589807896730044689537f,\ +0.7782863583371778526399f,0.2043896563749957318024f,0.9616073478994561218869f,\ +0.7392289023091881405847f,0.6059375681629087795343f,0.5612744745893767372991f,\ +0.9984170767670760282542f,0.8430838000818645650014f,1.29879528501095431459f,\ +0.0939407915654127262384f,1.3484611857054962236191f,1.1960714214373144859138f,\ +0.8415982269448546437829f,0.9732366936364994502995f,0.9167206383382787704406f,\ +0.0745857498941502189416f,0.7278097264573785141195f,0.9199632393837048338625f,\ +0.6304525502744320331061f,0.9211062195464506663356f,0.3555526540057888373880f,\ +0.9100796877015666641597f,0.3899732161636976779384f,1.5260640477653748536824f,\ +0.3849315818496458763143f,0.9408368768631211187525f,1.5061175798419510485360f,\ +0.838676229611447277001f,1.2591119550131308901797f,0.1620018843959732390836f,\ +1.0546671087981356329522f,0.2026968016035011754816f,0.299271305708051660321f,\ +0.7622771187183752239491f,1.067757629024185028754f,0.9888735682758375000745f,\ +1.0801593307389727449674f,1.4588740911245949849473f,0.4118082358815949306496f,\ +0.5629599662610861310341f,0.4399958138718327860239f,0.9004381750108224613527f,\ +1.3516535386697041687398f,1.2852850170743990165789f,0.2721670546404741375390f,\ +0.0569631738604013462823f,0.3951736758236387148102f,0.3862903740059538404417f,\ +1.4457867030840705346861f,1.1403205655573340759901f,1.3522555755333163229892f,\ +0.264908300074692404369f,0.6622029195378335009181f,1.0464389789763977045567f,\ +0.8038225849224520658254f,0.0850815175089563863198f,0.6568351393392068970911f,\ +0.669491640154789569017f,0.7760242270392859742500f,0.7016907095208140265896f,\ +0.7797846541592131641707f,1.335473484345777617222f,0.4740136251481967821775f,\ +0.2395937042296285568455f,1.3285359486862795552753f,1.401425714315664317056f,\ +0.3592738595863486095183f,1.0333805631652628331807f,0.6436572543635337151358f,\ +0.7762911838119904706090f,0.4403927201098556398762f,0.8811512979588507210593f,\ +0.674423430961778702653f,0.9132365009577151360176f,1.5238520140402758151765f,\ +1.00458246450610100275f,0.4215689680173497211335f,0.874990498737184374534f,\ +0.8674547514202983755638f,1.2800682610709759323697f,0.8336956783393613124034f,\ +0.9734878037135866746254f,0.6700663792657182149526f,0.7153420705223627606983f,\ +1.0026132338500262086711f,1.3535381134312993722801f,1.0923065980664201646277f,\ +0.6618099327465949421878f,0.4821732258146940175436f,1.033019939116806895640f,\ +0.8668307442664776596430f,0.9024324853624734465996f,0.0729804020494689703602f,\ +0.5506621520352920073904f,1.1198886719657494825952f,0.7824098301910974440077f,\ +0.3619529370272654977825f,1.4800901440707066036850f,0.7343084050589578914980f,\ +0.8462379976616437593506f,1.2071528313995831815930f,0.5720924999360996743292f,\ +0.1106864208392598775132f,1.0305927183418297499173f,0.8498909387724447039858f,\ +1.15517062965696792887f,0.9096742728488710350021f,1.01141253782177353848f,\ +0.4595989696224830889371f,1.3064089912173471041967f,1.071386424855859109684f,\ +0.4451357270611538408112f,1.5062412806888749727818f,0.2239121309027737871666f,\ +0.4910523338147070870896f,0.8513221989625705532490f,1.460513851259993778342f,\ +0.5833202395880134893957f,0.5481910770820362932554f,0.8603624185522980027940f,\ +0.7565250407629732221082f,0.9237902776741101495972f,1.3040155501467787235725f,\ +0.6701717740731456540715f,0.9634987985586029868301f,0.4075854524817449364704f,\ +0.4213313914917447000619f,0.3316883655770838101873f,1.3489670985956061510791f,\ +1.1391029061589752480188f,1.3689599297259111843061f,0.3132420296422914196555f,\ +0.7917886209906572769768f,1.2228656637749606428400f,1.1551462426298317875961f,\ +0.3579601167993540777879f,0.9549534865181378284760f,0.8141418225805733266398f,\ +0.7703675837106083168493f,0.1543074266086776613616f} + +#define CSOURCE2R {3.9219759730622172355652f,4.6815521270036697387695f,3.361602746881544589996f,\ +5.3368766140192747116089f,2.03906395938247442245f,1.5899897180497646331787f,\ +0.1818151073530316352844f,4.0983706060796976089478f,0.1058345986530184745789f,\ +1.9653097167611122131348f,2.7255953708663582801819f,3.4376550372689962387085f,\ +2.0337020372971892356873f,3.0119446106255054473877f,2.7625959040597081184387f,\ +2.9445307422429323196411f,5.7180739520117640495300f,2.141770124435424804688f,\ +6.8954616272822022438049f,5.8555728476494550704956f,4.2041230341419577598572f,\ +4.2775720171630382537842f,3.1845858739688992500305f,5.7618944440037012100220f,\ +4.2549022240564227104187f,9.7619816288352012634277f,2.518960000015795230866f,\ +4.3911290075629949569702f,0.7593036955222487449646f,2.5593801774084568023682f,\ +0.6706167431548237800598f,7.6511315722018480300903f,0.4173615900799632072449f,\ +3.438271805644035339356f,1.9701673323288559913635f,2.1228986512869596481323f,\ +3.1403985014185309410095f,7.8216253779828548431396f,0.5409323470667004585266f,\ +9.1902069095522165298462f,4.6035157097503542900085f,2.9926850274205207824707f,\ +0.0291663268581032752991f,8.9934705849736928939819f,8.3879271661862730979919f,\ +4.3437494523823261260986f,7.7678761305287480354309f,1.3953176606446504592896f,\ +1.1506372271105647087097f,5.3554199635982513427734f,4.3117330456152558326721f,\ +6.145384786650538444519f,9.2589621385559439659119f,0.9938172809779644012451f,\ +4.2805786477401852607727f,9.431830951943993568420f,0.3273952705785632133484f,\ +9.2132670804858207702637f,9.4490244099870324134827f,9.007069906219840049744f,\ +8.0943161016330122947693f,0.2519542910158634185791f,0.0196450622752308845520f,\ +5.0752213317900896072388f,4.0760429529473185539246f,8.4080461412668228149414f,\ +5.017265700735151767731f,9.1287807654589414596558f,4.4357294728979468345642f,\ +5.9837839566171169281006f,7.7418426470831036567688f,7.9220082703977823257446f,\ +5.5046048713847994804382f,4.0850437059998512268066f,7.2174380579963326454163f,\ +4.768535858020186424255f,6.3930579042062163352966f,9.963865298777818679810f,\ +1.5747882844880223274231f,5.3506936598569154739380f,2.1290646074339747428894f,\ +5.59145063161849975586f,4.304965981282293796539f,0.2280548494309186935425f,\ +5.7614597817882895469666f,7.1491303853690624237061f,9.3216359661892056465149f,\ +1.2326993141323328018188f,2.8655522270128130912781f,0.1247995719313621520996f,\ +5.7694048294797539710999f,3.9386960770934820175171f,6.8885837262496352195740f,\ +9.7023218311369419097900f,8.51576429326087236404f,3.3933044690638780593872f,\ +8.7725317804142832756042f,1.1314024776220321655273f,5.2641283208504319190979f,\ +5.297394050285220146179f,9.2917560925707221031189f,9.7654302977025508880615f,\ +6.2254639761522412300110f,9.822583282366394996643f,7.5429888023063540458679f,\ +5.4547880962491035461426f,7.2860160330310463905334f,0.2525969501584768295288f,\ +4.0251684701070189476013f,0.9831319935619831085205f,2.6086253346875309944153f,\ +3.6363423336297273635864f,1.7466178117319941520691f,9.2341394722461700439453f,\ +7.6051409030333161354065f,5.6402041297405958175659f,3.7970651825889945030212f,\ +8.7762261740863323211670f,8.21742579806596040726f,6.787058124318718910217f,\ +0.8220098121091723442078f,2.5527314469218254089355f,7.4444567272439599037170f,\ +2.2695036139339208602905f,6.836930788122117519379f,9.3650726415216922760010f,\ +5.0530174048617482185364f,2.5248145777732133865356f,6.8188397912308573722839f,\ +2.8363681584596633911133f,1.409485661424696445465f,6.7591095995157957077026f,\ +4.5126775791868567466736f,7.5430292449891567230225f,1.3702143030241131782532f,\ +6.6082405392080545425415f,3.8900542212650179862976f,7.001820541918277740479f,\ +9.168005720712244510651f,2.1228999551385641098022f,2.6978330826386809349060f,\ +3.1998893804848194122314f,0.2321802498772740364075f,7.26544727571308612823f,\ +1.5340585587546229362488f,2.3552638292312622070312f,0.8797382796183228492737f,\ +7.1059537213295698165894f,6.8887275597080588340759f,6.5953194908797740936279f,\ +1.8151161121204495429993f,3.9049659762531518936157f,1.5869047446176409721375f,\ +6.2407150492072105407715f,6.3760355720296502113342f,4.2704886104911565780640f,\ +1.0716815060004591941833f,2.3822965659201145172119f,9.4629473658278584480286f,\ +4.5766852516680955886841f,8.9644787041470408439636f,4.4384705275297164916992f,\ +8.08956819120794534683f,6.8317985069006681442261f,0.3401931514963507652283f,\ +2.3805456422269344329834f,9.4920115964487195014954f,2.1827886346727609634399f,\ +6.1546878470107913017273f,8.3135433867573738098145f,7.7340125897899270057678f,\ +4.2441909667104482650757f,7.262125960551202297211f,7.0999773032963275909424f,\ +4.7457459988072514533997f,9.4386920798569917678833f,1.4596485672518610954285f,\ +0.7141010463237762451172f,6.7337385797873139381409f,6.536924717947840690613f,\ +1.996896131895482540131f,6.01412517949938774109f,1.8993748771026730537415f,\ +2.5839814636856317520142f,0.9878737432882189750671f,0.6199027225375175476074f,\ +0.4034968325868248939514f,7.4001471605151891708374f,6.1626600986346602439880f,\ +6.5835834480822086334229f,2.5145971449092030525208f,3.8433500844985246658325f,\ +4.3964602379128336906433f,6.5407369285821914672852f,5.878106378950178623200f,\ +6.0208318661898374557495f,0.4535020282492041587830f,2.0294443331658840179443f,\ +7.844273825176060199738f,2.6375361625105142593384f} + +#define CSOURCE2I {4.3832763982936739921570f,8.6648589745163917541504f,3.7921421090140938758850f,\ +7.6687160786241292953491f,6.0066213225945830345154f,7.85673560574650764465f,\ +7.3871155502274632453918f,5.5442603398114442825317f,9.9291495559737086296082f,\ +9.757428467273712158203f,3.709622272290289402008f,3.0322382133454084396362f,\ +9.5195201179012656211853f,7.1278580836951732635498f,1.192370061762630939484f,\ +5.0091631803661584854126f,3.2900535268709063529968f,4.8089468106627464294434f,\ +3.3036959776654839515686f,6.3044753577560186386108f,2.1171907847747206687927f,\ +4.4860231317579746246338f,5.9145097108557820320129f,6.8067426700145006179810f,\ +0.7392961112782359123230f,9.4336947053670883178711f,1.2863306934013962745667f,\ +2.0190807711333036422729f,1.9693034281954169273376f,8.9286901615560054779053f,\ +4.6179189579561352729797f,6.2512917164713144302368f,7.0597065938636660575867f,\ +7.0181696489453315734863f,4.0879997471347451210022f,0.6362213846296072006226f,\ +0.6573933875188231468201f,5.3310041315853595733643f,0.3315818728879094123840f,\ +3.157835649326443672180f,3.785823243670165538788f,4.6195234358310699462891f,\ +6.2873698258772492408752f,2.8785153012722730636597f,3.2920487364754080772400f,\ +4.7192330472171306610107f,3.3537696348503232002258f,5.5530697200447320938110f,\ +1.196080814115703105927f,7.6139996573328971862793f,4.7909884760156273841858f,\ +2.8169692959636449813843f,2.380097783170640468597f,3.2942054606974124908447f,\ +2.3067280324175953865051f,2.1362966019660234451294f,4.0549980429932475090027f,\ +3.0953712016344070434570f,6.762971603311598300934f,9.7069163154810667037964f,\ +5.4417965700849890708923f,0.2047479711472988128662f,8.9413649635389447212219f,\ +3.4903638903051614761353f,1.1053651524707674980164f,2.0233777537941932678223f,\ +1.3046909729018807411194f,8.573952978476881980896f,6.3780163740739226341248f,\ +4.0711227245628833770752f,6.6919379355385899543762f,2.042601602151989936829f,\ +8.3104313490912318229675f,0.1221632957458496093750f,4.8844617092981934547424f,\ +9.549877075478434562683f,0.5874312063679099082947f,8.2584649138152599334717f,\ +2.9807415651157498359680f,0.7757596764713525772095f,5.8460923237726092338562f,\ +7.528713606297969818115f,0.5172297963872551918030f,5.9586250688880681991577f,\ +3.8337053125724196434021f,4.9002202786505222320557f,5.2727950783446431159973f,\ +0.6889454741030931472778f,8.843077751807868480682f,7.1912937611341476440430f,\ +0.6942595774307847023010f,1.1522095929831266403198f,4.862680672667920589447f,\ +7.6715826056897640228271f,0.8805298106744885444641f,7.0085612777620553970337f,\ +1.879138792864978313446f,2.0178856328129768371582f,4.0628212550655007362366f,\ +4.0966569539159536361694f,1.769564501009881496429f,3.31293122842907905579f,\ +0.5184767069295048713684f,4.1492417920380830764771f,7.2212355909869074821472f,\ +0.7746253907680511474609f,5.8558783913031220436096f,3.7079446297138929367065f,\ +2.1161167463287711143494f,1.903268527239561080933f,5.607953821308910846710f,\ +9.4247916433960199356079f,6.8177247745916247367859f,2.7342410013079643249512f,\ +2.0717754075303673744202f,1.9379387702792882919312f,6.797837591730058193207f,\ +5.88365742936730384827f,9.331753817386925220490f,5.509122880175709724426f,\ +8.0405469564720988273621f,1.074489727616310119629f,7.4039250845089554786682f,\ +5.6103316973894834518433f,7.6611549546942114830017f,7.8306589089334011077881f,\ +1.4388314681127667427063f,1.6471924725919961929321f,3.1774142337962985038757f,\ +5.0265956297516822814941f,6.9204960623756051064f,7.0065794046968221664429f,\ +8.8706119870766997337341f,6.9797694869339466094971f,6.7989911558106541633606f,\ +3.6159398127347230911255f,2.6739976881071925163269f,0.7736870646476745605469f,\ +1.494100340642035007477f,3.2018390577286481857300f,2.0260545751079916954041f,\ +4.4988587312400341033936f,7.7075743721798062324524f,2.4352242145687341690063f,\ +2.1261148853227496147156f,1.0992341861128807067871f,6.9814807781949639320374f,\ +4.1509064938873052597046f,5.0298188393935561180115f,7.51160675659775733948f,\ +9.9401472182944416999817f,1.82876241393387317657f,3.021917375735938549042f,\ +3.7854864448308944702148f,7.1531985932961106300354f,9.5241537224501371383667f,\ +4.7039186349138617515564f,1.8709417246282100677490f,2.55718790460377931595f,\ +4.4350660685449838638306f,7.2340781940147280693054f,8.7619100883603096008301f,\ +0.3733208635821938514710f,4.2934664245694875717163f,3.1572330510243773460388f,\ +3.682477343827486038208f,1.4587742509320378303528f,6.7683792579919099807739f,\ +5.2619793592020869255066f,4.003625661134719848633f,0.0291080260649323463440f,\ +3.0681814532727003097534f,7.9026939114555716514587f,9.5779503695666790008545f,\ +6.6892711864784359931946f,2.9296159837394952774048f,8.2238993747159838676453f,\ +0.1798455044627189636231f,8.7107013771310448646545f,3.1810243334621191024780f,\ +5.7244732743129134178162f,5.7386581040918827056885f,3.4920182498171925544739f,\ +7.06729766912758350372f,3.5992007283493876457214f,4.0523112565279006958008f,\ +6.1408105725422501564026f,6.5240467619150876998901f,0.2951709320768713951111f,\ +5.6688958965241909027100f,7.1140170888975262641907f,4.5884906593710184097290f,\ +4.7205173922702670097351f,0.6237313523888587951660f,0.8544011274352669715881f,\ +0.1345641072839498519898f,3.5430019116029143333435f,6.7193946428596973419189f,\ +1.3606189610436558723450f,2.1197437215596437454224f} + +#define CRESULT2R {1.7718546901199148102535f,2.2873385372432406548171f,1.6228701567171754938101f,\ +2.2346263074245684698838f,1.8473969837167181218263f,2.0814403666906242662549f,\ +2.000040135761198101250f,1.930738025076279118508f,2.2955316341715112926636f,\ +2.2979125914561788768253f,1.52676863913911398107f,1.5225454413433419098567f,\ +2.2756589535249842626285f,2.0461560089912054216654f,1.10158579014350732628f,\ +1.7596676151017560663092f,1.886619744318301705732f,1.6609534913253483079387f,\ +2.0341867590624715944614f,2.1522631887405574424577f,1.5490800609419352884544f,\ +1.8243154431583954444562f,1.9046961835587756795007f,2.1880745312667504443027f,\ +1.462943224821960486182f,2.6082576924848916988253f,1.0397086540972344526068f,\ +1.5754847768676314423431f,0.746979645400304148595f,2.2287521705924668857790f,\ +1.5403790183895167409389f,2.29053332003721576982f,1.9561479629741382879615f,\ +2.056062919004959077540f,1.5124829204355532130677f,0.7957872878063905197621f,\ +1.1657936572577645151227f,2.247663310479210085902f,-0.4549625893688244437918f,\ +2.273939094117130466088f,1.7851157264602297569667f,1.705510493291471751931f,\ +1.838553591041654167171f,2.2452631537104275061267f,2.1984262619387999748710f,\ +1.858482175867823826820f,2.1354614286115483068329f,1.7449625890299069741474f,\ +0.5066316450005309279803f,2.2309587833094872699746f,1.8633839241242127204856f,\ +1.9110608576794807511590f,2.2575857867741544460216f,1.23571911173189863398f,\ +1.581562045830424700910f,2.2691047577207688057399f,1.4031989962500943658341f,\ +2.2741179432518765501925f,2.4527182982567738989133f,2.5833963585371355620168f,\ +2.2776279862384747332271f,-1.1249835300913728630690f,2.1906906716320380112961f,\ +1.8180097251363194210683f,1.440608273684235829393f,2.157337396250079031290f,\ +1.6456014738468727198750f,2.5276363856092047832647f,2.0501201476301127435420f,\ +1.9792596577711849548109f,2.325636279713856779949f,2.1018269082301319627959f,\ +2.2993946557097193483798f,1.407779382548410174181f,2.1650335217497893580685f,\ +2.3678319878208848869861f,1.8594164774388513006187f,2.56043452139564964298f,\ +1.2152594801616827258073f,1.6876273083151080989239f,1.8280452566376663714465f,\ +2.2383606348726785562064f,1.4669353168458199032642f,1.7855716392006990567154f,\ +1.9344712649878033072781f,2.1595582205209731263551f,2.3711393709457433409682f,\ +0.3451198452895575252697f,2.2295598849908442318224f,1.9730216569827605521681f,\ +1.7597572254564382010500f,1.4119056335367026200345f,2.1320313551579719302254f,\ +2.5151804905590435801344f,2.1472364706413502588589f,2.052431577045615185284f,\ +2.1940570121896025845842f,0.8387289948467516742525f,1.8945610375322186058611f,\ +1.901605848224737327357f,2.2469410116186243620007f,2.3333167208432867845147f,\ +1.8321040495156570848678f,2.3667788410376999763685f,2.345870799293293007537f,\ +1.7064766326923879180555f,2.2351179984798275057756f,1.3127927306468758494873f,\ +1.5145818637157286712380f,0.7618288453812751548355f,1.8221250086585414340590f,\ +2.3127298919002594601579f,1.9513099157402993277799f,2.2649290827240116108499f,\ +2.0646178740610454660498f,1.7857162805439725783430f,2.0523808897592226152540f,\ +2.357637781206334715023f,2.5204455223537904906550f,2.1680868421848340510394f,\ +2.08969579055791898625f,1.0187212773133276222381f,2.351321025745570558740f,\ +1.8003855797977157404688f,2.3290564194645368978343f,2.5020530275623595883872f,\ +1.6589662323678027178175f,1.1034736729371952268508f,2.0179385634489594991692f,\ +1.7529535621370035958222f,1.9548092141654069830992f,2.2757671672542376661852f,\ +2.2978225629400212959297f,2.329897705001075625120f,1.9366802551403343723990f,\ +2.0192737614105338295190f,1.5519072144028889237433f,1.9522381258437428996899f,\ +2.228825942499146339770f,1.3459088341323246496017f,1.2160693133443531976923f,\ +1.708519320712721833999f,2.042657041378174831436f,2.0363649964518035773153f,\ +0.9638512795498686003270f,0.9551846741593900125267f,1.951137961258366582129f,\ +2.107724763084950492242f,2.1435395035941335883933f,2.30219731892690226971f,\ +2.3129821080069814520641f,1.4613961122338947618005f,1.2276638750511146280786f,\ +1.98774702803650615834f,2.2599263943254159769936f,2.3454288218721179859472f,\ +1.5736974684351636710744f,1.1082826047896976451312f,2.2826248447267389884985f,\ +1.852079302129498561413f,2.4440219801181322090144f,2.2846216839061130876587f,\ +2.0916390604994830049179f,2.0880185293365247645170f,1.1554676622252344486697f,\ +1.4781743340729813773748f,2.2621227047071905680298f,1.9617338719614783038026f,\ +2.0915485321054503309313f,2.222172100020261886755f,2.0456349034700243016971f,\ +1.6557620395745074048932f,2.3732960033711649749932f,2.4784302018604411621538f,\ +2.1043456955600268187823f,2.2908052004546388680239f,2.1225525715426596384816f,\ +-0.3059820602804464440006f,2.398801697565509982724f,1.9837316998415748248163f,\ +1.8021669050328577021958f,2.1177911026101683411582f,1.3800624471185749531088f,\ +2.0182134290564768264176f,1.3170274339145702224840f,1.4108532825842892144408f,\ +1.817110834423457665920f,2.2890298175330245911141f,1.8196542505912531861867f,\ +2.1619335403208914669904f,2.0209326327770549269758f,1.7893311710629888899859f,\ +1.8641960608110765829082f,1.882576152038281991352f,1.7816883851861540222217f,\ +1.7954751269073565556056f,1.2730999018963571334240f,1.9486466131391497746961f,\ +2.074605067637334876451f,1.2189909546635331327735f} + +#define CRESULT2I {0.8408843669071919268987f,1.0754371807248737091811f,0.8455094310786673839075f,\ +0.962808271271232585242f,1.2435335418309885202603f,1.371120256581034091425f,\ +1.5461888319559713433904f,0.9342369007616236897817f,1.56013775123029430070f,\ +1.3720388608498168547811f,0.9371355532144381994542f,0.7228179279461685036168f,\ +1.360325287393417292847f,1.1709945644102059958414f,0.4074578726347549695319f,\ +1.0393742565506918218432f,0.5221182542768327827787f,1.1517977305599864656926f,\ +0.4467977216337457035955f,0.8222975857540034683169f,0.4665224019878621564139f,\ +0.8091797065019556978172f,1.0768746352304479074746f,0.8683388375483406251831f,\ +0.1720341159830799382391f,0.7682977019562435838651f,0.4721387487057847609506f,\ +0.4309811115589534114001f,1.20279143843462255070f,1.2916347740244560338141f,\ +1.4265839008392693365579f,0.6850460436644268957807f,1.5117462274209296779759f,\ +1.1152532149987959275705f,1.1217014706271768442747f,0.2911766403909815670303f,\ +0.2063546073155473614680f,0.5982511040925977408023f,0.5499105526382754849379f,\ +0.3309697617869979402450f,0.6882370204600587459964f,0.9959451809388051302108f,\ +1.5661574844082004620560f,0.3097639368523368297304f,0.3740022155825183380884f,\ +0.8268049495959598482742f,0.407572856709710940049f,1.3246230944084764757918f,\ +0.8047604843662868878695f,0.9578156211088914018248f,0.8379992820836518196970f,\ +0.4298072736875270249968f,0.2516111351341220880862f,1.2777930133692467773443f,\ +0.4942674920588698839197f,0.2227403824735175175142f,1.4902323819071812138759f,\ +0.3241206854947055737704f,0.6212066791677098853697f,0.8227777158663325263177f,\ +0.5918914368525474145599f,0.6824004867135488039409f,1.5685992315253338702519f,\ +0.602441091725517741118f,0.2648167750385964080984f,0.2361574036342227733698f,\ +0.2544057494452062195833f,0.7540670573431564882583f,0.9631160038064509043565f,\ +0.5974222702744066415548f,0.7127866343417466055143f,0.2523427003112133637508f,\ +0.9857721947818851582213f,0.0298961055939373325507f,0.5949566736712420533806f,\ +1.1076852186579833059454f,0.0916284996635063769821f,0.6920814866116709040966f,\ +1.0847494758718594365376f,0.1439797822740493671301f,1.2215400197911927548944f,\ +0.9319943094964961982640f,0.1195740768674621451462f,1.5325419323859537090726f,\ +0.5871287736405550461427f,0.6008795873685909283424f,0.5147800680430554276512f,\ +0.5096442477271476700906f,1.2574287319730830247977f,1.55344381002968989769f,\ +0.1197588579388608048815f,0.2845949117488152935174f,0.6146775806026560928785f,\ +0.6690416852557365956f,0.1030338183393550155476f,1.1198962694059428901738f,\ +0.2110181909408466172096f,1.0597850788835401214527f,0.6573038229366630069706f,\ +0.6582686240328038396186f,0.1881909924839933190288f,0.3270668956957688000564f,\ +0.0830914673081940696742f,0.3996821407672082604456f,0.763608851537480148863f,\ +0.1410651270101331844487f,0.677001919140020169685f,1.5027782434779339837405f,\ +0.4840122714003086690227f,1.0939971143713191903402f,1.1354027775868176242113f,\ +1.2025671422981056846169f,1.3200023979900399329068f,0.2878762084297626921980f,\ +0.2659639364881328793544f,0.3309563133803885004447f,1.0613976119428301103653f,\ +0.5905886949329369750572f,0.84881047253311037171f,0.6818405058224251691357f,\ +1.4689172047242584628890f,0.3984077871527766379067f,0.7826684691736193189016f,\ +1.1863976071520063726439f,0.8421875864316380466690f,0.6964016273061860440308f,\ +0.2774051332309265816001f,0.5780614975169666713839f,0.4360596809152573194446f,\ +1.0570616474517706695480f,1.3698760574306645398934f,0.8033735187122362786383f,\ +1.100195299896877587642f,0.7466330742895204153342f,1.3719281224888897341430f,\ +0.5006805450256617273652f,0.6022149721715611692119f,0.1100515320096066840261f,\ +0.1615487638997855912582f,0.9853189831543425203364f,0.6441365190650450989196f,\ +0.9525486295501676137221f,1.540681786544560338825f,0.3234105928346787672822f,\ +0.9457654725170446807780f,0.4366658824494836776964f,1.4454467286135332937391f,\ +0.5286797419321711544171f,0.6306769685466229180548f,0.8502600566998695930110f,\ +1.3901817278534140953639f,0.4379816003966337523146f,1.0872460520812594619855f,\ +0.5452429334871597976786f,0.8427783441184910628863f,1.1492861648773524674283f,\ +1.346792368827264718689f,0.665745289338786183642f,0.2639277343938546960267f,\ +0.7696845111061191291313f,0.6789773815510785626159f,1.1019111077295657974418f,\ +0.0461157104075398602272f,0.5610787453255564605215f,1.4634600366382779501606f,\ +0.9969191986962234741654f,0.1524913254966685227654f,1.2588290814744897971877f,\ +0.7073635046287626293449f,0.4488022872724745648831f,0.0037636205385015429094f,\ +0.6259389684526723840463f,0.8276134607557569244918f,0.9328971084913546540918f,\ +0.9537519653655091023126f,0.3009556732582234217510f,1.3951370123387065724785f,\ +0.2467179687642131191705f,0.9127106501576134345299f,0.4528896475979662383793f,\ +1.2351598243895067774645f,0.7619639996129009551495f,1.0726338584530288322583f,\ +1.220269965181696392165f,1.3029226301867964377124f,1.4189980227900089726489f,\ +1.5051832236136615250643f,0.7225617055791342391302f,0.0478600995604049964105f,\ +0.710883123025403795836f,1.2310328539390928970221f,0.8735414139313334436210f,\ +0.8209275679220129351421f,0.0950735258592600440686f,0.1443422571457730618771f,\ +0.0223460331642115414552f,1.443489200421151252840f,1.2774801572114198311425f,\ +0.1717450012966928174496f,0.6769828145758884918593f} + + +/* in is between 0 and 1 + in2 is between 0 and 10 */ + + +/* FIXME : Tests à 10^-4 +in the slogsTest with these values +in : 1.00074577 --- out : 0.00074550 --- result : 0.00074553 + */ + +void slogsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + float in2[]=SOURCE2; + float res2[]=RESULT2; + int i; + + for (i=0;i<200;i++){ + out=slogs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<8e-6); + } + + for (i=0;i<200;i++){ + out=slogs(in2[i]); + assert( ( (fabs(out-res2[i]) ) / (fabs(out)) )<3e-4); + } +} + +void clogsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + float in2R[]=CSOURCE2R; + float in2I[]=CSOURCE2I; + float res2R[]=CRESULT2R; + float res2I[]=CRESULT2I; + floatComplex in,in2,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=clogs(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<3e-5); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } + + for (i=0;i<200;i++){ + in2=FloatComplex(in2R[i],in2I[i]); + out=clogs(in2); + assert(( (fabs(creals(out)-res2R[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-res2I[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void slogaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + float in2[]=SOURCE2; + float res2[]=RESULT2; + int i; + + sloga(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-5); + } + + sloga(in2,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res2[i]))/(fabs(out[i])) )<3e-4); + } +} + +void clogaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + float in2R[]=CSOURCE2R; + float in2I[]=CSOURCE2I; + float res2R[]=CRESULT2R; + float res2I[]=CRESULT2I; + floatComplex *in,*in2,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + cloga(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<3e-5); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } + + + in2=FloatComplexMatrix(in2R,in2I,200); + cloga(in2,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-res2R[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-res2I[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + + +int testLog(void) { + printf("\n>>>> Float Logarithm Tests\n"); + slogsTest(); + clogsTest(); + slogaTest(); + clogaTest(); + return 0; +} + +int main(void) { + assert(testLog() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log/testLog.h b/2.3-1/src/c/elementaryFunctions/log/testLog.h new file mode 100644 index 00000000..b0f3bacb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/testLog.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTLOG_H_ +#define _TESTLOG_H_ + +#include +#include +#include +#include "log.h" + +void slogsTest(void); + +void dlogsTest(void); + +void clogsTest(void); + +void zlogsTest(void); + +void slogaTest(void); + +void dlogaTest(void); + +void clogaTest(void); + +void zlogaTest(void); + +int testLog(void); + +#endif /* ! _TESTLOG_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/log/zloga.c b/2.3-1/src/c/elementaryFunctions/log/zloga.c new file mode 100644 index 00000000..d4f083d7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/zloga.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log.h" + +void zloga(doubleComplex* in, int size, doubleComplex* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = zlogs(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log/zlogs.c b/2.3-1/src/c/elementaryFunctions/log/zlogs.c new file mode 100644 index 00000000..e5e9ded1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log/zlogs.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log.h" +#include "lapack.h" +#include "log1p.h" +#include "pythag.h" + +doubleComplex zlogs(doubleComplex in) { + static double sR2 = 1.41421356237309504; + + double _RealIn = zreals(in); + double _ImgIn = zimags(in); + + double _RealOut = 0; + double _ImgOut = 0; + + double RMax = getOverflowThreshold(); + double LInf = sqrt(getUnderflowThreshold()); + double LSup = sqrt(0.5 * RMax); + + double AbsReal = fabs(_RealIn); + double AbsImg = fabs(_ImgIn); + + _ImgOut = atan2(_ImgIn, _RealIn); + + if(_ImgIn > _RealIn) + {/* switch Real part and Imaginary part */ + double Temp = AbsReal; + AbsReal = AbsImg; + AbsImg = Temp; + } + + if((0.5 <= AbsReal) && (AbsReal <= sR2)) + _RealOut = 0.5 * dlog1ps((AbsReal - 1) * (AbsReal + 1) + AbsImg * AbsImg); + else if(LInf < AbsImg && AbsReal < LSup) + _RealOut = 0.5 * dlogs(AbsReal * AbsReal + AbsImg * AbsImg); + else if(AbsReal > RMax) + _RealOut = AbsReal; + else + { + double Temp = dpythags(AbsReal, AbsImg); + if(Temp <= RMax) + { + _RealOut = dlogs(Temp); + } + else /* handle rare spurious overflow with : */ + { + double Temp2 = AbsImg/AbsReal; + _RealOut = dlogs(AbsReal) + 0.5 * dlog1ps(Temp2 * Temp2); + } + } + return DoubleComplex(_RealOut, _ImgOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/Makefile.am b/2.3-1/src/c/elementaryFunctions/log10/Makefile.am new file mode 100644 index 00000000..6e5e0908 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/Makefile.am @@ -0,0 +1,67 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libLog10_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libLog10.la + +libLog10_la_SOURCES = $(HEAD) $(SRC) + +SRC = slog10s.c \ + dlog10s.c \ + clog10s.c \ + zlog10s.c \ + slog10a.c \ + dlog10a.c \ + clog10a.c \ + zlog10a.c + +HEAD = ../includes/log10.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatLog10 testDoubleLog10 + +TESTS = testFloatLog10 testDoubleLog10 + +# +# -*- 10-Base Logarithm Tests -*- +# +testFloatLog10_SOURCES = testLog10.h testFloatLog10.c +testFloatLog10_CFLAGS = $(check_INCLUDES) +testFloatLog10_LDADD = $(check_LDADD) + +testDoubleLog10_SOURCES = testLog10.h testDoubleLog10.c +testDoubleLog10_CFLAGS = $(check_INCLUDES) +testDoubleLog10_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/log10/Makefile.in b/2.3-1/src/c/elementaryFunctions/log10/Makefile.in new file mode 100644 index 00000000..fdfaa1e1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/Makefile.in @@ -0,0 +1,808 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatLog10$(EXEEXT) testDoubleLog10$(EXEEXT) +TESTS = testFloatLog10$(EXEEXT) testDoubleLog10$(EXEEXT) +subdir = src/c/elementaryFunctions/log10 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLog10_la_LIBADD = +am__objects_1 = +am__objects_2 = libLog10_la-slog10s.lo libLog10_la-dlog10s.lo \ + libLog10_la-clog10s.lo libLog10_la-zlog10s.lo \ + libLog10_la-slog10a.lo libLog10_la-dlog10a.lo \ + libLog10_la-clog10a.lo libLog10_la-zlog10a.lo +am_libLog10_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libLog10_la_OBJECTS = $(am_libLog10_la_OBJECTS) +libLog10_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLog10_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLog10_OBJECTS = \ + testDoubleLog10-testDoubleLog10.$(OBJEXT) +testDoubleLog10_OBJECTS = $(am_testDoubleLog10_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleLog10_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleLog10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLog10_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLog10_OBJECTS = testFloatLog10-testFloatLog10.$(OBJEXT) +testFloatLog10_OBJECTS = $(am_testFloatLog10_OBJECTS) +testFloatLog10_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatLog10_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLog10_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLog10_la_SOURCES) $(testDoubleLog10_SOURCES) \ + $(testFloatLog10_SOURCES) +DIST_SOURCES = $(libLog10_la_SOURCES) $(testDoubleLog10_SOURCES) \ + $(testFloatLog10_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLog10_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLog10.la +libLog10_la_SOURCES = $(HEAD) $(SRC) +SRC = slog10s.c \ + dlog10s.c \ + clog10s.c \ + zlog10s.c \ + slog10a.c \ + dlog10a.c \ + clog10a.c \ + zlog10a.c + +HEAD = ../includes/log10.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log10/libLog10.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- 10-Base Logarithm Tests -*- +# +testFloatLog10_SOURCES = testLog10.h testFloatLog10.c +testFloatLog10_CFLAGS = $(check_INCLUDES) +testFloatLog10_LDADD = $(check_LDADD) +testDoubleLog10_SOURCES = testLog10.h testDoubleLog10.c +testDoubleLog10_CFLAGS = $(check_INCLUDES) +testDoubleLog10_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/log10/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/log10/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLog10.la: $(libLog10_la_OBJECTS) $(libLog10_la_DEPENDENCIES) + $(libLog10_la_LINK) -rpath $(pkglibdir) $(libLog10_la_OBJECTS) $(libLog10_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLog10$(EXEEXT): $(testDoubleLog10_OBJECTS) $(testDoubleLog10_DEPENDENCIES) + @rm -f testDoubleLog10$(EXEEXT) + $(testDoubleLog10_LINK) $(testDoubleLog10_OBJECTS) $(testDoubleLog10_LDADD) $(LIBS) +testFloatLog10$(EXEEXT): $(testFloatLog10_OBJECTS) $(testFloatLog10_DEPENDENCIES) + @rm -f testFloatLog10$(EXEEXT) + $(testFloatLog10_LINK) $(testFloatLog10_OBJECTS) $(testFloatLog10_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-clog10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-clog10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-dlog10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-dlog10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-slog10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-slog10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-zlog10a.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog10_la-zlog10s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLog10-testDoubleLog10.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLog10-testFloatLog10.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLog10_la-slog10s.lo: slog10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-slog10s.lo -MD -MP -MF $(DEPDIR)/libLog10_la-slog10s.Tpo -c -o libLog10_la-slog10s.lo `test -f 'slog10s.c' || echo '$(srcdir)/'`slog10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-slog10s.Tpo $(DEPDIR)/libLog10_la-slog10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slog10s.c' object='libLog10_la-slog10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-slog10s.lo `test -f 'slog10s.c' || echo '$(srcdir)/'`slog10s.c + +libLog10_la-dlog10s.lo: dlog10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-dlog10s.lo -MD -MP -MF $(DEPDIR)/libLog10_la-dlog10s.Tpo -c -o libLog10_la-dlog10s.lo `test -f 'dlog10s.c' || echo '$(srcdir)/'`dlog10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-dlog10s.Tpo $(DEPDIR)/libLog10_la-dlog10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlog10s.c' object='libLog10_la-dlog10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-dlog10s.lo `test -f 'dlog10s.c' || echo '$(srcdir)/'`dlog10s.c + +libLog10_la-clog10s.lo: clog10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-clog10s.lo -MD -MP -MF $(DEPDIR)/libLog10_la-clog10s.Tpo -c -o libLog10_la-clog10s.lo `test -f 'clog10s.c' || echo '$(srcdir)/'`clog10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-clog10s.Tpo $(DEPDIR)/libLog10_la-clog10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clog10s.c' object='libLog10_la-clog10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-clog10s.lo `test -f 'clog10s.c' || echo '$(srcdir)/'`clog10s.c + +libLog10_la-zlog10s.lo: zlog10s.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-zlog10s.lo -MD -MP -MF $(DEPDIR)/libLog10_la-zlog10s.Tpo -c -o libLog10_la-zlog10s.lo `test -f 'zlog10s.c' || echo '$(srcdir)/'`zlog10s.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-zlog10s.Tpo $(DEPDIR)/libLog10_la-zlog10s.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlog10s.c' object='libLog10_la-zlog10s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-zlog10s.lo `test -f 'zlog10s.c' || echo '$(srcdir)/'`zlog10s.c + +libLog10_la-slog10a.lo: slog10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-slog10a.lo -MD -MP -MF $(DEPDIR)/libLog10_la-slog10a.Tpo -c -o libLog10_la-slog10a.lo `test -f 'slog10a.c' || echo '$(srcdir)/'`slog10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-slog10a.Tpo $(DEPDIR)/libLog10_la-slog10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slog10a.c' object='libLog10_la-slog10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-slog10a.lo `test -f 'slog10a.c' || echo '$(srcdir)/'`slog10a.c + +libLog10_la-dlog10a.lo: dlog10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-dlog10a.lo -MD -MP -MF $(DEPDIR)/libLog10_la-dlog10a.Tpo -c -o libLog10_la-dlog10a.lo `test -f 'dlog10a.c' || echo '$(srcdir)/'`dlog10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-dlog10a.Tpo $(DEPDIR)/libLog10_la-dlog10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlog10a.c' object='libLog10_la-dlog10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-dlog10a.lo `test -f 'dlog10a.c' || echo '$(srcdir)/'`dlog10a.c + +libLog10_la-clog10a.lo: clog10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-clog10a.lo -MD -MP -MF $(DEPDIR)/libLog10_la-clog10a.Tpo -c -o libLog10_la-clog10a.lo `test -f 'clog10a.c' || echo '$(srcdir)/'`clog10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-clog10a.Tpo $(DEPDIR)/libLog10_la-clog10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clog10a.c' object='libLog10_la-clog10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-clog10a.lo `test -f 'clog10a.c' || echo '$(srcdir)/'`clog10a.c + +libLog10_la-zlog10a.lo: zlog10a.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -MT libLog10_la-zlog10a.lo -MD -MP -MF $(DEPDIR)/libLog10_la-zlog10a.Tpo -c -o libLog10_la-zlog10a.lo `test -f 'zlog10a.c' || echo '$(srcdir)/'`zlog10a.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog10_la-zlog10a.Tpo $(DEPDIR)/libLog10_la-zlog10a.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlog10a.c' object='libLog10_la-zlog10a.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog10_la_CFLAGS) $(CFLAGS) -c -o libLog10_la-zlog10a.lo `test -f 'zlog10a.c' || echo '$(srcdir)/'`zlog10a.c + +testDoubleLog10-testDoubleLog10.o: testDoubleLog10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog10_CFLAGS) $(CFLAGS) -MT testDoubleLog10-testDoubleLog10.o -MD -MP -MF $(DEPDIR)/testDoubleLog10-testDoubleLog10.Tpo -c -o testDoubleLog10-testDoubleLog10.o `test -f 'testDoubleLog10.c' || echo '$(srcdir)/'`testDoubleLog10.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog10-testDoubleLog10.Tpo $(DEPDIR)/testDoubleLog10-testDoubleLog10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog10.c' object='testDoubleLog10-testDoubleLog10.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog10_CFLAGS) $(CFLAGS) -c -o testDoubleLog10-testDoubleLog10.o `test -f 'testDoubleLog10.c' || echo '$(srcdir)/'`testDoubleLog10.c + +testDoubleLog10-testDoubleLog10.obj: testDoubleLog10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog10_CFLAGS) $(CFLAGS) -MT testDoubleLog10-testDoubleLog10.obj -MD -MP -MF $(DEPDIR)/testDoubleLog10-testDoubleLog10.Tpo -c -o testDoubleLog10-testDoubleLog10.obj `if test -f 'testDoubleLog10.c'; then $(CYGPATH_W) 'testDoubleLog10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog10.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog10-testDoubleLog10.Tpo $(DEPDIR)/testDoubleLog10-testDoubleLog10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog10.c' object='testDoubleLog10-testDoubleLog10.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog10_CFLAGS) $(CFLAGS) -c -o testDoubleLog10-testDoubleLog10.obj `if test -f 'testDoubleLog10.c'; then $(CYGPATH_W) 'testDoubleLog10.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog10.c'; fi` + +testFloatLog10-testFloatLog10.o: testFloatLog10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog10_CFLAGS) $(CFLAGS) -MT testFloatLog10-testFloatLog10.o -MD -MP -MF $(DEPDIR)/testFloatLog10-testFloatLog10.Tpo -c -o testFloatLog10-testFloatLog10.o `test -f 'testFloatLog10.c' || echo '$(srcdir)/'`testFloatLog10.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog10-testFloatLog10.Tpo $(DEPDIR)/testFloatLog10-testFloatLog10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog10.c' object='testFloatLog10-testFloatLog10.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog10_CFLAGS) $(CFLAGS) -c -o testFloatLog10-testFloatLog10.o `test -f 'testFloatLog10.c' || echo '$(srcdir)/'`testFloatLog10.c + +testFloatLog10-testFloatLog10.obj: testFloatLog10.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog10_CFLAGS) $(CFLAGS) -MT testFloatLog10-testFloatLog10.obj -MD -MP -MF $(DEPDIR)/testFloatLog10-testFloatLog10.Tpo -c -o testFloatLog10-testFloatLog10.obj `if test -f 'testFloatLog10.c'; then $(CYGPATH_W) 'testFloatLog10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog10.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog10-testFloatLog10.Tpo $(DEPDIR)/testFloatLog10-testFloatLog10.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog10.c' object='testFloatLog10-testFloatLog10.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog10_CFLAGS) $(CFLAGS) -c -o testFloatLog10-testFloatLog10.obj `if test -f 'testFloatLog10.c'; then $(CYGPATH_W) 'testFloatLog10.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog10.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/log10/clog10a.c b/2.3-1/src/c/elementaryFunctions/log10/clog10a.c new file mode 100644 index 00000000..6f8d1905 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/clog10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" + +void clog10a(floatComplex* in, int size, floatComplex* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = clog10s(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/clog10s.c b/2.3-1/src/c/elementaryFunctions/log10/clog10s.c new file mode 100644 index 00000000..7d35ab1b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/clog10s.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" +#include "log.h" + +floatComplex clog10s(floatComplex in) { + floatComplex log_z = clogs(in); + return FloatComplex(creals(log_z) / slogs(10.0f), cimags(log_z) / slogs(10.0f)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/dlog10a.c b/2.3-1/src/c/elementaryFunctions/log10/dlog10a.c new file mode 100644 index 00000000..fcfeb486 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/dlog10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" + +void dlog10a(double* in, int size, double* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = dlog10s(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/dlog10s.c b/2.3-1/src/c/elementaryFunctions/log10/dlog10s.c new file mode 100644 index 00000000..14bc739b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/dlog10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log10.h" + +double dlog10s(double in) { + return (log10(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/slog10a.c b/2.3-1/src/c/elementaryFunctions/log10/slog10a.c new file mode 100644 index 00000000..b5f65405 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/slog10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" + +void slog10a(float* in, int size, float* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = slog10s(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/slog10s.c b/2.3-1/src/c/elementaryFunctions/log10/slog10s.c new file mode 100644 index 00000000..cd1ed8e8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/slog10s.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "log10.h" + +float slog10s(float in) { + return (log10f(in)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/testDoubleLog10.c b/2.3-1/src/c/elementaryFunctions/log10/testDoubleLog10.c new file mode 100644 index 00000000..2ac56920 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/testDoubleLog10.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog10.h" + +#define SOURCE {0.3628176329657435417175,0.924179898109287023544,0.5243524145334959030151,\ +0.7886543427594006061554,0.6525151440873742103577,0.2477638195268809795380,\ +0.2364655844867229461670,0.7240293831564486026764,0.8278210600838065147400,\ +0.4287728047929704189301,0.4858888480812311172485,0.5923984018154442310333,\ +0.0949383648112416267395,0.1356843891553580760956,0.9917455688118934631348,\ +0.7212927364744246006012,0.0115638775750994682312,0.0211908905766904354095,\ +0.1524727698415517807007,0.9165380974300205707550,0.4467271203175187110901,\ +0.5868234331719577312469,0.1882771886885166168213,0.4196520284749567508698,\ +0.2730510598048567771912,0.7565603456459939479828,0.9378882069140672683716,\ +0.0586007428355515003204,0.5101847248151898384094,0.5031699347309768199921,\ +0.7783576548099517822266,0.6856653341092169284821,0.1381576983258128166199,\ +0.371037633623927831650,0.6366564910858869552612,0.4961673622019588947296,\ +0.2994064847007393836975,0.2392275254242122173309,0.5618183575570583343506,\ +0.3218038142658770084381,0.1082227518782019615173,0.1685282415710389614105,\ +0.8263800088316202163696,0.4923414406366646289825,0.7863734485581517219543,\ +0.6762332352809607982635,0.0258686169981956481934,0.3594204657711088657379,\ +0.3436427963897585868835,0.2824054299853742122650,0.1450859513133764266968,\ +0.0762176741845905780792,0.5220461571589112281799,0.6713762427680194377899,\ +0.0599394328892230987549,0.7267188713885843753815,0.2224657749757170677185,\ +0.3122289828024804592133,0.4435700643807649612427,0.3983507198281586170197,\ +0.1324583934620022773743,0.8820166247896850109100,0.5455272346735000610352,\ +0.2917219498194754123688,0.7739847479388117790222,0.3354639573954045772552,\ +0.8127403985708951950073,0.4612239454872906208038,0.6898109326139092445374,\ +0.9649041066877543926239,0.8210376314818859100342,0.2802407057024538516998,\ +0.9873316427692770957947,0.294199434574693441391,0.4859610591083765029907,\ +0.2247181800194084644318,0.9585652919486165046692,0.1503968122415244579315,\ +0.0216291621327400207520,0.0688429796136915683746,0.9950710041448473930359,\ +0.7568672685883939266205,0.6163959559053182601929,0.0865804632194340229034,\ +0.5165374809876084327698,0.1916800136677920818329,0.2940570451319217681885,\ +0.3528221980668604373932,0.1317937439307570457458,0.0549608371220529079437,\ +0.929352553561329841614,0.737892795819789171219,0.7509917514398694038391,\ +0.6889848816208541393280,0.8865169286727905273438,0.6891661235131323337555,\ +0.8677108911797404289246,0.7947537912987172603607,0.2496256213635206222534,\ +0.3935408894903957843781,0.7297343472018837928772,0.7888072351925075054169,\ +0.113488640636205673218,0.4145256043411791324615,0.6172473421320319175720,\ +0.7440188056789338588715,0.9038409832864999771118,0.3976829168386757373810,\ +0.9472072543576359748840,0.2581262919120490550995,0.1955799385905265808105,\ +0.9381833248771727085114,0.4226356102153658866882,0.0937463282607495784760,\ +0.9977992679923772811890,0.2042182614095509052277,0.9455819511786103248596,\ +0.9336234177462756633759,0.9743702597916126251221,0.4100225553847849369049,\ +0.5125095760449767112732,0.0948633304797112941742,0.5688196588307619094849,\ +0.7322562676854431629181,0.8108531581237912178040,0.5459008770994842052460,\ +0.5022544711828231811523,0.7634959020651876926422,0.7354982374235987663269,\ +0.0699520572088658809662,0.6130836438387632369995,0.0965849910862743854523,\ +0.5439325878396630287170,0.9187005828134715557098,0.5072866193950176239014,\ +0.1335940570570528507233,0.8688194593414664268494,0.7999687767587602138519,\ +0.9879787657409906387329,0.7131399479694664478302,0.3067426951602101325989,\ +0.5431228461675345897675,0.7330236807465553283691,0.6498145484365522861481,\ +0.8018737239763140678406,0.2859625308774411678314,0.1894423719495534896851,\ +0.7794728656299412250519,0.5433104271069169044495,0.5268451268784701824188,\ +0.1533693112432956695557,0.6041304902173578739166,0.5948378806933760643005,\ +0.8857938847504556179047,0.0043053645640611648560,0.1302204323001205921173,\ +0.9758609728887677192688,0.9183407831005752086639,0.0624175965785980224609,\ +0.9939593323506414890289,0.4122588960453867912292,0.8258536770008504390717,\ +0.0376359503716230392456,0.4675730471499264240265,0.4759115139022469520569,\ +0.4060978214256465435028,0.0392968021333217620850,0.4401316107250750064850,\ +0.3316476037725806236267,0.0877817696891725063324,0.1150833908468484878540,\ +0.9667435702867805957794,0.8103649737313389778137,0.3928376468829810619354,\ +0.7880131229758262634277,0.4798596971668303012848,0.0270724548026919364929,\ +0.6701857983134686946869,0.5602217521518468856812,0.2564360727556049823761,\ +0.2626037681475281715393,0.4447338129393756389618,0.8522944338619709014893,\ +0.2347065494395792484283,0.3277532672509551048279,0.2253599218092858791351,\ +0.3468936551362276077271,0.7743145865388214588165,0.1285835551097989082336,\ +0.1156307714991271495819,0.2054340392351150512695,0.4535544612444937229156,\ +0.6516549764201045036316,0.0710035725496709346771,0.1265540253371000289917,\ +0.4974718545563519001007,0.0879269847646355628967,0.1462626229040324687958,\ +0.715134423226118087769,0.9305738122202455997467} + +#define RESULT {-0.4403116143527589509965,-0.0342434820791150257291,-0.2803767278195338774616,\ +-0.1031133008775467624352,-0.1854094044230032989340,-0.6059621125162122368124,\ +-0.6262320581190643498104,-0.1402438085490333719019,-0.0820635291772953134881,\ +-0.36777276786493884320,-0.3134630685689411833117,-0.2273861217978072890578,\ +-1.0225582527058232340522,-0.8674701161846418706602,-0.0035997313073961446743,\ +-0.1418884411982046234169,-1.9368965147824408479238,-1.67385079107519252339,\ +-0.8168077101761380687250,-0.0378494781542935143648,-0.3499576811822522337536,\ +-0.2314925521326422763746,-0.7252022951018919361132,-0.3771106732935153860176,\ +-0.563756133479260124197,-0.1211564255577455423429,-0.0278489249618575039624,\ +-1.232096878737263700998,-0.2922725485247071319783,-0.2982853166297994018663,\ +-0.1088207991305185085018,-0.1638878070544614040660,-0.8596249106224531644216,\ +-0.4305820385081238765856,-0.1960948286770107240606,-0.3043718069355866306935,\ +-0.5237387977162476504489,-0.6211888520577832917269,-0.2504040742204550751282,\ +-0.4924088126148459254594,-0.9656814270628060192792,-0.7733273106340565750116,\ +-0.0828201974893169740044,-0.3077336078949636233304,-0.1043711586288077197704,\ +-0.169903488488286208424,-1.5872267891461315780788,-0.444397197348344763501,\ +-0.4638927555552059822652,-0.5491269570890252582629,-0.8383746383028719550978,\ +-1.1179443080462672099884,-0.2822910967808678894819,-0.1730340307038858715938,\ +-1.222287370403489781268,-0.1386335619293298515586,-0.6527367931436293124747,\ +-0.5055267858124582458501,-0.3530377711634032356081,-0.3997343937184095197246,\ +-0.8779205166514928437849,-0.0545232289425809854566,-0.2631835629983380608898,\ +-0.535030892349513287343,-0.1112675973936914503026,-0.4743541340498391156721,\ +-0.0900481524037324287946,-0.3360881534089125155518,-0.1612699269064814533436,\ +-0.0155158452113394202537,-0.0856369369482974790442,-0.5524687820481442024345,\ +-0.0055369441569604379433,-0.5313581662832899121796,-0.3133985301037985338191,\ +-0.6483617911201521311071,-0.0183783001388101094320,-0.8227613688014733250853,\ +-1.664960303869991609105,-1.1621403411076904887977,-0.0021459286933866758389,\ +-0.1209802758154948920666,-0.2101402192945755753595,-1.0625800949711647902518,\ +-0.2868981597290535812128,-0.7174231683233029954749,-0.5315684111428640168384,\ +-0.4524440987253919854716,-0.8801052046193623690229,-1.259946661051862371039,\ +-0.0318195034221232311844,-0.1320067297295647867905,-0.1243648330674980567734,\ +-0.1617903077014812007750,-0.05231296682112057672,-0.1616760787761070405910,\ +-0.0616249514134949369359,-0.0997673916469928034889,-0.6027108410820325445911,\ +-0.4050101371105858660826,-0.1368352118545152207307,-0.1030291145605434360855,\ +-0.9450476059237150616710,-0.3824486388636323952461,-0.2095407714646851937701,\ +-0.1284160871700188444322,-0.0439079701395359081606,-0.4004630644881080336894,\ +-0.0235549844857810899978,-0.5881677573670978098619,-0.7086756945701918608549,\ +-0.0277122904020632616906,-0.3740339131793987692554,-1.0280457331716890134743,\ +-0.0009568190047624330983,-0.6899054254479447534365,-0.0243008259915241074667,\ +-0.0298282635710438621957,-0.0112759802587220972492,-0.38719225203706036931,\ +-0.2902980155704742437628,-1.0229016321238477704725,-0.2450254024783888040506,\ +-0.1353369023236559165468,-0.0910577874542803367142,-0.2628862079121005446147,\ +-0.2990761883748661031923,-0.1171932896033063276064,-0.1334183636952847862300,\ +-1.1551995088873641126526,-0.2124802700500995344957,-1.0150903559327661973555,\ +-0.2644549211536121879895,-0.0368260081130531435889,-0.2947465928364439435860,\ +-0.8742128610575919944736,-0.0610704605568186745246,-0.0969269634405601765437,\ +-0.0052523894413354609012,-0.1468252349912699539214,-0.5132257708646462690538,\ +-0.2651019284616369375840,-0.1348819950022109859233,-0.1872105696377188988055,\ +-0.0958940173743543372575,-0.5436908679171403857566,-0.7225228772557727996428,\ +-0.1081989985152894545584,-0.2649519599919711310143,-0.2783170326568494279407,\ +-0.8142615327667455105143,-0.2188692450535288658298,-0.2256013823621523806118,\ +-0.0526673222769318341574,-2.3659900680299497111037,-0.8853208672348196195401,\ +-0.0106120501693722224523,-0.0369961284323869002422,-1.2046929580793401814987,\ +-0.0026313843119589821508,-0.3848299640358096573856,-0.0830968932369530594029,\ +-1.424397112818484689711,-0.3301505313242010797303,-0.3224737880280506563402,\ +-0.3913693403433980977368,-1.4056427898881791449526,-0.3564174388206851062932,\ +-0.4793231362281260010683,-1.0565956679830132980413,-0.9389873504280431548707,\ +-0.0146887076937459951781,-0.0913193386792951061759,-0.4057868990671495423861,\ +-0.1034665500376885233225,-0.3188857244019617231956,-1.5674723626658799702227,\ +-0.1738047793945742269806,-0.2516400325061770026913,-0.5910208828319416518582,\ +-0.5806990464341352797817,-0.3518998500546973717817,-0.0694103478250598926458,\ +-0.6294747913311795617375,-0.4844529702954271654924,-0.6471233167047535372873,\ +-0.4598036435552441125729,-0.1110825594195994081570,-0.8908145709277390800196,\ +-0.9369265766947033613476,-0.6873275946862682506122,-0.3433705568996603396670,\ +-0.1859822838651877530136,-1.1487197991742361669054,-0.8977240365674604705148,\ +-0.3032314852833657981002,-1.055877819626311886481,-0.8348666427090224440022,\ +-0.1456123165510203598672,-0.0312491733461308825170} + +#define ZSOURCER {0.3140813848003745079041,0.5769402063451707363129,0.1306138429790735244751,\ +0.0478980806656181812286,0.4500174494460225105286,0.0384718659333884716034,\ +0.483350999653339385986,0.2981918179430067539215,0.7112689120694994926453,\ +0.9268360524438321590424,0.9477838929742574691772,0.1729496796615421772003,\ +0.2750928336754441261292,0.0044281478039920330048,0.0611358620226383209229,\ +0.1950612799264490604401,0.3789803450927138328552,0.2549188635312020778656,\ +0.1764185149222612380981,0.6008180272765457630157,0.3703392641618847846985,\ +0.2908470141701400279999,0.5384815335273742675781,0.8090293356217443943024,\ +0.9260985879227519035339,0.1576966657303273677826,0.9518593531101942062378,\ +0.2709982101805508136749,0.1609848598018288612366,0.8782086591236293315887,\ +0.5091647170484066009521,0.7951062084175646305084,0.8432204117998480796814,\ +0.5806765086017549037933,0.3487791065126657485962,0.9397577759809792041779,\ +0.4363934816792607307434,0.5549766751937568187714,0.9105900451540946960449,\ +0.5684339576400816440582,0.1862502051517367362976,0.0800832151435315608978,\ +0.6585252787917852401733,0.1606054832227528095245,0.9711584830656647682190,\ +0.3668168033473193645477,0.7386338301002979278564,0.9722552285529673099518,\ +0.1349937235936522483826,0.4595781317912042140961,0.5414639282971620559692,\ +0.6397600513882935047150,0.0211964594200253486633,0.4408156829886138439178,\ +0.6374878138303756713867,0.3208820023573935031891,0.4267518399283289909363,\ +0.7819778784178197383881,0.0543234180659055709839,0.9666189108975231647491,\ +0.6948409983888268470764,0.1846996019594371318817,0.3645029179751873016357,\ +0.8176643461920320987701,0.664914294146001338959,0.7559730983339250087738,\ +0.5525381658226251602173,0.7192269531078636646271,0.1989364298060536384583,\ +0.8610532465390861034393,0.1300329938530921936035,0.347959163133054971695,\ +0.5025534434244036674500,0.4978472082875669002533,0.4675923939794301986694,\ +0.9447452803142368793488,0.9599315756931900978088,0.5365384514443576335907,\ +0.8122785724699497222900,0.6470989421941339969635,0.7010180121287703514099,\ +0.6681951484642922878265,0.9593638796359300613403,0.0149199557490646839142,\ +0.6199735002592206001282,0.4061129498295485973358,0.0471306145191192626953,\ +0.8433605083264410495758,0.0635268418118357658386,0.9836421324871480464935,\ +0.4434677045792341232300,0.8565507535822689533234,0.9080012599006295204163,\ +0.4922491232864558696747,0.1930142603814601898193,0.3759337724186480045319,\ +0.2437626412138342857361,0.1035623974166810512543,0.9936000052839517593384,\ +0.5569599089212715625763,0.3858396532014012336731,0.7191527518443763256073,\ +0.1707325801253318786621,0.2878904812969267368317,0.4294657362625002861023,\ +0.8917979537509381771088,0.6188817229121923446655,0.3444608678109943866730,\ +0.0692929709330201148987,0.3619817639701068401337,0.1783103235065937042236,\ +0.8941529677249491214752,0.9010278200730681419373,0.0533773354254662990570,\ +0.4162023533135652542114,0.9438270372338593006134,0.9242387460544705390930,\ +0.8710649865679442882538,0.2808376699686050415039,0.8244629004038870334625,\ +0.4650857029482722282410,0.1462343498133122920990,0.5975636970251798629761,\ +0.3067605351097881793976,0.2377215037122368812561,0.0711208949796855449677,\ +0.8753139786422252655029,0.4413500339724123477936,0.7631150623783469200134,\ +0.9679268277250230312347,0.3924236092716455459595,0.717360940296202898026,\ +0.8640465112403035163879,0.7354763629846274852753,0.0304915383458137512207,\ +0.6331009590066969394684,0.4550241930410265922546,0.3173553734086453914642,\ +0.8250397499650716781616,0.2725940425880253314972,0.3458735281601548194885,\ +0.5352854127995669841766,0.7017193175852298736572,0.9817278520204126834869,\ +0.2777477568015456199646,0.1314821145497262477875,0.366813333705067634583,\ +0.7377605927176773548126,0.9103105561807751655579,0.3637479650788009166718,\ +0.8207867145538330078125,0.3059372254647314548492,0.9788405327126383781433,\ +0.9970494522713124752045,0.4636328797787427902222,0.7769650523550808429718,\ +0.3400075891986489295959,0.0353285889141261577606,0.2607673071324825286865,\ +0.5790986777283251285553,0.1250711670145392417908,0.0372988111339509487152,\ +0.9382179621607065200806,0.5585843441076576709747,0.7192503632977604866028,\ +0.3599752518348395824432,0.6758626028895378112793,0.2222136431373655796051,\ +0.7860159231349825859070,0.1736893891356885433197,0.2674629595130681991577,\ +0.7357366015203297138214,0.0550541067495942115784,0.5923380698077380657196,\ +0.2162457890808582305908,0.7718841419555246829987,0.0926524316892027854919,\ +0.7626169077120721340179,0.7347808051854372024536,0.8017499190755188465118,\ +0.7732572900131344795227,0.2559880572371184825897,0.1179054826498031616,\ +0.9232815303839743137360,0.6709534404799342155457,0.6071323617361485958099,\ +0.4574467372149229049683,0.8206311021931469440460,0.0896153757348656654358,\ +0.3426358769647777080536,0.1674894802272319793701,0.9481152505613863468170,\ +0.9504805644974112510681,0.3436607695184648036957,0.2889420483261346817017,\ +0.5325344172306358814240,0.2558945687487721443176,0.8863505902700126171112,\ +0.0421485081315040588379,0.4876015805639326572418} + +#define ZSOURCEI {0.347978035919368267059,0.2037199228070676326752,0.5962978359311819076538,\ +0.8342303414829075336456,0.6809655660763382911682,0.9127784068696200847626,\ +0.5243799723684787750244,0.7204323844052851200104,0.3259664541110396385193,\ +0.1506391367875039577484,0.9124387521296739578247,0.6345743131823837757111,\ +0.9268973069265484809875,0.7633614349178969860077,0.5918717086315155029297,\ +0.9057438620366156101227,0.3263365356251597404480,0.3912780000828206539154,\ +0.4635267537087202072144,0.0849754814989864826202,0.5800507226958870887756,\ +0.7945564310066401958466,0.3823457323014736175537,0.3010852993465960025787,\ +0.5789428642019629478455,0.2627451247535645961761,0.5713048521429300308228,\ +0.1848654565401375293732,0.9971724869683384895325,0.4520535501651465892792,\ +0.0334019884467124938965,0.4553878181613981723785,0.7851976407691836357117,\ +0.4941168962977826595306,0.9304408635944128036499,0.7621670593507587909698,\ +0.9264887655153870582581,0.7199950958602130413055,0.3973621018230915069580,\ +0.8769331262446939945221,0.6766644334420561790466,0.8431562236510217189789,\ +0.7608711589127779006958,0.8287630719132721424103,0.0037989662960171699524,\ +0.9451942699961364269257,0.6311131268739700317383,0.0763222672976553440094,\ +0.4486519275233149528503,0.1080312891863286495209,0.8351444136351346969604,\ +0.3109649871475994586945,0.1235694894567131996155,0.0363539229147136211395,\ +0.6609512977302074432373,0.9844443709589540958405,0.0688076755031943321228,\ +0.5140342987142503261566,0.3807653579860925674438,0.1549817589111626148224,\ +0.6850274773314595222473,0.0382853033952414989471,0.5224257782101631164551,\ +0.7454454028047621250153,0.4607118470594286918640,0.4753002314828336238861,\ +0.8575385268777608871460,0.8073885519988834857941,0.7132545644417405128479,\ +0.0811268086545169353485,0.5751824118196964263916,0.884696914348751306534,\ +0.5624709790572524070740,0.7315255901776254177094,0.6099120099097490310669,\ +0.0705954921431839466095,0.8552806274965405464172,0.7045627343468368053436,\ +0.5928074717521667480469,0.8517647930420935153961,0.2603117255493998527527,\ +0.8596871509216725826263,0.3943212013691663742065,0.3333164160139858722687,\ +0.2511775353923439979553,0.5570420245639979839325,0.7276714108884334564209,\ +0.9383780122734606266022,0.1971746077761054039001,0.1607607132755219936371,\ +0.7815325502306222915649,0.1760376212187111377716,0.2801528992131352424622,\ +0.4699970218352973461151,0.3507726117968559265137,0.5713973813690245151520,\ +0.4563077641651034355164,0.9214398502372205257416,0.4339873101562261581421,\ +0.3514866163022816181183,0.1816438222303986549377,0.9070622171275317668915,\ +0.7665811367332935333252,0.9807842955924570560455,0.1198607003316283226013,\ +0.0508546582423150539398,0.2581452894955873489380,0.1401008707471191883087,\ +0.5514106499031186103821,0.7882929998449981212616,0.8028824776411056518555,\ +0.2425694861449301242828,0.7024780390784144401550,0.0922905071638524532318,\ +0.4318286012858152389526,0.0804965649731457233429,0.7126307198777794837952,\ +0.6893844078294932842255,0.2756213061511516571045,0.6968217701651155948639,\ +0.4598932703956961631775,0.6099067903123795986176,0.3065654132515192031860,\ +0.0749373403377830982208,0.9619921119883656501770,0.4158898773603141307831,\ +0.3287452235817909240723,0.7406168007291853427887,0.5725225014612078666687,\ +0.9504556744359433650970,0.1849336978048086166382,0.8698030491359531879425,\ +0.6907873982563614845276,0.9524399931542575359344,0.6490485109388828277588,\ +0.9960058168508112430573,0.2040582066401839256287,0.3800008497200906276703,\ +0.9729049820452928543091,0.9110585046000778675079,0.3810073928907513618469,\ +0.7869612383656203746796,0.5560158789157867431641,0.8529843934811651706696,\ +0.4350629774853587150574,0.5956362797878682613373,0.7071880977600812911987,\ +0.5747222309000790119171,0.4764349022880196571350,0.6098947445861995220184,\ +0.9666662178933620452881,0.3874611915089190006256,0.0715632727369666099548,\ +0.6122049516998231410980,0.9575729314237833023071,0.7723352131433784961700,\ +0.1287384750321507453918,0.3884150418452918529510,0.2353963479399681091309,\ +0.6542267077602446079254,0.3286431683227419853210,0.024017625954002141953,\ +0.1042741741985082626343,0.9314296473748981952667,0.8185661518946290016174,\ +0.8156488086096942424774,0.8688247688114643096924,0.3549220249988138675690,\ +0.3890381073579192161560,0.6415715864859521389008,0.4902750719338655471802,\ +0.3509976905770599842072,0.8516392158344388008118,0.1348936217837035655975,\ +0.1156354099512100219727,0.8810075619257986545563,0.8367286501452326774597,\ +0.5032693906687200069427,0.4486711751669645309448,0.9319602106697857379913,\ +0.7298459419980645179749,0.3388367067091166973114,0.4314213804900646209717,\ +0.7317318231798708438873,0.9655342241749167442322,0.2621376193128526210785,\ +0.2050140891224145889282,0.2826355365104973316193,0.3973353477194905281067,\ +0.7437736871652305126190,0.8185287192463874816895,0.3071001493372023105621,\ +0.9627068741247057914734,0.9475456266663968563080,0.6546552237123250961304,\ +0.1992082078941166400909,0.3616109425202012062073,0.9388273353688418865204,\ +0.0409001447260379791260,0.0758434669114649295807} +#define ZRESULTR {-0.3290495609832542744932,-0.2133542315965856750459,-0.2143604594080804615075,\ +-0.0779993516667897290873,-0.0881879704812010417614,-0.0392492308819259588804,\ +-0.1468107357971605020364,-0.1080692186653561120968,-0.1065683791205834785032,\ +-0.0273353392421778126908,0.1191283090947614642374,-0.1819586746730034731989,\ +-0.0146372370113581271034,-0.1172624775653131612430,-0.2254678765990359434745,\ +-0.0331498720885635145272,-0.3009243692795003366491,-0.3306899894153413344000,\ +-0.3045496213459356615871,-0.2169562594261553178931,-0.1622895628928226752219,\ +-0.0725702069682954281626,-0.1801817524356017496956,-0.0638691649231626773497,\ +0.0382899018433042123699,-0.5136597137709293381391,0.0453803311793120195405,\ +-0.4840630563482673509590,0.0043573655682720771609,-0.0053634673446913633602,\ +-0.2922091972771523882280,-0.0379710404096835762999,0.0615264246077369611476,\ +-0.1177861239572535467790,-0.0027606815124210713590,0.0827769612970807588948,\ +0.0103506258196890514600,-0.0414069352257771042258,-0.0028258322392286264017,\ +0.0191369442490108253307,-0.1537687128497234601010,-0.0721417928417731474378,\ +0.0027147719270748577915,-0.0735641860746090447964,-0.0127065691399337477724,\ +0.0059853142299196512854,-0.0125407536616094668347,-0.0108856950196654141821,\ +-0.3292710076447024625246,-0.3259617043131136093770,-0.0020400145634434829929,\ +-0.1479281118584361010004,-0.9017915683260822046208,-0.3542710907015680921184,\ +-0.0370225124342607042616,0.0151168335656557354524,-0.3642515556722971115100,\ +-0.0288172015063716119299,-0.4149670396818516682202,-0.0092330629379009203361,\ +-0.0106663219864977006773,-0.7243988137694490347940,-0.1958487567186202316094,\ +0.0439375096643265586338,-0.0920894961670395001407,-0.0491603497010221490715,\ +0.0086566739889077232162,0.0339376585197796801219,-0.1304877971769988764805,\ +-0.0630508696074615210270,-0.2293705604967442579500,-0.0219724307162800849835,\ +-0.1224692215475379208911,-0.0531242407432285373980,-0.1143402977644937118518,\ +-0.0234761498308886963626,0.1091329563146860859302,-0.0527638328353893792944,\ +0.0024222192478416683901,0.0292586204417139908451,-0.1262209046057715389200,\ +0.0369593428671423362974,0.0158795483132631205792,-0.4767086450021467136651,\ +-0.1746242034102962470410,-0.1615510250958859250758,-0.1371556526467043735096,\ +0.100945647205856317563,-0.6837031045647332661019,-0.0014388289408900174424,\ +-0.0464403701173962263349,-0.0582634176897608505041,-0.0221676835116708763340,\ +-0.1671127243957707675381,-0.3975387523773417086659,-0.1649600652341057516193,\ +-0.2862269227110153524407,-0.0328071976308584797866,0.0351271945689521844503,\ +-0.1813816670814733522654,-0.3701233874684188296378,0.0635430885883380841550,\ +-0.1049291365916461549190,0.0095204817066643597501,-0.3507837205033069172266,\ +-0.0490285470477662618793,-0.1735609734951024107907,-0.4296178908501777637952,\ +-0.2551225266448440276434,-0.0617650291008570578866,-0.0848934350447099472792,\ +-0.0331679244708535381214,0.0578595820981543801365,-0.9721832280456300656724,\ +-0.2220295759617292030708,-0.0235337862370093645059,0.0670980880683051256197,\ +0.0456584724702859962031,-0.4050627643604459149351,0.0332188086620539904659,\ +-0.1843762947107071559216,-0.2025989526775586746510,-0.1728805677287464093173,\ +-0.5006140240740283298138,-0.0039574496715991209703,-0.3747624646211847876387,\ +-0.0291826804365620078030,-0.0644170285495881678184,-0.020449093098134307755,\ +0.1324382164856784949158,-0.3626939268757052303727,0.0521008032215845851010,\ +0.0438487661958249438920,0.0803943913989621228300,-0.1872441239933456957889,\ +0.0719513030064179159861,-0.3021736609622284186472,-0.30531498564977166410,\ +0.1057250974802272092123,-0.0218353036625967035500,-0.2885450025056992551242,\ +-0.0214746210927109354438,-0.0480309906528200089570,0.1141195620733326948626,\ +-0.2872136450436454380153,-0.2146876003507041108520,-0.0987270319138862650910,\ +-0.0290961734854755134372,0.0117611124704010052561,-0.1486623273058947924952,\ +0.1031611720947231414236,-0.3065510644941032425415,-0.0081304707590571338727,\ +0.0681862604059072646701,0.0269042920576901857521,0.0396225366257938194092,\ +-0.4394191704520844510284,-0.4089149013992912085058,-0.4543230131010723149565,\ +-0.0586330634787295829069,-0.4539044694277152292017,-1.3529821933222951901854,\ +-0.0250304307835438853702,0.0358632689692895620381,0.0372933340583203806751,\ +-0.0498532689013882687745,0.0416880085188151769393,-0.3780489142107763544942,\ +-0.0569883570641069869822,-0.1773959401592627993516,-0.2529880791121558170076,\ +-0.0887499827789579032178,-0.0688387899649425538673,-0.2164511122923038211052,\ +-0.6104407141161303229637,0.0686738036393797490753,-0.0747689959340766124862,\ +-0.0391919696178445325918,-0.0650297590330818214843,0.0896829227334642459235,\ +0.0266548623220910323173,-0.3719537274000056514822,-0.3494566550303903618158,\ +0.0711759971067136287814,0.0703223378863101489245,-0.1795974324279027423135,\ +-0.2999138709331988783546,-0.0615107548910408530318,-0.3900685687486248887090,\ +-0.0867686652200203717422,-0.0780592259581650849132,-0.0014744231840779402701,\ +0.1312513908465361422984,0.0034351924950619906404,-0.1453391630458231997824,\ +-0.2452127202368474256922,-0.3536012485332969967899,0.1109696410995756055140,\ +-1.2311333463434968038541,-0.3067437997278838479609} + +#define ZRESULTI {0.3633100487665162359185,0.1474158063550214115001,0.5885387980009104680335,\ +0.6572801175741773693773,0.4285748579481841735728,0.6638943219025983388804,\ +0.3587662857455625187164,0.5117548829580961244901,0.1866273414364414962030,\ +0.0699742348195561969515,0.3328432735187898949825,0.5666303041879406920955,\ +0.5568906423318142895340,0.6796689265398294654830,0.6374873742133734255688,\ +0.5900654029247031084893,0.3087389836998947201252,0.4314129861802953325167,\ +0.5242475923033280693630,0.0610188495832547500575,0.4354133593463934692736,\ +0.5297939421633884871099,0.2681487567918271475165,0.1547283383009969981448,\ +0.2426408568390991671304,0.4474267034848418145287,0.2347646885151994655683,\ +0.2599927875089523832131,0.6126748695156737367640,0.2064522777477181547656,\ +0.0284496210471740680614,0.2258908609011123780341,0.3256261235849059465508,\ +0.3061930542060117277359,0.5264317995551247575392,0.2959401807089209746060,\ +0.4910139616058311062829,0.3969936639609323303368,0.1786986723204381510843,\ +0.4324195385396965018998,0.5655382812237433887148,0.6410621383118232374798,\ +0.3723548821340513237388,0.5990569422252302045351,0.0016988593650344200551,\ +0.5214150467894975715666,0.3070731387905711318176,0.0340224494974534080738,\ +0.5552566039785586937683,0.1002676097220635414997,0.4323764448196805720848,\ +0.1964911590800132445978,0.6084096209152420886568,0.0357352532897105071297,\ +0.3489411661881484660874,0.5453449961026168857359,0.0694263094757205379004,\ +0.2525534710601468613156,0.6206431406119353733075,0.0690444796836073154678,\ +0.3380054707664132407352,0.0887652999217624361084,0.4176207649503542729263,\ +0.3210430331362784106553,0.2631553422310267675854,0.2437584071473132274477,\ +0.4336070270779164292918,0.3661466421575780838538,0.5640596254022186561983,\ +0.0407979674024822880352,0.5856292520126130662916,0.5194472182924043668351,\ +0.3655014659417109568196,0.4226713256320973055580,0.3981267146771410581074,\ +0.0323921796076454895918,0.3160837480759546291864,0.3995349584181833169083,\ +0.273802063686018282151,0.4000313483957886884212,0.1544145556607701974539,\ +0.3952425864610250583198,0.1693632158699578948990,0.6627611949754427245196,\ +0.167173661907591114550,0.4086002639927426849376,0.6540985540228395622719,\ +0.3642324586236761474467,0.5468253741606181606016,0.0703565244510996889993,\ +0.4580361055958868110594,0.0880301024358387529389,0.1299718766609879727625,\ +0.3310527463405003034680,0.4637212462953029801227,0.4294623340021747059936,\ +0.4691072369162453403746,0.6335809675670333040998,0.1788460444456893838616,\ +0.2444904068796305007805,0.1910877540250672246280,0.3910553307022346936073,\ +0.5870156732892560791370,0.5581921905883382439839,0.1182006499862187365313,\ +0.0247387920792678586701,0.1716217468036307647328,0.1677637778431290971337,\ +0.6278971871585069530752,0.4952349292223454657602,0.5872771345770251283369,\ +0.1150482129328096875254,0.2875910738555041423758,0.4544626742179224132556,\ +0.3490957130610289338435,0.0369504335660946620079,0.2852598765351710419225,\ +0.2907565249995825995555,0.3370230396263981242910,0.3047404031476670938083,\ +0.33865617237418182972,0.5799887649794799315828,0.2058615017488183152050,\ +0.1040542236456874769512,0.5769758315245528956794,0.6086314545246159779524,\ +0.1560306547104348962041,0.4487914762887483810516,0.2795367938070804081363,\ +0.3371389774796904048593,0.1912601282140735381443,0.3826791464254168939618,\ +0.2928983745329591936724,0.396613573038569422469,0.6618005209348483131038,\ +0.4362846209517689533008,0.1830850765515834310815,0.3800035453193333911948,\ +0.376730811842592550054,0.5559265822426159298075,0.3620694326893729719785,\ +0.4227803813529266152571,0.2910061310239929199817,0.3106691139011089619615,\ +0.435429394944240932830,0.5878341337089509899272,0.4743827280867594087255,\ +0.2874204018606083543830,0.2094051712928121644630,0.4486348592544623370415,\ +0.3764598089790200385885,0.3919214486831592569871,0.0316949858971651426964,\ +0.2391495340218968146395,0.486361470580685850695,0.3397962718388538583270,\ +0.1571941632596165761004,0.6427949822892967679522,0.3189060883322832884446,\ +0.3675164927613087662017,0.5242598134907254792125,0.2484566158604845087510,\ +0.0480705017921116625756,0.4475807306655288364539,0.3691029449284471408710,\ +0.5016842301167260265160,0.3950665170276177473596,0.4392508841037601752255,\ +0.1996012963954646446396,0.5673662159944875549300,0.4652972123009525562409,\ +0.1933199899606511118488,0.6541522766180654091528,0.0972438028822732308809,\ +0.2132613189014408716648,0.3697245333311866000159,0.6342931063454819717862,\ +0.2533327612355570357394,0.2380763598053285134970,0.3736506508141989035821,\ +0.3285546506249918952136,0.4011970200297387822985,0.5663267577447791412126,\ +0.2910519034072798771895,0.4184422115344140213899,0.1770121129168618634431,\ +0.1829818983774834095790,0.1440504268816359956240,0.5858489671891115024849,\ +0.4947061064648006212252,0.5945317434266266243270,0.1360392849738219778200,\ +0.3438694289300276984989,0.5310838098864226752838,0.5016736389654107286518,\ +0.1554601034674029658156,0.4147310296690985831347,0.3535773010333992383281,\ +0.3345663906426585842979,0.0670148638928397127890} + + +/* FIXME : assert à 1e-14 */ + +void dlog10sTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dlog10s(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zlog10sTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zlog10s(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dlog10aTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dlog10a(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } +} + +void zlog10aTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + zlog10a(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testLog10(void) { + printf("\n>>>> Double 10-Based Logarithm Tests\n"); + dlog10sTest(); + zlog10sTest(); + dlog10aTest(); + zlog10aTest(); + return 0; +} + +int main(void) { + assert(testLog10() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/testFloatLog10.c b/2.3-1/src/c/elementaryFunctions/log10/testFloatLog10.c new file mode 100644 index 00000000..be214484 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/testFloatLog10.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog10.h" + +#define SOURCE {0.3628176329657435417175f,0.924179898109287023544f,0.5243524145334959030151f,\ +0.7886543427594006061554f,0.6525151440873742103577f,0.2477638195268809795380f,\ +0.2364655844867229461670f,0.7240293831564486026764f,0.8278210600838065147400f,\ +0.4287728047929704189301f,0.4858888480812311172485f,0.5923984018154442310333f,\ +0.0949383648112416267395f,0.1356843891553580760956f,0.9917455688118934631348f,\ +0.7212927364744246006012f,0.0115638775750994682312f,0.0211908905766904354095f,\ +0.1524727698415517807007f,0.9165380974300205707550f,0.4467271203175187110901f,\ +0.5868234331719577312469f,0.1882771886885166168213f,0.4196520284749567508698f,\ +0.2730510598048567771912f,0.7565603456459939479828f,0.9378882069140672683716f,\ +0.0586007428355515003204f,0.5101847248151898384094f,0.5031699347309768199921f,\ +0.7783576548099517822266f,0.6856653341092169284821f,0.1381576983258128166199f,\ +0.371037633623927831650f,0.6366564910858869552612f,0.4961673622019588947296f,\ +0.2994064847007393836975f,0.2392275254242122173309f,0.5618183575570583343506f,\ +0.3218038142658770084381f,0.1082227518782019615173f,0.1685282415710389614105f,\ +0.8263800088316202163696f,0.4923414406366646289825f,0.7863734485581517219543f,\ +0.6762332352809607982635f,0.0258686169981956481934f,0.3594204657711088657379f,\ +0.3436427963897585868835f,0.2824054299853742122650f,0.1450859513133764266968f,\ +0.0762176741845905780792f,0.5220461571589112281799f,0.6713762427680194377899f,\ +0.0599394328892230987549f,0.7267188713885843753815f,0.2224657749757170677185f,\ +0.3122289828024804592133f,0.4435700643807649612427f,0.3983507198281586170197f,\ +0.1324583934620022773743f,0.8820166247896850109100f,0.5455272346735000610352f,\ +0.2917219498194754123688f,0.7739847479388117790222f,0.3354639573954045772552f,\ +0.8127403985708951950073f,0.4612239454872906208038f,0.6898109326139092445374f,\ +0.9649041066877543926239f,0.8210376314818859100342f,0.2802407057024538516998f,\ +0.9873316427692770957947f,0.294199434574693441391f,0.4859610591083765029907f,\ +0.2247181800194084644318f,0.9585652919486165046692f,0.1503968122415244579315f,\ +0.0216291621327400207520f,0.0688429796136915683746f,0.9950710041448473930359f,\ +0.7568672685883939266205f,0.6163959559053182601929f,0.0865804632194340229034f,\ +0.5165374809876084327698f,0.1916800136677920818329f,0.2940570451319217681885f,\ +0.3528221980668604373932f,0.1317937439307570457458f,0.0549608371220529079437f,\ +0.929352553561329841614f,0.737892795819789171219f,0.7509917514398694038391f,\ +0.6889848816208541393280f,0.8865169286727905273438f,0.6891661235131323337555f,\ +0.8677108911797404289246f,0.7947537912987172603607f,0.2496256213635206222534f,\ +0.3935408894903957843781f,0.7297343472018837928772f,0.7888072351925075054169f,\ +0.113488640636205673218f,0.4145256043411791324615f,0.6172473421320319175720f,\ +0.7440188056789338588715f,0.9038409832864999771118f,0.3976829168386757373810f,\ +0.9472072543576359748840f,0.2581262919120490550995f,0.1955799385905265808105f,\ +0.9381833248771727085114f,0.4226356102153658866882f,0.0937463282607495784760f,\ +0.9977992679923772811890f,0.2042182614095509052277f,0.9455819511786103248596f,\ +0.9336234177462756633759f,0.9743702597916126251221f,0.4100225553847849369049f,\ +0.5125095760449767112732f,0.0948633304797112941742f,0.5688196588307619094849f,\ +0.7322562676854431629181f,0.8108531581237912178040f,0.5459008770994842052460f,\ +0.5022544711828231811523f,0.7634959020651876926422f,0.7354982374235987663269f,\ +0.0699520572088658809662f,0.6130836438387632369995f,0.0965849910862743854523f,\ +0.5439325878396630287170f,0.9187005828134715557098f,0.5072866193950176239014f,\ +0.1335940570570528507233f,0.8688194593414664268494f,0.7999687767587602138519f,\ +0.9879787657409906387329f,0.7131399479694664478302f,0.3067426951602101325989f,\ +0.5431228461675345897675f,0.7330236807465553283691f,0.6498145484365522861481f,\ +0.8018737239763140678406f,0.2859625308774411678314f,0.1894423719495534896851f,\ +0.7794728656299412250519f,0.5433104271069169044495f,0.5268451268784701824188f,\ +0.1533693112432956695557f,0.6041304902173578739166f,0.5948378806933760643005f,\ +0.8857938847504556179047f,0.0043053645640611648560f,0.1302204323001205921173f,\ +0.9758609728887677192688f,0.9183407831005752086639f,0.0624175965785980224609f,\ +0.9939593323506414890289f,0.4122588960453867912292f,0.8258536770008504390717f,\ +0.0376359503716230392456f,0.4675730471499264240265f,0.4759115139022469520569f,\ +0.4060978214256465435028f,0.0392968021333217620850f,0.4401316107250750064850f,\ +0.3316476037725806236267f,0.0877817696891725063324f,0.1150833908468484878540f,\ +0.9667435702867805957794f,0.8103649737313389778137f,0.3928376468829810619354f,\ +0.7880131229758262634277f,0.4798596971668303012848f,0.0270724548026919364929f,\ +0.6701857983134686946869f,0.5602217521518468856812f,0.2564360727556049823761f,\ +0.2626037681475281715393f,0.4447338129393756389618f,0.8522944338619709014893f,\ +0.2347065494395792484283f,0.3277532672509551048279f,0.2253599218092858791351f,\ +0.3468936551362276077271f,0.7743145865388214588165f,0.1285835551097989082336f,\ +0.1156307714991271495819f,0.2054340392351150512695f,0.4535544612444937229156f,\ +0.6516549764201045036316f,0.0710035725496709346771f,0.1265540253371000289917f,\ +0.4974718545563519001007f,0.0879269847646355628967f,0.1462626229040324687958f,\ +0.715134423226118087769f,0.9305738122202455997467f} + +#define RESULT {-0.4403116143527589509965f,-0.0342434820791150257291f,-0.2803767278195338774616f,\ +-0.1031133008775467624352f,-0.1854094044230032989340f,-0.6059621125162122368124f,\ +-0.6262320581190643498104f,-0.1402438085490333719019f,-0.0820635291772953134881f,\ +-0.36777276786493884320f,-0.3134630685689411833117f,-0.2273861217978072890578f,\ +-1.0225582527058232340522f,-0.8674701161846418706602f,-0.0035997313073961446743f,\ +-0.1418884411982046234169f,-1.9368965147824408479238f,-1.67385079107519252339f,\ +-0.8168077101761380687250f,-0.0378494781542935143648f,-0.3499576811822522337536f,\ +-0.2314925521326422763746f,-0.7252022951018919361132f,-0.3771106732935153860176f,\ +-0.563756133479260124197f,-0.1211564255577455423429f,-0.0278489249618575039624f,\ +-1.232096878737263700998f,-0.2922725485247071319783f,-0.2982853166297994018663f,\ +-0.1088207991305185085018f,-0.1638878070544614040660f,-0.8596249106224531644216f,\ +-0.4305820385081238765856f,-0.1960948286770107240606f,-0.3043718069355866306935f,\ +-0.5237387977162476504489f,-0.6211888520577832917269f,-0.2504040742204550751282f,\ +-0.4924088126148459254594f,-0.9656814270628060192792f,-0.7733273106340565750116f,\ +-0.0828201974893169740044f,-0.3077336078949636233304f,-0.1043711586288077197704f,\ +-0.169903488488286208424f,-1.5872267891461315780788f,-0.444397197348344763501f,\ +-0.4638927555552059822652f,-0.5491269570890252582629f,-0.8383746383028719550978f,\ +-1.1179443080462672099884f,-0.2822910967808678894819f,-0.1730340307038858715938f,\ +-1.222287370403489781268f,-0.1386335619293298515586f,-0.6527367931436293124747f,\ +-0.5055267858124582458501f,-0.3530377711634032356081f,-0.3997343937184095197246f,\ +-0.8779205166514928437849f,-0.0545232289425809854566f,-0.2631835629983380608898f,\ +-0.535030892349513287343f,-0.1112675973936914503026f,-0.4743541340498391156721f,\ +-0.0900481524037324287946f,-0.3360881534089125155518f,-0.1612699269064814533436f,\ +-0.0155158452113394202537f,-0.0856369369482974790442f,-0.5524687820481442024345f,\ +-0.0055369441569604379433f,-0.5313581662832899121796f,-0.3133985301037985338191f,\ +-0.6483617911201521311071f,-0.0183783001388101094320f,-0.8227613688014733250853f,\ +-1.664960303869991609105f,-1.1621403411076904887977f,-0.0021459286933866758389f,\ +-0.1209802758154948920666f,-0.2101402192945755753595f,-1.0625800949711647902518f,\ +-0.2868981597290535812128f,-0.7174231683233029954749f,-0.5315684111428640168384f,\ +-0.4524440987253919854716f,-0.8801052046193623690229f,-1.259946661051862371039f,\ +-0.0318195034221232311844f,-0.1320067297295647867905f,-0.1243648330674980567734f,\ +-0.1617903077014812007750f,-0.05231296682112057672f,-0.1616760787761070405910f,\ +-0.0616249514134949369359f,-0.0997673916469928034889f,-0.6027108410820325445911f,\ +-0.4050101371105858660826f,-0.1368352118545152207307f,-0.1030291145605434360855f,\ +-0.9450476059237150616710f,-0.3824486388636323952461f,-0.2095407714646851937701f,\ +-0.1284160871700188444322f,-0.0439079701395359081606f,-0.4004630644881080336894f,\ +-0.0235549844857810899978f,-0.5881677573670978098619f,-0.7086756945701918608549f,\ +-0.0277122904020632616906f,-0.3740339131793987692554f,-1.0280457331716890134743f,\ +-0.0009568190047624330983f,-0.6899054254479447534365f,-0.0243008259915241074667f,\ +-0.0298282635710438621957f,-0.0112759802587220972492f,-0.38719225203706036931f,\ +-0.2902980155704742437628f,-1.0229016321238477704725f,-0.2450254024783888040506f,\ +-0.1353369023236559165468f,-0.0910577874542803367142f,-0.2628862079121005446147f,\ +-0.2990761883748661031923f,-0.1171932896033063276064f,-0.1334183636952847862300f,\ +-1.1551995088873641126526f,-0.2124802700500995344957f,-1.0150903559327661973555f,\ +-0.2644549211536121879895f,-0.0368260081130531435889f,-0.2947465928364439435860f,\ +-0.8742128610575919944736f,-0.0610704605568186745246f,-0.0969269634405601765437f,\ +-0.0052523894413354609012f,-0.1468252349912699539214f,-0.5132257708646462690538f,\ +-0.2651019284616369375840f,-0.1348819950022109859233f,-0.1872105696377188988055f,\ +-0.0958940173743543372575f,-0.5436908679171403857566f,-0.7225228772557727996428f,\ +-0.1081989985152894545584f,-0.2649519599919711310143f,-0.2783170326568494279407f,\ +-0.8142615327667455105143f,-0.2188692450535288658298f,-0.2256013823621523806118f,\ +-0.0526673222769318341574f,-2.3659900680299497111037f,-0.8853208672348196195401f,\ +-0.0106120501693722224523f,-0.0369961284323869002422f,-1.2046929580793401814987f,\ +-0.0026313843119589821508f,-0.3848299640358096573856f,-0.0830968932369530594029f,\ +-1.424397112818484689711f,-0.3301505313242010797303f,-0.3224737880280506563402f,\ +-0.3913693403433980977368f,-1.4056427898881791449526f,-0.3564174388206851062932f,\ +-0.4793231362281260010683f,-1.0565956679830132980413f,-0.9389873504280431548707f,\ +-0.0146887076937459951781f,-0.0913193386792951061759f,-0.4057868990671495423861f,\ +-0.1034665500376885233225f,-0.3188857244019617231956f,-1.5674723626658799702227f,\ +-0.1738047793945742269806f,-0.2516400325061770026913f,-0.5910208828319416518582f,\ +-0.5806990464341352797817f,-0.3518998500546973717817f,-0.0694103478250598926458f,\ +-0.6294747913311795617375f,-0.4844529702954271654924f,-0.6471233167047535372873f,\ +-0.4598036435552441125729f,-0.1110825594195994081570f,-0.8908145709277390800196f,\ +-0.9369265766947033613476f,-0.6873275946862682506122f,-0.3433705568996603396670f,\ +-0.1859822838651877530136f,-1.1487197991742361669054f,-0.8977240365674604705148f,\ +-0.3032314852833657981002f,-1.055877819626311886481f,-0.8348666427090224440022f,\ +-0.1456123165510203598672f,-0.0312491733461308825170f} + +#define CSOURCER {0.3140813848003745079041f,0.5769402063451707363129f,0.1306138429790735244751f,\ +0.0478980806656181812286f,0.4500174494460225105286f,0.0384718659333884716034f,\ +0.483350999653339385986f,0.2981918179430067539215f,0.7112689120694994926453f,\ +0.9268360524438321590424f,0.9477838929742574691772f,0.1729496796615421772003f,\ +0.2750928336754441261292f,0.0044281478039920330048f,0.0611358620226383209229f,\ +0.1950612799264490604401f,0.3789803450927138328552f,0.2549188635312020778656f,\ +0.1764185149222612380981f,0.6008180272765457630157f,0.3703392641618847846985f,\ +0.2908470141701400279999f,0.5384815335273742675781f,0.8090293356217443943024f,\ +0.9260985879227519035339f,0.1576966657303273677826f,0.9518593531101942062378f,\ +0.2709982101805508136749f,0.1609848598018288612366f,0.8782086591236293315887f,\ +0.5091647170484066009521f,0.7951062084175646305084f,0.8432204117998480796814f,\ +0.5806765086017549037933f,0.3487791065126657485962f,0.9397577759809792041779f,\ +0.4363934816792607307434f,0.5549766751937568187714f,0.9105900451540946960449f,\ +0.5684339576400816440582f,0.1862502051517367362976f,0.0800832151435315608978f,\ +0.6585252787917852401733f,0.1606054832227528095245f,0.9711584830656647682190f,\ +0.3668168033473193645477f,0.7386338301002979278564f,0.9722552285529673099518f,\ +0.1349937235936522483826f,0.4595781317912042140961f,0.5414639282971620559692f,\ +0.6397600513882935047150f,0.0211964594200253486633f,0.4408156829886138439178f,\ +0.6374878138303756713867f,0.3208820023573935031891f,0.4267518399283289909363f,\ +0.7819778784178197383881f,0.0543234180659055709839f,0.9666189108975231647491f,\ +0.6948409983888268470764f,0.1846996019594371318817f,0.3645029179751873016357f,\ +0.8176643461920320987701f,0.664914294146001338959f,0.7559730983339250087738f,\ +0.5525381658226251602173f,0.7192269531078636646271f,0.1989364298060536384583f,\ +0.8610532465390861034393f,0.1300329938530921936035f,0.347959163133054971695f,\ +0.5025534434244036674500f,0.4978472082875669002533f,0.4675923939794301986694f,\ +0.9447452803142368793488f,0.9599315756931900978088f,0.5365384514443576335907f,\ +0.8122785724699497222900f,0.6470989421941339969635f,0.7010180121287703514099f,\ +0.6681951484642922878265f,0.9593638796359300613403f,0.0149199557490646839142f,\ +0.6199735002592206001282f,0.4061129498295485973358f,0.0471306145191192626953f,\ +0.8433605083264410495758f,0.0635268418118357658386f,0.9836421324871480464935f,\ +0.4434677045792341232300f,0.8565507535822689533234f,0.9080012599006295204163f,\ +0.4922491232864558696747f,0.1930142603814601898193f,0.3759337724186480045319f,\ +0.2437626412138342857361f,0.1035623974166810512543f,0.9936000052839517593384f,\ +0.5569599089212715625763f,0.3858396532014012336731f,0.7191527518443763256073f,\ +0.1707325801253318786621f,0.2878904812969267368317f,0.4294657362625002861023f,\ +0.8917979537509381771088f,0.6188817229121923446655f,0.3444608678109943866730f,\ +0.0692929709330201148987f,0.3619817639701068401337f,0.1783103235065937042236f,\ +0.8941529677249491214752f,0.9010278200730681419373f,0.0533773354254662990570f,\ +0.4162023533135652542114f,0.9438270372338593006134f,0.9242387460544705390930f,\ +0.8710649865679442882538f,0.2808376699686050415039f,0.8244629004038870334625f,\ +0.4650857029482722282410f,0.1462343498133122920990f,0.5975636970251798629761f,\ +0.3067605351097881793976f,0.2377215037122368812561f,0.0711208949796855449677f,\ +0.8753139786422252655029f,0.4413500339724123477936f,0.7631150623783469200134f,\ +0.9679268277250230312347f,0.3924236092716455459595f,0.717360940296202898026f,\ +0.8640465112403035163879f,0.7354763629846274852753f,0.0304915383458137512207f,\ +0.6331009590066969394684f,0.4550241930410265922546f,0.3173553734086453914642f,\ +0.8250397499650716781616f,0.2725940425880253314972f,0.3458735281601548194885f,\ +0.5352854127995669841766f,0.7017193175852298736572f,0.9817278520204126834869f,\ +0.2777477568015456199646f,0.1314821145497262477875f,0.366813333705067634583f,\ +0.7377605927176773548126f,0.9103105561807751655579f,0.3637479650788009166718f,\ +0.8207867145538330078125f,0.3059372254647314548492f,0.9788405327126383781433f,\ +0.9970494522713124752045f,0.4636328797787427902222f,0.7769650523550808429718f,\ +0.3400075891986489295959f,0.0353285889141261577606f,0.2607673071324825286865f,\ +0.5790986777283251285553f,0.1250711670145392417908f,0.0372988111339509487152f,\ +0.9382179621607065200806f,0.5585843441076576709747f,0.7192503632977604866028f,\ +0.3599752518348395824432f,0.6758626028895378112793f,0.2222136431373655796051f,\ +0.7860159231349825859070f,0.1736893891356885433197f,0.2674629595130681991577f,\ +0.7357366015203297138214f,0.0550541067495942115784f,0.5923380698077380657196f,\ +0.2162457890808582305908f,0.7718841419555246829987f,0.0926524316892027854919f,\ +0.7626169077120721340179f,0.7347808051854372024536f,0.8017499190755188465118f,\ +0.7732572900131344795227f,0.2559880572371184825897f,0.1179054826498031616f,\ +0.9232815303839743137360f,0.6709534404799342155457f,0.6071323617361485958099f,\ +0.4574467372149229049683f,0.8206311021931469440460f,0.0896153757348656654358f,\ +0.3426358769647777080536f,0.1674894802272319793701f,0.9481152505613863468170f,\ +0.9504805644974112510681f,0.3436607695184648036957f,0.2889420483261346817017f,\ +0.5325344172306358814240f,0.2558945687487721443176f,0.8863505902700126171112f,\ +0.0421485081315040588379f,0.4876015805639326572418f} + +#define CSOURCEI {0.347978035919368267059f,0.2037199228070676326752f,0.5962978359311819076538f,\ +0.8342303414829075336456f,0.6809655660763382911682f,0.9127784068696200847626f,\ +0.5243799723684787750244f,0.7204323844052851200104f,0.3259664541110396385193f,\ +0.1506391367875039577484f,0.9124387521296739578247f,0.6345743131823837757111f,\ +0.9268973069265484809875f,0.7633614349178969860077f,0.5918717086315155029297f,\ +0.9057438620366156101227f,0.3263365356251597404480f,0.3912780000828206539154f,\ +0.4635267537087202072144f,0.0849754814989864826202f,0.5800507226958870887756f,\ +0.7945564310066401958466f,0.3823457323014736175537f,0.3010852993465960025787f,\ +0.5789428642019629478455f,0.2627451247535645961761f,0.5713048521429300308228f,\ +0.1848654565401375293732f,0.9971724869683384895325f,0.4520535501651465892792f,\ +0.0334019884467124938965f,0.4553878181613981723785f,0.7851976407691836357117f,\ +0.4941168962977826595306f,0.9304408635944128036499f,0.7621670593507587909698f,\ +0.9264887655153870582581f,0.7199950958602130413055f,0.3973621018230915069580f,\ +0.8769331262446939945221f,0.6766644334420561790466f,0.8431562236510217189789f,\ +0.7608711589127779006958f,0.8287630719132721424103f,0.0037989662960171699524f,\ +0.9451942699961364269257f,0.6311131268739700317383f,0.0763222672976553440094f,\ +0.4486519275233149528503f,0.1080312891863286495209f,0.8351444136351346969604f,\ +0.3109649871475994586945f,0.1235694894567131996155f,0.0363539229147136211395f,\ +0.6609512977302074432373f,0.9844443709589540958405f,0.0688076755031943321228f,\ +0.5140342987142503261566f,0.3807653579860925674438f,0.1549817589111626148224f,\ +0.6850274773314595222473f,0.0382853033952414989471f,0.5224257782101631164551f,\ +0.7454454028047621250153f,0.4607118470594286918640f,0.4753002314828336238861f,\ +0.8575385268777608871460f,0.8073885519988834857941f,0.7132545644417405128479f,\ +0.0811268086545169353485f,0.5751824118196964263916f,0.884696914348751306534f,\ +0.5624709790572524070740f,0.7315255901776254177094f,0.6099120099097490310669f,\ +0.0705954921431839466095f,0.8552806274965405464172f,0.7045627343468368053436f,\ +0.5928074717521667480469f,0.8517647930420935153961f,0.2603117255493998527527f,\ +0.8596871509216725826263f,0.3943212013691663742065f,0.3333164160139858722687f,\ +0.2511775353923439979553f,0.5570420245639979839325f,0.7276714108884334564209f,\ +0.9383780122734606266022f,0.1971746077761054039001f,0.1607607132755219936371f,\ +0.7815325502306222915649f,0.1760376212187111377716f,0.2801528992131352424622f,\ +0.4699970218352973461151f,0.3507726117968559265137f,0.5713973813690245151520f,\ +0.4563077641651034355164f,0.9214398502372205257416f,0.4339873101562261581421f,\ +0.3514866163022816181183f,0.1816438222303986549377f,0.9070622171275317668915f,\ +0.7665811367332935333252f,0.9807842955924570560455f,0.1198607003316283226013f,\ +0.0508546582423150539398f,0.2581452894955873489380f,0.1401008707471191883087f,\ +0.5514106499031186103821f,0.7882929998449981212616f,0.8028824776411056518555f,\ +0.2425694861449301242828f,0.7024780390784144401550f,0.0922905071638524532318f,\ +0.4318286012858152389526f,0.0804965649731457233429f,0.7126307198777794837952f,\ +0.6893844078294932842255f,0.2756213061511516571045f,0.6968217701651155948639f,\ +0.4598932703956961631775f,0.6099067903123795986176f,0.3065654132515192031860f,\ +0.0749373403377830982208f,0.9619921119883656501770f,0.4158898773603141307831f,\ +0.3287452235817909240723f,0.7406168007291853427887f,0.5725225014612078666687f,\ +0.9504556744359433650970f,0.1849336978048086166382f,0.8698030491359531879425f,\ +0.6907873982563614845276f,0.9524399931542575359344f,0.6490485109388828277588f,\ +0.9960058168508112430573f,0.2040582066401839256287f,0.3800008497200906276703f,\ +0.9729049820452928543091f,0.9110585046000778675079f,0.3810073928907513618469f,\ +0.7869612383656203746796f,0.5560158789157867431641f,0.8529843934811651706696f,\ +0.4350629774853587150574f,0.5956362797878682613373f,0.7071880977600812911987f,\ +0.5747222309000790119171f,0.4764349022880196571350f,0.6098947445861995220184f,\ +0.9666662178933620452881f,0.3874611915089190006256f,0.0715632727369666099548f,\ +0.6122049516998231410980f,0.9575729314237833023071f,0.7723352131433784961700f,\ +0.1287384750321507453918f,0.3884150418452918529510f,0.2353963479399681091309f,\ +0.6542267077602446079254f,0.3286431683227419853210f,0.024017625954002141953f,\ +0.1042741741985082626343f,0.9314296473748981952667f,0.8185661518946290016174f,\ +0.8156488086096942424774f,0.8688247688114643096924f,0.3549220249988138675690f,\ +0.3890381073579192161560f,0.6415715864859521389008f,0.4902750719338655471802f,\ +0.3509976905770599842072f,0.8516392158344388008118f,0.1348936217837035655975f,\ +0.1156354099512100219727f,0.8810075619257986545563f,0.8367286501452326774597f,\ +0.5032693906687200069427f,0.4486711751669645309448f,0.9319602106697857379913f,\ +0.7298459419980645179749f,0.3388367067091166973114f,0.4314213804900646209717f,\ +0.7317318231798708438873f,0.9655342241749167442322f,0.2621376193128526210785f,\ +0.2050140891224145889282f,0.2826355365104973316193f,0.3973353477194905281067f,\ +0.7437736871652305126190f,0.8185287192463874816895f,0.3071001493372023105621f,\ +0.9627068741247057914734f,0.9475456266663968563080f,0.6546552237123250961304f,\ +0.1992082078941166400909f,0.3616109425202012062073f,0.9388273353688418865204f,\ +0.0409001447260379791260f,0.0758434669114649295807f} + +#define CRESULTR {-0.3290495609832542744932f,-0.2133542315965856750459f,-0.2143604594080804615075f,\ +-0.0779993516667897290873f,-0.0881879704812010417614f,-0.0392492308819259588804f,\ +-0.1468107357971605020364f,-0.1080692186653561120968f,-0.1065683791205834785032f,\ +-0.0273353392421778126908f,0.1191283090947614642374f,-0.1819586746730034731989f,\ +-0.0146372370113581271034f,-0.1172624775653131612430f,-0.2254678765990359434745f,\ +-0.0331498720885635145272f,-0.3009243692795003366491f,-0.3306899894153413344000f,\ +-0.3045496213459356615871f,-0.2169562594261553178931f,-0.1622895628928226752219f,\ +-0.0725702069682954281626f,-0.1801817524356017496956f,-0.0638691649231626773497f,\ +0.0382899018433042123699f,-0.5136597137709293381391f,0.0453803311793120195405f,\ +-0.4840630563482673509590f,0.0043573655682720771609f,-0.0053634673446913633602f,\ +-0.2922091972771523882280f,-0.0379710404096835762999f,0.0615264246077369611476f,\ +-0.1177861239572535467790f,-0.0027606815124210713590f,0.0827769612970807588948f,\ +0.0103506258196890514600f,-0.0414069352257771042258f,-0.0028258322392286264017f,\ +0.0191369442490108253307f,-0.1537687128497234601010f,-0.0721417928417731474378f,\ +0.0027147719270748577915f,-0.0735641860746090447964f,-0.0127065691399337477724f,\ +0.0059853142299196512854f,-0.0125407536616094668347f,-0.0108856950196654141821f,\ +-0.3292710076447024625246f,-0.3259617043131136093770f,-0.0020400145634434829929f,\ +-0.1479281118584361010004f,-0.9017915683260822046208f,-0.3542710907015680921184f,\ +-0.0370225124342607042616f,0.0151168335656557354524f,-0.3642515556722971115100f,\ +-0.0288172015063716119299f,-0.4149670396818516682202f,-0.0092330629379009203361f,\ +-0.0106663219864977006773f,-0.7243988137694490347940f,-0.1958487567186202316094f,\ +0.0439375096643265586338f,-0.0920894961670395001407f,-0.0491603497010221490715f,\ +0.0086566739889077232162f,0.0339376585197796801219f,-0.1304877971769988764805f,\ +-0.0630508696074615210270f,-0.2293705604967442579500f,-0.0219724307162800849835f,\ +-0.1224692215475379208911f,-0.0531242407432285373980f,-0.1143402977644937118518f,\ +-0.0234761498308886963626f,0.1091329563146860859302f,-0.0527638328353893792944f,\ +0.0024222192478416683901f,0.0292586204417139908451f,-0.1262209046057715389200f,\ +0.0369593428671423362974f,0.0158795483132631205792f,-0.4767086450021467136651f,\ +-0.1746242034102962470410f,-0.1615510250958859250758f,-0.1371556526467043735096f,\ +0.100945647205856317563f,-0.6837031045647332661019f,-0.0014388289408900174424f,\ +-0.0464403701173962263349f,-0.0582634176897608505041f,-0.0221676835116708763340f,\ +-0.1671127243957707675381f,-0.3975387523773417086659f,-0.1649600652341057516193f,\ +-0.2862269227110153524407f,-0.0328071976308584797866f,0.0351271945689521844503f,\ +-0.1813816670814733522654f,-0.3701233874684188296378f,0.0635430885883380841550f,\ +-0.1049291365916461549190f,0.0095204817066643597501f,-0.3507837205033069172266f,\ +-0.0490285470477662618793f,-0.1735609734951024107907f,-0.4296178908501777637952f,\ +-0.2551225266448440276434f,-0.0617650291008570578866f,-0.0848934350447099472792f,\ +-0.0331679244708535381214f,0.0578595820981543801365f,-0.9721832280456300656724f,\ +-0.2220295759617292030708f,-0.0235337862370093645059f,0.0670980880683051256197f,\ +0.0456584724702859962031f,-0.4050627643604459149351f,0.0332188086620539904659f,\ +-0.1843762947107071559216f,-0.2025989526775586746510f,-0.1728805677287464093173f,\ +-0.5006140240740283298138f,-0.0039574496715991209703f,-0.3747624646211847876387f,\ +-0.0291826804365620078030f,-0.0644170285495881678184f,-0.020449093098134307755f,\ +0.1324382164856784949158f,-0.3626939268757052303727f,0.0521008032215845851010f,\ +0.0438487661958249438920f,0.0803943913989621228300f,-0.1872441239933456957889f,\ +0.0719513030064179159861f,-0.3021736609622284186472f,-0.30531498564977166410f,\ +0.1057250974802272092123f,-0.0218353036625967035500f,-0.2885450025056992551242f,\ +-0.0214746210927109354438f,-0.0480309906528200089570f,0.1141195620733326948626f,\ +-0.2872136450436454380153f,-0.2146876003507041108520f,-0.0987270319138862650910f,\ +-0.0290961734854755134372f,0.0117611124704010052561f,-0.1486623273058947924952f,\ +0.1031611720947231414236f,-0.3065510644941032425415f,-0.0081304707590571338727f,\ +0.0681862604059072646701f,0.0269042920576901857521f,0.0396225366257938194092f,\ +-0.4394191704520844510284f,-0.4089149013992912085058f,-0.4543230131010723149565f,\ +-0.0586330634787295829069f,-0.4539044694277152292017f,-1.3529821933222951901854f,\ +-0.0250304307835438853702f,0.0358632689692895620381f,0.0372933340583203806751f,\ +-0.0498532689013882687745f,0.0416880085188151769393f,-0.3780489142107763544942f,\ +-0.0569883570641069869822f,-0.1773959401592627993516f,-0.2529880791121558170076f,\ +-0.0887499827789579032178f,-0.0688387899649425538673f,-0.2164511122923038211052f,\ +-0.6104407141161303229637f,0.0686738036393797490753f,-0.0747689959340766124862f,\ +-0.0391919696178445325918f,-0.0650297590330818214843f,0.0896829227334642459235f,\ +0.0266548623220910323173f,-0.3719537274000056514822f,-0.3494566550303903618158f,\ +0.0711759971067136287814f,0.0703223378863101489245f,-0.1795974324279027423135f,\ +-0.2999138709331988783546f,-0.0615107548910408530318f,-0.3900685687486248887090f,\ +-0.0867686652200203717422f,-0.0780592259581650849132f,-0.0014744231840779402701f,\ +0.1312513908465361422984f,0.0034351924950619906404f,-0.1453391630458231997824f,\ +-0.2452127202368474256922f,-0.3536012485332969967899f,0.1109696410995756055140f,\ +-1.2311333463434968038541f,-0.3067437997278838479609f} + +#define CRESULTI {0.3633100487665162359185f,0.1474158063550214115001f,0.5885387980009104680335f,\ +0.6572801175741773693773f,0.4285748579481841735728f,0.6638943219025983388804f,\ +0.3587662857455625187164f,0.5117548829580961244901f,0.1866273414364414962030f,\ +0.0699742348195561969515f,0.3328432735187898949825f,0.5666303041879406920955f,\ +0.5568906423318142895340f,0.6796689265398294654830f,0.6374873742133734255688f,\ +0.5900654029247031084893f,0.3087389836998947201252f,0.4314129861802953325167f,\ +0.5242475923033280693630f,0.0610188495832547500575f,0.4354133593463934692736f,\ +0.5297939421633884871099f,0.2681487567918271475165f,0.1547283383009969981448f,\ +0.2426408568390991671304f,0.4474267034848418145287f,0.2347646885151994655683f,\ +0.2599927875089523832131f,0.6126748695156737367640f,0.2064522777477181547656f,\ +0.0284496210471740680614f,0.2258908609011123780341f,0.3256261235849059465508f,\ +0.3061930542060117277359f,0.5264317995551247575392f,0.2959401807089209746060f,\ +0.4910139616058311062829f,0.3969936639609323303368f,0.1786986723204381510843f,\ +0.4324195385396965018998f,0.5655382812237433887148f,0.6410621383118232374798f,\ +0.3723548821340513237388f,0.5990569422252302045351f,0.0016988593650344200551f,\ +0.5214150467894975715666f,0.3070731387905711318176f,0.0340224494974534080738f,\ +0.5552566039785586937683f,0.1002676097220635414997f,0.4323764448196805720848f,\ +0.1964911590800132445978f,0.6084096209152420886568f,0.0357352532897105071297f,\ +0.3489411661881484660874f,0.5453449961026168857359f,0.0694263094757205379004f,\ +0.2525534710601468613156f,0.6206431406119353733075f,0.0690444796836073154678f,\ +0.3380054707664132407352f,0.0887652999217624361084f,0.4176207649503542729263f,\ +0.3210430331362784106553f,0.2631553422310267675854f,0.2437584071473132274477f,\ +0.4336070270779164292918f,0.3661466421575780838538f,0.5640596254022186561983f,\ +0.0407979674024822880352f,0.5856292520126130662916f,0.5194472182924043668351f,\ +0.3655014659417109568196f,0.4226713256320973055580f,0.3981267146771410581074f,\ +0.0323921796076454895918f,0.3160837480759546291864f,0.3995349584181833169083f,\ +0.273802063686018282151f,0.4000313483957886884212f,0.1544145556607701974539f,\ +0.3952425864610250583198f,0.1693632158699578948990f,0.6627611949754427245196f,\ +0.167173661907591114550f,0.4086002639927426849376f,0.6540985540228395622719f,\ +0.3642324586236761474467f,0.5468253741606181606016f,0.0703565244510996889993f,\ +0.4580361055958868110594f,0.0880301024358387529389f,0.1299718766609879727625f,\ +0.3310527463405003034680f,0.4637212462953029801227f,0.4294623340021747059936f,\ +0.4691072369162453403746f,0.6335809675670333040998f,0.1788460444456893838616f,\ +0.2444904068796305007805f,0.1910877540250672246280f,0.3910553307022346936073f,\ +0.5870156732892560791370f,0.5581921905883382439839f,0.1182006499862187365313f,\ +0.0247387920792678586701f,0.1716217468036307647328f,0.1677637778431290971337f,\ +0.6278971871585069530752f,0.4952349292223454657602f,0.5872771345770251283369f,\ +0.1150482129328096875254f,0.2875910738555041423758f,0.4544626742179224132556f,\ +0.3490957130610289338435f,0.0369504335660946620079f,0.2852598765351710419225f,\ +0.2907565249995825995555f,0.3370230396263981242910f,0.3047404031476670938083f,\ +0.33865617237418182972f,0.5799887649794799315828f,0.2058615017488183152050f,\ +0.1040542236456874769512f,0.5769758315245528956794f,0.6086314545246159779524f,\ +0.1560306547104348962041f,0.4487914762887483810516f,0.2795367938070804081363f,\ +0.3371389774796904048593f,0.1912601282140735381443f,0.3826791464254168939618f,\ +0.2928983745329591936724f,0.396613573038569422469f,0.6618005209348483131038f,\ +0.4362846209517689533008f,0.1830850765515834310815f,0.3800035453193333911948f,\ +0.376730811842592550054f,0.5559265822426159298075f,0.3620694326893729719785f,\ +0.4227803813529266152571f,0.2910061310239929199817f,0.3106691139011089619615f,\ +0.435429394944240932830f,0.5878341337089509899272f,0.4743827280867594087255f,\ +0.2874204018606083543830f,0.2094051712928121644630f,0.4486348592544623370415f,\ +0.3764598089790200385885f,0.3919214486831592569871f,0.0316949858971651426964f,\ +0.2391495340218968146395f,0.486361470580685850695f,0.3397962718388538583270f,\ +0.1571941632596165761004f,0.6427949822892967679522f,0.3189060883322832884446f,\ +0.3675164927613087662017f,0.5242598134907254792125f,0.2484566158604845087510f,\ +0.0480705017921116625756f,0.4475807306655288364539f,0.3691029449284471408710f,\ +0.5016842301167260265160f,0.3950665170276177473596f,0.4392508841037601752255f,\ +0.1996012963954646446396f,0.5673662159944875549300f,0.4652972123009525562409f,\ +0.1933199899606511118488f,0.6541522766180654091528f,0.0972438028822732308809f,\ +0.2132613189014408716648f,0.3697245333311866000159f,0.6342931063454819717862f,\ +0.2533327612355570357394f,0.2380763598053285134970f,0.3736506508141989035821f,\ +0.3285546506249918952136f,0.4011970200297387822985f,0.5663267577447791412126f,\ +0.2910519034072798771895f,0.4184422115344140213899f,0.1770121129168618634431f,\ +0.1829818983774834095790f,0.1440504268816359956240f,0.5858489671891115024849f,\ +0.4947061064648006212252f,0.5945317434266266243270f,0.1360392849738219778200f,\ +0.3438694289300276984989f,0.5310838098864226752838f,0.5016736389654107286518f,\ +0.1554601034674029658156f,0.4147310296690985831347f,0.3535773010333992383281f,\ +0.3345663906426585842979f,0.0670148638928397127890f} + + + + +void slog10sTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=slog10s(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-5); + } +} + +void clog10sTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=clog10s(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<3e-5); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void slog10aTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + slog10a(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-5); + } +} + +void clog10aTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + clog10a(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<3e-5); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testLog10(void) { + printf("\n>>>> 10-Based Logarithm Tests\n"); + slog10sTest(); + clog10sTest(); + slog10aTest(); + clog10aTest(); + return 0; +} + +int main(void) { + assert(testLog10() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/testLog10.h b/2.3-1/src/c/elementaryFunctions/log10/testLog10.h new file mode 100644 index 00000000..5d0ed0a4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/testLog10.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTLOG10_H_ +#define _TESTLOG10_H_ + +#include +#include +#include +#include "log10.h" + +void slog10sTest(void); + +void dlog10sTest(void); + +void clog10sTest(void); + +void zlog10sTest(void); + +void slog10aTest(void); + +void dlog10aTest(void); + +void clog10aTest(void); + +void zlog10aTest(void); + +int testLog10(void); + +#endif /* ! _TESTLOG10_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/log10/zlog10a.c b/2.3-1/src/c/elementaryFunctions/log10/zlog10a.c new file mode 100644 index 00000000..dd25f7a5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/zlog10a.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" + +void zlog10a(doubleComplex* in, int size, doubleComplex* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = zlog10s(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log10/zlog10s.c b/2.3-1/src/c/elementaryFunctions/log10/zlog10s.c new file mode 100644 index 00000000..5403162f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log10/zlog10s.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log10.h" +#include "log.h" + +doubleComplex zlog10s(doubleComplex in) { + doubleComplex log_z = zlogs(in); + return DoubleComplex(zreals(log_z) / dlogs(10.0), zimags(log_z) / dlogs(10.0)); +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/Makefile.am b/2.3-1/src/c/elementaryFunctions/log1p/Makefile.am new file mode 100644 index 00000000..d62c071e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/Makefile.am @@ -0,0 +1,66 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libLog1p_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libLog1p.la + +libLog1p_la_SOURCES = $(HEAD) $(SRC) + +SRC = slog1ps.c \ + dlog1ps.c \ + clog1ps.c \ + zlog1ps.c \ + slog1pa.c \ + dlog1pa.c \ + clog1pa.c \ + zlog1pa.c + +HEAD = ../includes/log1p.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatLog1p testDoubleLog1p + +TESTS = testFloatLog1p testDoubleLog1p + +# +# -*- Log1p Tests -*- +# +testFloatLog1p_SOURCES = testLog1p.h testFloatLog1p.c +testFloatLog1p_CFLAGS = $(check_INCLUDES) +testFloatLog1p_LDADD = $(check_LDADD) + +testDoubleLog1p_SOURCES = testLog1p.h testDoubleLog1p.c +testDoubleLog1p_CFLAGS = $(check_INCLUDES) +testDoubleLog1p_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/log1p/Makefile.in b/2.3-1/src/c/elementaryFunctions/log1p/Makefile.in new file mode 100644 index 00000000..fea47126 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/Makefile.in @@ -0,0 +1,806 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatLog1p$(EXEEXT) testDoubleLog1p$(EXEEXT) +TESTS = testFloatLog1p$(EXEEXT) testDoubleLog1p$(EXEEXT) +subdir = src/c/elementaryFunctions/log1p +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLog1p_la_LIBADD = +am__objects_1 = +am__objects_2 = libLog1p_la-slog1ps.lo libLog1p_la-dlog1ps.lo \ + libLog1p_la-clog1ps.lo libLog1p_la-zlog1ps.lo \ + libLog1p_la-slog1pa.lo libLog1p_la-dlog1pa.lo \ + libLog1p_la-clog1pa.lo libLog1p_la-zlog1pa.lo +am_libLog1p_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libLog1p_la_OBJECTS = $(am_libLog1p_la_OBJECTS) +libLog1p_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLog1p_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLog1p_OBJECTS = \ + testDoubleLog1p-testDoubleLog1p.$(OBJEXT) +testDoubleLog1p_OBJECTS = $(am_testDoubleLog1p_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleLog1p_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleLog1p_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLog1p_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLog1p_OBJECTS = testFloatLog1p-testFloatLog1p.$(OBJEXT) +testFloatLog1p_OBJECTS = $(am_testFloatLog1p_OBJECTS) +testFloatLog1p_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatLog1p_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLog1p_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLog1p_la_SOURCES) $(testDoubleLog1p_SOURCES) \ + $(testFloatLog1p_SOURCES) +DIST_SOURCES = $(libLog1p_la_SOURCES) $(testDoubleLog1p_SOURCES) \ + $(testFloatLog1p_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLog1p_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLog1p.la +libLog1p_la_SOURCES = $(HEAD) $(SRC) +SRC = slog1ps.c \ + dlog1ps.c \ + clog1ps.c \ + zlog1ps.c \ + slog1pa.c \ + dlog1pa.c \ + clog1pa.c \ + zlog1pa.c + +HEAD = ../includes/log1p.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Log1p Tests -*- +# +testFloatLog1p_SOURCES = testLog1p.h testFloatLog1p.c +testFloatLog1p_CFLAGS = $(check_INCLUDES) +testFloatLog1p_LDADD = $(check_LDADD) +testDoubleLog1p_SOURCES = testLog1p.h testDoubleLog1p.c +testDoubleLog1p_CFLAGS = $(check_INCLUDES) +testDoubleLog1p_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/log1p/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/log1p/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLog1p.la: $(libLog1p_la_OBJECTS) $(libLog1p_la_DEPENDENCIES) + $(libLog1p_la_LINK) -rpath $(pkglibdir) $(libLog1p_la_OBJECTS) $(libLog1p_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLog1p$(EXEEXT): $(testDoubleLog1p_OBJECTS) $(testDoubleLog1p_DEPENDENCIES) + @rm -f testDoubleLog1p$(EXEEXT) + $(testDoubleLog1p_LINK) $(testDoubleLog1p_OBJECTS) $(testDoubleLog1p_LDADD) $(LIBS) +testFloatLog1p$(EXEEXT): $(testFloatLog1p_OBJECTS) $(testFloatLog1p_DEPENDENCIES) + @rm -f testFloatLog1p$(EXEEXT) + $(testFloatLog1p_LINK) $(testFloatLog1p_OBJECTS) $(testFloatLog1p_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-clog1pa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-clog1ps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-dlog1pa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-dlog1ps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-slog1pa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-slog1ps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-zlog1pa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLog1p_la-zlog1ps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLog1p-testFloatLog1p.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLog1p_la-slog1ps.lo: slog1ps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-slog1ps.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-slog1ps.Tpo -c -o libLog1p_la-slog1ps.lo `test -f 'slog1ps.c' || echo '$(srcdir)/'`slog1ps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-slog1ps.Tpo $(DEPDIR)/libLog1p_la-slog1ps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slog1ps.c' object='libLog1p_la-slog1ps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-slog1ps.lo `test -f 'slog1ps.c' || echo '$(srcdir)/'`slog1ps.c + +libLog1p_la-dlog1ps.lo: dlog1ps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-dlog1ps.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-dlog1ps.Tpo -c -o libLog1p_la-dlog1ps.lo `test -f 'dlog1ps.c' || echo '$(srcdir)/'`dlog1ps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-dlog1ps.Tpo $(DEPDIR)/libLog1p_la-dlog1ps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlog1ps.c' object='libLog1p_la-dlog1ps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-dlog1ps.lo `test -f 'dlog1ps.c' || echo '$(srcdir)/'`dlog1ps.c + +libLog1p_la-clog1ps.lo: clog1ps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-clog1ps.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-clog1ps.Tpo -c -o libLog1p_la-clog1ps.lo `test -f 'clog1ps.c' || echo '$(srcdir)/'`clog1ps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-clog1ps.Tpo $(DEPDIR)/libLog1p_la-clog1ps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clog1ps.c' object='libLog1p_la-clog1ps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-clog1ps.lo `test -f 'clog1ps.c' || echo '$(srcdir)/'`clog1ps.c + +libLog1p_la-zlog1ps.lo: zlog1ps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-zlog1ps.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-zlog1ps.Tpo -c -o libLog1p_la-zlog1ps.lo `test -f 'zlog1ps.c' || echo '$(srcdir)/'`zlog1ps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-zlog1ps.Tpo $(DEPDIR)/libLog1p_la-zlog1ps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlog1ps.c' object='libLog1p_la-zlog1ps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-zlog1ps.lo `test -f 'zlog1ps.c' || echo '$(srcdir)/'`zlog1ps.c + +libLog1p_la-slog1pa.lo: slog1pa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-slog1pa.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-slog1pa.Tpo -c -o libLog1p_la-slog1pa.lo `test -f 'slog1pa.c' || echo '$(srcdir)/'`slog1pa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-slog1pa.Tpo $(DEPDIR)/libLog1p_la-slog1pa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slog1pa.c' object='libLog1p_la-slog1pa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-slog1pa.lo `test -f 'slog1pa.c' || echo '$(srcdir)/'`slog1pa.c + +libLog1p_la-dlog1pa.lo: dlog1pa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-dlog1pa.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-dlog1pa.Tpo -c -o libLog1p_la-dlog1pa.lo `test -f 'dlog1pa.c' || echo '$(srcdir)/'`dlog1pa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-dlog1pa.Tpo $(DEPDIR)/libLog1p_la-dlog1pa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlog1pa.c' object='libLog1p_la-dlog1pa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-dlog1pa.lo `test -f 'dlog1pa.c' || echo '$(srcdir)/'`dlog1pa.c + +libLog1p_la-clog1pa.lo: clog1pa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-clog1pa.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-clog1pa.Tpo -c -o libLog1p_la-clog1pa.lo `test -f 'clog1pa.c' || echo '$(srcdir)/'`clog1pa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-clog1pa.Tpo $(DEPDIR)/libLog1p_la-clog1pa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clog1pa.c' object='libLog1p_la-clog1pa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-clog1pa.lo `test -f 'clog1pa.c' || echo '$(srcdir)/'`clog1pa.c + +libLog1p_la-zlog1pa.lo: zlog1pa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -MT libLog1p_la-zlog1pa.lo -MD -MP -MF $(DEPDIR)/libLog1p_la-zlog1pa.Tpo -c -o libLog1p_la-zlog1pa.lo `test -f 'zlog1pa.c' || echo '$(srcdir)/'`zlog1pa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLog1p_la-zlog1pa.Tpo $(DEPDIR)/libLog1p_la-zlog1pa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlog1pa.c' object='libLog1p_la-zlog1pa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLog1p_la_CFLAGS) $(CFLAGS) -c -o libLog1p_la-zlog1pa.lo `test -f 'zlog1pa.c' || echo '$(srcdir)/'`zlog1pa.c + +testDoubleLog1p-testDoubleLog1p.o: testDoubleLog1p.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog1p_CFLAGS) $(CFLAGS) -MT testDoubleLog1p-testDoubleLog1p.o -MD -MP -MF $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Tpo -c -o testDoubleLog1p-testDoubleLog1p.o `test -f 'testDoubleLog1p.c' || echo '$(srcdir)/'`testDoubleLog1p.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Tpo $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog1p.c' object='testDoubleLog1p-testDoubleLog1p.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog1p_CFLAGS) $(CFLAGS) -c -o testDoubleLog1p-testDoubleLog1p.o `test -f 'testDoubleLog1p.c' || echo '$(srcdir)/'`testDoubleLog1p.c + +testDoubleLog1p-testDoubleLog1p.obj: testDoubleLog1p.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog1p_CFLAGS) $(CFLAGS) -MT testDoubleLog1p-testDoubleLog1p.obj -MD -MP -MF $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Tpo -c -o testDoubleLog1p-testDoubleLog1p.obj `if test -f 'testDoubleLog1p.c'; then $(CYGPATH_W) 'testDoubleLog1p.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog1p.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Tpo $(DEPDIR)/testDoubleLog1p-testDoubleLog1p.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLog1p.c' object='testDoubleLog1p-testDoubleLog1p.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLog1p_CFLAGS) $(CFLAGS) -c -o testDoubleLog1p-testDoubleLog1p.obj `if test -f 'testDoubleLog1p.c'; then $(CYGPATH_W) 'testDoubleLog1p.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLog1p.c'; fi` + +testFloatLog1p-testFloatLog1p.o: testFloatLog1p.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog1p_CFLAGS) $(CFLAGS) -MT testFloatLog1p-testFloatLog1p.o -MD -MP -MF $(DEPDIR)/testFloatLog1p-testFloatLog1p.Tpo -c -o testFloatLog1p-testFloatLog1p.o `test -f 'testFloatLog1p.c' || echo '$(srcdir)/'`testFloatLog1p.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog1p-testFloatLog1p.Tpo $(DEPDIR)/testFloatLog1p-testFloatLog1p.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog1p.c' object='testFloatLog1p-testFloatLog1p.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog1p_CFLAGS) $(CFLAGS) -c -o testFloatLog1p-testFloatLog1p.o `test -f 'testFloatLog1p.c' || echo '$(srcdir)/'`testFloatLog1p.c + +testFloatLog1p-testFloatLog1p.obj: testFloatLog1p.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog1p_CFLAGS) $(CFLAGS) -MT testFloatLog1p-testFloatLog1p.obj -MD -MP -MF $(DEPDIR)/testFloatLog1p-testFloatLog1p.Tpo -c -o testFloatLog1p-testFloatLog1p.obj `if test -f 'testFloatLog1p.c'; then $(CYGPATH_W) 'testFloatLog1p.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog1p.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLog1p-testFloatLog1p.Tpo $(DEPDIR)/testFloatLog1p-testFloatLog1p.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLog1p.c' object='testFloatLog1p-testFloatLog1p.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLog1p_CFLAGS) $(CFLAGS) -c -o testFloatLog1p-testFloatLog1p.obj `if test -f 'testFloatLog1p.c'; then $(CYGPATH_W) 'testFloatLog1p.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLog1p.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/log1p/clog1pa.c b/2.3-1/src/c/elementaryFunctions/log1p/clog1pa.c new file mode 100644 index 00000000..76c78a94 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/clog1pa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" + +void clog1pa(floatComplex* in, int size, floatComplex* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = clog1ps(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/clog1ps.c b/2.3-1/src/c/elementaryFunctions/log1p/clog1ps.c new file mode 100644 index 00000000..1cf6c555 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/clog1ps.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" +#include "log.h" + +floatComplex clog1ps(floatComplex in) { + return clogs(FloatComplex(creals(in) + 1, cimags(in))); +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/dlog1pa.c b/2.3-1/src/c/elementaryFunctions/log1p/dlog1pa.c new file mode 100644 index 00000000..c1bf85ba --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/dlog1pa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" + +void dlog1pa(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dlog1ps(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/dlog1ps.c b/2.3-1/src/c/elementaryFunctions/log1p/dlog1ps.c new file mode 100644 index 00000000..e75a05fd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/dlog1ps.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" +#include "log.h" +#include "lnp1m1.h" + +double dlog1ps(double in) { + static double A = -1.0/3.0; + static double B = 0.5; + + if(in < -1) + {/* got NaN */ + return (in - in) / (in - in); /* NaN */ + } + else if(A <= in && in <= B) + {/* use the function log((1+g)/(1-g)) with g = x/(x + 2) */ + return dlnp1m1s(in / (in + 2)); + } + else + {/* use the standard formula */ + return dlogs(in + 1); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/slog1pa.c b/2.3-1/src/c/elementaryFunctions/log1p/slog1pa.c new file mode 100644 index 00000000..05334841 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/slog1pa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" + +void slog1pa(float* in, int size, float* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = slog1ps(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/slog1ps.c b/2.3-1/src/c/elementaryFunctions/log1p/slog1ps.c new file mode 100644 index 00000000..04786524 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/slog1ps.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" +#include "log.h" +#include "lnp1m1.h" + +float slog1ps(float in) { + static double A = -1.0/3.0; + static double B = 0.5; + + if(in < -1) + {/* got NaN */ + return (in - in) / (in - in); /* NaN */ + } + else if(A <= in && in <= B) + {/* use the function log((1+g)/(1-g)) with g = x/(x + 2) */ + return slnp1m1s(in / (in + 2)); + } + else + {/* use the standard formula */ + return slogs(in + 1); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/testDoubleLog1p.c b/2.3-1/src/c/elementaryFunctions/log1p/testDoubleLog1p.c new file mode 100644 index 00000000..2faacfaa --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/testDoubleLog1p.c @@ -0,0 +1,1255 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog1p.h" +#include "math.h" + +#define SOURCE {0.3628176329657435417175,0.924179898109287023544,0.5243524145334959030151,\ +0.7886543427594006061554,0.6525151440873742103577,0.2477638195268809795380,\ +0.2364655844867229461670,0.7240293831564486026764,0.8278210600838065147400,\ +0.4287728047929704189301,0.4858888480812311172485,0.5923984018154442310333,\ +0.0949383648112416267395,0.1356843891553580760956,0.9917455688118934631348,\ +0.7212927364744246006012,0.0115638775750994682312,0.0211908905766904354095,\ +0.1524727698415517807007,0.9165380974300205707550,0.4467271203175187110901,\ +0.5868234331719577312469,0.1882771886885166168213,0.4196520284749567508698,\ +0.2730510598048567771912,0.7565603456459939479828,0.9378882069140672683716,\ +0.0586007428355515003204,0.5101847248151898384094,0.5031699347309768199921,\ +0.7783576548099517822266,0.6856653341092169284821,0.1381576983258128166199,\ +0.371037633623927831650,0.6366564910858869552612,0.4961673622019588947296,\ +0.2994064847007393836975,0.2392275254242122173309,0.5618183575570583343506,\ +0.3218038142658770084381,0.1082227518782019615173,0.1685282415710389614105,\ +0.8263800088316202163696,0.4923414406366646289825,0.7863734485581517219543,\ +0.6762332352809607982635,0.0258686169981956481934,0.3594204657711088657379,\ +0.3436427963897585868835,0.2824054299853742122650,0.1450859513133764266968,\ +0.0762176741845905780792,0.5220461571589112281799,0.6713762427680194377899,\ +0.0599394328892230987549,0.7267188713885843753815,0.2224657749757170677185,\ +0.3122289828024804592133,0.4435700643807649612427,0.3983507198281586170197,\ +0.1324583934620022773743,0.8820166247896850109100,0.5455272346735000610352,\ +0.2917219498194754123688,0.7739847479388117790222,0.3354639573954045772552,\ +0.8127403985708951950073,0.4612239454872906208038,0.6898109326139092445374,\ +0.9649041066877543926239,0.8210376314818859100342,0.2802407057024538516998,\ +0.9873316427692770957947,0.294199434574693441391,0.4859610591083765029907,\ +0.2247181800194084644318,0.9585652919486165046692,0.1503968122415244579315,\ +0.0216291621327400207520,0.0688429796136915683746,0.9950710041448473930359,\ +0.7568672685883939266205,0.6163959559053182601929,0.0865804632194340229034,\ +0.5165374809876084327698,0.1916800136677920818329,0.2940570451319217681885,\ +0.3528221980668604373932,0.1317937439307570457458,0.0549608371220529079437,\ +0.929352553561329841614,0.737892795819789171219,0.7509917514398694038391,\ +0.6889848816208541393280,0.8865169286727905273438,0.6891661235131323337555,\ +0.8677108911797404289246,0.7947537912987172603607,0.2496256213635206222534,\ +0.3935408894903957843781,0.7297343472018837928772,0.7888072351925075054169,\ +0.113488640636205673218,0.4145256043411791324615,0.6172473421320319175720,\ +0.7440188056789338588715,0.9038409832864999771118,0.3976829168386757373810,\ +0.9472072543576359748840,0.2581262919120490550995,0.1955799385905265808105,\ +0.9381833248771727085114,0.4226356102153658866882,0.0937463282607495784760,\ +0.9977992679923772811890,0.2042182614095509052277,0.9455819511786103248596,\ +0.9336234177462756633759,0.9743702597916126251221,0.4100225553847849369049,\ +0.5125095760449767112732,0.0948633304797112941742,0.5688196588307619094849,\ +0.7322562676854431629181,0.8108531581237912178040,0.5459008770994842052460,\ +0.5022544711828231811523,0.7634959020651876926422,0.7354982374235987663269,\ +0.0699520572088658809662,0.6130836438387632369995,0.0965849910862743854523,\ +0.5439325878396630287170,0.9187005828134715557098,0.5072866193950176239014,\ +0.1335940570570528507233,0.8688194593414664268494,0.7999687767587602138519,\ +0.9879787657409906387329,0.7131399479694664478302,0.3067426951602101325989,\ +0.5431228461675345897675,0.7330236807465553283691,0.6498145484365522861481,\ +0.8018737239763140678406,0.2859625308774411678314,0.1894423719495534896851,\ +0.7794728656299412250519,0.5433104271069169044495,0.5268451268784701824188,\ +0.1533693112432956695557,0.6041304902173578739166,0.5948378806933760643005,\ +0.8857938847504556179047,0.0043053645640611648560,0.1302204323001205921173,\ +0.9758609728887677192688,0.9183407831005752086639,0.0624175965785980224609,\ +0.9939593323506414890289,0.4122588960453867912292,0.8258536770008504390717,\ +0.0376359503716230392456,0.4675730471499264240265,0.4759115139022469520569,\ +0.4060978214256465435028,0.0392968021333217620850,0.4401316107250750064850,\ +0.3316476037725806236267,0.0877817696891725063324,0.1150833908468484878540,\ +0.9667435702867805957794,0.8103649737313389778137,0.3928376468829810619354,\ +0.7880131229758262634277,0.4798596971668303012848,0.0270724548026919364929,\ +0.6701857983134686946869,0.5602217521518468856812,0.2564360727556049823761,\ +0.2626037681475281715393,0.4447338129393756389618,0.8522944338619709014893,\ +0.2347065494395792484283,0.3277532672509551048279,0.2253599218092858791351,\ +0.3468936551362276077271,0.7743145865388214588165,0.1285835551097989082336,\ +0.1156307714991271495819,0.2054340392351150512695,0.4535544612444937229156,\ +0.6516549764201045036316,0.0710035725496709346771,0.1265540253371000289917,\ +0.4974718545563519001007,0.0879269847646355628967,0.1462626229040324687958,\ +0.715134423226118087769,0.9305738122202455997467} + +#define RESULT {-1.0138549594808059506335,-0.0788485313675790222554,-0.6455912738997077182646,\ +-0.2374271494900490608870,-0.4269209307253117313685,-1.3952793271990111545477,\ +-1.4419526017799386696794,-0.3229233029497151630238,-0.1889582589621221220266,\ +-0.8468280928949678543205,-0.7217753888910144466351,-0.5235758944053595653756,\ +-2.354527389398466841186,-1.9974237581445692946147,-0.0082886876471943305572,\ +-0.3267102095711482134810,-4.459869041610169837497,-3.8541838794260296907623,\ +-1.8807692572941765440930,-0.0871516441756800402940,-0.8058073398690168698266,\ +-0.5330312996797691438289,-1.6698399941066854879068,-0.8683294147345963498452,\ +-1.2980964690333058886296,-0.2789729794097077220094,-0.0641245194730828693697,\ +-2.8370079061049158219987,-0.6729824133243695882811,-0.6868273235307851276588,\ +-0.2505691498856313370602,-0.3773656214470872405364,-1.9793595047655996310709,\ +-0.9914517831797942104544,-0.4515250293249062352174,-0.7008419853775434971155,\ +-1.205953148244055972427,-1.4303401906823356437570,-0.5765766885249945516989,\ +-1.1338131915858427056776,-2.2235636585360341044293,-1.7806519374711546888079,\ +-0.1907005521377241608061,-0.7085828181522180191365,-0.240323473997209546837,\ +-0.3912172398408133022762,-3.6547247438886865111840,-1.0232623619826317629133,\ +-1.0681525436893481995071,-1.264411545554370741584,-1.93042894450046809141,\ +-2.5741618985048786427683,-0.6499992713325659643431,-0.3984255796794416437656,\ +-2.8144206784459675496635,-0.3192155730871417684824,-1.502982009541258934249,\ +-1.1640184411209602011184,-0.8128995091446955534309,-0.9204224561330225373723,\ +-2.0214866944753584476757,-0.1255443741850884864508,-0.6060025488810325544620,\ +-1.231954157015291428934,-0.2562031110919770759971,-1.092240757863258915350,\ +-0.2073435333764902521736,-0.7738715719712579987899,-0.3713377296431035756719,\ +-0.0357265538888332026546,-0.1971863344268207918208,-1.2721063818886333418590,\ +-0.0127492850765575892191,-1.223497392724554932997,-0.7216267835832522736794,\ +-1.4929081951001816896962,-0.0423175999341945593968,-1.8944780628936490618486,\ +-3.8337127761178795282149,-2.6759270254015836698613,-0.0049411834200203501311,\ +-0.2785673796390666367984,-0.483865736386189515539,-2.446681086792801718133,\ +-0.6606074257995434573232,-1.651927892749795789840,-1.2239814994040887352611,\ +-1.0417910371382139711471,-2.026517124423018234580,-2.9011343997056400212387,\ +-0.0732671142462539837226,-0.3039567280501898061118,-0.2863606107139139989037,\ +-0.3725359507043504159185,-0.1204550575726043570857,-0.3722729288835950889336,\ +-0.1418966944811957953121,-0.2297229087732643171282,-1.3877929980613914473508,\ +-0.9325703042223095762253,-0.3150747190128889152483,-0.2372333033314831252092,\ +-2.1760525295696577785520,-0.8806205346832632896437,-0.4824854567490562962107,\ +-0.2956889680183093505050,-0.1011018375069230867958,-0.9221002825850308504130,\ +-0.0542373561426655603768,-1.3543063102932182406590,-1.6317860900845253535607,\ +-0.0638099067725128449302,-0.8612449127611128130155,-2.3671627801172654415041,\ +-0.0022031571770593774348,-1.5885659482121525787335,-0.0559547196755256631695,\ +-0.0686821150485829451382,-0.0259639040526286474231,-0.8915431076633286711086,\ +-0.6684358831783273613425,-2.3553180497276513527538,-0.5641918391516044239964,\ +-0.3116247338224413798713,-0.2096683039932461523058,-0.6053178634921361211951,\ +-0.6886483730214458809371,-0.2698475216395072595610,-0.3072071353764207479742,\ +-2.659945168598087494871,-0.4892539023727084379622,-2.3373319216128076725170,\ +-0.6089299592172232600262,-0.0847950173155939540548,-0.6786791108759814283857,\ +-2.0129495019748864237386,-0.1406199321004115432299,-0.2231825811274127380202,\ +-0.0120940736302183569906,-0.3380775973662459854552,-1.181746009333312530387,\ +-0.6104197485997391314783,-0.3105772710053884000381,-0.4310682668987352861301,\ +-0.2208041349135003439397,-1.25189448766300226445,-1.6636704065163092636226,\ +-0.2491374010581904052675,-0.6100744334370675758805,-0.6408486505219985751580,\ +-1.8749064671471911136535,-0.5039650609751163967687,-0.5194663799859419173188,\ +-0.1212709911627764675091,-5.4478934608177302933996,-2.038526631411456513376,\ +-0.0244351485261014196582,-0.0851867338269072515988,-2.7739080469083896574034,\ +-0.0060589862906551463645,-0.8861037385262900967220,-0.1913376676415258770270,\ +-3.2797955584796012473703,-0.7601996918711692030612,-0.7425233371947113081291,\ +-0.9011612089296217043000,-3.2366121340710831688625,-0.8206814815116268979622,\ +-1.1036823082060371881141,-2.4329014344197728014763,-2.1620982756055884266289,\ +-0.0338219993709664781822,-0.2102705479450195091840,-0.9343588647242980771424,\ +-0.2382405357403041268327,-0.7342615153765646995865,-3.609238495954611991579,\ +-0.4002002941250653034189,-0.5794225876492602456125,-1.36087587445700952671,\ +-1.337108967835097139698,-0.8102793489627861944768,-0.1598232322015146200656,\ +-1.449419270934711789778,-1.1154941876589379301521,-1.4900565023732303959747,\ +-1.05873701535465292167,-0.2557770454111949476328,-2.0511763516400991491651,\ +-2.1573531687271665369110,-1.5826302735280548539265,-0.7906399256902217898002,\ +-0.4282400343889684046772,-2.6450250856057104797969,-2.0670859842226763092299,\ +-0.6982162977399214431884,-2.4312485274946018520836,-1.9223514861397812403254,\ +-0.3352847494467096622905,-0.0719538807151878373469} + +#define ZSOURCER {0.3140813848003745079041,0.5769402063451707363129,0.1306138429790735244751,\ +0.0478980806656181812286,0.4500174494460225105286,0.0384718659333884716034,\ +0.483350999653339385986,0.2981918179430067539215,0.7112689120694994926453,\ +0.9268360524438321590424,0.9477838929742574691772,0.1729496796615421772003,\ +0.2750928336754441261292,0.0044281478039920330048,0.0611358620226383209229,\ +0.1950612799264490604401,0.3789803450927138328552,0.2549188635312020778656,\ +0.1764185149222612380981,0.6008180272765457630157,0.3703392641618847846985,\ +0.2908470141701400279999,0.5384815335273742675781,0.8090293356217443943024,\ +0.9260985879227519035339,0.1576966657303273677826,0.9518593531101942062378,\ +0.2709982101805508136749,0.1609848598018288612366,0.8782086591236293315887,\ +0.5091647170484066009521,0.7951062084175646305084,0.8432204117998480796814,\ +0.5806765086017549037933,0.3487791065126657485962,0.9397577759809792041779,\ +0.4363934816792607307434,0.5549766751937568187714,0.9105900451540946960449,\ +0.5684339576400816440582,0.1862502051517367362976,0.0800832151435315608978,\ +0.6585252787917852401733,0.1606054832227528095245,0.9711584830656647682190,\ +0.3668168033473193645477,0.7386338301002979278564,0.9722552285529673099518,\ +0.1349937235936522483826,0.4595781317912042140961,0.5414639282971620559692,\ +0.6397600513882935047150,0.0211964594200253486633,0.4408156829886138439178,\ +0.6374878138303756713867,0.3208820023573935031891,0.4267518399283289909363,\ +0.7819778784178197383881,0.0543234180659055709839,0.9666189108975231647491,\ +0.6948409983888268470764,0.1846996019594371318817,0.3645029179751873016357,\ +0.8176643461920320987701,0.664914294146001338959,0.7559730983339250087738,\ +0.5525381658226251602173,0.7192269531078636646271,0.1989364298060536384583,\ +0.8610532465390861034393,0.1300329938530921936035,0.347959163133054971695,\ +0.5025534434244036674500,0.4978472082875669002533,0.4675923939794301986694,\ +0.9447452803142368793488,0.9599315756931900978088,0.5365384514443576335907,\ +0.8122785724699497222900,0.6470989421941339969635,0.7010180121287703514099,\ +0.6681951484642922878265,0.9593638796359300613403,0.0149199557490646839142,\ +0.6199735002592206001282,0.4061129498295485973358,0.0471306145191192626953,\ +0.8433605083264410495758,0.0635268418118357658386,0.9836421324871480464935,\ +0.4434677045792341232300,0.8565507535822689533234,0.9080012599006295204163,\ +0.4922491232864558696747,0.1930142603814601898193,0.3759337724186480045319,\ +0.2437626412138342857361,0.1035623974166810512543,0.9936000052839517593384,\ +0.5569599089212715625763,0.3858396532014012336731,0.7191527518443763256073,\ +0.1707325801253318786621,0.2878904812969267368317,0.4294657362625002861023,\ +0.8917979537509381771088,0.6188817229121923446655,0.3444608678109943866730,\ +0.0692929709330201148987,0.3619817639701068401337,0.1783103235065937042236,\ +0.8941529677249491214752,0.9010278200730681419373,0.0533773354254662990570,\ +0.4162023533135652542114,0.9438270372338593006134,0.9242387460544705390930,\ +0.8710649865679442882538,0.2808376699686050415039,0.8244629004038870334625,\ +0.4650857029482722282410,0.1462343498133122920990,0.5975636970251798629761,\ +0.3067605351097881793976,0.2377215037122368812561,0.0711208949796855449677,\ +0.8753139786422252655029,0.4413500339724123477936,0.7631150623783469200134,\ +0.9679268277250230312347,0.3924236092716455459595,0.717360940296202898026,\ +0.8640465112403035163879,0.7354763629846274852753,0.0304915383458137512207,\ +0.6331009590066969394684,0.4550241930410265922546,0.3173553734086453914642,\ +0.8250397499650716781616,0.2725940425880253314972,0.3458735281601548194885,\ +0.5352854127995669841766,0.7017193175852298736572,0.9817278520204126834869,\ +0.2777477568015456199646,0.1314821145497262477875,0.366813333705067634583,\ +0.7377605927176773548126,0.9103105561807751655579,0.3637479650788009166718,\ +0.8207867145538330078125,0.3059372254647314548492,0.9788405327126383781433,\ +0.9970494522713124752045,0.4636328797787427902222,0.7769650523550808429718,\ +0.3400075891986489295959,0.0353285889141261577606,0.2607673071324825286865,\ +0.5790986777283251285553,0.1250711670145392417908,0.0372988111339509487152,\ +0.9382179621607065200806,0.5585843441076576709747,0.7192503632977604866028,\ +0.3599752518348395824432,0.6758626028895378112793,0.2222136431373655796051,\ +0.7860159231349825859070,0.1736893891356885433197,0.2674629595130681991577,\ +0.7357366015203297138214,0.0550541067495942115784,0.5923380698077380657196,\ +0.2162457890808582305908,0.7718841419555246829987,0.0926524316892027854919,\ +0.7626169077120721340179,0.7347808051854372024536,0.8017499190755188465118,\ +0.7732572900131344795227,0.2559880572371184825897,0.1179054826498031616,\ +0.9232815303839743137360,0.6709534404799342155457,0.6071323617361485958099,\ +0.4574467372149229049683,0.8206311021931469440460,0.0896153757348656654358,\ +0.3426358769647777080536,0.1674894802272319793701,0.9481152505613863468170,\ +0.9504805644974112510681,0.3436607695184648036957,0.2889420483261346817017,\ +0.5325344172306358814240,0.2558945687487721443176,0.8863505902700126171112,\ +0.0421485081315040588379,0.4876015805639326572418} + +#define ZSOURCEI {0.347978035919368267059,0.2037199228070676326752,0.5962978359311819076538,\ +0.8342303414829075336456,0.6809655660763382911682,0.9127784068696200847626,\ +0.5243799723684787750244,0.7204323844052851200104,0.3259664541110396385193,\ +0.1506391367875039577484,0.9124387521296739578247,0.6345743131823837757111,\ +0.9268973069265484809875,0.7633614349178969860077,0.5918717086315155029297,\ +0.9057438620366156101227,0.3263365356251597404480,0.3912780000828206539154,\ +0.4635267537087202072144,0.0849754814989864826202,0.5800507226958870887756,\ +0.7945564310066401958466,0.3823457323014736175537,0.3010852993465960025787,\ +0.5789428642019629478455,0.2627451247535645961761,0.5713048521429300308228,\ +0.1848654565401375293732,0.9971724869683384895325,0.4520535501651465892792,\ +0.0334019884467124938965,0.4553878181613981723785,0.7851976407691836357117,\ +0.4941168962977826595306,0.9304408635944128036499,0.7621670593507587909698,\ +0.9264887655153870582581,0.7199950958602130413055,0.3973621018230915069580,\ +0.8769331262446939945221,0.6766644334420561790466,0.8431562236510217189789,\ +0.7608711589127779006958,0.8287630719132721424103,0.0037989662960171699524,\ +0.9451942699961364269257,0.6311131268739700317383,0.0763222672976553440094,\ +0.4486519275233149528503,0.1080312891863286495209,0.8351444136351346969604,\ +0.3109649871475994586945,0.1235694894567131996155,0.0363539229147136211395,\ +0.6609512977302074432373,0.9844443709589540958405,0.0688076755031943321228,\ +0.5140342987142503261566,0.3807653579860925674438,0.1549817589111626148224,\ +0.6850274773314595222473,0.0382853033952414989471,0.5224257782101631164551,\ +0.7454454028047621250153,0.4607118470594286918640,0.4753002314828336238861,\ +0.8575385268777608871460,0.8073885519988834857941,0.7132545644417405128479,\ +0.0811268086545169353485,0.5751824118196964263916,0.884696914348751306534,\ +0.5624709790572524070740,0.7315255901776254177094,0.6099120099097490310669,\ +0.0705954921431839466095,0.8552806274965405464172,0.7045627343468368053436,\ +0.5928074717521667480469,0.8517647930420935153961,0.2603117255493998527527,\ +0.8596871509216725826263,0.3943212013691663742065,0.3333164160139858722687,\ +0.2511775353923439979553,0.5570420245639979839325,0.7276714108884334564209,\ +0.9383780122734606266022,0.1971746077761054039001,0.1607607132755219936371,\ +0.7815325502306222915649,0.1760376212187111377716,0.2801528992131352424622,\ +0.4699970218352973461151,0.3507726117968559265137,0.5713973813690245151520,\ +0.4563077641651034355164,0.9214398502372205257416,0.4339873101562261581421,\ +0.3514866163022816181183,0.1816438222303986549377,0.9070622171275317668915,\ +0.7665811367332935333252,0.9807842955924570560455,0.1198607003316283226013,\ +0.0508546582423150539398,0.2581452894955873489380,0.1401008707471191883087,\ +0.5514106499031186103821,0.7882929998449981212616,0.8028824776411056518555,\ +0.2425694861449301242828,0.7024780390784144401550,0.0922905071638524532318,\ +0.4318286012858152389526,0.0804965649731457233429,0.7126307198777794837952,\ +0.6893844078294932842255,0.2756213061511516571045,0.6968217701651155948639,\ +0.4598932703956961631775,0.6099067903123795986176,0.3065654132515192031860,\ +0.0749373403377830982208,0.9619921119883656501770,0.4158898773603141307831,\ +0.3287452235817909240723,0.7406168007291853427887,0.5725225014612078666687,\ +0.9504556744359433650970,0.1849336978048086166382,0.8698030491359531879425,\ +0.6907873982563614845276,0.9524399931542575359344,0.6490485109388828277588,\ +0.9960058168508112430573,0.2040582066401839256287,0.3800008497200906276703,\ +0.9729049820452928543091,0.9110585046000778675079,0.3810073928907513618469,\ +0.7869612383656203746796,0.5560158789157867431641,0.8529843934811651706696,\ +0.4350629774853587150574,0.5956362797878682613373,0.7071880977600812911987,\ +0.5747222309000790119171,0.4764349022880196571350,0.6098947445861995220184,\ +0.9666662178933620452881,0.3874611915089190006256,0.0715632727369666099548,\ +0.6122049516998231410980,0.9575729314237833023071,0.7723352131433784961700,\ +0.1287384750321507453918,0.3884150418452918529510,0.2353963479399681091309,\ +0.6542267077602446079254,0.3286431683227419853210,0.024017625954002141953,\ +0.1042741741985082626343,0.9314296473748981952667,0.8185661518946290016174,\ +0.8156488086096942424774,0.8688247688114643096924,0.3549220249988138675690,\ +0.3890381073579192161560,0.6415715864859521389008,0.4902750719338655471802,\ +0.3509976905770599842072,0.8516392158344388008118,0.1348936217837035655975,\ +0.1156354099512100219727,0.8810075619257986545563,0.8367286501452326774597,\ +0.5032693906687200069427,0.4486711751669645309448,0.9319602106697857379913,\ +0.7298459419980645179749,0.3388367067091166973114,0.4314213804900646209717,\ +0.7317318231798708438873,0.9655342241749167442322,0.2621376193128526210785,\ +0.2050140891224145889282,0.2826355365104973316193,0.3973353477194905281067,\ +0.7437736871652305126190,0.8185287192463874816895,0.3071001493372023105621,\ +0.9627068741247057914734,0.9475456266663968563080,0.6546552237123250961304,\ +0.1992082078941166400909,0.3616109425202012062073,0.9388273353688418865204,\ +0.0409001447260379791260,0.0758434669114649295807} + +#define ZRESULTR {-0.7576646139762764908809,-0.4912662732014974609207,-0.4935831983604013761813,\ +-0.1796001444111503253520,-0.2030603062114124668369,-0.0903746939402042676059,\ +-0.3380442117380291211504,-0.2488385719103628768156,-0.2453827611475934422636,\ +-0.0629419446509737884332,0.2743030686751847802007,-0.4189753318430110562431,\ +-0.0337034837449739430038,-0.2700068328094388236948,-0.5191589716059612502619,\ +-0.0763304013057857499991,-0.6929039668216129266298,-0.7614418400301237177530,\ +-0.7012514181881327468560,-0.4995602487864141960650,-0.3736855282655331400576,\ +-0.1670990767606896909570,-0.4148838171877601843640,-0.1470641870540525808497,\ +0.0881657571965975273010,-1.1827451998005302780115,0.1044920740886167709327,\ +-1.1145963776166571967963,0.0100332050022288142566,-0.0123498399546466911675,\ +-0.6728365416861274983518,-0.0874315516128119363248,0.1416698281269971604335,\ +-0.2712125731855208887744,-0.0063567040970050154788,0.1906009971260032298535,\ +0.0238331967155752874610,-0.0953429917974444041118,-0.0065067191893498198957,\ +0.0440644425532304637172,-0.3540655459766552382028,-0.1661126167793314234444,\ +0.0062509933701612868662,-0.1693877982336349785619,-0.0292579566847096204929,\ +0.0137816953226981269570,-0.0288761524361324552201,-0.0250652390791611112686,\ +-0.7581745137578204118967,-0.7505545612383084375097,-0.0046973071232757198853,\ +-0.3406170651999906873186,-2.0764518222153585114143,-0.8157393323281721952966,\ +-0.0852474852363154095292,0.0348077956215509243254,-0.8387202021909221372198,\ +-0.0663540586103768398329,-0.9554969196553003696337,-0.0212599130834864695483,\ +-0.0245601140031842454792,-1.6679899099681032570430,-0.4509584277017124609443,\ +0.1011698547763601602201,-0.2120439010955574854478,-0.1131958883879479044188,\ +0.0199327284817682297280,0.0781443465987670671247,-0.3004592565973881468366,\ +-0.1451799924584522560878,-0.5281452333714923286223,-0.0505933914241510074294,\ +-0.2819958038859460280889,-0.122323084811984963971,-0.2632782651610236501760,\ +-0.0540558326414990047981,0.2512879183645665981395,-0.1214932149359973512226,\ +0.0055773659320434761794,0.0673704632706614986448,-0.2906343733694730646633,\ +0.0851020319327377705587,0.0365640112295984101576,-1.0976622196833336619903,\ +-0.4020870876485082012763,-0.3719849821436939651953,-0.3158125612041708385469,\ +0.2324359424588408329360,-1.5742845766045041600023,-0.0033130260706617652329,\ +-0.1069329039454427060507,-0.1341564770393289252048,-0.0510429776001832605226,\ +-0.3847912680433241972011,-0.9153668051115183557087,-0.3798345871473772783489,\ +-0.6590618454479428844905,-0.0755413642077243097095,0.0808833545731707098669,\ +-0.417646722764209388234,-0.8522405945532404158982,0.1463133685463073596633,\ +-0.2416082657366604991012,0.0219217192558878656850,-0.8077093656959043466159,\ +-0.1128924015633438332484,-0.3996389102953575300781,-0.9892317511551623754329,\ +-0.5874413267393940873973,-0.1422192352759769073955,-0.1954743580270074387872,\ +-0.0763719684521397823573,0.1332266112260754309382,-2.2385346085566988350024,\ +-0.5112419918132667939759,-0.0541885453710462053345,0.1544990573544810508189,\ +0.1051325180789595692410,-0.9326914829433226028499,0.0764891336322670034598,\ +-0.4245421077023512346216,-0.4665013282915527192962,-0.3980722181205589849107,\ +-1.152706389176620049852,-0.0091123646200983177135,-0.8629224644504486230190,\ +-0.0671956049468366567456,-0.1483256896732535745631,-0.0470857769330114903084,\ +0.3049502630226416100001,-0.8351336293434713509143,0.1199665328310368234144,\ +0.100965515388687754328,0.1851149271955789266109,-0.4311455286578065315695,\ +0.1656739977240755667953,-0.6957805672270640506838,-0.7030137346248552798755,\ +0.2434410334133135511703,-0.0502776447144934607314,-0.6643994214275527054880,\ +-0.0494471424057717073852,-0.1105954430789197057150,0.2627700024490645658304,\ +-0.6613338575819812659162,-0.4943364682181946023753,-0.2273273919604619497381,\ +-0.0669964153308245241591,0.0270809622513717325465,-0.3423076587443550367063,\ +0.2375373770411028651051,-0.7058599113455784612725,-0.0187211007688289424178,\ +0.1570046667576522059218,0.0619494218295955287323,0.0912342621811634557627,\ +-1.0118000314587793919685,-0.9415613562651380386015,-1.04611739737066766764,\ +-0.1350076179226963601909,-1.045153664947628735504,-3.1153566294303054462489,\ +-0.0576346967934074291828,0.0825782285147220879162,0.0858710750707356584854,\ +-0.1147913938093602786994,0.0959901869720326261781,-0.8704897942843184965866,\ +-0.1312205414500346722928,-0.4084692473683823599195,-0.5825265796688483543875,\ +-0.2043543873503067542785,-0.1585071715930248537063,-0.4983971045262390875408,\ +-1.405591688480441803222,0.1581272765392360557524,-0.1721619754559372272862,\ +-0.0902428450071243726249,-0.1497365537505691013287,0.2065025609822116192671,\ +0.0613750886386554700413,-0.8564551079948240497330,-0.804653684520539647096,\ +0.1638887899169061412863,0.1619231669215081825808,-0.4135383706484943022730,\ +-0.6905772083929240245936,-0.1416337472709212619293,-0.8981660716461068449945,\ +-0.1997922350746098307805,-0.1797380100619248022298,-0.0033949848444226812805,\ +0.3022174959979692654422,0.0079098230306947625579,-0.3346557902575436060921,\ +-0.5646231542298842942529,-0.8141969637368523526888,0.2555170413707821830407,\ +-2.8347892907784113525338,-0.7063037006217763869032} + +#define ZRESULTI {0.8365523024247201178127,0.3394374381847692356828,1.355160662925530390410,\ +1.5134434006476746858993,0.9868300791435297147913,1.528673168936313331301,\ +0.8260899014265745687879,1.1783591647662248202977,0.4297253343366602140740,\ +0.1611216299891750081130,0.7663999599077054858398,1.3047144916618338417180,\ +1.2822880914611145541926,1.5649955384218765530591,1.4678689248356304730692,\ +1.3586758006659467312716,0.7108977814935093508808,0.9933651109027943348906,\ +1.2071246910756632253481,0.1405010934420483359464,1.0025763105214653414521,\ +1.21989563358396813086,0.6174353300937470701015,0.3562751652356153653223,\ +0.5587012199090121145062,1.0302380576516638743811,0.5405656721364887618009,\ +0.5986555168040823549092,1.4107360213988626718162,0.4753739371565622318094,\ +0.0655076733245526648952,0.5201329289544929235234,0.7497818580560413614933,\ +0.7050355621930805005704,1.2121540141336599738509,0.6814274485183255958276,\ +1.1306014284455374596661,0.9141116926495304051414,0.4114688990228685949724,\ +0.9956827833608694611200,1.3022000158632660582469,1.4761001233596913184698,\ +0.8573788009054216230354,1.379379585022410426021,0.0039117682490215858332,\ +1.2006025140002900553071,0.7070620318380608226860,0.0783395850399789817065,\ +1.2785255791075276210478,0.2308747034561683952880,0.9955835564035591112031,\ +0.4524376138027601523817,1.4009149235535949262754,0.0822834615192538504358,\ +0.8034667275967887212218,1.2557032585647818212493,0.1598599852603853899158,\ +0.5815258576469973794687,1.4290836436420499833133,0.1589807896730044689537,\ +0.7782863583371778526399,0.2043896563749957318024,0.9616073478994561218869,\ +0.7392289023091881405847,0.6059375681629087795343,0.5612744745893767372991,\ +0.9984170767670760282542,0.8430838000818645650014,1.29879528501095431459,\ +0.0939407915654127262384,1.3484611857054962236191,1.1960714214373144859138,\ +0.8415982269448546437829,0.9732366936364994502995,0.9167206383382787704406,\ +0.0745857498941502189416,0.7278097264573785141195,0.9199632393837048338625,\ +0.6304525502744320331061,0.9211062195464506663356,0.3555526540057888373880,\ +0.9100796877015666641597,0.3899732161636976779384,1.5260640477653748536824,\ +0.3849315818496458763143,0.9408368768631211187525,1.5061175798419510485360,\ +0.838676229611447277001,1.2591119550131308901797,0.1620018843959732390836,\ +1.0546671087981356329522,0.2026968016035011754816,0.299271305708051660321,\ +0.7622771187183752239491,1.067757629024185028754,0.9888735682758375000745,\ +1.0801593307389727449674,1.4588740911245949849473,0.4118082358815949306496,\ +0.5629599662610861310341,0.4399958138718327860239,0.9004381750108224613527,\ +1.3516535386697041687398,1.2852850170743990165789,0.2721670546404741375390,\ +0.0569631738604013462823,0.3951736758236387148102,0.3862903740059538404417,\ +1.4457867030840705346861,1.1403205655573340759901,1.3522555755333163229892,\ +0.264908300074692404369,0.6622029195378335009181,1.0464389789763977045567,\ +0.8038225849224520658254,0.0850815175089563863198,0.6568351393392068970911,\ +0.669491640154789569017,0.7760242270392859742500,0.7016907095208140265896,\ +0.7797846541592131641707,1.335473484345777617222,0.4740136251481967821775,\ +0.2395937042296285568455,1.3285359486862795552753,1.401425714315664317056,\ +0.3592738595863486095183,1.0333805631652628331807,0.6436572543635337151358,\ +0.7762911838119904706090,0.4403927201098556398762,0.8811512979588507210593,\ +0.674423430961778702653,0.9132365009577151360176,1.5238520140402758151765,\ +1.00458246450610100275,0.4215689680173497211335,0.874990498737184374534,\ +0.8674547514202983755638,1.2800682610709759323697,0.8336956783393613124034,\ +0.9734878037135866746254,0.6700663792657182149526,0.7153420705223627606983,\ +1.0026132338500262086711,1.3535381134312993722801,1.0923065980664201646277,\ +0.6618099327465949421878,0.4821732258146940175436,1.033019939116806895640,\ +0.8668307442664776596430,0.9024324853624734465996,0.0729804020494689703602,\ +0.5506621520352920073904,1.1198886719657494825952,0.7824098301910974440077,\ +0.3619529370272654977825,1.4800901440707066036850,0.7343084050589578914980,\ +0.8462379976616437593506,1.2071528313995831815930,0.5720924999360996743292,\ +0.1106864208392598775132,1.0305927183418297499173,0.8498909387724447039858,\ +1.15517062965696792887,0.9096742728488710350021,1.01141253782177353848,\ +0.4595989696224830889371,1.3064089912173471041967,1.071386424855859109684,\ +0.4451357270611538408112,1.5062412806888749727818,0.2239121309027737871666,\ +0.4910523338147070870896,0.8513221989625705532490,1.460513851259993778342,\ +0.5833202395880134893957,0.5481910770820362932554,0.8603624185522980027940,\ +0.7565250407629732221082,0.9237902776741101495972,1.3040155501467787235725,\ +0.6701717740731456540715,0.9634987985586029868301,0.4075854524817449364704,\ +0.4213313914917447000619,0.3316883655770838101873,1.3489670985956061510791,\ +1.1391029061589752480188,1.3689599297259111843061,0.3132420296422914196555,\ +0.7917886209906572769768,1.2228656637749606428400,1.1551462426298317875961,\ +0.3579601167993540777879,0.9549534865181378284760,0.8141418225805733266398,\ +0.7703675837106083168493,0.1543074266086776613616} + + + + +#define SOURCE2 {2.6395560009405016899109,4.1481037065386772155762,2.8064980218186974525452,\ +1.2800584640353918075562,7.7831285959109663963318,2.1190304495394229888916,\ +1.121354666538536548615,6.8568959552794694900513,1.5312166837975382804871,\ +6.970850601792335510254,8.4155184263363480567932,4.0620247554033994674683,\ +4.09482547547668218613,8.7841258011758327484131,1.1383596854284405708313,\ +1.9983377400785684585571,5.6186607433483004570007,5.8961773291230201721,\ +6.8539796629920601844788,8.9062247332185506820679,5.0422128057107329368591,\ +3.493615407496690750122,3.8737787725403904914856,9.2228986788541078567505,\ +9.4881842611357569694519,3.4353372454643249511719,3.7601187312975525856018,\ +7.3409405630081892013550,2.6157614728435873985291,4.99349383637309074402,\ +2.6385784195736050605774,5.25356308557093143463,5.3762298030778765678406,\ +1.1999255046248435974121,2.2563034901395440101624,6.2740930821746587753296,\ +7.6084325974807143211365,0.4855662025511264801025,6.7239497276023030281067,\ +2.017172696068882942200,3.911573919467628002167,8.3003165572881698608398,\ +5.8787201577797532081604,4.8291792999953031539917,2.2328650346025824546814,\ +8.4008856676518917083740,1.2059959070757031440735,2.8553641680628061294556,\ +8.6075146449729800224304,8.494101651012897491455,5.2570608118548989295959,\ +9.9312098976224660873413,6.4885628735646605491638,9.923190940171480178833,\ +0.5004197778180241584778,7.4855065811425447463989,4.1040589986369013786316,\ +6.0845263302326202392578,8.5442108893766999244690,0.6426467280834913253784,\ +8.279082938097417354584,9.2623437754809856414795,5.6672112690284848213196,\ +5.711638936772942543030,8.1601104838773608207703,0.5689279362559318542481,\ +5.5959366867318749427795,1.2493403162807226181030,7.279222286306321620941,\ +2.6777664758265018463135,5.4653349192813038825989,9.885407658293843269348,\ +7.3956565884873270988464,0.0371731072664260864258,5.9005728596821427345276,\ +3.096467358991503715515,2.5522057106718420982361,6.2518793903291225433350,\ +1.1574173765257000923157,6.1170040909200906753540,6.7839562846347689628601,\ +3.3200952783226966857910,0.2587099233642220497131,5.1744682248681783676147,\ +3.9168732380494475364685,2.4135384149849414825439,5.064434898085892200470,\ +4.2361020017415285110474,2.8937275288626551628113,0.8879321813583374023438,\ +6.2128817522898316383362,3.4549844544380903244019,7.0648676296696066856384,\ +5.2114724926650524139404,2.8704008506610989570618,6.502795079723000526428,\ +0.8813347620889544487000,4.498763345181941986084,7.2272530803456902503967,\ +8.9767962601035833358765,2.4278218811377882957458,4.3377211131155490875244,\ +9.6770532103255391120911,5.0685344357043504714966,5.2329764096066355705261,\ +5.5969475954771041870117,5.6173070007935166358948,4.68176002614200115204,\ +7.794546722434461116791,7.9010718129575252532959,9.8085420625284314155579,\ +8.1870661024004220962524,4.2568723810836672782898,2.4615605548024177551270,\ +9.2295324662700295448303,1.000745808705687522888,4.6782181179150938987732,\ +3.9504976756870746612549,0.3661171020939946174622,5.175368534401059150696,\ +8.3254515705630183219910,6.1048321425914764404297,1.8711117887869477272034,\ +0.1895748358219861984253,8.4335647663101553916931,0.7485948316752910614014,\ +8.5328151332214474678040,0.1245901081711053848267,1.8675393564626574516296,\ +4.920584075152873992920,7.4896081397309899330,9.414957007393240928650,\ +2.1240556007251143455505,5.7950199581682682037354,2.628147569485008716583,\ +4.3609866220504045486450,9.1105451015755534172058,8.0826673656702041625977,\ +8.1026530498638749122620,2.5904283951967954635620,4.1390872886404395103455,\ +3.599927779287099838257,6.91278793383389711380,7.6568587962538003921509,\ +3.572649653069674968720,7.6933998242020606994629,5.4776339093223214149475,\ +0.9622887428849935531616,9.5611717319115996360779,2.2074085660278797149658,\ +0.1432593585923314094544,8.1914897728711366653442,1.3049928424879908561707,\ +9.6820035576820373535156,6.5613814676180481910706,2.4455389659851789474487,\ +5.2831235667690634727478,8.4689256362617015838623,7.8766220854595303535461,\ +1.262082615867257118225,7.8838609857484698295593,3.4530424699187278747559,\ +2.6598573336377739906311,9.7098186518996953964233,8.8752476638182997703552,\ +2.066752854734659194946,8.5251609655097126960754,6.7446978110820055007935,\ +9.152874383144080638886,0.2848597615957260131836,2.367841475643217563629,\ +7.0153435599058866500854,1.2025266280397772789001,8.2874121330678462982178,\ +3.1610729591920971870422,5.30519076623022556305,5.715174819342792034149,\ +0.4780154302716255187988,8.2486197212710976600647,5.7988431211560964584351,\ +2.7918082987889647483826,9.5451109297573566436768,9.0711546363309025764465,\ +3.3601493109017610549927,1.1756130633875727653503,9.2537237703800201416016,\ +7.2636712575331330299377,9.0094979386776685714722,3.9489932497963309288025,\ +5.6551797501742839813232,7.0614896761253476142883,6.7878311965614557266235,\ +4.1329363686963915824890,1.402290873229503631592,4.9523561308160424232483,\ +4.1948772873729467391968,8.6262222891673445701599,2.8575096465647220611572,\ +2.5121363671496510505676,3.389101596549153327942} + + +#define RESULT2 {0.9706107215522056241852,1.4226512916310911638362,1.0319374505428213772973,\ +0.246905751916103338717,2.0519583905069445073366,0.7509586489514044060911,\ +0.1145374781176292794394,1.9252548546825831721208,0.4260626375542267973984,\ +1.9417372548863311987333,2.1300774331528766758481,1.4016815575274605976119,\ +1.4097240974656071177407,2.1729462062921069964716,0.1295883538042104654586,\ +0.6923157050192292327751,1.7260933336118711167728,1.7743042306089458204355,\ +1.9248294562744026059420,2.1867504404929474226549,1.6178450344817050243762,\ +1.2509371333857781660726,1.3542304576599399901227,2.2216893784894660157647,\ +2.2500472625069045662372,1.2341151000295289552611,1.3244505343759986892849,\ +1.993466976516135025221,0.9615552493321314342367,1.6081358323702796830901,\ +0.9702402946929443716684,1.658906529368289861637,1.6819873484154954645931,\ +0.1822594753876470019538,0.8137278503591067746470,1.8364289458354570161447,\ +2.0292571844941731384893,-0.7224396410182910566178,1.9056757389571916672,\ +0.7016968755690818904114,1.3639398299492546673406,2.1162936535075722588317,\ +1.7713390779775688432807,1.5746765360416834500512,0.8032855297427843321856,\ +2.1283371369164427733267,0.1873057044979935803486,1.0491993894614395355092,\ +2.1526356176491328042744,2.1393719992097341986437,1.659572089557145968541,\ +2.2956823132957397959331,1.870041069148148160650,2.294874536928924957380,\ +-0.6923079771535994852982,2.012968695092798743218,1.4119764836513208905444,\ +1.8057488812128539290569,2.1452539646586252786165,-0.4421601177273855043381,\ +2.1137322059948120411832,2.225957124135133913256,1.7346971570693363595694,\ +1.7425060116900870088585,2.0992577085752079923964,-0.5640015026903990591478,\ +1.7220407427170496550417,0.2226156650313379503636,1.9850240276979147502345,\ +0.9849830425057782834486,1.6984254041571493765161,2.2910596958626552321903,\ +2.0008928803872945145770,-3.2921697020833700086939,1.7750494410596528993551,\ +1.1302619000814182470549,0.9369579698639551867956,1.83288212099904845864,\ +0.146191123459191885114,1.8110724490390321950173,1.9145604545765595450035,\ +1.1999934808065779723307,-1.3520478319474638073672,1.6437365753918393718180,\ +1.3652936921609135634270,0.8810938927039604351421,1.62224256150308399071,\ +1.4436435071804869512135,1.0625454734184220928483,-0.1188599112506976002157,\ +1.8266248385955683453119,1.2398179577704631082469,1.9551342798915567477991,\ +1.6508624439841452780087,1.0544516892385875639349,1.8722320967378904832401,\ +-0.1263177455503078638888,1.5038025468266962292319,1.9778590304154859413899,\ +2.194643054750437638489,0.8869945101840888135314,1.4673491210608482493427,\ +2.2697574345222681913015,1.6230517098794554620156,1.6549802193742981781810,\ +1.7222213768989977911161,1.7258523677080592761968,1.5436741131934335058418,\ +2.0534243510350704831069,2.0669984227965598755361,2.2832536450533371663596,\ +2.1025556044304130054456,1.4485347077928583114925,0.9007955206863934582984,\ +2.2224083935232625819367,0.0007455307285780288533,1.5429172933929051758639,\ +1.3738415648213015973766,-1.0048020456777133624371,1.6439105509928255699492,\ +2.1193172771056971726011,1.8090806121136604467381,0.6265327936561931876369,\ +-1.6629714204274992361832,2.1322195493342954719651,-0.2895573875226954974060,\ +2.1439193343978621975054,-2.0827260644551484070064,0.62462171221383455677,\ +1.5934272379201788183423,2.0135164783675794097917,2.24229959570391956802,\ +0.7533272804029441660489,1.7569989208182723583462,0.9662792518179295075953,\ +1.4726983212224467045814,2.209432545000515446532,2.089721937569185339356,\ +2.09219154507008475719,0.951823265584673561257,1.4204753018509210793496,\ +1.2809137839516946399954,1.9333730200617991190626,2.0356018208291457582959,\ +1.273307520236932832702,2.0403627955950214278857,1.700673239349282273025,\ +-0.0384407248228896478159,2.257710285652239079468,0.7918192329452391486910,\ +-1.943098595033752262751,2.1030957827723826270017,0.2661975560760838632746,\ +2.2702688589706512267696,1.8812011703610473922765,0.8942655346201515698112,\ +1.6645175074163265360738,2.136403657202092354339,2.0638991426068855616904,\ +0.2327632262134610163784,2.0648177566830252516183,1.2392557177584351268962,\ +0.9782724873844932389488,2.273137605702431063293,2.183266240754464071472,\ +0.7259787064172199544387,2.1430219045760425800040,1.9087566867408878312773,\ +2.2140679701900434217521,-1.255758284393388990452,0.8619787703734573813819,\ +1.9480996873952269865526,0.1844248666526293323198,2.114737753111020968078,\ +1.1509115140149177580753,1.668685731123507043350,1.7431248863402162285752,\ +-0.7381122661087159420035,2.1100458798366994450646,1.7576584357875708608532,\ +1.0266895216506544131,2.2560290788762715763482,2.205099558817555038814,\ +1.2119854107561658373982,0.1617897676032789000544,2.2250260402856771868585,\ +1.9828853838780200469216,2.1982793473903963210603,1.373460672957984574083,\ +1.73257189512379894403,1.9546560315313432631967,1.9151314791431239825670,\ +1.4189881394992434060498,0.3381072372999247011016,1.5998634493586285643119,\ +1.4338640873752146465137,2.15480666756291494579,1.0499504925567986202140,\ +0.9211335334181942613441,1.2205648705022635880368} + + + +#define ZSOURCER {0.3140813848003745079041,0.5769402063451707363129,0.1306138429790735244751,\ +0.0478980806656181812286,0.4500174494460225105286,0.0384718659333884716034,\ +0.483350999653339385986,0.2981918179430067539215,0.7112689120694994926453,\ +0.9268360524438321590424,0.9477838929742574691772,0.1729496796615421772003,\ +0.2750928336754441261292,0.0044281478039920330048,0.0611358620226383209229,\ +0.1950612799264490604401,0.3789803450927138328552,0.2549188635312020778656,\ +0.1764185149222612380981,0.6008180272765457630157,0.3703392641618847846985,\ +0.2908470141701400279999,0.5384815335273742675781,0.8090293356217443943024,\ +0.9260985879227519035339,0.1576966657303273677826,0.9518593531101942062378,\ +0.2709982101805508136749,0.1609848598018288612366,0.8782086591236293315887,\ +0.5091647170484066009521,0.7951062084175646305084,0.8432204117998480796814,\ +0.5806765086017549037933,0.3487791065126657485962,0.9397577759809792041779,\ +0.4363934816792607307434,0.5549766751937568187714,0.9105900451540946960449,\ +0.5684339576400816440582,0.1862502051517367362976,0.0800832151435315608978,\ +0.6585252787917852401733,0.1606054832227528095245,0.9711584830656647682190,\ +0.3668168033473193645477,0.7386338301002979278564,0.9722552285529673099518,\ +0.1349937235936522483826,0.4595781317912042140961,0.5414639282971620559692,\ +0.6397600513882935047150,0.0211964594200253486633,0.4408156829886138439178,\ +0.6374878138303756713867,0.3208820023573935031891,0.4267518399283289909363,\ +0.7819778784178197383881,0.0543234180659055709839,0.9666189108975231647491,\ +0.6948409983888268470764,0.1846996019594371318817,0.3645029179751873016357,\ +0.8176643461920320987701,0.664914294146001338959,0.7559730983339250087738,\ +0.5525381658226251602173,0.7192269531078636646271,0.1989364298060536384583,\ +0.8610532465390861034393,0.1300329938530921936035,0.347959163133054971695,\ +0.5025534434244036674500,0.4978472082875669002533,0.4675923939794301986694,\ +0.9447452803142368793488,0.9599315756931900978088,0.5365384514443576335907,\ +0.8122785724699497222900,0.6470989421941339969635,0.7010180121287703514099,\ +0.6681951484642922878265,0.9593638796359300613403,0.0149199557490646839142,\ +0.6199735002592206001282,0.4061129498295485973358,0.0471306145191192626953,\ +0.8433605083264410495758,0.0635268418118357658386,0.9836421324871480464935,\ +0.4434677045792341232300,0.8565507535822689533234,0.9080012599006295204163,\ +0.4922491232864558696747,0.1930142603814601898193,0.3759337724186480045319,\ +0.2437626412138342857361,0.1035623974166810512543,0.9936000052839517593384,\ +0.5569599089212715625763,0.3858396532014012336731,0.7191527518443763256073,\ +0.1707325801253318786621,0.2878904812969267368317,0.4294657362625002861023,\ +0.8917979537509381771088,0.6188817229121923446655,0.3444608678109943866730,\ +0.0692929709330201148987,0.3619817639701068401337,0.1783103235065937042236,\ +0.8941529677249491214752,0.9010278200730681419373,0.0533773354254662990570,\ +0.4162023533135652542114,0.9438270372338593006134,0.9242387460544705390930,\ +0.8710649865679442882538,0.2808376699686050415039,0.8244629004038870334625,\ +0.4650857029482722282410,0.1462343498133122920990,0.5975636970251798629761,\ +0.3067605351097881793976,0.2377215037122368812561,0.0711208949796855449677,\ +0.8753139786422252655029,0.4413500339724123477936,0.7631150623783469200134,\ +0.9679268277250230312347,0.3924236092716455459595,0.717360940296202898026,\ +0.8640465112403035163879,0.7354763629846274852753,0.0304915383458137512207,\ +0.6331009590066969394684,0.4550241930410265922546,0.3173553734086453914642,\ +0.8250397499650716781616,0.2725940425880253314972,0.3458735281601548194885,\ +0.5352854127995669841766,0.7017193175852298736572,0.9817278520204126834869,\ +0.2777477568015456199646,0.1314821145497262477875,0.366813333705067634583,\ +0.7377605927176773548126,0.9103105561807751655579,0.3637479650788009166718,\ +0.8207867145538330078125,0.3059372254647314548492,0.9788405327126383781433,\ +0.9970494522713124752045,0.4636328797787427902222,0.7769650523550808429718,\ +0.3400075891986489295959,0.0353285889141261577606,0.2607673071324825286865,\ +0.5790986777283251285553,0.1250711670145392417908,0.0372988111339509487152,\ +0.9382179621607065200806,0.5585843441076576709747,0.7192503632977604866028,\ +0.3599752518348395824432,0.6758626028895378112793,0.2222136431373655796051,\ +0.7860159231349825859070,0.1736893891356885433197,0.2674629595130681991577,\ +0.7357366015203297138214,0.0550541067495942115784,0.5923380698077380657196,\ +0.2162457890808582305908,0.7718841419555246829987,0.0926524316892027854919,\ +0.7626169077120721340179,0.7347808051854372024536,0.8017499190755188465118,\ +0.7732572900131344795227,0.2559880572371184825897,0.1179054826498031616,\ +0.9232815303839743137360,0.6709534404799342155457,0.6071323617361485958099,\ +0.4574467372149229049683,0.8206311021931469440460,0.0896153757348656654358,\ +0.3426358769647777080536,0.1674894802272319793701,0.9481152505613863468170,\ +0.9504805644974112510681,0.3436607695184648036957,0.2889420483261346817017,\ +0.5325344172306358814240,0.2558945687487721443176,0.8863505902700126171112,\ +0.0421485081315040588379,0.4876015805639326572418} + +#define ZSOURCEI {0.347978035919368267059,0.2037199228070676326752,0.5962978359311819076538,\ +0.8342303414829075336456,0.6809655660763382911682,0.9127784068696200847626,\ +0.5243799723684787750244,0.7204323844052851200104,0.3259664541110396385193,\ +0.1506391367875039577484,0.9124387521296739578247,0.6345743131823837757111,\ +0.9268973069265484809875,0.7633614349178969860077,0.5918717086315155029297,\ +0.9057438620366156101227,0.3263365356251597404480,0.3912780000828206539154,\ +0.4635267537087202072144,0.0849754814989864826202,0.5800507226958870887756,\ +0.7945564310066401958466,0.3823457323014736175537,0.3010852993465960025787,\ +0.5789428642019629478455,0.2627451247535645961761,0.5713048521429300308228,\ +0.1848654565401375293732,0.9971724869683384895325,0.4520535501651465892792,\ +0.0334019884467124938965,0.4553878181613981723785,0.7851976407691836357117,\ +0.4941168962977826595306,0.9304408635944128036499,0.7621670593507587909698,\ +0.9264887655153870582581,0.7199950958602130413055,0.3973621018230915069580,\ +0.8769331262446939945221,0.6766644334420561790466,0.8431562236510217189789,\ +0.7608711589127779006958,0.8287630719132721424103,0.0037989662960171699524,\ +0.9451942699961364269257,0.6311131268739700317383,0.0763222672976553440094,\ +0.4486519275233149528503,0.1080312891863286495209,0.8351444136351346969604,\ +0.3109649871475994586945,0.1235694894567131996155,0.0363539229147136211395,\ +0.6609512977302074432373,0.9844443709589540958405,0.0688076755031943321228,\ +0.5140342987142503261566,0.3807653579860925674438,0.1549817589111626148224,\ +0.6850274773314595222473,0.0382853033952414989471,0.5224257782101631164551,\ +0.7454454028047621250153,0.4607118470594286918640,0.4753002314828336238861,\ +0.8575385268777608871460,0.8073885519988834857941,0.7132545644417405128479,\ +0.0811268086545169353485,0.5751824118196964263916,0.884696914348751306534,\ +0.5624709790572524070740,0.7315255901776254177094,0.6099120099097490310669,\ +0.0705954921431839466095,0.8552806274965405464172,0.7045627343468368053436,\ +0.5928074717521667480469,0.8517647930420935153961,0.2603117255493998527527,\ +0.8596871509216725826263,0.3943212013691663742065,0.3333164160139858722687,\ +0.2511775353923439979553,0.5570420245639979839325,0.7276714108884334564209,\ +0.9383780122734606266022,0.1971746077761054039001,0.1607607132755219936371,\ +0.7815325502306222915649,0.1760376212187111377716,0.2801528992131352424622,\ +0.4699970218352973461151,0.3507726117968559265137,0.5713973813690245151520,\ +0.4563077641651034355164,0.9214398502372205257416,0.4339873101562261581421,\ +0.3514866163022816181183,0.1816438222303986549377,0.9070622171275317668915,\ +0.7665811367332935333252,0.9807842955924570560455,0.1198607003316283226013,\ +0.0508546582423150539398,0.2581452894955873489380,0.1401008707471191883087,\ +0.5514106499031186103821,0.7882929998449981212616,0.8028824776411056518555,\ +0.2425694861449301242828,0.7024780390784144401550,0.0922905071638524532318,\ +0.4318286012858152389526,0.0804965649731457233429,0.7126307198777794837952,\ +0.6893844078294932842255,0.2756213061511516571045,0.6968217701651155948639,\ +0.4598932703956961631775,0.6099067903123795986176,0.3065654132515192031860,\ +0.0749373403377830982208,0.9619921119883656501770,0.4158898773603141307831,\ +0.3287452235817909240723,0.7406168007291853427887,0.5725225014612078666687,\ +0.9504556744359433650970,0.1849336978048086166382,0.8698030491359531879425,\ +0.6907873982563614845276,0.9524399931542575359344,0.6490485109388828277588,\ +0.9960058168508112430573,0.2040582066401839256287,0.3800008497200906276703,\ +0.9729049820452928543091,0.9110585046000778675079,0.3810073928907513618469,\ +0.7869612383656203746796,0.5560158789157867431641,0.8529843934811651706696,\ +0.4350629774853587150574,0.5956362797878682613373,0.7071880977600812911987,\ +0.5747222309000790119171,0.4764349022880196571350,0.6098947445861995220184,\ +0.9666662178933620452881,0.3874611915089190006256,0.0715632727369666099548,\ +0.6122049516998231410980,0.9575729314237833023071,0.7723352131433784961700,\ +0.1287384750321507453918,0.3884150418452918529510,0.2353963479399681091309,\ +0.6542267077602446079254,0.3286431683227419853210,0.024017625954002141953,\ +0.1042741741985082626343,0.9314296473748981952667,0.8185661518946290016174,\ +0.8156488086096942424774,0.8688247688114643096924,0.3549220249988138675690,\ +0.3890381073579192161560,0.6415715864859521389008,0.4902750719338655471802,\ +0.3509976905770599842072,0.8516392158344388008118,0.1348936217837035655975,\ +0.1156354099512100219727,0.8810075619257986545563,0.8367286501452326774597,\ +0.5032693906687200069427,0.4486711751669645309448,0.9319602106697857379913,\ +0.7298459419980645179749,0.3388367067091166973114,0.4314213804900646209717,\ +0.7317318231798708438873,0.9655342241749167442322,0.2621376193128526210785,\ +0.2050140891224145889282,0.2826355365104973316193,0.3973353477194905281067,\ +0.7437736871652305126190,0.8185287192463874816895,0.3071001493372023105621,\ +0.9627068741247057914734,0.9475456266663968563080,0.6546552237123250961304,\ +0.1992082078941166400909,0.3616109425202012062073,0.9388273353688418865204,\ +0.0409001447260379791260,0.0758434669114649295807} + +#define ZRESULTR {-0.7576646139762764908809,-0.4912662732014974609207,-0.4935831983604013761813,\ +-0.1796001444111503253520,-0.2030603062114124668369,-0.0903746939402042676059,\ +-0.3380442117380291211504,-0.2488385719103628768156,-0.2453827611475934422636,\ +-0.0629419446509737884332,0.2743030686751847802007,-0.4189753318430110562431,\ +-0.0337034837449739430038,-0.2700068328094388236948,-0.5191589716059612502619,\ +-0.0763304013057857499991,-0.6929039668216129266298,-0.7614418400301237177530,\ +-0.7012514181881327468560,-0.4995602487864141960650,-0.3736855282655331400576,\ +-0.1670990767606896909570,-0.4148838171877601843640,-0.1470641870540525808497,\ +0.0881657571965975273010,-1.1827451998005302780115,0.1044920740886167709327,\ +-1.1145963776166571967963,0.0100332050022288142566,-0.0123498399546466911675,\ +-0.6728365416861274983518,-0.0874315516128119363248,0.1416698281269971604335,\ +-0.2712125731855208887744,-0.0063567040970050154788,0.1906009971260032298535,\ +0.0238331967155752874610,-0.0953429917974444041118,-0.0065067191893498198957,\ +0.0440644425532304637172,-0.3540655459766552382028,-0.1661126167793314234444,\ +0.0062509933701612868662,-0.1693877982336349785619,-0.0292579566847096204929,\ +0.0137816953226981269570,-0.0288761524361324552201,-0.0250652390791611112686,\ +-0.7581745137578204118967,-0.7505545612383084375097,-0.0046973071232757198853,\ +-0.3406170651999906873186,-2.0764518222153585114143,-0.8157393323281721952966,\ +-0.0852474852363154095292,0.0348077956215509243254,-0.8387202021909221372198,\ +-0.0663540586103768398329,-0.9554969196553003696337,-0.0212599130834864695483,\ +-0.0245601140031842454792,-1.6679899099681032570430,-0.4509584277017124609443,\ +0.1011698547763601602201,-0.2120439010955574854478,-0.1131958883879479044188,\ +0.0199327284817682297280,0.0781443465987670671247,-0.3004592565973881468366,\ +-0.1451799924584522560878,-0.5281452333714923286223,-0.0505933914241510074294,\ +-0.2819958038859460280889,-0.122323084811984963971,-0.2632782651610236501760,\ +-0.0540558326414990047981,0.2512879183645665981395,-0.1214932149359973512226,\ +0.0055773659320434761794,0.0673704632706614986448,-0.2906343733694730646633,\ +0.0851020319327377705587,0.0365640112295984101576,-1.0976622196833336619903,\ +-0.4020870876485082012763,-0.3719849821436939651953,-0.3158125612041708385469,\ +0.2324359424588408329360,-1.5742845766045041600023,-0.0033130260706617652329,\ +-0.1069329039454427060507,-0.1341564770393289252048,-0.0510429776001832605226,\ +-0.3847912680433241972011,-0.9153668051115183557087,-0.3798345871473772783489,\ +-0.6590618454479428844905,-0.0755413642077243097095,0.0808833545731707098669,\ +-0.417646722764209388234,-0.8522405945532404158982,0.1463133685463073596633,\ +-0.2416082657366604991012,0.0219217192558878656850,-0.8077093656959043466159,\ +-0.1128924015633438332484,-0.3996389102953575300781,-0.9892317511551623754329,\ +-0.5874413267393940873973,-0.1422192352759769073955,-0.1954743580270074387872,\ +-0.0763719684521397823573,0.1332266112260754309382,-2.2385346085566988350024,\ +-0.5112419918132667939759,-0.0541885453710462053345,0.1544990573544810508189,\ +0.1051325180789595692410,-0.9326914829433226028499,0.0764891336322670034598,\ +-0.4245421077023512346216,-0.4665013282915527192962,-0.3980722181205589849107,\ +-1.152706389176620049852,-0.0091123646200983177135,-0.8629224644504486230190,\ +-0.0671956049468366567456,-0.1483256896732535745631,-0.0470857769330114903084,\ +0.3049502630226416100001,-0.8351336293434713509143,0.1199665328310368234144,\ +0.100965515388687754328,0.1851149271955789266109,-0.4311455286578065315695,\ +0.1656739977240755667953,-0.6957805672270640506838,-0.7030137346248552798755,\ +0.2434410334133135511703,-0.0502776447144934607314,-0.6643994214275527054880,\ +-0.0494471424057717073852,-0.1105954430789197057150,0.2627700024490645658304,\ +-0.6613338575819812659162,-0.4943364682181946023753,-0.2273273919604619497381,\ +-0.0669964153308245241591,0.0270809622513717325465,-0.3423076587443550367063,\ +0.2375373770411028651051,-0.7058599113455784612725,-0.0187211007688289424178,\ +0.1570046667576522059218,0.0619494218295955287323,0.0912342621811634557627,\ +-1.0118000314587793919685,-0.9415613562651380386015,-1.04611739737066766764,\ +-0.1350076179226963601909,-1.045153664947628735504,-3.1153566294303054462489,\ +-0.0576346967934074291828,0.0825782285147220879162,0.0858710750707356584854,\ +-0.1147913938093602786994,0.0959901869720326261781,-0.8704897942843184965866,\ +-0.1312205414500346722928,-0.4084692473683823599195,-0.5825265796688483543875,\ +-0.2043543873503067542785,-0.1585071715930248537063,-0.4983971045262390875408,\ +-1.405591688480441803222,0.1581272765392360557524,-0.1721619754559372272862,\ +-0.0902428450071243726249,-0.1497365537505691013287,0.2065025609822116192671,\ +0.0613750886386554700413,-0.8564551079948240497330,-0.804653684520539647096,\ +0.1638887899169061412863,0.1619231669215081825808,-0.4135383706484943022730,\ +-0.6905772083929240245936,-0.1416337472709212619293,-0.8981660716461068449945,\ +-0.1997922350746098307805,-0.1797380100619248022298,-0.0033949848444226812805,\ +0.3022174959979692654422,0.0079098230306947625579,-0.3346557902575436060921,\ +-0.5646231542298842942529,-0.8141969637368523526888,0.2555170413707821830407,\ +-2.8347892907784113525338,-0.7063037006217763869032} + +#define ZRESULTI {0.8365523024247201178127,0.3394374381847692356828,1.355160662925530390410,\ +1.5134434006476746858993,0.9868300791435297147913,1.528673168936313331301,\ +0.8260899014265745687879,1.1783591647662248202977,0.4297253343366602140740,\ +0.1611216299891750081130,0.7663999599077054858398,1.3047144916618338417180,\ +1.2822880914611145541926,1.5649955384218765530591,1.4678689248356304730692,\ +1.3586758006659467312716,0.7108977814935093508808,0.9933651109027943348906,\ +1.2071246910756632253481,0.1405010934420483359464,1.0025763105214653414521,\ +1.21989563358396813086,0.6174353300937470701015,0.3562751652356153653223,\ +0.5587012199090121145062,1.0302380576516638743811,0.5405656721364887618009,\ +0.5986555168040823549092,1.4107360213988626718162,0.4753739371565622318094,\ +0.0655076733245526648952,0.5201329289544929235234,0.7497818580560413614933,\ +0.7050355621930805005704,1.2121540141336599738509,0.6814274485183255958276,\ +1.1306014284455374596661,0.9141116926495304051414,0.4114688990228685949724,\ +0.9956827833608694611200,1.3022000158632660582469,1.4761001233596913184698,\ +0.8573788009054216230354,1.379379585022410426021,0.0039117682490215858332,\ +1.2006025140002900553071,0.7070620318380608226860,0.0783395850399789817065,\ +1.2785255791075276210478,0.2308747034561683952880,0.9955835564035591112031,\ +0.4524376138027601523817,1.4009149235535949262754,0.0822834615192538504358,\ +0.8034667275967887212218,1.2557032585647818212493,0.1598599852603853899158,\ +0.5815258576469973794687,1.4290836436420499833133,0.1589807896730044689537,\ +0.7782863583371778526399,0.2043896563749957318024,0.9616073478994561218869,\ +0.7392289023091881405847,0.6059375681629087795343,0.5612744745893767372991,\ +0.9984170767670760282542,0.8430838000818645650014,1.29879528501095431459,\ +0.0939407915654127262384,1.3484611857054962236191,1.1960714214373144859138,\ +0.8415982269448546437829,0.9732366936364994502995,0.9167206383382787704406,\ +0.0745857498941502189416,0.7278097264573785141195,0.9199632393837048338625,\ +0.6304525502744320331061,0.9211062195464506663356,0.3555526540057888373880,\ +0.9100796877015666641597,0.3899732161636976779384,1.5260640477653748536824,\ +0.3849315818496458763143,0.9408368768631211187525,1.5061175798419510485360,\ +0.838676229611447277001,1.2591119550131308901797,0.1620018843959732390836,\ +1.0546671087981356329522,0.2026968016035011754816,0.299271305708051660321,\ +0.7622771187183752239491,1.067757629024185028754,0.9888735682758375000745,\ +1.0801593307389727449674,1.4588740911245949849473,0.4118082358815949306496,\ +0.5629599662610861310341,0.4399958138718327860239,0.9004381750108224613527,\ +1.3516535386697041687398,1.2852850170743990165789,0.2721670546404741375390,\ +0.0569631738604013462823,0.3951736758236387148102,0.3862903740059538404417,\ +1.4457867030840705346861,1.1403205655573340759901,1.3522555755333163229892,\ +0.264908300074692404369,0.6622029195378335009181,1.0464389789763977045567,\ +0.8038225849224520658254,0.0850815175089563863198,0.6568351393392068970911,\ +0.669491640154789569017,0.7760242270392859742500,0.7016907095208140265896,\ +0.7797846541592131641707,1.335473484345777617222,0.4740136251481967821775,\ +0.2395937042296285568455,1.3285359486862795552753,1.401425714315664317056,\ +0.3592738595863486095183,1.0333805631652628331807,0.6436572543635337151358,\ +0.7762911838119904706090,0.4403927201098556398762,0.8811512979588507210593,\ +0.674423430961778702653,0.9132365009577151360176,1.5238520140402758151765,\ +1.00458246450610100275,0.4215689680173497211335,0.874990498737184374534,\ +0.8674547514202983755638,1.2800682610709759323697,0.8336956783393613124034,\ +0.9734878037135866746254,0.6700663792657182149526,0.7153420705223627606983,\ +1.0026132338500262086711,1.3535381134312993722801,1.0923065980664201646277,\ +0.6618099327465949421878,0.4821732258146940175436,1.033019939116806895640,\ +0.8668307442664776596430,0.9024324853624734465996,0.0729804020494689703602,\ +0.5506621520352920073904,1.1198886719657494825952,0.7824098301910974440077,\ +0.3619529370272654977825,1.4800901440707066036850,0.7343084050589578914980,\ +0.8462379976616437593506,1.2071528313995831815930,0.5720924999360996743292,\ +0.1106864208392598775132,1.0305927183418297499173,0.8498909387724447039858,\ +1.15517062965696792887,0.9096742728488710350021,1.01141253782177353848,\ +0.4595989696224830889371,1.3064089912173471041967,1.071386424855859109684,\ +0.4451357270611538408112,1.5062412806888749727818,0.2239121309027737871666,\ +0.4910523338147070870896,0.8513221989625705532490,1.460513851259993778342,\ +0.5833202395880134893957,0.5481910770820362932554,0.8603624185522980027940,\ +0.7565250407629732221082,0.9237902776741101495972,1.3040155501467787235725,\ +0.6701717740731456540715,0.9634987985586029868301,0.4075854524817449364704,\ +0.4213313914917447000619,0.3316883655770838101873,1.3489670985956061510791,\ +1.1391029061589752480188,1.3689599297259111843061,0.3132420296422914196555,\ +0.7917886209906572769768,1.2228656637749606428400,1.1551462426298317875961,\ +0.3579601167993540777879,0.9549534865181378284760,0.8141418225805733266398,\ +0.7703675837106083168493,0.1543074266086776613616} + + + +#define ZSOURCE2R {3.9219759730622172355652,4.6815521270036697387695,3.361602746881544589996,\ +5.3368766140192747116089,2.03906395938247442245,1.5899897180497646331787,\ +0.1818151073530316352844,4.0983706060796976089478,0.1058345986530184745789,\ +1.9653097167611122131348,2.7255953708663582801819,3.4376550372689962387085,\ +2.0337020372971892356873,3.0119446106255054473877,2.7625959040597081184387,\ +2.9445307422429323196411,5.7180739520117640495300,2.141770124435424804688,\ +6.8954616272822022438049,5.8555728476494550704956,4.2041230341419577598572,\ +4.2775720171630382537842,3.1845858739688992500305,5.7618944440037012100220,\ +4.2549022240564227104187,9.7619816288352012634277,2.518960000015795230866,\ +4.3911290075629949569702,0.7593036955222487449646,2.5593801774084568023682,\ +0.6706167431548237800598,7.6511315722018480300903,0.4173615900799632072449,\ +3.438271805644035339356,1.9701673323288559913635,2.1228986512869596481323,\ +3.1403985014185309410095,7.8216253779828548431396,0.5409323470667004585266,\ +9.1902069095522165298462,4.6035157097503542900085,2.9926850274205207824707,\ +0.0291663268581032752991,8.9934705849736928939819,8.3879271661862730979919,\ +4.3437494523823261260986,7.7678761305287480354309,1.3953176606446504592896,\ +1.1506372271105647087097,5.3554199635982513427734,4.3117330456152558326721,\ +6.145384786650538444519,9.2589621385559439659119,0.9938172809779644012451,\ +4.2805786477401852607727,9.431830951943993568420,0.3273952705785632133484,\ +9.2132670804858207702637,9.4490244099870324134827,9.007069906219840049744,\ +8.0943161016330122947693,0.2519542910158634185791,0.0196450622752308845520,\ +5.0752213317900896072388,4.0760429529473185539246,8.4080461412668228149414,\ +5.017265700735151767731,9.1287807654589414596558,4.4357294728979468345642,\ +5.9837839566171169281006,7.7418426470831036567688,7.9220082703977823257446,\ +5.5046048713847994804382,4.0850437059998512268066,7.2174380579963326454163,\ +4.768535858020186424255,6.3930579042062163352966,9.963865298777818679810,\ +1.5747882844880223274231,5.3506936598569154739380,2.1290646074339747428894,\ +5.59145063161849975586,4.304965981282293796539,0.2280548494309186935425,\ +5.7614597817882895469666,7.1491303853690624237061,9.3216359661892056465149,\ +1.2326993141323328018188,2.8655522270128130912781,0.1247995719313621520996,\ +5.7694048294797539710999,3.9386960770934820175171,6.8885837262496352195740,\ +9.7023218311369419097900,8.51576429326087236404,3.3933044690638780593872,\ +8.7725317804142832756042,1.1314024776220321655273,5.2641283208504319190979,\ +5.297394050285220146179,9.2917560925707221031189,9.7654302977025508880615,\ +6.2254639761522412300110,9.822583282366394996643,7.5429888023063540458679,\ +5.4547880962491035461426,7.2860160330310463905334,0.2525969501584768295288,\ +4.0251684701070189476013,0.9831319935619831085205,2.6086253346875309944153,\ +3.6363423336297273635864,1.7466178117319941520691,9.2341394722461700439453,\ +7.6051409030333161354065,5.6402041297405958175659,3.7970651825889945030212,\ +8.7762261740863323211670,8.21742579806596040726,6.787058124318718910217,\ +0.8220098121091723442078,2.5527314469218254089355,7.4444567272439599037170,\ +2.2695036139339208602905,6.836930788122117519379,9.3650726415216922760010,\ +5.0530174048617482185364,2.5248145777732133865356,6.8188397912308573722839,\ +2.8363681584596633911133,1.409485661424696445465,6.7591095995157957077026,\ +4.5126775791868567466736,7.5430292449891567230225,1.3702143030241131782532,\ +6.6082405392080545425415,3.8900542212650179862976,7.001820541918277740479,\ +9.168005720712244510651,2.1228999551385641098022,2.6978330826386809349060,\ +3.1998893804848194122314,0.2321802498772740364075,7.26544727571308612823,\ +1.5340585587546229362488,2.3552638292312622070312,0.8797382796183228492737,\ +7.1059537213295698165894,6.8887275597080588340759,6.5953194908797740936279,\ +1.8151161121204495429993,3.9049659762531518936157,1.5869047446176409721375,\ +6.2407150492072105407715,6.3760355720296502113342,4.2704886104911565780640,\ +1.0716815060004591941833,2.3822965659201145172119,9.4629473658278584480286,\ +4.5766852516680955886841,8.9644787041470408439636,4.4384705275297164916992,\ +8.08956819120794534683,6.8317985069006681442261,0.3401931514963507652283,\ +2.3805456422269344329834,9.4920115964487195014954,2.1827886346727609634399,\ +6.1546878470107913017273,8.3135433867573738098145,7.7340125897899270057678,\ +4.2441909667104482650757,7.262125960551202297211,7.0999773032963275909424,\ +4.7457459988072514533997,9.4386920798569917678833,1.4596485672518610954285,\ +0.7141010463237762451172,6.7337385797873139381409,6.536924717947840690613,\ +1.996896131895482540131,6.01412517949938774109,1.8993748771026730537415,\ +2.5839814636856317520142,0.9878737432882189750671,0.6199027225375175476074,\ +0.4034968325868248939514,7.4001471605151891708374,6.1626600986346602439880,\ +6.5835834480822086334229,2.5145971449092030525208,3.8433500844985246658325,\ +4.3964602379128336906433,6.5407369285821914672852,5.878106378950178623200,\ +6.0208318661898374557495,0.4535020282492041587830,2.0294443331658840179443,\ +7.844273825176060199738,2.6375361625105142593384} + + +#define ZSOURCE2I {4.3832763982936739921570,8.6648589745163917541504,3.7921421090140938758850,\ +7.6687160786241292953491,6.0066213225945830345154,7.85673560574650764465,\ +7.3871155502274632453918,5.5442603398114442825317,9.9291495559737086296082,\ +9.757428467273712158203,3.709622272290289402008,3.0322382133454084396362,\ +9.5195201179012656211853,7.1278580836951732635498,1.192370061762630939484,\ +5.0091631803661584854126,3.2900535268709063529968,4.8089468106627464294434,\ +3.3036959776654839515686,6.3044753577560186386108,2.1171907847747206687927,\ +4.4860231317579746246338,5.9145097108557820320129,6.8067426700145006179810,\ +0.7392961112782359123230,9.4336947053670883178711,1.2863306934013962745667,\ +2.0190807711333036422729,1.9693034281954169273376,8.9286901615560054779053,\ +4.6179189579561352729797,6.2512917164713144302368,7.0597065938636660575867,\ +7.0181696489453315734863,4.0879997471347451210022,0.6362213846296072006226,\ +0.6573933875188231468201,5.3310041315853595733643,0.3315818728879094123840,\ +3.157835649326443672180,3.785823243670165538788,4.6195234358310699462891,\ +6.2873698258772492408752,2.8785153012722730636597,3.2920487364754080772400,\ +4.7192330472171306610107,3.3537696348503232002258,5.5530697200447320938110,\ +1.196080814115703105927,7.6139996573328971862793,4.7909884760156273841858,\ +2.8169692959636449813843,2.380097783170640468597,3.2942054606974124908447,\ +2.3067280324175953865051,2.1362966019660234451294,4.0549980429932475090027,\ +3.0953712016344070434570,6.762971603311598300934,9.7069163154810667037964,\ +5.4417965700849890708923,0.2047479711472988128662,8.9413649635389447212219,\ +3.4903638903051614761353,1.1053651524707674980164,2.0233777537941932678223,\ +1.3046909729018807411194,8.573952978476881980896,6.3780163740739226341248,\ +4.0711227245628833770752,6.6919379355385899543762,2.042601602151989936829,\ +8.3104313490912318229675,0.1221632957458496093750,4.8844617092981934547424,\ +9.549877075478434562683,0.5874312063679099082947,8.2584649138152599334717,\ +2.9807415651157498359680,0.7757596764713525772095,5.8460923237726092338562,\ +7.528713606297969818115,0.5172297963872551918030,5.9586250688880681991577,\ +3.8337053125724196434021,4.9002202786505222320557,5.2727950783446431159973,\ +0.6889454741030931472778,8.843077751807868480682,7.1912937611341476440430,\ +0.6942595774307847023010,1.1522095929831266403198,4.862680672667920589447,\ +7.6715826056897640228271,0.8805298106744885444641,7.0085612777620553970337,\ +1.879138792864978313446,2.0178856328129768371582,4.0628212550655007362366,\ +4.0966569539159536361694,1.769564501009881496429,3.31293122842907905579,\ +0.5184767069295048713684,4.1492417920380830764771,7.2212355909869074821472,\ +0.7746253907680511474609,5.8558783913031220436096,3.7079446297138929367065,\ +2.1161167463287711143494,1.903268527239561080933,5.607953821308910846710,\ +9.4247916433960199356079,6.8177247745916247367859,2.7342410013079643249512,\ +2.0717754075303673744202,1.9379387702792882919312,6.797837591730058193207,\ +5.88365742936730384827,9.331753817386925220490,5.509122880175709724426,\ +8.0405469564720988273621,1.074489727616310119629,7.4039250845089554786682,\ +5.6103316973894834518433,7.6611549546942114830017,7.8306589089334011077881,\ +1.4388314681127667427063,1.6471924725919961929321,3.1774142337962985038757,\ +5.0265956297516822814941,6.9204960623756051064,7.0065794046968221664429,\ +8.8706119870766997337341,6.9797694869339466094971,6.7989911558106541633606,\ +3.6159398127347230911255,2.6739976881071925163269,0.7736870646476745605469,\ +1.494100340642035007477,3.2018390577286481857300,2.0260545751079916954041,\ +4.4988587312400341033936,7.7075743721798062324524,2.4352242145687341690063,\ +2.1261148853227496147156,1.0992341861128807067871,6.9814807781949639320374,\ +4.1509064938873052597046,5.0298188393935561180115,7.51160675659775733948,\ +9.9401472182944416999817,1.82876241393387317657,3.021917375735938549042,\ +3.7854864448308944702148,7.1531985932961106300354,9.5241537224501371383667,\ +4.7039186349138617515564,1.8709417246282100677490,2.55718790460377931595,\ +4.4350660685449838638306,7.2340781940147280693054,8.7619100883603096008301,\ +0.3733208635821938514710,4.2934664245694875717163,3.1572330510243773460388,\ +3.682477343827486038208,1.4587742509320378303528,6.7683792579919099807739,\ +5.2619793592020869255066,4.003625661134719848633,0.0291080260649323463440,\ +3.0681814532727003097534,7.9026939114555716514587,9.5779503695666790008545,\ +6.6892711864784359931946,2.9296159837394952774048,8.2238993747159838676453,\ +0.1798455044627189636231,8.7107013771310448646545,3.1810243334621191024780,\ +5.7244732743129134178162,5.7386581040918827056885,3.4920182498171925544739,\ +7.06729766912758350372,3.5992007283493876457214,4.0523112565279006958008,\ +6.1408105725422501564026,6.5240467619150876998901,0.2951709320768713951111,\ +5.6688958965241909027100,7.1140170888975262641907,4.5884906593710184097290,\ +4.7205173922702670097351,0.6237313523888587951660,0.8544011274352669715881,\ +0.1345641072839498519898,3.5430019116029143333435,6.7193946428596973419189,\ +1.3606189610436558723450,2.1197437215596437454224} + + +#define ZRESULT2R {1.7718546901199148102535,2.2873385372432406548171,1.6228701567171754938101,\ +2.2346263074245684698838,1.8473969837167181218263,2.0814403666906242662549,\ +2.000040135761198101250,1.930738025076279118508,2.2955316341715112926636,\ +2.2979125914561788768253,1.52676863913911398107,1.5225454413433419098567,\ +2.2756589535249842626285,2.0461560089912054216654,1.10158579014350732628,\ +1.7596676151017560663092,1.886619744318301705732,1.6609534913253483079387,\ +2.0341867590624715944614,2.1522631887405574424577,1.5490800609419352884544,\ +1.8243154431583954444562,1.9046961835587756795007,2.1880745312667504443027,\ +1.462943224821960486182,2.6082576924848916988253,1.0397086540972344526068,\ +1.5754847768676314423431,0.746979645400304148595,2.2287521705924668857790,\ +1.5403790183895167409389,2.29053332003721576982,1.9561479629741382879615,\ +2.056062919004959077540,1.5124829204355532130677,0.7957872878063905197621,\ +1.1657936572577645151227,2.247663310479210085902,-0.4549625893688244437918,\ +2.273939094117130466088,1.7851157264602297569667,1.705510493291471751931,\ +1.838553591041654167171,2.2452631537104275061267,2.1984262619387999748710,\ +1.858482175867823826820,2.1354614286115483068329,1.7449625890299069741474,\ +0.5066316450005309279803,2.2309587833094872699746,1.8633839241242127204856,\ +1.9110608576794807511590,2.2575857867741544460216,1.23571911173189863398,\ +1.581562045830424700910,2.2691047577207688057399,1.4031989962500943658341,\ +2.2741179432518765501925,2.4527182982567738989133,2.5833963585371355620168,\ +2.2776279862384747332271,-1.1249835300913728630690,2.1906906716320380112961,\ +1.8180097251363194210683,1.440608273684235829393,2.157337396250079031290,\ +1.6456014738468727198750,2.5276363856092047832647,2.0501201476301127435420,\ +1.9792596577711849548109,2.325636279713856779949,2.1018269082301319627959,\ +2.2993946557097193483798,1.407779382548410174181,2.1650335217497893580685,\ +2.3678319878208848869861,1.8594164774388513006187,2.56043452139564964298,\ +1.2152594801616827258073,1.6876273083151080989239,1.8280452566376663714465,\ +2.2383606348726785562064,1.4669353168458199032642,1.7855716392006990567154,\ +1.9344712649878033072781,2.1595582205209731263551,2.3711393709457433409682,\ +0.3451198452895575252697,2.2295598849908442318224,1.9730216569827605521681,\ +1.7597572254564382010500,1.4119056335367026200345,2.1320313551579719302254,\ +2.5151804905590435801344,2.1472364706413502588589,2.052431577045615185284,\ +2.1940570121896025845842,0.8387289948467516742525,1.8945610375322186058611,\ +1.901605848224737327357,2.2469410116186243620007,2.3333167208432867845147,\ +1.8321040495156570848678,2.3667788410376999763685,2.345870799293293007537,\ +1.7064766326923879180555,2.2351179984798275057756,1.3127927306468758494873,\ +1.5145818637157286712380,0.7618288453812751548355,1.8221250086585414340590,\ +2.3127298919002594601579,1.9513099157402993277799,2.2649290827240116108499,\ +2.0646178740610454660498,1.7857162805439725783430,2.0523808897592226152540,\ +2.357637781206334715023,2.5204455223537904906550,2.1680868421848340510394,\ +2.08969579055791898625,1.0187212773133276222381,2.351321025745570558740,\ +1.8003855797977157404688,2.3290564194645368978343,2.5020530275623595883872,\ +1.6589662323678027178175,1.1034736729371952268508,2.0179385634489594991692,\ +1.7529535621370035958222,1.9548092141654069830992,2.2757671672542376661852,\ +2.2978225629400212959297,2.329897705001075625120,1.9366802551403343723990,\ +2.0192737614105338295190,1.5519072144028889237433,1.9522381258437428996899,\ +2.228825942499146339770,1.3459088341323246496017,1.2160693133443531976923,\ +1.708519320712721833999,2.042657041378174831436,2.0363649964518035773153,\ +0.9638512795498686003270,0.9551846741593900125267,1.951137961258366582129,\ +2.107724763084950492242,2.1435395035941335883933,2.30219731892690226971,\ +2.3129821080069814520641,1.4613961122338947618005,1.2276638750511146280786,\ +1.98774702803650615834,2.2599263943254159769936,2.3454288218721179859472,\ +1.5736974684351636710744,1.1082826047896976451312,2.2826248447267389884985,\ +1.852079302129498561413,2.4440219801181322090144,2.2846216839061130876587,\ +2.0916390604994830049179,2.0880185293365247645170,1.1554676622252344486697,\ +1.4781743340729813773748,2.2621227047071905680298,1.9617338719614783038026,\ +2.0915485321054503309313,2.222172100020261886755,2.0456349034700243016971,\ +1.6557620395745074048932,2.3732960033711649749932,2.4784302018604411621538,\ +2.1043456955600268187823,2.2908052004546388680239,2.1225525715426596384816,\ +-0.3059820602804464440006,2.398801697565509982724,1.9837316998415748248163,\ +1.8021669050328577021958,2.1177911026101683411582,1.3800624471185749531088,\ +2.0182134290564768264176,1.3170274339145702224840,1.4108532825842892144408,\ +1.817110834423457665920,2.2890298175330245911141,1.8196542505912531861867,\ +2.1619335403208914669904,2.0209326327770549269758,1.7893311710629888899859,\ +1.8641960608110765829082,1.882576152038281991352,1.7816883851861540222217,\ +1.7954751269073565556056,1.2730999018963571334240,1.9486466131391497746961,\ +2.074605067637334876451,1.2189909546635331327735} + + +#define ZRESULT2I {0.8408843669071919268987,1.0754371807248737091811,0.8455094310786673839075,\ +0.962808271271232585242,1.2435335418309885202603,1.371120256581034091425,\ +1.5461888319559713433904,0.9342369007616236897817,1.56013775123029430070,\ +1.3720388608498168547811,0.9371355532144381994542,0.7228179279461685036168,\ +1.360325287393417292847,1.1709945644102059958414,0.4074578726347549695319,\ +1.0393742565506918218432,0.5221182542768327827787,1.1517977305599864656926,\ +0.4467977216337457035955,0.8222975857540034683169,0.4665224019878621564139,\ +0.8091797065019556978172,1.0768746352304479074746,0.8683388375483406251831,\ +0.1720341159830799382391,0.7682977019562435838651,0.4721387487057847609506,\ +0.4309811115589534114001,1.20279143843462255070,1.2916347740244560338141,\ +1.4265839008392693365579,0.6850460436644268957807,1.5117462274209296779759,\ +1.1152532149987959275705,1.1217014706271768442747,0.2911766403909815670303,\ +0.2063546073155473614680,0.5982511040925977408023,0.5499105526382754849379,\ +0.3309697617869979402450,0.6882370204600587459964,0.9959451809388051302108,\ +1.5661574844082004620560,0.3097639368523368297304,0.3740022155825183380884,\ +0.8268049495959598482742,0.407572856709710940049,1.3246230944084764757918,\ +0.8047604843662868878695,0.9578156211088914018248,0.8379992820836518196970,\ +0.4298072736875270249968,0.2516111351341220880862,1.2777930133692467773443,\ +0.4942674920588698839197,0.2227403824735175175142,1.4902323819071812138759,\ +0.3241206854947055737704,0.6212066791677098853697,0.8227777158663325263177,\ +0.5918914368525474145599,0.6824004867135488039409,1.5685992315253338702519,\ +0.602441091725517741118,0.2648167750385964080984,0.2361574036342227733698,\ +0.2544057494452062195833,0.7540670573431564882583,0.9631160038064509043565,\ +0.5974222702744066415548,0.7127866343417466055143,0.2523427003112133637508,\ +0.9857721947818851582213,0.0298961055939373325507,0.5949566736712420533806,\ +1.1076852186579833059454,0.0916284996635063769821,0.6920814866116709040966,\ +1.0847494758718594365376,0.1439797822740493671301,1.2215400197911927548944,\ +0.9319943094964961982640,0.1195740768674621451462,1.5325419323859537090726,\ +0.5871287736405550461427,0.6008795873685909283424,0.5147800680430554276512,\ +0.5096442477271476700906,1.2574287319730830247977,1.55344381002968989769,\ +0.1197588579388608048815,0.2845949117488152935174,0.6146775806026560928785,\ +0.6690416852557365956,0.1030338183393550155476,1.1198962694059428901738,\ +0.2110181909408466172096,1.0597850788835401214527,0.6573038229366630069706,\ +0.6582686240328038396186,0.1881909924839933190288,0.3270668956957688000564,\ +0.0830914673081940696742,0.3996821407672082604456,0.763608851537480148863,\ +0.1410651270101331844487,0.677001919140020169685,1.5027782434779339837405,\ +0.4840122714003086690227,1.0939971143713191903402,1.1354027775868176242113,\ +1.2025671422981056846169,1.3200023979900399329068,0.2878762084297626921980,\ +0.2659639364881328793544,0.3309563133803885004447,1.0613976119428301103653,\ +0.5905886949329369750572,0.84881047253311037171,0.6818405058224251691357,\ +1.4689172047242584628890,0.3984077871527766379067,0.7826684691736193189016,\ +1.1863976071520063726439,0.8421875864316380466690,0.6964016273061860440308,\ +0.2774051332309265816001,0.5780614975169666713839,0.4360596809152573194446,\ +1.0570616474517706695480,1.3698760574306645398934,0.8033735187122362786383,\ +1.100195299896877587642,0.7466330742895204153342,1.3719281224888897341430,\ +0.5006805450256617273652,0.6022149721715611692119,0.1100515320096066840261,\ +0.1615487638997855912582,0.9853189831543425203364,0.6441365190650450989196,\ +0.9525486295501676137221,1.540681786544560338825,0.3234105928346787672822,\ +0.9457654725170446807780,0.4366658824494836776964,1.4454467286135332937391,\ +0.5286797419321711544171,0.6306769685466229180548,0.8502600566998695930110,\ +1.3901817278534140953639,0.4379816003966337523146,1.0872460520812594619855,\ +0.5452429334871597976786,0.8427783441184910628863,1.1492861648773524674283,\ +1.346792368827264718689,0.665745289338786183642,0.2639277343938546960267,\ +0.7696845111061191291313,0.6789773815510785626159,1.1019111077295657974418,\ +0.0461157104075398602272,0.5610787453255564605215,1.4634600366382779501606,\ +0.9969191986962234741654,0.1524913254966685227654,1.2588290814744897971877,\ +0.7073635046287626293449,0.4488022872724745648831,0.0037636205385015429094,\ +0.6259389684526723840463,0.8276134607557569244918,0.9328971084913546540918,\ +0.9537519653655091023126,0.3009556732582234217510,1.3951370123387065724785,\ +0.2467179687642131191705,0.9127106501576134345299,0.4528896475979662383793,\ +1.2351598243895067774645,0.7619639996129009551495,1.0726338584530288322583,\ +1.220269965181696392165,1.3029226301867964377124,1.4189980227900089726489,\ +1.5051832236136615250643,0.7225617055791342391302,0.0478600995604049964105,\ +0.710883123025403795836,1.2310328539390928970221,0.8735414139313334436210,\ +0.8209275679220129351421,0.0950735258592600440686,0.1443422571457730618771,\ +0.0223460331642115414552,1.443489200421151252840,1.2774801572114198311425,\ +0.1717450012966928174496,0.6769828145758884918593} + + + + + /* in is between 0 and 1 + in2 between 0 and 10 */ + + + +void dlog1psTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + double in2[]=SOURCE2; + double res2[]=RESULT2; + int i; + + for (i=0;i<200;i++) { + in[i]=in[i]-1; + in2[i]=in2[i]-1; + } + + for (i=0;i<200;i++){ + out=dlog1ps(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } + + + for (i=0;i<200;i++){ + out=dlog1ps(in2[i]); + assert(( (fabs(out-res2[i]))/(fabs(out)) )<3e-16); + } + +} + + +void zlog1psTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + double in2R[]=ZSOURCE2R; + double in2I[]=ZSOURCE2I; + double res2R[]=ZRESULT2R; + double res2I[]=ZRESULT2I; + doubleComplex in,in2,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i]-1,inI[i]); + out=zlog1ps(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } + + for (i=0;i<200;i++){ + in2=DoubleComplex(in2R[i]-1,in2I[i]); + out=zlog1ps(in2); + assert(( (fabs(zreals(out)-res2R[i]))/(fabs(zreals(out))) )<3e-16); + assert(( (fabs(zimags(out)-res2I[i]))/(fabs(zimags(out))) )<1e-16); + } + +} + +void dlog1paTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + double in2[]=SOURCE2; + double res2[]=RESULT2; + int i; + + for (i=0;i<200;i++) { + in[i]=in[i]-1; + in2[i]=in2[i]-1; + } + + dlog1pa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } + + dlog1pa(in2,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res2[i]))/(fabs(out[i])) )<3e-16); + } +} + +void zlog1paTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + double in2R[]=ZSOURCE2R; + double in2I[]=ZSOURCE2I; + double res2R[]=ZRESULT2R; + double res2I[]=ZRESULT2I; + doubleComplex *in,*in2,out[200]; + int i; + + + for (i=0;i<200;i++) { + inR[i]=inR[i]-1; + in2R[i]=in2R[i]-1; + } + + in=DoubleComplexMatrix(inR,inI,200); + zlog1pa(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } + + in2=DoubleComplexMatrix(in2R,in2I,200); + zlog1pa(in2,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-res2R[i]))/(fabs(zreals(out[i]))) )<3e-16); + assert(( (fabs(zimags(out[i])-res2I[i]))/(fabs(zimags(out[i]))) )<1e-16); + } + +} + + + + + +int testLog1p(void) { + printf("\n>>>> Double Logarithm x + 1 Tests\n"); + dlog1psTest(); + zlog1psTest(); + dlog1paTest(); + zlog1paTest(); + + return 0; +} + +int main(void) { + assert(testLog1p() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/testFloatLog1p.c b/2.3-1/src/c/elementaryFunctions/log1p/testFloatLog1p.c new file mode 100644 index 00000000..5704838c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/testFloatLog1p.c @@ -0,0 +1,966 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testLog1p.h" +#include "math.h" + +#define SOURCE {0.3628176329657435417175f,0.924179898109287023544f,0.5243524145334959030151f,\ +0.7886543427594006061554f,0.6525151440873742103577f,0.2477638195268809795380f,\ +0.2364655844867229461670f,0.7240293831564486026764f,0.8278210600838065147400f,\ +0.4287728047929704189301f,0.4858888480812311172485f,0.5923984018154442310333f,\ +0.0949383648112416267395f,0.1356843891553580760956f,0.9917455688118934631348f,\ +0.7212927364744246006012f,0.0115638775750994682312f,0.0211908905766904354095f,\ +0.1524727698415517807007f,0.9165380974300205707550f,0.4467271203175187110901f,\ +0.5868234331719577312469f,0.1882771886885166168213f,0.4196520284749567508698f,\ +0.2730510598048567771912f,0.7565603456459939479828f,0.9378882069140672683716f,\ +0.0586007428355515003204f,0.5101847248151898384094f,0.5031699347309768199921f,\ +0.7783576548099517822266f,0.6856653341092169284821f,0.1381576983258128166199f,\ +0.371037633623927831650f,0.6366564910858869552612f,0.4961673622019588947296f,\ +0.2994064847007393836975f,0.2392275254242122173309f,0.5618183575570583343506f,\ +0.3218038142658770084381f,0.1082227518782019615173f,0.1685282415710389614105f,\ +0.8263800088316202163696f,0.4923414406366646289825f,0.7863734485581517219543f,\ +0.6762332352809607982635f,0.0258686169981956481934f,0.3594204657711088657379f,\ +0.3436427963897585868835f,0.2824054299853742122650f,0.1450859513133764266968f,\ +0.0762176741845905780792f,0.5220461571589112281799f,0.6713762427680194377899f,\ +0.0599394328892230987549f,0.7267188713885843753815f,0.2224657749757170677185f,\ +0.3122289828024804592133f,0.4435700643807649612427f,0.3983507198281586170197f,\ +0.1324583934620022773743f,0.8820166247896850109100f,0.5455272346735000610352f,\ +0.2917219498194754123688f,0.7739847479388117790222f,0.3354639573954045772552f,\ +0.8127403985708951950073f,0.4612239454872906208038f,0.6898109326139092445374f,\ +0.9649041066877543926239f,0.8210376314818859100342f,0.2802407057024538516998f,\ +0.9873316427692770957947f,0.294199434574693441391f,0.4859610591083765029907f,\ +0.2247181800194084644318f,0.9585652919486165046692f,0.1503968122415244579315f,\ +0.0216291621327400207520f,0.0688429796136915683746f,0.9950710041448473930359f,\ +0.7568672685883939266205f,0.6163959559053182601929f,0.0865804632194340229034f,\ +0.5165374809876084327698f,0.1916800136677920818329f,0.2940570451319217681885f,\ +0.3528221980668604373932f,0.1317937439307570457458f,0.0549608371220529079437f,\ +0.929352553561329841614f,0.737892795819789171219f,0.7509917514398694038391f,\ +0.6889848816208541393280f,0.8865169286727905273438f,0.6891661235131323337555f,\ +0.8677108911797404289246f,0.7947537912987172603607f,0.2496256213635206222534f,\ +0.3935408894903957843781f,0.7297343472018837928772f,0.7888072351925075054169f,\ +0.113488640636205673218f,0.4145256043411791324615f,0.6172473421320319175720f,\ +0.7440188056789338588715f,0.9038409832864999771118f,0.3976829168386757373810f,\ +0.9472072543576359748840f,0.2581262919120490550995f,0.1955799385905265808105f,\ +0.9381833248771727085114f,0.4226356102153658866882f,0.0937463282607495784760f,\ +0.9977992679923772811890f,0.2042182614095509052277f,0.9455819511786103248596f,\ +0.9336234177462756633759f,0.9743702597916126251221f,0.4100225553847849369049f,\ +0.5125095760449767112732f,0.0948633304797112941742f,0.5688196588307619094849f,\ +0.7322562676854431629181f,0.8108531581237912178040f,0.5459008770994842052460f,\ +0.5022544711828231811523f,0.7634959020651876926422f,0.7354982374235987663269f,\ +0.0699520572088658809662f,0.6130836438387632369995f,0.0965849910862743854523f,\ +0.5439325878396630287170f,0.9187005828134715557098f,0.5072866193950176239014f,\ +0.1335940570570528507233f,0.8688194593414664268494f,0.7999687767587602138519f,\ +0.9879787657409906387329f,0.7131399479694664478302f,0.3067426951602101325989f,\ +0.5431228461675345897675f,0.7330236807465553283691f,0.6498145484365522861481f,\ +0.8018737239763140678406f,0.2859625308774411678314f,0.1894423719495534896851f,\ +0.7794728656299412250519f,0.5433104271069169044495f,0.5268451268784701824188f,\ +0.1533693112432956695557f,0.6041304902173578739166f,0.5948378806933760643005f,\ +0.8857938847504556179047f,0.0043053645640611648560f,0.1302204323001205921173f,\ +0.9758609728887677192688f,0.9183407831005752086639f,0.0624175965785980224609f,\ +0.9939593323506414890289f,0.4122588960453867912292f,0.8258536770008504390717f,\ +0.0376359503716230392456f,0.4675730471499264240265f,0.4759115139022469520569f,\ +0.4060978214256465435028f,0.0392968021333217620850f,0.4401316107250750064850f,\ +0.3316476037725806236267f,0.0877817696891725063324f,0.1150833908468484878540f,\ +0.9667435702867805957794f,0.8103649737313389778137f,0.3928376468829810619354f,\ +0.7880131229758262634277f,0.4798596971668303012848f,0.0270724548026919364929f,\ +0.6701857983134686946869f,0.5602217521518468856812f,0.2564360727556049823761f,\ +0.2626037681475281715393f,0.4447338129393756389618f,0.8522944338619709014893f,\ +0.2347065494395792484283f,0.3277532672509551048279f,0.2253599218092858791351f,\ +0.3468936551362276077271f,0.7743145865388214588165f,0.1285835551097989082336f,\ +0.1156307714991271495819f,0.2054340392351150512695f,0.4535544612444937229156f,\ +0.6516549764201045036316f,0.0710035725496709346771f,0.1265540253371000289917f,\ +0.4974718545563519001007f,0.0879269847646355628967f,0.1462626229040324687958f,\ +0.715134423226118087769f,0.9305738122202455997467f} + +#define RESULT {-1.0138549594808059506335f,-0.0788485313675790222554f,-0.6455912738997077182646f,\ +-0.2374271494900490608870f,-0.4269209307253117313685f,-1.3952793271990111545477f,\ +-1.4419526017799386696794f,-0.3229233029497151630238f,-0.1889582589621221220266f,\ +-0.8468280928949678543205f,-0.7217753888910144466351f,-0.5235758944053595653756f,\ +-2.354527389398466841186f,-1.9974237581445692946147f,-0.0082886876471943305572f,\ +-0.3267102095711482134810f,-4.459869041610169837497f,-3.8541838794260296907623f,\ +-1.8807692572941765440930f,-0.0871516441756800402940f,-0.8058073398690168698266f,\ +-0.5330312996797691438289f,-1.6698399941066854879068f,-0.8683294147345963498452f,\ +-1.2980964690333058886296f,-0.2789729794097077220094f,-0.0641245194730828693697f,\ +-2.8370079061049158219987f,-0.6729824133243695882811f,-0.6868273235307851276588f,\ +-0.2505691498856313370602f,-0.3773656214470872405364f,-1.9793595047655996310709f,\ +-0.9914517831797942104544f,-0.4515250293249062352174f,-0.7008419853775434971155f,\ +-1.205953148244055972427f,-1.4303401906823356437570f,-0.5765766885249945516989f,\ +-1.1338131915858427056776f,-2.2235636585360341044293f,-1.7806519374711546888079f,\ +-0.1907005521377241608061f,-0.7085828181522180191365f,-0.240323473997209546837f,\ +-0.3912172398408133022762f,-3.6547247438886865111840f,-1.0232623619826317629133f,\ +-1.0681525436893481995071f,-1.264411545554370741584f,-1.93042894450046809141f,\ +-2.5741618985048786427683f,-0.6499992713325659643431f,-0.3984255796794416437656f,\ +-2.8144206784459675496635f,-0.3192155730871417684824f,-1.502982009541258934249f,\ +-1.1640184411209602011184f,-0.8128995091446955534309f,-0.9204224561330225373723f,\ +-2.0214866944753584476757f,-0.1255443741850884864508f,-0.6060025488810325544620f,\ +-1.231954157015291428934f,-0.2562031110919770759971f,-1.092240757863258915350f,\ +-0.2073435333764902521736f,-0.7738715719712579987899f,-0.3713377296431035756719f,\ +-0.0357265538888332026546f,-0.1971863344268207918208f,-1.2721063818886333418590f,\ +-0.0127492850765575892191f,-1.223497392724554932997f,-0.7216267835832522736794f,\ +-1.4929081951001816896962f,-0.0423175999341945593968f,-1.8944780628936490618486f,\ +-3.8337127761178795282149f,-2.6759270254015836698613f,-0.0049411834200203501311f,\ +-0.2785673796390666367984f,-0.483865736386189515539f,-2.446681086792801718133f,\ +-0.6606074257995434573232f,-1.651927892749795789840f,-1.2239814994040887352611f,\ +-1.0417910371382139711471f,-2.026517124423018234580f,-2.9011343997056400212387f,\ +-0.0732671142462539837226f,-0.3039567280501898061118f,-0.2863606107139139989037f,\ +-0.3725359507043504159185f,-0.1204550575726043570857f,-0.3722729288835950889336f,\ +-0.1418966944811957953121f,-0.2297229087732643171282f,-1.3877929980613914473508f,\ +-0.9325703042223095762253f,-0.3150747190128889152483f,-0.2372333033314831252092f,\ +-2.1760525295696577785520f,-0.8806205346832632896437f,-0.4824854567490562962107f,\ +-0.2956889680183093505050f,-0.1011018375069230867958f,-0.9221002825850308504130f,\ +-0.0542373561426655603768f,-1.3543063102932182406590f,-1.6317860900845253535607f,\ +-0.0638099067725128449302f,-0.8612449127611128130155f,-2.3671627801172654415041f,\ +-0.0022031571770593774348f,-1.5885659482121525787335f,-0.0559547196755256631695f,\ +-0.0686821150485829451382f,-0.0259639040526286474231f,-0.8915431076633286711086f,\ +-0.6684358831783273613425f,-2.3553180497276513527538f,-0.5641918391516044239964f,\ +-0.3116247338224413798713f,-0.2096683039932461523058f,-0.6053178634921361211951f,\ +-0.6886483730214458809371f,-0.2698475216395072595610f,-0.3072071353764207479742f,\ +-2.659945168598087494871f,-0.4892539023727084379622f,-2.3373319216128076725170f,\ +-0.6089299592172232600262f,-0.0847950173155939540548f,-0.6786791108759814283857f,\ +-2.0129495019748864237386f,-0.1406199321004115432299f,-0.2231825811274127380202f,\ +-0.0120940736302183569906f,-0.3380775973662459854552f,-1.181746009333312530387f,\ +-0.6104197485997391314783f,-0.3105772710053884000381f,-0.4310682668987352861301f,\ +-0.2208041349135003439397f,-1.25189448766300226445f,-1.6636704065163092636226f,\ +-0.2491374010581904052675f,-0.6100744334370675758805f,-0.6408486505219985751580f,\ +-1.8749064671471911136535f,-0.5039650609751163967687f,-0.5194663799859419173188f,\ +-0.1212709911627764675091f,-5.4478934608177302933996f,-2.038526631411456513376f,\ +-0.0244351485261014196582f,-0.0851867338269072515988f,-2.7739080469083896574034f,\ +-0.0060589862906551463645f,-0.8861037385262900967220f,-0.1913376676415258770270f,\ +-3.2797955584796012473703f,-0.7601996918711692030612f,-0.7425233371947113081291f,\ +-0.9011612089296217043000f,-3.2366121340710831688625f,-0.8206814815116268979622f,\ +-1.1036823082060371881141f,-2.4329014344197728014763f,-2.1620982756055884266289f,\ +-0.0338219993709664781822f,-0.2102705479450195091840f,-0.9343588647242980771424f,\ +-0.2382405357403041268327f,-0.7342615153765646995865f,-3.609238495954611991579f,\ +-0.4002002941250653034189f,-0.5794225876492602456125f,-1.36087587445700952671f,\ +-1.337108967835097139698f,-0.8102793489627861944768f,-0.1598232322015146200656f,\ +-1.449419270934711789778f,-1.1154941876589379301521f,-1.4900565023732303959747f,\ +-1.05873701535465292167f,-0.2557770454111949476328f,-2.0511763516400991491651f,\ +-2.1573531687271665369110f,-1.5826302735280548539265f,-0.7906399256902217898002f,\ +-0.4282400343889684046772f,-2.6450250856057104797969f,-2.0670859842226763092299f,\ +-0.6982162977399214431884f,-2.4312485274946018520836f,-1.9223514861397812403254f,\ +-0.3352847494467096622905f,-0.0719538807151878373469f} + + +#define SOURCE2 {2.6395560009405016899109f,4.1481037065386772155762f,2.8064980218186974525452f,\ +1.2800584640353918075562f,7.7831285959109663963318f,2.1190304495394229888916f,\ +1.121354666538536548615f,6.8568959552794694900513f,1.5312166837975382804871f,\ +6.970850601792335510254f,8.4155184263363480567932f,4.0620247554033994674683f,\ +4.09482547547668218613f,8.7841258011758327484131f,1.1383596854284405708313f,\ +1.9983377400785684585571f,5.6186607433483004570007f,5.8961773291230201721f,\ +6.8539796629920601844788f,8.9062247332185506820679f,5.0422128057107329368591f,\ +3.493615407496690750122f,3.8737787725403904914856f,9.2228986788541078567505f,\ +9.4881842611357569694519f,3.4353372454643249511719f,3.7601187312975525856018f,\ +7.3409405630081892013550f,2.6157614728435873985291f,4.99349383637309074402f,\ +2.6385784195736050605774f,5.25356308557093143463f,5.3762298030778765678406f,\ +1.1999255046248435974121f,2.2563034901395440101624f,6.2740930821746587753296f,\ +7.6084325974807143211365f,0.4855662025511264801025f,6.7239497276023030281067f,\ +2.017172696068882942200f,3.911573919467628002167f,8.3003165572881698608398f,\ +5.8787201577797532081604f,4.8291792999953031539917f,2.2328650346025824546814f,\ +8.4008856676518917083740f,1.2059959070757031440735f,2.8553641680628061294556f,\ +8.6075146449729800224304f,8.494101651012897491455f,5.2570608118548989295959f,\ +9.9312098976224660873413f,6.4885628735646605491638f,9.923190940171480178833f,\ +0.5004197778180241584778f,7.4855065811425447463989f,4.1040589986369013786316f,\ +6.0845263302326202392578f,8.5442108893766999244690f,0.6426467280834913253784f,\ +8.279082938097417354584f,9.2623437754809856414795f,5.6672112690284848213196f,\ +5.711638936772942543030f,8.1601104838773608207703f,0.5689279362559318542481f,\ +5.5959366867318749427795f,1.2493403162807226181030f,7.279222286306321620941f,\ +2.6777664758265018463135f,5.4653349192813038825989f,9.885407658293843269348f,\ +7.3956565884873270988464f,0.0371731072664260864258f,5.9005728596821427345276f,\ +3.096467358991503715515f,2.5522057106718420982361f,6.2518793903291225433350f,\ +1.1574173765257000923157f,6.1170040909200906753540f,6.7839562846347689628601f,\ +3.3200952783226966857910f,0.2587099233642220497131f,5.1744682248681783676147f,\ +3.9168732380494475364685f,2.4135384149849414825439f,5.064434898085892200470f,\ +4.2361020017415285110474f,2.8937275288626551628113f,0.8879321813583374023438f,\ +6.2128817522898316383362f,3.4549844544380903244019f,7.0648676296696066856384f,\ +5.2114724926650524139404f,2.8704008506610989570618f,6.502795079723000526428f,\ +0.8813347620889544487000f,4.498763345181941986084f,7.2272530803456902503967f,\ +8.9767962601035833358765f,2.4278218811377882957458f,4.3377211131155490875244f,\ +9.6770532103255391120911f,5.0685344357043504714966f,5.2329764096066355705261f,\ +5.5969475954771041870117f,5.6173070007935166358948f,4.68176002614200115204f,\ +7.794546722434461116791f,7.9010718129575252532959f,9.8085420625284314155579f,\ +8.1870661024004220962524f,4.2568723810836672782898f,2.4615605548024177551270f,\ +9.2295324662700295448303f,1.000745808705687522888f,4.6782181179150938987732f,\ +3.9504976756870746612549f,0.3661171020939946174622f,5.175368534401059150696f,\ +8.3254515705630183219910f,6.1048321425914764404297f,1.8711117887869477272034f,\ +0.1895748358219861984253f,8.4335647663101553916931f,0.7485948316752910614014f,\ +8.5328151332214474678040f,0.1245901081711053848267f,1.8675393564626574516296f,\ +4.920584075152873992920f,7.4896081397309899330f,9.414957007393240928650f,\ +2.1240556007251143455505f,5.7950199581682682037354f,2.628147569485008716583f,\ +4.3609866220504045486450f,9.1105451015755534172058f,8.0826673656702041625977f,\ +8.1026530498638749122620f,2.5904283951967954635620f,4.1390872886404395103455f,\ +3.599927779287099838257f,6.91278793383389711380f,7.6568587962538003921509f,\ +3.572649653069674968720f,7.6933998242020606994629f,5.4776339093223214149475f,\ +0.9622887428849935531616f,9.5611717319115996360779f,2.2074085660278797149658f,\ +0.1432593585923314094544f,8.1914897728711366653442f,1.3049928424879908561707f,\ +9.6820035576820373535156f,6.5613814676180481910706f,2.4455389659851789474487f,\ +5.2831235667690634727478f,8.4689256362617015838623f,7.8766220854595303535461f,\ +1.262082615867257118225f,7.8838609857484698295593f,3.4530424699187278747559f,\ +2.6598573336377739906311f,9.7098186518996953964233f,8.8752476638182997703552f,\ +2.066752854734659194946f,8.5251609655097126960754f,6.7446978110820055007935f,\ +9.152874383144080638886f,0.2848597615957260131836f,2.367841475643217563629f,\ +7.0153435599058866500854f,1.2025266280397772789001f,8.2874121330678462982178f,\ +3.1610729591920971870422f,5.30519076623022556305f,5.715174819342792034149f,\ +0.4780154302716255187988f,8.2486197212710976600647f,5.7988431211560964584351f,\ +2.7918082987889647483826f,9.5451109297573566436768f,9.0711546363309025764465f,\ +3.3601493109017610549927f,1.1756130633875727653503f,9.2537237703800201416016f,\ +7.2636712575331330299377f,9.0094979386776685714722f,3.9489932497963309288025f,\ +5.6551797501742839813232f,7.0614896761253476142883f,6.7878311965614557266235f,\ +4.1329363686963915824890f,1.402290873229503631592f,4.9523561308160424232483f,\ +4.1948772873729467391968f,8.6262222891673445701599f,2.8575096465647220611572f,\ +2.5121363671496510505676f,3.389101596549153327942f} + + +#define RESULT2 {0.9706107215522056241852f,1.4226512916310911638362f,1.0319374505428213772973f,\ +0.246905751916103338717f,2.0519583905069445073366f,0.7509586489514044060911f,\ +0.1145374781176292794394f,1.9252548546825831721208f,0.4260626375542267973984f,\ +1.9417372548863311987333f,2.1300774331528766758481f,1.4016815575274605976119f,\ +1.4097240974656071177407f,2.1729462062921069964716f,0.1295883538042104654586f,\ +0.6923157050192292327751f,1.7260933336118711167728f,1.7743042306089458204355f,\ +1.9248294562744026059420f,2.1867504404929474226549f,1.6178450344817050243762f,\ +1.2509371333857781660726f,1.3542304576599399901227f,2.2216893784894660157647f,\ +2.2500472625069045662372f,1.2341151000295289552611f,1.3244505343759986892849f,\ +1.993466976516135025221f,0.9615552493321314342367f,1.6081358323702796830901f,\ +0.9702402946929443716684f,1.658906529368289861637f,1.6819873484154954645931f,\ +0.1822594753876470019538f,0.8137278503591067746470f,1.8364289458354570161447f,\ +2.0292571844941731384893f,-0.7224396410182910566178f,1.9056757389571916672f,\ +0.7016968755690818904114f,1.3639398299492546673406f,2.1162936535075722588317f,\ +1.7713390779775688432807f,1.5746765360416834500512f,0.8032855297427843321856f,\ +2.1283371369164427733267f,0.1873057044979935803486f,1.0491993894614395355092f,\ +2.1526356176491328042744f,2.1393719992097341986437f,1.659572089557145968541f,\ +2.2956823132957397959331f,1.870041069148148160650f,2.294874536928924957380f,\ +-0.6923079771535994852982f,2.012968695092798743218f,1.4119764836513208905444f,\ +1.8057488812128539290569f,2.1452539646586252786165f,-0.4421601177273855043381f,\ +2.1137322059948120411832f,2.225957124135133913256f,1.7346971570693363595694f,\ +1.7425060116900870088585f,2.0992577085752079923964f,-0.5640015026903990591478f,\ +1.7220407427170496550417f,0.2226156650313379503636f,1.9850240276979147502345f,\ +0.9849830425057782834486f,1.6984254041571493765161f,2.2910596958626552321903f,\ +2.0008928803872945145770f,-3.2921697020833700086939f,1.7750494410596528993551f,\ +1.1302619000814182470549f,0.9369579698639551867956f,1.83288212099904845864f,\ +0.146191123459191885114f,1.8110724490390321950173f,1.9145604545765595450035f,\ +1.1999934808065779723307f,-1.3520478319474638073672f,1.6437365753918393718180f,\ +1.3652936921609135634270f,0.8810938927039604351421f,1.62224256150308399071f,\ +1.4436435071804869512135f,1.0625454734184220928483f,-0.1188599112506976002157f,\ +1.8266248385955683453119f,1.2398179577704631082469f,1.9551342798915567477991f,\ +1.6508624439841452780087f,1.0544516892385875639349f,1.8722320967378904832401f,\ +-0.1263177455503078638888f,1.5038025468266962292319f,1.9778590304154859413899f,\ +2.194643054750437638489f,0.8869945101840888135314f,1.4673491210608482493427f,\ +2.2697574345222681913015f,1.6230517098794554620156f,1.6549802193742981781810f,\ +1.7222213768989977911161f,1.7258523677080592761968f,1.5436741131934335058418f,\ +2.0534243510350704831069f,2.0669984227965598755361f,2.2832536450533371663596f,\ +2.1025556044304130054456f,1.4485347077928583114925f,0.9007955206863934582984f,\ +2.2224083935232625819367f,0.0007455307285780288533f,1.5429172933929051758639f,\ +1.3738415648213015973766f,-1.0048020456777133624371f,1.6439105509928255699492f,\ +2.1193172771056971726011f,1.8090806121136604467381f,0.6265327936561931876369f,\ +-1.6629714204274992361832f,2.1322195493342954719651f,-0.2895573875226954974060f,\ +2.1439193343978621975054f,-2.0827260644551484070064f,0.62462171221383455677f,\ +1.5934272379201788183423f,2.0135164783675794097917f,2.24229959570391956802f,\ +0.7533272804029441660489f,1.7569989208182723583462f,0.9662792518179295075953f,\ +1.4726983212224467045814f,2.209432545000515446532f,2.089721937569185339356f,\ +2.09219154507008475719f,0.951823265584673561257f,1.4204753018509210793496f,\ +1.2809137839516946399954f,1.9333730200617991190626f,2.0356018208291457582959f,\ +1.273307520236932832702f,2.0403627955950214278857f,1.700673239349282273025f,\ +-0.0384407248228896478159f,2.257710285652239079468f,0.7918192329452391486910f,\ +-1.943098595033752262751f,2.1030957827723826270017f,0.2661975560760838632746f,\ +2.2702688589706512267696f,1.8812011703610473922765f,0.8942655346201515698112f,\ +1.6645175074163265360738f,2.136403657202092354339f,2.0638991426068855616904f,\ +0.2327632262134610163784f,2.0648177566830252516183f,1.2392557177584351268962f,\ +0.9782724873844932389488f,2.273137605702431063293f,2.183266240754464071472f,\ +0.7259787064172199544387f,2.1430219045760425800040f,1.9087566867408878312773f,\ +2.2140679701900434217521f,-1.255758284393388990452f,0.8619787703734573813819f,\ +1.9480996873952269865526f,0.1844248666526293323198f,2.114737753111020968078f,\ +1.1509115140149177580753f,1.668685731123507043350f,1.7431248863402162285752f,\ +-0.7381122661087159420035f,2.1100458798366994450646f,1.7576584357875708608532f,\ +1.0266895216506544131f,2.2560290788762715763482f,2.205099558817555038814f,\ +1.2119854107561658373982f,0.1617897676032789000544f,2.2250260402856771868585f,\ +1.9828853838780200469216f,2.1982793473903963210603f,1.373460672957984574083f,\ +1.73257189512379894403f,1.9546560315313432631967f,1.9151314791431239825670f,\ +1.4189881394992434060498f,0.3381072372999247011016f,1.5998634493586285643119f,\ +1.4338640873752146465137f,2.15480666756291494579f,1.0499504925567986202140f,\ +0.9211335334181942613441f,1.2205648705022635880368f} + + + + + + + + +#define CSOURCER {0.3140813848003745079041f,0.5769402063451707363129f,0.1306138429790735244751f,\ +0.0478980806656181812286f,0.4500174494460225105286f,0.0384718659333884716034f,\ +0.483350999653339385986f,0.2981918179430067539215f,0.7112689120694994926453f,\ +0.9268360524438321590424f,0.9477838929742574691772f,0.1729496796615421772003f,\ +0.2750928336754441261292f,0.0044281478039920330048f,0.0611358620226383209229f,\ +0.1950612799264490604401f,0.3789803450927138328552f,0.2549188635312020778656f,\ +0.1764185149222612380981f,0.6008180272765457630157f,0.3703392641618847846985f,\ +0.2908470141701400279999f,0.5384815335273742675781f,0.8090293356217443943024f,\ +0.9260985879227519035339f,0.1576966657303273677826f,0.9518593531101942062378f,\ +0.2709982101805508136749f,0.1609848598018288612366f,0.8782086591236293315887f,\ +0.5091647170484066009521f,0.7951062084175646305084f,0.8432204117998480796814f,\ +0.5806765086017549037933f,0.3487791065126657485962f,0.9397577759809792041779f,\ +0.4363934816792607307434f,0.5549766751937568187714f,0.9105900451540946960449f,\ +0.5684339576400816440582f,0.1862502051517367362976f,0.0800832151435315608978f,\ +0.6585252787917852401733f,0.1606054832227528095245f,0.9711584830656647682190f,\ +0.3668168033473193645477f,0.7386338301002979278564f,0.9722552285529673099518f,\ +0.1349937235936522483826f,0.4595781317912042140961f,0.5414639282971620559692f,\ +0.6397600513882935047150f,0.0211964594200253486633f,0.4408156829886138439178f,\ +0.6374878138303756713867f,0.3208820023573935031891f,0.4267518399283289909363f,\ +0.7819778784178197383881f,0.0543234180659055709839f,0.9666189108975231647491f,\ +0.6948409983888268470764f,0.1846996019594371318817f,0.3645029179751873016357f,\ +0.8176643461920320987701f,0.664914294146001338959f,0.7559730983339250087738f,\ +0.5525381658226251602173f,0.7192269531078636646271f,0.1989364298060536384583f,\ +0.8610532465390861034393f,0.1300329938530921936035f,0.347959163133054971695f,\ +0.5025534434244036674500f,0.4978472082875669002533f,0.4675923939794301986694f,\ +0.9447452803142368793488f,0.9599315756931900978088f,0.5365384514443576335907f,\ +0.8122785724699497222900f,0.6470989421941339969635f,0.7010180121287703514099f,\ +0.6681951484642922878265f,0.9593638796359300613403f,0.0149199557490646839142f,\ +0.6199735002592206001282f,0.4061129498295485973358f,0.0471306145191192626953f,\ +0.8433605083264410495758f,0.0635268418118357658386f,0.9836421324871480464935f,\ +0.4434677045792341232300f,0.8565507535822689533234f,0.9080012599006295204163f,\ +0.4922491232864558696747f,0.1930142603814601898193f,0.3759337724186480045319f,\ +0.2437626412138342857361f,0.1035623974166810512543f,0.9936000052839517593384f,\ +0.5569599089212715625763f,0.3858396532014012336731f,0.7191527518443763256073f,\ +0.1707325801253318786621f,0.2878904812969267368317f,0.4294657362625002861023f,\ +0.8917979537509381771088f,0.6188817229121923446655f,0.3444608678109943866730f,\ +0.0692929709330201148987f,0.3619817639701068401337f,0.1783103235065937042236f,\ +0.8941529677249491214752f,0.9010278200730681419373f,0.0533773354254662990570f,\ +0.4162023533135652542114f,0.9438270372338593006134f,0.9242387460544705390930f,\ +0.8710649865679442882538f,0.2808376699686050415039f,0.8244629004038870334625f,\ +0.4650857029482722282410f,0.1462343498133122920990f,0.5975636970251798629761f,\ +0.3067605351097881793976f,0.2377215037122368812561f,0.0711208949796855449677f,\ +0.8753139786422252655029f,0.4413500339724123477936f,0.7631150623783469200134f,\ +0.9679268277250230312347f,0.3924236092716455459595f,0.717360940296202898026f,\ +0.8640465112403035163879f,0.7354763629846274852753f,0.0304915383458137512207f,\ +0.6331009590066969394684f,0.4550241930410265922546f,0.3173553734086453914642f,\ +0.8250397499650716781616f,0.2725940425880253314972f,0.3458735281601548194885f,\ +0.5352854127995669841766f,0.7017193175852298736572f,0.9817278520204126834869f,\ +0.2777477568015456199646f,0.1314821145497262477875f,0.366813333705067634583f,\ +0.7377605927176773548126f,0.9103105561807751655579f,0.3637479650788009166718f,\ +0.8207867145538330078125f,0.3059372254647314548492f,0.9788405327126383781433f,\ +0.9970494522713124752045f,0.4636328797787427902222f,0.7769650523550808429718f,\ +0.3400075891986489295959f,0.0353285889141261577606f,0.2607673071324825286865f,\ +0.5790986777283251285553f,0.1250711670145392417908f,0.0372988111339509487152f,\ +0.9382179621607065200806f,0.5585843441076576709747f,0.7192503632977604866028f,\ +0.3599752518348395824432f,0.6758626028895378112793f,0.2222136431373655796051f,\ +0.7860159231349825859070f,0.1736893891356885433197f,0.2674629595130681991577f,\ +0.7357366015203297138214f,0.0550541067495942115784f,0.5923380698077380657196f,\ +0.2162457890808582305908f,0.7718841419555246829987f,0.0926524316892027854919f,\ +0.7626169077120721340179f,0.7347808051854372024536f,0.8017499190755188465118f,\ +0.7732572900131344795227f,0.2559880572371184825897f,0.1179054826498031616f,\ +0.9232815303839743137360f,0.6709534404799342155457f,0.6071323617361485958099f,\ +0.4574467372149229049683f,0.8206311021931469440460f,0.0896153757348656654358f,\ +0.3426358769647777080536f,0.1674894802272319793701f,0.9481152505613863468170f,\ +0.9504805644974112510681f,0.3436607695184648036957f,0.2889420483261346817017f,\ +0.5325344172306358814240f,0.2558945687487721443176f,0.8863505902700126171112f,\ +0.0421485081315040588379f,0.4876015805639326572418f} + +#define CSOURCEI {0.347978035919368267059f,0.2037199228070676326752f,0.5962978359311819076538f,\ +0.8342303414829075336456f,0.6809655660763382911682f,0.9127784068696200847626f,\ +0.5243799723684787750244f,0.7204323844052851200104f,0.3259664541110396385193f,\ +0.1506391367875039577484f,0.9124387521296739578247f,0.6345743131823837757111f,\ +0.9268973069265484809875f,0.7633614349178969860077f,0.5918717086315155029297f,\ +0.9057438620366156101227f,0.3263365356251597404480f,0.3912780000828206539154f,\ +0.4635267537087202072144f,0.0849754814989864826202f,0.5800507226958870887756f,\ +0.7945564310066401958466f,0.3823457323014736175537f,0.3010852993465960025787f,\ +0.5789428642019629478455f,0.2627451247535645961761f,0.5713048521429300308228f,\ +0.1848654565401375293732f,0.9971724869683384895325f,0.4520535501651465892792f,\ +0.0334019884467124938965f,0.4553878181613981723785f,0.7851976407691836357117f,\ +0.4941168962977826595306f,0.9304408635944128036499f,0.7621670593507587909698f,\ +0.9264887655153870582581f,0.7199950958602130413055f,0.3973621018230915069580f,\ +0.8769331262446939945221f,0.6766644334420561790466f,0.8431562236510217189789f,\ +0.7608711589127779006958f,0.8287630719132721424103f,0.0037989662960171699524f,\ +0.9451942699961364269257f,0.6311131268739700317383f,0.0763222672976553440094f,\ +0.4486519275233149528503f,0.1080312891863286495209f,0.8351444136351346969604f,\ +0.3109649871475994586945f,0.1235694894567131996155f,0.0363539229147136211395f,\ +0.6609512977302074432373f,0.9844443709589540958405f,0.0688076755031943321228f,\ +0.5140342987142503261566f,0.3807653579860925674438f,0.1549817589111626148224f,\ +0.6850274773314595222473f,0.0382853033952414989471f,0.5224257782101631164551f,\ +0.7454454028047621250153f,0.4607118470594286918640f,0.4753002314828336238861f,\ +0.8575385268777608871460f,0.8073885519988834857941f,0.7132545644417405128479f,\ +0.0811268086545169353485f,0.5751824118196964263916f,0.884696914348751306534f,\ +0.5624709790572524070740f,0.7315255901776254177094f,0.6099120099097490310669f,\ +0.0705954921431839466095f,0.8552806274965405464172f,0.7045627343468368053436f,\ +0.5928074717521667480469f,0.8517647930420935153961f,0.2603117255493998527527f,\ +0.8596871509216725826263f,0.3943212013691663742065f,0.3333164160139858722687f,\ +0.2511775353923439979553f,0.5570420245639979839325f,0.7276714108884334564209f,\ +0.9383780122734606266022f,0.1971746077761054039001f,0.1607607132755219936371f,\ +0.7815325502306222915649f,0.1760376212187111377716f,0.2801528992131352424622f,\ +0.4699970218352973461151f,0.3507726117968559265137f,0.5713973813690245151520f,\ +0.4563077641651034355164f,0.9214398502372205257416f,0.4339873101562261581421f,\ +0.3514866163022816181183f,0.1816438222303986549377f,0.9070622171275317668915f,\ +0.7665811367332935333252f,0.9807842955924570560455f,0.1198607003316283226013f,\ +0.0508546582423150539398f,0.2581452894955873489380f,0.1401008707471191883087f,\ +0.5514106499031186103821f,0.7882929998449981212616f,0.8028824776411056518555f,\ +0.2425694861449301242828f,0.7024780390784144401550f,0.0922905071638524532318f,\ +0.4318286012858152389526f,0.0804965649731457233429f,0.7126307198777794837952f,\ +0.6893844078294932842255f,0.2756213061511516571045f,0.6968217701651155948639f,\ +0.4598932703956961631775f,0.6099067903123795986176f,0.3065654132515192031860f,\ +0.0749373403377830982208f,0.9619921119883656501770f,0.4158898773603141307831f,\ +0.3287452235817909240723f,0.7406168007291853427887f,0.5725225014612078666687f,\ +0.9504556744359433650970f,0.1849336978048086166382f,0.8698030491359531879425f,\ +0.6907873982563614845276f,0.9524399931542575359344f,0.6490485109388828277588f,\ +0.9960058168508112430573f,0.2040582066401839256287f,0.3800008497200906276703f,\ +0.9729049820452928543091f,0.9110585046000778675079f,0.3810073928907513618469f,\ +0.7869612383656203746796f,0.5560158789157867431641f,0.8529843934811651706696f,\ +0.4350629774853587150574f,0.5956362797878682613373f,0.7071880977600812911987f,\ +0.5747222309000790119171f,0.4764349022880196571350f,0.6098947445861995220184f,\ +0.9666662178933620452881f,0.3874611915089190006256f,0.0715632727369666099548f,\ +0.6122049516998231410980f,0.9575729314237833023071f,0.7723352131433784961700f,\ +0.1287384750321507453918f,0.3884150418452918529510f,0.2353963479399681091309f,\ +0.6542267077602446079254f,0.3286431683227419853210f,0.024017625954002141953f,\ +0.1042741741985082626343f,0.9314296473748981952667f,0.8185661518946290016174f,\ +0.8156488086096942424774f,0.8688247688114643096924f,0.3549220249988138675690f,\ +0.3890381073579192161560f,0.6415715864859521389008f,0.4902750719338655471802f,\ +0.3509976905770599842072f,0.8516392158344388008118f,0.1348936217837035655975f,\ +0.1156354099512100219727f,0.8810075619257986545563f,0.8367286501452326774597f,\ +0.5032693906687200069427f,0.4486711751669645309448f,0.9319602106697857379913f,\ +0.7298459419980645179749f,0.3388367067091166973114f,0.4314213804900646209717f,\ +0.7317318231798708438873f,0.9655342241749167442322f,0.2621376193128526210785f,\ +0.2050140891224145889282f,0.2826355365104973316193f,0.3973353477194905281067f,\ +0.7437736871652305126190f,0.8185287192463874816895f,0.3071001493372023105621f,\ +0.9627068741247057914734f,0.9475456266663968563080f,0.6546552237123250961304f,\ +0.1992082078941166400909f,0.3616109425202012062073f,0.9388273353688418865204f,\ +0.0409001447260379791260f,0.0758434669114649295807f} + +#define CRESULTR {-0.7576646139762764908809f,-0.4912662732014974609207f,-0.4935831983604013761813f,\ +-0.1796001444111503253520f,-0.2030603062114124668369f,-0.0903746939402042676059f,\ +-0.3380442117380291211504f,-0.2488385719103628768156f,-0.2453827611475934422636f,\ +-0.0629419446509737884332f,0.2743030686751847802007f,-0.4189753318430110562431f,\ +-0.0337034837449739430038f,-0.2700068328094388236948f,-0.5191589716059612502619f,\ +-0.0763304013057857499991f,-0.6929039668216129266298f,-0.7614418400301237177530f,\ +-0.7012514181881327468560f,-0.4995602487864141960650f,-0.3736855282655331400576f,\ +-0.1670990767606896909570f,-0.4148838171877601843640f,-0.1470641870540525808497f,\ +0.0881657571965975273010f,-1.1827451998005302780115f,0.1044920740886167709327f,\ +-1.1145963776166571967963f,0.0100332050022288142566f,-0.0123498399546466911675f,\ +-0.6728365416861274983518f,-0.0874315516128119363248f,0.1416698281269971604335f,\ +-0.2712125731855208887744f,-0.0063567040970050154788f,0.1906009971260032298535f,\ +0.0238331967155752874610f,-0.0953429917974444041118f,-0.0065067191893498198957f,\ +0.0440644425532304637172f,-0.3540655459766552382028f,-0.1661126167793314234444f,\ +0.0062509933701612868662f,-0.1693877982336349785619f,-0.0292579566847096204929f,\ +0.0137816953226981269570f,-0.0288761524361324552201f,-0.0250652390791611112686f,\ +-0.7581745137578204118967f,-0.7505545612383084375097f,-0.0046973071232757198853f,\ +-0.3406170651999906873186f,-2.0764518222153585114143f,-0.8157393323281721952966f,\ +-0.0852474852363154095292f,0.0348077956215509243254f,-0.8387202021909221372198f,\ +-0.0663540586103768398329f,-0.9554969196553003696337f,-0.0212599130834864695483f,\ +-0.0245601140031842454792f,-1.6679899099681032570430f,-0.4509584277017124609443f,\ +0.1011698547763601602201f,-0.2120439010955574854478f,-0.1131958883879479044188f,\ +0.0199327284817682297280f,0.0781443465987670671247f,-0.3004592565973881468366f,\ +-0.1451799924584522560878f,-0.5281452333714923286223f,-0.0505933914241510074294f,\ +-0.2819958038859460280889f,-0.122323084811984963971f,-0.2632782651610236501760f,\ +-0.0540558326414990047981f,0.2512879183645665981395f,-0.1214932149359973512226f,\ +0.0055773659320434761794f,0.0673704632706614986448f,-0.2906343733694730646633f,\ +0.0851020319327377705587f,0.0365640112295984101576f,-1.0976622196833336619903f,\ +-0.4020870876485082012763f,-0.3719849821436939651953f,-0.3158125612041708385469f,\ +0.2324359424588408329360f,-1.5742845766045041600023f,-0.0033130260706617652329f,\ +-0.1069329039454427060507f,-0.1341564770393289252048f,-0.0510429776001832605226f,\ +-0.3847912680433241972011f,-0.9153668051115183557087f,-0.3798345871473772783489f,\ +-0.6590618454479428844905f,-0.0755413642077243097095f,0.0808833545731707098669f,\ +-0.417646722764209388234f,-0.8522405945532404158982f,0.1463133685463073596633f,\ +-0.2416082657366604991012f,0.0219217192558878656850f,-0.8077093656959043466159f,\ +-0.1128924015633438332484f,-0.3996389102953575300781f,-0.9892317511551623754329f,\ +-0.5874413267393940873973f,-0.1422192352759769073955f,-0.1954743580270074387872f,\ +-0.0763719684521397823573f,0.1332266112260754309382f,-2.2385346085566988350024f,\ +-0.5112419918132667939759f,-0.0541885453710462053345f,0.1544990573544810508189f,\ +0.1051325180789595692410f,-0.9326914829433226028499f,0.0764891336322670034598f,\ +-0.4245421077023512346216f,-0.4665013282915527192962f,-0.3980722181205589849107f,\ +-1.152706389176620049852f,-0.0091123646200983177135f,-0.8629224644504486230190f,\ +-0.0671956049468366567456f,-0.1483256896732535745631f,-0.0470857769330114903084f,\ +0.3049502630226416100001f,-0.8351336293434713509143f,0.1199665328310368234144f,\ +0.100965515388687754328f,0.1851149271955789266109f,-0.4311455286578065315695f,\ +0.1656739977240755667953f,-0.6957805672270640506838f,-0.7030137346248552798755f,\ +0.2434410334133135511703f,-0.0502776447144934607314f,-0.6643994214275527054880f,\ +-0.0494471424057717073852f,-0.1105954430789197057150f,0.2627700024490645658304f,\ +-0.6613338575819812659162f,-0.4943364682181946023753f,-0.2273273919604619497381f,\ +-0.0669964153308245241591f,0.0270809622513717325465f,-0.3423076587443550367063f,\ +0.2375373770411028651051f,-0.7058599113455784612725f,-0.0187211007688289424178f,\ +0.1570046667576522059218f,0.0619494218295955287323f,0.0912342621811634557627f,\ +-1.0118000314587793919685f,-0.9415613562651380386015f,-1.04611739737066766764f,\ +-0.1350076179226963601909f,-1.045153664947628735504f,-3.1153566294303054462489f,\ +-0.0576346967934074291828f,0.0825782285147220879162f,0.0858710750707356584854f,\ +-0.1147913938093602786994f,0.0959901869720326261781f,-0.8704897942843184965866f,\ +-0.1312205414500346722928f,-0.4084692473683823599195f,-0.5825265796688483543875f,\ +-0.2043543873503067542785f,-0.1585071715930248537063f,-0.4983971045262390875408f,\ +-1.405591688480441803222f,0.1581272765392360557524f,-0.1721619754559372272862f,\ +-0.0902428450071243726249f,-0.1497365537505691013287f,0.2065025609822116192671f,\ +0.0613750886386554700413f,-0.8564551079948240497330f,-0.804653684520539647096f,\ +0.1638887899169061412863f,0.1619231669215081825808f,-0.4135383706484943022730f,\ +-0.6905772083929240245936f,-0.1416337472709212619293f,-0.8981660716461068449945f,\ +-0.1997922350746098307805f,-0.1797380100619248022298f,-0.0033949848444226812805f,\ +0.3022174959979692654422f,0.0079098230306947625579f,-0.3346557902575436060921f,\ +-0.5646231542298842942529f,-0.8141969637368523526888f,0.2555170413707821830407f,\ +-2.8347892907784113525338f,-0.7063037006217763869032f} + +#define CRESULTI {0.8365523024247201178127f,0.3394374381847692356828f,1.355160662925530390410f,\ +1.5134434006476746858993f,0.9868300791435297147913f,1.528673168936313331301f,\ +0.8260899014265745687879f,1.1783591647662248202977f,0.4297253343366602140740f,\ +0.1611216299891750081130f,0.7663999599077054858398f,1.3047144916618338417180f,\ +1.2822880914611145541926f,1.5649955384218765530591f,1.4678689248356304730692f,\ +1.3586758006659467312716f,0.7108977814935093508808f,0.9933651109027943348906f,\ +1.2071246910756632253481f,0.1405010934420483359464f,1.0025763105214653414521f,\ +1.21989563358396813086f,0.6174353300937470701015f,0.3562751652356153653223f,\ +0.5587012199090121145062f,1.0302380576516638743811f,0.5405656721364887618009f,\ +0.5986555168040823549092f,1.4107360213988626718162f,0.4753739371565622318094f,\ +0.0655076733245526648952f,0.5201329289544929235234f,0.7497818580560413614933f,\ +0.7050355621930805005704f,1.2121540141336599738509f,0.6814274485183255958276f,\ +1.1306014284455374596661f,0.9141116926495304051414f,0.4114688990228685949724f,\ +0.9956827833608694611200f,1.3022000158632660582469f,1.4761001233596913184698f,\ +0.8573788009054216230354f,1.379379585022410426021f,0.0039117682490215858332f,\ +1.2006025140002900553071f,0.7070620318380608226860f,0.0783395850399789817065f,\ +1.2785255791075276210478f,0.2308747034561683952880f,0.9955835564035591112031f,\ +0.4524376138027601523817f,1.4009149235535949262754f,0.0822834615192538504358f,\ +0.8034667275967887212218f,1.2557032585647818212493f,0.1598599852603853899158f,\ +0.5815258576469973794687f,1.4290836436420499833133f,0.1589807896730044689537f,\ +0.7782863583371778526399f,0.2043896563749957318024f,0.9616073478994561218869f,\ +0.7392289023091881405847f,0.6059375681629087795343f,0.5612744745893767372991f,\ +0.9984170767670760282542f,0.8430838000818645650014f,1.29879528501095431459f,\ +0.0939407915654127262384f,1.3484611857054962236191f,1.1960714214373144859138f,\ +0.8415982269448546437829f,0.9732366936364994502995f,0.9167206383382787704406f,\ +0.0745857498941502189416f,0.7278097264573785141195f,0.9199632393837048338625f,\ +0.6304525502744320331061f,0.9211062195464506663356f,0.3555526540057888373880f,\ +0.9100796877015666641597f,0.3899732161636976779384f,1.5260640477653748536824f,\ +0.3849315818496458763143f,0.9408368768631211187525f,1.5061175798419510485360f,\ +0.838676229611447277001f,1.2591119550131308901797f,0.1620018843959732390836f,\ +1.0546671087981356329522f,0.2026968016035011754816f,0.299271305708051660321f,\ +0.7622771187183752239491f,1.067757629024185028754f,0.9888735682758375000745f,\ +1.0801593307389727449674f,1.4588740911245949849473f,0.4118082358815949306496f,\ +0.5629599662610861310341f,0.4399958138718327860239f,0.9004381750108224613527f,\ +1.3516535386697041687398f,1.2852850170743990165789f,0.2721670546404741375390f,\ +0.0569631738604013462823f,0.3951736758236387148102f,0.3862903740059538404417f,\ +1.4457867030840705346861f,1.1403205655573340759901f,1.3522555755333163229892f,\ +0.264908300074692404369f,0.6622029195378335009181f,1.0464389789763977045567f,\ +0.8038225849224520658254f,0.0850815175089563863198f,0.6568351393392068970911f,\ +0.669491640154789569017f,0.7760242270392859742500f,0.7016907095208140265896f,\ +0.7797846541592131641707f,1.335473484345777617222f,0.4740136251481967821775f,\ +0.2395937042296285568455f,1.3285359486862795552753f,1.401425714315664317056f,\ +0.3592738595863486095183f,1.0333805631652628331807f,0.6436572543635337151358f,\ +0.7762911838119904706090f,0.4403927201098556398762f,0.8811512979588507210593f,\ +0.674423430961778702653f,0.9132365009577151360176f,1.5238520140402758151765f,\ +1.00458246450610100275f,0.4215689680173497211335f,0.874990498737184374534f,\ +0.8674547514202983755638f,1.2800682610709759323697f,0.8336956783393613124034f,\ +0.9734878037135866746254f,0.6700663792657182149526f,0.7153420705223627606983f,\ +1.0026132338500262086711f,1.3535381134312993722801f,1.0923065980664201646277f,\ +0.6618099327465949421878f,0.4821732258146940175436f,1.033019939116806895640f,\ +0.8668307442664776596430f,0.9024324853624734465996f,0.0729804020494689703602f,\ +0.5506621520352920073904f,1.1198886719657494825952f,0.7824098301910974440077f,\ +0.3619529370272654977825f,1.4800901440707066036850f,0.7343084050589578914980f,\ +0.8462379976616437593506f,1.2071528313995831815930f,0.5720924999360996743292f,\ +0.1106864208392598775132f,1.0305927183418297499173f,0.8498909387724447039858f,\ +1.15517062965696792887f,0.9096742728488710350021f,1.01141253782177353848f,\ +0.4595989696224830889371f,1.3064089912173471041967f,1.071386424855859109684f,\ +0.4451357270611538408112f,1.5062412806888749727818f,0.2239121309027737871666f,\ +0.4910523338147070870896f,0.8513221989625705532490f,1.460513851259993778342f,\ +0.5833202395880134893957f,0.5481910770820362932554f,0.8603624185522980027940f,\ +0.7565250407629732221082f,0.9237902776741101495972f,1.3040155501467787235725f,\ +0.6701717740731456540715f,0.9634987985586029868301f,0.4075854524817449364704f,\ +0.4213313914917447000619f,0.3316883655770838101873f,1.3489670985956061510791f,\ +1.1391029061589752480188f,1.3689599297259111843061f,0.3132420296422914196555f,\ +0.7917886209906572769768f,1.2228656637749606428400f,1.1551462426298317875961f,\ +0.3579601167993540777879f,0.9549534865181378284760f,0.8141418225805733266398f,\ +0.7703675837106083168493f,0.1543074266086776613616f} + +#define CSOURCE2R {3.9219759730622172355652f,4.6815521270036697387695f,3.361602746881544589996f,\ +5.3368766140192747116089f,2.03906395938247442245f,1.5899897180497646331787f,\ +0.1818151073530316352844f,4.0983706060796976089478f,0.1058345986530184745789f,\ +1.9653097167611122131348f,2.7255953708663582801819f,3.4376550372689962387085f,\ +2.0337020372971892356873f,3.0119446106255054473877f,2.7625959040597081184387f,\ +2.9445307422429323196411f,5.7180739520117640495300f,2.141770124435424804688f,\ +6.8954616272822022438049f,5.8555728476494550704956f,4.2041230341419577598572f,\ +4.2775720171630382537842f,3.1845858739688992500305f,5.7618944440037012100220f,\ +4.2549022240564227104187f,9.7619816288352012634277f,2.518960000015795230866f,\ +4.3911290075629949569702f,0.7593036955222487449646f,2.5593801774084568023682f,\ +0.6706167431548237800598f,7.6511315722018480300903f,0.4173615900799632072449f,\ +3.438271805644035339356f,1.9701673323288559913635f,2.1228986512869596481323f,\ +3.1403985014185309410095f,7.8216253779828548431396f,0.5409323470667004585266f,\ +9.1902069095522165298462f,4.6035157097503542900085f,2.9926850274205207824707f,\ +0.0291663268581032752991f,8.9934705849736928939819f,8.3879271661862730979919f,\ +4.3437494523823261260986f,7.7678761305287480354309f,1.3953176606446504592896f,\ +1.1506372271105647087097f,5.3554199635982513427734f,4.3117330456152558326721f,\ +6.145384786650538444519f,9.2589621385559439659119f,0.9938172809779644012451f,\ +4.2805786477401852607727f,9.431830951943993568420f,0.3273952705785632133484f,\ +9.2132670804858207702637f,9.4490244099870324134827f,9.007069906219840049744f,\ +8.0943161016330122947693f,0.2519542910158634185791f,0.0196450622752308845520f,\ +5.0752213317900896072388f,4.0760429529473185539246f,8.4080461412668228149414f,\ +5.017265700735151767731f,9.1287807654589414596558f,4.4357294728979468345642f,\ +5.9837839566171169281006f,7.7418426470831036567688f,7.9220082703977823257446f,\ +5.5046048713847994804382f,4.0850437059998512268066f,7.2174380579963326454163f,\ +4.768535858020186424255f,6.3930579042062163352966f,9.963865298777818679810f,\ +1.5747882844880223274231f,5.3506936598569154739380f,2.1290646074339747428894f,\ +5.59145063161849975586f,4.304965981282293796539f,0.2280548494309186935425f,\ +5.7614597817882895469666f,7.1491303853690624237061f,9.3216359661892056465149f,\ +1.2326993141323328018188f,2.8655522270128130912781f,0.1247995719313621520996f,\ +5.7694048294797539710999f,3.9386960770934820175171f,6.8885837262496352195740f,\ +9.7023218311369419097900f,8.51576429326087236404f,3.3933044690638780593872f,\ +8.7725317804142832756042f,1.1314024776220321655273f,5.2641283208504319190979f,\ +5.297394050285220146179f,9.2917560925707221031189f,9.7654302977025508880615f,\ +6.2254639761522412300110f,9.822583282366394996643f,7.5429888023063540458679f,\ +5.4547880962491035461426f,7.2860160330310463905334f,0.2525969501584768295288f,\ +4.0251684701070189476013f,0.9831319935619831085205f,2.6086253346875309944153f,\ +3.6363423336297273635864f,1.7466178117319941520691f,9.2341394722461700439453f,\ +7.6051409030333161354065f,5.6402041297405958175659f,3.7970651825889945030212f,\ +8.7762261740863323211670f,8.21742579806596040726f,6.787058124318718910217f,\ +0.8220098121091723442078f,2.5527314469218254089355f,7.4444567272439599037170f,\ +2.2695036139339208602905f,6.836930788122117519379f,9.3650726415216922760010f,\ +5.0530174048617482185364f,2.5248145777732133865356f,6.8188397912308573722839f,\ +2.8363681584596633911133f,1.409485661424696445465f,6.7591095995157957077026f,\ +4.5126775791868567466736f,7.5430292449891567230225f,1.3702143030241131782532f,\ +6.6082405392080545425415f,3.8900542212650179862976f,7.001820541918277740479f,\ +9.168005720712244510651f,2.1228999551385641098022f,2.6978330826386809349060f,\ +3.1998893804848194122314f,0.2321802498772740364075f,7.26544727571308612823f,\ +1.5340585587546229362488f,2.3552638292312622070312f,0.8797382796183228492737f,\ +7.1059537213295698165894f,6.8887275597080588340759f,6.5953194908797740936279f,\ +1.8151161121204495429993f,3.9049659762531518936157f,1.5869047446176409721375f,\ +6.2407150492072105407715f,6.3760355720296502113342f,4.2704886104911565780640f,\ +1.0716815060004591941833f,2.3822965659201145172119f,9.4629473658278584480286f,\ +4.5766852516680955886841f,8.9644787041470408439636f,4.4384705275297164916992f,\ +8.08956819120794534683f,6.8317985069006681442261f,0.3401931514963507652283f,\ +2.3805456422269344329834f,9.4920115964487195014954f,2.1827886346727609634399f,\ +6.1546878470107913017273f,8.3135433867573738098145f,7.7340125897899270057678f,\ +4.2441909667104482650757f,7.262125960551202297211f,7.0999773032963275909424f,\ +4.7457459988072514533997f,9.4386920798569917678833f,1.4596485672518610954285f,\ +0.7141010463237762451172f,6.7337385797873139381409f,6.536924717947840690613f,\ +1.996896131895482540131f,6.01412517949938774109f,1.8993748771026730537415f,\ +2.5839814636856317520142f,0.9878737432882189750671f,0.6199027225375175476074f,\ +0.4034968325868248939514f,7.4001471605151891708374f,6.1626600986346602439880f,\ +6.5835834480822086334229f,2.5145971449092030525208f,3.8433500844985246658325f,\ +4.3964602379128336906433f,6.5407369285821914672852f,5.878106378950178623200f,\ +6.0208318661898374557495f,0.4535020282492041587830f,2.0294443331658840179443f,\ +7.844273825176060199738f,2.6375361625105142593384f} + +#define CSOURCE2I {4.3832763982936739921570f,8.6648589745163917541504f,3.7921421090140938758850f,\ +7.6687160786241292953491f,6.0066213225945830345154f,7.85673560574650764465f,\ +7.3871155502274632453918f,5.5442603398114442825317f,9.9291495559737086296082f,\ +9.757428467273712158203f,3.709622272290289402008f,3.0322382133454084396362f,\ +9.5195201179012656211853f,7.1278580836951732635498f,1.192370061762630939484f,\ +5.0091631803661584854126f,3.2900535268709063529968f,4.8089468106627464294434f,\ +3.3036959776654839515686f,6.3044753577560186386108f,2.1171907847747206687927f,\ +4.4860231317579746246338f,5.9145097108557820320129f,6.8067426700145006179810f,\ +0.7392961112782359123230f,9.4336947053670883178711f,1.2863306934013962745667f,\ +2.0190807711333036422729f,1.9693034281954169273376f,8.9286901615560054779053f,\ +4.6179189579561352729797f,6.2512917164713144302368f,7.0597065938636660575867f,\ +7.0181696489453315734863f,4.0879997471347451210022f,0.6362213846296072006226f,\ +0.6573933875188231468201f,5.3310041315853595733643f,0.3315818728879094123840f,\ +3.157835649326443672180f,3.785823243670165538788f,4.6195234358310699462891f,\ +6.2873698258772492408752f,2.8785153012722730636597f,3.2920487364754080772400f,\ +4.7192330472171306610107f,3.3537696348503232002258f,5.5530697200447320938110f,\ +1.196080814115703105927f,7.6139996573328971862793f,4.7909884760156273841858f,\ +2.8169692959636449813843f,2.380097783170640468597f,3.2942054606974124908447f,\ +2.3067280324175953865051f,2.1362966019660234451294f,4.0549980429932475090027f,\ +3.0953712016344070434570f,6.762971603311598300934f,9.7069163154810667037964f,\ +5.4417965700849890708923f,0.2047479711472988128662f,8.9413649635389447212219f,\ +3.4903638903051614761353f,1.1053651524707674980164f,2.0233777537941932678223f,\ +1.3046909729018807411194f,8.573952978476881980896f,6.3780163740739226341248f,\ +4.0711227245628833770752f,6.6919379355385899543762f,2.042601602151989936829f,\ +8.3104313490912318229675f,0.1221632957458496093750f,4.8844617092981934547424f,\ +9.549877075478434562683f,0.5874312063679099082947f,8.2584649138152599334717f,\ +2.9807415651157498359680f,0.7757596764713525772095f,5.8460923237726092338562f,\ +7.528713606297969818115f,0.5172297963872551918030f,5.9586250688880681991577f,\ +3.8337053125724196434021f,4.9002202786505222320557f,5.2727950783446431159973f,\ +0.6889454741030931472778f,8.843077751807868480682f,7.1912937611341476440430f,\ +0.6942595774307847023010f,1.1522095929831266403198f,4.862680672667920589447f,\ +7.6715826056897640228271f,0.8805298106744885444641f,7.0085612777620553970337f,\ +1.879138792864978313446f,2.0178856328129768371582f,4.0628212550655007362366f,\ +4.0966569539159536361694f,1.769564501009881496429f,3.31293122842907905579f,\ +0.5184767069295048713684f,4.1492417920380830764771f,7.2212355909869074821472f,\ +0.7746253907680511474609f,5.8558783913031220436096f,3.7079446297138929367065f,\ +2.1161167463287711143494f,1.903268527239561080933f,5.607953821308910846710f,\ +9.4247916433960199356079f,6.8177247745916247367859f,2.7342410013079643249512f,\ +2.0717754075303673744202f,1.9379387702792882919312f,6.797837591730058193207f,\ +5.88365742936730384827f,9.331753817386925220490f,5.509122880175709724426f,\ +8.0405469564720988273621f,1.074489727616310119629f,7.4039250845089554786682f,\ +5.6103316973894834518433f,7.6611549546942114830017f,7.8306589089334011077881f,\ +1.4388314681127667427063f,1.6471924725919961929321f,3.1774142337962985038757f,\ +5.0265956297516822814941f,6.9204960623756051064f,7.0065794046968221664429f,\ +8.8706119870766997337341f,6.9797694869339466094971f,6.7989911558106541633606f,\ +3.6159398127347230911255f,2.6739976881071925163269f,0.7736870646476745605469f,\ +1.494100340642035007477f,3.2018390577286481857300f,2.0260545751079916954041f,\ +4.4988587312400341033936f,7.7075743721798062324524f,2.4352242145687341690063f,\ +2.1261148853227496147156f,1.0992341861128807067871f,6.9814807781949639320374f,\ +4.1509064938873052597046f,5.0298188393935561180115f,7.51160675659775733948f,\ +9.9401472182944416999817f,1.82876241393387317657f,3.021917375735938549042f,\ +3.7854864448308944702148f,7.1531985932961106300354f,9.5241537224501371383667f,\ +4.7039186349138617515564f,1.8709417246282100677490f,2.55718790460377931595f,\ +4.4350660685449838638306f,7.2340781940147280693054f,8.7619100883603096008301f,\ +0.3733208635821938514710f,4.2934664245694875717163f,3.1572330510243773460388f,\ +3.682477343827486038208f,1.4587742509320378303528f,6.7683792579919099807739f,\ +5.2619793592020869255066f,4.003625661134719848633f,0.0291080260649323463440f,\ +3.0681814532727003097534f,7.9026939114555716514587f,9.5779503695666790008545f,\ +6.6892711864784359931946f,2.9296159837394952774048f,8.2238993747159838676453f,\ +0.1798455044627189636231f,8.7107013771310448646545f,3.1810243334621191024780f,\ +5.7244732743129134178162f,5.7386581040918827056885f,3.4920182498171925544739f,\ +7.06729766912758350372f,3.5992007283493876457214f,4.0523112565279006958008f,\ +6.1408105725422501564026f,6.5240467619150876998901f,0.2951709320768713951111f,\ +5.6688958965241909027100f,7.1140170888975262641907f,4.5884906593710184097290f,\ +4.7205173922702670097351f,0.6237313523888587951660f,0.8544011274352669715881f,\ +0.1345641072839498519898f,3.5430019116029143333435f,6.7193946428596973419189f,\ +1.3606189610436558723450f,2.1197437215596437454224f} + +#define CRESULT2R {1.7718546901199148102535f,2.2873385372432406548171f,1.6228701567171754938101f,\ +2.2346263074245684698838f,1.8473969837167181218263f,2.0814403666906242662549f,\ +2.000040135761198101250f,1.930738025076279118508f,2.2955316341715112926636f,\ +2.2979125914561788768253f,1.52676863913911398107f,1.5225454413433419098567f,\ +2.2756589535249842626285f,2.0461560089912054216654f,1.10158579014350732628f,\ +1.7596676151017560663092f,1.886619744318301705732f,1.6609534913253483079387f,\ +2.0341867590624715944614f,2.1522631887405574424577f,1.5490800609419352884544f,\ +1.8243154431583954444562f,1.9046961835587756795007f,2.1880745312667504443027f,\ +1.462943224821960486182f,2.6082576924848916988253f,1.0397086540972344526068f,\ +1.5754847768676314423431f,0.746979645400304148595f,2.2287521705924668857790f,\ +1.5403790183895167409389f,2.29053332003721576982f,1.9561479629741382879615f,\ +2.056062919004959077540f,1.5124829204355532130677f,0.7957872878063905197621f,\ +1.1657936572577645151227f,2.247663310479210085902f,-0.4549625893688244437918f,\ +2.273939094117130466088f,1.7851157264602297569667f,1.705510493291471751931f,\ +1.838553591041654167171f,2.2452631537104275061267f,2.1984262619387999748710f,\ +1.858482175867823826820f,2.1354614286115483068329f,1.7449625890299069741474f,\ +0.5066316450005309279803f,2.2309587833094872699746f,1.8633839241242127204856f,\ +1.9110608576794807511590f,2.2575857867741544460216f,1.23571911173189863398f,\ +1.581562045830424700910f,2.2691047577207688057399f,1.4031989962500943658341f,\ +2.2741179432518765501925f,2.4527182982567738989133f,2.5833963585371355620168f,\ +2.2776279862384747332271f,-1.1249835300913728630690f,2.1906906716320380112961f,\ +1.8180097251363194210683f,1.440608273684235829393f,2.157337396250079031290f,\ +1.6456014738468727198750f,2.5276363856092047832647f,2.0501201476301127435420f,\ +1.9792596577711849548109f,2.325636279713856779949f,2.1018269082301319627959f,\ +2.2993946557097193483798f,1.407779382548410174181f,2.1650335217497893580685f,\ +2.3678319878208848869861f,1.8594164774388513006187f,2.56043452139564964298f,\ +1.2152594801616827258073f,1.6876273083151080989239f,1.8280452566376663714465f,\ +2.2383606348726785562064f,1.4669353168458199032642f,1.7855716392006990567154f,\ +1.9344712649878033072781f,2.1595582205209731263551f,2.3711393709457433409682f,\ +0.3451198452895575252697f,2.2295598849908442318224f,1.9730216569827605521681f,\ +1.7597572254564382010500f,1.4119056335367026200345f,2.1320313551579719302254f,\ +2.5151804905590435801344f,2.1472364706413502588589f,2.052431577045615185284f,\ +2.1940570121896025845842f,0.8387289948467516742525f,1.8945610375322186058611f,\ +1.901605848224737327357f,2.2469410116186243620007f,2.3333167208432867845147f,\ +1.8321040495156570848678f,2.3667788410376999763685f,2.345870799293293007537f,\ +1.7064766326923879180555f,2.2351179984798275057756f,1.3127927306468758494873f,\ +1.5145818637157286712380f,0.7618288453812751548355f,1.8221250086585414340590f,\ +2.3127298919002594601579f,1.9513099157402993277799f,2.2649290827240116108499f,\ +2.0646178740610454660498f,1.7857162805439725783430f,2.0523808897592226152540f,\ +2.357637781206334715023f,2.5204455223537904906550f,2.1680868421848340510394f,\ +2.08969579055791898625f,1.0187212773133276222381f,2.351321025745570558740f,\ +1.8003855797977157404688f,2.3290564194645368978343f,2.5020530275623595883872f,\ +1.6589662323678027178175f,1.1034736729371952268508f,2.0179385634489594991692f,\ +1.7529535621370035958222f,1.9548092141654069830992f,2.2757671672542376661852f,\ +2.2978225629400212959297f,2.329897705001075625120f,1.9366802551403343723990f,\ +2.0192737614105338295190f,1.5519072144028889237433f,1.9522381258437428996899f,\ +2.228825942499146339770f,1.3459088341323246496017f,1.2160693133443531976923f,\ +1.708519320712721833999f,2.042657041378174831436f,2.0363649964518035773153f,\ +0.9638512795498686003270f,0.9551846741593900125267f,1.951137961258366582129f,\ +2.107724763084950492242f,2.1435395035941335883933f,2.30219731892690226971f,\ +2.3129821080069814520641f,1.4613961122338947618005f,1.2276638750511146280786f,\ +1.98774702803650615834f,2.2599263943254159769936f,2.3454288218721179859472f,\ +1.5736974684351636710744f,1.1082826047896976451312f,2.2826248447267389884985f,\ +1.852079302129498561413f,2.4440219801181322090144f,2.2846216839061130876587f,\ +2.0916390604994830049179f,2.0880185293365247645170f,1.1554676622252344486697f,\ +1.4781743340729813773748f,2.2621227047071905680298f,1.9617338719614783038026f,\ +2.0915485321054503309313f,2.222172100020261886755f,2.0456349034700243016971f,\ +1.6557620395745074048932f,2.3732960033711649749932f,2.4784302018604411621538f,\ +2.1043456955600268187823f,2.2908052004546388680239f,2.1225525715426596384816f,\ +-0.3059820602804464440006f,2.398801697565509982724f,1.9837316998415748248163f,\ +1.8021669050328577021958f,2.1177911026101683411582f,1.3800624471185749531088f,\ +2.0182134290564768264176f,1.3170274339145702224840f,1.4108532825842892144408f,\ +1.817110834423457665920f,2.2890298175330245911141f,1.8196542505912531861867f,\ +2.1619335403208914669904f,2.0209326327770549269758f,1.7893311710629888899859f,\ +1.8641960608110765829082f,1.882576152038281991352f,1.7816883851861540222217f,\ +1.7954751269073565556056f,1.2730999018963571334240f,1.9486466131391497746961f,\ +2.074605067637334876451f,1.2189909546635331327735f} + +#define CRESULT2I {0.8408843669071919268987f,1.0754371807248737091811f,0.8455094310786673839075f,\ +0.962808271271232585242f,1.2435335418309885202603f,1.371120256581034091425f,\ +1.5461888319559713433904f,0.9342369007616236897817f,1.56013775123029430070f,\ +1.3720388608498168547811f,0.9371355532144381994542f,0.7228179279461685036168f,\ +1.360325287393417292847f,1.1709945644102059958414f,0.4074578726347549695319f,\ +1.0393742565506918218432f,0.5221182542768327827787f,1.1517977305599864656926f,\ +0.4467977216337457035955f,0.8222975857540034683169f,0.4665224019878621564139f,\ +0.8091797065019556978172f,1.0768746352304479074746f,0.8683388375483406251831f,\ +0.1720341159830799382391f,0.7682977019562435838651f,0.4721387487057847609506f,\ +0.4309811115589534114001f,1.20279143843462255070f,1.2916347740244560338141f,\ +1.4265839008392693365579f,0.6850460436644268957807f,1.5117462274209296779759f,\ +1.1152532149987959275705f,1.1217014706271768442747f,0.2911766403909815670303f,\ +0.2063546073155473614680f,0.5982511040925977408023f,0.5499105526382754849379f,\ +0.3309697617869979402450f,0.6882370204600587459964f,0.9959451809388051302108f,\ +1.5661574844082004620560f,0.3097639368523368297304f,0.3740022155825183380884f,\ +0.8268049495959598482742f,0.407572856709710940049f,1.3246230944084764757918f,\ +0.8047604843662868878695f,0.9578156211088914018248f,0.8379992820836518196970f,\ +0.4298072736875270249968f,0.2516111351341220880862f,1.2777930133692467773443f,\ +0.4942674920588698839197f,0.2227403824735175175142f,1.4902323819071812138759f,\ +0.3241206854947055737704f,0.6212066791677098853697f,0.8227777158663325263177f,\ +0.5918914368525474145599f,0.6824004867135488039409f,1.5685992315253338702519f,\ +0.602441091725517741118f,0.2648167750385964080984f,0.2361574036342227733698f,\ +0.2544057494452062195833f,0.7540670573431564882583f,0.9631160038064509043565f,\ +0.5974222702744066415548f,0.7127866343417466055143f,0.2523427003112133637508f,\ +0.9857721947818851582213f,0.0298961055939373325507f,0.5949566736712420533806f,\ +1.1076852186579833059454f,0.0916284996635063769821f,0.6920814866116709040966f,\ +1.0847494758718594365376f,0.1439797822740493671301f,1.2215400197911927548944f,\ +0.9319943094964961982640f,0.1195740768674621451462f,1.5325419323859537090726f,\ +0.5871287736405550461427f,0.6008795873685909283424f,0.5147800680430554276512f,\ +0.5096442477271476700906f,1.2574287319730830247977f,1.55344381002968989769f,\ +0.1197588579388608048815f,0.2845949117488152935174f,0.6146775806026560928785f,\ +0.6690416852557365956f,0.1030338183393550155476f,1.1198962694059428901738f,\ +0.2110181909408466172096f,1.0597850788835401214527f,0.6573038229366630069706f,\ +0.6582686240328038396186f,0.1881909924839933190288f,0.3270668956957688000564f,\ +0.0830914673081940696742f,0.3996821407672082604456f,0.763608851537480148863f,\ +0.1410651270101331844487f,0.677001919140020169685f,1.5027782434779339837405f,\ +0.4840122714003086690227f,1.0939971143713191903402f,1.1354027775868176242113f,\ +1.2025671422981056846169f,1.3200023979900399329068f,0.2878762084297626921980f,\ +0.2659639364881328793544f,0.3309563133803885004447f,1.0613976119428301103653f,\ +0.5905886949329369750572f,0.84881047253311037171f,0.6818405058224251691357f,\ +1.4689172047242584628890f,0.3984077871527766379067f,0.7826684691736193189016f,\ +1.1863976071520063726439f,0.8421875864316380466690f,0.6964016273061860440308f,\ +0.2774051332309265816001f,0.5780614975169666713839f,0.4360596809152573194446f,\ +1.0570616474517706695480f,1.3698760574306645398934f,0.8033735187122362786383f,\ +1.100195299896877587642f,0.7466330742895204153342f,1.3719281224888897341430f,\ +0.5006805450256617273652f,0.6022149721715611692119f,0.1100515320096066840261f,\ +0.1615487638997855912582f,0.9853189831543425203364f,0.6441365190650450989196f,\ +0.9525486295501676137221f,1.540681786544560338825f,0.3234105928346787672822f,\ +0.9457654725170446807780f,0.4366658824494836776964f,1.4454467286135332937391f,\ +0.5286797419321711544171f,0.6306769685466229180548f,0.8502600566998695930110f,\ +1.3901817278534140953639f,0.4379816003966337523146f,1.0872460520812594619855f,\ +0.5452429334871597976786f,0.8427783441184910628863f,1.1492861648773524674283f,\ +1.346792368827264718689f,0.665745289338786183642f,0.2639277343938546960267f,\ +0.7696845111061191291313f,0.6789773815510785626159f,1.1019111077295657974418f,\ +0.0461157104075398602272f,0.5610787453255564605215f,1.4634600366382779501606f,\ +0.9969191986962234741654f,0.1524913254966685227654f,1.2588290814744897971877f,\ +0.7073635046287626293449f,0.4488022872724745648831f,0.0037636205385015429094f,\ +0.6259389684526723840463f,0.8276134607557569244918f,0.9328971084913546540918f,\ +0.9537519653655091023126f,0.3009556732582234217510f,1.3951370123387065724785f,\ +0.2467179687642131191705f,0.9127106501576134345299f,0.4528896475979662383793f,\ +1.2351598243895067774645f,0.7619639996129009551495f,1.0726338584530288322583f,\ +1.220269965181696392165f,1.3029226301867964377124f,1.4189980227900089726489f,\ +1.5051832236136615250643f,0.7225617055791342391302f,0.0478600995604049964105f,\ +0.710883123025403795836f,1.2310328539390928970221f,0.8735414139313334436210f,\ +0.8209275679220129351421f,0.0950735258592600440686f,0.1443422571457730618771f,\ +0.0223460331642115414552f,1.443489200421151252840f,1.2774801572114198311425f,\ +0.1717450012966928174496f,0.6769828145758884918593f} + + +/* in is between 0 and 1 + in2 is between 0 and 10 */ + + +/* FIXME : Tests à 10^-4 cf testFloatLog.c */ + +void slog1psTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + float in2[]=SOURCE2; + float res2[]=RESULT2; + int i; + + for (i=0;i<200;i++){ + out=slog1ps(in[i]-1); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-5); + } + + for (i=0;i<200;i++){ + out=slog1ps(in2[i]-1); + assert(( (fabs(out-res2[i]))/(fabs(out)) )<3e-4); + } +} + +void clog1psTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + float in2R[]=CSOURCE2R; + float in2I[]=CSOURCE2I; + float res2R[]=CRESULT2R; + float res2I[]=CRESULT2I; + floatComplex in,in2,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i]-1,inI[i]); + out=clog1ps(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<3e-5); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } + + for (i=0;i<200;i++){ + in2=FloatComplex(in2R[i]-1,in2I[i]); + out=clog1ps(in2); + assert(( (fabs(creals(out)-res2R[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-res2I[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void slog1paTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + float in2[]=SOURCE2; + float res2[]=RESULT2; + int i; + + for (i=0;i<200;i++){ + in[i]=in[i]-1; + in2[i]=in2[i]-1; + } + + slog1pa(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-5); + } + + slog1pa(in2,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res2[i]))/(fabs(out[i])) )<3e-4); + } +} + +void clog1paTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + float in2R[]=CSOURCE2R; + float in2I[]=CSOURCE2I; + float res2R[]=CRESULT2R; + float res2I[]=CRESULT2I; + floatComplex *in,*in2,out[200]; + int i; + + for (i=0;i<200;i++){ + inR[i]=inR[i]-1; + in2R[i]=in2R[i]-1; + } + + in=FloatComplexMatrix(inR,inI,200); + clog1pa(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<3e-5); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } + + + in2=FloatComplexMatrix(in2R,in2I,200); + clog1pa(in2,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-res2R[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-res2I[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + + +int testLog1p(void) { + printf("\n>>>> Float Logarithm 1+x Tests\n"); + slog1psTest(); + clog1psTest(); + slog1paTest(); + clog1paTest(); + return 0; +} + +int main(void) { + assert(testLog1p() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/testLog1p.h b/2.3-1/src/c/elementaryFunctions/log1p/testLog1p.h new file mode 100644 index 00000000..e9f613aa --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/testLog1p.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTLOG1P_H_ +#define _TESTLOG1P_H_ + +#include +#include +#include "log1p.h" + +void slog1psTest(void); + +void dlog1psTest(void); + +void clog1psTest(void); + +void zlog1psTest(void); + +void slog1paTest(void); + +void dlog1paTest(void); + +void clog1paTest(void); + +void zlog1paTest(void); + +int testLog1p(void); + +#endif /* ! _TESTLOG1P_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/log1p/zlog1pa.c b/2.3-1/src/c/elementaryFunctions/log1p/zlog1pa.c new file mode 100644 index 00000000..0b6b35ae --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/zlog1pa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log1p.h" + +void zlog1pa(doubleComplex* in, int size, doubleComplex* out) { + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = zlog1ps(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/log1p/zlog1ps.c b/2.3-1/src/c/elementaryFunctions/log1p/zlog1ps.c new file mode 100644 index 00000000..8b0aeb67 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/log1p/zlog1ps.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "log.h" +#include "log1p.h" + +doubleComplex zlog1ps(doubleComplex in) { + return zlogs(DoubleComplex(zreals(in) + 1, zimags(in))); +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/Makefile.am b/2.3-1/src/c/elementaryFunctions/pow/Makefile.am new file mode 100644 index 00000000..9b564f92 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/Makefile.am @@ -0,0 +1,71 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libPow.la + +libPow_la_SOURCES = $(HEAD) $(SRC) + +SRC = spows.c \ + dpows.c \ + cpows.c \ + zpows.c \ + spowa.c \ + dpowa.c \ + cpowa.c \ + zpowa.c + +HEAD = ../includes/pow.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatPow testDoublePow + +TESTS = testFloatPow testDoublePow + +testFloatPow_SOURCES = testPow.h testFloatPow.c +testFloatPow_CFLAGS = $(check_INCLUDES) +testFloatPow_LDADD = $(check_LDADD) + +testDoublePow_SOURCES = testPow.h testDoublePow.c +testDoublePow_CFLAGS = $(check_INCLUDES) +testDoublePow_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/pow/Makefile.in b/2.3-1/src/c/elementaryFunctions/pow/Makefile.in new file mode 100644 index 00000000..e47a2d15 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/Makefile.in @@ -0,0 +1,815 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatPow$(EXEEXT) testDoublePow$(EXEEXT) +TESTS = testFloatPow$(EXEEXT) testDoublePow$(EXEEXT) +subdir = src/c/elementaryFunctions/pow +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libPow_la_LIBADD = +am__objects_1 = +am__objects_2 = libPow_la-spows.lo libPow_la-dpows.lo \ + libPow_la-cpows.lo libPow_la-zpows.lo libPow_la-spowa.lo \ + libPow_la-dpowa.lo libPow_la-cpowa.lo libPow_la-zpowa.lo +am_libPow_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libPow_la_OBJECTS = $(am_libPow_la_OBJECTS) +libPow_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libPow_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoublePow_OBJECTS = testDoublePow-testDoublePow.$(OBJEXT) +testDoublePow_OBJECTS = $(am_testDoublePow_OBJECTS) +am__DEPENDENCIES_1 = \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la +testDoublePow_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoublePow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoublePow_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatPow_OBJECTS = testFloatPow-testFloatPow.$(OBJEXT) +testFloatPow_OBJECTS = $(am_testFloatPow_OBJECTS) +testFloatPow_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatPow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatPow_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libPow_la_SOURCES) $(testDoublePow_SOURCES) \ + $(testFloatPow_SOURCES) +DIST_SOURCES = $(libPow_la_SOURCES) $(testDoublePow_SOURCES) \ + $(testFloatPow_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libPow.la +libPow_la_SOURCES = $(HEAD) $(SRC) +SRC = spows.c \ + dpows.c \ + cpows.c \ + zpows.c \ + spowa.c \ + dpowa.c \ + cpowa.c \ + zpowa.c + +HEAD = ../includes/pow.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + @LIBMATH@ + +testFloatPow_SOURCES = testPow.h testFloatPow.c +testFloatPow_CFLAGS = $(check_INCLUDES) +testFloatPow_LDADD = $(check_LDADD) +testDoublePow_SOURCES = testPow.h testDoublePow.c +testDoublePow_CFLAGS = $(check_INCLUDES) +testDoublePow_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/pow/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/pow/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libPow.la: $(libPow_la_OBJECTS) $(libPow_la_DEPENDENCIES) + $(libPow_la_LINK) -rpath $(pkglibdir) $(libPow_la_OBJECTS) $(libPow_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoublePow$(EXEEXT): $(testDoublePow_OBJECTS) $(testDoublePow_DEPENDENCIES) + @rm -f testDoublePow$(EXEEXT) + $(testDoublePow_LINK) $(testDoublePow_OBJECTS) $(testDoublePow_LDADD) $(LIBS) +testFloatPow$(EXEEXT): $(testFloatPow_OBJECTS) $(testFloatPow_DEPENDENCIES) + @rm -f testFloatPow$(EXEEXT) + $(testFloatPow_LINK) $(testFloatPow_OBJECTS) $(testFloatPow_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-cpowa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-cpows.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-dpowa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-dpows.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-spowa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-spows.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-zpowa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libPow_la-zpows.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoublePow-testDoublePow.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatPow-testFloatPow.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libPow_la-spows.lo: spows.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-spows.lo -MD -MP -MF $(DEPDIR)/libPow_la-spows.Tpo -c -o libPow_la-spows.lo `test -f 'spows.c' || echo '$(srcdir)/'`spows.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-spows.Tpo $(DEPDIR)/libPow_la-spows.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spows.c' object='libPow_la-spows.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-spows.lo `test -f 'spows.c' || echo '$(srcdir)/'`spows.c + +libPow_la-dpows.lo: dpows.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-dpows.lo -MD -MP -MF $(DEPDIR)/libPow_la-dpows.Tpo -c -o libPow_la-dpows.lo `test -f 'dpows.c' || echo '$(srcdir)/'`dpows.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-dpows.Tpo $(DEPDIR)/libPow_la-dpows.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpows.c' object='libPow_la-dpows.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-dpows.lo `test -f 'dpows.c' || echo '$(srcdir)/'`dpows.c + +libPow_la-cpows.lo: cpows.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-cpows.lo -MD -MP -MF $(DEPDIR)/libPow_la-cpows.Tpo -c -o libPow_la-cpows.lo `test -f 'cpows.c' || echo '$(srcdir)/'`cpows.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-cpows.Tpo $(DEPDIR)/libPow_la-cpows.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpows.c' object='libPow_la-cpows.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-cpows.lo `test -f 'cpows.c' || echo '$(srcdir)/'`cpows.c + +libPow_la-zpows.lo: zpows.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-zpows.lo -MD -MP -MF $(DEPDIR)/libPow_la-zpows.Tpo -c -o libPow_la-zpows.lo `test -f 'zpows.c' || echo '$(srcdir)/'`zpows.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-zpows.Tpo $(DEPDIR)/libPow_la-zpows.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zpows.c' object='libPow_la-zpows.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-zpows.lo `test -f 'zpows.c' || echo '$(srcdir)/'`zpows.c + +libPow_la-spowa.lo: spowa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-spowa.lo -MD -MP -MF $(DEPDIR)/libPow_la-spowa.Tpo -c -o libPow_la-spowa.lo `test -f 'spowa.c' || echo '$(srcdir)/'`spowa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-spowa.Tpo $(DEPDIR)/libPow_la-spowa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spowa.c' object='libPow_la-spowa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-spowa.lo `test -f 'spowa.c' || echo '$(srcdir)/'`spowa.c + +libPow_la-dpowa.lo: dpowa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-dpowa.lo -MD -MP -MF $(DEPDIR)/libPow_la-dpowa.Tpo -c -o libPow_la-dpowa.lo `test -f 'dpowa.c' || echo '$(srcdir)/'`dpowa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-dpowa.Tpo $(DEPDIR)/libPow_la-dpowa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpowa.c' object='libPow_la-dpowa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-dpowa.lo `test -f 'dpowa.c' || echo '$(srcdir)/'`dpowa.c + +libPow_la-cpowa.lo: cpowa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-cpowa.lo -MD -MP -MF $(DEPDIR)/libPow_la-cpowa.Tpo -c -o libPow_la-cpowa.lo `test -f 'cpowa.c' || echo '$(srcdir)/'`cpowa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-cpowa.Tpo $(DEPDIR)/libPow_la-cpowa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpowa.c' object='libPow_la-cpowa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-cpowa.lo `test -f 'cpowa.c' || echo '$(srcdir)/'`cpowa.c + +libPow_la-zpowa.lo: zpowa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -MT libPow_la-zpowa.lo -MD -MP -MF $(DEPDIR)/libPow_la-zpowa.Tpo -c -o libPow_la-zpowa.lo `test -f 'zpowa.c' || echo '$(srcdir)/'`zpowa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libPow_la-zpowa.Tpo $(DEPDIR)/libPow_la-zpowa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zpowa.c' object='libPow_la-zpowa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libPow_la_CFLAGS) $(CFLAGS) -c -o libPow_la-zpowa.lo `test -f 'zpowa.c' || echo '$(srcdir)/'`zpowa.c + +testDoublePow-testDoublePow.o: testDoublePow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoublePow_CFLAGS) $(CFLAGS) -MT testDoublePow-testDoublePow.o -MD -MP -MF $(DEPDIR)/testDoublePow-testDoublePow.Tpo -c -o testDoublePow-testDoublePow.o `test -f 'testDoublePow.c' || echo '$(srcdir)/'`testDoublePow.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoublePow-testDoublePow.Tpo $(DEPDIR)/testDoublePow-testDoublePow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePow.c' object='testDoublePow-testDoublePow.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoublePow_CFLAGS) $(CFLAGS) -c -o testDoublePow-testDoublePow.o `test -f 'testDoublePow.c' || echo '$(srcdir)/'`testDoublePow.c + +testDoublePow-testDoublePow.obj: testDoublePow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoublePow_CFLAGS) $(CFLAGS) -MT testDoublePow-testDoublePow.obj -MD -MP -MF $(DEPDIR)/testDoublePow-testDoublePow.Tpo -c -o testDoublePow-testDoublePow.obj `if test -f 'testDoublePow.c'; then $(CYGPATH_W) 'testDoublePow.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePow.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoublePow-testDoublePow.Tpo $(DEPDIR)/testDoublePow-testDoublePow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePow.c' object='testDoublePow-testDoublePow.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoublePow_CFLAGS) $(CFLAGS) -c -o testDoublePow-testDoublePow.obj `if test -f 'testDoublePow.c'; then $(CYGPATH_W) 'testDoublePow.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePow.c'; fi` + +testFloatPow-testFloatPow.o: testFloatPow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatPow_CFLAGS) $(CFLAGS) -MT testFloatPow-testFloatPow.o -MD -MP -MF $(DEPDIR)/testFloatPow-testFloatPow.Tpo -c -o testFloatPow-testFloatPow.o `test -f 'testFloatPow.c' || echo '$(srcdir)/'`testFloatPow.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatPow-testFloatPow.Tpo $(DEPDIR)/testFloatPow-testFloatPow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPow.c' object='testFloatPow-testFloatPow.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatPow_CFLAGS) $(CFLAGS) -c -o testFloatPow-testFloatPow.o `test -f 'testFloatPow.c' || echo '$(srcdir)/'`testFloatPow.c + +testFloatPow-testFloatPow.obj: testFloatPow.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatPow_CFLAGS) $(CFLAGS) -MT testFloatPow-testFloatPow.obj -MD -MP -MF $(DEPDIR)/testFloatPow-testFloatPow.Tpo -c -o testFloatPow-testFloatPow.obj `if test -f 'testFloatPow.c'; then $(CYGPATH_W) 'testFloatPow.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPow.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatPow-testFloatPow.Tpo $(DEPDIR)/testFloatPow-testFloatPow.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPow.c' object='testFloatPow-testFloatPow.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatPow_CFLAGS) $(CFLAGS) -c -o testFloatPow-testFloatPow.obj `if test -f 'testFloatPow.c'; then $(CYGPATH_W) 'testFloatPow.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPow.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/pow/cpowa.c b/2.3-1/src/c/elementaryFunctions/pow/cpowa.c new file mode 100644 index 00000000..c5a87327 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/cpowa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" + +void cpowa(floatComplex* x, int size, floatComplex* power, floatComplex *out) { + /* + Computes Scilab x.^power + Computes power element by element + x and power must have same size + */ + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = cpows(x[i], power[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/cpows.c b/2.3-1/src/c/elementaryFunctions/pow/cpows.c new file mode 100644 index 00000000..5848c4b5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/cpows.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" +#include "exp.h" +#include "log.h" + +floatComplex cpows(floatComplex z, floatComplex power) { + /*Cas z=0 */ + if ( (creals(z)==0) && (cimags(z)==0) ){ + /* Cas 0^0 */ + if ( (creals(power)==0) && (cimags(power)==0) ) return FloatComplex(1,0); + /* Cas 0^x, x!=0 */ + return FloatComplex(0,0); + } + + /* Cas z!=0 */ + return cexps(cmuls(clogs(z), power)); +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/dpowa.c b/2.3-1/src/c/elementaryFunctions/pow/dpowa.c new file mode 100644 index 00000000..64e0ca9e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/dpowa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" + +void dpowa(double* x, int size, double* power, double *out) { + /* + Computes Scilab x.^power + Computes power element by element + x and power must have same size + */ + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = dpows(x[i], power[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/dpows.c b/2.3-1/src/c/elementaryFunctions/pow/dpows.c new file mode 100644 index 00000000..c291bf71 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/dpows.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "pow.h" + +double dpows(double x, double p) { + return pow(x, p); +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/spowa.c b/2.3-1/src/c/elementaryFunctions/pow/spowa.c new file mode 100644 index 00000000..3ff43ecf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/spowa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" + +void spowa(float* x, int size, float* y, float *out) { + /* + Computes Scilab x.^power + Computes power element by element + x and power must have same size + */ + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = spows(x[i], y[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/spows.c b/2.3-1/src/c/elementaryFunctions/pow/spows.c new file mode 100644 index 00000000..b218763e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/spows.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "pow.h" + +float spows(float x, float p) { + return powf(x, p); +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/testDoublePow.c b/2.3-1/src/c/elementaryFunctions/pow/testDoublePow.c new file mode 100644 index 00000000..5d0e9389 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/testDoublePow.c @@ -0,0 +1,519 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testPow.h" + +#define SOURCE {0.4672355107031762599945,0.9742379654198884963989,0.6003209394402801990509,\ +0.8107941793277859687805,0.8507457631640136241913,0.2203239351511001586914,\ +0.9582479097880423069000,0.0577683029696345329285,0.6003680988214910030365,\ +0.0178048145025968551636,0.878713116515427827835,0.9244096884503960609436,\ +0.1339239249937236309052,0.4019813351333141326904,0.9738700897432863712311,\ +0.5752419373020529747009,0.6085763848386704921722,0.5994307789951562881470,\ +0.2787468102760612964630,0.7734748693183064460754,0.1174856307916343212128,\ +0.6118692830204963684082,0.5719244205392897129059,0.4209215147420763969421,\ +0.9079484730027616024017,0.5168110188096761703491,0.7020753105171024799347,\ +0.1115869814530014991760,0.9647724027745425701141,0.9537742473185062408447,\ +0.0141105786897242069244,0.9176791971549391746521,0.8026339909993112087250,\ +0.7647842485457658767700,0.4686868679709732532501,0.1267915265634655952454,\ +0.8111716615967452526093,0.2579231262207031250000,0.5488225766457617282867,\ +0.1490072635933756828308,0.9965628399513661861420,0.0626764874905347824097,\ +0.5473734443075954914093,0.3126759985461831092835,0.4633354763500392436981,\ +0.0458269976079463958740,0.3291175127960741519928,0.7676118602976202964783,\ +0.4801639444194734096527,0.2566448096185922622681,0.1611994621343910694122,\ +0.2144636334851384162903,0.4733993145637214183807,0.370124869048595428467,\ +0.7056843214668333530426,0.6790067506954073905945,0.7920840024016797542572,\ +0.5970210935920476913452,0.7679705549962818622589,0.0501071596518158912659,\ +0.5882007922045886516571,0.5294274277985095977783,0.8948125229217112064362,\ +0.6001070654019713401794,0.6559062353335320949554,0.89065577276051044464,\ +0.4157023173756897449493,0.2063825475051999092102,0.5734984236769378185272,\ +0.6581607908010482788086,0.0213609733618795871735,0.4928230522200465202332,\ +0.9918691380880773067474,0.5282615851610898971558,0.4730890546925365924835,\ +0.6099827596917748451233,0.4131903718225657939911,0.1914102546870708465576,\ +0.5367266149260103702545,0.8726538261398673057556,0.3035852289758622646332,\ +0.3867573235183954238892,0.7349725333042442798615,0.9736115010455250740051,\ +0.8835331979207694530487,0.2047640457749366760254,0.0118132256902754306793,\ +0.9922811193391680717468,0.4397597997449338436127,0.6066115852445363998413,\ +0.9028107305057346820831,0.9170769685879349708557,0.5023606116883456707001,\ +0.6291570700705051422119,0.3050001696683466434479,0.9001630311831831932,\ +0.7309096655808389186859,0.2441865224391222000122,0.4401465845294296741486,\ +0.9633856015279889106751,0.8533022212795913219452,0.3407146632671356201172,\ +0.1051111468113958835602,0.3741277782246470451355,0.5010819151066243648529,\ +0.7990815918892621994019,0.8030767445452511310577,0.4098358312621712684631,\ +0.2850022832863032817841,0.1255963407456874847412,0.8493829430080950260162,\ +0.7299674442037940025330,0.9545726603828370571137,0.6164773050695657730103,\ +0.0457203206606209278107,0.0741118313744664192200,0.9853384527377784252167,\ +0.5198395475745201110840,0.0164341800846159458160,0.505031730048358440399,\ +0.4376457869075238704681,0.1644789781421422958374,0.8006876339204609394074,\ +0.9153772676363587379456,0.4306405331008136272430,0.5242034085094928741455,\ +0.7942340658046305179596,0.0168217038735747337341,0.0752517036162316799164,\ +0.186460481956601142883,0.6345489663071930408478,0.5303690480068325996399,\ +0.2099092262797057628632,0.1940124779939651489258,0.1230711438693106174469,\ +0.7965835509821772575378,0.7827460928820073604584,0.7284079920500516891480,\ +0.7783033107407391071320,0.5244910726323723793030,0.2240348826162517070770,\ +0.10400049015879631042,0.1135220439173281192780,0.8979023238644003868103,\ +0.6526086605153977870941,0.0412637386471033096313,0.2328471210785210132599,\ +0.7579079838469624519348,0.2600162508897483348846,0.6881541088223457336426,\ +0.8394202315248548984528,0.0802956921979784965515,0.7161618857644498348236,\ +0.3582697566598653793335,0.2494430621154606342316,0.4666389161720871925354,\ +0.9401792283169925212860,0.4545566774904727935791,0.5058247582055628299713,\ +0.8678076928481459617615,0.0802897713147103786469,0.5473116356879472732544,\ +0.1851887595839798450470,0.258651246316730976105,0.0463956105522811412811,\ +0.0752319693565368652344,0.9919890114106237888336,0.4826024798676371574402,\ +0.4391565932892262935638,0.6382622700184583663940,0.7334855501540005207062,\ +0.9849543431773781776428,0.2193018416874110698700,0.3509879373013973236084,\ +0.7693294645287096500397,0.6535580744966864585877,0.9609256512485444545746,\ +0.2253256086260080337524,0.5295072314329445362091,0.4856933178380131721497,\ +0.0325177642516791820526,0.0512604638934135437012,0.1943944268859922885895,\ +0.2998601151630282402039,0.549478018190711736679,0.7443804051727056503296,\ +0.1306688119657337665558,0.2112427735701203346252,0.4418653692118823528290,\ +0.6289571113884449005127,0.1768327937461435794830,0.0895956074818968772888,\ +0.481131290551275014877,0.6253239680081605911255,0.3720952612347900867462,\ +0.7183005558326840400696,0.6095875459723174571991,0.8103008717298507690430,\ +0.2223627963103353977203,0.8733466742560267448425} + +#define EXPAND 0.4163583382032811641693 + +#define RESULT {0.7284646681346131913415,0.989192008106873243989,0.8085895400964338008976,\ +0.9163769951101256028281,0.9349137762043832067249,0.5326945489743132311489,\ +0.9823995642201152067585,0.305083797583213633953,0.8086159867079506513576,\ +0.1868945690068203879797,0.9475895783496315338823,0.9678039608420992978566,\ +0.4329723055503270634503,0.68423899539773069822,0.9890364718108022312748,\ +0.7943497624629932696294,0.8132007898688196068093,0.808090117466149226999,\ +0.5875008761072864071906,0.8985735866087510848033,0.4099967340694569695181,\ +0.8150299171646913087841,0.7924391432248698574625,0.6974820008616173794280,\ +0.9605908201300753512797,0.7597020352483303540225,0.8630591732121281056678,\ +0.4012970358491440014959,0.9851790447321197019548,0.9804873634101264334717,\ +0.1696475368521674076394,0.9648638597435894581622,0.9125256586220036325585,\ +0.8943560812692227246501,0.7294059529194845126199,0.4232180082272890553341,\ +0.916554605507083564042,0.5688124226892673496181,0.7789513375488348323472,\ +0.4526453084551937400271,0.9985674717102872577357,0.3156199821647662773216,\ +0.7780943221002011300769,0.6162804684283178513482,0.7259267967438961521864,\ +0.2770427140579521108066,0.6295715021115366738513,0.8957313597799472226768,\ +0.7367902678841352637207,0.5676369465830355398595,0.4677127626898579526582,\ +0.5267487587241619362288,0.7324505569224598611200,0.6611168125785117366533,\ +0.8649036030014317644188,0.8511368159883252459963,0.9075123889490784856449,\ +0.8067359928657767964566,0.8959056083070979781269,0.2875361378747636753595,\ +0.8017520221011086301033,0.7673694529244873274720,0.9547798347087154136048,\ +0.8084695859896496861197,0.8389586175592145256275,0.9529306420557314138975,\ +0.6938680535086353406982,0.5183921020261006429308,0.793346444899387437388,\ +0.8401580945174779158080,0.2016154416018380302056,0.7448165896518380568736,\ +0.9966065805762621687691,0.7666654335848160917166,0.732250650546897197124,\ +0.8139827028709292200404,0.6921192559761130125295,0.5023891186631103122906,\ +0.7717567966494431885849,0.9448634993544591242909,0.6087559602629232236026,\ +0.6733278820109139806149,0.8796721878469864197569,0.9889271210673219458798,\ +0.9497503111327298963573,0.5166955674002130516342,0.157548601510365510192,\ +0.9967789108028516364968,0.7103130756882061191959,0.812106637266760356120,\ +0.9583239035572395092544,0.9646001738095134614426,0.7507845794857243015841,\ +0.8245398795703052785555,0.6099356789350187657561,0.9571527235790283638650,\ +0.8776442633914852686772,0.5559974763067492276036,0.7105731272697249911730,\ +0.9845891777882239681574,0.9360824607784468120997,0.6387148606873016554175,\ +0.3914310831295715331635,0.6640844299927105565118,0.7499883148290458212415,\ +0.9108419054310594731305,0.9127352082795270327154,0.6897741461687679764836,\ +0.5929547610295462511942,0.4215523895030350853830,0.934289925422809419686,\ +0.8771730273596389793056,0.9808290164206334704744,0.8175799454103661600968,\ +0.2767740197567316595695,0.3384295343168625125330,0.9938692202734674685516,\ +0.7615524516687232070566,0.1807639486854548671602,0.7524441192146538170960,\ +0.7088893722374375316875,0.4716512920271773157133,0.9116036713239157318611,\ +0.9638554137274480959619,0.7041427136462521385596,0.7642077184686376645217,\ +0.9085372292434992225196,0.1825266043999770881889,0.3405871110552653457937,\ +0.4969386012149143438954,0.8274746814049287468862,0.7679374104413381196821,\ +0.5220621091101612654128,0.5052216371459599120186,0.4180025804993992566416,\ +0.9096552753365539922825,0.9030424754444578150370,0.8763923131750169792653,\ +0.9009048556663895590546,0.7643822986790410611846,0.5364120201901159123992,\ +0.3897036620350837199389,0.4041799474476096554199,0.956151132910635803697,\ +0.8371998878550279687971,0.2652042210750701900501,0.5450981151899623178281,\ +0.8909992090057128333314,0.5707298363723116718660,0.8558922439179788010932,\ +0.9297114995403523707296,0.3499125215193959470561,0.8702273048082653783553,\ +0.6522163450193463329896,0.560949837269416606844,0.7280772489811332404130,\ +0.9746440403672457231110,0.7201681760891580630357,0.7529358332138126330690,\ +0.9426752591053616514571,0.3499017784013320198078,0.7780577391146925592125,\ +0.4955246248432562672370,0.5694804460964003611778,0.2784687951398606142739,\ +0.3405499204525159195889,0.9966567274503397300123,0.7383459049553654507392,\ +0.7099072481980015503211,0.8294873733988427089159,0.8789307415943956591775,\ +0.9937078900984196438984,0.5316642496139925011534,0.6466638927283177018524,\ +0.8965653157624376978774,0.8377067792805890089625,0.9835416334061796161947,\ +0.5376965838311716927578,0.7674176109757441244241,0.7403110930323951732746,\ +0.2401646248105218373059,0.2902733727718892486891,0.5056355181408417331923,\ +0.6056346866145997376307,0.7793385312672220788244,0.8843430174683920563794,\ +0.4285591961287324447305,0.5234404705944887270519,0.7117271278107557552772,\ +0.8244307605644806136169,0.4860897924292185146022,0.3662484869284197697148,\ +0.7374079263129095229701,0.8224445894290783876102,0.6625799211503411445534,\ +0.8713083765590698970271,0.8137630792596124429394,0.9161448146036499373679,\ +0.5347414781155725993500,0.9451757704519925251674} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} + +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZEXPAND DoubleComplex(0.3911314327269792556763,0.0342082274146378040314) + +#define ZRESULTR {0.8655722944852924927162,1.0080311239181567461998,0.8925609142479407065451,\ +0.9964280419988468251447,0.5571485762795388430035,0.5766215951761861635561,\ +0.8833535690601446166426,0.7551084203039666320478,0.7412402656397241162978,\ +0.7391120775302850720578,0.8861033666941620090540,0.8909045287065679996630,\ +0.9553114711351453625099,0.6535792477810216105638,0.8762967780815824614393,\ +0.6963121473209069600685,0.9071008437483685238334,0.9080649209860272019768,\ +0.7651103758972559454321,0.9246247726026085578255,0.8656267259726894147676,\ +0.8620727374643903928586,0.8030427255614291937036,1.014256580496504245303,\ +0.7887395917701954806134,0.9690769811804932354349,0.75373087988847220497,\ +0.665324036040102595457,0.8564304632009258622105,0.9943426065332526819773,\ +0.7091702303650339045404,0.7167445282856460542220,0.7911175844993063588362,\ +0.9453949687634901621891,0.6824619663334378083519,0.9058411269303636714767,\ +0.8438785717448686884978,0.8969692115256107101118,0.6070703034893107918890,\ +0.8141804062940767305889,0.7904108638330922254056,0.8517415416153172325053,\ +0.7635694344691914547951,0.9644146393547212703368,0.9063017724357406157409,\ +0.7813949726703418585672,0.9055722155740445478145,0.8821341574516833317077,\ +0.8226826712356364312839,0.6436863850966426658928,0.8232923424855791427746,\ +0.6889381687909778007040,0.6034207402867282077352,0.7986983615906712019594,\ +0.7808389246254876514541,0.9393662483390998740873,0.4756496767288962979059,\ +0.6410331785900358347874,0.5570736776954752222935,0.7962089930094966572227,\ +0.6867653317367202747690,0.9490886605505213236000,0.8617186127290810127022,\ +0.8347121855317853889034,0.6099049384775118154423,0.6446553539303585544928,\ +0.7064095183446724712795,0.8589826028412402836310,1.0333280419860488841266,\ +1.0009679370157384958873,0.3688473932823669865222,0.8275000335386157868101,\ +0.8791435711677849651480,0.8404774761127835613905,0.8221259638143403325472,\ +0.7823902259896605704270,0.5836984889260519171472,0.9624591212353429403592,\ +0.87214445216994962440,0.8101176247061679935868,0.9569519742645639093226,\ +0.8025144823533889582023,0.6640375158107885145142,0.8994725858878525048823,\ +0.9233788797234009360082,0.8679958766637961842250,0.9100186689417938401547,\ +1.0128641777475222429672,0.9127218133217330775509,0.9896138009394465084867,\ +0.9993082101967839525614,0.6972926524978265705457,0.9323806069591931144913,\ +0.8160101391916357860268,0.6998385921148442267992,0.7068441167224135401881,\ +0.7938968406481717865475,0.9874359653522727375830,1.0234238356749769671694,\ +0.9614819054159017275296,0.7753407410455703807628,0.7868519463954313231113,\ +0.9338642936617034262525,0.8994361995251628494330,0.9734883682358368428567,\ +0.9388466429512447586347,0.8625681777851778031518,0.8742421714653901831937,\ +0.7644849876693550205786,0.6546359139100853541393,0.9218660826188850299090,\ +0.8990166027048773766950,0.8711301239674282825831,0.9615090167391108222361,\ +0.7791813215771166145629,0.9117874338036765502480,0.8349616312306362697626,\ +0.5854098493033248473694,0.7781598635219196813395,0.9560498319869397132464,\ +0.8700533052058453398203,0.8046824930853576640644,0.9493290716357183356422,\ +0.6616981690563410456463,0.9011123668510968576229,0.7463274688937293621649,\ +0.8438944808683609410949,0.967670917420046960977,1.0395767162530316074509,\ +0.8807547325114291059123,0.7554892774648256370540,1.0206386037631571817030,\ +0.8053238451013553511615,0.8544388176999402340073,0.7032843861931318274472,\ +0.9661800692102989751575,0.3625289807733498292919,0.7365208997706992333221,\ +0.7641887204486981222118,0.8370383509177440339855,0.7532858906222718031742,\ +0.7301419617080030510792,0.7674102539899976260784,0.6963774291087447831927,\ +0.7363495079699874379386,0.6761329476101115565356,0.7795085331527642491523,\ +0.9796876475370105419316,0.6630224685689680708123,1.0412428453447015730404,\ +0.7007987051265935907196,0.4957725828833144943175,0.4082730584143764995808,\ +0.7838070894699612489731,0.7572068286455557739600,0.6666425764079034754772,\ +0.6381705607729424301056,0.9863693130746217230254,0.8032162659781901803413,\ +0.7816455003905713461165,0.9529341373635599188319,0.7431207805833531798712,\ +1.0315213570726253777821,0.6072910725514631957722,0.6918695596662881586170,\ +0.5400639166795813128630,0.7250562108574124531302,0.9788012629543616505146,\ +0.9194404507581022123475,0.8230461548879194344508,0.9655761323394732587033,\ +0.5404820390080352643381,0.6609198489663343778489,0.9720869068178448202389,\ +0.7269646989456197694324,1.0139914787794561679135,0.5745919175986482496654,\ +0.4679101548416189637614,0.8383907049310611592219,0.8313089288905458618117,\ +0.8000776949896156731157,0.7769598400111837888105,0.7959059962591698011991,\ +0.9044673697739834539178,0.6897306414144260822141,0.8021024469389655964235,\ +0.8925260669951027292512,0.9759461964985622905999,0.7283675470231352200301,\ +0.9471290701945646040016,0.5973840169182614845411,0.8760985519463477810831,\ +0.8416576754202981236475,0.5517569581734146355601,0.9608393360039786390558,\ +1.0156994041747668955367,0.5352727784981988756741,0.8841861277509572847322,\ +0.9348154737561720217798,0.7061621510971951565239} + +#define ZRESULTI {0.2507352759957017229731,0.2597077035238002373774,0.4311375801547998043439,\ +0.3142096700904059569659,0.1689085837110216592460,0.1485678383570865346286,\ +0.1928467320522971317764,0.4557228688087557322284,0.5147867499839029470365,\ +0.4298954588594036674287,0.3339518115646432083743,0.4361032888669963969441,\ +0.3942661152625340226230,-0.0156759414692011767034,0.4216342190154458435814,\ +0.2375262387333460234462,0.1218623208365654658758,0.2430961140393538000293,\ +0.4005557344949497444731,0.0071165503832518592006,0.1239424146890654998554,\ +0.3239999103802678193098,0.3796166421020668590991,0.3301654490061948776791,\ +0.0445509799759439481526,0.3433255246943433536266,0.5155063670908992534692,\ +0.1333705576653928526199,0.2222401853006255867395,0.2958473844131312979755,\ +0.2718238835045109769162,0.0638111633635406738652,0.2844115395647432431581,\ +0.2819711640048214729148,0.0995008638276371482068,0.3708897696809553279351,\ +0.0957826319358946326465,0.0782020197404261763197,0.1239058544887542273605,\ +0.2149541532842871305320,0.4468354605467026452459,0.3454060748345405551518,\ +0.4482667635221281310365,0.0571905015324990773085,0.3861704363530624739553,\ +0.2095642888443723650394,-0.0006474107340685887483,0.3074538897511936430540,\ +0.1416418035595575219965,0.0813510707235199914678,0.4178944079756690133110,\ +0.18311799903417008695,0.1665779146084863104882,0.4164312720201777673346,\ +0.1619976176982119708825,0.2837987818207240997559,0.1371322947622884147467,\ +0.3919995308417341117746,0.286564517326931111896,0.0947138076393856248592,\ +0.3217566148347950072406,0.2012986727837245137796,0.4147875243243727139131,\ +0.4526264616938408535951,0.2543075867710146709122,0.4351291297892320164564,\ +0.25036019692983552121,0.1367950667990639190830,0.3077766302819374688582,\ +0.1718309573016958136105,0.1360328259424684049783,0.3601092291418593882568,\ +0.115968588156260335453,0.3929767663484189932355,0.1924420270514885511481,\ +0.5251513760714544565289,0.2427797113296941700078,0.0243927289528858663725,\ +0.3014989005539743804896,0.3801688209308042853962,0.0763497789484379602021,\ +0.4062860677618788662890,0.3797590074517701586032,0.0838649495994110844022,\ +0.3295489656272450607055,0.0357665894585867810695,0.2829096131593998308951,\ +0.3209960925989643332201,0.2983490076404094470952,0.3068339844593696019715,\ +0.3442039183940806545969,0.3997229201738806136923,0.3855619142782349961784,\ +0.4583545007457388020811,0.0129171956556070680056,0.2615205358423942638702,\ +0.5091243033451308130921,0.3071680827115451650755,0.3100250105838900926969,\ +0.0221547458511593270414,0.4411750253003750010805,0.1013179671536272169474,\ +0.1255083141058383477962,0.4104233196300889341401,0.3610487505240286831842,\ +0.3169796206475462563290,0.2701202532733757433192,0.1030111453872422366818,\ +0.2857724100202110317781,-0.0183464877937233594718,0.3485944785418330638116,\ +0.0040848531118679188429,0.1134446524724902760628,0.1855694326698145713017,\ +0.3234291264874709082022,0.0223549106164038433042,0.3105918323857878027283,\ +0.0633707862092978274626,0.1386383792252010582757,0.3263302138383256667531,\ +0.1495653713305781229437,0.238933687038423103743,0.3403467519630717363910,\ +0.1069587420575875136297,0.2532367083846476796261,0.4848918076968742330024,\ +0.3344586340162984394731,0.2917134330674172049136,0.3489590836696481734869,\ +0.3396338202076644718908,0.4639844509888130796860,0.3265435199559258427904,\ +0.4050419249651691089298,0.1381892282967451812681,0.4265392723554026210842,\ +0.2540046810921274267336,0.1582030803668608431867,0.2652048658869911035296,\ +0.3681251025496489193145,0.2442033766470435018903,0.4897753247400377096810,\ +0.4969094538937048333160,0.0808848883024730763713,0.177092893746416069067,\ +0.1405588477423546367451,0.0975493235811483866415,0.5243731122097079477840,\ +0.0263866256125966647250,0.3160166163140329387282,0.3411837870670260119965,\ +0.2224220694199508796540,0.319442449785955595587,0.0331421867036013270691,\ +0.2549221660285751478448,0.2842420144041926111100,0.2302184532629851232422,\ +0.1567850704050047783156,0.2616647545633992155700,0.1906579007076603937687,\ +0.1616590279518919370805,0.1379022630075907862590,0.0139510212573068798775,\ +0.3361354155389051356906,0.2959004712785165969180,0.2703106383010808189127,\ +0.1300325021070959929936,0.4744646613374619570358,0.2895824249534337813117,\ +0.2184961358962822230989,0.426807187423937750559,0.0597990003127331498645,\ +0.2115261803479235591663,0.3963149188292993674310,0.2900288348173129526764,\ +0.0171555875146988598412,0.259954574571872487621,0.3590435173524976764092,\ +0.0046771943868099191341,0.3986564841709960838045,0.1066577525426010836229,\ +0.4571171140442078506538,0.1948069655442623004937,0.4555736953569811120701,\ +0.172447721502373058078,0.1749336453691343052,0.4380034702144764424681,\ +0.2406770716320568714863,0.2014785207952041745649,0.3725791699557115532748,\ +0.169353818078211759701,0.2485400584530522705151,0.4375888098622027211349,\ +0.2529242309847982150828,0.3057408437536958678571,0.3787762920334192262573,\ +0.3662661014371520473709,0.3241866507622078730222,0.3495665845168827723377,\ +0.3796220139680390737169,0.3208771087739308858211} + + + +void dpowsTest(void) { + double in1[]=SOURCE; + double in2=EXPAND; + double res[]=RESULT; + double out1,out2,out3; + int i; + + for (i=0;i<200;i++){ + out1=dpows(in1[i],in2); + out2=dpows(in1[i],0); + out3=dpows(in1[i],1); + + assert(( (fabs(out1-res[i]))/(fabs(out1)) )<3e-16); + assert(( (fabs(out2-1))/(fabs(out2)) )<1e-16); + assert(( (fabs(out3-in1[i]))/(fabs(out3)) )<1e-16); + } +} + +void zpowsTest(void) { + double in1R[]=ZSOURCER; + double in1I[]=ZSOURCEI; + doubleComplex in2=ZEXPAND; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in1,out; + int i; + + for (i=0;i<200;i++){ + in1=DoubleComplex(in1R[i],in1I[i]); + out=zpows(in1,in2); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dpowaTest(void) { + double in1[]=SOURCE; + double in2[200]; + double ZERO[200]={0}; + double ONE[200]; + double res[]=RESULT; + double out1[200],out2[200],out3[200]; + int i; + + for (i=0;i<200;i++) { + in2[i]=EXPAND; + ONE[i]=1; + } + dpowa(in1,200,in2,out1); + dpowa(in1,200,ZERO,out2); + dpowa(in1,200,ONE,out3); + for (i=0;i<200;i++){ + assert(( (fabs(out1[i]-res[i]))/(fabs(out1[i])) )<3e-16); + assert(( (fabs(out2[i]-1))/(fabs(out2[i])) )<1e-16); + assert(( (fabs(out3[i]-in1[i]))/(fabs(out3[i])) )<1e-16); + } +} + +void zpowaTest(void) { + double in1R[]=ZSOURCER; + double in1I[]=ZSOURCEI; + doubleComplex in2[200]; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in1,out[200]; + int i; + + for (i=0;i<200;i++) in2[i]=ZEXPAND; + in1=DoubleComplexMatrix(in1R,in1I,200); + zpowa(in1,200,in2,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testPow(void) { + printf("\n>>>> Double Powonential Tests\n"); + dpowsTest(); + zpowsTest(); + dpowaTest(); + zpowaTest(); + + return 0; +} + +int main(void) { + assert(testPow() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/testFloatPow.c b/2.3-1/src/c/elementaryFunctions/pow/testFloatPow.c new file mode 100644 index 00000000..18a5e849 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/testFloatPow.c @@ -0,0 +1,521 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testPow.h" + +#define SOURCE {0.4672355107031762599945f,0.9742379654198884963989f,0.6003209394402801990509f,\ +0.8107941793277859687805f,0.8507457631640136241913f,0.2203239351511001586914f,\ +0.9582479097880423069000f,0.0577683029696345329285f,0.6003680988214910030365f,\ +0.0178048145025968551636f,0.878713116515427827835f,0.9244096884503960609436f,\ +0.1339239249937236309052f,0.4019813351333141326904f,0.9738700897432863712311f,\ +0.5752419373020529747009f,0.6085763848386704921722f,0.5994307789951562881470f,\ +0.2787468102760612964630f,0.7734748693183064460754f,0.1174856307916343212128f,\ +0.6118692830204963684082f,0.5719244205392897129059f,0.4209215147420763969421f,\ +0.9079484730027616024017f,0.5168110188096761703491f,0.7020753105171024799347f,\ +0.1115869814530014991760f,0.9647724027745425701141f,0.9537742473185062408447f,\ +0.0141105786897242069244f,0.9176791971549391746521f,0.8026339909993112087250f,\ +0.7647842485457658767700f,0.4686868679709732532501f,0.1267915265634655952454f,\ +0.8111716615967452526093f,0.2579231262207031250000f,0.5488225766457617282867f,\ +0.1490072635933756828308f,0.9965628399513661861420f,0.0626764874905347824097f,\ +0.5473734443075954914093f,0.3126759985461831092835f,0.4633354763500392436981f,\ +0.0458269976079463958740f,0.3291175127960741519928f,0.7676118602976202964783f,\ +0.4801639444194734096527f,0.2566448096185922622681f,0.1611994621343910694122f,\ +0.2144636334851384162903f,0.4733993145637214183807f,0.370124869048595428467f,\ +0.7056843214668333530426f,0.6790067506954073905945f,0.7920840024016797542572f,\ +0.5970210935920476913452f,0.7679705549962818622589f,0.0501071596518158912659f,\ +0.5882007922045886516571f,0.5294274277985095977783f,0.8948125229217112064362f,\ +0.6001070654019713401794f,0.6559062353335320949554f,0.89065577276051044464f,\ +0.4157023173756897449493f,0.2063825475051999092102f,0.5734984236769378185272f,\ +0.6581607908010482788086f,0.0213609733618795871735f,0.4928230522200465202332f,\ +0.9918691380880773067474f,0.5282615851610898971558f,0.4730890546925365924835f,\ +0.6099827596917748451233f,0.4131903718225657939911f,0.1914102546870708465576f,\ +0.5367266149260103702545f,0.8726538261398673057556f,0.3035852289758622646332f,\ +0.3867573235183954238892f,0.7349725333042442798615f,0.9736115010455250740051f,\ +0.8835331979207694530487f,0.2047640457749366760254f,0.0118132256902754306793f,\ +0.9922811193391680717468f,0.4397597997449338436127f,0.6066115852445363998413f,\ +0.9028107305057346820831f,0.9170769685879349708557f,0.5023606116883456707001f,\ +0.6291570700705051422119f,0.3050001696683466434479f,0.9001630311831831932f,\ +0.7309096655808389186859f,0.2441865224391222000122f,0.4401465845294296741486f,\ +0.9633856015279889106751f,0.8533022212795913219452f,0.3407146632671356201172f,\ +0.1051111468113958835602f,0.3741277782246470451355f,0.5010819151066243648529f,\ +0.7990815918892621994019f,0.8030767445452511310577f,0.4098358312621712684631f,\ +0.2850022832863032817841f,0.1255963407456874847412f,0.8493829430080950260162f,\ +0.7299674442037940025330f,0.9545726603828370571137f,0.6164773050695657730103f,\ +0.0457203206606209278107f,0.0741118313744664192200f,0.9853384527377784252167f,\ +0.5198395475745201110840f,0.0164341800846159458160f,0.505031730048358440399f,\ +0.4376457869075238704681f,0.1644789781421422958374f,0.8006876339204609394074f,\ +0.9153772676363587379456f,0.4306405331008136272430f,0.5242034085094928741455f,\ +0.7942340658046305179596f,0.0168217038735747337341f,0.0752517036162316799164f,\ +0.186460481956601142883f,0.6345489663071930408478f,0.5303690480068325996399f,\ +0.2099092262797057628632f,0.1940124779939651489258f,0.1230711438693106174469f,\ +0.7965835509821772575378f,0.7827460928820073604584f,0.7284079920500516891480f,\ +0.7783033107407391071320f,0.5244910726323723793030f,0.2240348826162517070770f,\ +0.10400049015879631042f,0.1135220439173281192780f,0.8979023238644003868103f,\ +0.6526086605153977870941f,0.0412637386471033096313f,0.2328471210785210132599f,\ +0.7579079838469624519348f,0.2600162508897483348846f,0.6881541088223457336426f,\ +0.8394202315248548984528f,0.0802956921979784965515f,0.7161618857644498348236f,\ +0.3582697566598653793335f,0.2494430621154606342316f,0.4666389161720871925354f,\ +0.9401792283169925212860f,0.4545566774904727935791f,0.5058247582055628299713f,\ +0.8678076928481459617615f,0.0802897713147103786469f,0.5473116356879472732544f,\ +0.1851887595839798450470f,0.258651246316730976105f,0.0463956105522811412811f,\ +0.0752319693565368652344f,0.9919890114106237888336f,0.4826024798676371574402f,\ +0.4391565932892262935638f,0.6382622700184583663940f,0.7334855501540005207062f,\ +0.9849543431773781776428f,0.2193018416874110698700f,0.3509879373013973236084f,\ +0.7693294645287096500397f,0.6535580744966864585877f,0.9609256512485444545746f,\ +0.2253256086260080337524f,0.5295072314329445362091f,0.4856933178380131721497f,\ +0.0325177642516791820526f,0.0512604638934135437012f,0.1943944268859922885895f,\ +0.2998601151630282402039f,0.549478018190711736679f,0.7443804051727056503296f,\ +0.1306688119657337665558f,0.2112427735701203346252f,0.4418653692118823528290f,\ +0.6289571113884449005127f,0.1768327937461435794830f,0.0895956074818968772888f,\ +0.481131290551275014877f,0.6253239680081605911255f,0.3720952612347900867462f,\ +0.7183005558326840400696f,0.6095875459723174571991f,0.8103008717298507690430f,\ +0.2223627963103353977203f,0.8733466742560267448425f} + +#define EXPAND 0.4163583382032811641693f + +#define RESULT {0.7284646681346131913415f,0.989192008106873243989f,0.8085895400964338008976f,\ +0.9163769951101256028281f,0.9349137762043832067249f,0.5326945489743132311489f,\ +0.9823995642201152067585f,0.305083797583213633953f,0.8086159867079506513576f,\ +0.1868945690068203879797f,0.9475895783496315338823f,0.9678039608420992978566f,\ +0.4329723055503270634503f,0.68423899539773069822f,0.9890364718108022312748f,\ +0.7943497624629932696294f,0.8132007898688196068093f,0.808090117466149226999f,\ +0.5875008761072864071906f,0.8985735866087510848033f,0.4099967340694569695181f,\ +0.8150299171646913087841f,0.7924391432248698574625f,0.6974820008616173794280f,\ +0.9605908201300753512797f,0.7597020352483303540225f,0.8630591732121281056678f,\ +0.4012970358491440014959f,0.9851790447321197019548f,0.9804873634101264334717f,\ +0.1696475368521674076394f,0.9648638597435894581622f,0.9125256586220036325585f,\ +0.8943560812692227246501f,0.7294059529194845126199f,0.4232180082272890553341f,\ +0.916554605507083564042f,0.5688124226892673496181f,0.7789513375488348323472f,\ +0.4526453084551937400271f,0.9985674717102872577357f,0.3156199821647662773216f,\ +0.7780943221002011300769f,0.6162804684283178513482f,0.7259267967438961521864f,\ +0.2770427140579521108066f,0.6295715021115366738513f,0.8957313597799472226768f,\ +0.7367902678841352637207f,0.5676369465830355398595f,0.4677127626898579526582f,\ +0.5267487587241619362288f,0.7324505569224598611200f,0.6611168125785117366533f,\ +0.8649036030014317644188f,0.8511368159883252459963f,0.9075123889490784856449f,\ +0.8067359928657767964566f,0.8959056083070979781269f,0.2875361378747636753595f,\ +0.8017520221011086301033f,0.7673694529244873274720f,0.9547798347087154136048f,\ +0.8084695859896496861197f,0.8389586175592145256275f,0.9529306420557314138975f,\ +0.6938680535086353406982f,0.5183921020261006429308f,0.793346444899387437388f,\ +0.8401580945174779158080f,0.2016154416018380302056f,0.7448165896518380568736f,\ +0.9966065805762621687691f,0.7666654335848160917166f,0.732250650546897197124f,\ +0.8139827028709292200404f,0.6921192559761130125295f,0.5023891186631103122906f,\ +0.7717567966494431885849f,0.9448634993544591242909f,0.6087559602629232236026f,\ +0.6733278820109139806149f,0.8796721878469864197569f,0.9889271210673219458798f,\ +0.9497503111327298963573f,0.5166955674002130516342f,0.157548601510365510192f,\ +0.9967789108028516364968f,0.7103130756882061191959f,0.812106637266760356120f,\ +0.9583239035572395092544f,0.9646001738095134614426f,0.7507845794857243015841f,\ +0.8245398795703052785555f,0.6099356789350187657561f,0.9571527235790283638650f,\ +0.8776442633914852686772f,0.5559974763067492276036f,0.7105731272697249911730f,\ +0.9845891777882239681574f,0.9360824607784468120997f,0.6387148606873016554175f,\ +0.3914310831295715331635f,0.6640844299927105565118f,0.7499883148290458212415f,\ +0.9108419054310594731305f,0.9127352082795270327154f,0.6897741461687679764836f,\ +0.5929547610295462511942f,0.4215523895030350853830f,0.934289925422809419686f,\ +0.8771730273596389793056f,0.9808290164206334704744f,0.8175799454103661600968f,\ +0.2767740197567316595695f,0.3384295343168625125330f,0.9938692202734674685516f,\ +0.7615524516687232070566f,0.1807639486854548671602f,0.7524441192146538170960f,\ +0.7088893722374375316875f,0.4716512920271773157133f,0.9116036713239157318611f,\ +0.9638554137274480959619f,0.7041427136462521385596f,0.7642077184686376645217f,\ +0.9085372292434992225196f,0.1825266043999770881889f,0.3405871110552653457937f,\ +0.4969386012149143438954f,0.8274746814049287468862f,0.7679374104413381196821f,\ +0.5220621091101612654128f,0.5052216371459599120186f,0.4180025804993992566416f,\ +0.9096552753365539922825f,0.9030424754444578150370f,0.8763923131750169792653f,\ +0.9009048556663895590546f,0.7643822986790410611846f,0.5364120201901159123992f,\ +0.3897036620350837199389f,0.4041799474476096554199f,0.956151132910635803697f,\ +0.8371998878550279687971f,0.2652042210750701900501f,0.5450981151899623178281f,\ +0.8909992090057128333314f,0.5707298363723116718660f,0.8558922439179788010932f,\ +0.9297114995403523707296f,0.3499125215193959470561f,0.8702273048082653783553f,\ +0.6522163450193463329896f,0.560949837269416606844f,0.7280772489811332404130f,\ +0.9746440403672457231110f,0.7201681760891580630357f,0.7529358332138126330690f,\ +0.9426752591053616514571f,0.3499017784013320198078f,0.7780577391146925592125f,\ +0.4955246248432562672370f,0.5694804460964003611778f,0.2784687951398606142739f,\ +0.3405499204525159195889f,0.9966567274503397300123f,0.7383459049553654507392f,\ +0.7099072481980015503211f,0.8294873733988427089159f,0.8789307415943956591775f,\ +0.9937078900984196438984f,0.5316642496139925011534f,0.6466638927283177018524f,\ +0.8965653157624376978774f,0.8377067792805890089625f,0.9835416334061796161947f,\ +0.5376965838311716927578f,0.7674176109757441244241f,0.7403110930323951732746f,\ +0.2401646248105218373059f,0.2902733727718892486891f,0.5056355181408417331923f,\ +0.6056346866145997376307f,0.7793385312672220788244f,0.8843430174683920563794f,\ +0.4285591961287324447305f,0.5234404705944887270519f,0.7117271278107557552772f,\ +0.8244307605644806136169f,0.4860897924292185146022f,0.3662484869284197697148f,\ +0.7374079263129095229701f,0.8224445894290783876102f,0.6625799211503411445534f,\ +0.8713083765590698970271f,0.8137630792596124429394f,0.9161448146036499373679f,\ +0.5347414781155725993500f,0.9451757704519925251674f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} + +#define CEXPAND FloatComplex(0.3911314327269792556763f,0.0342082274146378040314f) + +#define CRESULTR {0.8655722944852924927162f,1.0080311239181567461998f,0.8925609142479407065451f,\ +0.9964280419988468251447f,0.5571485762795388430035f,0.5766215951761861635561f,\ +0.8833535690601446166426f,0.7551084203039666320478f,0.7412402656397241162978f,\ +0.7391120775302850720578f,0.8861033666941620090540f,0.8909045287065679996630f,\ +0.9553114711351453625099f,0.6535792477810216105638f,0.8762967780815824614393f,\ +0.6963121473209069600685f,0.9071008437483685238334f,0.9080649209860272019768f,\ +0.7651103758972559454321f,0.9246247726026085578255f,0.8656267259726894147676f,\ +0.8620727374643903928586f,0.8030427255614291937036f,1.014256580496504245303f,\ +0.7887395917701954806134f,0.9690769811804932354349f,0.75373087988847220497f,\ +0.665324036040102595457f,0.8564304632009258622105f,0.9943426065332526819773f,\ +0.7091702303650339045404f,0.7167445282856460542220f,0.7911175844993063588362f,\ +0.9453949687634901621891f,0.6824619663334378083519f,0.9058411269303636714767f,\ +0.8438785717448686884978f,0.8969692115256107101118f,0.6070703034893107918890f,\ +0.8141804062940767305889f,0.7904108638330922254056f,0.8517415416153172325053f,\ +0.7635694344691914547951f,0.9644146393547212703368f,0.9063017724357406157409f,\ +0.7813949726703418585672f,0.9055722155740445478145f,0.8821341574516833317077f,\ +0.8226826712356364312839f,0.6436863850966426658928f,0.8232923424855791427746f,\ +0.6889381687909778007040f,0.6034207402867282077352f,0.7986983615906712019594f,\ +0.7808389246254876514541f,0.9393662483390998740873f,0.4756496767288962979059f,\ +0.6410331785900358347874f,0.5570736776954752222935f,0.7962089930094966572227f,\ +0.6867653317367202747690f,0.9490886605505213236000f,0.8617186127290810127022f,\ +0.8347121855317853889034f,0.6099049384775118154423f,0.6446553539303585544928f,\ +0.7064095183446724712795f,0.8589826028412402836310f,1.0333280419860488841266f,\ +1.0009679370157384958873f,0.3688473932823669865222f,0.8275000335386157868101f,\ +0.8791435711677849651480f,0.8404774761127835613905f,0.8221259638143403325472f,\ +0.7823902259896605704270f,0.5836984889260519171472f,0.9624591212353429403592f,\ +0.87214445216994962440f,0.8101176247061679935868f,0.9569519742645639093226f,\ +0.8025144823533889582023f,0.6640375158107885145142f,0.8994725858878525048823f,\ +0.9233788797234009360082f,0.8679958766637961842250f,0.9100186689417938401547f,\ +1.0128641777475222429672f,0.9127218133217330775509f,0.9896138009394465084867f,\ +0.9993082101967839525614f,0.6972926524978265705457f,0.9323806069591931144913f,\ +0.8160101391916357860268f,0.6998385921148442267992f,0.7068441167224135401881f,\ +0.7938968406481717865475f,0.9874359653522727375830f,1.0234238356749769671694f,\ +0.9614819054159017275296f,0.7753407410455703807628f,0.7868519463954313231113f,\ +0.9338642936617034262525f,0.8994361995251628494330f,0.9734883682358368428567f,\ +0.9388466429512447586347f,0.8625681777851778031518f,0.8742421714653901831937f,\ +0.7644849876693550205786f,0.6546359139100853541393f,0.9218660826188850299090f,\ +0.8990166027048773766950f,0.8711301239674282825831f,0.9615090167391108222361f,\ +0.7791813215771166145629f,0.9117874338036765502480f,0.8349616312306362697626f,\ +0.5854098493033248473694f,0.7781598635219196813395f,0.9560498319869397132464f,\ +0.8700533052058453398203f,0.8046824930853576640644f,0.9493290716357183356422f,\ +0.6616981690563410456463f,0.9011123668510968576229f,0.7463274688937293621649f,\ +0.8438944808683609410949f,0.967670917420046960977f,1.0395767162530316074509f,\ +0.8807547325114291059123f,0.7554892774648256370540f,1.0206386037631571817030f,\ +0.8053238451013553511615f,0.8544388176999402340073f,0.7032843861931318274472f,\ +0.9661800692102989751575f,0.3625289807733498292919f,0.7365208997706992333221f,\ +0.7641887204486981222118f,0.8370383509177440339855f,0.7532858906222718031742f,\ +0.7301419617080030510792f,0.7674102539899976260784f,0.6963774291087447831927f,\ +0.7363495079699874379386f,0.6761329476101115565356f,0.7795085331527642491523f,\ +0.9796876475370105419316f,0.6630224685689680708123f,1.0412428453447015730404f,\ +0.7007987051265935907196f,0.4957725828833144943175f,0.4082730584143764995808f,\ +0.7838070894699612489731f,0.7572068286455557739600f,0.6666425764079034754772f,\ +0.6381705607729424301056f,0.9863693130746217230254f,0.8032162659781901803413f,\ +0.7816455003905713461165f,0.9529341373635599188319f,0.7431207805833531798712f,\ +1.0315213570726253777821f,0.6072910725514631957722f,0.6918695596662881586170f,\ +0.5400639166795813128630f,0.7250562108574124531302f,0.9788012629543616505146f,\ +0.9194404507581022123475f,0.8230461548879194344508f,0.9655761323394732587033f,\ +0.5404820390080352643381f,0.6609198489663343778489f,0.9720869068178448202389f,\ +0.7269646989456197694324f,1.0139914787794561679135f,0.5745919175986482496654f,\ +0.4679101548416189637614f,0.8383907049310611592219f,0.8313089288905458618117f,\ +0.8000776949896156731157f,0.7769598400111837888105f,0.7959059962591698011991f,\ +0.9044673697739834539178f,0.6897306414144260822141f,0.8021024469389655964235f,\ +0.8925260669951027292512f,0.9759461964985622905999f,0.7283675470231352200301f,\ +0.9471290701945646040016f,0.5973840169182614845411f,0.8760985519463477810831f,\ +0.8416576754202981236475f,0.5517569581734146355601f,0.9608393360039786390558f,\ +1.0156994041747668955367f,0.5352727784981988756741f,0.8841861277509572847322f,\ +0.9348154737561720217798f,0.7061621510971951565239f} + +#define CRESULTI {0.2507352759957017229731f,0.2597077035238002373774f,0.4311375801547998043439f,\ +0.3142096700904059569659f,0.1689085837110216592460f,0.1485678383570865346286f,\ +0.1928467320522971317764f,0.4557228688087557322284f,0.5147867499839029470365f,\ +0.4298954588594036674287f,0.3339518115646432083743f,0.4361032888669963969441f,\ +0.3942661152625340226230f,-0.0156759414692011767034f,0.4216342190154458435814f,\ +0.2375262387333460234462f,0.1218623208365654658758f,0.2430961140393538000293f,\ +0.4005557344949497444731f,0.0071165503832518592006f,0.1239424146890654998554f,\ +0.3239999103802678193098f,0.3796166421020668590991f,0.3301654490061948776791f,\ +0.0445509799759439481526f,0.3433255246943433536266f,0.5155063670908992534692f,\ +0.1333705576653928526199f,0.2222401853006255867395f,0.2958473844131312979755f,\ +0.2718238835045109769162f,0.0638111633635406738652f,0.2844115395647432431581f,\ +0.2819711640048214729148f,0.0995008638276371482068f,0.3708897696809553279351f,\ +0.0957826319358946326465f,0.0782020197404261763197f,0.1239058544887542273605f,\ +0.2149541532842871305320f,0.4468354605467026452459f,0.3454060748345405551518f,\ +0.4482667635221281310365f,0.0571905015324990773085f,0.3861704363530624739553f,\ +0.2095642888443723650394f,-0.0006474107340685887483f,0.3074538897511936430540f,\ +0.1416418035595575219965f,0.0813510707235199914678f,0.4178944079756690133110f,\ +0.18311799903417008695f,0.1665779146084863104882f,0.4164312720201777673346f,\ +0.1619976176982119708825f,0.2837987818207240997559f,0.1371322947622884147467f,\ +0.3919995308417341117746f,0.286564517326931111896f,0.0947138076393856248592f,\ +0.3217566148347950072406f,0.2012986727837245137796f,0.4147875243243727139131f,\ +0.4526264616938408535951f,0.2543075867710146709122f,0.4351291297892320164564f,\ +0.25036019692983552121f,0.1367950667990639190830f,0.3077766302819374688582f,\ +0.1718309573016958136105f,0.1360328259424684049783f,0.3601092291418593882568f,\ +0.115968588156260335453f,0.3929767663484189932355f,0.1924420270514885511481f,\ +0.5251513760714544565289f,0.2427797113296941700078f,0.0243927289528858663725f,\ +0.3014989005539743804896f,0.3801688209308042853962f,0.0763497789484379602021f,\ +0.4062860677618788662890f,0.3797590074517701586032f,0.0838649495994110844022f,\ +0.3295489656272450607055f,0.0357665894585867810695f,0.2829096131593998308951f,\ +0.3209960925989643332201f,0.2983490076404094470952f,0.3068339844593696019715f,\ +0.3442039183940806545969f,0.3997229201738806136923f,0.3855619142782349961784f,\ +0.4583545007457388020811f,0.0129171956556070680056f,0.2615205358423942638702f,\ +0.5091243033451308130921f,0.3071680827115451650755f,0.3100250105838900926969f,\ +0.0221547458511593270414f,0.4411750253003750010805f,0.1013179671536272169474f,\ +0.1255083141058383477962f,0.4104233196300889341401f,0.3610487505240286831842f,\ +0.3169796206475462563290f,0.2701202532733757433192f,0.1030111453872422366818f,\ +0.2857724100202110317781f,-0.0183464877937233594718f,0.3485944785418330638116f,\ +0.0040848531118679188429f,0.1134446524724902760628f,0.1855694326698145713017f,\ +0.3234291264874709082022f,0.0223549106164038433042f,0.3105918323857878027283f,\ +0.0633707862092978274626f,0.1386383792252010582757f,0.3263302138383256667531f,\ +0.1495653713305781229437f,0.238933687038423103743f,0.3403467519630717363910f,\ +0.1069587420575875136297f,0.2532367083846476796261f,0.4848918076968742330024f,\ +0.3344586340162984394731f,0.2917134330674172049136f,0.3489590836696481734869f,\ +0.3396338202076644718908f,0.4639844509888130796860f,0.3265435199559258427904f,\ +0.4050419249651691089298f,0.1381892282967451812681f,0.4265392723554026210842f,\ +0.2540046810921274267336f,0.1582030803668608431867f,0.2652048658869911035296f,\ +0.3681251025496489193145f,0.2442033766470435018903f,0.4897753247400377096810f,\ +0.4969094538937048333160f,0.0808848883024730763713f,0.177092893746416069067f,\ +0.1405588477423546367451f,0.0975493235811483866415f,0.5243731122097079477840f,\ +0.0263866256125966647250f,0.3160166163140329387282f,0.3411837870670260119965f,\ +0.2224220694199508796540f,0.319442449785955595587f,0.0331421867036013270691f,\ +0.2549221660285751478448f,0.2842420144041926111100f,0.2302184532629851232422f,\ +0.1567850704050047783156f,0.2616647545633992155700f,0.1906579007076603937687f,\ +0.1616590279518919370805f,0.1379022630075907862590f,0.0139510212573068798775f,\ +0.3361354155389051356906f,0.2959004712785165969180f,0.2703106383010808189127f,\ +0.1300325021070959929936f,0.4744646613374619570358f,0.2895824249534337813117f,\ +0.2184961358962822230989f,0.426807187423937750559f,0.0597990003127331498645f,\ +0.2115261803479235591663f,0.3963149188292993674310f,0.2900288348173129526764f,\ +0.0171555875146988598412f,0.259954574571872487621f,0.3590435173524976764092f,\ +0.0046771943868099191341f,0.3986564841709960838045f,0.1066577525426010836229f,\ +0.4571171140442078506538f,0.1948069655442623004937f,0.4555736953569811120701f,\ +0.172447721502373058078f,0.1749336453691343052f,0.4380034702144764424681f,\ +0.2406770716320568714863f,0.2014785207952041745649f,0.3725791699557115532748f,\ +0.169353818078211759701f,0.2485400584530522705151f,0.4375888098622027211349f,\ +0.2529242309847982150828f,0.3057408437536958678571f,0.3787762920334192262573f,\ +0.3662661014371520473709f,0.3241866507622078730222f,0.3495665845168827723377f,\ +0.3796220139680390737169f,0.3208771087739308858211f} + + + +void spowsTest(void) { + float in1[]=SOURCE; + float in2=EXPAND; + float res[]=RESULT; + float out1,out2,out3; + int i; + + for (i=0;i<200;i++){ + out1=spows(in1[i],in2); + out2=spows(in1[i],0); + out3=spows(in1[i],1); + + assert(( (fabs(out1-res[i]))/(fabs(out1)) )<1e-6); + assert(( (fabs(out2-1))/(fabs(out2)) )<1e-16); + assert(( (fabs(out3-in1[i]))/(fabs(out3)) )<1e-16); + } +} + + +void cpowsTest(void) { + float in1R[]=CSOURCER; + float in1I[]=CSOURCEI; + floatComplex in2=CEXPAND; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in1,out; + int i; + + for (i=0;i<200;i++){ + in1=FloatComplex(in1R[i],in1I[i]); + out=cpows(in1,in2); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-5); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-5); + } +} + +void spowaTest(void) { + float in1[]=SOURCE; + float in2[200]; + float ZERO[200]={0}; + float ONE[200]; + float res[]=RESULT; + float out1[200],out2[200],out3[200]; + int i; + + for (i=0;i<200;i++) { + in2[i]=EXPAND; + ONE[i]=1; + } + spowa(in1,200,in2,out1); + spowa(in1,200,ZERO,out2); + spowa(in1,200,ONE,out3); + for (i=0;i<200;i++){ + assert(( (fabs(out1[i]-res[i]))/(fabs(out1[i])) )<1e-6); + assert(( (fabs(out2[i]-1))/(fabs(out2[i])) )<1e-16); + assert(( (fabs(out3[i]-in1[i]))/(fabs(out3[i])) )<1e-16); + } +} + +void cpowaTest(void) { + float in1R[]=CSOURCER; + float in1I[]=CSOURCEI; + floatComplex in2[200]; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in1, out[200]; + int i; + + for (i=0;i<200;i++) in2[i]=CEXPAND; + in1=FloatComplexMatrix(in1R,in1I,200); + cpowa(in1,200,in2,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testPow(void) { + printf("\n>>>> Powonential Tests\n"); + spowsTest(); + + cpowsTest(); + spowaTest(); + cpowaTest(); + + return 0; +} + +int main(void) { + assert(testPow() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/testPow.h b/2.3-1/src/c/elementaryFunctions/pow/testPow.h new file mode 100644 index 00000000..700909f0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/testPow.h @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTPOW_H_ +#define _TESTPOW_H_ + +#include +#include +#include +#include "pow.h" +#include "constant.h" + + +void spowsTest(void); + +void dpowsTest(void); + +void cpowsTest(void); + +void zpowsTest(void); + +void spowaTest(void); + +void dpowaTest(void); + +void cpowaTest(void); + +void zpowaTest(void); + +int testPow(void); + +#endif /* ! _TESTPOW_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/pow/zpowa.c b/2.3-1/src/c/elementaryFunctions/pow/zpowa.c new file mode 100644 index 00000000..ace264de --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/zpowa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" + +void zpowa(doubleComplex* x, int size, doubleComplex* y, doubleComplex *out) { + /* + Computes Scilab x.^power + Computes power element by element + x and power must have same size + */ + int i = 0; + for (i = 0; i < size; ++i) { + out[i] = zpows(x[i], y[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/pow/zpows.c b/2.3-1/src/c/elementaryFunctions/pow/zpows.c new file mode 100644 index 00000000..1a7059b2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/pow/zpows.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "pow.h" +#include "log.h" +#include "exp.h" + +doubleComplex zpows(doubleComplex z, doubleComplex power) { + /*Cas z=0 */ + if ( (zreals(z)==0) && (zimags(z)==0) ){ + /* Cas 0^0 */ + if ( (zreals(power)==0) && (zimags(power)==0) ) return DoubleComplex(1,0); + /* Cas 0^x, x!=0 */ + return DoubleComplex(0,0); + } + + /* Cas z!=0 */ + return zexps(zmuls(zlogs(z), power)); +} diff --git a/2.3-1/src/c/elementaryFunctions/round/Makefile.am b/2.3-1/src/c/elementaryFunctions/round/Makefile.am new file mode 100644 index 00000000..12ee342a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/Makefile.am @@ -0,0 +1,59 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libRound_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libRound.la + +libRound_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/round.h + +SRC = srounds.c \ + drounds.c \ + crounds.c \ + zrounds.c \ + srounda.c \ + drounda.c \ + crounda.c \ + zrounda.c + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/round/libRound.la + +check_PROGRAMS = testFloatRound testDoubleRound + +TESTS = testFloatRound testDoubleRound + +# +# -*- Round Tests -*- +# +testFloatRound_SOURCES = testFloatRound.c +testFloatRound_CFLAGS = $(check_INCLUDES) +testFloatRound_LDADD = $(check_LDADD) + +testDoubleRound_SOURCES = testDoubleRound.c +testDoubleRound_CFLAGS = $(check_INCLUDES) +testDoubleRound_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/round/Makefile.in b/2.3-1/src/c/elementaryFunctions/round/Makefile.in new file mode 100644 index 00000000..f81b1ff8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/Makefile.in @@ -0,0 +1,786 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatRound$(EXEEXT) testDoubleRound$(EXEEXT) +TESTS = testFloatRound$(EXEEXT) testDoubleRound$(EXEEXT) +subdir = src/c/elementaryFunctions/round +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libRound_la_LIBADD = +am__objects_1 = +am__objects_2 = libRound_la-srounds.lo libRound_la-drounds.lo \ + libRound_la-crounds.lo libRound_la-zrounds.lo \ + libRound_la-srounda.lo libRound_la-drounda.lo \ + libRound_la-crounda.lo libRound_la-zrounda.lo +am_libRound_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libRound_la_OBJECTS = $(am_libRound_la_OBJECTS) +libRound_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libRound_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleRound_OBJECTS = \ + testDoubleRound-testDoubleRound.$(OBJEXT) +testDoubleRound_OBJECTS = $(am_testDoubleRound_OBJECTS) +testDoubleRound_DEPENDENCIES = $(check_LDADD) +testDoubleRound_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleRound_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatRound_OBJECTS = testFloatRound-testFloatRound.$(OBJEXT) +testFloatRound_OBJECTS = $(am_testFloatRound_OBJECTS) +testFloatRound_DEPENDENCIES = $(check_LDADD) +testFloatRound_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatRound_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libRound_la_SOURCES) $(testDoubleRound_SOURCES) \ + $(testFloatRound_SOURCES) +DIST_SOURCES = $(libRound_la_SOURCES) $(testDoubleRound_SOURCES) \ + $(testFloatRound_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libRound_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libRound.la +libRound_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/round.h +SRC = srounds.c \ + drounds.c \ + crounds.c \ + zrounds.c \ + srounda.c \ + drounda.c \ + crounda.c \ + zrounda.c + + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/round/libRound.la + + +# +# -*- Round Tests -*- +# +testFloatRound_SOURCES = testFloatRound.c +testFloatRound_CFLAGS = $(check_INCLUDES) +testFloatRound_LDADD = $(check_LDADD) +testDoubleRound_SOURCES = testDoubleRound.c +testDoubleRound_CFLAGS = $(check_INCLUDES) +testDoubleRound_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/round/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/round/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libRound.la: $(libRound_la_OBJECTS) $(libRound_la_DEPENDENCIES) + $(libRound_la_LINK) -rpath $(pkglibdir) $(libRound_la_OBJECTS) $(libRound_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleRound$(EXEEXT): $(testDoubleRound_OBJECTS) $(testDoubleRound_DEPENDENCIES) + @rm -f testDoubleRound$(EXEEXT) + $(testDoubleRound_LINK) $(testDoubleRound_OBJECTS) $(testDoubleRound_LDADD) $(LIBS) +testFloatRound$(EXEEXT): $(testFloatRound_OBJECTS) $(testFloatRound_DEPENDENCIES) + @rm -f testFloatRound$(EXEEXT) + $(testFloatRound_LINK) $(testFloatRound_OBJECTS) $(testFloatRound_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-crounda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-crounds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-drounda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-drounds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-srounda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-srounds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-zrounda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libRound_la-zrounds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleRound-testDoubleRound.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatRound-testFloatRound.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libRound_la-srounds.lo: srounds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-srounds.lo -MD -MP -MF $(DEPDIR)/libRound_la-srounds.Tpo -c -o libRound_la-srounds.lo `test -f 'srounds.c' || echo '$(srcdir)/'`srounds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-srounds.Tpo $(DEPDIR)/libRound_la-srounds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srounds.c' object='libRound_la-srounds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-srounds.lo `test -f 'srounds.c' || echo '$(srcdir)/'`srounds.c + +libRound_la-drounds.lo: drounds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-drounds.lo -MD -MP -MF $(DEPDIR)/libRound_la-drounds.Tpo -c -o libRound_la-drounds.lo `test -f 'drounds.c' || echo '$(srcdir)/'`drounds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-drounds.Tpo $(DEPDIR)/libRound_la-drounds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drounds.c' object='libRound_la-drounds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-drounds.lo `test -f 'drounds.c' || echo '$(srcdir)/'`drounds.c + +libRound_la-crounds.lo: crounds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-crounds.lo -MD -MP -MF $(DEPDIR)/libRound_la-crounds.Tpo -c -o libRound_la-crounds.lo `test -f 'crounds.c' || echo '$(srcdir)/'`crounds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-crounds.Tpo $(DEPDIR)/libRound_la-crounds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crounds.c' object='libRound_la-crounds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-crounds.lo `test -f 'crounds.c' || echo '$(srcdir)/'`crounds.c + +libRound_la-zrounds.lo: zrounds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-zrounds.lo -MD -MP -MF $(DEPDIR)/libRound_la-zrounds.Tpo -c -o libRound_la-zrounds.lo `test -f 'zrounds.c' || echo '$(srcdir)/'`zrounds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-zrounds.Tpo $(DEPDIR)/libRound_la-zrounds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrounds.c' object='libRound_la-zrounds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-zrounds.lo `test -f 'zrounds.c' || echo '$(srcdir)/'`zrounds.c + +libRound_la-srounda.lo: srounda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-srounda.lo -MD -MP -MF $(DEPDIR)/libRound_la-srounda.Tpo -c -o libRound_la-srounda.lo `test -f 'srounda.c' || echo '$(srcdir)/'`srounda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-srounda.Tpo $(DEPDIR)/libRound_la-srounda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srounda.c' object='libRound_la-srounda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-srounda.lo `test -f 'srounda.c' || echo '$(srcdir)/'`srounda.c + +libRound_la-drounda.lo: drounda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-drounda.lo -MD -MP -MF $(DEPDIR)/libRound_la-drounda.Tpo -c -o libRound_la-drounda.lo `test -f 'drounda.c' || echo '$(srcdir)/'`drounda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-drounda.Tpo $(DEPDIR)/libRound_la-drounda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drounda.c' object='libRound_la-drounda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-drounda.lo `test -f 'drounda.c' || echo '$(srcdir)/'`drounda.c + +libRound_la-crounda.lo: crounda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-crounda.lo -MD -MP -MF $(DEPDIR)/libRound_la-crounda.Tpo -c -o libRound_la-crounda.lo `test -f 'crounda.c' || echo '$(srcdir)/'`crounda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-crounda.Tpo $(DEPDIR)/libRound_la-crounda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crounda.c' object='libRound_la-crounda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-crounda.lo `test -f 'crounda.c' || echo '$(srcdir)/'`crounda.c + +libRound_la-zrounda.lo: zrounda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -MT libRound_la-zrounda.lo -MD -MP -MF $(DEPDIR)/libRound_la-zrounda.Tpo -c -o libRound_la-zrounda.lo `test -f 'zrounda.c' || echo '$(srcdir)/'`zrounda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libRound_la-zrounda.Tpo $(DEPDIR)/libRound_la-zrounda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrounda.c' object='libRound_la-zrounda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libRound_la_CFLAGS) $(CFLAGS) -c -o libRound_la-zrounda.lo `test -f 'zrounda.c' || echo '$(srcdir)/'`zrounda.c + +testDoubleRound-testDoubleRound.o: testDoubleRound.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleRound_CFLAGS) $(CFLAGS) -MT testDoubleRound-testDoubleRound.o -MD -MP -MF $(DEPDIR)/testDoubleRound-testDoubleRound.Tpo -c -o testDoubleRound-testDoubleRound.o `test -f 'testDoubleRound.c' || echo '$(srcdir)/'`testDoubleRound.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleRound-testDoubleRound.Tpo $(DEPDIR)/testDoubleRound-testDoubleRound.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleRound.c' object='testDoubleRound-testDoubleRound.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleRound_CFLAGS) $(CFLAGS) -c -o testDoubleRound-testDoubleRound.o `test -f 'testDoubleRound.c' || echo '$(srcdir)/'`testDoubleRound.c + +testDoubleRound-testDoubleRound.obj: testDoubleRound.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleRound_CFLAGS) $(CFLAGS) -MT testDoubleRound-testDoubleRound.obj -MD -MP -MF $(DEPDIR)/testDoubleRound-testDoubleRound.Tpo -c -o testDoubleRound-testDoubleRound.obj `if test -f 'testDoubleRound.c'; then $(CYGPATH_W) 'testDoubleRound.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleRound.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleRound-testDoubleRound.Tpo $(DEPDIR)/testDoubleRound-testDoubleRound.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleRound.c' object='testDoubleRound-testDoubleRound.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleRound_CFLAGS) $(CFLAGS) -c -o testDoubleRound-testDoubleRound.obj `if test -f 'testDoubleRound.c'; then $(CYGPATH_W) 'testDoubleRound.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleRound.c'; fi` + +testFloatRound-testFloatRound.o: testFloatRound.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatRound_CFLAGS) $(CFLAGS) -MT testFloatRound-testFloatRound.o -MD -MP -MF $(DEPDIR)/testFloatRound-testFloatRound.Tpo -c -o testFloatRound-testFloatRound.o `test -f 'testFloatRound.c' || echo '$(srcdir)/'`testFloatRound.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatRound-testFloatRound.Tpo $(DEPDIR)/testFloatRound-testFloatRound.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatRound.c' object='testFloatRound-testFloatRound.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatRound_CFLAGS) $(CFLAGS) -c -o testFloatRound-testFloatRound.o `test -f 'testFloatRound.c' || echo '$(srcdir)/'`testFloatRound.c + +testFloatRound-testFloatRound.obj: testFloatRound.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatRound_CFLAGS) $(CFLAGS) -MT testFloatRound-testFloatRound.obj -MD -MP -MF $(DEPDIR)/testFloatRound-testFloatRound.Tpo -c -o testFloatRound-testFloatRound.obj `if test -f 'testFloatRound.c'; then $(CYGPATH_W) 'testFloatRound.c'; else $(CYGPATH_W) '$(srcdir)/testFloatRound.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatRound-testFloatRound.Tpo $(DEPDIR)/testFloatRound-testFloatRound.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatRound.c' object='testFloatRound-testFloatRound.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatRound_CFLAGS) $(CFLAGS) -c -o testFloatRound-testFloatRound.obj `if test -f 'testFloatRound.c'; then $(CYGPATH_W) 'testFloatRound.c'; else $(CYGPATH_W) '$(srcdir)/testFloatRound.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/round/crounda.c b/2.3-1/src/c/elementaryFunctions/round/crounda.c new file mode 100644 index 00000000..3dbc18c8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/crounda.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "round.h" + +void crounda(floatComplex* x, int size, floatComplex* out) { + int i=0; + + for (i=0;i=0) roundReal = (int)(creals(x)+0.5); + else roundReal = (int)(creals(x)-0.5); + + + + if (cimags(x)>=0) roundImag = (int)(cimags(x)+0.5); + else roundImag = (int)(cimags(x)-0.5); + + return FloatComplex((float)roundReal, (float)roundImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/round/drounda.c b/2.3-1/src/c/elementaryFunctions/round/drounda.c new file mode 100644 index 00000000..e3440969 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/drounda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "round.h" + +void drounda(double* x, int size, double* out) { + int i=0; + + for (i=0;i=0) result = (int)(x+0.5); + else result = (int)(x-0.5); + + return (double)result; +} diff --git a/2.3-1/src/c/elementaryFunctions/round/srounda.c b/2.3-1/src/c/elementaryFunctions/round/srounda.c new file mode 100644 index 00000000..785c7c9d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/srounda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "round.h" + +void srounda(float* x, int size, float* out) { + int i=0; + + for (i=0;i=0) result = (int)(x+0.5); + else result = (int)(x-0.5); + + return (float)result; +} diff --git a/2.3-1/src/c/elementaryFunctions/round/testDoubleRound.c b/2.3-1/src/c/elementaryFunctions/round/testDoubleRound.c new file mode 100644 index 00000000..5844a39b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/testDoubleRound.c @@ -0,0 +1,152 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "round.h" + +static void droundsTest(void) { + assert ((fabs( drounds(-2) - (-2))/fabs(drounds(-2)))<1e-16); + assert ((fabs( drounds(-1.9) - (-2))/fabs(drounds(-1.9)))<1e-16); + assert ((fabs( drounds(-1.8) - (-2))/fabs(drounds(-1.8)))<1e-16); + assert ((fabs( drounds(-1.7) - (-2))/fabs(drounds(-1.7)))<1e-16); + assert ((fabs( drounds(-1.6) - (-2))/fabs(drounds(-1.6)))<1e-16); + assert ((fabs( drounds(-1.5) - (-2))/fabs(drounds(-1.5)))<1e-16); + assert ((fabs( drounds(-1.4) - (-1))/fabs(drounds(-1.4)))<1e-16); + assert ((fabs( drounds(-1.3) - (-1))/fabs(drounds(-1.3)))<1e-16); + assert ((fabs( drounds(-1.2) - (-1))/fabs(drounds(-1.2)))<1e-16); + assert ((fabs( drounds(-1.1) - (-1))/fabs(drounds(-1.1)))<1e-16); + assert ((fabs( drounds(-1.0) - (-1))/fabs(drounds(-1.0)))<1e-16); + assert ((fabs( drounds(-0.9) - (-1))/fabs(drounds(-0.9)))<1e-16); + assert ((fabs( drounds(1.0) - (1))/fabs(drounds(1.0)))<1e-16); + assert ((fabs( drounds(1.1) - (1))/fabs(drounds(1.1)))<1e-16); + assert ((fabs( drounds(1.2) - (1))/fabs(drounds(1.2)))<1e-16); + assert ((fabs( drounds(1.3) - (1))/fabs(drounds(1.3)))<1e-16); + assert ((fabs( drounds(1.4) - (1))/fabs(drounds(1.4)))<1e-16); + assert ((fabs( drounds(1.5) - (2))/fabs(drounds(1.5)))<1e-16); + assert ((fabs( drounds(1.6) - (2))/fabs(drounds(1.6)))<1e-16); + assert ((fabs( drounds(1.7) - (2))/fabs(drounds(1.7)))<1e-16); + assert ((fabs( drounds(1.8) - (2))/fabs(drounds(1.8)))<1e-16); + assert ((fabs( drounds(1.9) - (2))/fabs(drounds(1.9)))<1e-16); + assert ((fabs( drounds(2.0) - (2))/fabs(drounds(2.0)))<1e-16); + +} + +static void zroundsTest(void) { + doubleComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=DoubleComplex(-2,1); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.9,1.1); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.8,1.2); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.7,1.3); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.6,1.4); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.5,1.5); + out = zrounds(in); + assert ((fabs( zreals(out) - (-2))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.4,1.6); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.3,1.7); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.2,1.8); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.1,1.9); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-1.0,2.0); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (2))/fabs(zimags(out)))<1e-16); + in=DoubleComplex(-.9,.9); + out = zrounds(in); + assert ((fabs( zreals(out) - (-1))/fabs(zreals(out)))<1e-16); + assert ((fabs( zimags(out) - (1))/fabs(zimags(out)))<1e-16); + +} + +static void droundaTest(void) { + int i; + double in[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double res[10]={1,2,-2,-3,-5,6,4,5,-1,1}; + double out[10]; + + drounda(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); + +} + +static void zroundaTest(void) { + int i; + double inR[10]={1.2, 2.0,-2.0,-3.1,-4.5,6.1,4.1,4.9,-0.7, 0.5}; + double inI[10]={5.4,1.8,1.4,-4.0,-2.7,-0.3,1.5,1.4,7.3,-4.6}; + double resR[10]={1,2,-2,-3,-5,6,4,5,-1,1}; + double resI[10]={5,2,1,-4,-3,0,2,1,7,-5}; + doubleComplex out[10],*in; + + in=DoubleComplexMatrix(inR,inI,10); + zrounda(in,10,out); + + for (i=0;i<10;i++){ + if (zreals(out[i])!=0) assert(fabs(zreals(out[i])-resR[i])/fabs(zreals(out[i])) <1e-16); + else assert(fabs(zreals(out[i])-resR[i]) <1e-16); + if (zimags(out[i])!=0) assert(fabs(zimags(out[i])-resI[i])/fabs(zimags(out[i])) <1e-16); + else assert(fabs(zimags(out[i])-resI[i]) <1e-16); + } + +} + + +static int testRound() { + printf("\n>>>> Double Round Tests\n"); + droundsTest(); + zroundsTest(); + droundaTest(); + zroundaTest(); + + return 0; +} + +int main() { + assert(testRound() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/round/testFloatRound.c b/2.3-1/src/c/elementaryFunctions/round/testFloatRound.c new file mode 100644 index 00000000..faac7665 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/testFloatRound.c @@ -0,0 +1,148 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "round.h" + +static void sroundsTest(void) { + + assert ((fabs( srounds(-2) - (-2))/fabs(srounds(-2)))<1e-16); + assert ((fabs( srounds(-1.9f) - (-2))/fabs(srounds(-1.9f)))<1e-16); + assert ((fabs( srounds(-1.8f) - (-2))/fabs(srounds(-1.8f)))<1e-16); + assert ((fabs( srounds(-1.7f) - (-2))/fabs(srounds(-1.7f)))<1e-16); + assert ((fabs( srounds(-1.6f) - (-2))/fabs(srounds(-1.6f)))<1e-16); + assert ((fabs( srounds(-1.5f) - (-2))/fabs(srounds(-1.5f)))<1e-16); + assert ((fabs( srounds(-1.4f) - (-1))/fabs(srounds(-1.4f)))<1e-16); + assert ((fabs( srounds(-1.3f) - (-1))/fabs(srounds(-1.3f)))<1e-16); + assert ((fabs( srounds(-1.2f) - (-1))/fabs(srounds(-1.2f)))<1e-16); + assert ((fabs( srounds(-1.1f) - (-1))/fabs(srounds(-1.1f)))<1e-16); + assert ((fabs( srounds(-1.0f) - (-1))/fabs(srounds(-1.0f)))<1e-16); + assert ((fabs( srounds(-0.9f) - (-1))/fabs(srounds(-0.9f)))<1e-16); + assert ((fabs( srounds(1.0f) - (1))/fabs(srounds(1.0f)))<1e-16); + assert ((fabs( srounds(1.1f) - (1))/fabs(srounds(1.1f)))<1e-16); + assert ((fabs( srounds(1.2f) - (1))/fabs(srounds(1.2f)))<1e-16); + assert ((fabs( srounds(1.3f) - (1))/fabs(srounds(1.3f)))<1e-16); + assert ((fabs( srounds(1.4f) - (1))/fabs(srounds(1.4f)))<1e-16); + assert ((fabs( srounds(1.5f) - (2))/fabs(srounds(1.5f)))<1e-16); + assert ((fabs( srounds(1.6f) - (2))/fabs(srounds(1.6f)))<1e-16); + assert ((fabs( srounds(1.7f) - (2))/fabs(srounds(1.7f)))<1e-16); + assert ((fabs( srounds(1.8f) - (2))/fabs(srounds(1.8f)))<1e-16); + assert ((fabs( srounds(1.9f) - (2))/fabs(srounds(1.9f)))<1e-16); + assert ((fabs( srounds(2.0f) - (2))/fabs(srounds(2.0f)))<1e-16); +} + +static void croundsTest(void) { + floatComplex in, out; + + + /* tests allant de -2 + i a -1 + 2*i, les reels décroissants de 0.1, les imaginaires croissant de 0.1 + + 1 test supplementaire : -0.9 + 0.9*i*/ + + in=FloatComplex(-2,1); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.9f,1.1f); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.8f,1.2f); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.7f,1.3f); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.6f,1.4f); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.5f,1.5f); + out = crounds(in); + assert ((fabs( creals(out) - (-2))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.4f,1.6f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.3f,1.7f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.2f,1.8f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.1f,1.9f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-1.0f,2.0f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (2))/fabs(cimags(out)))<1e-16); + in=FloatComplex(-.9f,.9f); + out = crounds(in); + assert ((fabs( creals(out) - (-1))/fabs(creals(out)))<1e-16); + assert ((fabs( cimags(out) - (1))/fabs(cimags(out)))<1e-16); +} + +static void sroundaTest(void) { + int i; + float in[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float res[10]={1,2,-2,-3,-5,6,4,5,-1,1}; + float out[10]; + + srounda(in,10,out); + + for (i=0;i<10;i++) + if (out[i]!=0) assert(fabs(out[i]-res[i])/fabs(out[i]) <1e-16); + else assert(fabs(out[i]-res[i]) <1e-16); +} + +static void croundaTest(void) { + int i; + float inR[10]={1.2f, 2.0f,-2.0f,-3.1f,-4.5f,6.1f,4.1f,4.9f,-0.7f, 0.5f}; + float inI[10]={5.4f,1.8f,1.4f,-4.0f,-2.7f,-0.3f,1.5f,1.4f,7.3f,-4.6f}; + float resR[10]={1,2,-2,-3,-5,6,4,5,-1,1}; + float resI[10]={5,2,1,-4,-3,0,2,1,7,-5}; + floatComplex out[10],*in; + + in=FloatComplexMatrix(inR,inI,10); + crounda(in,10,out); + + for (i=0;i<10;i++){ + if (creals(out[i])!=0) assert(fabs(creals(out[i])-resR[i])/fabs(creals(out[i])) <1e-16); + else assert(fabs(creals(out[i])-resR[i]) <1e-16); + if (cimags(out[i])!=0) assert(fabs(cimags(out[i])-resI[i])/fabs(cimags(out[i])) <1e-16); + else assert(fabs(cimags(out[i])-resI[i]) <1e-16); + } +} + +static int testRound() { + printf("\n>>>> Float Round Tests\n"); + sroundsTest(); + croundsTest(); + sroundaTest(); + croundaTest(); + + return 0; +} + +int main() { + assert(testRound() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/round/zrounda.c b/2.3-1/src/c/elementaryFunctions/round/zrounda.c new file mode 100644 index 00000000..1356e459 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/round/zrounda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fix.h" +#include "round.h" + +void zrounda(doubleComplex* x, int size, doubleComplex* out) { + int i=0; + + for (i=0;i=0) roundReal = (int)(zreals(x)+0.5); + else roundReal = (int)(zreals(x)-0.5); + + + + if (zimags(x)>=0) roundImag = (int)(zimags(x)+0.5); + else roundImag = (int)(zimags(x)-0.5); + + return DoubleComplex((double)roundReal, (double)roundImag); +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/Makefile.am b/2.3-1/src/c/elementaryFunctions/sin/Makefile.am new file mode 100644 index 00000000..4f58c56e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/Makefile.am @@ -0,0 +1,68 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSin_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSin.la + +libSin_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssins.c \ + dsins.c \ + csins.c \ + zsins.c \ + ssina.c \ + dsina.c \ + csina.c \ + zsina.c + +HEAD = ../includes/sin.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatSin testDoubleSin + +TESTS = testFloatSin testDoubleSin + +# +# -*- Sine Tests -*- +# +testFloatSin_SOURCES = testSin.h testFloatSin.c +testFloatSin_CFLAGS = $(check_INCLUDES) +testFloatSin_LDADD = $(check_LDADD) + +testDoubleSin_SOURCES = testSin.h testDoubleSin.c +testDoubleSin_CFLAGS = $(check_INCLUDES) +testDoubleSin_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/sin/Makefile.in b/2.3-1/src/c/elementaryFunctions/sin/Makefile.in new file mode 100644 index 00000000..4b7729a3 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/Makefile.in @@ -0,0 +1,808 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatSin$(EXEEXT) testDoubleSin$(EXEEXT) +TESTS = testFloatSin$(EXEEXT) testDoubleSin$(EXEEXT) +subdir = src/c/elementaryFunctions/sin +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSin_la_LIBADD = +am__objects_1 = +am__objects_2 = libSin_la-ssins.lo libSin_la-dsins.lo \ + libSin_la-csins.lo libSin_la-zsins.lo libSin_la-ssina.lo \ + libSin_la-dsina.lo libSin_la-csina.lo libSin_la-zsina.lo +am_libSin_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSin_la_OBJECTS = $(am_libSin_la_OBJECTS) +libSin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSin_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleSin_OBJECTS = testDoubleSin-testDoubleSin.$(OBJEXT) +testDoubleSin_OBJECTS = $(am_testDoubleSin_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleSin_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleSin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatSin_OBJECTS = testFloatSin-testFloatSin.$(OBJEXT) +testFloatSin_OBJECTS = $(am_testFloatSin_OBJECTS) +testFloatSin_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatSin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSin_la_SOURCES) $(testDoubleSin_SOURCES) \ + $(testFloatSin_SOURCES) +DIST_SOURCES = $(libSin_la_SOURCES) $(testDoubleSin_SOURCES) \ + $(testFloatSin_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSin_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSin.la +libSin_la_SOURCES = $(HEAD) $(SRC) +SRC = ssins.c \ + dsins.c \ + csins.c \ + zsins.c \ + ssina.c \ + dsina.c \ + csina.c \ + zsina.c + +HEAD = ../includes/sin.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Sine Tests -*- +# +testFloatSin_SOURCES = testSin.h testFloatSin.c +testFloatSin_CFLAGS = $(check_INCLUDES) +testFloatSin_LDADD = $(check_LDADD) +testDoubleSin_SOURCES = testSin.h testDoubleSin.c +testDoubleSin_CFLAGS = $(check_INCLUDES) +testDoubleSin_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/sin/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/sin/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSin.la: $(libSin_la_OBJECTS) $(libSin_la_DEPENDENCIES) + $(libSin_la_LINK) -rpath $(pkglibdir) $(libSin_la_OBJECTS) $(libSin_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleSin$(EXEEXT): $(testDoubleSin_OBJECTS) $(testDoubleSin_DEPENDENCIES) + @rm -f testDoubleSin$(EXEEXT) + $(testDoubleSin_LINK) $(testDoubleSin_OBJECTS) $(testDoubleSin_LDADD) $(LIBS) +testFloatSin$(EXEEXT): $(testFloatSin_OBJECTS) $(testFloatSin_DEPENDENCIES) + @rm -f testFloatSin$(EXEEXT) + $(testFloatSin_LINK) $(testFloatSin_OBJECTS) $(testFloatSin_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-csina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-csins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-dsina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-dsins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-ssina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-ssins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-zsina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSin_la-zsins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSin-testDoubleSin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSin-testFloatSin.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSin_la-ssins.lo: ssins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-ssins.lo -MD -MP -MF $(DEPDIR)/libSin_la-ssins.Tpo -c -o libSin_la-ssins.lo `test -f 'ssins.c' || echo '$(srcdir)/'`ssins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-ssins.Tpo $(DEPDIR)/libSin_la-ssins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssins.c' object='libSin_la-ssins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-ssins.lo `test -f 'ssins.c' || echo '$(srcdir)/'`ssins.c + +libSin_la-dsins.lo: dsins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-dsins.lo -MD -MP -MF $(DEPDIR)/libSin_la-dsins.Tpo -c -o libSin_la-dsins.lo `test -f 'dsins.c' || echo '$(srcdir)/'`dsins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-dsins.Tpo $(DEPDIR)/libSin_la-dsins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsins.c' object='libSin_la-dsins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-dsins.lo `test -f 'dsins.c' || echo '$(srcdir)/'`dsins.c + +libSin_la-csins.lo: csins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-csins.lo -MD -MP -MF $(DEPDIR)/libSin_la-csins.Tpo -c -o libSin_la-csins.lo `test -f 'csins.c' || echo '$(srcdir)/'`csins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-csins.Tpo $(DEPDIR)/libSin_la-csins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csins.c' object='libSin_la-csins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-csins.lo `test -f 'csins.c' || echo '$(srcdir)/'`csins.c + +libSin_la-zsins.lo: zsins.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-zsins.lo -MD -MP -MF $(DEPDIR)/libSin_la-zsins.Tpo -c -o libSin_la-zsins.lo `test -f 'zsins.c' || echo '$(srcdir)/'`zsins.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-zsins.Tpo $(DEPDIR)/libSin_la-zsins.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsins.c' object='libSin_la-zsins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-zsins.lo `test -f 'zsins.c' || echo '$(srcdir)/'`zsins.c + +libSin_la-ssina.lo: ssina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-ssina.lo -MD -MP -MF $(DEPDIR)/libSin_la-ssina.Tpo -c -o libSin_la-ssina.lo `test -f 'ssina.c' || echo '$(srcdir)/'`ssina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-ssina.Tpo $(DEPDIR)/libSin_la-ssina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssina.c' object='libSin_la-ssina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-ssina.lo `test -f 'ssina.c' || echo '$(srcdir)/'`ssina.c + +libSin_la-dsina.lo: dsina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-dsina.lo -MD -MP -MF $(DEPDIR)/libSin_la-dsina.Tpo -c -o libSin_la-dsina.lo `test -f 'dsina.c' || echo '$(srcdir)/'`dsina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-dsina.Tpo $(DEPDIR)/libSin_la-dsina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsina.c' object='libSin_la-dsina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-dsina.lo `test -f 'dsina.c' || echo '$(srcdir)/'`dsina.c + +libSin_la-csina.lo: csina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-csina.lo -MD -MP -MF $(DEPDIR)/libSin_la-csina.Tpo -c -o libSin_la-csina.lo `test -f 'csina.c' || echo '$(srcdir)/'`csina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-csina.Tpo $(DEPDIR)/libSin_la-csina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csina.c' object='libSin_la-csina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-csina.lo `test -f 'csina.c' || echo '$(srcdir)/'`csina.c + +libSin_la-zsina.lo: zsina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -MT libSin_la-zsina.lo -MD -MP -MF $(DEPDIR)/libSin_la-zsina.Tpo -c -o libSin_la-zsina.lo `test -f 'zsina.c' || echo '$(srcdir)/'`zsina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSin_la-zsina.Tpo $(DEPDIR)/libSin_la-zsina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsina.c' object='libSin_la-zsina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSin_la_CFLAGS) $(CFLAGS) -c -o libSin_la-zsina.lo `test -f 'zsina.c' || echo '$(srcdir)/'`zsina.c + +testDoubleSin-testDoubleSin.o: testDoubleSin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSin_CFLAGS) $(CFLAGS) -MT testDoubleSin-testDoubleSin.o -MD -MP -MF $(DEPDIR)/testDoubleSin-testDoubleSin.Tpo -c -o testDoubleSin-testDoubleSin.o `test -f 'testDoubleSin.c' || echo '$(srcdir)/'`testDoubleSin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSin-testDoubleSin.Tpo $(DEPDIR)/testDoubleSin-testDoubleSin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSin.c' object='testDoubleSin-testDoubleSin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSin_CFLAGS) $(CFLAGS) -c -o testDoubleSin-testDoubleSin.o `test -f 'testDoubleSin.c' || echo '$(srcdir)/'`testDoubleSin.c + +testDoubleSin-testDoubleSin.obj: testDoubleSin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSin_CFLAGS) $(CFLAGS) -MT testDoubleSin-testDoubleSin.obj -MD -MP -MF $(DEPDIR)/testDoubleSin-testDoubleSin.Tpo -c -o testDoubleSin-testDoubleSin.obj `if test -f 'testDoubleSin.c'; then $(CYGPATH_W) 'testDoubleSin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSin-testDoubleSin.Tpo $(DEPDIR)/testDoubleSin-testDoubleSin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSin.c' object='testDoubleSin-testDoubleSin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSin_CFLAGS) $(CFLAGS) -c -o testDoubleSin-testDoubleSin.obj `if test -f 'testDoubleSin.c'; then $(CYGPATH_W) 'testDoubleSin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSin.c'; fi` + +testFloatSin-testFloatSin.o: testFloatSin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSin_CFLAGS) $(CFLAGS) -MT testFloatSin-testFloatSin.o -MD -MP -MF $(DEPDIR)/testFloatSin-testFloatSin.Tpo -c -o testFloatSin-testFloatSin.o `test -f 'testFloatSin.c' || echo '$(srcdir)/'`testFloatSin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSin-testFloatSin.Tpo $(DEPDIR)/testFloatSin-testFloatSin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSin.c' object='testFloatSin-testFloatSin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSin_CFLAGS) $(CFLAGS) -c -o testFloatSin-testFloatSin.o `test -f 'testFloatSin.c' || echo '$(srcdir)/'`testFloatSin.c + +testFloatSin-testFloatSin.obj: testFloatSin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSin_CFLAGS) $(CFLAGS) -MT testFloatSin-testFloatSin.obj -MD -MP -MF $(DEPDIR)/testFloatSin-testFloatSin.Tpo -c -o testFloatSin-testFloatSin.obj `if test -f 'testFloatSin.c'; then $(CYGPATH_W) 'testFloatSin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSin-testFloatSin.Tpo $(DEPDIR)/testFloatSin-testFloatSin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSin.c' object='testFloatSin-testFloatSin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSin_CFLAGS) $(CFLAGS) -c -o testFloatSin-testFloatSin.obj `if test -f 'testFloatSin.c'; then $(CYGPATH_W) 'testFloatSin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSin.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/sin/csina.c b/2.3-1/src/c/elementaryFunctions/sin/csina.c new file mode 100644 index 00000000..e4fb1aae --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/csina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" + +void csina(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = csins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/csins.c b/2.3-1/src/c/elementaryFunctions/sin/csins.c new file mode 100644 index 00000000..e48491c2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/csins.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" + +floatComplex csins(floatComplex z) { + float real = creals(z); + float imag = cimags(z); + + return(FloatComplex(ssins(real) * scoshs(imag), scoss(real) * ssinhs(imag))); +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/dsina.c b/2.3-1/src/c/elementaryFunctions/sin/dsina.c new file mode 100644 index 00000000..e290845e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/dsina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" + +void dsina(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dsins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/dsins.c b/2.3-1/src/c/elementaryFunctions/sin/dsins.c new file mode 100644 index 00000000..2acd0294 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/dsins.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sin.h" + +double dsins(double x) { + return (sin(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/ssina.c b/2.3-1/src/c/elementaryFunctions/sin/ssina.c new file mode 100644 index 00000000..39288cc4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/ssina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" + +void ssina(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ssins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/ssins.c b/2.3-1/src/c/elementaryFunctions/sin/ssins.c new file mode 100644 index 00000000..2bc52da8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/ssins.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sin.h" + +float ssins(float x) { + return (sinf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/testDoubleSin.c b/2.3-1/src/c/elementaryFunctions/sin/testDoubleSin.c new file mode 100644 index 00000000..f5407331 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/testDoubleSin.c @@ -0,0 +1,498 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSin.h" + + +#define SOURCE {0.7062616096809506416321,0.4090520101599395275116,0.3011248558759689331055,\ +0.1880126395262777805328,0.1796709178015589714050,0.2828889950178563594818,\ +0.7232380937784910202026,0.7360379849560558795929,0.1852612206712365150452,\ +0.7703790138475596904755,0.1914967410266399383545,0.7521587223745882511139,\ +0.6205883463844656944275,0.2807604051195085048676,0.2289868686348199844360,\ +0.5049233403988182544708,0.8354099662974476814270,0.8174716415815055370331,\ +0.0030740275979042053223,0.3677616142667829990387,0.8278525872156023979187,\ +0.72754097869619727135,0.5323124285787343978882,0.9267726917751133441925,\ +0.9542504185810685157776,0.3162104780785739421845,0.5789009965956211090088,\ +0.6881225542165338993073,0.3714061146602034568787,0.1705444059334695339203,\ +0.1954363007098436355591,0.978800852317363023758,0.9300233917310833930969,\ +0.5357720064930617809296,0.3947123587131500244141,0.1344871171750128269196,\ +0.7380615202710032463074,0.588114650454372167587,0.9113173168152570724487,\ +0.5682763461954891681671,0.1127616921439766883850,0.9478473584167659282684,\ +0.5237770043313503265381,0.8140139640308916568756,0.1400952627882361412048,\ +0.2763446993194520473480,0.9059953633695840835571,0.1379901585169136524200,\ +0.5603838684037327766419,0.3008610638789832592011,0.4767417535185813904,\ +0.8127435916103422641754,0.1988414181396365165710,0.1107953130267560482025,\ +0.2159351315349340438843,0.6467244853265583515167,0.6597879612818360328674,\ +0.0691898013465106487274,0.9164751060307025909424,0.8635670826770365238190,\ +0.5032854294404387474060,0.1832137755118310451508,0.8403698671609163284302,\ +0.9247214836068451404572,0.6229452537372708320618,0.2773811477236449718475,\ +0.2479109913110733032227,0.3891948559321463108063,0.0436578569933772087097,\ +0.8132526441477239131928,0.7686451207846403121948,0.4041520212776958942413,\ +0.8579940209165215492249,0.6993723283521831035614,0.0828925184905529022217,\ +0.9201254160143435001373,0.5200281282886862754822,0.9351884997449815273285,\ +0.8825624976307153701782,0.2245844271965324878693,0.2153332801535725593567,\ +0.4327089670114219188690,0.5800157263875007629395,0.8876141034997999668121,\ +0.5258982880041003227234,0.859640696551650762558,0.7337234076112508773804,\ +0.7134532411582767963409,0.1087165409699082374573,0.8477638359181582927704,\ +0.6594733335077762603760,0.7916418449021875858307,0.6067967480048537254334,\ +0.4102901122532784938812,0.1958728153258562088013,0.241527963895350694656,\ +0.5113455550745129585266,0.9119556057266891002655,0.0928984880447387695313,\ +0.7438839026726782321930,0.1938720373436808586121,0.4355978979729115962982,\ +0.9922429900616407394409,0.4533818070776760578156,0.8269640663638710975647,\ +0.8889675955288112163544,0.4682085178792476654053,0.3856786251999437808991,\ +0.4124865522608160972595,0.6955242282710969448090,0.0978972557932138442993,\ +0.8728604433126747608185,0.6359515609219670295715,0.4129665228538215160370,\ +0.0294486805796623229980,0.1809961968101561069489,0.7658103061839938163757,\ +0.1232470511458814144135,0.0170737411826848983765,0.8835507561452686786652,\ +0.3164170170202851295471,0.9378212536685168743134,0.3916359134018421173096,\ +0.0844073877669870853424,0.6934146797284483909607,0.4618808380328118801117,\ +0.9355291295796632766724,0.0842495900578796863556,0.5402926551178097724915,\ +0.5613215523771941661835,0.1306025832891464233398,0.5840523042716085910797,\ +0.0048661706969141960144,0.2761953338049352169037,0.7478824090212583541870,\ +0.0194325004704296588898,0.6444276878610253334045,0.2243968318216502666473,\ +0.2478402368724346160889,0.1196091384626924991608,0.1883201440796256065369,\ +0.3393343067727982997894,0.959958622232079505920,0.2847225037403404712677,\ +0.8766820700839161872864,0.2853349032811820507050,0.5103433504700660705566,\ +0.8752629184164106845856,0.5941145820543169975281,0.3945342986844480037689,\ +0.4661326166242361068726,0.0073588271625339984894,0.5170202488079667091370,\ +0.4690007264725863933563,0.6654530800879001617432,0.9476742581464350223541,\ +0.4933638339862227439880,0.2918433747254312038422,0.2016727942973375320435,\ +0.7016656589694321155548,0.8736049132421612739563,0.191055159550160169601,\ +0.5307010114192962646484,0.8889481076039373874664,0.0115523664280772209167,\ +0.4998398735187947750092,0.6700848620384931564331,0.4995208983309566974640,\ +0.1538907447829842567444,0.2571737091057002544403,0.9586529098451137542725,\ +0.6246025026775896549225,0.9371285131201148033142,0.9923511571250855922699,\ +0.3454555813223123550415,0.7558249053545296192169,0.2107181670144200325012,\ +0.9372652801685035228729,0.6767524704337120056152,0.7465373151935636997223,\ +0.4050982249900698661804,0.5101723610423505306244,0.9497965183109045028687,\ +0.0289692510850727558136,0.1634070957079529762268,0.4146909262053668498993,\ +0.0021650679409503936768,0.1810030029155313968658,0.4556188201531767845154,\ +0.1977851442061364650726,0.6053877938538789749146,0.4363054675050079822540,\ +0.8938506888225674629211,0.6104825991205871105194,0.4316215068101882934570,\ +0.2315693595446646213532,0.4675927339121699333191,0.6150764389894902706146,\ +0.8621218334883451461792,0.3846137975342571735382} + +#define RESULT {0.6489941700631755017170,0.3977397277804613495711,0.2965946353370927379700,\ +0.1869069269006927436205,0.1787057982923107302131,0.2791309758033572174796,\ +0.6618156282674139134770,0.6713568034120557248556,0.1842032905163836498108,\ +0.6964072867055017823645,0.1903284889107588750967,0.6832166836832923584311,\ +0.5815139023939676077291,0.2770863600724933761832,0.2269909547378782532778,\ +0.4837403483762576783533,0.7415716096535567292136,0.7294185948731235491493,\ +0.0030740227564945614772,0.3595276195652636896938,0.7364804339477919459256,\ +0.6650352209120763413708,0.5075271675293236972593,0.7996863750649069180199,\ +0.8158805463618925557512,0.3109671621400240670852,0.5471043307230858410151,\ +0.6350880886600825947497,0.3629260331962892438540,0.1697188821645874701183,\ +0.1941945483009222261916,0.8298288212470000813070,0.8016339250362096713332,\ +0.5105050203992042012757,0.3845426809733389905688,0.1340820770536885198077,\ +0.6728551393063956220786,0.5547934214048261258867,0.7903115520300768581663,\ +0.5381801020151927295032,0.1125228794588504499519,0.8121614659213718390163,\ +0.5001543426683193738214,0.7270489540313778142888,0.1396374447476722568950,\ +0.2728408635666067505454,0.787039586876701835472,0.1375526569581922986529,\ +0.5315113932434574195440,0.2963427027488344522865,0.4588866814078613742822,\ +0.7261761481530248918404,0.1975337103519642922844,0.1105687722679299794804,\ +0.2142609363196769090010,0.6025755797169196625873,0.6129493292515678648513,\ +0.0691346099927565571619,0.7934612300206389523538,0.7601650349312217835873,\ +0.4823061815340158875465,0.1821904962108664982612,0.7448899416114136418088,\ +0.7984531114259775241848,0.5834297155392762501691,0.2738378415422391687351,\ +0.2453793544289556705085,0.3794436069308826930957,0.0436439896074229186085,\ +0.7265260320935078564020,0.6951619177333813182074,0.3932392395246541161313,\ +0.756532263098035340221,0.6437374906114369244037,0.0827976230060826490220,\ +0.7956775933285428203945,0.4969045479155810296490,0.8047109984386738856799,\ +0.7723690449233312493860,0.2227012449582090047873,0.2136730232885993008285,\ +0.4193316280451939714880,0.5480370912598671040428,0.7755678252599553790248,\ +0.5019901124659599256361,0.7576080909498315030248,0.6696395939777050054786,\ +0.6544486857456611739181,0.1085025088408962251618,0.7498026974031274383137,\ +0.6127007045227848003322,0.7115079193085073194780,0.5702389863986391249640,\ +0.3988753791946258453471,0.1946227344887739574286,0.2391865177264060060569,\ +0.4893511304026755825980,0.7907024739412412683848,0.0927649247006697985629,\ +0.6771509587172231947605,0.1926598267972080835708,0.4219525417710163206486,\ +0.8372545804484667897327,0.4380081794254953031498,0.7358790955224862040396,\ +0.7764215257273850978592,0.4512883308374140978181,0.3761879989923791467454,\ +0.4008885622012666738456,0.6407879869830552799215,0.0977409582360771744813,\ +0.7661702973755802892342,0.5939433204542849953356,0.4013282299434615674194,\ +0.0294444243265947341870,0.1800095863769710646807,0.6931213117261505463063,\ +0.1229352709600845944271,0.0170729116595537758205,0.7729963838033769851776,\ +0.3111634543825066989697,0.8062711862134785967271,0.3817009768423728632847,\ +0.0843071952194427848282,0.6391670242169816829048,0.4456326503441452313581,\ +0.8049131723565879914517,0.0841499582510354254827,0.5143869824676139401731,\ +0.5323054257425473556609,0.1302316176753355037032,0.5514090290933710836185,\ +0.0048661514920936704831,0.2726971620593832135171,0.6800878151345280953066,\ +0.0194312774699979817772,0.6007410055835120665790,0.2225183567972019438308,\ +0.2453107625419813642154,0.1193241474447570282802,0.1872090036522589262535,\ +0.3328594328994332052218,0.8191678366228465346666,0.2808911379544120623386,\ +0.7686206175384947547613,0.2814788293582466960352,0.4884768753384709505383,\ +0.7677120055843160706388,0.5597752773423979588685,0.3843783063813486222671,\ +0.4494348707705640433296,0.0073587607464321675918,0.4942920505581040457876,\ +0.4519951388248303891793,0.6174156057066327862870,0.8120604613904897073340,\ +0.4735912411780784370130,0.2877181408083371860762,0.2003085018506444991981,\ +0.6454907592331077248460,0.7666485093752634094599,0.1898949607970919217781,\ +0.5061380545505530514916,0.7764092440179690690627,0.0115521094721033057429,\ +0.4792850082508480769050,0.6210525015048259378503,0.4790050323268763010631,\ +0.1532840475926474099744,0.2543482295640571710926,0.8184182421341416047156,\ +0.5847748710564846241766,0.8058612048242990155700,0.8373137227375435642784,\ +0.3386253785349607747790,0.6858891905260645627251,0.2091622355697206059322,\ +0.8059421776695899763965,0.6262645222993747928797,0.6791010706734159629860,\ +0.3941090372936942864968,0.4883276667837411211259,0.8132971260929759971248,\ +0.0289651993379718974975,0.1626808532406751051092,0.4029070726587401507501,\ +0.0021650662494845369747,0.1800162812994652028475,0.4400180916539356279493,\ +0.1964981391369581276152,0.5690809947427917236951,0.4225939313085426696226,\ +0.7794896502659051096273,0.5732629547867681418794,0.4183441479008401797657,\ +0.2295052748166268863361,0.4507387331252663553727,0.5770209539366986106757,\ +0.7592252195553320648358,0.3752011769086914250160} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} + +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZRESULTR {0.6566347140259699566300,1.0119999258966314581443,0.6596019011837132017817,\ +1.035407544941025825835,0.1779303602523068794650,0.2091417769467268095163,\ +0.6938478808740486947215,0.1809168200637071011183,0.0097840077120305499192,\ +0.1918418803766589464388,0.6967642148886226127758,0.6477398327340490036264,\ +0.9315995708552796683577,0.3317736774434180135884,0.6081114651603225507159,\ +0.3241823207263323514127,0.7257014354377283593678,0.7561000009288112444494,\ +0.3005492023050818084506,0.7318806897852137005600,0.6527186268049437467553,\ +0.6309941597264083767982,0.4252885469799541073854,1.1110399216338266992210,\ +0.5224655834751933403126,0.9668090801088078389824,0.0373711557740689717666,\ +0.3268489749847858782950,0.6382749343202905878414,1.0114485987268988509413,\ +0.3221010444660392657568,0.4139453304596071303578,0.4756810141068628650096,\ +0.8632093598097250186640,0.3598514339778784987267,0.7487720850314417697646,\ +0.6130614254242318095223,0.6997626019564747723578,0.2545007621033356648432,\ +0.5515473173800672368472,0.2912178978332317091926,0.5910474830807833646063,\ +0.2166565482354273763921,0.8021363255207357711996,0.7443835374940948046429,\ +0.4891530673136452178618,0.7013877718782099979222,0.6913869813942569164667,\ +0.5769011420640627330059,0.3117908008696873567445,0.4351103756992900639666,\ +0.3419338661078391572445,0.2322493315296763338740,0.3651122336184794425762,\ +0.5004568464347787237756,0.8474278924029616799629,0.1163175220516309976704,\ +0.0720827231471598273149,0.0923335564898466049089,0.5339057146859005342776,\ +0.2372798723378120866467,0.8333578948329619651148,0.5639606188473457182298,\ +0.4177713004682119257716,0.1842205910422827219719,0.0061220134095790416234,\ +0.3327145852908883205679,0.6419359463626251871560,1.1422474153376851457864,\ +0.9169649828841031080629,0.0457541584695274616834,0.5117881770849980194171,\ +0.6755451518212014505593,0.5184569836246168961225,0.5713468012823553765500,\ +0.0858443570774837100279,0.1606151108412635364342,0.7918113937347260877786,\ +0.6654818631286439911676,0.4439038705567253662032,0.796132686757749730155,\ +0.3903563868552101800979,0.1263898622508018709798,0.7049140832202889228597,\ +0.8114695967676066601371,0.6469075512356741164410,0.7677157469479103379939,\ +1.0953970513593642710504,0.7769182781192301989748,1.0073965025007358686793,\ +1.074286510426218699266,0.1553189729796884688273,0.8413108822720302137910,\ +0.3462739066818524835689,0.3926238690106399475965,0.3256804935966552405624,\ +0.1633497671324356526057,1.0010270500405602511762,1.115022351982163151263,\ +0.7899569005544465616353,0.2603865455411881191239,0.5183255731419573741903,\ +0.7736654652779521024186,0.7045488355155032911270,0.99239017570392618062,\ +0.8571418992433421646382,0.6471261632164159172120,0.6653365916658987577748,\ +0.4179492416945764787783,0.332966594116362202271,0.8071129279142643664358,\ +0.6917895244691119049918,0.6612409505512693019824,0.8506578773411223037826,\ +0.4212670370210502279740,0.7142246190696375229834,0.5650468142706680518828,\ +0.2457619298195089230230,0.4999304697490009052885,0.9146990697266257352993,\ +0.6632530384013611834959,0.5254071357713419043733,0.8979087718767884140902,\ +0.3295715941858761155459,0.7411311982358101957402,0.0964650394595463894776,\ +0.5756260203046842383046,0.9308880528862794045963,1.2271094550000687384284,\ +0.6789423000457328605251,0.1649198200195263752654,1.1279258179884905644030,\ +0.3999539922775662836862,0.6338241429246500580064,0.1223148225900566599123,\ +0.9023144865193905017620,0.0330081109061416202999,0.3767477211449618557104,\ +0.3412118905344592723061,0.5930700069420078435201,0.1017393430189639513817,\ +0.0308061153410014963716,0.4886538358989525598908,0.3559707023880692156048,\ +0.4308223854061962176942,0.3514869377238818426434,0.0799867738322445898103,\ +0.8173018105145738454453,0.2037338143062503714731,1.220430983869785990237,\ +0.3406746275228044185113,0.0004150259547877954485,0.0971888856349881896657,\ +0.4757842207231965381276,0.4040809859598182285367,0.2820450997896822298294,\ +0.2811152693325764118093,0.9590128703774639662427,0.5354093557700149164091,\ +0.5019368627578308927895,0.8117140104249528365088,0.4534830656186849551226,\ +1.1783423931120406980000,0.1434370411700725822524,0.2934216038065708409555,\ +0.1779829127631718521663,0.0720832823745556211525,0.9611918663155849529289,\ +0.7759794971968927423944,0.4215038017355943744668,0.8045968908805133379403,\ +0.1352257439826550500239,0.0966259862726158991197,0.9423768067086430999524,\ +0.4303839309127981405112,1.027158469056514755735,0.0309063123957022088673,\ +0.1427581856076631239283,0.5058338353137836751472,0.5922330662524728506213,\ +0.2998212988294082781415,0.4854774490519005447631,0.2905366689284186176856,\ +0.732577252768074504985,0.3467085924376158700966,0.3404646689762517719480,\ +0.7192597601031739396049,0.8895525359433824608146,0.2563314638119464916599,\ +0.8145777458167494655683,0.1728338655335915907685,0.5887205934900180404057,\ +0.6014718010439381590260,0.0675406202372636349507,0.9510839296787396701660,\ +1.1598095667324348490013,0.0309128254938883482994,0.6857099135308569737290,\ +0.8512200678266018671891,0.2729650321569278004219} + +#define ZRESULTI {0.4759980266175199981049,0.4371792356294723624899,1.0366401767050017479477,\ +0.6028332456001923578270,0.2045505325550055208961,0.1915259687562470281019,\ +0.3491380267554807237396,0.8920876814407183719169,1.0006703458507313353465,\ +0.8009779429459989996687,0.6984902194099197325627,1.0544026495724472258786,\ +0.9182841727572422785286,0.0106808422200693302340,0.9834445059055472171394,\ +0.3787326350421501008903,0.2100400056445083096790,0.4557093767576786413898,\ +0.7737087506882367460293,0.0206637462688268880306,0.2204234493680024276063,\ +0.6615160486898620240126,0.7692763584553293787494,0.6356101396181920160089,\ +0.0925908774129100275996,0.7206114133477932170990,1.0359844944992535609174,\ +0.2069515918997265613299,0.4117290503525293243747,0.5490423106381259188424,\ +0.4462283131040214456675,0.1189364264093275003198,0.5274577925657699672968,\ +0.5430180765717186330832,0.1643914008870697718301,0.8230721066766158999783,\ +0.1735038050714417801057,0.1378272158996049767676,0.1748220246567987745667,\ +0.3903220669843952550515,0.936703269190418574830,0.7166597754518847507299,\ +0.8900704241537943373075,0.0891449760436722887791,0.8771518805722777756273,\ +0.3706792570421439947381,0.0111920996603491820776,0.6215444290094976897976,\ +0.2530709869257740662896,0.1319801016143227201383,0.9046350616526124266414,\ +0.2884930138703660218447,0.2251695646636414915864,0.8648081988694793498240,\ +0.2840216379380148814526,0.5504953762822683005496,0.1359271700042656016993,\ +0.5693382736493431961478,0.3322720353016644923017,0.1721580834994098363477,\ +0.5135850315563981194345,0.3474773880755230304196,0.9431362964718456032287,\ +1.0340232262721140710227,0.3402877573217258366789,0.6401040473330621427550,\ +0.4069022009136239459437,0.2439407776749255851723,0.5378842266979906305835,\ +0.2570716586141951753852,0.0904088654517940515376,0.7403475521247256940782,\ +0.2047878426979200527924,0.8489939536581485590716,0.3473238625280567482001,\ +1.1411188764290771668897,0.3051746072580045487932,0.0407043050782743276450,\ +0.6033725923116708411698,0.778737542643346047910,0.1206535237380119696127,\ +0.8418336511001852651148,0.5839585555917582437857,0.1467518266954731531726,\ +0.6888901126606848945855,0.0732090771366951525989,0.5554652901202962178573,\ +0.6068461403975041745795,0.5973804827482247503667,0.5862495346519734917834,\ +0.7008734442762630800772,0.6689719175986947874435,0.8829098191147302099324,\ +1.0188712228965588479923,0.0469681660587412258545,0.4264494425604897775983,\ +1.1260897634779567511032,0.5891751058811135477455,0.5586811292942333029288,\ +0.0375737549548666310839,0.8936786828452066844264,0.1824421274677656690244,\ +0.2090978327687162685589,0.9628255596340984379111,0.7821471108810679195855,\ +0.6470050596557553879151,0.5216627363302938080736,0.1830177712067865836154,\ +0.5134143514131775942744,0.0073119913675850425894,0.7504222430574429836270,\ +0.0193983766100578602920,0.2014128332431188439511,0.3088455785813677967333,\ +0.6065483134448432789299,0.0461172484518394959485,0.6134456837548584173803,\ +0.0989331667688019139595,0.2433781622039619951803,0.6701373782390742661619,\ +0.2663685035487164953771,0.4365368071405912875349,0.7189236163164304249662,\ +0.1697526069685433847134,0.4811811372286406429666,0.9436115675726329810047,\ +0.6813279536427474525340,0.5582673535726633273768,0.6663831331574520122629,\ +0.7137987696438253815146,0.9132123041060544732517,0.6154027043735471602659,\ +0.8421707385350217789366,0.2467394118703030714279,0.730464243452961903280,\ +0.4583747264016979627854,0.0989323235351602520149,0.4538168380708768601117,\ +0.6949204434222109316721,0.4568731305870791792323,0.9718116503334458533558,\ +0.9322636874728698064274,0.1486199865445305412504,0.2824746711136658094965,\ +0.238217162606873950059,0.1603203534786354911290,1.130704398714823533112,\ +0.0402833511895827542371,0.4788366747059483730098,0.6354755115001236021044,\ +0.3566529249056448747091,0.3017948657011057522759,0.0413466935121344983384,\ +0.46096369056612357,0.5052181131344314346521,0.3479618653266752237308,\ +0.2285599720872606155364,0.462725396526868226754,0.3406579403750831791520,\ +0.2835867580422753442271,0.2238269615848648141920,0.0477728736811990767341,\ +0.6329115684248395323763,0.3924052442709091148565,0.4301664447715317640686,\ +0.1563039559206648165812,0.8717772653208039068673,0.544280842419675670030,\ +0.3964232571280063566199,0.9317498908981691752018,0.0927647199866874355711,\ +0.239471404370552171104,0.6064908073717841796579,0.5504808053886728336224,\ +0.0526899922619719976447,0.4312873750429307428966,0.4329527886793243518504,\ +0.0278317754230633894463,0.8642909834572990446233,0.1923982024967207382638,\ +0.9846585214795218199413,0.3418444780294159768275,0.9720887284222768931485,\ +0.3044849414953779143112,0.2763773261322472474255,0.9320336608375792142311,\ +0.4523656548286881795562,0.3324058771805019629753,0.6596413052835798929152,\ +0.2842028663251400799616,0.3229125187951548126009,1.0425270197833373941876,\ +0.4773378821453879150560,0.3476356752155591589570,0.8551943809979846156111,\ +0.7664315470559724952082,0.3488628182805697530711,0.7453969031814248191736,\ +0.8607289142164601392082,0.5322582746397167552388} + + + + + +void dsinsTest() { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dsins(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zsinsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zsins(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dsinaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dsina(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-16); + } +} + +void zsinaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + zsina(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testSin() { + printf("\n>>>> Double Sine Tests\n"); + dsinsTest(); + zsinsTest(); + dsinaTest(); + zsinaTest(); + return 0; +} + +int main(void) { + assert(testSin() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/testFloatSin.c b/2.3-1/src/c/elementaryFunctions/sin/testFloatSin.c new file mode 100644 index 00000000..dfaef72b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/testFloatSin.c @@ -0,0 +1,494 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "testSin.h" + +#define SOURCE {0.7062616096809506416321f,0.4090520101599395275116f,0.3011248558759689331055f,\ +0.1880126395262777805328f,0.1796709178015589714050f,0.2828889950178563594818f,\ +0.7232380937784910202026f,0.7360379849560558795929f,0.1852612206712365150452f,\ +0.7703790138475596904755f,0.1914967410266399383545f,0.7521587223745882511139f,\ +0.6205883463844656944275f,0.2807604051195085048676f,0.2289868686348199844360f,\ +0.5049233403988182544708f,0.8354099662974476814270f,0.8174716415815055370331f,\ +0.0030740275979042053223f,0.3677616142667829990387f,0.8278525872156023979187f,\ +0.72754097869619727135f,0.5323124285787343978882f,0.9267726917751133441925f,\ +0.9542504185810685157776f,0.3162104780785739421845f,0.5789009965956211090088f,\ +0.6881225542165338993073f,0.3714061146602034568787f,0.1705444059334695339203f,\ +0.1954363007098436355591f,0.978800852317363023758f,0.9300233917310833930969f,\ +0.5357720064930617809296f,0.3947123587131500244141f,0.1344871171750128269196f,\ +0.7380615202710032463074f,0.588114650454372167587f,0.9113173168152570724487f,\ +0.5682763461954891681671f,0.1127616921439766883850f,0.9478473584167659282684f,\ +0.5237770043313503265381f,0.8140139640308916568756f,0.1400952627882361412048f,\ +0.2763446993194520473480f,0.9059953633695840835571f,0.1379901585169136524200f,\ +0.5603838684037327766419f,0.3008610638789832592011f,0.4767417535185813904f,\ +0.8127435916103422641754f,0.1988414181396365165710f,0.1107953130267560482025f,\ +0.2159351315349340438843f,0.6467244853265583515167f,0.6597879612818360328674f,\ +0.0691898013465106487274f,0.9164751060307025909424f,0.8635670826770365238190f,\ +0.5032854294404387474060f,0.1832137755118310451508f,0.8403698671609163284302f,\ +0.9247214836068451404572f,0.6229452537372708320618f,0.2773811477236449718475f,\ +0.2479109913110733032227f,0.3891948559321463108063f,0.0436578569933772087097f,\ +0.8132526441477239131928f,0.7686451207846403121948f,0.4041520212776958942413f,\ +0.8579940209165215492249f,0.6993723283521831035614f,0.0828925184905529022217f,\ +0.9201254160143435001373f,0.5200281282886862754822f,0.9351884997449815273285f,\ +0.8825624976307153701782f,0.2245844271965324878693f,0.2153332801535725593567f,\ +0.4327089670114219188690f,0.5800157263875007629395f,0.8876141034997999668121f,\ +0.5258982880041003227234f,0.859640696551650762558f,0.7337234076112508773804f,\ +0.7134532411582767963409f,0.1087165409699082374573f,0.8477638359181582927704f,\ +0.6594733335077762603760f,0.7916418449021875858307f,0.6067967480048537254334f,\ +0.4102901122532784938812f,0.1958728153258562088013f,0.241527963895350694656f,\ +0.5113455550745129585266f,0.9119556057266891002655f,0.0928984880447387695313f,\ +0.7438839026726782321930f,0.1938720373436808586121f,0.4355978979729115962982f,\ +0.9922429900616407394409f,0.4533818070776760578156f,0.8269640663638710975647f,\ +0.8889675955288112163544f,0.4682085178792476654053f,0.3856786251999437808991f,\ +0.4124865522608160972595f,0.6955242282710969448090f,0.0978972557932138442993f,\ +0.8728604433126747608185f,0.6359515609219670295715f,0.4129665228538215160370f,\ +0.0294486805796623229980f,0.1809961968101561069489f,0.7658103061839938163757f,\ +0.1232470511458814144135f,0.0170737411826848983765f,0.8835507561452686786652f,\ +0.3164170170202851295471f,0.9378212536685168743134f,0.3916359134018421173096f,\ +0.0844073877669870853424f,0.6934146797284483909607f,0.4618808380328118801117f,\ +0.9355291295796632766724f,0.0842495900578796863556f,0.5402926551178097724915f,\ +0.5613215523771941661835f,0.1306025832891464233398f,0.5840523042716085910797f,\ +0.0048661706969141960144f,0.2761953338049352169037f,0.7478824090212583541870f,\ +0.0194325004704296588898f,0.6444276878610253334045f,0.2243968318216502666473f,\ +0.2478402368724346160889f,0.1196091384626924991608f,0.1883201440796256065369f,\ +0.3393343067727982997894f,0.959958622232079505920f,0.2847225037403404712677f,\ +0.8766820700839161872864f,0.2853349032811820507050f,0.5103433504700660705566f,\ +0.8752629184164106845856f,0.5941145820543169975281f,0.3945342986844480037689f,\ +0.4661326166242361068726f,0.0073588271625339984894f,0.5170202488079667091370f,\ +0.4690007264725863933563f,0.6654530800879001617432f,0.9476742581464350223541f,\ +0.4933638339862227439880f,0.2918433747254312038422f,0.2016727942973375320435f,\ +0.7016656589694321155548f,0.8736049132421612739563f,0.191055159550160169601f,\ +0.5307010114192962646484f,0.8889481076039373874664f,0.0115523664280772209167f,\ +0.4998398735187947750092f,0.6700848620384931564331f,0.4995208983309566974640f,\ +0.1538907447829842567444f,0.2571737091057002544403f,0.9586529098451137542725f,\ +0.6246025026775896549225f,0.9371285131201148033142f,0.9923511571250855922699f,\ +0.3454555813223123550415f,0.7558249053545296192169f,0.2107181670144200325012f,\ +0.9372652801685035228729f,0.6767524704337120056152f,0.7465373151935636997223f,\ +0.4050982249900698661804f,0.5101723610423505306244f,0.9497965183109045028687f,\ +0.0289692510850727558136f,0.1634070957079529762268f,0.4146909262053668498993f,\ +0.0021650679409503936768f,0.1810030029155313968658f,0.4556188201531767845154f,\ +0.1977851442061364650726f,0.6053877938538789749146f,0.4363054675050079822540f,\ +0.8938506888225674629211f,0.6104825991205871105194f,0.4316215068101882934570f,\ +0.2315693595446646213532f,0.4675927339121699333191f,0.6150764389894902706146f,\ +0.8621218334883451461792f,0.3846137975342571735382f} + +#define RESULT {0.6489941700631755017170f,0.3977397277804613495711f,0.2965946353370927379700f,\ +0.1869069269006927436205f,0.1787057982923107302131f,0.2791309758033572174796f,\ +0.6618156282674139134770f,0.6713568034120557248556f,0.1842032905163836498108f,\ +0.6964072867055017823645f,0.1903284889107588750967f,0.6832166836832923584311f,\ +0.5815139023939676077291f,0.2770863600724933761832f,0.2269909547378782532778f,\ +0.4837403483762576783533f,0.7415716096535567292136f,0.7294185948731235491493f,\ +0.0030740227564945614772f,0.3595276195652636896938f,0.7364804339477919459256f,\ +0.6650352209120763413708f,0.5075271675293236972593f,0.7996863750649069180199f,\ +0.8158805463618925557512f,0.3109671621400240670852f,0.5471043307230858410151f,\ +0.6350880886600825947497f,0.3629260331962892438540f,0.1697188821645874701183f,\ +0.1941945483009222261916f,0.8298288212470000813070f,0.8016339250362096713332f,\ +0.5105050203992042012757f,0.3845426809733389905688f,0.1340820770536885198077f,\ +0.6728551393063956220786f,0.5547934214048261258867f,0.7903115520300768581663f,\ +0.5381801020151927295032f,0.1125228794588504499519f,0.8121614659213718390163f,\ +0.5001543426683193738214f,0.7270489540313778142888f,0.1396374447476722568950f,\ +0.2728408635666067505454f,0.787039586876701835472f,0.1375526569581922986529f,\ +0.5315113932434574195440f,0.2963427027488344522865f,0.4588866814078613742822f,\ +0.7261761481530248918404f,0.1975337103519642922844f,0.1105687722679299794804f,\ +0.2142609363196769090010f,0.6025755797169196625873f,0.6129493292515678648513f,\ +0.0691346099927565571619f,0.7934612300206389523538f,0.7601650349312217835873f,\ +0.4823061815340158875465f,0.1821904962108664982612f,0.7448899416114136418088f,\ +0.7984531114259775241848f,0.5834297155392762501691f,0.2738378415422391687351f,\ +0.2453793544289556705085f,0.3794436069308826930957f,0.0436439896074229186085f,\ +0.7265260320935078564020f,0.6951619177333813182074f,0.3932392395246541161313f,\ +0.756532263098035340221f,0.6437374906114369244037f,0.0827976230060826490220f,\ +0.7956775933285428203945f,0.4969045479155810296490f,0.8047109984386738856799f,\ +0.7723690449233312493860f,0.2227012449582090047873f,0.2136730232885993008285f,\ +0.4193316280451939714880f,0.5480370912598671040428f,0.7755678252599553790248f,\ +0.5019901124659599256361f,0.7576080909498315030248f,0.6696395939777050054786f,\ +0.6544486857456611739181f,0.1085025088408962251618f,0.7498026974031274383137f,\ +0.6127007045227848003322f,0.7115079193085073194780f,0.5702389863986391249640f,\ +0.3988753791946258453471f,0.1946227344887739574286f,0.2391865177264060060569f,\ +0.4893511304026755825980f,0.7907024739412412683848f,0.0927649247006697985629f,\ +0.6771509587172231947605f,0.1926598267972080835708f,0.4219525417710163206486f,\ +0.8372545804484667897327f,0.4380081794254953031498f,0.7358790955224862040396f,\ +0.7764215257273850978592f,0.4512883308374140978181f,0.3761879989923791467454f,\ +0.4008885622012666738456f,0.6407879869830552799215f,0.0977409582360771744813f,\ +0.7661702973755802892342f,0.5939433204542849953356f,0.4013282299434615674194f,\ +0.0294444243265947341870f,0.1800095863769710646807f,0.6931213117261505463063f,\ +0.1229352709600845944271f,0.0170729116595537758205f,0.7729963838033769851776f,\ +0.3111634543825066989697f,0.8062711862134785967271f,0.3817009768423728632847f,\ +0.0843071952194427848282f,0.6391670242169816829048f,0.4456326503441452313581f,\ +0.8049131723565879914517f,0.0841499582510354254827f,0.5143869824676139401731f,\ +0.5323054257425473556609f,0.1302316176753355037032f,0.5514090290933710836185f,\ +0.0048661514920936704831f,0.2726971620593832135171f,0.6800878151345280953066f,\ +0.0194312774699979817772f,0.6007410055835120665790f,0.2225183567972019438308f,\ +0.2453107625419813642154f,0.1193241474447570282802f,0.1872090036522589262535f,\ +0.3328594328994332052218f,0.8191678366228465346666f,0.2808911379544120623386f,\ +0.7686206175384947547613f,0.2814788293582466960352f,0.4884768753384709505383f,\ +0.7677120055843160706388f,0.5597752773423979588685f,0.3843783063813486222671f,\ +0.4494348707705640433296f,0.0073587607464321675918f,0.4942920505581040457876f,\ +0.4519951388248303891793f,0.6174156057066327862870f,0.8120604613904897073340f,\ +0.4735912411780784370130f,0.2877181408083371860762f,0.2003085018506444991981f,\ +0.6454907592331077248460f,0.7666485093752634094599f,0.1898949607970919217781f,\ +0.5061380545505530514916f,0.7764092440179690690627f,0.0115521094721033057429f,\ +0.4792850082508480769050f,0.6210525015048259378503f,0.4790050323268763010631f,\ +0.1532840475926474099744f,0.2543482295640571710926f,0.8184182421341416047156f,\ +0.5847748710564846241766f,0.8058612048242990155700f,0.8373137227375435642784f,\ +0.3386253785349607747790f,0.6858891905260645627251f,0.2091622355697206059322f,\ +0.8059421776695899763965f,0.6262645222993747928797f,0.6791010706734159629860f,\ +0.3941090372936942864968f,0.4883276667837411211259f,0.8132971260929759971248f,\ +0.0289651993379718974975f,0.1626808532406751051092f,0.4029070726587401507501f,\ +0.0021650662494845369747f,0.1800162812994652028475f,0.4400180916539356279493f,\ +0.1964981391369581276152f,0.5690809947427917236951f,0.4225939313085426696226f,\ +0.7794896502659051096273f,0.5732629547867681418794f,0.4183441479008401797657f,\ +0.2295052748166268863361f,0.4507387331252663553727f,0.5770209539366986106757f,\ +0.7592252195553320648358f,0.3752011769086914250160f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} + +#define CRESULTR {0.6566347140259699566300f,1.0119999258966314581443f,0.6596019011837132017817f,\ +1.035407544941025825835f,0.1779303602523068794650f,0.2091417769467268095163f,\ +0.6938478808740486947215f,0.1809168200637071011183f,0.0097840077120305499192f,\ +0.1918418803766589464388f,0.6967642148886226127758f,0.6477398327340490036264f,\ +0.9315995708552796683577f,0.3317736774434180135884f,0.6081114651603225507159f,\ +0.3241823207263323514127f,0.7257014354377283593678f,0.7561000009288112444494f,\ +0.3005492023050818084506f,0.7318806897852137005600f,0.6527186268049437467553f,\ +0.6309941597264083767982f,0.4252885469799541073854f,1.1110399216338266992210f,\ +0.5224655834751933403126f,0.9668090801088078389824f,0.0373711557740689717666f,\ +0.3268489749847858782950f,0.6382749343202905878414f,1.0114485987268988509413f,\ +0.3221010444660392657568f,0.4139453304596071303578f,0.4756810141068628650096f,\ +0.8632093598097250186640f,0.3598514339778784987267f,0.7487720850314417697646f,\ +0.6130614254242318095223f,0.6997626019564747723578f,0.2545007621033356648432f,\ +0.5515473173800672368472f,0.2912178978332317091926f,0.5910474830807833646063f,\ +0.2166565482354273763921f,0.8021363255207357711996f,0.7443835374940948046429f,\ +0.4891530673136452178618f,0.7013877718782099979222f,0.6913869813942569164667f,\ +0.5769011420640627330059f,0.3117908008696873567445f,0.4351103756992900639666f,\ +0.3419338661078391572445f,0.2322493315296763338740f,0.3651122336184794425762f,\ +0.5004568464347787237756f,0.8474278924029616799629f,0.1163175220516309976704f,\ +0.0720827231471598273149f,0.0923335564898466049089f,0.5339057146859005342776f,\ +0.2372798723378120866467f,0.8333578948329619651148f,0.5639606188473457182298f,\ +0.4177713004682119257716f,0.1842205910422827219719f,0.0061220134095790416234f,\ +0.3327145852908883205679f,0.6419359463626251871560f,1.1422474153376851457864f,\ +0.9169649828841031080629f,0.0457541584695274616834f,0.5117881770849980194171f,\ +0.6755451518212014505593f,0.5184569836246168961225f,0.5713468012823553765500f,\ +0.0858443570774837100279f,0.1606151108412635364342f,0.7918113937347260877786f,\ +0.6654818631286439911676f,0.4439038705567253662032f,0.796132686757749730155f,\ +0.3903563868552101800979f,0.1263898622508018709798f,0.7049140832202889228597f,\ +0.8114695967676066601371f,0.6469075512356741164410f,0.7677157469479103379939f,\ +1.0953970513593642710504f,0.7769182781192301989748f,1.0073965025007358686793f,\ +1.074286510426218699266f,0.1553189729796884688273f,0.8413108822720302137910f,\ +0.3462739066818524835689f,0.3926238690106399475965f,0.3256804935966552405624f,\ +0.1633497671324356526057f,1.0010270500405602511762f,1.115022351982163151263f,\ +0.7899569005544465616353f,0.2603865455411881191239f,0.5183255731419573741903f,\ +0.7736654652779521024186f,0.7045488355155032911270f,0.99239017570392618062f,\ +0.8571418992433421646382f,0.6471261632164159172120f,0.6653365916658987577748f,\ +0.4179492416945764787783f,0.332966594116362202271f,0.8071129279142643664358f,\ +0.6917895244691119049918f,0.6612409505512693019824f,0.8506578773411223037826f,\ +0.4212670370210502279740f,0.7142246190696375229834f,0.5650468142706680518828f,\ +0.2457619298195089230230f,0.4999304697490009052885f,0.9146990697266257352993f,\ +0.6632530384013611834959f,0.5254071357713419043733f,0.8979087718767884140902f,\ +0.3295715941858761155459f,0.7411311982358101957402f,0.0964650394595463894776f,\ +0.5756260203046842383046f,0.9308880528862794045963f,1.2271094550000687384284f,\ +0.6789423000457328605251f,0.1649198200195263752654f,1.1279258179884905644030f,\ +0.3999539922775662836862f,0.6338241429246500580064f,0.1223148225900566599123f,\ +0.9023144865193905017620f,0.0330081109061416202999f,0.3767477211449618557104f,\ +0.3412118905344592723061f,0.5930700069420078435201f,0.1017393430189639513817f,\ +0.0308061153410014963716f,0.4886538358989525598908f,0.3559707023880692156048f,\ +0.4308223854061962176942f,0.3514869377238818426434f,0.0799867738322445898103f,\ +0.8173018105145738454453f,0.2037338143062503714731f,1.220430983869785990237f,\ +0.3406746275228044185113f,0.0004150259547877954485f,0.0971888856349881896657f,\ +0.4757842207231965381276f,0.4040809859598182285367f,0.2820450997896822298294f,\ +0.2811152693325764118093f,0.9590128703774639662427f,0.5354093557700149164091f,\ +0.5019368627578308927895f,0.8117140104249528365088f,0.4534830656186849551226f,\ +1.1783423931120406980000f,0.1434370411700725822524f,0.2934216038065708409555f,\ +0.1779829127631718521663f,0.0720832823745556211525f,0.9611918663155849529289f,\ +0.7759794971968927423944f,0.4215038017355943744668f,0.8045968908805133379403f,\ +0.1352257439826550500239f,0.0966259862726158991197f,0.9423768067086430999524f,\ +0.4303839309127981405112f,1.027158469056514755735f,0.0309063123957022088673f,\ +0.1427581856076631239283f,0.5058338353137836751472f,0.5922330662524728506213f,\ +0.2998212988294082781415f,0.4854774490519005447631f,0.2905366689284186176856f,\ +0.732577252768074504985f,0.3467085924376158700966f,0.3404646689762517719480f,\ +0.7192597601031739396049f,0.8895525359433824608146f,0.2563314638119464916599f,\ +0.8145777458167494655683f,0.1728338655335915907685f,0.5887205934900180404057f,\ +0.6014718010439381590260f,0.0675406202372636349507f,0.9510839296787396701660f,\ +1.1598095667324348490013f,0.0309128254938883482994f,0.6857099135308569737290f,\ +0.8512200678266018671891f,0.2729650321569278004219f} + +#define CRESULTI {0.4759980266175199981049f,0.4371792356294723624899f,1.0366401767050017479477f,\ +0.6028332456001923578270f,0.2045505325550055208961f,0.1915259687562470281019f,\ +0.3491380267554807237396f,0.8920876814407183719169f,1.0006703458507313353465f,\ +0.8009779429459989996687f,0.6984902194099197325627f,1.0544026495724472258786f,\ +0.9182841727572422785286f,0.0106808422200693302340f,0.9834445059055472171394f,\ +0.3787326350421501008903f,0.2100400056445083096790f,0.4557093767576786413898f,\ +0.7737087506882367460293f,0.0206637462688268880306f,0.2204234493680024276063f,\ +0.6615160486898620240126f,0.7692763584553293787494f,0.6356101396181920160089f,\ +0.0925908774129100275996f,0.7206114133477932170990f,1.0359844944992535609174f,\ +0.2069515918997265613299f,0.4117290503525293243747f,0.5490423106381259188424f,\ +0.4462283131040214456675f,0.1189364264093275003198f,0.5274577925657699672968f,\ +0.5430180765717186330832f,0.1643914008870697718301f,0.8230721066766158999783f,\ +0.1735038050714417801057f,0.1378272158996049767676f,0.1748220246567987745667f,\ +0.3903220669843952550515f,0.936703269190418574830f,0.7166597754518847507299f,\ +0.8900704241537943373075f,0.0891449760436722887791f,0.8771518805722777756273f,\ +0.3706792570421439947381f,0.0111920996603491820776f,0.6215444290094976897976f,\ +0.2530709869257740662896f,0.1319801016143227201383f,0.9046350616526124266414f,\ +0.2884930138703660218447f,0.2251695646636414915864f,0.8648081988694793498240f,\ +0.2840216379380148814526f,0.5504953762822683005496f,0.1359271700042656016993f,\ +0.5693382736493431961478f,0.3322720353016644923017f,0.1721580834994098363477f,\ +0.5135850315563981194345f,0.3474773880755230304196f,0.9431362964718456032287f,\ +1.0340232262721140710227f,0.3402877573217258366789f,0.6401040473330621427550f,\ +0.4069022009136239459437f,0.2439407776749255851723f,0.5378842266979906305835f,\ +0.2570716586141951753852f,0.0904088654517940515376f,0.7403475521247256940782f,\ +0.2047878426979200527924f,0.8489939536581485590716f,0.3473238625280567482001f,\ +1.1411188764290771668897f,0.3051746072580045487932f,0.0407043050782743276450f,\ +0.6033725923116708411698f,0.778737542643346047910f,0.1206535237380119696127f,\ +0.8418336511001852651148f,0.5839585555917582437857f,0.1467518266954731531726f,\ +0.6888901126606848945855f,0.0732090771366951525989f,0.5554652901202962178573f,\ +0.6068461403975041745795f,0.5973804827482247503667f,0.5862495346519734917834f,\ +0.7008734442762630800772f,0.6689719175986947874435f,0.8829098191147302099324f,\ +1.0188712228965588479923f,0.0469681660587412258545f,0.4264494425604897775983f,\ +1.1260897634779567511032f,0.5891751058811135477455f,0.5586811292942333029288f,\ +0.0375737549548666310839f,0.8936786828452066844264f,0.1824421274677656690244f,\ +0.2090978327687162685589f,0.9628255596340984379111f,0.7821471108810679195855f,\ +0.6470050596557553879151f,0.5216627363302938080736f,0.1830177712067865836154f,\ +0.5134143514131775942744f,0.0073119913675850425894f,0.7504222430574429836270f,\ +0.0193983766100578602920f,0.2014128332431188439511f,0.3088455785813677967333f,\ +0.6065483134448432789299f,0.0461172484518394959485f,0.6134456837548584173803f,\ +0.0989331667688019139595f,0.2433781622039619951803f,0.6701373782390742661619f,\ +0.2663685035487164953771f,0.4365368071405912875349f,0.7189236163164304249662f,\ +0.1697526069685433847134f,0.4811811372286406429666f,0.9436115675726329810047f,\ +0.6813279536427474525340f,0.5582673535726633273768f,0.6663831331574520122629f,\ +0.7137987696438253815146f,0.9132123041060544732517f,0.6154027043735471602659f,\ +0.8421707385350217789366f,0.2467394118703030714279f,0.730464243452961903280f,\ +0.4583747264016979627854f,0.0989323235351602520149f,0.4538168380708768601117f,\ +0.6949204434222109316721f,0.4568731305870791792323f,0.9718116503334458533558f,\ +0.9322636874728698064274f,0.1486199865445305412504f,0.2824746711136658094965f,\ +0.238217162606873950059f,0.1603203534786354911290f,1.130704398714823533112f,\ +0.0402833511895827542371f,0.4788366747059483730098f,0.6354755115001236021044f,\ +0.3566529249056448747091f,0.3017948657011057522759f,0.0413466935121344983384f,\ +0.46096369056612357f,0.5052181131344314346521f,0.3479618653266752237308f,\ +0.2285599720872606155364f,0.462725396526868226754f,0.3406579403750831791520f,\ +0.2835867580422753442271f,0.2238269615848648141920f,0.0477728736811990767341f,\ +0.6329115684248395323763f,0.3924052442709091148565f,0.4301664447715317640686f,\ +0.1563039559206648165812f,0.8717772653208039068673f,0.544280842419675670030f,\ +0.3964232571280063566199f,0.9317498908981691752018f,0.0927647199866874355711f,\ +0.239471404370552171104f,0.6064908073717841796579f,0.5504808053886728336224f,\ +0.0526899922619719976447f,0.4312873750429307428966f,0.4329527886793243518504f,\ +0.0278317754230633894463f,0.8642909834572990446233f,0.1923982024967207382638f,\ +0.9846585214795218199413f,0.3418444780294159768275f,0.9720887284222768931485f,\ +0.3044849414953779143112f,0.2763773261322472474255f,0.9320336608375792142311f,\ +0.4523656548286881795562f,0.3324058771805019629753f,0.6596413052835798929152f,\ +0.2842028663251400799616f,0.3229125187951548126009f,1.0425270197833373941876f,\ +0.4773378821453879150560f,0.3476356752155591589570f,0.8551943809979846156111f,\ +0.7664315470559724952082f,0.3488628182805697530711f,0.7453969031814248191736f,\ +0.8607289142164601392082f,0.5322582746397167552388f} + + +void ssinsTest() { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=ssins(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } +} + +void csinsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=csins(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void ssinaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + ssina(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void csinaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + csina(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testSin() { + printf("\n>>>> Float Sine Tests\n"); + ssinsTest(); + csinsTest(); + ssinaTest(); + csinaTest(); + return 0; +} + +int main(void) { + assert(testSin() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/testSin.h b/2.3-1/src/c/elementaryFunctions/sin/testSin.h new file mode 100644 index 00000000..d443985f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/testSin.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTSIN_H_ +#define _TESTSIN_H_ + +#include +#include +#include +#include "sin.h" +#include "constant.h" + +void ssinsTest(void); + +void dsinsTest(void); + +void csinsTest(void); + +void zsinsTest(void); + +void ssinaTest(void); + +void dsinaTest(void); + +void csinaTest(void); + +void zsinaTest(void); + +int testSin(void); + +#endif /* !_TESTSIN_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/sin/zsina.c b/2.3-1/src/c/elementaryFunctions/sin/zsina.c new file mode 100644 index 00000000..ed417ea8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/zsina.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" + +void zsina(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zsins(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sin/zsins.c b/2.3-1/src/c/elementaryFunctions/sin/zsins.c new file mode 100644 index 00000000..163cfcc9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sin/zsins.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sin.h" +#include "cos.h" +#include "sinh.h" +#include "cosh.h" + +doubleComplex zsins(doubleComplex z) { + double real = zreals(z); + double imag = zimags(z); + + return(DoubleComplex(dsins(real) * dcoshs(imag), dcoss(real) * dsinhs(imag))); +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/Makefile.am b/2.3-1/src/c/elementaryFunctions/sinh/Makefile.am new file mode 100644 index 00000000..edcba921 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/Makefile.am @@ -0,0 +1,68 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSinh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSinh.la + +libSinh_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssinhs.c \ + dsinhs.c \ + csinhs.c \ + zsinhs.c \ + ssinha.c \ + dsinha.c \ + csinha.c \ + zsinha.c + +HEAD = ../includes/sinh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatSinh testDoubleSinh + +TESTS = testFloatSinh testDoubleSinh + +# +# -*- Hyperbolic Sine Tests -*- +# +testFloatSinh_SOURCES = testSinh.h testFloatSinh.c +testFloatSinh_CFLAGS = $(check_INCLUDES) +testFloatSinh_LDADD = $(check_LDADD) + +testDoubleSinh_SOURCES = testSinh.h testDoubleSinh.c +testDoubleSinh_CFLAGS = $(check_INCLUDES) +testDoubleSinh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/sinh/Makefile.in b/2.3-1/src/c/elementaryFunctions/sinh/Makefile.in new file mode 100644 index 00000000..0faaa296 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/Makefile.in @@ -0,0 +1,808 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatSinh$(EXEEXT) testDoubleSinh$(EXEEXT) +TESTS = testFloatSinh$(EXEEXT) testDoubleSinh$(EXEEXT) +subdir = src/c/elementaryFunctions/sinh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSinh_la_LIBADD = +am__objects_1 = +am__objects_2 = libSinh_la-ssinhs.lo libSinh_la-dsinhs.lo \ + libSinh_la-csinhs.lo libSinh_la-zsinhs.lo libSinh_la-ssinha.lo \ + libSinh_la-dsinha.lo libSinh_la-csinha.lo libSinh_la-zsinha.lo +am_libSinh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSinh_la_OBJECTS = $(am_libSinh_la_OBJECTS) +libSinh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSinh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleSinh_OBJECTS = testDoubleSinh-testDoubleSinh.$(OBJEXT) +testDoubleSinh_OBJECTS = $(am_testDoubleSinh_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleSinh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleSinh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSinh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatSinh_OBJECTS = testFloatSinh-testFloatSinh.$(OBJEXT) +testFloatSinh_OBJECTS = $(am_testFloatSinh_OBJECTS) +testFloatSinh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatSinh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSinh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSinh_la_SOURCES) $(testDoubleSinh_SOURCES) \ + $(testFloatSinh_SOURCES) +DIST_SOURCES = $(libSinh_la_SOURCES) $(testDoubleSinh_SOURCES) \ + $(testFloatSinh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSinh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSinh.la +libSinh_la_SOURCES = $(HEAD) $(SRC) +SRC = ssinhs.c \ + dsinhs.c \ + csinhs.c \ + zsinhs.c \ + ssinha.c \ + dsinha.c \ + csinha.c \ + zsinha.c + +HEAD = ../includes/sinh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic Sine Tests -*- +# +testFloatSinh_SOURCES = testSinh.h testFloatSinh.c +testFloatSinh_CFLAGS = $(check_INCLUDES) +testFloatSinh_LDADD = $(check_LDADD) +testDoubleSinh_SOURCES = testSinh.h testDoubleSinh.c +testDoubleSinh_CFLAGS = $(check_INCLUDES) +testDoubleSinh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/sinh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/sinh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSinh.la: $(libSinh_la_OBJECTS) $(libSinh_la_DEPENDENCIES) + $(libSinh_la_LINK) -rpath $(pkglibdir) $(libSinh_la_OBJECTS) $(libSinh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleSinh$(EXEEXT): $(testDoubleSinh_OBJECTS) $(testDoubleSinh_DEPENDENCIES) + @rm -f testDoubleSinh$(EXEEXT) + $(testDoubleSinh_LINK) $(testDoubleSinh_OBJECTS) $(testDoubleSinh_LDADD) $(LIBS) +testFloatSinh$(EXEEXT): $(testFloatSinh_OBJECTS) $(testFloatSinh_DEPENDENCIES) + @rm -f testFloatSinh$(EXEEXT) + $(testFloatSinh_LINK) $(testFloatSinh_OBJECTS) $(testFloatSinh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-csinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-csinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-dsinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-dsinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-ssinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-ssinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-zsinha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSinh_la-zsinhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSinh-testDoubleSinh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSinh-testFloatSinh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSinh_la-ssinhs.lo: ssinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-ssinhs.lo -MD -MP -MF $(DEPDIR)/libSinh_la-ssinhs.Tpo -c -o libSinh_la-ssinhs.lo `test -f 'ssinhs.c' || echo '$(srcdir)/'`ssinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-ssinhs.Tpo $(DEPDIR)/libSinh_la-ssinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssinhs.c' object='libSinh_la-ssinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-ssinhs.lo `test -f 'ssinhs.c' || echo '$(srcdir)/'`ssinhs.c + +libSinh_la-dsinhs.lo: dsinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-dsinhs.lo -MD -MP -MF $(DEPDIR)/libSinh_la-dsinhs.Tpo -c -o libSinh_la-dsinhs.lo `test -f 'dsinhs.c' || echo '$(srcdir)/'`dsinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-dsinhs.Tpo $(DEPDIR)/libSinh_la-dsinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsinhs.c' object='libSinh_la-dsinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-dsinhs.lo `test -f 'dsinhs.c' || echo '$(srcdir)/'`dsinhs.c + +libSinh_la-csinhs.lo: csinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-csinhs.lo -MD -MP -MF $(DEPDIR)/libSinh_la-csinhs.Tpo -c -o libSinh_la-csinhs.lo `test -f 'csinhs.c' || echo '$(srcdir)/'`csinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-csinhs.Tpo $(DEPDIR)/libSinh_la-csinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csinhs.c' object='libSinh_la-csinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-csinhs.lo `test -f 'csinhs.c' || echo '$(srcdir)/'`csinhs.c + +libSinh_la-zsinhs.lo: zsinhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-zsinhs.lo -MD -MP -MF $(DEPDIR)/libSinh_la-zsinhs.Tpo -c -o libSinh_la-zsinhs.lo `test -f 'zsinhs.c' || echo '$(srcdir)/'`zsinhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-zsinhs.Tpo $(DEPDIR)/libSinh_la-zsinhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsinhs.c' object='libSinh_la-zsinhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-zsinhs.lo `test -f 'zsinhs.c' || echo '$(srcdir)/'`zsinhs.c + +libSinh_la-ssinha.lo: ssinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-ssinha.lo -MD -MP -MF $(DEPDIR)/libSinh_la-ssinha.Tpo -c -o libSinh_la-ssinha.lo `test -f 'ssinha.c' || echo '$(srcdir)/'`ssinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-ssinha.Tpo $(DEPDIR)/libSinh_la-ssinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssinha.c' object='libSinh_la-ssinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-ssinha.lo `test -f 'ssinha.c' || echo '$(srcdir)/'`ssinha.c + +libSinh_la-dsinha.lo: dsinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-dsinha.lo -MD -MP -MF $(DEPDIR)/libSinh_la-dsinha.Tpo -c -o libSinh_la-dsinha.lo `test -f 'dsinha.c' || echo '$(srcdir)/'`dsinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-dsinha.Tpo $(DEPDIR)/libSinh_la-dsinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsinha.c' object='libSinh_la-dsinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-dsinha.lo `test -f 'dsinha.c' || echo '$(srcdir)/'`dsinha.c + +libSinh_la-csinha.lo: csinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-csinha.lo -MD -MP -MF $(DEPDIR)/libSinh_la-csinha.Tpo -c -o libSinh_la-csinha.lo `test -f 'csinha.c' || echo '$(srcdir)/'`csinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-csinha.Tpo $(DEPDIR)/libSinh_la-csinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csinha.c' object='libSinh_la-csinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-csinha.lo `test -f 'csinha.c' || echo '$(srcdir)/'`csinha.c + +libSinh_la-zsinha.lo: zsinha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -MT libSinh_la-zsinha.lo -MD -MP -MF $(DEPDIR)/libSinh_la-zsinha.Tpo -c -o libSinh_la-zsinha.lo `test -f 'zsinha.c' || echo '$(srcdir)/'`zsinha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSinh_la-zsinha.Tpo $(DEPDIR)/libSinh_la-zsinha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsinha.c' object='libSinh_la-zsinha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSinh_la_CFLAGS) $(CFLAGS) -c -o libSinh_la-zsinha.lo `test -f 'zsinha.c' || echo '$(srcdir)/'`zsinha.c + +testDoubleSinh-testDoubleSinh.o: testDoubleSinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSinh_CFLAGS) $(CFLAGS) -MT testDoubleSinh-testDoubleSinh.o -MD -MP -MF $(DEPDIR)/testDoubleSinh-testDoubleSinh.Tpo -c -o testDoubleSinh-testDoubleSinh.o `test -f 'testDoubleSinh.c' || echo '$(srcdir)/'`testDoubleSinh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSinh-testDoubleSinh.Tpo $(DEPDIR)/testDoubleSinh-testDoubleSinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSinh.c' object='testDoubleSinh-testDoubleSinh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSinh_CFLAGS) $(CFLAGS) -c -o testDoubleSinh-testDoubleSinh.o `test -f 'testDoubleSinh.c' || echo '$(srcdir)/'`testDoubleSinh.c + +testDoubleSinh-testDoubleSinh.obj: testDoubleSinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSinh_CFLAGS) $(CFLAGS) -MT testDoubleSinh-testDoubleSinh.obj -MD -MP -MF $(DEPDIR)/testDoubleSinh-testDoubleSinh.Tpo -c -o testDoubleSinh-testDoubleSinh.obj `if test -f 'testDoubleSinh.c'; then $(CYGPATH_W) 'testDoubleSinh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSinh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSinh-testDoubleSinh.Tpo $(DEPDIR)/testDoubleSinh-testDoubleSinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSinh.c' object='testDoubleSinh-testDoubleSinh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSinh_CFLAGS) $(CFLAGS) -c -o testDoubleSinh-testDoubleSinh.obj `if test -f 'testDoubleSinh.c'; then $(CYGPATH_W) 'testDoubleSinh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSinh.c'; fi` + +testFloatSinh-testFloatSinh.o: testFloatSinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSinh_CFLAGS) $(CFLAGS) -MT testFloatSinh-testFloatSinh.o -MD -MP -MF $(DEPDIR)/testFloatSinh-testFloatSinh.Tpo -c -o testFloatSinh-testFloatSinh.o `test -f 'testFloatSinh.c' || echo '$(srcdir)/'`testFloatSinh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSinh-testFloatSinh.Tpo $(DEPDIR)/testFloatSinh-testFloatSinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSinh.c' object='testFloatSinh-testFloatSinh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSinh_CFLAGS) $(CFLAGS) -c -o testFloatSinh-testFloatSinh.o `test -f 'testFloatSinh.c' || echo '$(srcdir)/'`testFloatSinh.c + +testFloatSinh-testFloatSinh.obj: testFloatSinh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSinh_CFLAGS) $(CFLAGS) -MT testFloatSinh-testFloatSinh.obj -MD -MP -MF $(DEPDIR)/testFloatSinh-testFloatSinh.Tpo -c -o testFloatSinh-testFloatSinh.obj `if test -f 'testFloatSinh.c'; then $(CYGPATH_W) 'testFloatSinh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSinh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSinh-testFloatSinh.Tpo $(DEPDIR)/testFloatSinh-testFloatSinh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSinh.c' object='testFloatSinh-testFloatSinh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSinh_CFLAGS) $(CFLAGS) -c -o testFloatSinh-testFloatSinh.obj `if test -f 'testFloatSinh.c'; then $(CYGPATH_W) 'testFloatSinh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSinh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/sinh/csinha.c b/2.3-1/src/c/elementaryFunctions/sinh/csinha.c new file mode 100644 index 00000000..fdce6c58 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/csinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" + +void csinha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = csinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/csinhs.c b/2.3-1/src/c/elementaryFunctions/sinh/csinhs.c new file mode 100644 index 00000000..d4e7e7d9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/csinhs.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" +#include "sin.h" + +floatComplex csinhs(floatComplex z) { + float real = creals(z); + float imag = cimags(z); + + floatComplex result = csins(FloatComplex(-imag, real)); + return (FloatComplex(cimags(result), -creals(result))); +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/dsinha.c b/2.3-1/src/c/elementaryFunctions/sinh/dsinha.c new file mode 100644 index 00000000..df28279f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/dsinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" + +void dsinha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dsinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/dsinhs.c b/2.3-1/src/c/elementaryFunctions/sinh/dsinhs.c new file mode 100644 index 00000000..558bea06 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/dsinhs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sinh.h" + +double dsinhs(double x) { + return (sinh(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/ssinha.c b/2.3-1/src/c/elementaryFunctions/sinh/ssinha.c new file mode 100644 index 00000000..a095dbe2 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/ssinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" + +void ssinha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ssinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/ssinhs.c b/2.3-1/src/c/elementaryFunctions/sinh/ssinhs.c new file mode 100644 index 00000000..326b5804 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/ssinhs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sinh.h" + +float ssinhs(float x) { + return (sinhf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/testDoubleSinh.c b/2.3-1/src/c/elementaryFunctions/sinh/testDoubleSinh.c new file mode 100644 index 00000000..d4223852 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/testDoubleSinh.c @@ -0,0 +1,511 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSinh.h" + +#define SOURCE {0.7062616096809506416321,0.4090520101599395275116,0.3011248558759689331055,\ +0.1880126395262777805328,0.1796709178015589714050,0.2828889950178563594818,\ +0.7232380937784910202026,0.7360379849560558795929,0.1852612206712365150452,\ +0.7703790138475596904755,0.1914967410266399383545,0.7521587223745882511139,\ +0.6205883463844656944275,0.2807604051195085048676,0.2289868686348199844360,\ +0.5049233403988182544708,0.8354099662974476814270,0.8174716415815055370331,\ +0.0030740275979042053223,0.3677616142667829990387,0.8278525872156023979187,\ +0.72754097869619727135,0.5323124285787343978882,0.9267726917751133441925,\ +0.9542504185810685157776,0.3162104780785739421845,0.5789009965956211090088,\ +0.6881225542165338993073,0.3714061146602034568787,0.1705444059334695339203,\ +0.1954363007098436355591,0.978800852317363023758,0.9300233917310833930969,\ +0.5357720064930617809296,0.3947123587131500244141,0.1344871171750128269196,\ +0.7380615202710032463074,0.588114650454372167587,0.9113173168152570724487,\ +0.5682763461954891681671,0.1127616921439766883850,0.9478473584167659282684,\ +0.5237770043313503265381,0.8140139640308916568756,0.1400952627882361412048,\ +0.2763446993194520473480,0.9059953633695840835571,0.1379901585169136524200,\ +0.5603838684037327766419,0.3008610638789832592011,0.4767417535185813904,\ +0.8127435916103422641754,0.1988414181396365165710,0.1107953130267560482025,\ +0.2159351315349340438843,0.6467244853265583515167,0.6597879612818360328674,\ +0.0691898013465106487274,0.9164751060307025909424,0.8635670826770365238190,\ +0.5032854294404387474060,0.1832137755118310451508,0.8403698671609163284302,\ +0.9247214836068451404572,0.6229452537372708320618,0.2773811477236449718475,\ +0.2479109913110733032227,0.3891948559321463108063,0.0436578569933772087097,\ +0.8132526441477239131928,0.7686451207846403121948,0.4041520212776958942413,\ +0.8579940209165215492249,0.6993723283521831035614,0.0828925184905529022217,\ +0.9201254160143435001373,0.5200281282886862754822,0.9351884997449815273285,\ +0.8825624976307153701782,0.2245844271965324878693,0.2153332801535725593567,\ +0.4327089670114219188690,0.5800157263875007629395,0.8876141034997999668121,\ +0.5258982880041003227234,0.859640696551650762558,0.7337234076112508773804,\ +0.7134532411582767963409,0.1087165409699082374573,0.8477638359181582927704,\ +0.6594733335077762603760,0.7916418449021875858307,0.6067967480048537254334,\ +0.4102901122532784938812,0.1958728153258562088013,0.241527963895350694656,\ +0.5113455550745129585266,0.9119556057266891002655,0.0928984880447387695313,\ +0.7438839026726782321930,0.1938720373436808586121,0.4355978979729115962982,\ +0.9922429900616407394409,0.4533818070776760578156,0.8269640663638710975647,\ +0.8889675955288112163544,0.4682085178792476654053,0.3856786251999437808991,\ +0.4124865522608160972595,0.6955242282710969448090,0.0978972557932138442993,\ +0.8728604433126747608185,0.6359515609219670295715,0.4129665228538215160370,\ +0.0294486805796623229980,0.1809961968101561069489,0.7658103061839938163757,\ +0.1232470511458814144135,0.0170737411826848983765,0.8835507561452686786652,\ +0.3164170170202851295471,0.9378212536685168743134,0.3916359134018421173096,\ +0.0844073877669870853424,0.6934146797284483909607,0.4618808380328118801117,\ +0.9355291295796632766724,0.0842495900578796863556,0.5402926551178097724915,\ +0.5613215523771941661835,0.1306025832891464233398,0.5840523042716085910797,\ +0.0048661706969141960144,0.2761953338049352169037,0.7478824090212583541870,\ +0.0194325004704296588898,0.6444276878610253334045,0.2243968318216502666473,\ +0.2478402368724346160889,0.1196091384626924991608,0.1883201440796256065369,\ +0.3393343067727982997894,0.959958622232079505920,0.2847225037403404712677,\ +0.8766820700839161872864,0.2853349032811820507050,0.5103433504700660705566,\ +0.8752629184164106845856,0.5941145820543169975281,0.3945342986844480037689,\ +0.4661326166242361068726,0.0073588271625339984894,0.5170202488079667091370,\ +0.4690007264725863933563,0.6654530800879001617432,0.9476742581464350223541,\ +0.4933638339862227439880,0.2918433747254312038422,0.2016727942973375320435,\ +0.7016656589694321155548,0.8736049132421612739563,0.191055159550160169601,\ +0.5307010114192962646484,0.8889481076039373874664,0.0115523664280772209167,\ +0.4998398735187947750092,0.6700848620384931564331,0.4995208983309566974640,\ +0.1538907447829842567444,0.2571737091057002544403,0.9586529098451137542725,\ +0.6246025026775896549225,0.9371285131201148033142,0.9923511571250855922699,\ +0.3454555813223123550415,0.7558249053545296192169,0.2107181670144200325012,\ +0.9372652801685035228729,0.6767524704337120056152,0.7465373151935636997223,\ +0.4050982249900698661804,0.5101723610423505306244,0.9497965183109045028687,\ +0.0289692510850727558136,0.1634070957079529762268,0.4146909262053668498993,\ +0.0021650679409503936768,0.1810030029155313968658,0.4556188201531767845154,\ +0.1977851442061364650726,0.6053877938538789749146,0.4363054675050079822540,\ +0.8938506888225674629211,0.6104825991205871105194,0.4316215068101882934570,\ +0.2315693595446646213532,0.4675927339121699333191,0.6150764389894902706146,\ +0.8621218334883451461792,0.3846137975342571735382} + +#define RESULT {0.7664580028254754928696,0.4205551659468407255105,0.3056963415200024125618,\ +0.1891222676242167166638,0.1806391579088424403921,0.2866772088777344573707,\ +0.7879588923423612722985,0.8043199087726096152551,0.1863227880624591659142,\ +0.8488736885251115804607,0.1926692851046332977116,0.8251135119137460449679,\ +0.6611970121102711539507,0.2844635257838270536723,0.2309932755888478017603,\ +0.5266533298916223904129,0.9360312470542428986420,0.9116099093552539889274,\ +0.0030740324393184245005,0.3761077290387422333851,0.9257063259676088229355,\ +0.7934443680694276412879,0.5578100394371053871723,1.0652568032347091708800,\ +1.1058113484469005438626,0.3215064844139553512648,0.6117813058051149166516,\ +0.7437286582384788902189,0.3800039829530417190284,0.1713723342659267123711,\ +0.1966828051044853253870,1.1427508290431065418602,1.0700119918415624820085,\ +0.5617747940982125154363,0.4050417184145185811595,0.1348928905465842098543,\ +0.8069184166073162245425,0.6226085497916535871354,1.0428015042623968167135,\ +0.599360373550158476164,0.1130008086773218733967,1.0962875524202524424311,\ +0.5480567058218726028684,0.9069365704321199483928,0.1405539802560804574227,\ +0.2798753950272672152977,1.0351270996105206290139,0.1384284939283927651221,\ +0.5901774101693750829156,0.3054205096845967748465,0.4950072868345940513279,\ +0.9052222830609093495724,0.2001543065651501807079,0.1110221320487437962621,\ +0.2176171514122479666575,0.6927590813444466366633,0.7087105942005499370495,\ +0.0692450191279527643706,1.0502673603752690212332,0.9749750092666438217037,\ +0.5248028600685283873162,0.1842404954551666029783,0.9428365029551442066946,\ +1.0622620507764020114649,0.6640243707694319930113,0.2809518213531947417039,\ +0.2504582355084098987952,0.3990949339123049943723,0.0436717270227189244269,\ +0.9059090417535855532805,0.8466005962798425210636,0.4152445147326426222456,\ +0.9672066028315211561051,0.7577960172200091104600,0.0829874792017267076671,\ +1.0555680256611981171488,0.5437855687819154182350,1.0775908909563920446,\ +1.0016820806611792527008,0.2264771318543304656767,0.2170012532427569029725,\ +0.4463391386879682620759,0.6130884787237118604963,1.0088449524118139333240,\ +0.5504769168224112885213,0.9694988006053883999869,0.8013516989017863689782,\ +0.7755389514921953164617,0.1089308262191755055648,0.9530245458199384511744,\ +0.7083249989659490264415,0.8769583844905950442694,0.6447256579530228348673,\ +0.4218986249201953087074,0.1971277014550009420990,0.2438831089846125732557,\ +0.533922660930493120368,1.0437239139050094038907,0.0930321667054502116079,\ +0.8144136536953445748566,0.1950888127224135459858,0.4495046404602288658836,\ +1.1632667385972190743360,0.4690747173387543877965,0.9244959100750387293033,\ +1.0107684876711933164017,0.4855037229984789926007,0.3953114776639800043157,\ +0.4242835646837694318911,0.7529734313215303842526,0.0980537032157421939438,\ +0.9879966883143458389327,0.6796935751591178798137,0.4248049987494686430267,\ +0.0294529372018587365378,0.1819860446417611021808,0.8428897015241260115559,\ +0.1235593052805215308343,0.0170745707299980210847,1.00308135457124825152,\ +0.3217234423590110692359,1.0814650488452381971172,0.4017244052147506683248,\ +0.0845076517232198759499,0.7503344007980436991545,0.4784793780524976836155,\ +1.0780917143422910076112,0.0843492926084187938374,0.5669657003997248256866,\ +0.5912664777040658181662,0.1309741822002446487439,0.6178283036240778125503,\ +0.0048661899017801981890,0.2797202929941594029550,0.8195769639564471908955,\ +0.0194337235170454029898,0.6899668115272159507612,0.2262847895615458237995,\ +0.2503852962589531161441,0.1198945374904236832458,0.1894352321040725928292,\ +0.3458841682539985917799,1.114339839966214773526,0.2885850554536735224076,\ +0.9933761739682215319292,0.2892224999614779745727,0.5327868189334407089675,\ +0.9913768259985344943885,0.6296876098817790756712,0.4048496130982584539915,\ +0.4831971402378967828106,0.0073588935789954878705,0.5403641862154227037962,\ +0.4863845156450118945024,0.7156655787491872366957,1.0960307119322381108617,\ +0.5136236116845008803367,0.2960038943626104313012,0.2030426468819693797130,\ +0.7606754386337204465463,0.9890435019692191964680,0.1922196010078167094370,\ +0.5559656008212838784743,1.0107407789878923853877,0.0115526233874804207247,\ +0.5209147493956211016908,0.72136900661981750993,0.5205551177967873144326,\ +0.1544988804781949887079,0.2600179378248433925691,1.112385813317804839073,\ +0.6660146232231449747729,1.080444939603935505801,1.163432674859314452931,\ +0.3523677837341518959136,0.8298721326257240127333,0.212281022488974985274,\ +1.0806462976206427928361,0.729606491474904528260,0.8178385727082368994445,\ +0.4162692379888194293969,0.5325930826611361412759,1.099181921047706733674,\ +0.0289733031722175932154,0.1641352799703627574068,0.4266791772900341284114,\ +0.0021650696324170431474,0.1819929625387523564051,0.4715467862637556795136,\ +0.1990771937658423751394,0.6430498957811131566231,0.4502805198476966808130,\ +1.0177235844677285925286,0.6491155460121008635710,0.4451485373036410675418,\ +0.2336445425260662012157,0.4848192931203018085640,0.6545992099992568036271,\ +0.9729575479551634265008,0.394166691840286298465} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} + +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZRESULTR {0.5472322176851935893183,0.8423815144738766580446,0.2563943802472780086887,\ +0.6580149781735437075625,0.172270452907771959294,0.2042689977544929758047,\ +0.6702103597375301813344,0.0933634309412847973597,0.0043966214876582573878,\ +0.1108604362841248136551,0.4353327109259368388194,0.2460210551978029014375,\ +0.3863009441992301673530,0.3446203724316067584788,0.2600144972151141042893,\ +0.2878039319893796466054,0.8138720272443707992593,0.6457782886418844681131,\ +0.1786150863987957249091,0.9154066811177691276313,0.7039465385045338141623,\ +0.4186412388856993738173,0.251831143580886374078,0.6392775639808577770040,\ +0.5703895608242733894,0.5327133470263697434532,0.0159949490007091424393,\ +0.3230326909984754801819,0.5715867388279289862396,0.70743658734176706471,\ +0.2704947225723857706647,0.4320127595486245031253,0.3725662344034775808055,\ +0.6443049465819230547936,0.3646176810862393202761,0.3875469668337525042112,\ +0.6717212085417494371598,0.8179578243363959666468,0.2517417237838881494128,\ +0.4994735839970788071618,0.1406387935502509678454,0.3671229322416942886243,\ +0.1118802149170177451243,1.0395621212598731286647,0.3566561127022580546253,\ +0.4468365274738785863917,0.8577631106167230568005,0.4791678319520160100886,\ +0.5912541631998992075481,0.3160997340804129196457,0.2156306076938400706489,\ +0.3241312167359722828941,0.2242273866635746126796,0.1924748395730505323709,\ +0.4911358423279918450355,0.6282969869096745041404,0.1146817647308075033275,\ +0.0536651752624737465869,0.0831424755428421952130,0.5674049454933377534260,\ +0.1867359129769284864508,0.8208629596874984502009,0.2585362736705908437429,\ +0.1732265992600796333800,0.16589114027651630234,0.0042470718039759334031,\ +0.2890982749320905043078,0.6767719859275036498048,0.7485620199211779901560,\ +1.0351949282063730439774,0.0454133801589929955722,0.3115216746749414067352,\ +0.7443929466921332949170,0.2733866129562390612229,0.5404777583133708596108,\ +0.0315703580162773125850,0.147584010699447737425,1.039942513447497107748,\ +0.4737927564457495854811,0.2592593650600479859847,1.0038035523317359043460,\ +0.2114594061381599998661,0.0928125663229541070232,0.8217516921908377680595,\ +0.4991177362348290791339,0.7547125896791468946390,0.5742746733474036746614,\ +0.6663538162766660111203,0.5480484998281744957183,0.6668472960736752108701,\ +0.5728135406334763368719,0.1044902427136027156518,0.3849616107773408679726,\ +0.1483818586286529961349,0.4133800608325002845511,0.2782513626438464227064,\ +0.0611572839884242727693,0.6618291251618653170397,0.7214555888399967198410,\ +1.0365769046431902999927,0.1334450193993464428566,0.5449721531302730292978,\ +0.8875031186053717879858,0.3014734616304127201580,0.4909287752495701262490,\ +0.5518178196952380210050,0.5107438627596426750088,0.7416305403413676611280,\ +0.3314614008027890745822,0.3459827842193233804480,0.4551032028697677422890,\ +0.8397231818014913029558,0.7260395894674003258729,0.8843138378471343541420,\ +0.3026251045027910646645,0.8772951459166481447127,0.4006929045316259263565,\ +0.2482223780387364797662,0.5044338903508289728705,0.5570690492655497871866,\ +0.6907809922454775097833,0.4533479549350135084929,0.5122634930781091444629,\ +0.3310630379415674395816,0.613016054683563793581,0.0467146352521808638780,\ +0.3748904897125588941975,0.6651387060224456249102,0.6124566220104487035414,\ +0.4169978608497757477380,0.0828821922879106609550,0.6616323773282192233225,\ +0.2163376802382008246006,0.6648529631046872223621,0.0768992913125638027916,\ +0.7541728606139842527867,0.0326990726296657319150,0.3155854015657582611887,\ +0.2222045454294520605565,0.5037531760449395212831,0.0474507678257595696958,\ +0.0151606295675061168715,0.5166679862331013950438,0.3394987264597518761278,\ +0.4284286045731299230610,0.3560134790628905476773,0.0298767286161388812005,\ +1.1017278018047820253855,0.1651905315864863887931,0.6431406060888099629480,\ +0.3081371323272805162752,0.0003798849528566614498,0.0973277933130341499357,\ +0.3989833287694000141244,0.3228967085282569149385,0.2549483000782091224323,\ +0.2728461176861247117209,0.7833569024666595659312,0.5060212064439562063001,\ +0.4929175980688511038430,0.9315180933744126035023,0.4867312349946628091679,\ +0.6465368595829137365882,0.1242768439875277936002,0.2492570609243859591775,\ +0.1754042926970652005458,0.0383062756502238338507,0.6930494891633879328552,\ +0.7150128880873719561251,0.2017103771899077802043,1.0425200734321566908847,\ +0.1284418402888304333587,0.0693747355415850891491,0.6782611829725390117929,\ +0.4580719788105512280119,0.8570372579890597197760,0.0258953949937216834631,\ +0.1436236317560128927795,0.2618257507714434328960,0.6360738131964667196883,\ +0.1355372871482912744412,0.4541408129960864403785,0.1337573051159255954623,\ +0.7489238330244115671164,0.3313805035932426146239,0.1646094396781437041444,\ +0.6171903594464053233182,0.8960982240646825358610,0.1740438285898232018134,\ +0.8693877096502734547201,0.1572467731529608725438,0.2318339325462937250411,\ +0.4996847882291703402125,0.0601767100407825661357,0.4302901718551004339730,\ +0.5241328386970756092467,0.0275009970661485095289,0.4028168044525495261610,\ +0.4010021931852675303176,0.2113305958381946625391} + +#define ZRESULTI {0.6214715223992962611632,0.9436786189504819954976,0.9172582471851381535899,\ +1.0284753878837631368981,0.2079498059841204116172,0.1973845021659479948006,\ +0.5261415139330058998723,0.7302311658604533350925,0.7719439236164448159272,\ +0.6822088697503370102737,0.7976066327178688020183,0.9180538587851772014403,\ +1.0207957462450507613028,0.0119750831911820069392,0.879846633700931413102,\ +0.3956357637150365591516,0.3734519291784937355949,0.6773972534299040892947,\ +0.6854109454702602688414,0.0410850121880191737622,0.3420572770093958103743,\ +0.7391907226260076013702,0.7159858470768458715838,1.1108178290074384175767,\ +0.1244362063872984924817,0.9982082241998391225479,0.7878214785460178060106,\ +0.2264493394334471387808,0.552110320407191546010,0.9872379452017052692270,\ +0.4552134557945506365684,0.1414727851379618539518,0.5709593924198277381521,\ +0.8340926447704026802654,0.1855652888756788854163,0.8851645482631337324975,\ +0.2589660662395600887464,0.2440703736645542243355,0.1844003846229365917164,\ +0.4837426621723381336970,0.7691827103731639914130,0.7512840132775820967126,\ +0.7339173856842455823113,0.2110467570718085883463,0.9030907830676864200825,\ +0.4374528982447763447716,0.0206840630038046084660,0.7498395827082200426617,\ +0.3464215069230207055817,0.1447328712349580659424,0.7886833031982384278891,\ +0.312806155477839797907,0.2330978063822336521227,0.7502851663968435058649,\ +0.3515894758711366474557,0.8241207799426445435032,0.1369007991441129890031,\ +0.5180025607419450617286,0.3230663992238576032179,0.2303438195780269093227,\ +0.4935463909681327976387,0.6513439726551492059414,0.8480586102235279089001,\ +0.8386806876018545464646,0.3376822861028858646648,0.5670539014238122899059,\ +0.4231729333084569000256,0.3671714099084233406956,1.13425596729819333497,\ +0.6599735877547936446774,0.0903505740838268234238,0.7302185329365624699705,\ +0.3332210660971928195551,0.7898975683733762132022,0.4499243250096228718959,\ +0.8312282843326663783756,0.303017954499597730322,0.0957670218140728168876,\ +0.7221703011467139887714,0.7273159314358644822463,0.2732920828342843555525,\ +0.7451259889709352934872,0.5326844296662366362583,0.2613476456913891299294,\ +0.8675343198300645708443,0.1197200851202140647889,0.7607940863441885470664,\ +1.090938503691738947765,0.7940557967113777149137,0.9951827798045931317006,\ +1.0852570666616287997641,0.595465988685999203511,0.9585290107353723332295,\ +0.8162216959679288175167,0.0552099482904373911607,0.4388645680780451363567,\ +0.8309698024824113682385,0.9896452984090404747519,1.1051208602025746063902,\ +0.0879648640386297558935,0.7426871822259456523696,0.2387805138959819828415,\ +0.4109188911191957171987,0.9129531289726338094681,1.033237369823349904863,\ +0.8826396237315312642835,0.6523964780046094258381,0.2962811673651402077923,\ +0.538613833971326338990,0.0082053089862361757584,0.8913512641166435601647,\ +0.0350642631947976693,0.3204573641970900332865,0.6295687491907059341045,\ +0.6105613490275437760246,0.0874124111159134270510,0.6742190253215021300548,\ +0.104794765122307897975,0.3057785774947048840211,0.9391488111872891009213,\ +0.4082750199603700225204,0.5150095094925122296559,0.9436041246896892387142,\ +0.1873390728066921528949,0.686076538028982052531,0.7482286603321709472780,\ +0.7231441171996566552593,0.9070157682190420622703,1.2254699773201918056031,\ +0.7954755918374329937137,0.7390808722803764441167,1.1257197223371009364712,\ +0.7479651939595457488252,0.3663340286526505784615,0.6321209550080593153609,\ +0.8213953702909778664676,0.0987172713829019138343,0.4759918803039691614920,\ +0.6467330123916542605755,0.5670425014955073894640,0.7619202005568085356302,\ +0.7400260728625026596106,0.1896730654043395358777,0.3096563558430623364082,\ +0.2803008416090244647734,0.1799702823909465065899,0.8271151236999281231022,\ +0.1034896632231103036359,0.4602495369086131438152,1.2206297477145873209281,\ +0.3787956849306995388282,0.2930275328196350614896,0.0417156660446471733161,\ +0.5157276686593796899416,0.5274236913745330435077,0.3587249786695337894216,\ +0.2422782860407424743165,0.8895205282611465813503,0.4261958074481287384039,\ +0.3516419517981719256028,0.4713702889404160489839,0.0595506543369787033626,\ +1.1782482373185512170011,0.3801066173107530143938,0.4349822461068365009318,\ +0.1599230612164924403285,0.7104933564880103746830,0.9316143186085994454260,\ +0.6420254878605806680980,0.7971748574811535759110,0.2207115251543733114303,\ +0.2390631455930626592110,0.5466671036053578625058,0.9149528397614811181526,\ +0.0641270748267019075062,0.9615389273937551273264,0.4084857821404656030850,\ +0.0284008421665001876966,0.7926291386522584803132,0.2762568577554586624068,\ +0.792535972676840283491,0.407224868689896601914,0.785264393436451157982,\ +0.5053477011274932761964,0.3015786475260285870448,0.7771045707144023095836,\ +0.6452560689270674387785,0.7038409533210520097057,0.6044393344259090250503,\ +0.5582751049083489736091,0.3205680190439157417615,0.8929464541247862374718,\ +0.5894255515487558660936,0.3357333458035489104354,1.0198128299863529200309,\ +1.1643703264707510047771,0.3357866330198117088557,0.8154766229713432679205,\ +0.9578920067258681614320,0.5149424663113579825335} + + + +void dsinhsTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dsinhs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zsinhsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zsinhs(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dsinhaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dsinha(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-16); + } +} + +void zsinhaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + double mon_testR[9]={1,8,3,2,8,4,3,4,5}; + double mon_testI[9]={0,0,4,0,-1,0,3,0,0}; + double mon_resR[9]={1.1752011936438013783857,1490.4788257895500009909,- 6.548120040911003414408, + 3.6268604078470190188455,805.30914642173127049318,27.289917197127749659558, + - 9.9176210100175374861919,27.289917197127749659558,74.203210577788766499907}; + double mon_resI[9]={0,0,- 7.6192317203214106058340, + 0,- 1254.1949676545177680964,0, + 1.4207485419881773491824,0,0}; + doubleComplex* mon_test; + doubleComplex mon_out[9]; + +mon_test=DoubleComplexMatrix(mon_testR,mon_testI,9); + in=DoubleComplexMatrix(inR,inI,200); + zsinha(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } + zsinha(mon_test,9,mon_out); + for (i=0;i<9;i++){ + printf("%f + %f*i\n",zreals(mon_out[i]),zimags(mon_out[i])); + assert(( (fabs(zreals(mon_out[i])-mon_resR[i]))/(fabs(zreals(mon_out[i]))) )<3e-16); + if (zimags(mon_out[i])!=0) assert(( (fabs(zimags(mon_out[i])-mon_resI[i]))/(fabs(zimags(mon_out[i]))) )<3e-16); + } +} + +int testSinh() { + printf("\n>>>> Double Hyperbolic Sine Tests\n"); + dsinhsTest(); + zsinhsTest(); + dsinhaTest(); + zsinhaTest(); + return 0; +} + +int main() { + assert(testSinh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/testFloatSinh.c b/2.3-1/src/c/elementaryFunctions/sinh/testFloatSinh.c new file mode 100644 index 00000000..90cbf188 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/testFloatSinh.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSinh.h" + +#define SOURCE {0.7062616096809506416321f,0.4090520101599395275116f,0.3011248558759689331055f,\ +0.1880126395262777805328f,0.1796709178015589714050f,0.2828889950178563594818f,\ +0.7232380937784910202026f,0.7360379849560558795929f,0.1852612206712365150452f,\ +0.7703790138475596904755f,0.1914967410266399383545f,0.7521587223745882511139f,\ +0.6205883463844656944275f,0.2807604051195085048676f,0.2289868686348199844360f,\ +0.5049233403988182544708f,0.8354099662974476814270f,0.8174716415815055370331f,\ +0.0030740275979042053223f,0.3677616142667829990387f,0.8278525872156023979187f,\ +0.72754097869619727135f,0.5323124285787343978882f,0.9267726917751133441925f,\ +0.9542504185810685157776f,0.3162104780785739421845f,0.5789009965956211090088f,\ +0.6881225542165338993073f,0.3714061146602034568787f,0.1705444059334695339203f,\ +0.1954363007098436355591f,0.978800852317363023758f,0.9300233917310833930969f,\ +0.5357720064930617809296f,0.3947123587131500244141f,0.1344871171750128269196f,\ +0.7380615202710032463074f,0.588114650454372167587f,0.9113173168152570724487f,\ +0.5682763461954891681671f,0.1127616921439766883850f,0.9478473584167659282684f,\ +0.5237770043313503265381f,0.8140139640308916568756f,0.1400952627882361412048f,\ +0.2763446993194520473480f,0.9059953633695840835571f,0.1379901585169136524200f,\ +0.5603838684037327766419f,0.3008610638789832592011f,0.4767417535185813904f,\ +0.8127435916103422641754f,0.1988414181396365165710f,0.1107953130267560482025f,\ +0.2159351315349340438843f,0.6467244853265583515167f,0.6597879612818360328674f,\ +0.0691898013465106487274f,0.9164751060307025909424f,0.8635670826770365238190f,\ +0.5032854294404387474060f,0.1832137755118310451508f,0.8403698671609163284302f,\ +0.9247214836068451404572f,0.6229452537372708320618f,0.2773811477236449718475f,\ +0.2479109913110733032227f,0.3891948559321463108063f,0.0436578569933772087097f,\ +0.8132526441477239131928f,0.7686451207846403121948f,0.4041520212776958942413f,\ +0.8579940209165215492249f,0.6993723283521831035614f,0.0828925184905529022217f,\ +0.9201254160143435001373f,0.5200281282886862754822f,0.9351884997449815273285f,\ +0.8825624976307153701782f,0.2245844271965324878693f,0.2153332801535725593567f,\ +0.4327089670114219188690f,0.5800157263875007629395f,0.8876141034997999668121f,\ +0.5258982880041003227234f,0.859640696551650762558f,0.7337234076112508773804f,\ +0.7134532411582767963409f,0.1087165409699082374573f,0.8477638359181582927704f,\ +0.6594733335077762603760f,0.7916418449021875858307f,0.6067967480048537254334f,\ +0.4102901122532784938812f,0.1958728153258562088013f,0.241527963895350694656f,\ +0.5113455550745129585266f,0.9119556057266891002655f,0.0928984880447387695313f,\ +0.7438839026726782321930f,0.1938720373436808586121f,0.4355978979729115962982f,\ +0.9922429900616407394409f,0.4533818070776760578156f,0.8269640663638710975647f,\ +0.8889675955288112163544f,0.4682085178792476654053f,0.3856786251999437808991f,\ +0.4124865522608160972595f,0.6955242282710969448090f,0.0978972557932138442993f,\ +0.8728604433126747608185f,0.6359515609219670295715f,0.4129665228538215160370f,\ +0.0294486805796623229980f,0.1809961968101561069489f,0.7658103061839938163757f,\ +0.1232470511458814144135f,0.0170737411826848983765f,0.8835507561452686786652f,\ +0.3164170170202851295471f,0.9378212536685168743134f,0.3916359134018421173096f,\ +0.0844073877669870853424f,0.6934146797284483909607f,0.4618808380328118801117f,\ +0.9355291295796632766724f,0.0842495900578796863556f,0.5402926551178097724915f,\ +0.5613215523771941661835f,0.1306025832891464233398f,0.5840523042716085910797f,\ +0.0048661706969141960144f,0.2761953338049352169037f,0.7478824090212583541870f,\ +0.0194325004704296588898f,0.6444276878610253334045f,0.2243968318216502666473f,\ +0.2478402368724346160889f,0.1196091384626924991608f,0.1883201440796256065369f,\ +0.3393343067727982997894f,0.959958622232079505920f,0.2847225037403404712677f,\ +0.8766820700839161872864f,0.2853349032811820507050f,0.5103433504700660705566f,\ +0.8752629184164106845856f,0.5941145820543169975281f,0.3945342986844480037689f,\ +0.4661326166242361068726f,0.0073588271625339984894f,0.5170202488079667091370f,\ +0.4690007264725863933563f,0.6654530800879001617432f,0.9476742581464350223541f,\ +0.4933638339862227439880f,0.2918433747254312038422f,0.2016727942973375320435f,\ +0.7016656589694321155548f,0.8736049132421612739563f,0.191055159550160169601f,\ +0.5307010114192962646484f,0.8889481076039373874664f,0.0115523664280772209167f,\ +0.4998398735187947750092f,0.6700848620384931564331f,0.4995208983309566974640f,\ +0.1538907447829842567444f,0.2571737091057002544403f,0.9586529098451137542725f,\ +0.6246025026775896549225f,0.9371285131201148033142f,0.9923511571250855922699f,\ +0.3454555813223123550415f,0.7558249053545296192169f,0.2107181670144200325012f,\ +0.9372652801685035228729f,0.6767524704337120056152f,0.7465373151935636997223f,\ +0.4050982249900698661804f,0.5101723610423505306244f,0.9497965183109045028687f,\ +0.0289692510850727558136f,0.1634070957079529762268f,0.4146909262053668498993f,\ +0.0021650679409503936768f,0.1810030029155313968658f,0.4556188201531767845154f,\ +0.1977851442061364650726f,0.6053877938538789749146f,0.4363054675050079822540f,\ +0.8938506888225674629211f,0.6104825991205871105194f,0.4316215068101882934570f,\ +0.2315693595446646213532f,0.4675927339121699333191f,0.6150764389894902706146f,\ +0.8621218334883451461792f,0.3846137975342571735382f} + +#define RESULT {0.7664580028254754928696f,0.4205551659468407255105f,0.3056963415200024125618f,\ +0.1891222676242167166638f,0.1806391579088424403921f,0.2866772088777344573707f,\ +0.7879588923423612722985f,0.8043199087726096152551f,0.1863227880624591659142f,\ +0.8488736885251115804607f,0.1926692851046332977116f,0.8251135119137460449679f,\ +0.6611970121102711539507f,0.2844635257838270536723f,0.2309932755888478017603f,\ +0.5266533298916223904129f,0.9360312470542428986420f,0.9116099093552539889274f,\ +0.0030740324393184245005f,0.3761077290387422333851f,0.9257063259676088229355f,\ +0.7934443680694276412879f,0.5578100394371053871723f,1.0652568032347091708800f,\ +1.1058113484469005438626f,0.3215064844139553512648f,0.6117813058051149166516f,\ +0.7437286582384788902189f,0.3800039829530417190284f,0.1713723342659267123711f,\ +0.1966828051044853253870f,1.1427508290431065418602f,1.0700119918415624820085f,\ +0.5617747940982125154363f,0.4050417184145185811595f,0.1348928905465842098543f,\ +0.8069184166073162245425f,0.6226085497916535871354f,1.0428015042623968167135f,\ +0.599360373550158476164f,0.1130008086773218733967f,1.0962875524202524424311f,\ +0.5480567058218726028684f,0.9069365704321199483928f,0.1405539802560804574227f,\ +0.2798753950272672152977f,1.0351270996105206290139f,0.1384284939283927651221f,\ +0.5901774101693750829156f,0.3054205096845967748465f,0.4950072868345940513279f,\ +0.9052222830609093495724f,0.2001543065651501807079f,0.1110221320487437962621f,\ +0.2176171514122479666575f,0.6927590813444466366633f,0.7087105942005499370495f,\ +0.0692450191279527643706f,1.0502673603752690212332f,0.9749750092666438217037f,\ +0.5248028600685283873162f,0.1842404954551666029783f,0.9428365029551442066946f,\ +1.0622620507764020114649f,0.6640243707694319930113f,0.2809518213531947417039f,\ +0.2504582355084098987952f,0.3990949339123049943723f,0.0436717270227189244269f,\ +0.9059090417535855532805f,0.8466005962798425210636f,0.4152445147326426222456f,\ +0.9672066028315211561051f,0.7577960172200091104600f,0.0829874792017267076671f,\ +1.0555680256611981171488f,0.5437855687819154182350f,1.0775908909563920446f,\ +1.0016820806611792527008f,0.2264771318543304656767f,0.2170012532427569029725f,\ +0.4463391386879682620759f,0.6130884787237118604963f,1.0088449524118139333240f,\ +0.5504769168224112885213f,0.9694988006053883999869f,0.8013516989017863689782f,\ +0.7755389514921953164617f,0.1089308262191755055648f,0.9530245458199384511744f,\ +0.7083249989659490264415f,0.8769583844905950442694f,0.6447256579530228348673f,\ +0.4218986249201953087074f,0.1971277014550009420990f,0.2438831089846125732557f,\ +0.533922660930493120368f,1.0437239139050094038907f,0.0930321667054502116079f,\ +0.8144136536953445748566f,0.1950888127224135459858f,0.4495046404602288658836f,\ +1.1632667385972190743360f,0.4690747173387543877965f,0.9244959100750387293033f,\ +1.0107684876711933164017f,0.4855037229984789926007f,0.3953114776639800043157f,\ +0.4242835646837694318911f,0.7529734313215303842526f,0.0980537032157421939438f,\ +0.9879966883143458389327f,0.6796935751591178798137f,0.4248049987494686430267f,\ +0.0294529372018587365378f,0.1819860446417611021808f,0.8428897015241260115559f,\ +0.1235593052805215308343f,0.0170745707299980210847f,1.00308135457124825152f,\ +0.3217234423590110692359f,1.0814650488452381971172f,0.4017244052147506683248f,\ +0.0845076517232198759499f,0.7503344007980436991545f,0.4784793780524976836155f,\ +1.0780917143422910076112f,0.0843492926084187938374f,0.5669657003997248256866f,\ +0.5912664777040658181662f,0.1309741822002446487439f,0.6178283036240778125503f,\ +0.0048661899017801981890f,0.2797202929941594029550f,0.8195769639564471908955f,\ +0.0194337235170454029898f,0.6899668115272159507612f,0.2262847895615458237995f,\ +0.2503852962589531161441f,0.1198945374904236832458f,0.1894352321040725928292f,\ +0.3458841682539985917799f,1.114339839966214773526f,0.2885850554536735224076f,\ +0.9933761739682215319292f,0.2892224999614779745727f,0.5327868189334407089675f,\ +0.9913768259985344943885f,0.6296876098817790756712f,0.4048496130982584539915f,\ +0.4831971402378967828106f,0.0073588935789954878705f,0.5403641862154227037962f,\ +0.4863845156450118945024f,0.7156655787491872366957f,1.0960307119322381108617f,\ +0.5136236116845008803367f,0.2960038943626104313012f,0.2030426468819693797130f,\ +0.7606754386337204465463f,0.9890435019692191964680f,0.1922196010078167094370f,\ +0.5559656008212838784743f,1.0107407789878923853877f,0.0115526233874804207247f,\ +0.5209147493956211016908f,0.72136900661981750993f,0.5205551177967873144326f,\ +0.1544988804781949887079f,0.2600179378248433925691f,1.112385813317804839073f,\ +0.6660146232231449747729f,1.080444939603935505801f,1.163432674859314452931f,\ +0.3523677837341518959136f,0.8298721326257240127333f,0.212281022488974985274f,\ +1.0806462976206427928361f,0.729606491474904528260f,0.8178385727082368994445f,\ +0.4162692379888194293969f,0.5325930826611361412759f,1.099181921047706733674f,\ +0.0289733031722175932154f,0.1641352799703627574068f,0.4266791772900341284114f,\ +0.0021650696324170431474f,0.1819929625387523564051f,0.4715467862637556795136f,\ +0.1990771937658423751394f,0.6430498957811131566231f,0.4502805198476966808130f,\ +1.0177235844677285925286f,0.6491155460121008635710f,0.4451485373036410675418f,\ +0.2336445425260662012157f,0.4848192931203018085640f,0.6545992099992568036271f,\ +0.9729575479551634265008f,0.394166691840286298465f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} + +#define CRESULTR {0.5472322176851935893183f,0.8423815144738766580446f,0.2563943802472780086887f,\ +0.6580149781735437075625f,0.172270452907771959294f,0.2042689977544929758047f,\ +0.6702103597375301813344f,0.0933634309412847973597f,0.0043966214876582573878f,\ +0.1108604362841248136551f,0.4353327109259368388194f,0.2460210551978029014375f,\ +0.3863009441992301673530f,0.3446203724316067584788f,0.2600144972151141042893f,\ +0.2878039319893796466054f,0.8138720272443707992593f,0.6457782886418844681131f,\ +0.1786150863987957249091f,0.9154066811177691276313f,0.7039465385045338141623f,\ +0.4186412388856993738173f,0.251831143580886374078f,0.6392775639808577770040f,\ +0.5703895608242733894f,0.5327133470263697434532f,0.0159949490007091424393f,\ +0.3230326909984754801819f,0.5715867388279289862396f,0.70743658734176706471f,\ +0.2704947225723857706647f,0.4320127595486245031253f,0.3725662344034775808055f,\ +0.6443049465819230547936f,0.3646176810862393202761f,0.3875469668337525042112f,\ +0.6717212085417494371598f,0.8179578243363959666468f,0.2517417237838881494128f,\ +0.4994735839970788071618f,0.1406387935502509678454f,0.3671229322416942886243f,\ +0.1118802149170177451243f,1.0395621212598731286647f,0.3566561127022580546253f,\ +0.4468365274738785863917f,0.8577631106167230568005f,0.4791678319520160100886f,\ +0.5912541631998992075481f,0.3160997340804129196457f,0.2156306076938400706489f,\ +0.3241312167359722828941f,0.2242273866635746126796f,0.1924748395730505323709f,\ +0.4911358423279918450355f,0.6282969869096745041404f,0.1146817647308075033275f,\ +0.0536651752624737465869f,0.0831424755428421952130f,0.5674049454933377534260f,\ +0.1867359129769284864508f,0.8208629596874984502009f,0.2585362736705908437429f,\ +0.1732265992600796333800f,0.16589114027651630234f,0.0042470718039759334031f,\ +0.2890982749320905043078f,0.6767719859275036498048f,0.7485620199211779901560f,\ +1.0351949282063730439774f,0.0454133801589929955722f,0.3115216746749414067352f,\ +0.7443929466921332949170f,0.2733866129562390612229f,0.5404777583133708596108f,\ +0.0315703580162773125850f,0.147584010699447737425f,1.039942513447497107748f,\ +0.4737927564457495854811f,0.2592593650600479859847f,1.0038035523317359043460f,\ +0.2114594061381599998661f,0.0928125663229541070232f,0.8217516921908377680595f,\ +0.4991177362348290791339f,0.7547125896791468946390f,0.5742746733474036746614f,\ +0.6663538162766660111203f,0.5480484998281744957183f,0.6668472960736752108701f,\ +0.5728135406334763368719f,0.1044902427136027156518f,0.3849616107773408679726f,\ +0.1483818586286529961349f,0.4133800608325002845511f,0.2782513626438464227064f,\ +0.0611572839884242727693f,0.6618291251618653170397f,0.7214555888399967198410f,\ +1.0365769046431902999927f,0.1334450193993464428566f,0.5449721531302730292978f,\ +0.8875031186053717879858f,0.3014734616304127201580f,0.4909287752495701262490f,\ +0.5518178196952380210050f,0.5107438627596426750088f,0.7416305403413676611280f,\ +0.3314614008027890745822f,0.3459827842193233804480f,0.4551032028697677422890f,\ +0.8397231818014913029558f,0.7260395894674003258729f,0.8843138378471343541420f,\ +0.3026251045027910646645f,0.8772951459166481447127f,0.4006929045316259263565f,\ +0.2482223780387364797662f,0.5044338903508289728705f,0.5570690492655497871866f,\ +0.6907809922454775097833f,0.4533479549350135084929f,0.5122634930781091444629f,\ +0.3310630379415674395816f,0.613016054683563793581f,0.0467146352521808638780f,\ +0.3748904897125588941975f,0.6651387060224456249102f,0.6124566220104487035414f,\ +0.4169978608497757477380f,0.0828821922879106609550f,0.6616323773282192233225f,\ +0.2163376802382008246006f,0.6648529631046872223621f,0.0768992913125638027916f,\ +0.7541728606139842527867f,0.0326990726296657319150f,0.3155854015657582611887f,\ +0.2222045454294520605565f,0.5037531760449395212831f,0.0474507678257595696958f,\ +0.0151606295675061168715f,0.5166679862331013950438f,0.3394987264597518761278f,\ +0.4284286045731299230610f,0.3560134790628905476773f,0.0298767286161388812005f,\ +1.1017278018047820253855f,0.1651905315864863887931f,0.6431406060888099629480f,\ +0.3081371323272805162752f,0.0003798849528566614498f,0.0973277933130341499357f,\ +0.3989833287694000141244f,0.3228967085282569149385f,0.2549483000782091224323f,\ +0.2728461176861247117209f,0.7833569024666595659312f,0.5060212064439562063001f,\ +0.4929175980688511038430f,0.9315180933744126035023f,0.4867312349946628091679f,\ +0.6465368595829137365882f,0.1242768439875277936002f,0.2492570609243859591775f,\ +0.1754042926970652005458f,0.0383062756502238338507f,0.6930494891633879328552f,\ +0.7150128880873719561251f,0.2017103771899077802043f,1.0425200734321566908847f,\ +0.1284418402888304333587f,0.0693747355415850891491f,0.6782611829725390117929f,\ +0.4580719788105512280119f,0.8570372579890597197760f,0.0258953949937216834631f,\ +0.1436236317560128927795f,0.2618257507714434328960f,0.6360738131964667196883f,\ +0.1355372871482912744412f,0.4541408129960864403785f,0.1337573051159255954623f,\ +0.7489238330244115671164f,0.3313805035932426146239f,0.1646094396781437041444f,\ +0.6171903594464053233182f,0.8960982240646825358610f,0.1740438285898232018134f,\ +0.8693877096502734547201f,0.1572467731529608725438f,0.2318339325462937250411f,\ +0.4996847882291703402125f,0.0601767100407825661357f,0.4302901718551004339730f,\ +0.5241328386970756092467f,0.0275009970661485095289f,0.4028168044525495261610f,\ +0.4010021931852675303176f,0.2113305958381946625391f} + +#define CRESULTI {0.6214715223992962611632f,0.9436786189504819954976f,0.9172582471851381535899f,\ +1.0284753878837631368981f,0.2079498059841204116172f,0.1973845021659479948006f,\ +0.5261415139330058998723f,0.7302311658604533350925f,0.7719439236164448159272f,\ +0.6822088697503370102737f,0.7976066327178688020183f,0.9180538587851772014403f,\ +1.0207957462450507613028f,0.0119750831911820069392f,0.879846633700931413102f,\ +0.3956357637150365591516f,0.3734519291784937355949f,0.6773972534299040892947f,\ +0.6854109454702602688414f,0.0410850121880191737622f,0.3420572770093958103743f,\ +0.7391907226260076013702f,0.7159858470768458715838f,1.1108178290074384175767f,\ +0.1244362063872984924817f,0.9982082241998391225479f,0.7878214785460178060106f,\ +0.2264493394334471387808f,0.552110320407191546010f,0.9872379452017052692270f,\ +0.4552134557945506365684f,0.1414727851379618539518f,0.5709593924198277381521f,\ +0.8340926447704026802654f,0.1855652888756788854163f,0.8851645482631337324975f,\ +0.2589660662395600887464f,0.2440703736645542243355f,0.1844003846229365917164f,\ +0.4837426621723381336970f,0.7691827103731639914130f,0.7512840132775820967126f,\ +0.7339173856842455823113f,0.2110467570718085883463f,0.9030907830676864200825f,\ +0.4374528982447763447716f,0.0206840630038046084660f,0.7498395827082200426617f,\ +0.3464215069230207055817f,0.1447328712349580659424f,0.7886833031982384278891f,\ +0.312806155477839797907f,0.2330978063822336521227f,0.7502851663968435058649f,\ +0.3515894758711366474557f,0.8241207799426445435032f,0.1369007991441129890031f,\ +0.5180025607419450617286f,0.3230663992238576032179f,0.2303438195780269093227f,\ +0.4935463909681327976387f,0.6513439726551492059414f,0.8480586102235279089001f,\ +0.8386806876018545464646f,0.3376822861028858646648f,0.5670539014238122899059f,\ +0.4231729333084569000256f,0.3671714099084233406956f,1.13425596729819333497f,\ +0.6599735877547936446774f,0.0903505740838268234238f,0.7302185329365624699705f,\ +0.3332210660971928195551f,0.7898975683733762132022f,0.4499243250096228718959f,\ +0.8312282843326663783756f,0.303017954499597730322f,0.0957670218140728168876f,\ +0.7221703011467139887714f,0.7273159314358644822463f,0.2732920828342843555525f,\ +0.7451259889709352934872f,0.5326844296662366362583f,0.2613476456913891299294f,\ +0.8675343198300645708443f,0.1197200851202140647889f,0.7607940863441885470664f,\ +1.090938503691738947765f,0.7940557967113777149137f,0.9951827798045931317006f,\ +1.0852570666616287997641f,0.595465988685999203511f,0.9585290107353723332295f,\ +0.8162216959679288175167f,0.0552099482904373911607f,0.4388645680780451363567f,\ +0.8309698024824113682385f,0.9896452984090404747519f,1.1051208602025746063902f,\ +0.0879648640386297558935f,0.7426871822259456523696f,0.2387805138959819828415f,\ +0.4109188911191957171987f,0.9129531289726338094681f,1.033237369823349904863f,\ +0.8826396237315312642835f,0.6523964780046094258381f,0.2962811673651402077923f,\ +0.538613833971326338990f,0.0082053089862361757584f,0.8913512641166435601647f,\ +0.0350642631947976693f,0.3204573641970900332865f,0.6295687491907059341045f,\ +0.6105613490275437760246f,0.0874124111159134270510f,0.6742190253215021300548f,\ +0.104794765122307897975f,0.3057785774947048840211f,0.9391488111872891009213f,\ +0.4082750199603700225204f,0.5150095094925122296559f,0.9436041246896892387142f,\ +0.1873390728066921528949f,0.686076538028982052531f,0.7482286603321709472780f,\ +0.7231441171996566552593f,0.9070157682190420622703f,1.2254699773201918056031f,\ +0.7954755918374329937137f,0.7390808722803764441167f,1.1257197223371009364712f,\ +0.7479651939595457488252f,0.3663340286526505784615f,0.6321209550080593153609f,\ +0.8213953702909778664676f,0.0987172713829019138343f,0.4759918803039691614920f,\ +0.6467330123916542605755f,0.5670425014955073894640f,0.7619202005568085356302f,\ +0.7400260728625026596106f,0.1896730654043395358777f,0.3096563558430623364082f,\ +0.2803008416090244647734f,0.1799702823909465065899f,0.8271151236999281231022f,\ +0.1034896632231103036359f,0.4602495369086131438152f,1.2206297477145873209281f,\ +0.3787956849306995388282f,0.2930275328196350614896f,0.0417156660446471733161f,\ +0.5157276686593796899416f,0.5274236913745330435077f,0.3587249786695337894216f,\ +0.2422782860407424743165f,0.8895205282611465813503f,0.4261958074481287384039f,\ +0.3516419517981719256028f,0.4713702889404160489839f,0.0595506543369787033626f,\ +1.1782482373185512170011f,0.3801066173107530143938f,0.4349822461068365009318f,\ +0.1599230612164924403285f,0.7104933564880103746830f,0.9316143186085994454260f,\ +0.6420254878605806680980f,0.7971748574811535759110f,0.2207115251543733114303f,\ +0.2390631455930626592110f,0.5466671036053578625058f,0.9149528397614811181526f,\ +0.0641270748267019075062f,0.9615389273937551273264f,0.4084857821404656030850f,\ +0.0284008421665001876966f,0.7926291386522584803132f,0.2762568577554586624068f,\ +0.792535972676840283491f,0.407224868689896601914f,0.785264393436451157982f,\ +0.5053477011274932761964f,0.3015786475260285870448f,0.7771045707144023095836f,\ +0.6452560689270674387785f,0.7038409533210520097057f,0.6044393344259090250503f,\ +0.5582751049083489736091f,0.3205680190439157417615f,0.8929464541247862374718f,\ +0.5894255515487558660936f,0.3357333458035489104354f,1.0198128299863529200309f,\ +1.1643703264707510047771f,0.3357866330198117088557f,0.8154766229713432679205f,\ +0.9578920067258681614320f,0.5149424663113579825335f} + + + + +void ssinhsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=ssinhs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } +} + +void csinhsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=csinhs(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void ssinhaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + ssinha(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void csinhaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + csinha(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testSinh() { + printf("\n>>>> Hyperbolic Sine Tests\n"); + ssinhsTest(); + csinhsTest(); + ssinhaTest(); + csinhaTest(); + return 0; +} + +int main() { + assert(testSinh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/testSinh.h b/2.3-1/src/c/elementaryFunctions/sinh/testSinh.h new file mode 100644 index 00000000..cdb432eb --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/testSinh.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTSINH_H_ +#define _TESTSINH_H_ + +#include +#include +#include +#include "sinh.h" +#include "constant.h" + +void ssinhsTest(void); + +void dsinhsTest(void); + +void csinhsTest(void); + +void zsinhsTest(void); + +void ssinhaTest(void); + +void dsinhaTest(void); + +void csinhaTest(void); + +void zsinhaTest(void); + +int testSinh(void); + +#endif /* !_TESTSINH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/sinh/zsinha.c b/2.3-1/src/c/elementaryFunctions/sinh/zsinha.c new file mode 100644 index 00000000..59d18d47 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/zsinha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" + +void zsinha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = zsinhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sinh/zsinhs.c b/2.3-1/src/c/elementaryFunctions/sinh/zsinhs.c new file mode 100644 index 00000000..3ea4e71c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sinh/zsinhs.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sinh.h" +#include "sin.h" + +doubleComplex zsinhs(doubleComplex z) { + double real = zreals(z); + double imag = zimags(z); + + doubleComplex result = zsins(DoubleComplex(-imag, real)); + return (DoubleComplex(zimags(result), -zreals(result))); +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.am b/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.am new file mode 100644 index 00000000..6cde141a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSqrt_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSqrt.la + +libSqrt_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssqrts.c \ + dsqrts.c \ + csqrts.c \ + zsqrts.c \ + ssqrta.c \ + dsqrta.c \ + csqrta.c \ + zsqrta.c + +HEAD = ../includes/sqrt.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatSqrt testDoubleSqrt + +TESTS = testFloatSqrt testDoubleSqrt + +# +# -*- Square Root Tests -*- +# +testFloatSqrt_SOURCES = testSqrt.h testFloatSqrt.c +testFloatSqrt_CFLAGS = $(check_INCLUDES) +testFloatSqrt_LDADD = $(check_LDADD) + +testDoubleSqrt_SOURCES = testSqrt.h testDoubleSqrt.c +testDoubleSqrt_CFLAGS = $(check_INCLUDES) +testDoubleSqrt_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.in b/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.in new file mode 100644 index 00000000..574f1e0a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/Makefile.in @@ -0,0 +1,800 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatSqrt$(EXEEXT) testDoubleSqrt$(EXEEXT) +TESTS = testFloatSqrt$(EXEEXT) testDoubleSqrt$(EXEEXT) +subdir = src/c/elementaryFunctions/sqrt +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSqrt_la_LIBADD = +am__objects_1 = +am__objects_2 = libSqrt_la-ssqrts.lo libSqrt_la-dsqrts.lo \ + libSqrt_la-csqrts.lo libSqrt_la-zsqrts.lo libSqrt_la-ssqrta.lo \ + libSqrt_la-dsqrta.lo libSqrt_la-csqrta.lo libSqrt_la-zsqrta.lo +am_libSqrt_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSqrt_la_OBJECTS = $(am_libSqrt_la_OBJECTS) +libSqrt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSqrt_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleSqrt_OBJECTS = testDoubleSqrt-testDoubleSqrt.$(OBJEXT) +testDoubleSqrt_OBJECTS = $(am_testDoubleSqrt_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleSqrt_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleSqrt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSqrt_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatSqrt_OBJECTS = testFloatSqrt-testFloatSqrt.$(OBJEXT) +testFloatSqrt_OBJECTS = $(am_testFloatSqrt_OBJECTS) +testFloatSqrt_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatSqrt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSqrt_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSqrt_la_SOURCES) $(testDoubleSqrt_SOURCES) \ + $(testFloatSqrt_SOURCES) +DIST_SOURCES = $(libSqrt_la_SOURCES) $(testDoubleSqrt_SOURCES) \ + $(testFloatSqrt_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSqrt_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSqrt.la +libSqrt_la_SOURCES = $(HEAD) $(SRC) +SRC = ssqrts.c \ + dsqrts.c \ + csqrts.c \ + zsqrts.c \ + ssqrta.c \ + dsqrta.c \ + csqrta.c \ + zsqrta.c + +HEAD = ../includes/sqrt.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Square Root Tests -*- +# +testFloatSqrt_SOURCES = testSqrt.h testFloatSqrt.c +testFloatSqrt_CFLAGS = $(check_INCLUDES) +testFloatSqrt_LDADD = $(check_LDADD) +testDoubleSqrt_SOURCES = testSqrt.h testDoubleSqrt.c +testDoubleSqrt_CFLAGS = $(check_INCLUDES) +testDoubleSqrt_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/sqrt/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/sqrt/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSqrt.la: $(libSqrt_la_OBJECTS) $(libSqrt_la_DEPENDENCIES) + $(libSqrt_la_LINK) -rpath $(pkglibdir) $(libSqrt_la_OBJECTS) $(libSqrt_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleSqrt$(EXEEXT): $(testDoubleSqrt_OBJECTS) $(testDoubleSqrt_DEPENDENCIES) + @rm -f testDoubleSqrt$(EXEEXT) + $(testDoubleSqrt_LINK) $(testDoubleSqrt_OBJECTS) $(testDoubleSqrt_LDADD) $(LIBS) +testFloatSqrt$(EXEEXT): $(testFloatSqrt_OBJECTS) $(testFloatSqrt_DEPENDENCIES) + @rm -f testFloatSqrt$(EXEEXT) + $(testFloatSqrt_LINK) $(testFloatSqrt_OBJECTS) $(testFloatSqrt_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-csqrta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-csqrts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-dsqrta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-dsqrts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-ssqrta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-ssqrts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-zsqrta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSqrt_la-zsqrts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSqrt-testFloatSqrt.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSqrt_la-ssqrts.lo: ssqrts.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-ssqrts.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-ssqrts.Tpo -c -o libSqrt_la-ssqrts.lo `test -f 'ssqrts.c' || echo '$(srcdir)/'`ssqrts.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-ssqrts.Tpo $(DEPDIR)/libSqrt_la-ssqrts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssqrts.c' object='libSqrt_la-ssqrts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-ssqrts.lo `test -f 'ssqrts.c' || echo '$(srcdir)/'`ssqrts.c + +libSqrt_la-dsqrts.lo: dsqrts.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-dsqrts.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-dsqrts.Tpo -c -o libSqrt_la-dsqrts.lo `test -f 'dsqrts.c' || echo '$(srcdir)/'`dsqrts.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-dsqrts.Tpo $(DEPDIR)/libSqrt_la-dsqrts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsqrts.c' object='libSqrt_la-dsqrts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-dsqrts.lo `test -f 'dsqrts.c' || echo '$(srcdir)/'`dsqrts.c + +libSqrt_la-csqrts.lo: csqrts.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-csqrts.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-csqrts.Tpo -c -o libSqrt_la-csqrts.lo `test -f 'csqrts.c' || echo '$(srcdir)/'`csqrts.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-csqrts.Tpo $(DEPDIR)/libSqrt_la-csqrts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csqrts.c' object='libSqrt_la-csqrts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-csqrts.lo `test -f 'csqrts.c' || echo '$(srcdir)/'`csqrts.c + +libSqrt_la-zsqrts.lo: zsqrts.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-zsqrts.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-zsqrts.Tpo -c -o libSqrt_la-zsqrts.lo `test -f 'zsqrts.c' || echo '$(srcdir)/'`zsqrts.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-zsqrts.Tpo $(DEPDIR)/libSqrt_la-zsqrts.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsqrts.c' object='libSqrt_la-zsqrts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-zsqrts.lo `test -f 'zsqrts.c' || echo '$(srcdir)/'`zsqrts.c + +libSqrt_la-ssqrta.lo: ssqrta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-ssqrta.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-ssqrta.Tpo -c -o libSqrt_la-ssqrta.lo `test -f 'ssqrta.c' || echo '$(srcdir)/'`ssqrta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-ssqrta.Tpo $(DEPDIR)/libSqrt_la-ssqrta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssqrta.c' object='libSqrt_la-ssqrta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-ssqrta.lo `test -f 'ssqrta.c' || echo '$(srcdir)/'`ssqrta.c + +libSqrt_la-dsqrta.lo: dsqrta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-dsqrta.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-dsqrta.Tpo -c -o libSqrt_la-dsqrta.lo `test -f 'dsqrta.c' || echo '$(srcdir)/'`dsqrta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-dsqrta.Tpo $(DEPDIR)/libSqrt_la-dsqrta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsqrta.c' object='libSqrt_la-dsqrta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-dsqrta.lo `test -f 'dsqrta.c' || echo '$(srcdir)/'`dsqrta.c + +libSqrt_la-csqrta.lo: csqrta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-csqrta.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-csqrta.Tpo -c -o libSqrt_la-csqrta.lo `test -f 'csqrta.c' || echo '$(srcdir)/'`csqrta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-csqrta.Tpo $(DEPDIR)/libSqrt_la-csqrta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csqrta.c' object='libSqrt_la-csqrta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-csqrta.lo `test -f 'csqrta.c' || echo '$(srcdir)/'`csqrta.c + +libSqrt_la-zsqrta.lo: zsqrta.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -MT libSqrt_la-zsqrta.lo -MD -MP -MF $(DEPDIR)/libSqrt_la-zsqrta.Tpo -c -o libSqrt_la-zsqrta.lo `test -f 'zsqrta.c' || echo '$(srcdir)/'`zsqrta.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSqrt_la-zsqrta.Tpo $(DEPDIR)/libSqrt_la-zsqrta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsqrta.c' object='libSqrt_la-zsqrta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSqrt_la_CFLAGS) $(CFLAGS) -c -o libSqrt_la-zsqrta.lo `test -f 'zsqrta.c' || echo '$(srcdir)/'`zsqrta.c + +testDoubleSqrt-testDoubleSqrt.o: testDoubleSqrt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSqrt_CFLAGS) $(CFLAGS) -MT testDoubleSqrt-testDoubleSqrt.o -MD -MP -MF $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Tpo -c -o testDoubleSqrt-testDoubleSqrt.o `test -f 'testDoubleSqrt.c' || echo '$(srcdir)/'`testDoubleSqrt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Tpo $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSqrt.c' object='testDoubleSqrt-testDoubleSqrt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSqrt_CFLAGS) $(CFLAGS) -c -o testDoubleSqrt-testDoubleSqrt.o `test -f 'testDoubleSqrt.c' || echo '$(srcdir)/'`testDoubleSqrt.c + +testDoubleSqrt-testDoubleSqrt.obj: testDoubleSqrt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSqrt_CFLAGS) $(CFLAGS) -MT testDoubleSqrt-testDoubleSqrt.obj -MD -MP -MF $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Tpo -c -o testDoubleSqrt-testDoubleSqrt.obj `if test -f 'testDoubleSqrt.c'; then $(CYGPATH_W) 'testDoubleSqrt.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSqrt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Tpo $(DEPDIR)/testDoubleSqrt-testDoubleSqrt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSqrt.c' object='testDoubleSqrt-testDoubleSqrt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSqrt_CFLAGS) $(CFLAGS) -c -o testDoubleSqrt-testDoubleSqrt.obj `if test -f 'testDoubleSqrt.c'; then $(CYGPATH_W) 'testDoubleSqrt.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSqrt.c'; fi` + +testFloatSqrt-testFloatSqrt.o: testFloatSqrt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSqrt_CFLAGS) $(CFLAGS) -MT testFloatSqrt-testFloatSqrt.o -MD -MP -MF $(DEPDIR)/testFloatSqrt-testFloatSqrt.Tpo -c -o testFloatSqrt-testFloatSqrt.o `test -f 'testFloatSqrt.c' || echo '$(srcdir)/'`testFloatSqrt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSqrt-testFloatSqrt.Tpo $(DEPDIR)/testFloatSqrt-testFloatSqrt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSqrt.c' object='testFloatSqrt-testFloatSqrt.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSqrt_CFLAGS) $(CFLAGS) -c -o testFloatSqrt-testFloatSqrt.o `test -f 'testFloatSqrt.c' || echo '$(srcdir)/'`testFloatSqrt.c + +testFloatSqrt-testFloatSqrt.obj: testFloatSqrt.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSqrt_CFLAGS) $(CFLAGS) -MT testFloatSqrt-testFloatSqrt.obj -MD -MP -MF $(DEPDIR)/testFloatSqrt-testFloatSqrt.Tpo -c -o testFloatSqrt-testFloatSqrt.obj `if test -f 'testFloatSqrt.c'; then $(CYGPATH_W) 'testFloatSqrt.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSqrt.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSqrt-testFloatSqrt.Tpo $(DEPDIR)/testFloatSqrt-testFloatSqrt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSqrt.c' object='testFloatSqrt-testFloatSqrt.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSqrt_CFLAGS) $(CFLAGS) -c -o testFloatSqrt-testFloatSqrt.obj `if test -f 'testFloatSqrt.c'; then $(CYGPATH_W) 'testFloatSqrt.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSqrt.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/csqrta.c b/2.3-1/src/c/elementaryFunctions/sqrt/csqrta.c new file mode 100644 index 00000000..fc9d36cd --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/csqrta.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sqrt.h" + +void csqrta(floatComplex* in, int size, floatComplex* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = csqrts(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/csqrts.c b/2.3-1/src/c/elementaryFunctions/sqrt/csqrts.c new file mode 100644 index 00000000..a24f9558 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/csqrts.c @@ -0,0 +1,111 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sqrt.h" +#include "lapack.h" +#include "abs.h" +#include "sign.h" +#include "pythag.h" + +#ifdef _MSC_VER +#include +#define isnan(x) _isnan((double)x) +#endif + +#define _sign(a, b) b >=0 ? a : -a + +floatComplex csqrts(floatComplex in) { + float RMax = (float) getOverflowThreshold(); + float BRMin = 2.0f * (float) getUnderflowThreshold(); + + float RealIn = creals(in); + float ImgIn = cimags(in); + + float RealOut = 0; + float ImgOut = 0; + + if(RealIn == 0) + {/* pure imaginary case */ + if(dabss(ImgIn >= BRMin)) + RealOut = ssqrts(0.5f * sabss(ImgIn)); + else + RealOut = ssqrts(sabss(ImgIn)) * ssqrts(0.5); + + ImgOut = _sign(1, ImgIn) * RealOut; + } + else if( sabss(RealIn) <= RMax && sabss(ImgIn) <= RMax) + {/* standard case : a (not zero) and b are finite */ + float Temp = ssqrts(2.0f * (sabss(RealIn) + spythags(RealIn, ImgIn))); + /* overflow test */ + if(Temp > RMax) + {/* handle (spurious) overflow by scaling a and b */ + float RealTemp = RealIn / 16.0f; + float ImgTemp = ImgIn / 16.0f; + Temp = ssqrts(2.0f * (sabss(RealIn) + spythags(RealIn, ImgTemp))); + if(RealTemp >= 0) + { + RealOut = 2 * Temp; + ImgOut = 4 * ImgTemp / Temp; + } + else + { + RealOut = 4 * sabss(ImgIn) / Temp; + ImgOut = _sign(2, ImgIn) * Temp; + } + } + else if(RealIn >= 0) /* classic switch to get the stable formulas */ + { + RealOut = 0.5f * Temp; + ImgOut = ImgIn / Temp; + } + else + { + RealOut = sabss(ImgIn) / Temp; + ImgOut = (_sign(0.5f, ImgIn)) * Temp; + } + } + else + { + /* + //Here we treat the special cases where a and b are +- 00 or NaN. + //The following is the treatment recommended by the C99 standard + //with the simplification of returning NaN + i NaN if the + //the real part or the imaginary part is NaN (C99 recommends + //something more complicated) + */ + + if(isnan(RealIn) == 1 || isnan(ImgIn) == 1) + {/* got NaN + i NaN */ + RealOut = RealIn + ImgIn; + ImgOut = RealOut; + } + else if( dabss(ImgIn) > RMax) + {/* case a +- i oo -> result must be +oo +- i oo for all a (finite or not) */ + RealOut = sabss(ImgIn); + ImgOut = ImgIn; + } + else if(RealIn < -RMax) + {/* here a is -Inf and b is finite */ + RealOut = 0; + ImgOut = _sign(1, ImgIn) * sabss(RealIn); + } + else + {/* here a is +Inf and b is finite */ + RealOut = RealIn; + ImgOut = 0; + } + } + + return FloatComplex(RealOut, ImgOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c new file mode 100644 index 00000000..a948f35b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrta.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sqrt.h" + +void dsqrta(double* in, int size, double* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = dsqrts(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c new file mode 100644 index 00000000..350cbbd0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/dsqrts.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sqrt.h" + +double dsqrts(double in){ + return sqrt(in); +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/ssqrta.c b/2.3-1/src/c/elementaryFunctions/sqrt/ssqrta.c new file mode 100644 index 00000000..9c379751 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/ssqrta.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sqrt.h" + +void ssqrta(float* in, int size, float* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = ssqrts(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/ssqrts.c b/2.3-1/src/c/elementaryFunctions/sqrt/ssqrts.c new file mode 100644 index 00000000..541fea2f --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/ssqrts.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "sqrt.h" + +float ssqrts(float in) { + return (float) sqrt((float) in); +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/testDoubleSqrt.c b/2.3-1/src/c/elementaryFunctions/sqrt/testDoubleSqrt.c new file mode 100644 index 00000000..08b74137 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/testDoubleSqrt.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSqrt.h" + +#define SOURCE {0.7062616096809506416321,0.4090520101599395275116,0.3011248558759689331055,\ +0.1880126395262777805328,0.1796709178015589714050,0.2828889950178563594818,\ +0.7232380937784910202026,0.7360379849560558795929,0.1852612206712365150452,\ +0.7703790138475596904755,0.1914967410266399383545,0.7521587223745882511139,\ +0.6205883463844656944275,0.2807604051195085048676,0.2289868686348199844360,\ +0.5049233403988182544708,0.8354099662974476814270,0.8174716415815055370331,\ +0.0030740275979042053223,0.3677616142667829990387,0.8278525872156023979187,\ +0.72754097869619727135,0.5323124285787343978882,0.9267726917751133441925,\ +0.9542504185810685157776,0.3162104780785739421845,0.5789009965956211090088,\ +0.6881225542165338993073,0.3714061146602034568787,0.1705444059334695339203,\ +0.1954363007098436355591,0.978800852317363023758,0.9300233917310833930969,\ +0.5357720064930617809296,0.3947123587131500244141,0.1344871171750128269196,\ +0.7380615202710032463074,0.588114650454372167587,0.9113173168152570724487,\ +0.5682763461954891681671,0.1127616921439766883850,0.9478473584167659282684,\ +0.5237770043313503265381,0.8140139640308916568756,0.1400952627882361412048,\ +0.2763446993194520473480,0.9059953633695840835571,0.1379901585169136524200,\ +0.5603838684037327766419,0.3008610638789832592011,0.4767417535185813904,\ +0.8127435916103422641754,0.1988414181396365165710,0.1107953130267560482025,\ +0.2159351315349340438843,0.6467244853265583515167,0.6597879612818360328674,\ +0.0691898013465106487274,0.9164751060307025909424,0.8635670826770365238190,\ +0.5032854294404387474060,0.1832137755118310451508,0.8403698671609163284302,\ +0.9247214836068451404572,0.6229452537372708320618,0.2773811477236449718475,\ +0.2479109913110733032227,0.3891948559321463108063,0.0436578569933772087097,\ +0.8132526441477239131928,0.7686451207846403121948,0.4041520212776958942413,\ +0.8579940209165215492249,0.6993723283521831035614,0.0828925184905529022217,\ +0.9201254160143435001373,0.5200281282886862754822,0.9351884997449815273285,\ +0.8825624976307153701782,0.2245844271965324878693,0.2153332801535725593567,\ +0.4327089670114219188690,0.5800157263875007629395,0.8876141034997999668121,\ +0.5258982880041003227234,0.859640696551650762558,0.7337234076112508773804,\ +0.7134532411582767963409,0.1087165409699082374573,0.8477638359181582927704,\ +0.6594733335077762603760,0.7916418449021875858307,0.6067967480048537254334,\ +0.4102901122532784938812,0.1958728153258562088013,0.241527963895350694656,\ +0.5113455550745129585266,0.9119556057266891002655,0.0928984880447387695313,\ +0.7438839026726782321930,0.1938720373436808586121,0.4355978979729115962982,\ +0.9922429900616407394409,0.4533818070776760578156,0.8269640663638710975647,\ +0.8889675955288112163544,0.4682085178792476654053,0.3856786251999437808991,\ +0.4124865522608160972595,0.6955242282710969448090,0.0978972557932138442993,\ +0.8728604433126747608185,0.6359515609219670295715,0.4129665228538215160370,\ +0.0294486805796623229980,0.1809961968101561069489,0.7658103061839938163757,\ +0.1232470511458814144135,0.0170737411826848983765,0.8835507561452686786652,\ +0.3164170170202851295471,0.9378212536685168743134,0.3916359134018421173096,\ +0.0844073877669870853424,0.6934146797284483909607,0.4618808380328118801117,\ +0.9355291295796632766724,0.0842495900578796863556,0.5402926551178097724915,\ +0.5613215523771941661835,0.1306025832891464233398,0.5840523042716085910797,\ +0.0048661706969141960144,0.2761953338049352169037,0.7478824090212583541870,\ +0.0194325004704296588898,0.6444276878610253334045,0.2243968318216502666473,\ +0.2478402368724346160889,0.1196091384626924991608,0.1883201440796256065369,\ +0.3393343067727982997894,0.959958622232079505920,0.2847225037403404712677,\ +0.8766820700839161872864,0.2853349032811820507050,0.5103433504700660705566,\ +0.8752629184164106845856,0.5941145820543169975281,0.3945342986844480037689,\ +0.4661326166242361068726,0.0073588271625339984894,0.5170202488079667091370,\ +0.4690007264725863933563,0.6654530800879001617432,0.9476742581464350223541,\ +0.4933638339862227439880,0.2918433747254312038422,0.2016727942973375320435,\ +0.7016656589694321155548,0.8736049132421612739563,0.191055159550160169601,\ +0.5307010114192962646484,0.8889481076039373874664,0.0115523664280772209167,\ +0.4998398735187947750092,0.6700848620384931564331,0.4995208983309566974640,\ +0.1538907447829842567444,0.2571737091057002544403,0.9586529098451137542725,\ +0.6246025026775896549225,0.9371285131201148033142,0.9923511571250855922699,\ +0.3454555813223123550415,0.7558249053545296192169,0.2107181670144200325012,\ +0.9372652801685035228729,0.6767524704337120056152,0.7465373151935636997223,\ +0.4050982249900698661804,0.5101723610423505306244,0.9497965183109045028687,\ +0.0289692510850727558136,0.1634070957079529762268,0.4146909262053668498993,\ +0.0021650679409503936768,0.1810030029155313968658,0.4556188201531767845154,\ +0.1977851442061364650726,0.6053877938538789749146,0.4363054675050079822540,\ +0.8938506888225674629211,0.6104825991205871105194,0.4316215068101882934570,\ +0.2315693595446646213532,0.4675927339121699333191,0.6150764389894902706146,\ +0.8621218334883451461792,0.3846137975342571735382} + +#define RESULT {0.8403937230137732417035,0.6395717396507912821946,0.5487484449872901404177,\ +0.4336042429754092819572,0.4238760641998542411102,0.5318731004834296172135,\ +0.8504340619815806689985,0.8579265615168094605281,0.4304198190967006287799,\ +0.8777123753528599525708,0.4376034060957934568314,0.8672708471836166888025,\ +0.7877742991393319460514,0.5298682903510159025728,0.4785257241098120895018,\ +0.7105795806233234923610,0.9140076401745489409478,0.9041413836239913237591,\ +0.0554439139843518405404,0.6064335200718896645711,0.9098640487543193655640,\ +0.8529601272604701023283,0.7295974428263399813588,0.9626903405431641580492,\ +0.9768574197809363202083,0.5623259535879292503324,0.7608554373832265849131,\ +0.8295315269575556094139,0.6094309761246169410143,0.4129702240276767466476,\ +0.4420817805676271472493,0.9893436472315183527471,0.9643772040706288795064,\ +0.7319644844478875311822,0.6282613777029032453569,0.3667248521371476721598,\ +0.8591050694012946076228,0.7668863347683098075081,0.9546294133407251525370,\ +0.7538410616273759634609,0.3358000776414095667199,0.9735745263803721183393,\ +0.7237243980489743711004,0.9022272241685526106281,0.3742930172849022740778,\ +0.5256849810670379818944,0.9518378871265757990017,0.3714702659930047001780,\ +0.7485879162822044463610,0.5485080344707662369785,0.6904648821761910637562,\ +0.9015229290541324491670,0.4459163802100529760963,0.3328592991441819970433,\ +0.4646882089476060961886,0.8041918212258555298533,0.8122733291705668268179,\ +0.2630395433133783655855,0.9573270632499127907877,0.9292831014696417701870,\ +0.709426126838051174239,0.4280347830630485406189,0.9167168958631211062027,\ +0.9616243984045148573969,0.7892688095555726590646,0.5266698659726460896025,\ +0.4979066090253003729060,0.6238548356245596782088,0.2089446266200143398351,\ +0.9018052140832431007311,0.8767240847522328461849,0.6357295189604584839671,\ +0.9262796666863207795117,0.8362848368541564436640,0.2879106085064475628599,\ +0.9592316800514584240744,0.7211297582881227574703,0.9670514462762472840396,\ +0.9394479749463060525017,0.4739033943711866703197,0.4640401708403837921502,\ +0.6578061773892229791017,0.7615876353956259059430,0.9421327419741869491077,\ +0.7251884499935863370723,0.9271681058749005055475,0.8565765626091171869305,\ +0.8446616134040167978014,0.3297219146036675652134,0.9207409168263124277232,\ +0.8120796349544644465723,0.8897425722658142133170,0.7789715964044220397611,\ +0.6405389232929397103078,0.4425752086661161044390,0.4914549459465747394127,\ +0.7150842992784227636349,0.9549636672285962690765,0.3047925327903207581848,\ +0.8624870449303445596456,0.4403090248265198458633,0.6599984075533149585624,\ +0.9961139443164325202318,0.6733363253810654702747,0.9093756464541323802919,\ +0.9428507811572365282515,0.6842576399860272884368,0.6210302933029465677350,\ +0.6422511597971747310254,0.8339809519833752959883,0.3128853716510470728274,\ +0.9342700055726260721656,0.7974657114396624946195,0.6426247138523553115164,\ +0.1716061787339323019275,0.4254364779966053888849,0.8751058828416100610070,\ +0.351065593793925379007,0.1306665266343484677059,0.939973806095291464224,\ +0.5625095706032787745698,0.9684117170235585492222,0.6258082081611283653544,\ +0.2905294955197958439719,0.8327152452840337337747,0.6796181560500071938691,\ +0.967227547984270019654,0.2902577993058579330921,0.7350460224488054583603,\ +0.7492139563417076209,0.3613897941131520297198,0.7642331478492728757956,\ +0.0697579436115643852778,0.5255428943530063845557,0.8648019478593109710118,\ +0.1394005038385071892915,0.8027625351628122629677,0.4737054272664081300270,\ +0.4978355520374520559734,0.3458455413370143394225,0.4339586893698818559351,\ +0.5825240825689512735863,0.9797747813819661644175,0.5335939502471336304268,\ +0.9363130192857067601864,0.5341674861700046461621,0.7143831958200487219912,\ +0.9355548719430681892106,0.7707882861423861475814,0.628119653158892954359,\ +0.6827390545620164452600,0.0857836066071717417980,0.7190412010503756112811,\ +0.6848362771294949080669,0.8157530754388242488773,0.9734856229788064752029,\ +0.7023986289751872336140,0.5402252999679219014340,0.4490799419895499244859,\ +0.8376548567097501507561,0.9346683439820572258938,0.4370985696043401258493,\ +0.7284922864514739027086,0.9428404465252524513375,0.1074819353569576446672,\ +0.7069935455991057660086,0.8185871132863582477768,0.7067679239545019420632,\ +0.3922891086723976905581,0.5071229723703120084721,0.9791082217227642381374,\ +0.7903179756766194330453,0.9680539825444213208883,0.9961682373600784234924,\ +0.5877546948534841941836,0.8693819099535771144360,0.4590404851583572698459,\ +0.9681246201644205795489,0.8226496644585178374953,0.8640239089247262471716,\ +0.6364732712298842853826,0.7142635095273666134830,0.9745750449867390807768,\ +0.1702035577920530950991,0.4042364354037782381290,0.643965003866954543987,\ +0.0465302905745321321307,0.4254444768892075012801,0.6749954223201641845265,\ +0.444730417450995230144,0.7780667027022033499506,0.6605342288670648098758,\ +0.9454367714567524227931,0.7813338589364902109224,0.6569790763869031158251,\ +0.4812165412209607473493,0.6838075269490457852584,0.7842680912733159814820,\ +0.9285051607225159875370,0.6201723933990106463199} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZRESULTR {0.8432166939003225003546,1.028696846310626300536,0.8741363651656853805960,\ +1.0145139259460289604675,0.4720540083473970804917,0.4952416659876168192334,\ +0.8651884064428800868996,0.6910466586042781633736,0.6666361606264414874090,\ +0.6727093940540614935841,0.8688705649614124615354,0.8716907101266159196840,\ +0.959306172735902795701,0.5815972201878681913101,0.8529353171823288448650,\ +0.6323612148789939935156,0.8925417496893577329331,0.8977079570170535260942,\ +0.7087222819700315090685,0.9060158028150111508836,0.8406257183559593393341,\ +0.8378258601984284181796,0.7591172919619637582400,1.0385687027372507706957,\ +0.7426169311676505957465,0.9782382399865202637912,0.6830656191716251157686,\ +0.5981803109332550771882,0.8314861127635455595453,1.011450539647472002258,\ +0.6464748892519300849102,0.6578303557631125508820,0.7481312014375646191056,\ +0.9466832738110327882808,0.6183009489366241284714,0.8939481166511646925699,\ +0.8123805134131761862548,0.8772630865325246052322,0.5308180535125875953995,\ +0.7782537556049359261934,0.7379946979653042582470,0.8238088030668070382845,\ +0.7027705686531833251252,0.9605105126328297160399,0.8941312697312054913468,\ +0.7374641482216017784879,0.8816465539160547315589,0.8641531635219484863697,\ +0.7879164327234249309839,0.5731702653710250006114,0.7831953532687397911971,\ +0.6252910190572938953224,0.5252142434850843866201,0.7511253936013374543634,\ +0.7367688115224660938551,0.9388049677540464266201,0.3835650562588603929015,\ +0.5520782622396902539208,0.4620041004215187374626,0.753968196415999991622,\ +0.6156379639362553612969,0.9496353272389349564620,0.8339637612267859489990,\ +0.7959636817154828181131,0.5275172507857687209665,0.5514044508846071002139,\ +0.6441142487726253529345,0.8328463321559912424519,1.0637408773050947008443,\ +1.0155667426713801404503,0.2709318224164963262446,0.7917869572241151843173,\ +0.8571412685012261833961,0.8071256937996567071281,0.7881067116954072471202,\ +0.7201105910271731191941,0.4974916923152819525633,0.9550562531126176590846,\ +0.8512952675658871370956,0.7682506551752034118508,0.9526163214553304836585,\ +0.756785792150606484441,0.5821581994240766499971,0.8807562498788572558084,\ +0.9178011959841433364815,0.8384018774833429388238,0.9005192643641398708709,\ +1.0365709563884744071061,0.9040270806600297914812,1.0053433947417824700921,\ +1.0186506185399304413863,0.6220542372412505294221,0.9288207542994831866778,\ +0.7707938959111726440199,0.63603233719709606486,0.6441295538205468185211,\ +0.7370617546735380720691,1.0024537010421461502574,1.0505138587196660715506,\ +0.953608813532313304151,0.7187463572209089601728,0.7428380749761755996730,\ +0.9266208094400342210051,0.8841784551932333480195,0.9840672842877067338918,\ +0.9382321956452510658409,0.8393030146072417707615,0.8503757458476615127552,\ +0.7145712412765103938028,0.5826505086380492359766,0.9155742917376128442442,\ +0.8739880489156448550858,0.8470155698847267045082,0.9650636753683585755681,\ +0.7314820521682621201620,0.8914470068047345430173,0.8031939281911506522960,\ +0.5070351579739499348065,0.7331953647718203459505,0.9609459795569127438242,\ +0.847153172323739211969,0.7661900708888577105071,0.9519994233321562582262,\ +0.5940854373891888418058,0.8888500969738630796968,0.6766367900740852814323,\ +0.8139959478095014633325,0.9760840415848224260742,1.0729430743093604228022,\ +0.8617604247210989276695,0.6907515785500089045002,1.0470820008330794514961,\ +0.7605256422767727730872,0.8272295000550387022997,0.6269868176753693456149,\ +0.9734363297756469801669,0.2617213661737881613689,0.6805441931353264362059,\ +0.709837674958288866733,0.8069322418000910435154,0.6852606023040614946496,\ +0.6540897892889659948068,0.7186585042731442607433,0.6343284289266235553839,\ +0.6825711485307393022737,0.610883282746898181870,0.7163489185444231743816,\ +0.9770189769897136278232,0.5867956626396594321804,1.0750765659376522176416,\ +0.6384005820717564283484,0.3858687639762184984349,0.3186007968636310749844,\ +0.7397471191545493818254,0.7055161810773808994668,0.5968318319385850223569,\ +0.5659466952073320955563,1.0001490762521170196919,0.7645570771657418385203,\ +0.7377545989844320750706,0.9516433749813681952645,0.6866306949128065939547,\ +1.0618728756326238915619,0.5208322311777507929165,0.6253215357738258761700,\ +0.4548702015131091402900,0.6499645432009629741899,0.9907517258725765385563,\ +0.9119111641770327736367,0.7823013339720715775272,0.9622054437069111898495,\ +0.4500082630180006204590,0.5764937377448445809947,0.9818886833563331695274,\ +0.6678434466414240322507,1.0365982590716655842300,0.4743068831608843738401,\ +0.3802074434441635730764,0.8040992937118037753308,0.7973759350671048018455,\ +0.7498672536100723373664,0.7320754444197923316295,0.7445011903920762952325,\ +0.8914147503382092718738,0.6264212402370327170686,0.7540169824914779717062,\ +0.8776882812655947274649,0.9844634271419567816963,0.6638769890354155878143,\ +0.9458113966252766902088,0.5131381594621587938221,0.8518664381177757372043,\ +0.812738510298055549796,0.4535385196962208320670,0.9669683162928227604382,\ +1.040816644093084830658,0.4316950876741513232204,0.8660041994184899394327,\ +0.9321942634710010944232,0.6397933456564963705660} + +#define ZRESULTI {0.3263261982366231217512,0.3357016264078308553920,0.5625695149136477057894,\ +0.4083475049199193351868,0.2184722473340149073717,0.1963327431456096394680,\ +0.2524080275917597870894,0.5853888978723345015709,0.6614285891378552939557,\ +0.5503716236174250875379,0.4340417579628489397337,0.5691216233293430182272,\ +0.5152745668080026542057,0.0097333750513688352402,0.5491507438051371758903,\ +0.3063310306018693363050,0.1617182509817773616856,0.3162436265422815528936,\ +0.5147040404416135528365,0.0167233791158154128376,0.1662985694996903240917,\ +0.4205606470816827258119,0.4901820135407665146587,0.4294486162653968763792,\ +0.0728126817040040535955,0.4473105496989639440209,0.6637966234200971538115,\ +0.1811203866159907804878,0.2900944639504645650163,0.3839508177567231839156,\ +0.3488856874362309956617,0.0988580458466166156484,0.36794821735938526563,\ +0.3663418129703439607425,0.1414440314101028384197,0.4830310461641617592044,\ +0.1323559272370566086696,0.1075347714236491863948,0.1691821287725076283781,\ +0.2810338004872128814249,0.5768683871779194394236,0.4480389811753019424501,\ +0.5764461773381487352808,0.0760084144919923321293,0.5032733679892044120763,\ +0.2741647566958217985267,0.0089035245651246392590,0.3994776154055512673580,\ +0.1897607024294587774183,0.1206637982137782894032,0.5412770094909528095784,\ +0.2404690476392074838241,0.2181535914362372208242,0.5377337924125580315149,\ +0.2155582732432577419690,0.3687913267931641758679,0.1778256377212544814270,\ +0.4920751198642726587096,0.3546066849097115891709,0.1330846352869425042176,\ +0.4091125411822805202355,0.2612879326286920989020,0.5393616451432939884469,\ +0.5878226164089255245671,0.3213486447830481429477,0.5467089832022555828672,\ +0.3224195659455129092663,0.1825954124653428600755,0.3990552600779624370375,\ +0.2206681056892876025000,0.1667943253834255346035,0.4661703075143642238665,\ +0.1557268144037805002178,0.5095982399018667008406,0.2528705265313027639174,\ +0.6797078130539779827757,0.3056564645363825660773,0.0347369736586594715644,\ +0.3916242993690946527785,0.4912984601114738780758,0.1009080702371304705256,\ +0.5247714720741629701450,0.4792854332576366727,0.1144484422667324668987,\ +0.4288220783749939757357,0.0569809815370433195292,0.36777102554791152311,\ +0.4171776516254488420543,0.3878789385171945158781,0.3986227007920866149959,\ +0.4484209706404114204048,0.5077720388168175391641,0.5031527077021280547342,\ +0.5940468527088033079409,0.0401196609964555792049,0.3361101426509159328937,\ +0.6594999296529031607150,0.3990961397296745039043,0.4022917642620268408038,\ +0.0320112843801534235899,0.5682183459163515637513,0.1414347799783703119037,\ +0.1648707746240843652341,0.5352546490793753664050,0.470990570471244762718,\ +0.4123594778064457178068,0.3511234154134331153507,0.1398027400878979753518,\ +0.3687207284066310042370,0.0066543882936226537647,0.4539069906010949617681,\ +0.0153616286808277956177,0.1529597971009351853322,0.2404648554390081682808,\ +0.4168838721023755411466,0.0368475258068726510552,0.4025685317176705413367,\ +0.1004402255189763004672,0.1870378561196294198155,0.4247235900050622126045,\ +0.1981784628926891167478,0.3110123830424602608957,0.4432796815388754252396,\ +0.1502372000465193591090,0.3293933175156303350128,0.6226562035634579661547,\ +0.4335923272125510874453,0.3788924267318253269465,0.4544252728163645227433,\ +0.4413447883722416142938,0.5962122022024949341557,0.4244949294494160807467,\ +0.5233339844701030418861,0.1844970592543655196760,0.5425403272492764772395,\ +0.3293523059298621991076,0.1887977324286261304742,0.3419695936679567616068,\ +0.4729933970782203567218,0.3179389135603382654516,0.6298017886863316316948,\ +0.6366327153805051430879,0.1174393569255921254690,0.2334182851178558948391,\ +0.1898326398721546515169,0.1392118774041107009953,0.6783676670817878617825,\ +0.0355768720222523482377,0.4001589607861217867679,0.4438842647772449079291,\ +0.2881695442233370707541,0.3853535740764292283345,0.0651773014834273051177,\ +0.330676282333628224208,0.3665111238554681349910,0.2961355479495680342872,\ +0.2080043831343482141350,0.3389124718789456314205,0.2507682074527933790975,\ +0.2151359545279972751430,0.1795904033249649811577,0.0389989482113152971521,\ +0.4372272948094740319114,0.3708152364207700224519,0.3460997943417740696503,\ +0.1738040295127169787559,0.6067346706520863053314,0.3759164722454063634061,\ +0.2843476954448227456140,0.5529633038042787163136,0.0792158430677229186134,\ +0.2658590818355930918138,0.4997084504683915184842,0.3766089999954101985580,\ +0.0436608774416314404654,0.3358357438535300443228,0.4433991668140928599229,\ +0.0369743604678396259322,0.5169293158173903224295,0.1463149302341813229322,\ +0.5911631132684145306655,0.2559015919459735610708,0.5887924030165481159571,\ +0.2258812650827625445604,0.2307020058304501131108,0.5661961730855942231955,\ +0.3133100513489369687292,0.2604774274143707435414,0.4760737048049700770314,\ +0.2202097738273190163927,0.3135385365979036498274,0.5703576069745146526202,\ +0.3290309478154280209417,0.3766593161719967164380,0.4946018916047810187742,\ +0.4780382426469301782035,0.3964469578199069088598,0.4544192798538850830425,\ +0.4952896438554572622337,0.4094267669310915347403} + + + + +void dsqrtsTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dsqrts(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void zsqrtsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=zsqrts(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-16); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-16); + } +} + +void dsqrtaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dsqrta(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-16); + } +} + +void zsqrtaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + zsqrta(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-16); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-16); + } +} + + +int testSqrt() { + printf("\n>>>> Double Square Root Tests\n"); + dsqrtsTest(); + zsqrtsTest(); + dsqrtaTest(); + zsqrtaTest(); + + return 0; +} + +int main() { + assert(testSqrt() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/testFloatSqrt.c b/2.3-1/src/c/elementaryFunctions/sqrt/testFloatSqrt.c new file mode 100644 index 00000000..e4c72cb0 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/testFloatSqrt.c @@ -0,0 +1,496 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testSqrt.h" + +#define SOURCE {0.7062616096809506416321f,0.4090520101599395275116f,0.3011248558759689331055f,\ +0.1880126395262777805328f,0.1796709178015589714050f,0.2828889950178563594818f,\ +0.7232380937784910202026f,0.7360379849560558795929f,0.1852612206712365150452f,\ +0.7703790138475596904755f,0.1914967410266399383545f,0.7521587223745882511139f,\ +0.6205883463844656944275f,0.2807604051195085048676f,0.2289868686348199844360f,\ +0.5049233403988182544708f,0.8354099662974476814270f,0.8174716415815055370331f,\ +0.0030740275979042053223f,0.3677616142667829990387f,0.8278525872156023979187f,\ +0.72754097869619727135f,0.5323124285787343978882f,0.9267726917751133441925f,\ +0.9542504185810685157776f,0.3162104780785739421845f,0.5789009965956211090088f,\ +0.6881225542165338993073f,0.3714061146602034568787f,0.1705444059334695339203f,\ +0.1954363007098436355591f,0.978800852317363023758f,0.9300233917310833930969f,\ +0.5357720064930617809296f,0.3947123587131500244141f,0.1344871171750128269196f,\ +0.7380615202710032463074f,0.588114650454372167587f,0.9113173168152570724487f,\ +0.5682763461954891681671f,0.1127616921439766883850f,0.9478473584167659282684f,\ +0.5237770043313503265381f,0.8140139640308916568756f,0.1400952627882361412048f,\ +0.2763446993194520473480f,0.9059953633695840835571f,0.1379901585169136524200f,\ +0.5603838684037327766419f,0.3008610638789832592011f,0.4767417535185813904f,\ +0.8127435916103422641754f,0.1988414181396365165710f,0.1107953130267560482025f,\ +0.2159351315349340438843f,0.6467244853265583515167f,0.6597879612818360328674f,\ +0.0691898013465106487274f,0.9164751060307025909424f,0.8635670826770365238190f,\ +0.5032854294404387474060f,0.1832137755118310451508f,0.8403698671609163284302f,\ +0.9247214836068451404572f,0.6229452537372708320618f,0.2773811477236449718475f,\ +0.2479109913110733032227f,0.3891948559321463108063f,0.0436578569933772087097f,\ +0.8132526441477239131928f,0.7686451207846403121948f,0.4041520212776958942413f,\ +0.8579940209165215492249f,0.6993723283521831035614f,0.0828925184905529022217f,\ +0.9201254160143435001373f,0.5200281282886862754822f,0.9351884997449815273285f,\ +0.8825624976307153701782f,0.2245844271965324878693f,0.2153332801535725593567f,\ +0.4327089670114219188690f,0.5800157263875007629395f,0.8876141034997999668121f,\ +0.5258982880041003227234f,0.859640696551650762558f,0.7337234076112508773804f,\ +0.7134532411582767963409f,0.1087165409699082374573f,0.8477638359181582927704f,\ +0.6594733335077762603760f,0.7916418449021875858307f,0.6067967480048537254334f,\ +0.4102901122532784938812f,0.1958728153258562088013f,0.241527963895350694656f,\ +0.5113455550745129585266f,0.9119556057266891002655f,0.0928984880447387695313f,\ +0.7438839026726782321930f,0.1938720373436808586121f,0.4355978979729115962982f,\ +0.9922429900616407394409f,0.4533818070776760578156f,0.8269640663638710975647f,\ +0.8889675955288112163544f,0.4682085178792476654053f,0.3856786251999437808991f,\ +0.4124865522608160972595f,0.6955242282710969448090f,0.0978972557932138442993f,\ +0.8728604433126747608185f,0.6359515609219670295715f,0.4129665228538215160370f,\ +0.0294486805796623229980f,0.1809961968101561069489f,0.7658103061839938163757f,\ +0.1232470511458814144135f,0.0170737411826848983765f,0.8835507561452686786652f,\ +0.3164170170202851295471f,0.9378212536685168743134f,0.3916359134018421173096f,\ +0.0844073877669870853424f,0.6934146797284483909607f,0.4618808380328118801117f,\ +0.9355291295796632766724f,0.0842495900578796863556f,0.5402926551178097724915f,\ +0.5613215523771941661835f,0.1306025832891464233398f,0.5840523042716085910797f,\ +0.0048661706969141960144f,0.2761953338049352169037f,0.7478824090212583541870f,\ +0.0194325004704296588898f,0.6444276878610253334045f,0.2243968318216502666473f,\ +0.2478402368724346160889f,0.1196091384626924991608f,0.1883201440796256065369f,\ +0.3393343067727982997894f,0.959958622232079505920f,0.2847225037403404712677f,\ +0.8766820700839161872864f,0.2853349032811820507050f,0.5103433504700660705566f,\ +0.8752629184164106845856f,0.5941145820543169975281f,0.3945342986844480037689f,\ +0.4661326166242361068726f,0.0073588271625339984894f,0.5170202488079667091370f,\ +0.4690007264725863933563f,0.6654530800879001617432f,0.9476742581464350223541f,\ +0.4933638339862227439880f,0.2918433747254312038422f,0.2016727942973375320435f,\ +0.7016656589694321155548f,0.8736049132421612739563f,0.191055159550160169601f,\ +0.5307010114192962646484f,0.8889481076039373874664f,0.0115523664280772209167f,\ +0.4998398735187947750092f,0.6700848620384931564331f,0.4995208983309566974640f,\ +0.1538907447829842567444f,0.2571737091057002544403f,0.9586529098451137542725f,\ +0.6246025026775896549225f,0.9371285131201148033142f,0.9923511571250855922699f,\ +0.3454555813223123550415f,0.7558249053545296192169f,0.2107181670144200325012f,\ +0.9372652801685035228729f,0.6767524704337120056152f,0.7465373151935636997223f,\ +0.4050982249900698661804f,0.5101723610423505306244f,0.9497965183109045028687f,\ +0.0289692510850727558136f,0.1634070957079529762268f,0.4146909262053668498993f,\ +0.0021650679409503936768f,0.1810030029155313968658f,0.4556188201531767845154f,\ +0.1977851442061364650726f,0.6053877938538789749146f,0.4363054675050079822540f,\ +0.8938506888225674629211f,0.6104825991205871105194f,0.4316215068101882934570f,\ +0.2315693595446646213532f,0.4675927339121699333191f,0.6150764389894902706146f,\ +0.8621218334883451461792f,0.3846137975342571735382f} + +#define RESULT {0.8403937230137732417035f,0.6395717396507912821946f,0.5487484449872901404177f,\ +0.4336042429754092819572f,0.4238760641998542411102f,0.5318731004834296172135f,\ +0.8504340619815806689985f,0.8579265615168094605281f,0.4304198190967006287799f,\ +0.8777123753528599525708f,0.4376034060957934568314f,0.8672708471836166888025f,\ +0.7877742991393319460514f,0.5298682903510159025728f,0.4785257241098120895018f,\ +0.7105795806233234923610f,0.9140076401745489409478f,0.9041413836239913237591f,\ +0.0554439139843518405404f,0.6064335200718896645711f,0.9098640487543193655640f,\ +0.8529601272604701023283f,0.7295974428263399813588f,0.9626903405431641580492f,\ +0.9768574197809363202083f,0.5623259535879292503324f,0.7608554373832265849131f,\ +0.8295315269575556094139f,0.6094309761246169410143f,0.4129702240276767466476f,\ +0.4420817805676271472493f,0.9893436472315183527471f,0.9643772040706288795064f,\ +0.7319644844478875311822f,0.6282613777029032453569f,0.3667248521371476721598f,\ +0.8591050694012946076228f,0.7668863347683098075081f,0.9546294133407251525370f,\ +0.7538410616273759634609f,0.3358000776414095667199f,0.9735745263803721183393f,\ +0.7237243980489743711004f,0.9022272241685526106281f,0.3742930172849022740778f,\ +0.5256849810670379818944f,0.9518378871265757990017f,0.3714702659930047001780f,\ +0.7485879162822044463610f,0.5485080344707662369785f,0.6904648821761910637562f,\ +0.9015229290541324491670f,0.4459163802100529760963f,0.3328592991441819970433f,\ +0.4646882089476060961886f,0.8041918212258555298533f,0.8122733291705668268179f,\ +0.2630395433133783655855f,0.9573270632499127907877f,0.9292831014696417701870f,\ +0.709426126838051174239f,0.4280347830630485406189f,0.9167168958631211062027f,\ +0.9616243984045148573969f,0.7892688095555726590646f,0.5266698659726460896025f,\ +0.4979066090253003729060f,0.6238548356245596782088f,0.2089446266200143398351f,\ +0.9018052140832431007311f,0.8767240847522328461849f,0.6357295189604584839671f,\ +0.9262796666863207795117f,0.8362848368541564436640f,0.2879106085064475628599f,\ +0.9592316800514584240744f,0.7211297582881227574703f,0.9670514462762472840396f,\ +0.9394479749463060525017f,0.4739033943711866703197f,0.4640401708403837921502f,\ +0.6578061773892229791017f,0.7615876353956259059430f,0.9421327419741869491077f,\ +0.7251884499935863370723f,0.9271681058749005055475f,0.8565765626091171869305f,\ +0.8446616134040167978014f,0.3297219146036675652134f,0.9207409168263124277232f,\ +0.8120796349544644465723f,0.8897425722658142133170f,0.7789715964044220397611f,\ +0.6405389232929397103078f,0.4425752086661161044390f,0.4914549459465747394127f,\ +0.7150842992784227636349f,0.9549636672285962690765f,0.3047925327903207581848f,\ +0.8624870449303445596456f,0.4403090248265198458633f,0.6599984075533149585624f,\ +0.9961139443164325202318f,0.6733363253810654702747f,0.9093756464541323802919f,\ +0.9428507811572365282515f,0.6842576399860272884368f,0.6210302933029465677350f,\ +0.6422511597971747310254f,0.8339809519833752959883f,0.3128853716510470728274f,\ +0.9342700055726260721656f,0.7974657114396624946195f,0.6426247138523553115164f,\ +0.1716061787339323019275f,0.4254364779966053888849f,0.8751058828416100610070f,\ +0.351065593793925379007f,0.1306665266343484677059f,0.939973806095291464224f,\ +0.5625095706032787745698f,0.9684117170235585492222f,0.6258082081611283653544f,\ +0.2905294955197958439719f,0.8327152452840337337747f,0.6796181560500071938691f,\ +0.967227547984270019654f,0.2902577993058579330921f,0.7350460224488054583603f,\ +0.7492139563417076209f,0.3613897941131520297198f,0.7642331478492728757956f,\ +0.0697579436115643852778f,0.5255428943530063845557f,0.8648019478593109710118f,\ +0.1394005038385071892915f,0.8027625351628122629677f,0.4737054272664081300270f,\ +0.4978355520374520559734f,0.3458455413370143394225f,0.4339586893698818559351f,\ +0.5825240825689512735863f,0.9797747813819661644175f,0.5335939502471336304268f,\ +0.9363130192857067601864f,0.5341674861700046461621f,0.7143831958200487219912f,\ +0.9355548719430681892106f,0.7707882861423861475814f,0.628119653158892954359f,\ +0.6827390545620164452600f,0.0857836066071717417980f,0.7190412010503756112811f,\ +0.6848362771294949080669f,0.8157530754388242488773f,0.9734856229788064752029f,\ +0.7023986289751872336140f,0.5402252999679219014340f,0.4490799419895499244859f,\ +0.8376548567097501507561f,0.9346683439820572258938f,0.4370985696043401258493f,\ +0.7284922864514739027086f,0.9428404465252524513375f,0.1074819353569576446672f,\ +0.7069935455991057660086f,0.8185871132863582477768f,0.7067679239545019420632f,\ +0.3922891086723976905581f,0.5071229723703120084721f,0.9791082217227642381374f,\ +0.7903179756766194330453f,0.9680539825444213208883f,0.9961682373600784234924f,\ +0.5877546948534841941836f,0.8693819099535771144360f,0.4590404851583572698459f,\ +0.9681246201644205795489f,0.8226496644585178374953f,0.8640239089247262471716f,\ +0.6364732712298842853826f,0.7142635095273666134830f,0.9745750449867390807768f,\ +0.1702035577920530950991f,0.4042364354037782381290f,0.643965003866954543987f,\ +0.0465302905745321321307f,0.4254444768892075012801f,0.6749954223201641845265f,\ +0.444730417450995230144f,0.7780667027022033499506f,0.6605342288670648098758f,\ +0.9454367714567524227931f,0.7813338589364902109224f,0.6569790763869031158251f,\ +0.4812165412209607473493f,0.6838075269490457852584f,0.7842680912733159814820f,\ +0.9285051607225159875370f,0.6201723933990106463199f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} + +#define CRESULTR {0.8432166939003225003546f,1.028696846310626300536f,0.8741363651656853805960f,\ +1.0145139259460289604675f,0.4720540083473970804917f,0.4952416659876168192334f,\ +0.8651884064428800868996f,0.6910466586042781633736f,0.6666361606264414874090f,\ +0.6727093940540614935841f,0.8688705649614124615354f,0.8716907101266159196840f,\ +0.959306172735902795701f,0.5815972201878681913101f,0.8529353171823288448650f,\ +0.6323612148789939935156f,0.8925417496893577329331f,0.8977079570170535260942f,\ +0.7087222819700315090685f,0.9060158028150111508836f,0.8406257183559593393341f,\ +0.8378258601984284181796f,0.7591172919619637582400f,1.0385687027372507706957f,\ +0.7426169311676505957465f,0.9782382399865202637912f,0.6830656191716251157686f,\ +0.5981803109332550771882f,0.8314861127635455595453f,1.011450539647472002258f,\ +0.6464748892519300849102f,0.6578303557631125508820f,0.7481312014375646191056f,\ +0.9466832738110327882808f,0.6183009489366241284714f,0.8939481166511646925699f,\ +0.8123805134131761862548f,0.8772630865325246052322f,0.5308180535125875953995f,\ +0.7782537556049359261934f,0.7379946979653042582470f,0.8238088030668070382845f,\ +0.7027705686531833251252f,0.9605105126328297160399f,0.8941312697312054913468f,\ +0.7374641482216017784879f,0.8816465539160547315589f,0.8641531635219484863697f,\ +0.7879164327234249309839f,0.5731702653710250006114f,0.7831953532687397911971f,\ +0.6252910190572938953224f,0.5252142434850843866201f,0.7511253936013374543634f,\ +0.7367688115224660938551f,0.9388049677540464266201f,0.3835650562588603929015f,\ +0.5520782622396902539208f,0.4620041004215187374626f,0.753968196415999991622f,\ +0.6156379639362553612969f,0.9496353272389349564620f,0.8339637612267859489990f,\ +0.7959636817154828181131f,0.5275172507857687209665f,0.5514044508846071002139f,\ +0.6441142487726253529345f,0.8328463321559912424519f,1.0637408773050947008443f,\ +1.0155667426713801404503f,0.2709318224164963262446f,0.7917869572241151843173f,\ +0.8571412685012261833961f,0.8071256937996567071281f,0.7881067116954072471202f,\ +0.7201105910271731191941f,0.4974916923152819525633f,0.9550562531126176590846f,\ +0.8512952675658871370956f,0.7682506551752034118508f,0.9526163214553304836585f,\ +0.756785792150606484441f,0.5821581994240766499971f,0.8807562498788572558084f,\ +0.9178011959841433364815f,0.8384018774833429388238f,0.9005192643641398708709f,\ +1.0365709563884744071061f,0.9040270806600297914812f,1.0053433947417824700921f,\ +1.0186506185399304413863f,0.6220542372412505294221f,0.9288207542994831866778f,\ +0.7707938959111726440199f,0.63603233719709606486f,0.6441295538205468185211f,\ +0.7370617546735380720691f,1.0024537010421461502574f,1.0505138587196660715506f,\ +0.953608813532313304151f,0.7187463572209089601728f,0.7428380749761755996730f,\ +0.9266208094400342210051f,0.8841784551932333480195f,0.9840672842877067338918f,\ +0.9382321956452510658409f,0.8393030146072417707615f,0.8503757458476615127552f,\ +0.7145712412765103938028f,0.5826505086380492359766f,0.9155742917376128442442f,\ +0.8739880489156448550858f,0.8470155698847267045082f,0.9650636753683585755681f,\ +0.7314820521682621201620f,0.8914470068047345430173f,0.8031939281911506522960f,\ +0.5070351579739499348065f,0.7331953647718203459505f,0.9609459795569127438242f,\ +0.847153172323739211969f,0.7661900708888577105071f,0.9519994233321562582262f,\ +0.5940854373891888418058f,0.8888500969738630796968f,0.6766367900740852814323f,\ +0.8139959478095014633325f,0.9760840415848224260742f,1.0729430743093604228022f,\ +0.8617604247210989276695f,0.6907515785500089045002f,1.0470820008330794514961f,\ +0.7605256422767727730872f,0.8272295000550387022997f,0.6269868176753693456149f,\ +0.9734363297756469801669f,0.2617213661737881613689f,0.6805441931353264362059f,\ +0.709837674958288866733f,0.8069322418000910435154f,0.6852606023040614946496f,\ +0.6540897892889659948068f,0.7186585042731442607433f,0.6343284289266235553839f,\ +0.6825711485307393022737f,0.610883282746898181870f,0.7163489185444231743816f,\ +0.9770189769897136278232f,0.5867956626396594321804f,1.0750765659376522176416f,\ +0.6384005820717564283484f,0.3858687639762184984349f,0.3186007968636310749844f,\ +0.7397471191545493818254f,0.7055161810773808994668f,0.5968318319385850223569f,\ +0.5659466952073320955563f,1.0001490762521170196919f,0.7645570771657418385203f,\ +0.7377545989844320750706f,0.9516433749813681952645f,0.6866306949128065939547f,\ +1.0618728756326238915619f,0.5208322311777507929165f,0.6253215357738258761700f,\ +0.4548702015131091402900f,0.6499645432009629741899f,0.9907517258725765385563f,\ +0.9119111641770327736367f,0.7823013339720715775272f,0.9622054437069111898495f,\ +0.4500082630180006204590f,0.5764937377448445809947f,0.9818886833563331695274f,\ +0.6678434466414240322507f,1.0365982590716655842300f,0.4743068831608843738401f,\ +0.3802074434441635730764f,0.8040992937118037753308f,0.7973759350671048018455f,\ +0.7498672536100723373664f,0.7320754444197923316295f,0.7445011903920762952325f,\ +0.8914147503382092718738f,0.6264212402370327170686f,0.7540169824914779717062f,\ +0.8776882812655947274649f,0.9844634271419567816963f,0.6638769890354155878143f,\ +0.9458113966252766902088f,0.5131381594621587938221f,0.8518664381177757372043f,\ +0.812738510298055549796f,0.4535385196962208320670f,0.9669683162928227604382f,\ +1.040816644093084830658f,0.4316950876741513232204f,0.8660041994184899394327f,\ +0.9321942634710010944232f,0.6397933456564963705660f} + +#define CRESULTI {0.3263261982366231217512f,0.3357016264078308553920f,0.5625695149136477057894f,\ +0.4083475049199193351868f,0.2184722473340149073717f,0.1963327431456096394680f,\ +0.2524080275917597870894f,0.5853888978723345015709f,0.6614285891378552939557f,\ +0.5503716236174250875379f,0.4340417579628489397337f,0.5691216233293430182272f,\ +0.5152745668080026542057f,0.0097333750513688352402f,0.5491507438051371758903f,\ +0.3063310306018693363050f,0.1617182509817773616856f,0.3162436265422815528936f,\ +0.5147040404416135528365f,0.0167233791158154128376f,0.1662985694996903240917f,\ +0.4205606470816827258119f,0.4901820135407665146587f,0.4294486162653968763792f,\ +0.0728126817040040535955f,0.4473105496989639440209f,0.6637966234200971538115f,\ +0.1811203866159907804878f,0.2900944639504645650163f,0.3839508177567231839156f,\ +0.3488856874362309956617f,0.0988580458466166156484f,0.36794821735938526563f,\ +0.3663418129703439607425f,0.1414440314101028384197f,0.4830310461641617592044f,\ +0.1323559272370566086696f,0.1075347714236491863948f,0.1691821287725076283781f,\ +0.2810338004872128814249f,0.5768683871779194394236f,0.4480389811753019424501f,\ +0.5764461773381487352808f,0.0760084144919923321293f,0.5032733679892044120763f,\ +0.2741647566958217985267f,0.0089035245651246392590f,0.3994776154055512673580f,\ +0.1897607024294587774183f,0.1206637982137782894032f,0.5412770094909528095784f,\ +0.2404690476392074838241f,0.2181535914362372208242f,0.5377337924125580315149f,\ +0.2155582732432577419690f,0.3687913267931641758679f,0.1778256377212544814270f,\ +0.4920751198642726587096f,0.3546066849097115891709f,0.1330846352869425042176f,\ +0.4091125411822805202355f,0.2612879326286920989020f,0.5393616451432939884469f,\ +0.5878226164089255245671f,0.3213486447830481429477f,0.5467089832022555828672f,\ +0.3224195659455129092663f,0.1825954124653428600755f,0.3990552600779624370375f,\ +0.2206681056892876025000f,0.1667943253834255346035f,0.4661703075143642238665f,\ +0.1557268144037805002178f,0.5095982399018667008406f,0.2528705265313027639174f,\ +0.6797078130539779827757f,0.3056564645363825660773f,0.0347369736586594715644f,\ +0.3916242993690946527785f,0.4912984601114738780758f,0.1009080702371304705256f,\ +0.5247714720741629701450f,0.4792854332576366727f,0.1144484422667324668987f,\ +0.4288220783749939757357f,0.0569809815370433195292f,0.36777102554791152311f,\ +0.4171776516254488420543f,0.3878789385171945158781f,0.3986227007920866149959f,\ +0.4484209706404114204048f,0.5077720388168175391641f,0.5031527077021280547342f,\ +0.5940468527088033079409f,0.0401196609964555792049f,0.3361101426509159328937f,\ +0.6594999296529031607150f,0.3990961397296745039043f,0.4022917642620268408038f,\ +0.0320112843801534235899f,0.5682183459163515637513f,0.1414347799783703119037f,\ +0.1648707746240843652341f,0.5352546490793753664050f,0.470990570471244762718f,\ +0.4123594778064457178068f,0.3511234154134331153507f,0.1398027400878979753518f,\ +0.3687207284066310042370f,0.0066543882936226537647f,0.4539069906010949617681f,\ +0.0153616286808277956177f,0.1529597971009351853322f,0.2404648554390081682808f,\ +0.4168838721023755411466f,0.0368475258068726510552f,0.4025685317176705413367f,\ +0.1004402255189763004672f,0.1870378561196294198155f,0.4247235900050622126045f,\ +0.1981784628926891167478f,0.3110123830424602608957f,0.4432796815388754252396f,\ +0.1502372000465193591090f,0.3293933175156303350128f,0.6226562035634579661547f,\ +0.4335923272125510874453f,0.3788924267318253269465f,0.4544252728163645227433f,\ +0.4413447883722416142938f,0.5962122022024949341557f,0.4244949294494160807467f,\ +0.5233339844701030418861f,0.1844970592543655196760f,0.5425403272492764772395f,\ +0.3293523059298621991076f,0.1887977324286261304742f,0.3419695936679567616068f,\ +0.4729933970782203567218f,0.3179389135603382654516f,0.6298017886863316316948f,\ +0.6366327153805051430879f,0.1174393569255921254690f,0.2334182851178558948391f,\ +0.1898326398721546515169f,0.1392118774041107009953f,0.6783676670817878617825f,\ +0.0355768720222523482377f,0.4001589607861217867679f,0.4438842647772449079291f,\ +0.2881695442233370707541f,0.3853535740764292283345f,0.0651773014834273051177f,\ +0.330676282333628224208f,0.3665111238554681349910f,0.2961355479495680342872f,\ +0.2080043831343482141350f,0.3389124718789456314205f,0.2507682074527933790975f,\ +0.2151359545279972751430f,0.1795904033249649811577f,0.0389989482113152971521f,\ +0.4372272948094740319114f,0.3708152364207700224519f,0.3460997943417740696503f,\ +0.1738040295127169787559f,0.6067346706520863053314f,0.3759164722454063634061f,\ +0.2843476954448227456140f,0.5529633038042787163136f,0.0792158430677229186134f,\ +0.2658590818355930918138f,0.4997084504683915184842f,0.3766089999954101985580f,\ +0.0436608774416314404654f,0.3358357438535300443228f,0.4433991668140928599229f,\ +0.0369743604678396259322f,0.5169293158173903224295f,0.1463149302341813229322f,\ +0.5911631132684145306655f,0.2559015919459735610708f,0.5887924030165481159571f,\ +0.2258812650827625445604f,0.2307020058304501131108f,0.5661961730855942231955f,\ +0.3133100513489369687292f,0.2604774274143707435414f,0.4760737048049700770314f,\ +0.2202097738273190163927f,0.3135385365979036498274f,0.5703576069745146526202f,\ +0.3290309478154280209417f,0.3766593161719967164380f,0.4946018916047810187742f,\ +0.4780382426469301782035f,0.3964469578199069088598f,0.4544192798538850830425f,\ +0.4952896438554572622337f,0.4094267669310915347403f} + + + + +void ssqrtsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=ssqrts(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-7); + } +} + +void csqrtsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=csqrts(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void ssqrtaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i,j; + j=1; + ssqrta(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void csqrtaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + csqrta(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testSqrt() { + printf("\n>>>> Float Square Root Tests\n"); + ssqrtsTest(); + csqrtsTest(); + ssqrtaTest(); + csqrtaTest(); + + return 0; +} + +int main() { + assert(testSqrt() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/testSqrt.h b/2.3-1/src/c/elementaryFunctions/sqrt/testSqrt.h new file mode 100644 index 00000000..8262de7c --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/testSqrt.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTSQRT_H_ +#define _TESTSQRT_H_ + +#include +#include +#include +#include "sqrt.h" +#include "constant.h" + +void ssqrtsTest(void); + +void ssqrtaTest(void); + +void dsqrtsTest(void); + +void dsqrtaTest(void); + +void csqrtsTest(void); + +void csqrtaTest(void); + +void zsqrtsTest(void); + +void zsqrtaTest(void); + +int testSqrt(void); + +#endif /* !_TESTSQRT_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/zsqrta.c b/2.3-1/src/c/elementaryFunctions/sqrt/zsqrta.c new file mode 100644 index 00000000..b6472951 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/zsqrta.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sqrt.h" + +void zsqrta(doubleComplex* in, int size, doubleComplex* out) { + int i = 0; + for (i = 0 ; i < size ; ++i) { + out[i] = zsqrts(in[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/sqrt/zsqrts.c b/2.3-1/src/c/elementaryFunctions/sqrt/zsqrts.c new file mode 100644 index 00000000..3637ddd6 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/sqrt/zsqrts.c @@ -0,0 +1,111 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include "sqrt.h" +#include "lapack.h" +#include "abs.h" +#include "sign.h" +#include "pythag.h" + +#ifdef _MSC_VER +#include +#define isnan(x) _isnan((double)x) +#endif + +#define _sign(a, b) b >=0 ? a : -a + +doubleComplex zsqrts(doubleComplex in) { + double RMax = getOverflowThreshold(); + double BRMin = 2 * getUnderflowThreshold(); + + double RealIn = zreals(in); + double ImgIn = zimags(in); + + double RealOut = 0; + double ImgOut = 0; + + if(RealIn == 0) + {/* pure imaginary case */ + if(dabss(ImgIn >= BRMin)) + RealOut = dsqrts(0.5 * dabss(ImgIn)); + else + RealOut = dsqrts(dabss(ImgIn)) * dsqrts(0.5); + + ImgOut = _sign(1, ImgIn) * RealOut; + } + else if( dabss(RealIn) <= RMax && dabss(ImgIn) <= RMax) + {/* standard case : a (not zero) and b are finite */ + double Temp = dsqrts(2 * (dabss(RealIn) + dpythags(RealIn, ImgIn))); + /* overflow test */ + if(Temp > RMax) + {/* handle (spurious) overflow by scaling a and b */ + double RealTemp = RealIn / 16; + double ImgTemp = ImgIn / 16; + Temp = dsqrts(2 * (dabss(RealIn) + dpythags(RealIn, ImgTemp))); + if(RealTemp >= 0) + { + RealOut = 2 * Temp; + ImgOut = 4 * ImgTemp / Temp; + } + else + { + RealOut = 4 * dabss(ImgIn) / Temp; + ImgOut = _sign(2, ImgIn) * Temp; + } + } + else if(RealIn >= 0) /* classic switch to get the stable formulas */ + { + RealOut = 0.5 * Temp; + ImgOut = ImgIn / Temp; + } + else + { + RealOut = dabss(ImgIn) / Temp; + ImgOut = (_sign(0.5, ImgIn)) * Temp; + } + } + else + { + /* + //Here we treat the special cases where a and b are +- 00 or NaN. + //The following is the treatment recommended by the C99 standard + //with the simplification of returning NaN + i NaN if the + //the real part or the imaginary part is NaN (C99 recommends + //something more complicated) + */ + + if(isnan(RealIn) == 1 || isnan(ImgIn) == 1) + {/* got NaN + i NaN */ + RealOut = RealIn + ImgIn; + ImgOut = RealOut; + } + else if( dabss(ImgIn) > RMax) + {/* case a +- i oo -> result must be +oo +- i oo for all a (finite or not) */ + RealOut = dabss(ImgIn); + ImgOut = ImgIn; + } + else if(RealIn < -RMax) + {/* here a is -Inf and b is finite */ + RealOut = 0; + ImgOut = _sign(1, ImgIn) * dabss(RealIn); + } + else + {/* here a is +Inf and b is finite */ + RealOut = RealIn; + ImgOut = 0; + } + } + + return DoubleComplex(RealOut, ImgOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/Makefile.am b/2.3-1/src/c/elementaryFunctions/tan/Makefile.am new file mode 100644 index 00000000..71fc0112 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/Makefile.am @@ -0,0 +1,73 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libTan_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libTan.la + +libTan_la_SOURCES = $(HEAD) $(SRC) + +SRC = stans.c \ + dtans.c \ + ctans.c \ + ztans.c \ + stana.c \ + dtana.c \ + ctana.c \ + ztana.c + +HEAD = ../includes/tan.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatTan testDoubleTan + +TESTS = testFloatTan testDoubleTan + +# +# -*- Tangeant Tests -*- +# +testFloatTan_SOURCES = testTan.h testFloatTan.c +testFloatTan_CFLAGS = $(check_INCLUDES) -g +testFloatTan_LDADD = $(check_LDADD) + +testDoubleTan_SOURCES = testTan.h testDoubleTan.c +testDoubleTan_CFLAGS = $(check_INCLUDES) -g +testDoubleTan_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/tan/Makefile.in b/2.3-1/src/c/elementaryFunctions/tan/Makefile.in new file mode 100644 index 00000000..01d6aecf --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/Makefile.in @@ -0,0 +1,818 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatTan$(EXEEXT) testDoubleTan$(EXEEXT) +TESTS = testFloatTan$(EXEEXT) testDoubleTan$(EXEEXT) +subdir = src/c/elementaryFunctions/tan +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libTan_la_LIBADD = +am__objects_1 = +am__objects_2 = libTan_la-stans.lo libTan_la-dtans.lo \ + libTan_la-ctans.lo libTan_la-ztans.lo libTan_la-stana.lo \ + libTan_la-dtana.lo libTan_la-ctana.lo libTan_la-ztana.lo +am_libTan_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libTan_la_OBJECTS = $(am_libTan_la_OBJECTS) +libTan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libTan_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleTan_OBJECTS = testDoubleTan-testDoubleTan.$(OBJEXT) +testDoubleTan_OBJECTS = $(am_testDoubleTan_OBJECTS) +am__DEPENDENCIES_1 = \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleTan_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleTan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleTan_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatTan_OBJECTS = testFloatTan-testFloatTan.$(OBJEXT) +testFloatTan_OBJECTS = $(am_testFloatTan_OBJECTS) +testFloatTan_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatTan_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatTan_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libTan_la_SOURCES) $(testDoubleTan_SOURCES) \ + $(testFloatTan_SOURCES) +DIST_SOURCES = $(libTan_la_SOURCES) $(testDoubleTan_SOURCES) \ + $(testFloatTan_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libTan_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libTan.la +libTan_la_SOURCES = $(HEAD) $(SRC) +SRC = stans.c \ + dtans.c \ + ctans.c \ + ztans.c \ + stana.c \ + dtana.c \ + ctana.c \ + ztana.c + +HEAD = ../includes/tan.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Tangeant Tests -*- +# +testFloatTan_SOURCES = testTan.h testFloatTan.c +testFloatTan_CFLAGS = $(check_INCLUDES) -g +testFloatTan_LDADD = $(check_LDADD) +testDoubleTan_SOURCES = testTan.h testDoubleTan.c +testDoubleTan_CFLAGS = $(check_INCLUDES) -g +testDoubleTan_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/tan/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/tan/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libTan.la: $(libTan_la_OBJECTS) $(libTan_la_DEPENDENCIES) + $(libTan_la_LINK) -rpath $(pkglibdir) $(libTan_la_OBJECTS) $(libTan_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleTan$(EXEEXT): $(testDoubleTan_OBJECTS) $(testDoubleTan_DEPENDENCIES) + @rm -f testDoubleTan$(EXEEXT) + $(testDoubleTan_LINK) $(testDoubleTan_OBJECTS) $(testDoubleTan_LDADD) $(LIBS) +testFloatTan$(EXEEXT): $(testFloatTan_OBJECTS) $(testFloatTan_DEPENDENCIES) + @rm -f testFloatTan$(EXEEXT) + $(testFloatTan_LINK) $(testFloatTan_OBJECTS) $(testFloatTan_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ctana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ctans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-dtana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-dtans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-stana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-stans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ztana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTan_la-ztans.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleTan-testDoubleTan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatTan-testFloatTan.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libTan_la-stans.lo: stans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-stans.lo -MD -MP -MF $(DEPDIR)/libTan_la-stans.Tpo -c -o libTan_la-stans.lo `test -f 'stans.c' || echo '$(srcdir)/'`stans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-stans.Tpo $(DEPDIR)/libTan_la-stans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stans.c' object='libTan_la-stans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-stans.lo `test -f 'stans.c' || echo '$(srcdir)/'`stans.c + +libTan_la-dtans.lo: dtans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-dtans.lo -MD -MP -MF $(DEPDIR)/libTan_la-dtans.Tpo -c -o libTan_la-dtans.lo `test -f 'dtans.c' || echo '$(srcdir)/'`dtans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-dtans.Tpo $(DEPDIR)/libTan_la-dtans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtans.c' object='libTan_la-dtans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-dtans.lo `test -f 'dtans.c' || echo '$(srcdir)/'`dtans.c + +libTan_la-ctans.lo: ctans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-ctans.lo -MD -MP -MF $(DEPDIR)/libTan_la-ctans.Tpo -c -o libTan_la-ctans.lo `test -f 'ctans.c' || echo '$(srcdir)/'`ctans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-ctans.Tpo $(DEPDIR)/libTan_la-ctans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctans.c' object='libTan_la-ctans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-ctans.lo `test -f 'ctans.c' || echo '$(srcdir)/'`ctans.c + +libTan_la-ztans.lo: ztans.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-ztans.lo -MD -MP -MF $(DEPDIR)/libTan_la-ztans.Tpo -c -o libTan_la-ztans.lo `test -f 'ztans.c' || echo '$(srcdir)/'`ztans.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-ztans.Tpo $(DEPDIR)/libTan_la-ztans.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztans.c' object='libTan_la-ztans.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-ztans.lo `test -f 'ztans.c' || echo '$(srcdir)/'`ztans.c + +libTan_la-stana.lo: stana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-stana.lo -MD -MP -MF $(DEPDIR)/libTan_la-stana.Tpo -c -o libTan_la-stana.lo `test -f 'stana.c' || echo '$(srcdir)/'`stana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-stana.Tpo $(DEPDIR)/libTan_la-stana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stana.c' object='libTan_la-stana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-stana.lo `test -f 'stana.c' || echo '$(srcdir)/'`stana.c + +libTan_la-dtana.lo: dtana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-dtana.lo -MD -MP -MF $(DEPDIR)/libTan_la-dtana.Tpo -c -o libTan_la-dtana.lo `test -f 'dtana.c' || echo '$(srcdir)/'`dtana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-dtana.Tpo $(DEPDIR)/libTan_la-dtana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtana.c' object='libTan_la-dtana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-dtana.lo `test -f 'dtana.c' || echo '$(srcdir)/'`dtana.c + +libTan_la-ctana.lo: ctana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-ctana.lo -MD -MP -MF $(DEPDIR)/libTan_la-ctana.Tpo -c -o libTan_la-ctana.lo `test -f 'ctana.c' || echo '$(srcdir)/'`ctana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-ctana.Tpo $(DEPDIR)/libTan_la-ctana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctana.c' object='libTan_la-ctana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-ctana.lo `test -f 'ctana.c' || echo '$(srcdir)/'`ctana.c + +libTan_la-ztana.lo: ztana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -MT libTan_la-ztana.lo -MD -MP -MF $(DEPDIR)/libTan_la-ztana.Tpo -c -o libTan_la-ztana.lo `test -f 'ztana.c' || echo '$(srcdir)/'`ztana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTan_la-ztana.Tpo $(DEPDIR)/libTan_la-ztana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztana.c' object='libTan_la-ztana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTan_la_CFLAGS) $(CFLAGS) -c -o libTan_la-ztana.lo `test -f 'ztana.c' || echo '$(srcdir)/'`ztana.c + +testDoubleTan-testDoubleTan.o: testDoubleTan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -MT testDoubleTan-testDoubleTan.o -MD -MP -MF $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo -c -o testDoubleTan-testDoubleTan.o `test -f 'testDoubleTan.c' || echo '$(srcdir)/'`testDoubleTan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo $(DEPDIR)/testDoubleTan-testDoubleTan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTan.c' object='testDoubleTan-testDoubleTan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -c -o testDoubleTan-testDoubleTan.o `test -f 'testDoubleTan.c' || echo '$(srcdir)/'`testDoubleTan.c + +testDoubleTan-testDoubleTan.obj: testDoubleTan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -MT testDoubleTan-testDoubleTan.obj -MD -MP -MF $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo -c -o testDoubleTan-testDoubleTan.obj `if test -f 'testDoubleTan.c'; then $(CYGPATH_W) 'testDoubleTan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleTan-testDoubleTan.Tpo $(DEPDIR)/testDoubleTan-testDoubleTan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTan.c' object='testDoubleTan-testDoubleTan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTan_CFLAGS) $(CFLAGS) -c -o testDoubleTan-testDoubleTan.obj `if test -f 'testDoubleTan.c'; then $(CYGPATH_W) 'testDoubleTan.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTan.c'; fi` + +testFloatTan-testFloatTan.o: testFloatTan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -MT testFloatTan-testFloatTan.o -MD -MP -MF $(DEPDIR)/testFloatTan-testFloatTan.Tpo -c -o testFloatTan-testFloatTan.o `test -f 'testFloatTan.c' || echo '$(srcdir)/'`testFloatTan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatTan-testFloatTan.Tpo $(DEPDIR)/testFloatTan-testFloatTan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTan.c' object='testFloatTan-testFloatTan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -c -o testFloatTan-testFloatTan.o `test -f 'testFloatTan.c' || echo '$(srcdir)/'`testFloatTan.c + +testFloatTan-testFloatTan.obj: testFloatTan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -MT testFloatTan-testFloatTan.obj -MD -MP -MF $(DEPDIR)/testFloatTan-testFloatTan.Tpo -c -o testFloatTan-testFloatTan.obj `if test -f 'testFloatTan.c'; then $(CYGPATH_W) 'testFloatTan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatTan-testFloatTan.Tpo $(DEPDIR)/testFloatTan-testFloatTan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTan.c' object='testFloatTan-testFloatTan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTan_CFLAGS) $(CFLAGS) -c -o testFloatTan-testFloatTan.obj `if test -f 'testFloatTan.c'; then $(CYGPATH_W) 'testFloatTan.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTan.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/tan/ctana.c b/2.3-1/src/c/elementaryFunctions/tan/ctana.c new file mode 100644 index 00000000..731407ee --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/ctana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tan.h" + +void ctana(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ctans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/ctans.c b/2.3-1/src/c/elementaryFunctions/tan/ctans.c new file mode 100644 index 00000000..9a6bd8c1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/ctans.c @@ -0,0 +1,45 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "lapack.h" +#include "tan.h" +#include "sqrt.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" +#include "log.h" +#include "abs.h" + +#define localSign(x) x >= 0 ? 1.0f : -1.0f + +floatComplex ctans(floatComplex z) { + float Temp = 0.0f; + float Lim = 1.0f + slogs(2.0f / ssqrts((float) getRelativeMachinePrecision())); + float RealIn = creals(z); + float ImagIn = cimags(z); + float RealOut = 0.0f; + float ImagOut = 0.0f; + + Temp = powf(scoss(RealIn), 2.0f) + powf(ssinhs(ImagIn), 2.0f); + RealOut = 0.5f * ssins(2 * RealIn) / Temp; + if(sabss(ImagIn) < Lim) + { + ImagOut = 0.5f * ssinhs(2.0f * ImagIn) / Temp; + } + else + { + ImagOut = localSign(ImagIn); + } + + return FloatComplex(RealOut, ImagOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/dtana.c b/2.3-1/src/c/elementaryFunctions/tan/dtana.c new file mode 100644 index 00000000..8a5f4f68 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/dtana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tan.h" + +void dtana(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dtans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/dtans.c b/2.3-1/src/c/elementaryFunctions/tan/dtans.c new file mode 100644 index 00000000..888a2dae --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/dtans.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "tan.h" + +double dtans(double x) { + return tan(x); +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/stana.c b/2.3-1/src/c/elementaryFunctions/tan/stana.c new file mode 100644 index 00000000..c228afe1 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/stana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tan.h" + +void stana(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = stans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/stans.c b/2.3-1/src/c/elementaryFunctions/tan/stans.c new file mode 100644 index 00000000..436c32e4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/stans.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "tan.h" + +float stans(float x) { + return (tanf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/testDoubleTan.c b/2.3-1/src/c/elementaryFunctions/tan/testDoubleTan.c new file mode 100644 index 00000000..33c791d5 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/testDoubleTan.c @@ -0,0 +1,497 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testTan.h" + +#define SOURCE {0.7062616096809506416321,0.4090520101599395275116,0.3011248558759689331055,\ +0.1880126395262777805328,0.1796709178015589714050,0.2828889950178563594818,\ +0.7232380937784910202026,0.7360379849560558795929,0.1852612206712365150452,\ +0.7703790138475596904755,0.1914967410266399383545,0.7521587223745882511139,\ +0.6205883463844656944275,0.2807604051195085048676,0.2289868686348199844360,\ +0.5049233403988182544708,0.8354099662974476814270,0.8174716415815055370331,\ +0.0030740275979042053223,0.3677616142667829990387,0.8278525872156023979187,\ +0.72754097869619727135,0.5323124285787343978882,0.9267726917751133441925,\ +0.9542504185810685157776,0.3162104780785739421845,0.5789009965956211090088,\ +0.6881225542165338993073,0.3714061146602034568787,0.1705444059334695339203,\ +0.1954363007098436355591,0.978800852317363023758,0.9300233917310833930969,\ +0.5357720064930617809296,0.3947123587131500244141,0.1344871171750128269196,\ +0.7380615202710032463074,0.588114650454372167587,0.9113173168152570724487,\ +0.5682763461954891681671,0.1127616921439766883850,0.9478473584167659282684,\ +0.5237770043313503265381,0.8140139640308916568756,0.1400952627882361412048,\ +0.2763446993194520473480,0.9059953633695840835571,0.1379901585169136524200,\ +0.5603838684037327766419,0.3008610638789832592011,0.4767417535185813904,\ +0.8127435916103422641754,0.1988414181396365165710,0.1107953130267560482025,\ +0.2159351315349340438843,0.6467244853265583515167,0.6597879612818360328674,\ +0.0691898013465106487274,0.9164751060307025909424,0.8635670826770365238190,\ +0.5032854294404387474060,0.1832137755118310451508,0.8403698671609163284302,\ +0.9247214836068451404572,0.6229452537372708320618,0.2773811477236449718475,\ +0.2479109913110733032227,0.3891948559321463108063,0.0436578569933772087097,\ +0.8132526441477239131928,0.7686451207846403121948,0.4041520212776958942413,\ +0.8579940209165215492249,0.6993723283521831035614,0.0828925184905529022217,\ +0.9201254160143435001373,0.5200281282886862754822,0.9351884997449815273285,\ +0.8825624976307153701782,0.2245844271965324878693,0.2153332801535725593567,\ +0.4327089670114219188690,0.5800157263875007629395,0.8876141034997999668121,\ +0.5258982880041003227234,0.859640696551650762558,0.7337234076112508773804,\ +0.7134532411582767963409,0.1087165409699082374573,0.8477638359181582927704,\ +0.6594733335077762603760,0.7916418449021875858307,0.6067967480048537254334,\ +0.4102901122532784938812,0.1958728153258562088013,0.241527963895350694656,\ +0.5113455550745129585266,0.9119556057266891002655,0.0928984880447387695313,\ +0.7438839026726782321930,0.1938720373436808586121,0.4355978979729115962982,\ +0.9922429900616407394409,0.4533818070776760578156,0.8269640663638710975647,\ +0.8889675955288112163544,0.4682085178792476654053,0.3856786251999437808991,\ +0.4124865522608160972595,0.6955242282710969448090,0.0978972557932138442993,\ +0.8728604433126747608185,0.6359515609219670295715,0.4129665228538215160370,\ +0.0294486805796623229980,0.1809961968101561069489,0.7658103061839938163757,\ +0.1232470511458814144135,0.0170737411826848983765,0.8835507561452686786652,\ +0.3164170170202851295471,0.9378212536685168743134,0.3916359134018421173096,\ +0.0844073877669870853424,0.6934146797284483909607,0.4618808380328118801117,\ +0.9355291295796632766724,0.0842495900578796863556,0.5402926551178097724915,\ +0.5613215523771941661835,0.1306025832891464233398,0.5840523042716085910797,\ +0.0048661706969141960144,0.2761953338049352169037,0.7478824090212583541870,\ +0.0194325004704296588898,0.6444276878610253334045,0.2243968318216502666473,\ +0.2478402368724346160889,0.1196091384626924991608,0.1883201440796256065369,\ +0.3393343067727982997894,0.959958622232079505920,0.2847225037403404712677,\ +0.8766820700839161872864,0.2853349032811820507050,0.5103433504700660705566,\ +0.8752629184164106845856,0.5941145820543169975281,0.3945342986844480037689,\ +0.4661326166242361068726,0.0073588271625339984894,0.5170202488079667091370,\ +0.4690007264725863933563,0.6654530800879001617432,0.9476742581464350223541,\ +0.4933638339862227439880,0.2918433747254312038422,0.2016727942973375320435,\ +0.7016656589694321155548,0.8736049132421612739563,0.191055159550160169601,\ +0.5307010114192962646484,0.8889481076039373874664,0.0115523664280772209167,\ +0.4998398735187947750092,0.6700848620384931564331,0.4995208983309566974640,\ +0.1538907447829842567444,0.2571737091057002544403,0.9586529098451137542725,\ +0.6246025026775896549225,0.9371285131201148033142,0.9923511571250855922699,\ +0.3454555813223123550415,0.7558249053545296192169,0.2107181670144200325012,\ +0.9372652801685035228729,0.6767524704337120056152,0.7465373151935636997223,\ +0.4050982249900698661804,0.5101723610423505306244,0.9497965183109045028687,\ +0.0289692510850727558136,0.1634070957079529762268,0.4146909262053668498993,\ +0.0021650679409503936768,0.1810030029155313968658,0.4556188201531767845154,\ +0.1977851442061364650726,0.6053877938538789749146,0.4363054675050079822540,\ +0.8938506888225674629211,0.6104825991205871105194,0.4316215068101882934570,\ +0.2315693595446646213532,0.4675927339121699333191,0.6150764389894902706146,\ +0.8621218334883451461792,0.3846137975342571735382} + +#define RESULT {0.8530491813252144561730,0.4335045992710032103368,0.3105691712500722179158,\ +0.1902597554084684006170,0.1816295703181560194928,0.2906848138476661458363,\ +0.8828132281173867168533,0.9058504084575731418738,0.1874102230574337113467,\ +0.9704039825071290037428,0.193872386487773856745,0.9356368085981127125095,\ +0.7147975865621483126944,0.2883777870673323029394,0.233074941053011769343,\ +0.5527124758136455762170,1.1053818146408691536209,1.0662960354617996294735,\ +0.0030740372807646679752,0.3852902674825339213172,1.0887291048642380175693,\ +0.8904988483295813717078,0.589027514944382324380,1.3318828819928720808008,\ +1.4110197782284186196478,0.3271889768526293207351,0.6535988324182537834162,\ +0.8221846610900451768345,0.3894816929387301396304,0.1722173220386573888607,\ +0.1979631660252146874157,1.4871003608159341080608,1.3409392796872054987034,\ +0.5936969391438152721108,0.4165742349308056979851,0.1353038396146245825324,\ +0.9095411562053630216695,0.666828524289825752547,1.2898724607003566600127,\ +0.6385394321030002373618,0.1132420646312260748001,1.3920395973271377787484,\ +0.5775879319584731330650,1.058934135979150648055,0.141019050913288951365,\ +0.2836009152345423944830,1.2757925164705434806223,0.1388727177433937698403,\ +0.6274844177211460483079,0.3102799593553379198241,0.5164764951302321938087,\ +1.0562428612021228513385,0.2015041286208432702587,0.1112509099475587071026,\ +0.2193551393571971375174,0.7550487488328985197228,0.7757652108685924030596,\ +0.0693004223106622879724,1.3037037706937266712259,1.1699705921283873877314,\ +0.550576129776577216646,0.1852916762694652719201,1.1164629082914852009623,\ +1.3262085052804502005586,0.7183647379901514362643,0.2847210542962326229599,\ +0.2531178933037822043062,0.4101140401836267934677,0.0436856155719798008863,\ +1.0573204171612526902635,0.9670429620877326604145,0.4276960657258361830913,\ +1.156854335998896532445,0.8412159741625684361566,0.0830828979444599852178,\ +1.3136054718047147638060,0.5725991803557812787062,1.355492790615370424234,\ +1.2159959299593459114419,0.2284380696339281535678,0.2187244120791704826701,\ +0.4619038629088654257515,0.6551909258647544698206,1.228594570395200147317,\ +0.5804203670779729540286,1.1607121297665823345113,0.9016453790519162181383,\ +0.8655510240366158791758,0.1091468929729377396187,1.133211951033040509884,\ +0.7752613593928633362040,1.0125659843026109108166,0.6941614960626277808231,\ +0.4349761638068749824981,0.1984168266250701806452,0.2463367776963759914199,\ +0.5611266025781723732,1.2915741173940875619053,0.0931666557927946503703,\ +0.9202369550199469561136,0.1963381019951347117303,0.4654138557801037467954,\ +1.531152598161082067918,0.4872328317068129743817,1.0867892686527245160732,\ +1.231996743210198141938,0.5057142067082607272965,0.4060123002390389479466,\ +0.4375906817398340642455,0.8346659585500807443381,0.0982112043307575288686,\ +1.1922276352973026902760,0.7382700256000707117465,0.4381626799731911381386,\ +0.0294571964089862109448,0.1829988997674065476229,0.9615720911131384607273,\ +0.1238749003414561927761,0.0170754004466078072866,1.2184484210758381728112,\ +0.3274176417863428056876,1.3629896342945482246023,0.4129685310508503515159,\ +0.0846084171803287293789,0.8310930423770829245100,0.4977934831990530883950,\ +1.3564597268158093967827,0.0844494919835185042789,0.5998275037194918946071,\ +0.6287920720664262885791,0.1313502491565903540494,0.6609756367352789263592,\ +0.0048662091069645377339,0.2834395431640467921675,0.9276488528261589427970,\ +0.0194349468870056892034,0.7514487870197579244547,0.2282406932471093830017,\ +0.2530426070707028074480,0.1201828114589197499251,0.1905784099029704803385,\ +0.352988062986135442411,1.428231701456014857143,0.2926743123472941854324,\ +1.2015237487616485800856,0.2933392882321691486069,0.5598095809652490206787,\ +1.1980617264883439698764,0.6755313107918682336006,0.4163652909127465440164,\ +0.5031101302799753094419,0.0073589599979746594949,0.5686119631638693050491,\ +0.5067094190821778143530,0.7848798186452353720100,1.391531190313842980544,\ +0.5377167840923406938458,0.3004214213647905529214,0.2044521595617958820146,\ +0.8451397437154636316237,1.1940319015577840477960,0.1934142466999154985619,\ +0.5868590674474564172769,1.2319476773796440571829,0.0115528803708900857511,\ +0.5460945923736312268559,0.792392311128046200608,0.5456805647330320585553,\ +0.1551171962759635702955,0.2629975069837691137309,1.4242699230594764170377,\ +0.7208802037485926295091,1.3610118285291581408103,1.5315144150725372718114,\ +0.3598870449025589057790,0.9425361247426047306419,0.2138933525822492576207,\ +1.3614020090881830959972,0.8033042279594378998198,0.925149379458894971506,\ +0.4288158062140490778269,0.5595850272060393093554,1.397781375537582970736,\ +0.0289773576405878592610,0.1648772252909011803990,0.4402197018088547242343,\ +0.0021650713238892428658,0.1830059338084651376910,0.4900039273308094966986,\ +0.2004051993228692374327,0.6920756616600035604492,0.4662749757103929471036,\ +1.244365984627544330365,0.6996374475054760733173,0.4605850493651166277509,\ +0.2357993689411847226811,0.5049411785573922895054,0.7065020490746397596737,\ +1.16655281751026174142,0.4047724755535024310227} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} + +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZRESULTR {0.4622549506274005182149,0.52703543104286754151,0.1827556517526441881572,\ +0.3854184255425531224759,0.1693791983359425601385,0.2016515153621968869935,\ +0.6100517388487384229379,0.0743340542544716487150,0.0034555684806514769605,\ +0.0902156984479902251950,0.3241135973562218053345,0.1760110212342378688266,\ +0.2452633832131958513401,0.3516179963878625636120,0.1885474403955421374146,\ +0.2692513911062309750477,0.8321367071581778906975,0.5264631357733180472280,\ +0.1448019483693787634593,1.0708552390146606203558,0.7125992289896019293849,\ +0.3253494174977278885486,0.2001345889867806593365,0.343199696050296210181,\ +0.5982400693418048476246,0.3303593637710269814711,0.0125118697596118978038,\ +0.3199717638395740970658,0.5061472843217617034739,0.4295842023027047207329,\ +0.2465282516242081889413,0.441112206343829249544,0.3219119603275076846316,\ +0.4595743499683106469966,0.3660794615870797685808,0.2720878846188879984780,\ +0.6972660654407580871350,0.8861718442431221198774,0.2499974132956042649489,\ +0.4568598941148580561134,0.1097116340955419794279,0.2836394335106861008811,\ +0.0888432657814137161090,1.2330526748467487418992,0.2488174581727523593244,\ +0.4160762578947443945943,0.9833017375902159962209,0.3688379479484371614717,\ +0.5845995722843282393910,0.3179368621558099627933,0.1652197278936747004696,\ +0.3133619394599517771205,0.2199213980004723900663,0.150759611907827051347,\ +0.4771998617931776376366,0.4525965638532219448287,0.1138559184839921800680,\ +0.0472861014102091622990,0.0790630167394415495075,0.5814611436078345185763,\ +0.1667238962880819019841,0.6920944670661310915705,0.1906861485587098559158,\ +0.1307919466930784202496,0.1574308648240616004266,0.0036575163164140646332,\ +0.2674520780172894851567,0.6735689731298903915047,0.378774827327838792268,\ +0.8834054385824835486929,0.0452439501756518244746,0.2447083220521515389834,\ +0.7633578523125562620422,0.2078243181020067997800,0.5055052026142557997090,\ +0.0245040445592060660007,0.1414831146311008314154,1.2738839652002900137973,\ +0.3722074374977639710238,0.2046196449929307825677,1.143222534499549469800,\ +0.1658122283683383380026,0.0812521009905448621247,0.8856778536505196530726,\ +0.3496455120553698669994,0.8287603905975037266174,0.4374379182437952429119,\ +0.3632754548631693114480,0.4065565887334736672187,0.4042071334744706256892,\ +0.3223163664494689273354,0.0887658719864259648791,0.2562423384997916109285,\ +0.1135016065651749256338,0.4249393631867034448746,0.2555315607462380622650,\ +0.0473167224981555015195,0.4038863981107233547263,0.3812800945055046519805,\ +1.2694612396144742128001,0.1054006198029389801407,0.5548755616229488207836,\ +0.9047138472187979951755,0.2120875774680325287491,0.2977497737582537329359,\ +0.3793852632159244175902,0.4216852391721442327999,0.7719661269702553507699,\ +0.2909766448133100369411,0.3530800537032807717708,0.3144419867733496687379,\ +0.9560423318471079623393,0.7455173297127551945707,0.7647697575929581770282,\ +0.2552307563419532465687,1.0071246904841177904899,0.3254058309317561237251,\ +0.2493837937457981657197,0.4995060266703120754883,0.3635478722517977989703,\ +0.6755663854502449439110,0.4060422219779377672744,0.3354119513743121228089,\ +0.3310200365444659897918,0.4956952069626366363941,0.0369899619573449203735,\ +0.2949888674609426608697,0.4417162785414836534415,0.2901327037722924995222,\ +0.3113814080983853260776,0.0657705595388366343057,0.3468932593605689174154,\ +0.1693138876335541220808,0.6604383641650866110240,0.0641696842881706724926,\ +0.5420718455446384975716,0.0325460783396350344931,0.2856018727381676169941,\ +0.1837045440337584378820,0.4394912998560263073244,0.0373805900188774464787,\ +0.0120513737523088183129,0.5299342664002043568061,0.3290248923514364487453,\ +0.4232813397541956845771,0.3574733895472496092438,0.0231976592717455104564,\ +1.388138041383984555566,0.1495922092250967505578,0.3027074594945061147833,\ +0.2906013786665496145822,0.0003641583735012103801,0.0973965246964013098285,\ +0.3558085542679609303285,0.2850038039654740895657,0.2413433027684695197923,\ +0.2679865438260303767137,0.5240490385593890021454,0.4768351880953459742685,\ +0.479037567928660701355,0.9219838892273597430460,0.5060637477109658499686,\ +0.3200337217432840941633,0.1160441175011530240413,0.2289284118436291093346,\ +0.1740340532494602521219,0.0308192365918868102503,0.4474996159504823212139,\ +0.601992209828681956729,0.1542000078067730650666,1.2334589409579821417395,\ +0.1251630868814269104128,0.0603288006292757861271,0.4462414520672394746548,\ +0.4738309669088760500699,0.5239025685810345667193,0.0238870191275340100490,\ +0.1440610501660575526461,0.1990046768508525187880,0.6514000598731057856128,\ +0.1047897932784156715957,0.429099188123020058860,0.1037294840964696623908,\ +0.6989271583573236634734,0.3217396834648525993927,0.1276324483471362458698,\ +0.51478179757014652651,0.7241126844123151329313,0.1471790945486320945079,\ +0.7963244963417922539506,0.1499982428024713432269,0.1685430842340138735125,\ +0.4298103979039861188838,0.0569704807929593617932,0.2690745622378380996764,\ +0.2759880123858853839813,0.0260258640811948625815,0.2968457197721043328009,\ +0.2658449701658989750008,0.1869340145100120420540} + +#define ZRESULTI {0.6606731609576530495076,1.0352924413907944600766,0.8208009210718538728457,\ +0.9855228198847613141354,0.2094799364238341676803,0.2001711092576675676824,\ +0.6157063400955946619320,0.6758210089185754387842,0.7073690227519786599686,\ +0.6379959312114483749312,0.7691489792855270568595,0.8204717538076390370705,\ +0.8992691795054111869590,0.0127212399656787735619,0.7965072880961274748302,\ +0.4005414846539865347808,0.5078102333041875082742,0.7442675929748912011519,\ +0.6446164613619681515999,0.0651017559751383007027,0.4292463160345246220295,\ +0.7218268661973539224164,0.675831849442214971369,1.016847265460205207432,\ +0.1468976923106849463707,0.923642083424730087060,0.7198425877508842773977,\ +0.2363604106893440193193,0.6057859843456331327971,0.9859934125773722746189,\ +0.4546059235344489524167,0.1550160776744255175519,0.5737784438019621902072,\ +0.8635696530908816281880,0.1971722712896061546761,0.8187472766310414096225,\ +0.3223047939566238695441,0.3428986541358745587793,0.1891956718334251719149,\ +0.5208354545548833369750,0.7081524694874962166935,0.7203267007574796210179,\ +0.6794103936977667901331,0.3782115660166653348107,0.8246286245352181243362,\ +0.4645139855543011786487,0.0308839406628786498910,0.7450942218464524646748,\ +0.4028312748892641792509,0.1516356705950959171680,0.7277735925258916882541,\ +0.3236400086381776008970,0.2367328033923032648556,0.6968150511733807173087,\ +0.3868027398676305850245,0.8499965389936866566600,0.1373663005352325217068,\ +0.4969728656393965771088,0.3186158192908606912042,0.2687494032146487410451,\ +0.4817044586911616854685,0.8091241454316642212064,0.7745837276131475324092,\ +0.7616864033669616951272,0.3357065002058312042088,0.5391311137157557276112,\ +0.4267832806356777752832,0.4494653959304828472199,1.07409232431056356205,\ +0.9773946189840253540027,0.0903205143448218145119,0.6947943813727951445358,\ +0.4320600869989819070582,0.7345738223824911372617,0.4980076917918512258154,\ +0.753646277499480543582,0.3015650137112788620186,0.1750320030662110004638,\ +0.7223173121894863601966,0.6855367528648522723600,0.4620100861135144620917,\ +0.6944021533252422440086,0.5110335784375538148439,0.3672451576697671193905,\ +0.8344551064956932107108,0.16170594539219715347,0.7832786921268890534265,\ +1.0189285776822756268700,0.7988551639208606447440,0.9719247807905779801274,\ +0.9809763387972041392970,0.5656833224514162816732,0.8638733429144607178785,\ +0.7441066604777042403640,0.0602264440127683667314,0.4402801210484636462716,\ +0.7535199884397705272221,0.9667811691361050119298,1.0493588871220529412653,\ +0.1602121578348635611011,0.6872528304663769738170,0.2746926003887739664577,\ +0.5904217499472341756928,0.8227770718789775283852,0.9300490141104427177510,\ +0.8608967966610167055208,0.6761042332942854837796,0.3862514929365022942065,\ +0.5383206023328632738867,0.0087209580621782408633,0.8379947814437334052684,\ +0.0514162894427564812205,0.4107196425718538934646,0.8291800128662117908007,\ +0.5965153474380232578866,0.1327243053149035900695,0.6666204349503430659496,\ +0.1078852700862242136592,0.3410661266092010479589,0.8978136284012265821986,\ +0.4999590426790496699994,0.5396356462900459005638,0.8861720904164178680418,\ +0.1966865820582558155305,0.7384948934734244518907,0.6889822634082830576929,\ +0.7002461629632836803694,0.9202927678328401972507,1.0522470356995357043672,\ +0.7633410819201092989417,0.6825068129840573538658,1.032180426666563732852,\ +0.6970224139462883883311,0.4448502829538992786596,0.5954971038562514307202,\ +0.9072269118636318019355,0.0986096977623509007849,0.4792818549998886235031,\ +0.6169344532127701841162,0.5996614784596430158814,0.6997864810760641152143,\ +0.6821778350957495851148,0.2159298191152681511973,0.3221001280586711645881,\ +0.3026923795099815683862,0.1907050596442291245936,0.7504581695080775327611,\ +0.2050797642560421019109,0.4500993401191650811200,1.0616552076870116039231,\ +0.3866139253948813192530,0.2889239979563678062391,0.0419016457354280461023,\ +0.5291730503201013124937,0.5270449613735276317428,0.3620065401137618765759,\ +0.2487989439191494456249,0.9684607851607960338214,0.4659312790851565244665,\ +0.3871941948924775833696,0.6912156199525602007228,0.0672566496597855195683,\ +1.0473726182255131966770,0.3738845568372618499708,0.4336537904037139901092,\ +0.1616849585723995341713,0.6587810404999043800700,0.9478245114156004236250,\ +0.7443033774708265326581,0.7329852502477968156924,0.3960943016785423709258,\ +0.2387102372514374737378,0.5224647164810142241365,0.9310236182750510902650,\ +0.0713841738247450452448,1.0541437904171060413461,0.3977173917051313734028,\ +0.0286922698814963753056,0.7352303476692350070465,0.3345177682401353491670,\ +0.7257755336052617023412,0.4362132495206523241649,0.7201678840265979264501,\ +0.6279860575277228518232,0.3131701555376726897606,0.7154672057942548235587,\ +0.7055403294219286802758,0.90419581128384973745,0.5774063124958943582499,\ +0.748377680093745611956,0.3188837788675313866804,0.8029276503063254022408,\ +0.6186055293635583929301,0.3301554535865592887589,0.907799805701633655275,\ +1.0004593122932974313954,0.3297692664500386783288,0.774518614973831232007,\ +0.8666563831612021928663,0.5028547740750087813311} + + + + +void dtansTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dtans(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void ztansTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=ztans(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dtanaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dtana(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-16); + } +} + +void ztanaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + ztana(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + +int testTan() { + printf("\n>>>> Double Tangeant Tests\n"); + dtansTest(); + ztansTest(); + dtanaTest(); + ztanaTest(); + + return 0; +} + +int main() { + assert(testTan() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/testFloatTan.c b/2.3-1/src/c/elementaryFunctions/tan/testFloatTan.c new file mode 100644 index 00000000..4b487887 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/testFloatTan.c @@ -0,0 +1,495 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testTan.h" + +#define SOURCE {0.7062616096809506416321f,0.4090520101599395275116f,0.3011248558759689331055f,\ +0.1880126395262777805328f,0.1796709178015589714050f,0.2828889950178563594818f,\ +0.7232380937784910202026f,0.7360379849560558795929f,0.1852612206712365150452f,\ +0.7703790138475596904755f,0.1914967410266399383545f,0.7521587223745882511139f,\ +0.6205883463844656944275f,0.2807604051195085048676f,0.2289868686348199844360f,\ +0.5049233403988182544708f,0.8354099662974476814270f,0.8174716415815055370331f,\ +0.0030740275979042053223f,0.3677616142667829990387f,0.8278525872156023979187f,\ +0.72754097869619727135f,0.5323124285787343978882f,0.9267726917751133441925f,\ +0.9542504185810685157776f,0.3162104780785739421845f,0.5789009965956211090088f,\ +0.6881225542165338993073f,0.3714061146602034568787f,0.1705444059334695339203f,\ +0.1954363007098436355591f,0.978800852317363023758f,0.9300233917310833930969f,\ +0.5357720064930617809296f,0.3947123587131500244141f,0.1344871171750128269196f,\ +0.7380615202710032463074f,0.588114650454372167587f,0.9113173168152570724487f,\ +0.5682763461954891681671f,0.1127616921439766883850f,0.9478473584167659282684f,\ +0.5237770043313503265381f,0.8140139640308916568756f,0.1400952627882361412048f,\ +0.2763446993194520473480f,0.9059953633695840835571f,0.1379901585169136524200f,\ +0.5603838684037327766419f,0.3008610638789832592011f,0.4767417535185813904f,\ +0.8127435916103422641754f,0.1988414181396365165710f,0.1107953130267560482025f,\ +0.2159351315349340438843f,0.6467244853265583515167f,0.6597879612818360328674f,\ +0.0691898013465106487274f,0.9164751060307025909424f,0.8635670826770365238190f,\ +0.5032854294404387474060f,0.1832137755118310451508f,0.8403698671609163284302f,\ +0.9247214836068451404572f,0.6229452537372708320618f,0.2773811477236449718475f,\ +0.2479109913110733032227f,0.3891948559321463108063f,0.0436578569933772087097f,\ +0.8132526441477239131928f,0.7686451207846403121948f,0.4041520212776958942413f,\ +0.8579940209165215492249f,0.6993723283521831035614f,0.0828925184905529022217f,\ +0.9201254160143435001373f,0.5200281282886862754822f,0.9351884997449815273285f,\ +0.8825624976307153701782f,0.2245844271965324878693f,0.2153332801535725593567f,\ +0.4327089670114219188690f,0.5800157263875007629395f,0.8876141034997999668121f,\ +0.5258982880041003227234f,0.859640696551650762558f,0.7337234076112508773804f,\ +0.7134532411582767963409f,0.1087165409699082374573f,0.8477638359181582927704f,\ +0.6594733335077762603760f,0.7916418449021875858307f,0.6067967480048537254334f,\ +0.4102901122532784938812f,0.1958728153258562088013f,0.241527963895350694656f,\ +0.5113455550745129585266f,0.9119556057266891002655f,0.0928984880447387695313f,\ +0.7438839026726782321930f,0.1938720373436808586121f,0.4355978979729115962982f,\ +0.9922429900616407394409f,0.4533818070776760578156f,0.8269640663638710975647f,\ +0.8889675955288112163544f,0.4682085178792476654053f,0.3856786251999437808991f,\ +0.4124865522608160972595f,0.6955242282710969448090f,0.0978972557932138442993f,\ +0.8728604433126747608185f,0.6359515609219670295715f,0.4129665228538215160370f,\ +0.0294486805796623229980f,0.1809961968101561069489f,0.7658103061839938163757f,\ +0.1232470511458814144135f,0.0170737411826848983765f,0.8835507561452686786652f,\ +0.3164170170202851295471f,0.9378212536685168743134f,0.3916359134018421173096f,\ +0.0844073877669870853424f,0.6934146797284483909607f,0.4618808380328118801117f,\ +0.9355291295796632766724f,0.0842495900578796863556f,0.5402926551178097724915f,\ +0.5613215523771941661835f,0.1306025832891464233398f,0.5840523042716085910797f,\ +0.0048661706969141960144f,0.2761953338049352169037f,0.7478824090212583541870f,\ +0.0194325004704296588898f,0.6444276878610253334045f,0.2243968318216502666473f,\ +0.2478402368724346160889f,0.1196091384626924991608f,0.1883201440796256065369f,\ +0.3393343067727982997894f,0.959958622232079505920f,0.2847225037403404712677f,\ +0.8766820700839161872864f,0.2853349032811820507050f,0.5103433504700660705566f,\ +0.8752629184164106845856f,0.5941145820543169975281f,0.3945342986844480037689f,\ +0.4661326166242361068726f,0.0073588271625339984894f,0.5170202488079667091370f,\ +0.4690007264725863933563f,0.6654530800879001617432f,0.9476742581464350223541f,\ +0.4933638339862227439880f,0.2918433747254312038422f,0.2016727942973375320435f,\ +0.7016656589694321155548f,0.8736049132421612739563f,0.191055159550160169601f,\ +0.5307010114192962646484f,0.8889481076039373874664f,0.0115523664280772209167f,\ +0.4998398735187947750092f,0.6700848620384931564331f,0.4995208983309566974640f,\ +0.1538907447829842567444f,0.2571737091057002544403f,0.9586529098451137542725f,\ +0.6246025026775896549225f,0.9371285131201148033142f,0.9923511571250855922699f,\ +0.3454555813223123550415f,0.7558249053545296192169f,0.2107181670144200325012f,\ +0.9372652801685035228729f,0.6767524704337120056152f,0.7465373151935636997223f,\ +0.4050982249900698661804f,0.5101723610423505306244f,0.9497965183109045028687f,\ +0.0289692510850727558136f,0.1634070957079529762268f,0.4146909262053668498993f,\ +0.0021650679409503936768f,0.1810030029155313968658f,0.4556188201531767845154f,\ +0.1977851442061364650726f,0.6053877938538789749146f,0.4363054675050079822540f,\ +0.8938506888225674629211f,0.6104825991205871105194f,0.4316215068101882934570f,\ +0.2315693595446646213532f,0.4675927339121699333191f,0.6150764389894902706146f,\ +0.8621218334883451461792f,0.3846137975342571735382f} + +#define RESULT {0.8530491813252144561730f,0.4335045992710032103368f,0.3105691712500722179158f,\ +0.1902597554084684006170f,0.1816295703181560194928f,0.2906848138476661458363f,\ +0.8828132281173867168533f,0.9058504084575731418738f,0.1874102230574337113467f,\ +0.9704039825071290037428f,0.193872386487773856745f,0.9356368085981127125095f,\ +0.7147975865621483126944f,0.2883777870673323029394f,0.233074941053011769343f,\ +0.5527124758136455762170f,1.1053818146408691536209f,1.0662960354617996294735f,\ +0.0030740372807646679752f,0.3852902674825339213172f,1.0887291048642380175693f,\ +0.8904988483295813717078f,0.589027514944382324380f,1.3318828819928720808008f,\ +1.4110197782284186196478f,0.3271889768526293207351f,0.6535988324182537834162f,\ +0.8221846610900451768345f,0.3894816929387301396304f,0.1722173220386573888607f,\ +0.1979631660252146874157f,1.4871003608159341080608f,1.3409392796872054987034f,\ +0.5936969391438152721108f,0.4165742349308056979851f,0.1353038396146245825324f,\ +0.9095411562053630216695f,0.666828524289825752547f,1.2898724607003566600127f,\ +0.6385394321030002373618f,0.1132420646312260748001f,1.3920395973271377787484f,\ +0.5775879319584731330650f,1.058934135979150648055f,0.141019050913288951365f,\ +0.2836009152345423944830f,1.2757925164705434806223f,0.1388727177433937698403f,\ +0.6274844177211460483079f,0.3102799593553379198241f,0.5164764951302321938087f,\ +1.0562428612021228513385f,0.2015041286208432702587f,0.1112509099475587071026f,\ +0.2193551393571971375174f,0.7550487488328985197228f,0.7757652108685924030596f,\ +0.0693004223106622879724f,1.3037037706937266712259f,1.1699705921283873877314f,\ +0.550576129776577216646f,0.1852916762694652719201f,1.1164629082914852009623f,\ +1.3262085052804502005586f,0.7183647379901514362643f,0.2847210542962326229599f,\ +0.2531178933037822043062f,0.4101140401836267934677f,0.0436856155719798008863f,\ +1.0573204171612526902635f,0.9670429620877326604145f,0.4276960657258361830913f,\ +1.156854335998896532445f,0.8412159741625684361566f,0.0830828979444599852178f,\ +1.3136054718047147638060f,0.5725991803557812787062f,1.355492790615370424234f,\ +1.2159959299593459114419f,0.2284380696339281535678f,0.2187244120791704826701f,\ +0.4619038629088654257515f,0.6551909258647544698206f,1.228594570395200147317f,\ +0.5804203670779729540286f,1.1607121297665823345113f,0.9016453790519162181383f,\ +0.8655510240366158791758f,0.1091468929729377396187f,1.133211951033040509884f,\ +0.7752613593928633362040f,1.0125659843026109108166f,0.6941614960626277808231f,\ +0.4349761638068749824981f,0.1984168266250701806452f,0.2463367776963759914199f,\ +0.5611266025781723732f,1.2915741173940875619053f,0.0931666557927946503703f,\ +0.9202369550199469561136f,0.1963381019951347117303f,0.4654138557801037467954f,\ +1.531152598161082067918f,0.4872328317068129743817f,1.0867892686527245160732f,\ +1.231996743210198141938f,0.5057142067082607272965f,0.4060123002390389479466f,\ +0.4375906817398340642455f,0.8346659585500807443381f,0.0982112043307575288686f,\ +1.1922276352973026902760f,0.7382700256000707117465f,0.4381626799731911381386f,\ +0.0294571964089862109448f,0.1829988997674065476229f,0.9615720911131384607273f,\ +0.1238749003414561927761f,0.0170754004466078072866f,1.2184484210758381728112f,\ +0.3274176417863428056876f,1.3629896342945482246023f,0.4129685310508503515159f,\ +0.0846084171803287293789f,0.8310930423770829245100f,0.4977934831990530883950f,\ +1.3564597268158093967827f,0.0844494919835185042789f,0.5998275037194918946071f,\ +0.6287920720664262885791f,0.1313502491565903540494f,0.6609756367352789263592f,\ +0.0048662091069645377339f,0.2834395431640467921675f,0.9276488528261589427970f,\ +0.0194349468870056892034f,0.7514487870197579244547f,0.2282406932471093830017f,\ +0.2530426070707028074480f,0.1201828114589197499251f,0.1905784099029704803385f,\ +0.352988062986135442411f,1.428231701456014857143f,0.2926743123472941854324f,\ +1.2015237487616485800856f,0.2933392882321691486069f,0.5598095809652490206787f,\ +1.1980617264883439698764f,0.6755313107918682336006f,0.4163652909127465440164f,\ +0.5031101302799753094419f,0.0073589599979746594949f,0.5686119631638693050491f,\ +0.5067094190821778143530f,0.7848798186452353720100f,1.391531190313842980544f,\ +0.5377167840923406938458f,0.3004214213647905529214f,0.2044521595617958820146f,\ +0.8451397437154636316237f,1.1940319015577840477960f,0.1934142466999154985619f,\ +0.5868590674474564172769f,1.2319476773796440571829f,0.0115528803708900857511f,\ +0.5460945923736312268559f,0.792392311128046200608f,0.5456805647330320585553f,\ +0.1551171962759635702955f,0.2629975069837691137309f,1.4242699230594764170377f,\ +0.7208802037485926295091f,1.3610118285291581408103f,1.5315144150725372718114f,\ +0.3598870449025589057790f,0.9425361247426047306419f,0.2138933525822492576207f,\ +1.3614020090881830959972f,0.8033042279594378998198f,0.925149379458894971506f,\ +0.4288158062140490778269f,0.5595850272060393093554f,1.397781375537582970736f,\ +0.0289773576405878592610f,0.1648772252909011803990f,0.4402197018088547242343f,\ +0.0021650713238892428658f,0.1830059338084651376910f,0.4900039273308094966986f,\ +0.2004051993228692374327f,0.6920756616600035604492f,0.4662749757103929471036f,\ +1.244365984627544330365f,0.6996374475054760733173f,0.4605850493651166277509f,\ +0.2357993689411847226811f,0.5049411785573922895054f,0.7065020490746397596737f,\ +1.16655281751026174142f,0.4047724755535024310227f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} + +#define CRESULTR {0.4622549506274005182149f,0.52703543104286754151f,0.1827556517526441881572f,\ +0.3854184255425531224759f,0.1693791983359425601385f,0.2016515153621968869935f,\ +0.6100517388487384229379f,0.0743340542544716487150f,0.0034555684806514769605f,\ +0.0902156984479902251950f,0.3241135973562218053345f,0.1760110212342378688266f,\ +0.2452633832131958513401f,0.3516179963878625636120f,0.1885474403955421374146f,\ +0.2692513911062309750477f,0.8321367071581778906975f,0.5264631357733180472280f,\ +0.1448019483693787634593f,1.0708552390146606203558f,0.7125992289896019293849f,\ +0.3253494174977278885486f,0.2001345889867806593365f,0.343199696050296210181f,\ +0.5982400693418048476246f,0.3303593637710269814711f,0.0125118697596118978038f,\ +0.3199717638395740970658f,0.5061472843217617034739f,0.4295842023027047207329f,\ +0.2465282516242081889413f,0.441112206343829249544f,0.3219119603275076846316f,\ +0.4595743499683106469966f,0.3660794615870797685808f,0.2720878846188879984780f,\ +0.6972660654407580871350f,0.8861718442431221198774f,0.2499974132956042649489f,\ +0.4568598941148580561134f,0.1097116340955419794279f,0.2836394335106861008811f,\ +0.0888432657814137161090f,1.2330526748467487418992f,0.2488174581727523593244f,\ +0.4160762578947443945943f,0.9833017375902159962209f,0.3688379479484371614717f,\ +0.5845995722843282393910f,0.3179368621558099627933f,0.1652197278936747004696f,\ +0.3133619394599517771205f,0.2199213980004723900663f,0.150759611907827051347f,\ +0.4771998617931776376366f,0.4525965638532219448287f,0.1138559184839921800680f,\ +0.0472861014102091622990f,0.0790630167394415495075f,0.5814611436078345185763f,\ +0.1667238962880819019841f,0.6920944670661310915705f,0.1906861485587098559158f,\ +0.1307919466930784202496f,0.1574308648240616004266f,0.0036575163164140646332f,\ +0.2674520780172894851567f,0.6735689731298903915047f,0.378774827327838792268f,\ +0.8834054385824835486929f,0.0452439501756518244746f,0.2447083220521515389834f,\ +0.7633578523125562620422f,0.2078243181020067997800f,0.5055052026142557997090f,\ +0.0245040445592060660007f,0.1414831146311008314154f,1.2738839652002900137973f,\ +0.3722074374977639710238f,0.2046196449929307825677f,1.143222534499549469800f,\ +0.1658122283683383380026f,0.0812521009905448621247f,0.8856778536505196530726f,\ +0.3496455120553698669994f,0.8287603905975037266174f,0.4374379182437952429119f,\ +0.3632754548631693114480f,0.4065565887334736672187f,0.4042071334744706256892f,\ +0.3223163664494689273354f,0.0887658719864259648791f,0.2562423384997916109285f,\ +0.1135016065651749256338f,0.4249393631867034448746f,0.2555315607462380622650f,\ +0.0473167224981555015195f,0.4038863981107233547263f,0.3812800945055046519805f,\ +1.2694612396144742128001f,0.1054006198029389801407f,0.5548755616229488207836f,\ +0.9047138472187979951755f,0.2120875774680325287491f,0.2977497737582537329359f,\ +0.3793852632159244175902f,0.4216852391721442327999f,0.7719661269702553507699f,\ +0.2909766448133100369411f,0.3530800537032807717708f,0.3144419867733496687379f,\ +0.9560423318471079623393f,0.7455173297127551945707f,0.7647697575929581770282f,\ +0.2552307563419532465687f,1.0071246904841177904899f,0.3254058309317561237251f,\ +0.2493837937457981657197f,0.4995060266703120754883f,0.3635478722517977989703f,\ +0.6755663854502449439110f,0.4060422219779377672744f,0.3354119513743121228089f,\ +0.3310200365444659897918f,0.4956952069626366363941f,0.0369899619573449203735f,\ +0.2949888674609426608697f,0.4417162785414836534415f,0.2901327037722924995222f,\ +0.3113814080983853260776f,0.0657705595388366343057f,0.3468932593605689174154f,\ +0.1693138876335541220808f,0.6604383641650866110240f,0.0641696842881706724926f,\ +0.5420718455446384975716f,0.0325460783396350344931f,0.2856018727381676169941f,\ +0.1837045440337584378820f,0.4394912998560263073244f,0.0373805900188774464787f,\ +0.0120513737523088183129f,0.5299342664002043568061f,0.3290248923514364487453f,\ +0.4232813397541956845771f,0.3574733895472496092438f,0.0231976592717455104564f,\ +1.388138041383984555566f,0.1495922092250967505578f,0.3027074594945061147833f,\ +0.2906013786665496145822f,0.0003641583735012103801f,0.0973965246964013098285f,\ +0.3558085542679609303285f,0.2850038039654740895657f,0.2413433027684695197923f,\ +0.2679865438260303767137f,0.5240490385593890021454f,0.4768351880953459742685f,\ +0.479037567928660701355f,0.9219838892273597430460f,0.5060637477109658499686f,\ +0.3200337217432840941633f,0.1160441175011530240413f,0.2289284118436291093346f,\ +0.1740340532494602521219f,0.0308192365918868102503f,0.4474996159504823212139f,\ +0.601992209828681956729f,0.1542000078067730650666f,1.2334589409579821417395f,\ +0.1251630868814269104128f,0.0603288006292757861271f,0.4462414520672394746548f,\ +0.4738309669088760500699f,0.5239025685810345667193f,0.0238870191275340100490f,\ +0.1440610501660575526461f,0.1990046768508525187880f,0.6514000598731057856128f,\ +0.1047897932784156715957f,0.429099188123020058860f,0.1037294840964696623908f,\ +0.6989271583573236634734f,0.3217396834648525993927f,0.1276324483471362458698f,\ +0.51478179757014652651f,0.7241126844123151329313f,0.1471790945486320945079f,\ +0.7963244963417922539506f,0.1499982428024713432269f,0.1685430842340138735125f,\ +0.4298103979039861188838f,0.0569704807929593617932f,0.2690745622378380996764f,\ +0.2759880123858853839813f,0.0260258640811948625815f,0.2968457197721043328009f,\ +0.2658449701658989750008f,0.1869340145100120420540f} + +#define CRESULTI {0.6606731609576530495076f,1.0352924413907944600766f,0.8208009210718538728457f,\ +0.9855228198847613141354f,0.2094799364238341676803f,0.2001711092576675676824f,\ +0.6157063400955946619320f,0.6758210089185754387842f,0.7073690227519786599686f,\ +0.6379959312114483749312f,0.7691489792855270568595f,0.8204717538076390370705f,\ +0.8992691795054111869590f,0.0127212399656787735619f,0.7965072880961274748302f,\ +0.4005414846539865347808f,0.5078102333041875082742f,0.7442675929748912011519f,\ +0.6446164613619681515999f,0.0651017559751383007027f,0.4292463160345246220295f,\ +0.7218268661973539224164f,0.675831849442214971369f,1.016847265460205207432f,\ +0.1468976923106849463707f,0.923642083424730087060f,0.7198425877508842773977f,\ +0.2363604106893440193193f,0.6057859843456331327971f,0.9859934125773722746189f,\ +0.4546059235344489524167f,0.1550160776744255175519f,0.5737784438019621902072f,\ +0.8635696530908816281880f,0.1971722712896061546761f,0.8187472766310414096225f,\ +0.3223047939566238695441f,0.3428986541358745587793f,0.1891956718334251719149f,\ +0.5208354545548833369750f,0.7081524694874962166935f,0.7203267007574796210179f,\ +0.6794103936977667901331f,0.3782115660166653348107f,0.8246286245352181243362f,\ +0.4645139855543011786487f,0.0308839406628786498910f,0.7450942218464524646748f,\ +0.4028312748892641792509f,0.1516356705950959171680f,0.7277735925258916882541f,\ +0.3236400086381776008970f,0.2367328033923032648556f,0.6968150511733807173087f,\ +0.3868027398676305850245f,0.8499965389936866566600f,0.1373663005352325217068f,\ +0.4969728656393965771088f,0.3186158192908606912042f,0.2687494032146487410451f,\ +0.4817044586911616854685f,0.8091241454316642212064f,0.7745837276131475324092f,\ +0.7616864033669616951272f,0.3357065002058312042088f,0.5391311137157557276112f,\ +0.4267832806356777752832f,0.4494653959304828472199f,1.07409232431056356205f,\ +0.9773946189840253540027f,0.0903205143448218145119f,0.6947943813727951445358f,\ +0.4320600869989819070582f,0.7345738223824911372617f,0.4980076917918512258154f,\ +0.753646277499480543582f,0.3015650137112788620186f,0.1750320030662110004638f,\ +0.7223173121894863601966f,0.6855367528648522723600f,0.4620100861135144620917f,\ +0.6944021533252422440086f,0.5110335784375538148439f,0.3672451576697671193905f,\ +0.8344551064956932107108f,0.16170594539219715347f,0.7832786921268890534265f,\ +1.0189285776822756268700f,0.7988551639208606447440f,0.9719247807905779801274f,\ +0.9809763387972041392970f,0.5656833224514162816732f,0.8638733429144607178785f,\ +0.7441066604777042403640f,0.0602264440127683667314f,0.4402801210484636462716f,\ +0.7535199884397705272221f,0.9667811691361050119298f,1.0493588871220529412653f,\ +0.1602121578348635611011f,0.6872528304663769738170f,0.2746926003887739664577f,\ +0.5904217499472341756928f,0.8227770718789775283852f,0.9300490141104427177510f,\ +0.8608967966610167055208f,0.6761042332942854837796f,0.3862514929365022942065f,\ +0.5383206023328632738867f,0.0087209580621782408633f,0.8379947814437334052684f,\ +0.0514162894427564812205f,0.4107196425718538934646f,0.8291800128662117908007f,\ +0.5965153474380232578866f,0.1327243053149035900695f,0.6666204349503430659496f,\ +0.1078852700862242136592f,0.3410661266092010479589f,0.8978136284012265821986f,\ +0.4999590426790496699994f,0.5396356462900459005638f,0.8861720904164178680418f,\ +0.1966865820582558155305f,0.7384948934734244518907f,0.6889822634082830576929f,\ +0.7002461629632836803694f,0.9202927678328401972507f,1.0522470356995357043672f,\ +0.7633410819201092989417f,0.6825068129840573538658f,1.032180426666563732852f,\ +0.6970224139462883883311f,0.4448502829538992786596f,0.5954971038562514307202f,\ +0.9072269118636318019355f,0.0986096977623509007849f,0.4792818549998886235031f,\ +0.6169344532127701841162f,0.5996614784596430158814f,0.6997864810760641152143f,\ +0.6821778350957495851148f,0.2159298191152681511973f,0.3221001280586711645881f,\ +0.3026923795099815683862f,0.1907050596442291245936f,0.7504581695080775327611f,\ +0.2050797642560421019109f,0.4500993401191650811200f,1.0616552076870116039231f,\ +0.3866139253948813192530f,0.2889239979563678062391f,0.0419016457354280461023f,\ +0.5291730503201013124937f,0.5270449613735276317428f,0.3620065401137618765759f,\ +0.2487989439191494456249f,0.9684607851607960338214f,0.4659312790851565244665f,\ +0.3871941948924775833696f,0.6912156199525602007228f,0.0672566496597855195683f,\ +1.0473726182255131966770f,0.3738845568372618499708f,0.4336537904037139901092f,\ +0.1616849585723995341713f,0.6587810404999043800700f,0.9478245114156004236250f,\ +0.7443033774708265326581f,0.7329852502477968156924f,0.3960943016785423709258f,\ +0.2387102372514374737378f,0.5224647164810142241365f,0.9310236182750510902650f,\ +0.0713841738247450452448f,1.0541437904171060413461f,0.3977173917051313734028f,\ +0.0286922698814963753056f,0.7352303476692350070465f,0.3345177682401353491670f,\ +0.7257755336052617023412f,0.4362132495206523241649f,0.7201678840265979264501f,\ +0.6279860575277228518232f,0.3131701555376726897606f,0.7154672057942548235587f,\ +0.7055403294219286802758f,0.90419581128384973745f,0.5774063124958943582499f,\ +0.748377680093745611956f,0.3188837788675313866804f,0.8029276503063254022408f,\ +0.6186055293635583929301f,0.3301554535865592887589f,0.907799805701633655275f,\ +1.0004593122932974313954f,0.3297692664500386783288f,0.774518614973831232007f,\ +0.8666563831612021928663f,0.5028547740750087813311f} + + + + +void stansTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=stans(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-7); + } +} + +void ctansTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=ctans(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void stanaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i; + + stana(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void ctanaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + ctana(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} +int testTan() { + printf("\n>>>> Float Tangeant Tests\n"); + stansTest(); + ctansTest(); + stanaTest(); + ctanaTest(); + + return 0; +} + +int main() { + assert(testTan() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/testTan.h b/2.3-1/src/c/elementaryFunctions/tan/testTan.h new file mode 100644 index 00000000..b9adf6f7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/testTan.h @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTTAN_H_ +#define _TESTTAN_H_ + +#include +#include +#include +#include "tan.h" +#include "constant.h" + +void stansTest(void); +void stanaTest(void); + +void dtansTest(void); +void dtanaTest(void); + +void ctansTest(void); +void ctanaTest(void); + +void ztansTest(void); +void ztanaTest(void); + +int testTan(void); + +#endif /* !_TESTTAN_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/tan/ztana.c b/2.3-1/src/c/elementaryFunctions/tan/ztana.c new file mode 100644 index 00000000..6634d422 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/ztana.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tan.h" + +void ztana(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ztans(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tan/ztans.c b/2.3-1/src/c/elementaryFunctions/tan/ztans.c new file mode 100644 index 00000000..761da36b --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tan/ztans.c @@ -0,0 +1,104 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * Copyright (C) Bruno Pincon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + ALGORITHM + based on the formula : + + 0.5 sin(2 xr) + i 0.5 sinh(2 xi) + tan(xr + i xi) = --------------------------------- + cos(xr)^2 + sinh(xi)^2 + + noting d = cos(xr)^2 + sinh(xi)^2, we have : + + yr = 0.5 * sin(2 * xr) / d (1) + + yi = 0.5 * sinh(2 * xi) / d (2) + + to avoid spurious overflows in computing yi with + formula (2) (which results in NaN for yi) + we use also the following formula : + + yi = sign(xi) when |xi| > LIM (3) + + Explanations for (3) : + + we have d = sinh(xi)^2 ( 1 + (cos(xr)/sinh(xi))^2 ), + so when : + + (cos(xr)/sinh(xi))^2 < epsm ( epsm = max relative error + for coding a real in a f.p. + number set F(b,p,emin,emax) + epsm = 0.5 b^(1-p) ) + which is forced when : + + 1/sinh(xi)^2 < epsm (4) + <=> |xi| > asinh(1/sqrt(epsm)) (= 19.06... in ieee 754 double) + + sinh(xi)^2 is a good approximation for d (relative to the f.p. + arithmetic used) and then yr may be approximate with : + + yr = cosh(xi)/sinh(xi) + = sign(xi) (1 + exp(-2 |xi|))/(1 - exp(-2|xi|)) + = sign(xi) (1 + 2 u + 2 u^2 + 2 u^3 + ...) + + with u = exp(-2 |xi|)). Now when : + + 2 exp(-2|xi|) < epsm (2) + <=> |xi| > 0.5 * log(2/epsm) (= 18.71... in ieee 754 double) + + sign(xi) is a good approximation for yr. + + Constraint (1) is stronger than (2) and we take finaly + + LIM = 1 + log(2/sqrt(epsm)) + + (log(2/sqrt(epsm)) being very near asinh(1/sqrt(epsm)) + +AUTHOR + Bruno Pincon +*/ + +#include +#include "lapack.h" +#include "tan.h" +#include "sqrt.h" +#include "cos.h" +#include "sinh.h" +#include "sin.h" +#include "log.h" +#include "abs.h" + +#define localSign(x) x >= 0 ? 1.0 : -1.0 + +doubleComplex ztans(doubleComplex z) { + double Temp = 0; + double Lim = 1 + dlogs(2.0 / dsqrts( getRelativeMachinePrecision())); + double RealIn = zreals(z); + double ImagIn = zimags(z); + double RealOut = 0; + double ImagOut = 0; + + Temp = pow(dcoss(RealIn), 2) + pow(dsinhs(ImagIn), 2); + RealOut = 0.5 * dsins(2 * RealIn) / Temp; + if(dabss(ImagIn) < Lim) + { + ImagOut = 0.5 * dsinhs(2 * ImagIn) / Temp; + } + else + { + ImagOut = localSign(ImagIn); + } + + return DoubleComplex(RealOut, ImagOut); +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/Makefile.am b/2.3-1/src/c/elementaryFunctions/tanh/Makefile.am new file mode 100644 index 00000000..714eec18 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/Makefile.am @@ -0,0 +1,73 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libTanh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libTanh.la + +libTanh_la_SOURCES = $(HEAD) $(SRC) + +SRC = stanhs.c \ + dtanhs.c \ + ctanhs.c \ + ztanhs.c \ + stanha.c \ + dtanha.c \ + ctanha.c \ + ztanha.c + +HEAD = ../includes/tanh.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/tanh/libTanh.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatTanh testDoubleTanh + +TESTS = testFloatTanh testDoubleTanh + +# +# -*- Hyperbolic Tangeant Tests -*- +# +testFloatTanh_SOURCES = testTanh.h testFloatTanh.c +testFloatTanh_CFLAGS = $(check_INCLUDES) +testFloatTanh_LDADD = $(check_LDADD) + +testDoubleTanh_SOURCES = testTanh.h testDoubleTanh.c +testDoubleTanh_CFLAGS = $(check_INCLUDES) +testDoubleTanh_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/elementaryFunctions/tanh/Makefile.in b/2.3-1/src/c/elementaryFunctions/tanh/Makefile.in new file mode 100644 index 00000000..e93fe6a9 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/Makefile.in @@ -0,0 +1,819 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatTanh$(EXEEXT) testDoubleTanh$(EXEEXT) +TESTS = testFloatTanh$(EXEEXT) testDoubleTanh$(EXEEXT) +subdir = src/c/elementaryFunctions/tanh +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libTanh_la_LIBADD = +am__objects_1 = +am__objects_2 = libTanh_la-stanhs.lo libTanh_la-dtanhs.lo \ + libTanh_la-ctanhs.lo libTanh_la-ztanhs.lo libTanh_la-stanha.lo \ + libTanh_la-dtanha.lo libTanh_la-ctanha.lo libTanh_la-ztanha.lo +am_libTanh_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libTanh_la_OBJECTS = $(am_libTanh_la_OBJECTS) +libTanh_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libTanh_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleTanh_OBJECTS = testDoubleTanh-testDoubleTanh.$(OBJEXT) +testDoubleTanh_OBJECTS = $(am_testDoubleTanh_OBJECTS) +am__DEPENDENCIES_1 = \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/tanh/libTanh.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la +testDoubleTanh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleTanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleTanh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatTanh_OBJECTS = testFloatTanh-testFloatTanh.$(OBJEXT) +testFloatTanh_OBJECTS = $(am_testFloatTanh_OBJECTS) +testFloatTanh_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatTanh_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatTanh_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libTanh_la_SOURCES) $(testDoubleTanh_SOURCES) \ + $(testFloatTanh_SOURCES) +DIST_SOURCES = $(libTanh_la_SOURCES) $(testDoubleTanh_SOURCES) \ + $(testFloatTanh_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libTanh_la_CFLAGS = -I ../../type \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libTanh.la +libTanh_la_SOURCES = $(HEAD) $(SRC) +SRC = stanhs.c \ + dtanhs.c \ + ctanhs.c \ + ztanhs.c \ + stanha.c \ + dtanha.c \ + ctanha.c \ + ztanha.c + +HEAD = ../includes/tanh.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/tan/libTan.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/elementaryFunctions/tanh/libTanh.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + @LIBMATH@ + + +# +# -*- Hyperbolic Tangeant Tests -*- +# +testFloatTanh_SOURCES = testTanh.h testFloatTanh.c +testFloatTanh_CFLAGS = $(check_INCLUDES) +testFloatTanh_LDADD = $(check_LDADD) +testDoubleTanh_SOURCES = testTanh.h testDoubleTanh.c +testDoubleTanh_CFLAGS = $(check_INCLUDES) +testDoubleTanh_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/elementaryFunctions/tanh/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/elementaryFunctions/tanh/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libTanh.la: $(libTanh_la_OBJECTS) $(libTanh_la_DEPENDENCIES) + $(libTanh_la_LINK) -rpath $(pkglibdir) $(libTanh_la_OBJECTS) $(libTanh_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleTanh$(EXEEXT): $(testDoubleTanh_OBJECTS) $(testDoubleTanh_DEPENDENCIES) + @rm -f testDoubleTanh$(EXEEXT) + $(testDoubleTanh_LINK) $(testDoubleTanh_OBJECTS) $(testDoubleTanh_LDADD) $(LIBS) +testFloatTanh$(EXEEXT): $(testFloatTanh_OBJECTS) $(testFloatTanh_DEPENDENCIES) + @rm -f testFloatTanh$(EXEEXT) + $(testFloatTanh_LINK) $(testFloatTanh_OBJECTS) $(testFloatTanh_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ctanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ctanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-dtanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-dtanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-stanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-stanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ztanha.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libTanh_la-ztanhs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleTanh-testDoubleTanh.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatTanh-testFloatTanh.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libTanh_la-stanhs.lo: stanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-stanhs.lo -MD -MP -MF $(DEPDIR)/libTanh_la-stanhs.Tpo -c -o libTanh_la-stanhs.lo `test -f 'stanhs.c' || echo '$(srcdir)/'`stanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-stanhs.Tpo $(DEPDIR)/libTanh_la-stanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stanhs.c' object='libTanh_la-stanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-stanhs.lo `test -f 'stanhs.c' || echo '$(srcdir)/'`stanhs.c + +libTanh_la-dtanhs.lo: dtanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-dtanhs.lo -MD -MP -MF $(DEPDIR)/libTanh_la-dtanhs.Tpo -c -o libTanh_la-dtanhs.lo `test -f 'dtanhs.c' || echo '$(srcdir)/'`dtanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-dtanhs.Tpo $(DEPDIR)/libTanh_la-dtanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtanhs.c' object='libTanh_la-dtanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-dtanhs.lo `test -f 'dtanhs.c' || echo '$(srcdir)/'`dtanhs.c + +libTanh_la-ctanhs.lo: ctanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-ctanhs.lo -MD -MP -MF $(DEPDIR)/libTanh_la-ctanhs.Tpo -c -o libTanh_la-ctanhs.lo `test -f 'ctanhs.c' || echo '$(srcdir)/'`ctanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-ctanhs.Tpo $(DEPDIR)/libTanh_la-ctanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctanhs.c' object='libTanh_la-ctanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-ctanhs.lo `test -f 'ctanhs.c' || echo '$(srcdir)/'`ctanhs.c + +libTanh_la-ztanhs.lo: ztanhs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-ztanhs.lo -MD -MP -MF $(DEPDIR)/libTanh_la-ztanhs.Tpo -c -o libTanh_la-ztanhs.lo `test -f 'ztanhs.c' || echo '$(srcdir)/'`ztanhs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-ztanhs.Tpo $(DEPDIR)/libTanh_la-ztanhs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztanhs.c' object='libTanh_la-ztanhs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-ztanhs.lo `test -f 'ztanhs.c' || echo '$(srcdir)/'`ztanhs.c + +libTanh_la-stanha.lo: stanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-stanha.lo -MD -MP -MF $(DEPDIR)/libTanh_la-stanha.Tpo -c -o libTanh_la-stanha.lo `test -f 'stanha.c' || echo '$(srcdir)/'`stanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-stanha.Tpo $(DEPDIR)/libTanh_la-stanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stanha.c' object='libTanh_la-stanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-stanha.lo `test -f 'stanha.c' || echo '$(srcdir)/'`stanha.c + +libTanh_la-dtanha.lo: dtanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-dtanha.lo -MD -MP -MF $(DEPDIR)/libTanh_la-dtanha.Tpo -c -o libTanh_la-dtanha.lo `test -f 'dtanha.c' || echo '$(srcdir)/'`dtanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-dtanha.Tpo $(DEPDIR)/libTanh_la-dtanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtanha.c' object='libTanh_la-dtanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-dtanha.lo `test -f 'dtanha.c' || echo '$(srcdir)/'`dtanha.c + +libTanh_la-ctanha.lo: ctanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-ctanha.lo -MD -MP -MF $(DEPDIR)/libTanh_la-ctanha.Tpo -c -o libTanh_la-ctanha.lo `test -f 'ctanha.c' || echo '$(srcdir)/'`ctanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-ctanha.Tpo $(DEPDIR)/libTanh_la-ctanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctanha.c' object='libTanh_la-ctanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-ctanha.lo `test -f 'ctanha.c' || echo '$(srcdir)/'`ctanha.c + +libTanh_la-ztanha.lo: ztanha.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -MT libTanh_la-ztanha.lo -MD -MP -MF $(DEPDIR)/libTanh_la-ztanha.Tpo -c -o libTanh_la-ztanha.lo `test -f 'ztanha.c' || echo '$(srcdir)/'`ztanha.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libTanh_la-ztanha.Tpo $(DEPDIR)/libTanh_la-ztanha.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztanha.c' object='libTanh_la-ztanha.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libTanh_la_CFLAGS) $(CFLAGS) -c -o libTanh_la-ztanha.lo `test -f 'ztanha.c' || echo '$(srcdir)/'`ztanha.c + +testDoubleTanh-testDoubleTanh.o: testDoubleTanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -MT testDoubleTanh-testDoubleTanh.o -MD -MP -MF $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo -c -o testDoubleTanh-testDoubleTanh.o `test -f 'testDoubleTanh.c' || echo '$(srcdir)/'`testDoubleTanh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo $(DEPDIR)/testDoubleTanh-testDoubleTanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTanh.c' object='testDoubleTanh-testDoubleTanh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -c -o testDoubleTanh-testDoubleTanh.o `test -f 'testDoubleTanh.c' || echo '$(srcdir)/'`testDoubleTanh.c + +testDoubleTanh-testDoubleTanh.obj: testDoubleTanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -MT testDoubleTanh-testDoubleTanh.obj -MD -MP -MF $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo -c -o testDoubleTanh-testDoubleTanh.obj `if test -f 'testDoubleTanh.c'; then $(CYGPATH_W) 'testDoubleTanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTanh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleTanh-testDoubleTanh.Tpo $(DEPDIR)/testDoubleTanh-testDoubleTanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleTanh.c' object='testDoubleTanh-testDoubleTanh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleTanh_CFLAGS) $(CFLAGS) -c -o testDoubleTanh-testDoubleTanh.obj `if test -f 'testDoubleTanh.c'; then $(CYGPATH_W) 'testDoubleTanh.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleTanh.c'; fi` + +testFloatTanh-testFloatTanh.o: testFloatTanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -MT testFloatTanh-testFloatTanh.o -MD -MP -MF $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo -c -o testFloatTanh-testFloatTanh.o `test -f 'testFloatTanh.c' || echo '$(srcdir)/'`testFloatTanh.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo $(DEPDIR)/testFloatTanh-testFloatTanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTanh.c' object='testFloatTanh-testFloatTanh.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -c -o testFloatTanh-testFloatTanh.o `test -f 'testFloatTanh.c' || echo '$(srcdir)/'`testFloatTanh.c + +testFloatTanh-testFloatTanh.obj: testFloatTanh.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -MT testFloatTanh-testFloatTanh.obj -MD -MP -MF $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo -c -o testFloatTanh-testFloatTanh.obj `if test -f 'testFloatTanh.c'; then $(CYGPATH_W) 'testFloatTanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTanh.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatTanh-testFloatTanh.Tpo $(DEPDIR)/testFloatTanh-testFloatTanh.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatTanh.c' object='testFloatTanh-testFloatTanh.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatTanh_CFLAGS) $(CFLAGS) -c -o testFloatTanh-testFloatTanh.obj `if test -f 'testFloatTanh.c'; then $(CYGPATH_W) 'testFloatTanh.c'; else $(CYGPATH_W) '$(srcdir)/testFloatTanh.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/elementaryFunctions/tanh/ctanha.c b/2.3-1/src/c/elementaryFunctions/tanh/ctanha.c new file mode 100644 index 00000000..e8f9bdf8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/ctanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" + +void ctanha(floatComplex* x, int size, floatComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ctanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c b/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c new file mode 100644 index 00000000..5111dbd7 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/ctanhs.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" +#include "tan.h" + +floatComplex ctanhs(floatComplex z) { + float real = creals(z); + float imag = cimags(z); + + floatComplex result = ctans(FloatComplex(-imag, real)); + return (FloatComplex(cimags(result), -creals(result))); +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/dtanha.c b/2.3-1/src/c/elementaryFunctions/tanh/dtanha.c new file mode 100644 index 00000000..d7fce426 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/dtanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" + +void dtanha(double* x, int size, double* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = dtanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/dtanhs.c b/2.3-1/src/c/elementaryFunctions/tanh/dtanhs.c new file mode 100644 index 00000000..b968010e --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/dtanhs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "tanh.h" + +double dtanhs(double x) { + return (tanh(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/stanha.c b/2.3-1/src/c/elementaryFunctions/tanh/stanha.c new file mode 100644 index 00000000..1474e467 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/stanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" + +void stanha(float* x, int size, float* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = stanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/stanhs.c b/2.3-1/src/c/elementaryFunctions/tanh/stanhs.c new file mode 100644 index 00000000..80462855 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/stanhs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "tanh.h" + +float stanhs(float x) { + return (tanhf(x)); +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/testDoubleTanh.c b/2.3-1/src/c/elementaryFunctions/tanh/testDoubleTanh.c new file mode 100644 index 00000000..3aecd1f4 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/testDoubleTanh.c @@ -0,0 +1,496 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testTanh.h" + +#define SOURCE {0.7062616096809506416321,0.4090520101599395275116,0.3011248558759689331055,\ +0.1880126395262777805328,0.1796709178015589714050,0.2828889950178563594818,\ +0.7232380937784910202026,0.7360379849560558795929,0.1852612206712365150452,\ +0.7703790138475596904755,0.1914967410266399383545,0.7521587223745882511139,\ +0.6205883463844656944275,0.2807604051195085048676,0.2289868686348199844360,\ +0.5049233403988182544708,0.8354099662974476814270,0.8174716415815055370331,\ +0.0030740275979042053223,0.3677616142667829990387,0.8278525872156023979187,\ +0.72754097869619727135,0.5323124285787343978882,0.9267726917751133441925,\ +0.9542504185810685157776,0.3162104780785739421845,0.5789009965956211090088,\ +0.6881225542165338993073,0.3714061146602034568787,0.1705444059334695339203,\ +0.1954363007098436355591,0.978800852317363023758,0.9300233917310833930969,\ +0.5357720064930617809296,0.3947123587131500244141,0.1344871171750128269196,\ +0.7380615202710032463074,0.588114650454372167587,0.9113173168152570724487,\ +0.5682763461954891681671,0.1127616921439766883850,0.9478473584167659282684,\ +0.5237770043313503265381,0.8140139640308916568756,0.1400952627882361412048,\ +0.2763446993194520473480,0.9059953633695840835571,0.1379901585169136524200,\ +0.5603838684037327766419,0.3008610638789832592011,0.4767417535185813904,\ +0.8127435916103422641754,0.1988414181396365165710,0.1107953130267560482025,\ +0.2159351315349340438843,0.6467244853265583515167,0.6597879612818360328674,\ +0.0691898013465106487274,0.9164751060307025909424,0.8635670826770365238190,\ +0.5032854294404387474060,0.1832137755118310451508,0.8403698671609163284302,\ +0.9247214836068451404572,0.6229452537372708320618,0.2773811477236449718475,\ +0.2479109913110733032227,0.3891948559321463108063,0.0436578569933772087097,\ +0.8132526441477239131928,0.7686451207846403121948,0.4041520212776958942413,\ +0.8579940209165215492249,0.6993723283521831035614,0.0828925184905529022217,\ +0.9201254160143435001373,0.5200281282886862754822,0.9351884997449815273285,\ +0.8825624976307153701782,0.2245844271965324878693,0.2153332801535725593567,\ +0.4327089670114219188690,0.5800157263875007629395,0.8876141034997999668121,\ +0.5258982880041003227234,0.859640696551650762558,0.7337234076112508773804,\ +0.7134532411582767963409,0.1087165409699082374573,0.8477638359181582927704,\ +0.6594733335077762603760,0.7916418449021875858307,0.6067967480048537254334,\ +0.4102901122532784938812,0.1958728153258562088013,0.241527963895350694656,\ +0.5113455550745129585266,0.9119556057266891002655,0.0928984880447387695313,\ +0.7438839026726782321930,0.1938720373436808586121,0.4355978979729115962982,\ +0.9922429900616407394409,0.4533818070776760578156,0.8269640663638710975647,\ +0.8889675955288112163544,0.4682085178792476654053,0.3856786251999437808991,\ +0.4124865522608160972595,0.6955242282710969448090,0.0978972557932138442993,\ +0.8728604433126747608185,0.6359515609219670295715,0.4129665228538215160370,\ +0.0294486805796623229980,0.1809961968101561069489,0.7658103061839938163757,\ +0.1232470511458814144135,0.0170737411826848983765,0.8835507561452686786652,\ +0.3164170170202851295471,0.9378212536685168743134,0.3916359134018421173096,\ +0.0844073877669870853424,0.6934146797284483909607,0.4618808380328118801117,\ +0.9355291295796632766724,0.0842495900578796863556,0.5402926551178097724915,\ +0.5613215523771941661835,0.1306025832891464233398,0.5840523042716085910797,\ +0.0048661706969141960144,0.2761953338049352169037,0.7478824090212583541870,\ +0.0194325004704296588898,0.6444276878610253334045,0.2243968318216502666473,\ +0.2478402368724346160889,0.1196091384626924991608,0.1883201440796256065369,\ +0.3393343067727982997894,0.959958622232079505920,0.2847225037403404712677,\ +0.8766820700839161872864,0.2853349032811820507050,0.5103433504700660705566,\ +0.8752629184164106845856,0.5941145820543169975281,0.3945342986844480037689,\ +0.4661326166242361068726,0.0073588271625339984894,0.5170202488079667091370,\ +0.4690007264725863933563,0.6654530800879001617432,0.9476742581464350223541,\ +0.4933638339862227439880,0.2918433747254312038422,0.2016727942973375320435,\ +0.7016656589694321155548,0.8736049132421612739563,0.191055159550160169601,\ +0.5307010114192962646484,0.8889481076039373874664,0.0115523664280772209167,\ +0.4998398735187947750092,0.6700848620384931564331,0.4995208983309566974640,\ +0.1538907447829842567444,0.2571737091057002544403,0.9586529098451137542725,\ +0.6246025026775896549225,0.9371285131201148033142,0.9923511571250855922699,\ +0.3454555813223123550415,0.7558249053545296192169,0.2107181670144200325012,\ +0.9372652801685035228729,0.6767524704337120056152,0.7465373151935636997223,\ +0.4050982249900698661804,0.5101723610423505306244,0.9497965183109045028687,\ +0.0289692510850727558136,0.1634070957079529762268,0.4146909262053668498993,\ +0.0021650679409503936768,0.1810030029155313968658,0.4556188201531767845154,\ +0.1977851442061364650726,0.6053877938538789749146,0.4363054675050079822540,\ +0.8938506888225674629211,0.6104825991205871105194,0.4316215068101882934570,\ +0.2315693595446646213532,0.4675927339121699333191,0.6150764389894902706146,\ +0.8621218334883451461792,0.3846137975342571735382} + +#define RESULT {0.6083272331025194601395,0.3876674561956683362496,0.2923416719993215950879,\ +0.1858281840181150723623,0.1777622033720960281755,0.2755767974985386392639,\ +0.6189110466547474986854,0.6267454363670084127591,0.1831704252906815044710,\ +0.6471497862444923754310,0.1891897820789192330437,0.6364350501403950310930,\ +0.5515375365220808179245,0.2736087067004031037065,0.2250667607234114742099,\ +0.4659802867043164043004,0.6833702176797041838441,0.6736913883505325495449,\ +0.0030740179151169427958,0.3520322698255886617602,0.6793212620436761550735,\ +0.6215586405472446340781,0.4871467381023854570366,0.7290856689840882198794,\ +0.7417012620322497307157,0.3060764076080783047118,0.5218661923298004712279,\ +0.5967745422524275422660,0.3552210140242362257368,0.1689099681737986358154,\ +0.1929854853271556480721,0.752546334797111304837,0.7306048018962054690917,\ +0.4897808669902837253041,0.3754155858264546230529,0.1336821273676178090106,\ +0.6279725491443334250974,0.5285382896600216984240,0.7217639239261176564710,\ +0.5140922941464451945137,0.1122861813568946515174,0.7388069522259688159949,\ +0.4806098503179282999120,0.6717986111263679616101,0.1391858664071369267035,\ +0.2695186533316221155765,0.7192045990350994788543,0.1371209417264223628941,\ +0.5082621919460940107527,0.2921004060298734161805,0.4436303990482610704049,\ +0.6711009797617260019820,0.1962616190799932602840,0.1103441684263640337749,\ +0.2126403628770875964271,0.5694607822364758931144,0.5782222848708917783966,\ +0.0690796032269536119941,0.7242256121481682740182,0.69809096281132376749,\ +0.4646970495827091318652,0.1811909351875044538183,0.6860049185734097276779,\ +0.7281233753912585981993,0.5531753555435303670862,0.2704795450464865247398,\ +0.2429539608603658584762,0.3706659125047845337875,0.0436301407089985798793,\ +0.6713806714122574348380,0.6461409215061649780054,0.3834959767038711997422,\ +0.6952226974662015779316,0.6039692179338833621927,0.0827031826719682033877,\ +0.7259567403708432342668,0.4777217213658969674484,0.7330037868445029580755,\ +0.7077007368815937393691,0.2208832069439833623026,0.2120656512810102645172,\ +0.4075827434794156989284,0.5226768598581769120770,0.7102132909685879846862,\ +0.4822394836530664030683,0.6960725041612901842214,0.6253380086104668444946,\ +0.6128377044260436834477,0.1082902389835735668111,0.6898994401629748862703,\ +0.5780128119634093675217,0.6593381318630107124079,0.5418683181743142451836,\ +0.3887189835668665716106,0.1934057072291916479223,0.2369384549831176911550,\ +0.4709929270514126020686,0.7220695597477664318120,0.0926321653854568632935,\ +0.6314859919362979523427,0.1914790269022769997331,0.4099889146528875039088,\ +0.7583171167988222993728,0.4246748836724252296193,0.6788424846042582228023,\ +0.7108834330723724503898,0.4367506950167392987261,0.3676288421910962611605,\ +0.3905819425256221721909,0.6015191410314820741334,0.0975857051379892537213,\ +0.7028245349377849615635,0.5621367138424371301397,0.3909886152936559167159,\ +0.0294401706564003176614,0.1790453013287252037600,0.6444866108356477329977,\ +0.1226267854182154504183,0.0170720823056739953727,0.7081936907445306461639,\ +0.3062635855747415369876,0.7342196272687927516287,0.3727696775311670207564,\ +0.0842075009021545223264,0.6001711719907401043628,0.4316159054333421063454,\ +0.7331613587758020189611,0.0840508200406931138549,0.4932094637687579607999,\ +0.5089573121007661127280,0.1298650506608897969851,0.5256044879043626494308,\ +0.0048661322875914753833,0.2693801321981743046585,0.6338839281129466929343,\ +0.0194300547927987350694,0.5679067732631524201281,0.2207047568409323534677,\ +0.2428873816732023682707,0.1190419938419155360121,0.1861250528158440442628,\ +0.3268829619862821389553,0.7442584101595816070685,0.2772702073231406161291,\ +0.7047532323150516031518,0.2778354302962353084006,0.4702126778004429574764,\ +0.7040382261737980762462,0.5328484040985558278791,0.3752626107952297673798,\ +0.43506925228714365961,0.0073586943328478923027,0.4753969607482095849349,\ +0.4373915670200547722857,0.5819809696038570345777,0.7387283262105414083365,\ +0.4568821823646959101595,0.2838305708191527498840,0.1989824153354164404384,\ +0.6054239725907547553518,0.7032010676851431218992,0.1887639704824971842445,\ +0.4859167650222710466146,0.7108737933392066388194,0.0115518525401329084923,\ +0.461991216833716300538,0.5850357022343135593445,0.4617402854275272083839,\ +0.1526873114812071496882,0.2516501130208930181453,0.7436753924988391828421,\ +0.5543244269171754279313,0.7339001657945646295289,0.7583630791792929093376,\ +0.3323391775157006899910,0.6386111600303081559105,0.2076538016886759763224,\ +0.7339632624841636587831,0.5894041048692751916249,0.6330786187202321890766,\ +0.3843027300435838400361,0.4700794834210440531486,0.7396909169647786219670,\ +0.0289611499702619457075,0.1619680384735620870540,0.3924484198089013831101,\ +0.0021650645580242309542,0.1790518892412555074234,0.4265067109232646425099,\ +0.1952458211607971949597,0.5408723031703753791888,0.4105773773696593798022,\ +0.7132904548568874680825,0.5444667235672814298297,0.4066755344379027192758,\ +0.2275170058253208615895,0.4362522385676954606026,0.5476906607425194861705,\ +0.6973492805657204307579,0.3667075667170831554387} + +#define ZSOURCER {0.6045256052166223526001,0.9455216196365654468536,0.4476299257948994636536,\ +0.8624908211641013622284,0.1751048639416694641113,0.2067177616991102695465,\ +0.6848411662504076957703,0.1348653226159512996674,0.0069159921258687973022,\ +0.1496290047653019428253,0.5665438110008835792542,0.4359452719800174236298,\ +0.6547604538500308990479,0.3381605879403650760651,0.4259321158751845359802,\ +0.3060420057736337184906,0.7704779822379350662231,0.7058695447631180286408,\ +0.2373670237138867378235,0.8205849635414779186249,0.6789963841438293457031,\ +0.5250809141434729099274,0.3359806565567851066589,0.8941988362930715084076,\ +0.5461782198399305343628,0.7568633262999355792999,0.0259526828303933143616,\ +0.3250150899402797222138,0.6072143577039241791,0.8756139636971056461334,\ +0.2962085595354437828064,0.4229678637348115444183,0.4243144039064645767212,\ +0.7620028969831764698029,0.3622896494343876838684,0.5658242437057197093964,\ +0.6424440070986747741699,0.7580267959274351596832,0.2531452132388949394226,\ +0.5266989110969007015228,0.2118590380996465682983,0.4779220153577625751495,\ +0.1615962767973542213440,0.9168031658045947551727,0.5461866445839405059815,\ +0.4686870560981333255768,0.7772213732823729515076,0.5871783248148858547211,\ +0.5848031807690858840942,0.3139644009061157703400,0.3204141603782773017883,\ +0.3331634956412017345429,0.2282590121030807495117,0.2750317254103720188141,\ +0.4963629124686121940613,0.7453477247618138790131,0.1155001949518918991089,\ +0.0626524840481579303741,0.0877018878236413002014,0.5507565210573375225067,\ +0.2116370312869548797607,0.8335358710028231143951,0.4045845707878470420837,\ +0.2880227542482316493988,0.1750094983726739883423,0.0051561561413109302521,\ +0.3109287889674305915833,0.6602919283322989940643,0.9722995534539222717285,\ +0.9826813959516584873200,0.0455837054178118705750,0.4096118300221860408783,\ +0.7104403134435415267944,0.3917615194804966449738,0.5571686858311295509338,\ +0.0565565521828830242157,0.1540721096098423004150,0.9109257892705500125885,\ +0.5713340407237410545349,0.3488348922692239284515,0.8972954172641038894653,\ +0.2973396372981369495392,0.1091936426237225532532,0.7626331257633864879608,\ +0.6584706604480743408203,0.6996708759106695652008,0.6756794182583689689636,\ +0.9004421546123921871185,0.6668148916214704513550,0.8518152837641537189484,\ +0.8365677157416939735413,0.1291190306656062602997,0.6095453463494777679443,\ +0.2412315667606890201569,0.4029275467619299888611,0.3019328541122376918793,\ +0.1083198729902505874634,0.8456356939859688282013,0.9417407037690281867981,\ +0.9083450469188392162323,0.1937242373824119567871,0.5318046086467802524567,\ +0.8314437521621584892273,0.4952740012668073177338,0.7465563025325536727905,\ +0.7102393140085041522980,0.5811418974772095680237,0.7035941029898822307587,\ +0.3746570833027362823486,0.3394373343326151371002,0.6322447275742888450623,\ +0.7636191300116479396820,0.6940386760979890823364,0.8735245508141815662384,\ +0.3612738298252224922180,0.7933200257830321788788,0.4830590635538101196289,\ +0.2469964125193655490875,0.5025922833010554313660,0.7430270477198064327240,\ +0.6783937942236661911011,0.4903185223229229450226,0.709806025959551334381,\ +0.3303662906400859355927,0.6815545372664928436279,0.0701365978457033634186,\ +0.4745870968326926231384,0.8091805852018296718597,0.9447045121341943740845,\ +0.5478458073921501636505,0.1216687532141804695129,0.9161847713403403759003,\ +0.3045207932591438293457,0.6502694808878004550934,0.0987624628469347953796,\ +0.8391053467057645320892,0.0328534897416830062866,0.3461971958167850971222,\ +0.2801467711105942726135,0.5500544901005923748016,0.0729318000376224517822,\ +0.0225322381593286991119,0.50267804320901632309,0.3478884599171578884125,\ +0.4298669416457414627075,0.3537984383292496204376,0.0529730813577771186829,\ +0.9533003675751388072968,0.1842019557952880859375,0.958756382111459970474,\ +0.3245136169716715812683,0.0003973259590566158295,0.0972583871334791183472,\ +0.4378789965994656086,0.3634226778522133827210,0.2685119728557765483856,\ +0.2770298384130001068115,0.8854365111328661441803,0.5216628303751349449158,\ +0.4979983693920075893,0.8733724001795053482056,0.4699407932348549365997,\ +0.9364062966778874397278,0.1337622734718024730682,0.2712419554591178894043,\ +0.1766990595497190952301,0.0543269468471407890320,0.8402757882140576839447,\ +0.7507283594459295272827,0.3062269617803394794464,0.9195641661062836647034,\ +0.1318263853900134563446,0.0826364941895008087158,0.8222710476256906986237,\ +0.4441085970029234886169,0.9617503038607537746429,0.0283641982823610305786,\ +0.1431905967183411121368,0.3793597565963864326477,0.6144003230147063732147,\ +0.2128270715475082397461,0.4704488315619528293610,0.2076055286452174186707,\ +0.7435979112051427364349,0.3391801547259092330933,0.2479635034687817096710,\ +0.6721735307946801185608,0.9013197491876780986786,0.2140864841639995574951,\ +0.8460668534971773624420,0.1650043567642569541931,0.4003686285577714443207,\ +0.5522825215011835098267,0.0638249483890831470490,0.6903966935351490974426,\ +0.8547787251882255077362,0.0291904583573341369629,0.5434663915075361728668,\ +0.6236743135377764701843,0.2417052476666867733002} + +#define ZSOURCEI {0.5503273960202932357788,0.6906704087741672992706,0.9835249418392777442932,\ +0.8285484607331454753876,0.2062614001333713531494,0.1944643096067011356354,\ +0.4367609983310103416443,0.8090620837174355983734,0.8818644303828477859497,\ +0.7404803228564560413361,0.7542522149160504341126,0.9921960639767348766327,\ +0.9886121451854705810547,0.0113218077458441257477,0.9367801276966929435730,\ +0.3874237253330647945404,0.2886805813759565353394,0.567788839805871248245,\ +0.7295644441619515419006,0.0303032915107905864716,0.2795897088944911956787,\ +0.7047131718136370182037,0.7442112853750586509705,0.8920237845741212368012,\ +0.1081438604742288589478,0.8751525697298347949982,0.9068333031609654426575,\ +0.2166852983646094799042,0.4824190363287925720215,0.7766945236362516880035,\ +0.4510916722938418388367,0.1300636469386518001556,0.5505470838397741317749,\ +0.6936193336732685565949,0.1749099576845765113831,0.8636093880049884319305,\ +0.2150467522442340850830,0.1886725709773600101471,0.1796098565682768821716,\ +0.4374312213622033596039,0.8514516223222017288208,0.7381969136185944080353,\ +0.8102188156917691230774,0.1460137623362243175507,0.8999849110841751098633,\ +0.4043733575381338596344,0.0156995235010981559753,0.6904196902178227901459,\ +0.2990311514586210250855,0.1383218024857342243195,0.8478512773290276527405,\ +0.3007262717001140117645,0.229154746979475021362,0.8078110129572451114655,\ +0.3176332255825400352478,0.6924462593160569667816,0.1364154014736413955689,\ +0.5433279541321098804474,0.3276594849303364753723,0.2006831648759543895721,\ +0.5037304237484931945801,0.4962565028108656406403,0.8996161324903368949890,\ +0.9357709079049527645111,0.3390339072793722152710,0.6029155333526432514191,\ +0.4153500730171799659729,0.3041478390805423259735,0.8489827848970890045166,\ +0.4482063786126673221588,0.0903797810897231101990,0.7382151386700570583344,\ +0.2669597584754228591919,0.8226196658797562122345,0.3985779182985424995422,\ +0.9789295899681746959686,0.3041231036186218261719,0.0663515278138220310211,\ +0.6667758254334330558777,0.7548807277344167232513,0.1922533493489027023315,\ +0.7942791883833706378937,0.5580398896709084510803,0.2016023616306483745575,\ +0.787146832793951034546,0.0955459238030016422272,0.6623697867617011070252,\ +0.864868474658578634262,0.7013061288744211196899,0.8015053984709084033966,\ +0.9135685982182621955872,0.6317234965972602367401,0.9346773549914360046387,\ +0.9157753759063780307770,0.0510348035022616386414,0.4329969524405896663666,\ +0.9721843507140874862671,0.8001508046872913837433,0.8452261472120881080627,\ +0.0610524858348071575165,0.8168097324669361114502,0.2101262793876230716705,\ +0.3055453812703490257263,0.9465212575159966945648,0.9269728232175111770630,\ +0.7737778765149414539337,0.5893978821113705635071,0.2377697187475860118866,\ +0.5269544571638107299805,0.0077543654479086399078,0.8311711428686976432800,\ +0.0268517597578465938568,0.2591186594218015670776,0.4641277943737804889679,\ +0.6098861405625939369202,0.0656952331773936748505,0.6466812007129192352295,\ +0.1018534512259066104889,0.2742705782875418663025,0.8162728524766862392426,\ +0.3357750270515680313110,0.4765891996212303638458,0.8440040023997426033020,\ +0.1785074654035270214081,0.5855625644326210021973,0.8426241897977888584137,\ +0.7058847947046160697937,0.7396617024205625057221,0.9751448985189199447632,\ +0.7606669445522129535675,0.8236690396443009376526,0.8889620001427829265595,\ +0.7960178293287754058838,0.3052428201772272586823,0.6803312664851546287537,\ +0.6412069997750222682953,0.0988248009234666824341,0.4654508423991501331329,\ +0.6714970665052533149719,0.5131103205494582653046,0.8631567060947418212891,\ +0.8328299173153936862946,0.1687975851818919181824,0.2961277081631124019623,\ +0.2591485660523176193237,0.1700844173319637775421,0.9718958893790841102600,\ +0.0695185582153499126434,0.4696230851113796234131,0.9544191421009600162506,\ +0.3679352095350623130798,0.2973918146453797817230,0.0415310803800821304321,\ +0.4892336544580757617950,0.5171590568497776985169,0.3534862431697547435761,\ +0.2354387864470481872559,0.6779259913600981235504,0.3834532154724001884460,\ +0.3174350797198712825775,0.3418120350688695907593,0.0535557498224079608917,\ +0.9285596096888184547424,0.3862650538794696331024,0.4328473098576068878174,\ +0.1581165478564798831940,0.7887120461091399192810,0.7448797873221337795258,\ +0.5185996759682893753052,0.8651678604073822498322,0.1524438308551907539368,\ +0.2392775672487914562225,0.5761575847864151000977,0.7395762302912771701813,\ +0.0583172617480158805847,0.6962534948252141475678,0.4206145536154508590698,\ +0.0281158541329205036163,0.8313249954953789710999,0.2333360086195170879364,\ +0.8865877203643321990967,0.3746785433031618595123,0.87671328987926244736,\ +0.4027077830396592617035,0.2890332732349634170532,0.8538430598564445972443,\ +0.5499771209433674812317,0.5128610017709434032440,0.6321087554097175598145,\ +0.4165538274683058261871,0.3217771751806139945984,0.9717370062135159969330,\ +0.5348322447389364242554,0.3416590173728764057159,0.9565287167206406593323,\ +0.9951003189198672771454,0.3422884084284305572510,0.7870580093003809452057,\ +0.9234123295173048973084,0.5238970420323312282562} + +#define ZRESULTR {0.6700223015238303547747,0.9051590648529930227539,0.9783774998303537140387,\ +0.9672554578415690773596,0.1806879116022510611828,0.2113884833531175511112,\ +0.6724311908168314477763,0.2759693779071136221504,0.0171117603025009445972,\ +0.2676571377242007998554,0.7836070482910290069256,0.9837911114618788088748,\ +1.0787649507707848250959,0.3258715909732741722316,0.8818391305817397940459,\ +0.3412489698350346656319,0.6791962837910036077105,0.7436127103435716811930,\ +0.40184826884232582866,0.6757254959645757619313,0.6216816234807176488886,\ +0.7106811634553994450059,0.5496317899100798820555,1.015517869987778709628,\ +0.5020506061187628432663,0.9811456923663512963429,0.0682501782366792819623,\ +0.3276872649171290174941,0.6393144648282618192070,0.9360249253515308121010,\ +0.3486021801541281939230,0.405155698729944113712,0.5200555835311830854550,\ +0.8452234271752276928424,0.3567295147730688009702,0.8928456199942530480129,\ +0.5846382117554749235922,0.6534877266970448017602,0.2555268336748864332897,\ +0.5599022272385358878211,0.4549851524880720865518,0.6983186009546583639107,\ +0.3278445848029415965463,0.7317436304730139395858,0.9243668151604532701171,\ +0.4997101034619103598899,0.6512014053656888235011,0.7461784468374338397112,\ +0.5613804235723615088105,0.309377290465780441231,0.6302193796318024121561,\ +0.3488048678688123183100,0.2359369023748482674385,0.5207697215592063111345,\ +0.4975483327992256676886,0.8371220343907752603485,0.1171268218028372609663,\ +0.085272785233540815408,0.0974986984973703479929,0.5164560743022618138909,\ +0.2683348894394235739647,0.7764310536494951620057,0.8045234481921298419493,\ +0.6958959159533119054331,0.1940650650900959395262,0.0075996484393591736892,\ +0.3536342521606328781481,0.6152689741862609196232,0.9952856734893198442649,\ +0.8206704954595607226509,0.0459255053037718463660,0.6307753783837566352588,\ +0.6388147154641353742122,0.6937233166977520015806,0.5697295509652193779004,\ +0.1802327077236753061218,0.1675371469878289276689,0.7230999921866064772402,\ +0.7176490691010239952874,0.5749086647774364067232,0.7279693322506849417763,\ +0.5413870504782296588786,0.1504476557625347432623,0.6581157602540366191590,\ +0.8675383161064098569426,0.6076707020048850438343,0.7819483789931592765399,\ +0.9976690503006511168138,0.8038234125831255072470,0.9466047824946693944881,\ +1.0263044057305568124150,0.1954383476167207978058,0.9991226583234396052546,\ +0.5824462236684256888353,0.3833026614151368027805,0.3492943337672331227672,\ +0.3315115099350262606315,0.9442386171423264862312,0.9899258002262354416700,\ +0.7216294786971718666635,0.3920325460401206107974,0.5034740230892749135450,\ +0.715969761025848305813,0.9550125571098367904810,1.0265780142294762544708,\ +0.8803585794351714843842,0.6748726933268143213240,0.6286862272305427934427,\ +0.4593360950510761986365,0.3269925373376404986736,0.8950979801820350134634,\ +0.6434757060207739742808,0.6268824366882729259842,0.7824259493911607243888,\ +0.4869178781705328362683,0.6618946105318512795890,0.6319261919275969141552,\ +0.2444724751522657224534,0.4924981727592058766696,0.9272283746811394999909,\ +0.6354081057135144705583,0.5455716136398853777223,0.9397290975289604997300,\ +0.3281437517029104355970,0.7390025847943897385761,0.1571298352097142136952,\ +0.6681717696917298665582,0.893260926700763513431,1.0727843133940448971941,\ +0.7758756582495047737780,0.2577884404871108037227,1.0152118695965053341013,\ +0.553316515865495128779,0.6088582613070312454795,0.1618775254222162562900,\ +0.8458278989313633422498,0.0331641659985394132715,0.4056540942022494600217,\ +0.4254458405105830398618,0.6108828412056167556088,0.1710530527126769284596,\ +0.0497407205620656947542,0.4747317015892947855704,0.3618696796533303894350,\ +0.4287418625744875422257,0.3485740919790226710617,0.1655375133873851212218,\ +0.7428884062630719542497,0.2271172969578298117543,1.0587395337282918816868,\ +0.3549940948693925402147,0.0004346469449674766222,0.0971187244038783509259,\ +0.5043807505243238509252,0.4434874448032950500220,0.2951797103676901401492,\ +0.2845053188094572860223,0.8815102337365799956004,0.5368898054807562658652,\ +0.4988328370209159090543,0.745435623332440511213,0.4391683137636283595917,\ +1.0422403039497714072326,0.1545117394214212958037,0.3165746040477503964183,\ +0.1791895467797269270172,0.1089461488105609721089,0.9065124792766549033374,\ +0.7446224625751999282031,0.6296662678760955866864,0.7337000953456223051319,\ +0.1387263358911398902773,0.1169149268680415021393,0.8975235374861081361075,\ +0.4182178630757872883628,0.9119369228139623251295,0.0340248805832462572485,\ +0.1423301258754861298161,0.6888548451397347172076,0.5685106882588889520847,\ +0.4923020191500164788323,0.4917581413760083730580,0.4716616017939372351719,\ +0.6955693872489776552470,0.3523112018531558975454,0.5222250480132760719343,\ +0.7144705774015845944902,0.8119440584245034564503,0.3164274689259520823015,\ +0.7538323331802344595687,0.1811571114058267151226,0.9128449761317551924833,\ +0.6233160136433549824986,0.0717615749734574065455,1.0473491540209625139113,\ +1.0924869453095222837646,0.0328835678516360627177,0.7973589739562461087274,\ +0.9908609316019793000763,0.3104246876762664641980} + +#define ZRESULTI {0.3914561710408779870996,0.2745677431871340612446,0.8850988190375015385314,\ +0.3546606100359354085683,0.2026838146454169320432,0.1884673919393772267839,\ +0.2801601885873738484456,1.0096958835716720592757,1.21412343558816204769,\ +0.8776375911322839007411,0.5620073675207013508270,0.9130433942963852578245,\ +0.5770284711891953133289,0.0101200891695042028556,0.8779935002098492313749,\ +0.3667139971005198284537,0.1664312994282131086266,0.3494312783943472333625,\ +0.8104125516371111226377,0.0164786111567649697085,0.1816457336156695190343,\ +0.5593166230651334114299,0.7569161316066348454967,0.3415023725885689698245,\ +0.0814423238542508892701,0.4465689540632135634546,1.275733507144991119020,\ +0.197487841611818731868,0.3421719548772197971864,0.3349549978483222778536,\ +0.4357966181675047567801,0.1096343010109522564388,0.4859836370575167374675,\ +0.3800931088000560897910,0.1548265257107722947527,0.6348894325615116462913,\ +0.1460748031318926942745,0.1110957110750060844451,0.1700664034230296439709,\ +0.3412176537402174525404,1.0332395638414424432483,0.6273383485614248966655,\ +0.9957192459042429888427,0.0691093109901288471519,0.6804424693811944591104,\ +0.3344738416260302771299,0.0090436204351948476510,0.5006804162977720462635,\ +0.2172201211207329951680,0.1261162082552027552396,0.9120640605812813106468,\ +0.2753688308103523496584,0.2209039383694014757609,0.8997305533684579748055,\ +0.2536420004619579504634,0.3903699376999557602019,0.1354191697515705339328,\ +0.6007399379388951299319,0.3370127497194151389159,0.1507780721992685313282,\ +0.5203153088877445764382,0.254583375618394558426,0.8702994198605253917123,\ +1.0924089238964773684870,0.3407939274374255367306,0.6883985279629690756664,\ +0.3940203751449571356602,0.2021529986071308460094,0.2883410464579913012884,\ +0.1832164764792163502705,0.0904370855097187398286,0.6870692259557662495695,\ +0.1667494081756663859562,0.7986735402486416779411,0.2997470364729120650971,\ +1.4723672873315984954701,0.3058215886262277694030,0.0317778181669746695448,\ +0.4953897349233554736614,0.7593857543036769408573,0.0933417291983620195373,\ +0.8587250458616788595379,0.6140082043678934953235,0.1179425317948916696054,\ +0.5008800041022678506408,0.0606528647874819346053,0.4208891412439614287955,\ +0.3345057926491249999934,0.4488362148523600825278,0.356228513965734405744,\ +0.3862019012866550471408,0.7133939454258028112221,0.6183512140459618278143,\ +1.122372846973830329276,0.0435912326295722213354,0.4149318455829275609226,\ +1.4136182419356593253923,0.360095911709175209303,0.3059781012378688380693,\ +0.0293528815458468754496,0.9850054988638156094893,0.1610071461548980287226,\ +0.1615738175268226772818,0.7804595725744208900565,0.4664649257591839126569,\ +0.4516332153201338406312,0.4324429865103157633044,0.1499229835931424337225,\ +0.4861395789308433634801,0.0069254200843589181283,0.5470248281814621416075,\ +0.0157419761082240212968,0.1652796264802975090280,0.2251845784941430561599,\ +0.5809144105432306748327,0.0370371154221026954723,0.5409142410066014594605,\ +0.0961579912696427369090,0.2170435871168209518434,0.4413938390627674124289,\ +0.2180518991856933708196,0.3882731529916919055445,0.4793791546290147587150,\ +0.1615500633583723533171,0.3727683427019338191499,1.1092002442556854191480,\ +0.6007159335006776457178,0.3670729131136168943428,0.3082959548830728202518,\ +0.5833221942824414751883,1.0459318594890267828390,0.3263494274187709875967,\ +0.8544844347571096676575,0.2053831793406840910965,0.7963141410348304471967,\ +0.3137393761405720127300,0.0990397931617461729781,0.4344101753145302446946,\ +0.7023788886417181576150,0.3911554522022889779365,1.1544412437572197926983,\ +1.0984333102013155158971,0.1328621940810992829718,0.268167531788618462851,\ +0.2190523476868022068054,0.1514050595867235948777,1.452314392851102864412,\ +0.0312862499326923282350,0.4864975811326933685663,0.3000795354832859751504,\ +0.3425769720223186820540,0.3064807342294366687696,0.0411636957365836206324,\ +0.4217989293277185081088,0.4809545441238126106676,0.3404220390913085259044,\ +0.2214498702533347351817,0.3018772698523388142711,0.2996779751331964392058,\ +0.2530674633040843612974,0.1693130128868851891344,0.0432918302807213800643,\ +0.3147578695966239403781,0.3983398179395671312442,0.4233396532725078320603,\ +0.1544509091417925472634,1.000697611141370568788,0.3487050795605025621526,\ +0.3006071168291280515383,0.9542614300639570279472,0.0718340034799053589465,\ +0.2395154786718341477503,0.6434277607558438472069,0.3585399891990152521082,\ +0.0482004898594938432921,0.2679535503180693334357,0.4468782830994436072736,\ +0.0275539888537934679613,0.8228411197528838760817,0.1637277172538824099313,\ +1.0994704384405307173722,0.3084433992108448485681,1.0856016429316568405739,\ +0.2389273879432435854220,0.2631293443272026966184,1.0016126450700377770175,\ +0.3562135410626017795188,0.2353197404250201296705,0.6834823618792332799998,\ +0.2126404560740041416178,0.3234875849405334791165,0.9562375286253093076283,\ +0.4069690501749418376498,0.3539780611029934576095,0.5294802297322954709458,\ +0.3733196120144765539628,0.3559718013547358839155,0.6068341504607892566980,\ +0.5969952503542278465787,0.5352237566999263895795} + + + +void dtanhsTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out; + int i; + + for (i=0;i<200;i++){ + out=dtanhs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<3e-16); + } +} + +void ztanhsTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=DoubleComplex(inR[i],inI[i]); + out=ztanhs(in); + assert(( (fabs(zreals(out)-resR[i]))/(fabs(zreals(out))) )<3e-15); + assert(( (fabs(zimags(out)-resI[i]))/(fabs(zimags(out))) )<3e-15); + } +} + +void dtanhaTest(void) { + double in[]=SOURCE; + double res[]=RESULT; + double out[200]; + int i; + + dtanha(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<3e-15); + } +} + +void ztanhaTest(void) { + double inR[]=ZSOURCER; + double inI[]=ZSOURCEI; + double resR[]=ZRESULTR; + double resI[]=ZRESULTI; + doubleComplex *in,out[200]; + int i; + + + in=DoubleComplexMatrix(inR,inI,200); + ztanha(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(zreals(out[i])-resR[i]))/(fabs(zreals(out[i]))) )<3e-15); + assert(( (fabs(zimags(out[i])-resI[i]))/(fabs(zimags(out[i]))) )<3e-15); + } +} + + +int testTanh() { + printf("\n>>>> Double Hyperbolic Tangeant Tests\n"); + dtanhsTest(); + ztanhsTest(); + dtanhaTest(); + ztanhaTest(); + return 0; +} + +int main() { + assert(testTanh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/testFloatTanh.c b/2.3-1/src/c/elementaryFunctions/tanh/testFloatTanh.c new file mode 100644 index 00000000..33b86684 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/testFloatTanh.c @@ -0,0 +1,494 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "testTanh.h" + +#define SOURCE {0.7062616096809506416321f,0.4090520101599395275116f,0.3011248558759689331055f,\ +0.1880126395262777805328f,0.1796709178015589714050f,0.2828889950178563594818f,\ +0.7232380937784910202026f,0.7360379849560558795929f,0.1852612206712365150452f,\ +0.7703790138475596904755f,0.1914967410266399383545f,0.7521587223745882511139f,\ +0.6205883463844656944275f,0.2807604051195085048676f,0.2289868686348199844360f,\ +0.5049233403988182544708f,0.8354099662974476814270f,0.8174716415815055370331f,\ +0.0030740275979042053223f,0.3677616142667829990387f,0.8278525872156023979187f,\ +0.72754097869619727135f,0.5323124285787343978882f,0.9267726917751133441925f,\ +0.9542504185810685157776f,0.3162104780785739421845f,0.5789009965956211090088f,\ +0.6881225542165338993073f,0.3714061146602034568787f,0.1705444059334695339203f,\ +0.1954363007098436355591f,0.978800852317363023758f,0.9300233917310833930969f,\ +0.5357720064930617809296f,0.3947123587131500244141f,0.1344871171750128269196f,\ +0.7380615202710032463074f,0.588114650454372167587f,0.9113173168152570724487f,\ +0.5682763461954891681671f,0.1127616921439766883850f,0.9478473584167659282684f,\ +0.5237770043313503265381f,0.8140139640308916568756f,0.1400952627882361412048f,\ +0.2763446993194520473480f,0.9059953633695840835571f,0.1379901585169136524200f,\ +0.5603838684037327766419f,0.3008610638789832592011f,0.4767417535185813904f,\ +0.8127435916103422641754f,0.1988414181396365165710f,0.1107953130267560482025f,\ +0.2159351315349340438843f,0.6467244853265583515167f,0.6597879612818360328674f,\ +0.0691898013465106487274f,0.9164751060307025909424f,0.8635670826770365238190f,\ +0.5032854294404387474060f,0.1832137755118310451508f,0.8403698671609163284302f,\ +0.9247214836068451404572f,0.6229452537372708320618f,0.2773811477236449718475f,\ +0.2479109913110733032227f,0.3891948559321463108063f,0.0436578569933772087097f,\ +0.8132526441477239131928f,0.7686451207846403121948f,0.4041520212776958942413f,\ +0.8579940209165215492249f,0.6993723283521831035614f,0.0828925184905529022217f,\ +0.9201254160143435001373f,0.5200281282886862754822f,0.9351884997449815273285f,\ +0.8825624976307153701782f,0.2245844271965324878693f,0.2153332801535725593567f,\ +0.4327089670114219188690f,0.5800157263875007629395f,0.8876141034997999668121f,\ +0.5258982880041003227234f,0.859640696551650762558f,0.7337234076112508773804f,\ +0.7134532411582767963409f,0.1087165409699082374573f,0.8477638359181582927704f,\ +0.6594733335077762603760f,0.7916418449021875858307f,0.6067967480048537254334f,\ +0.4102901122532784938812f,0.1958728153258562088013f,0.241527963895350694656f,\ +0.5113455550745129585266f,0.9119556057266891002655f,0.0928984880447387695313f,\ +0.7438839026726782321930f,0.1938720373436808586121f,0.4355978979729115962982f,\ +0.9922429900616407394409f,0.4533818070776760578156f,0.8269640663638710975647f,\ +0.8889675955288112163544f,0.4682085178792476654053f,0.3856786251999437808991f,\ +0.4124865522608160972595f,0.6955242282710969448090f,0.0978972557932138442993f,\ +0.8728604433126747608185f,0.6359515609219670295715f,0.4129665228538215160370f,\ +0.0294486805796623229980f,0.1809961968101561069489f,0.7658103061839938163757f,\ +0.1232470511458814144135f,0.0170737411826848983765f,0.8835507561452686786652f,\ +0.3164170170202851295471f,0.9378212536685168743134f,0.3916359134018421173096f,\ +0.0844073877669870853424f,0.6934146797284483909607f,0.4618808380328118801117f,\ +0.9355291295796632766724f,0.0842495900578796863556f,0.5402926551178097724915f,\ +0.5613215523771941661835f,0.1306025832891464233398f,0.5840523042716085910797f,\ +0.0048661706969141960144f,0.2761953338049352169037f,0.7478824090212583541870f,\ +0.0194325004704296588898f,0.6444276878610253334045f,0.2243968318216502666473f,\ +0.2478402368724346160889f,0.1196091384626924991608f,0.1883201440796256065369f,\ +0.3393343067727982997894f,0.959958622232079505920f,0.2847225037403404712677f,\ +0.8766820700839161872864f,0.2853349032811820507050f,0.5103433504700660705566f,\ +0.8752629184164106845856f,0.5941145820543169975281f,0.3945342986844480037689f,\ +0.4661326166242361068726f,0.0073588271625339984894f,0.5170202488079667091370f,\ +0.4690007264725863933563f,0.6654530800879001617432f,0.9476742581464350223541f,\ +0.4933638339862227439880f,0.2918433747254312038422f,0.2016727942973375320435f,\ +0.7016656589694321155548f,0.8736049132421612739563f,0.191055159550160169601f,\ +0.5307010114192962646484f,0.8889481076039373874664f,0.0115523664280772209167f,\ +0.4998398735187947750092f,0.6700848620384931564331f,0.4995208983309566974640f,\ +0.1538907447829842567444f,0.2571737091057002544403f,0.9586529098451137542725f,\ +0.6246025026775896549225f,0.9371285131201148033142f,0.9923511571250855922699f,\ +0.3454555813223123550415f,0.7558249053545296192169f,0.2107181670144200325012f,\ +0.9372652801685035228729f,0.6767524704337120056152f,0.7465373151935636997223f,\ +0.4050982249900698661804f,0.5101723610423505306244f,0.9497965183109045028687f,\ +0.0289692510850727558136f,0.1634070957079529762268f,0.4146909262053668498993f,\ +0.0021650679409503936768f,0.1810030029155313968658f,0.4556188201531767845154f,\ +0.1977851442061364650726f,0.6053877938538789749146f,0.4363054675050079822540f,\ +0.8938506888225674629211f,0.6104825991205871105194f,0.4316215068101882934570f,\ +0.2315693595446646213532f,0.4675927339121699333191f,0.6150764389894902706146f,\ +0.8621218334883451461792f,0.3846137975342571735382f} + +#define RESULT {0.6083272331025194601395f,0.3876674561956683362496f,0.2923416719993215950879f,\ +0.1858281840181150723623f,0.1777622033720960281755f,0.2755767974985386392639f,\ +0.6189110466547474986854f,0.6267454363670084127591f,0.1831704252906815044710f,\ +0.6471497862444923754310f,0.1891897820789192330437f,0.6364350501403950310930f,\ +0.5515375365220808179245f,0.2736087067004031037065f,0.2250667607234114742099f,\ +0.4659802867043164043004f,0.6833702176797041838441f,0.6736913883505325495449f,\ +0.0030740179151169427958f,0.3520322698255886617602f,0.6793212620436761550735f,\ +0.6215586405472446340781f,0.4871467381023854570366f,0.7290856689840882198794f,\ +0.7417012620322497307157f,0.3060764076080783047118f,0.5218661923298004712279f,\ +0.5967745422524275422660f,0.3552210140242362257368f,0.1689099681737986358154f,\ +0.1929854853271556480721f,0.752546334797111304837f,0.7306048018962054690917f,\ +0.4897808669902837253041f,0.3754155858264546230529f,0.1336821273676178090106f,\ +0.6279725491443334250974f,0.5285382896600216984240f,0.7217639239261176564710f,\ +0.5140922941464451945137f,0.1122861813568946515174f,0.7388069522259688159949f,\ +0.4806098503179282999120f,0.6717986111263679616101f,0.1391858664071369267035f,\ +0.2695186533316221155765f,0.7192045990350994788543f,0.1371209417264223628941f,\ +0.5082621919460940107527f,0.2921004060298734161805f,0.4436303990482610704049f,\ +0.6711009797617260019820f,0.1962616190799932602840f,0.1103441684263640337749f,\ +0.2126403628770875964271f,0.5694607822364758931144f,0.5782222848708917783966f,\ +0.0690796032269536119941f,0.7242256121481682740182f,0.69809096281132376749f,\ +0.4646970495827091318652f,0.1811909351875044538183f,0.6860049185734097276779f,\ +0.7281233753912585981993f,0.5531753555435303670862f,0.2704795450464865247398f,\ +0.2429539608603658584762f,0.3706659125047845337875f,0.0436301407089985798793f,\ +0.6713806714122574348380f,0.6461409215061649780054f,0.3834959767038711997422f,\ +0.6952226974662015779316f,0.6039692179338833621927f,0.0827031826719682033877f,\ +0.7259567403708432342668f,0.4777217213658969674484f,0.7330037868445029580755f,\ +0.7077007368815937393691f,0.2208832069439833623026f,0.2120656512810102645172f,\ +0.4075827434794156989284f,0.5226768598581769120770f,0.7102132909685879846862f,\ +0.4822394836530664030683f,0.6960725041612901842214f,0.6253380086104668444946f,\ +0.6128377044260436834477f,0.1082902389835735668111f,0.6898994401629748862703f,\ +0.5780128119634093675217f,0.6593381318630107124079f,0.5418683181743142451836f,\ +0.3887189835668665716106f,0.1934057072291916479223f,0.2369384549831176911550f,\ +0.4709929270514126020686f,0.7220695597477664318120f,0.0926321653854568632935f,\ +0.6314859919362979523427f,0.1914790269022769997331f,0.4099889146528875039088f,\ +0.7583171167988222993728f,0.4246748836724252296193f,0.6788424846042582228023f,\ +0.7108834330723724503898f,0.4367506950167392987261f,0.3676288421910962611605f,\ +0.3905819425256221721909f,0.6015191410314820741334f,0.0975857051379892537213f,\ +0.7028245349377849615635f,0.5621367138424371301397f,0.3909886152936559167159f,\ +0.0294401706564003176614f,0.1790453013287252037600f,0.6444866108356477329977f,\ +0.1226267854182154504183f,0.0170720823056739953727f,0.7081936907445306461639f,\ +0.3062635855747415369876f,0.7342196272687927516287f,0.3727696775311670207564f,\ +0.0842075009021545223264f,0.6001711719907401043628f,0.4316159054333421063454f,\ +0.7331613587758020189611f,0.0840508200406931138549f,0.4932094637687579607999f,\ +0.5089573121007661127280f,0.1298650506608897969851f,0.5256044879043626494308f,\ +0.0048661322875914753833f,0.2693801321981743046585f,0.6338839281129466929343f,\ +0.0194300547927987350694f,0.5679067732631524201281f,0.2207047568409323534677f,\ +0.2428873816732023682707f,0.1190419938419155360121f,0.1861250528158440442628f,\ +0.3268829619862821389553f,0.7442584101595816070685f,0.2772702073231406161291f,\ +0.7047532323150516031518f,0.2778354302962353084006f,0.4702126778004429574764f,\ +0.7040382261737980762462f,0.5328484040985558278791f,0.3752626107952297673798f,\ +0.43506925228714365961f,0.0073586943328478923027f,0.4753969607482095849349f,\ +0.4373915670200547722857f,0.5819809696038570345777f,0.7387283262105414083365f,\ +0.4568821823646959101595f,0.2838305708191527498840f,0.1989824153354164404384f,\ +0.6054239725907547553518f,0.7032010676851431218992f,0.1887639704824971842445f,\ +0.4859167650222710466146f,0.7108737933392066388194f,0.0115518525401329084923f,\ +0.461991216833716300538f,0.5850357022343135593445f,0.4617402854275272083839f,\ +0.1526873114812071496882f,0.2516501130208930181453f,0.7436753924988391828421f,\ +0.5543244269171754279313f,0.7339001657945646295289f,0.7583630791792929093376f,\ +0.3323391775157006899910f,0.6386111600303081559105f,0.2076538016886759763224f,\ +0.7339632624841636587831f,0.5894041048692751916249f,0.6330786187202321890766f,\ +0.3843027300435838400361f,0.4700794834210440531486f,0.7396909169647786219670f,\ +0.0289611499702619457075f,0.1619680384735620870540f,0.3924484198089013831101f,\ +0.0021650645580242309542f,0.1790518892412555074234f,0.4265067109232646425099f,\ +0.1952458211607971949597f,0.5408723031703753791888f,0.4105773773696593798022f,\ +0.7132904548568874680825f,0.5444667235672814298297f,0.4066755344379027192758f,\ +0.2275170058253208615895f,0.4362522385676954606026f,0.5476906607425194861705f,\ +0.6973492805657204307579f,0.3667075667170831554387f} + +#define CSOURCER {0.6045256052166223526001f,0.9455216196365654468536f,0.4476299257948994636536f,\ +0.8624908211641013622284f,0.1751048639416694641113f,0.2067177616991102695465f,\ +0.6848411662504076957703f,0.1348653226159512996674f,0.0069159921258687973022f,\ +0.1496290047653019428253f,0.5665438110008835792542f,0.4359452719800174236298f,\ +0.6547604538500308990479f,0.3381605879403650760651f,0.4259321158751845359802f,\ +0.3060420057736337184906f,0.7704779822379350662231f,0.7058695447631180286408f,\ +0.2373670237138867378235f,0.8205849635414779186249f,0.6789963841438293457031f,\ +0.5250809141434729099274f,0.3359806565567851066589f,0.8941988362930715084076f,\ +0.5461782198399305343628f,0.7568633262999355792999f,0.0259526828303933143616f,\ +0.3250150899402797222138f,0.6072143577039241791f,0.8756139636971056461334f,\ +0.2962085595354437828064f,0.4229678637348115444183f,0.4243144039064645767212f,\ +0.7620028969831764698029f,0.3622896494343876838684f,0.5658242437057197093964f,\ +0.6424440070986747741699f,0.7580267959274351596832f,0.2531452132388949394226f,\ +0.5266989110969007015228f,0.2118590380996465682983f,0.4779220153577625751495f,\ +0.1615962767973542213440f,0.9168031658045947551727f,0.5461866445839405059815f,\ +0.4686870560981333255768f,0.7772213732823729515076f,0.5871783248148858547211f,\ +0.5848031807690858840942f,0.3139644009061157703400f,0.3204141603782773017883f,\ +0.3331634956412017345429f,0.2282590121030807495117f,0.2750317254103720188141f,\ +0.4963629124686121940613f,0.7453477247618138790131f,0.1155001949518918991089f,\ +0.0626524840481579303741f,0.0877018878236413002014f,0.5507565210573375225067f,\ +0.2116370312869548797607f,0.8335358710028231143951f,0.4045845707878470420837f,\ +0.2880227542482316493988f,0.1750094983726739883423f,0.0051561561413109302521f,\ +0.3109287889674305915833f,0.6602919283322989940643f,0.9722995534539222717285f,\ +0.9826813959516584873200f,0.0455837054178118705750f,0.4096118300221860408783f,\ +0.7104403134435415267944f,0.3917615194804966449738f,0.5571686858311295509338f,\ +0.0565565521828830242157f,0.1540721096098423004150f,0.9109257892705500125885f,\ +0.5713340407237410545349f,0.3488348922692239284515f,0.8972954172641038894653f,\ +0.2973396372981369495392f,0.1091936426237225532532f,0.7626331257633864879608f,\ +0.6584706604480743408203f,0.6996708759106695652008f,0.6756794182583689689636f,\ +0.9004421546123921871185f,0.6668148916214704513550f,0.8518152837641537189484f,\ +0.8365677157416939735413f,0.1291190306656062602997f,0.6095453463494777679443f,\ +0.2412315667606890201569f,0.4029275467619299888611f,0.3019328541122376918793f,\ +0.1083198729902505874634f,0.8456356939859688282013f,0.9417407037690281867981f,\ +0.9083450469188392162323f,0.1937242373824119567871f,0.5318046086467802524567f,\ +0.8314437521621584892273f,0.4952740012668073177338f,0.7465563025325536727905f,\ +0.7102393140085041522980f,0.5811418974772095680237f,0.7035941029898822307587f,\ +0.3746570833027362823486f,0.3394373343326151371002f,0.6322447275742888450623f,\ +0.7636191300116479396820f,0.6940386760979890823364f,0.8735245508141815662384f,\ +0.3612738298252224922180f,0.7933200257830321788788f,0.4830590635538101196289f,\ +0.2469964125193655490875f,0.5025922833010554313660f,0.7430270477198064327240f,\ +0.6783937942236661911011f,0.4903185223229229450226f,0.709806025959551334381f,\ +0.3303662906400859355927f,0.6815545372664928436279f,0.0701365978457033634186f,\ +0.4745870968326926231384f,0.8091805852018296718597f,0.9447045121341943740845f,\ +0.5478458073921501636505f,0.1216687532141804695129f,0.9161847713403403759003f,\ +0.3045207932591438293457f,0.6502694808878004550934f,0.0987624628469347953796f,\ +0.8391053467057645320892f,0.0328534897416830062866f,0.3461971958167850971222f,\ +0.2801467711105942726135f,0.5500544901005923748016f,0.0729318000376224517822f,\ +0.0225322381593286991119f,0.50267804320901632309f,0.3478884599171578884125f,\ +0.4298669416457414627075f,0.3537984383292496204376f,0.0529730813577771186829f,\ +0.9533003675751388072968f,0.1842019557952880859375f,0.958756382111459970474f,\ +0.3245136169716715812683f,0.0003973259590566158295f,0.0972583871334791183472f,\ +0.4378789965994656086f,0.3634226778522133827210f,0.2685119728557765483856f,\ +0.2770298384130001068115f,0.8854365111328661441803f,0.5216628303751349449158f,\ +0.4979983693920075893f,0.8733724001795053482056f,0.4699407932348549365997f,\ +0.9364062966778874397278f,0.1337622734718024730682f,0.2712419554591178894043f,\ +0.1766990595497190952301f,0.0543269468471407890320f,0.8402757882140576839447f,\ +0.7507283594459295272827f,0.3062269617803394794464f,0.9195641661062836647034f,\ +0.1318263853900134563446f,0.0826364941895008087158f,0.8222710476256906986237f,\ +0.4441085970029234886169f,0.9617503038607537746429f,0.0283641982823610305786f,\ +0.1431905967183411121368f,0.3793597565963864326477f,0.6144003230147063732147f,\ +0.2128270715475082397461f,0.4704488315619528293610f,0.2076055286452174186707f,\ +0.7435979112051427364349f,0.3391801547259092330933f,0.2479635034687817096710f,\ +0.6721735307946801185608f,0.9013197491876780986786f,0.2140864841639995574951f,\ +0.8460668534971773624420f,0.1650043567642569541931f,0.4003686285577714443207f,\ +0.5522825215011835098267f,0.0638249483890831470490f,0.6903966935351490974426f,\ +0.8547787251882255077362f,0.0291904583573341369629f,0.5434663915075361728668f,\ +0.6236743135377764701843f,0.2417052476666867733002f} + +#define CSOURCEI {0.5503273960202932357788f,0.6906704087741672992706f,0.9835249418392777442932f,\ +0.8285484607331454753876f,0.2062614001333713531494f,0.1944643096067011356354f,\ +0.4367609983310103416443f,0.8090620837174355983734f,0.8818644303828477859497f,\ +0.7404803228564560413361f,0.7542522149160504341126f,0.9921960639767348766327f,\ +0.9886121451854705810547f,0.0113218077458441257477f,0.9367801276966929435730f,\ +0.3874237253330647945404f,0.2886805813759565353394f,0.567788839805871248245f,\ +0.7295644441619515419006f,0.0303032915107905864716f,0.2795897088944911956787f,\ +0.7047131718136370182037f,0.7442112853750586509705f,0.8920237845741212368012f,\ +0.1081438604742288589478f,0.8751525697298347949982f,0.9068333031609654426575f,\ +0.2166852983646094799042f,0.4824190363287925720215f,0.7766945236362516880035f,\ +0.4510916722938418388367f,0.1300636469386518001556f,0.5505470838397741317749f,\ +0.6936193336732685565949f,0.1749099576845765113831f,0.8636093880049884319305f,\ +0.2150467522442340850830f,0.1886725709773600101471f,0.1796098565682768821716f,\ +0.4374312213622033596039f,0.8514516223222017288208f,0.7381969136185944080353f,\ +0.8102188156917691230774f,0.1460137623362243175507f,0.8999849110841751098633f,\ +0.4043733575381338596344f,0.0156995235010981559753f,0.6904196902178227901459f,\ +0.2990311514586210250855f,0.1383218024857342243195f,0.8478512773290276527405f,\ +0.3007262717001140117645f,0.229154746979475021362f,0.8078110129572451114655f,\ +0.3176332255825400352478f,0.6924462593160569667816f,0.1364154014736413955689f,\ +0.5433279541321098804474f,0.3276594849303364753723f,0.2006831648759543895721f,\ +0.5037304237484931945801f,0.4962565028108656406403f,0.8996161324903368949890f,\ +0.9357709079049527645111f,0.3390339072793722152710f,0.6029155333526432514191f,\ +0.4153500730171799659729f,0.3041478390805423259735f,0.8489827848970890045166f,\ +0.4482063786126673221588f,0.0903797810897231101990f,0.7382151386700570583344f,\ +0.2669597584754228591919f,0.8226196658797562122345f,0.3985779182985424995422f,\ +0.9789295899681746959686f,0.3041231036186218261719f,0.0663515278138220310211f,\ +0.6667758254334330558777f,0.7548807277344167232513f,0.1922533493489027023315f,\ +0.7942791883833706378937f,0.5580398896709084510803f,0.2016023616306483745575f,\ +0.787146832793951034546f,0.0955459238030016422272f,0.6623697867617011070252f,\ +0.864868474658578634262f,0.7013061288744211196899f,0.8015053984709084033966f,\ +0.9135685982182621955872f,0.6317234965972602367401f,0.9346773549914360046387f,\ +0.9157753759063780307770f,0.0510348035022616386414f,0.4329969524405896663666f,\ +0.9721843507140874862671f,0.8001508046872913837433f,0.8452261472120881080627f,\ +0.0610524858348071575165f,0.8168097324669361114502f,0.2101262793876230716705f,\ +0.3055453812703490257263f,0.9465212575159966945648f,0.9269728232175111770630f,\ +0.7737778765149414539337f,0.5893978821113705635071f,0.2377697187475860118866f,\ +0.5269544571638107299805f,0.0077543654479086399078f,0.8311711428686976432800f,\ +0.0268517597578465938568f,0.2591186594218015670776f,0.4641277943737804889679f,\ +0.6098861405625939369202f,0.0656952331773936748505f,0.6466812007129192352295f,\ +0.1018534512259066104889f,0.2742705782875418663025f,0.8162728524766862392426f,\ +0.3357750270515680313110f,0.4765891996212303638458f,0.8440040023997426033020f,\ +0.1785074654035270214081f,0.5855625644326210021973f,0.8426241897977888584137f,\ +0.7058847947046160697937f,0.7396617024205625057221f,0.9751448985189199447632f,\ +0.7606669445522129535675f,0.8236690396443009376526f,0.8889620001427829265595f,\ +0.7960178293287754058838f,0.3052428201772272586823f,0.6803312664851546287537f,\ +0.6412069997750222682953f,0.0988248009234666824341f,0.4654508423991501331329f,\ +0.6714970665052533149719f,0.5131103205494582653046f,0.8631567060947418212891f,\ +0.8328299173153936862946f,0.1687975851818919181824f,0.2961277081631124019623f,\ +0.2591485660523176193237f,0.1700844173319637775421f,0.9718958893790841102600f,\ +0.0695185582153499126434f,0.4696230851113796234131f,0.9544191421009600162506f,\ +0.3679352095350623130798f,0.2973918146453797817230f,0.0415310803800821304321f,\ +0.4892336544580757617950f,0.5171590568497776985169f,0.3534862431697547435761f,\ +0.2354387864470481872559f,0.6779259913600981235504f,0.3834532154724001884460f,\ +0.3174350797198712825775f,0.3418120350688695907593f,0.0535557498224079608917f,\ +0.9285596096888184547424f,0.3862650538794696331024f,0.4328473098576068878174f,\ +0.1581165478564798831940f,0.7887120461091399192810f,0.7448797873221337795258f,\ +0.5185996759682893753052f,0.8651678604073822498322f,0.1524438308551907539368f,\ +0.2392775672487914562225f,0.5761575847864151000977f,0.7395762302912771701813f,\ +0.0583172617480158805847f,0.6962534948252141475678f,0.4206145536154508590698f,\ +0.0281158541329205036163f,0.8313249954953789710999f,0.2333360086195170879364f,\ +0.8865877203643321990967f,0.3746785433031618595123f,0.87671328987926244736f,\ +0.4027077830396592617035f,0.2890332732349634170532f,0.8538430598564445972443f,\ +0.5499771209433674812317f,0.5128610017709434032440f,0.6321087554097175598145f,\ +0.4165538274683058261871f,0.3217771751806139945984f,0.9717370062135159969330f,\ +0.5348322447389364242554f,0.3416590173728764057159f,0.9565287167206406593323f,\ +0.9951003189198672771454f,0.3422884084284305572510f,0.7870580093003809452057f,\ +0.9234123295173048973084f,0.5238970420323312282562f} +#define CRESULTR {0.6700223015238303547747f,0.9051590648529930227539f,0.9783774998303537140387f,\ +0.9672554578415690773596f,0.1806879116022510611828f,0.2113884833531175511112f,\ +0.6724311908168314477763f,0.2759693779071136221504f,0.0171117603025009445972f,\ +0.2676571377242007998554f,0.7836070482910290069256f,0.9837911114618788088748f,\ +1.0787649507707848250959f,0.3258715909732741722316f,0.8818391305817397940459f,\ +0.3412489698350346656319f,0.6791962837910036077105f,0.7436127103435716811930f,\ +0.40184826884232582866f,0.6757254959645757619313f,0.6216816234807176488886f,\ +0.7106811634553994450059f,0.5496317899100798820555f,1.015517869987778709628f,\ +0.5020506061187628432663f,0.9811456923663512963429f,0.0682501782366792819623f,\ +0.3276872649171290174941f,0.6393144648282618192070f,0.9360249253515308121010f,\ +0.3486021801541281939230f,0.405155698729944113712f,0.5200555835311830854550f,\ +0.8452234271752276928424f,0.3567295147730688009702f,0.8928456199942530480129f,\ +0.5846382117554749235922f,0.6534877266970448017602f,0.2555268336748864332897f,\ +0.5599022272385358878211f,0.4549851524880720865518f,0.6983186009546583639107f,\ +0.3278445848029415965463f,0.7317436304730139395858f,0.9243668151604532701171f,\ +0.4997101034619103598899f,0.6512014053656888235011f,0.7461784468374338397112f,\ +0.5613804235723615088105f,0.309377290465780441231f,0.6302193796318024121561f,\ +0.3488048678688123183100f,0.2359369023748482674385f,0.5207697215592063111345f,\ +0.4975483327992256676886f,0.8371220343907752603485f,0.1171268218028372609663f,\ +0.085272785233540815408f,0.0974986984973703479929f,0.5164560743022618138909f,\ +0.2683348894394235739647f,0.7764310536494951620057f,0.8045234481921298419493f,\ +0.6958959159533119054331f,0.1940650650900959395262f,0.0075996484393591736892f,\ +0.3536342521606328781481f,0.6152689741862609196232f,0.9952856734893198442649f,\ +0.8206704954595607226509f,0.0459255053037718463660f,0.6307753783837566352588f,\ +0.6388147154641353742122f,0.6937233166977520015806f,0.5697295509652193779004f,\ +0.1802327077236753061218f,0.1675371469878289276689f,0.7230999921866064772402f,\ +0.7176490691010239952874f,0.5749086647774364067232f,0.7279693322506849417763f,\ +0.5413870504782296588786f,0.1504476557625347432623f,0.6581157602540366191590f,\ +0.8675383161064098569426f,0.6076707020048850438343f,0.7819483789931592765399f,\ +0.9976690503006511168138f,0.8038234125831255072470f,0.9466047824946693944881f,\ +1.0263044057305568124150f,0.1954383476167207978058f,0.9991226583234396052546f,\ +0.5824462236684256888353f,0.3833026614151368027805f,0.3492943337672331227672f,\ +0.3315115099350262606315f,0.9442386171423264862312f,0.9899258002262354416700f,\ +0.7216294786971718666635f,0.3920325460401206107974f,0.5034740230892749135450f,\ +0.715969761025848305813f,0.9550125571098367904810f,1.0265780142294762544708f,\ +0.8803585794351714843842f,0.6748726933268143213240f,0.6286862272305427934427f,\ +0.4593360950510761986365f,0.3269925373376404986736f,0.8950979801820350134634f,\ +0.6434757060207739742808f,0.6268824366882729259842f,0.7824259493911607243888f,\ +0.4869178781705328362683f,0.6618946105318512795890f,0.6319261919275969141552f,\ +0.2444724751522657224534f,0.4924981727592058766696f,0.9272283746811394999909f,\ +0.6354081057135144705583f,0.5455716136398853777223f,0.9397290975289604997300f,\ +0.3281437517029104355970f,0.7390025847943897385761f,0.1571298352097142136952f,\ +0.6681717696917298665582f,0.893260926700763513431f,1.0727843133940448971941f,\ +0.7758756582495047737780f,0.2577884404871108037227f,1.0152118695965053341013f,\ +0.553316515865495128779f,0.6088582613070312454795f,0.1618775254222162562900f,\ +0.8458278989313633422498f,0.0331641659985394132715f,0.4056540942022494600217f,\ +0.4254458405105830398618f,0.6108828412056167556088f,0.1710530527126769284596f,\ +0.0497407205620656947542f,0.4747317015892947855704f,0.3618696796533303894350f,\ +0.4287418625744875422257f,0.3485740919790226710617f,0.1655375133873851212218f,\ +0.7428884062630719542497f,0.2271172969578298117543f,1.0587395337282918816868f,\ +0.3549940948693925402147f,0.0004346469449674766222f,0.0971187244038783509259f,\ +0.5043807505243238509252f,0.4434874448032950500220f,0.2951797103676901401492f,\ +0.2845053188094572860223f,0.8815102337365799956004f,0.5368898054807562658652f,\ +0.4988328370209159090543f,0.745435623332440511213f,0.4391683137636283595917f,\ +1.0422403039497714072326f,0.1545117394214212958037f,0.3165746040477503964183f,\ +0.1791895467797269270172f,0.1089461488105609721089f,0.9065124792766549033374f,\ +0.7446224625751999282031f,0.6296662678760955866864f,0.7337000953456223051319f,\ +0.1387263358911398902773f,0.1169149268680415021393f,0.8975235374861081361075f,\ +0.4182178630757872883628f,0.9119369228139623251295f,0.0340248805832462572485f,\ +0.1423301258754861298161f,0.6888548451397347172076f,0.5685106882588889520847f,\ +0.4923020191500164788323f,0.4917581413760083730580f,0.4716616017939372351719f,\ +0.6955693872489776552470f,0.3523112018531558975454f,0.5222250480132760719343f,\ +0.7144705774015845944902f,0.8119440584245034564503f,0.3164274689259520823015f,\ +0.7538323331802344595687f,0.1811571114058267151226f,0.9128449761317551924833f,\ +0.6233160136433549824986f,0.0717615749734574065455f,1.0473491540209625139113f,\ +1.0924869453095222837646f,0.0328835678516360627177f,0.7973589739562461087274f,\ +0.9908609316019793000763f,0.3104246876762664641980f} + +#define CRESULTI {0.3914561710408779870996f,0.2745677431871340612446f,0.8850988190375015385314f,\ +0.3546606100359354085683f,0.2026838146454169320432f,0.1884673919393772267839f,\ +0.2801601885873738484456f,1.0096958835716720592757f,1.21412343558816204769f,\ +0.8776375911322839007411f,0.5620073675207013508270f,0.9130433942963852578245f,\ +0.5770284711891953133289f,0.0101200891695042028556f,0.8779935002098492313749f,\ +0.3667139971005198284537f,0.1664312994282131086266f,0.3494312783943472333625f,\ +0.8104125516371111226377f,0.0164786111567649697085f,0.1816457336156695190343f,\ +0.5593166230651334114299f,0.7569161316066348454967f,0.3415023725885689698245f,\ +0.0814423238542508892701f,0.4465689540632135634546f,1.275733507144991119020f,\ +0.197487841611818731868f,0.3421719548772197971864f,0.3349549978483222778536f,\ +0.4357966181675047567801f,0.1096343010109522564388f,0.4859836370575167374675f,\ +0.3800931088000560897910f,0.1548265257107722947527f,0.6348894325615116462913f,\ +0.1460748031318926942745f,0.1110957110750060844451f,0.1700664034230296439709f,\ +0.3412176537402174525404f,1.0332395638414424432483f,0.6273383485614248966655f,\ +0.9957192459042429888427f,0.0691093109901288471519f,0.6804424693811944591104f,\ +0.3344738416260302771299f,0.0090436204351948476510f,0.5006804162977720462635f,\ +0.2172201211207329951680f,0.1261162082552027552396f,0.9120640605812813106468f,\ +0.2753688308103523496584f,0.2209039383694014757609f,0.8997305533684579748055f,\ +0.2536420004619579504634f,0.3903699376999557602019f,0.1354191697515705339328f,\ +0.6007399379388951299319f,0.3370127497194151389159f,0.1507780721992685313282f,\ +0.5203153088877445764382f,0.254583375618394558426f,0.8702994198605253917123f,\ +1.0924089238964773684870f,0.3407939274374255367306f,0.6883985279629690756664f,\ +0.3940203751449571356602f,0.2021529986071308460094f,0.2883410464579913012884f,\ +0.1832164764792163502705f,0.0904370855097187398286f,0.6870692259557662495695f,\ +0.1667494081756663859562f,0.7986735402486416779411f,0.2997470364729120650971f,\ +1.4723672873315984954701f,0.3058215886262277694030f,0.0317778181669746695448f,\ +0.4953897349233554736614f,0.7593857543036769408573f,0.0933417291983620195373f,\ +0.8587250458616788595379f,0.6140082043678934953235f,0.1179425317948916696054f,\ +0.5008800041022678506408f,0.0606528647874819346053f,0.4208891412439614287955f,\ +0.3345057926491249999934f,0.4488362148523600825278f,0.356228513965734405744f,\ +0.3862019012866550471408f,0.7133939454258028112221f,0.6183512140459618278143f,\ +1.122372846973830329276f,0.0435912326295722213354f,0.4149318455829275609226f,\ +1.4136182419356593253923f,0.360095911709175209303f,0.3059781012378688380693f,\ +0.0293528815458468754496f,0.9850054988638156094893f,0.1610071461548980287226f,\ +0.1615738175268226772818f,0.7804595725744208900565f,0.4664649257591839126569f,\ +0.4516332153201338406312f,0.4324429865103157633044f,0.1499229835931424337225f,\ +0.4861395789308433634801f,0.0069254200843589181283f,0.5470248281814621416075f,\ +0.0157419761082240212968f,0.1652796264802975090280f,0.2251845784941430561599f,\ +0.5809144105432306748327f,0.0370371154221026954723f,0.5409142410066014594605f,\ +0.0961579912696427369090f,0.2170435871168209518434f,0.4413938390627674124289f,\ +0.2180518991856933708196f,0.3882731529916919055445f,0.4793791546290147587150f,\ +0.1615500633583723533171f,0.3727683427019338191499f,1.1092002442556854191480f,\ +0.6007159335006776457178f,0.3670729131136168943428f,0.3082959548830728202518f,\ +0.5833221942824414751883f,1.0459318594890267828390f,0.3263494274187709875967f,\ +0.8544844347571096676575f,0.2053831793406840910965f,0.7963141410348304471967f,\ +0.3137393761405720127300f,0.0990397931617461729781f,0.4344101753145302446946f,\ +0.7023788886417181576150f,0.3911554522022889779365f,1.1544412437572197926983f,\ +1.0984333102013155158971f,0.1328621940810992829718f,0.268167531788618462851f,\ +0.2190523476868022068054f,0.1514050595867235948777f,1.452314392851102864412f,\ +0.0312862499326923282350f,0.4864975811326933685663f,0.3000795354832859751504f,\ +0.3425769720223186820540f,0.3064807342294366687696f,0.0411636957365836206324f,\ +0.4217989293277185081088f,0.4809545441238126106676f,0.3404220390913085259044f,\ +0.2214498702533347351817f,0.3018772698523388142711f,0.2996779751331964392058f,\ +0.2530674633040843612974f,0.1693130128868851891344f,0.0432918302807213800643f,\ +0.3147578695966239403781f,0.3983398179395671312442f,0.4233396532725078320603f,\ +0.1544509091417925472634f,1.000697611141370568788f,0.3487050795605025621526f,\ +0.3006071168291280515383f,0.9542614300639570279472f,0.0718340034799053589465f,\ +0.2395154786718341477503f,0.6434277607558438472069f,0.3585399891990152521082f,\ +0.0482004898594938432921f,0.2679535503180693334357f,0.4468782830994436072736f,\ +0.0275539888537934679613f,0.8228411197528838760817f,0.1637277172538824099313f,\ +1.0994704384405307173722f,0.3084433992108448485681f,1.0856016429316568405739f,\ +0.2389273879432435854220f,0.2631293443272026966184f,1.0016126450700377770175f,\ +0.3562135410626017795188f,0.2353197404250201296705f,0.6834823618792332799998f,\ +0.2126404560740041416178f,0.3234875849405334791165f,0.9562375286253093076283f,\ +0.4069690501749418376498f,0.3539780611029934576095f,0.5294802297322954709458f,\ +0.3733196120144765539628f,0.3559718013547358839155f,0.6068341504607892566980f,\ +0.5969952503542278465787f,0.5352237566999263895795f} + + + + +void stanhsTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out; + int i; + + for (i=0;i<200;i++){ + out=stanhs(in[i]); + assert(( (fabs(out-res[i]))/(fabs(out)) )<1e-6); + } +} + +void ctanhsTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex in,out; + int i; + + for (i=0;i<200;i++){ + in=FloatComplex(inR[i],inI[i]); + out=ctanhs(in); + assert(( (fabs(creals(out)-resR[i]))/(fabs(creals(out))) )<1e-6); + assert(( (fabs(cimags(out)-resI[i]))/(fabs(cimags(out))) )<1e-6); + } +} + +void stanhaTest(void) { + float in[]=SOURCE; + float res[]=RESULT; + float out[200]; + int i; + + stanha(in,200,out); + for (i=0;i<200;i++){ + assert(( (fabs(out[i]-res[i]))/(fabs(out[i])) )<1e-6); + } +} + +void ctanhaTest(void) { + float inR[]=CSOURCER; + float inI[]=CSOURCEI; + float resR[]=CRESULTR; + float resI[]=CRESULTI; + floatComplex *in,out[200]; + int i; + + in=FloatComplexMatrix(inR,inI,200); + ctanha(in,200,out); + + for (i=0;i<200;i++){ + assert(( (fabs(creals(out[i])-resR[i]))/(fabs(creals(out[i]))) )<1e-6); + assert(( (fabs(cimags(out[i])-resI[i]))/(fabs(cimags(out[i]))) )<1e-6); + } +} + +int testTanh() { + printf("\n>>>> Float Hyperbolic Tangeant Tests\n"); + stanhsTest(); + ctanhsTest(); + stanhaTest(); + ctanhaTest(); + return 0; +} + +int main() { + assert(testTanh() == 0); + return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/testTanh.h b/2.3-1/src/c/elementaryFunctions/tanh/testTanh.h new file mode 100644 index 00000000..ac4c546a --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/testTanh.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef _TESTTANH_H_ +#define _TESTTANH_H_ + +#include +#include +#include +#include "tanh.h" +#include "constant.h" + +void stanhsTest(void); + +void dtanhsTest(void); + +void ctanhsTest(void); + +void ztanhsTest(void); + +void stanhaTest(void); + +void dtanhaTest(void); + +void ctanhaTest(void); + +void ztanhaTest(void); + +int testTanh(void); + +#endif /* !_TESTTANH_H_ */ diff --git a/2.3-1/src/c/elementaryFunctions/tanh/ztanha.c b/2.3-1/src/c/elementaryFunctions/tanh/ztanha.c new file mode 100644 index 00000000..0419d6c8 --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/ztanha.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" + +void ztanha(doubleComplex* x, int size, doubleComplex* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = ztanhs(x[i]); + } +} diff --git a/2.3-1/src/c/elementaryFunctions/tanh/ztanhs.c b/2.3-1/src/c/elementaryFunctions/tanh/ztanhs.c new file mode 100644 index 00000000..c7a6c11d --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/tanh/ztanhs.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "tanh.h" +#include "tan.h" + +doubleComplex ztanhs(doubleComplex z) { + double real = zreals(z); + double imag = zimags(z); + + doubleComplex result = ztans(DoubleComplex(-imag, real)); + return (DoubleComplex(zimags(result), -zreals(result))); +} diff --git a/2.3-1/src/c/implicitList/Makefile.am b/2.3-1/src/c/implicitList/Makefile.am new file mode 100644 index 00000000..1f534798 --- /dev/null +++ b/2.3-1/src/c/implicitList/Makefile.am @@ -0,0 +1,47 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libImplicitlist_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I . + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libImplicitlist.la + +HEAD = implicitList.h + +libImplicitlist_la_SOURCES = $(HEAD) \ + simplicitLists.c \ + dimplicitLists.c \ + cimplicitLists.c \ + zimplicitLists.c + +check_PROGRAMS = testFloatImplicitList \ + testDoubleImplicitList + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libImplicitlist.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I . + +testFloatImplicitList_SOURCES = testFloatImplicitList.c +testFloatImplicitList_LDADD = $(check_LDADD) +testFloatImplicitList_CFLAGS = $(check_INCLUDES) + +testDoubleImplicitList_SOURCES = testDoubleImplicitList.c +testDoubleImplicitList_LDADD = $(check_LDADD) +testDoubleImplicitList_CFLAGS = $(check_INCLUDES) + +TESTS = testFloatImplicitList \ + testDoubleImplicitList diff --git a/2.3-1/src/c/implicitList/Makefile.in b/2.3-1/src/c/implicitList/Makefile.in new file mode 100644 index 00000000..7a9519c3 --- /dev/null +++ b/2.3-1/src/c/implicitList/Makefile.in @@ -0,0 +1,749 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatImplicitList$(EXEEXT) \ + testDoubleImplicitList$(EXEEXT) +TESTS = testFloatImplicitList$(EXEEXT) testDoubleImplicitList$(EXEEXT) +subdir = src/c/implicitList +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libImplicitlist_la_LIBADD = +am__objects_1 = +am_libImplicitlist_la_OBJECTS = $(am__objects_1) \ + libImplicitlist_la-simplicitLists.lo \ + libImplicitlist_la-dimplicitLists.lo \ + libImplicitlist_la-cimplicitLists.lo \ + libImplicitlist_la-zimplicitLists.lo +libImplicitlist_la_OBJECTS = $(am_libImplicitlist_la_OBJECTS) +libImplicitlist_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libImplicitlist_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testDoubleImplicitList_OBJECTS = \ + testDoubleImplicitList-testDoubleImplicitList.$(OBJEXT) +testDoubleImplicitList_OBJECTS = $(am_testDoubleImplicitList_OBJECTS) +testDoubleImplicitList_DEPENDENCIES = $(check_LDADD) +testDoubleImplicitList_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleImplicitList_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testFloatImplicitList_OBJECTS = \ + testFloatImplicitList-testFloatImplicitList.$(OBJEXT) +testFloatImplicitList_OBJECTS = $(am_testFloatImplicitList_OBJECTS) +testFloatImplicitList_DEPENDENCIES = $(check_LDADD) +testFloatImplicitList_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatImplicitList_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libImplicitlist_la_SOURCES) \ + $(testDoubleImplicitList_SOURCES) \ + $(testFloatImplicitList_SOURCES) +DIST_SOURCES = $(libImplicitlist_la_SOURCES) \ + $(testDoubleImplicitList_SOURCES) \ + $(testFloatImplicitList_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libImplicitlist_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I . + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libImplicitlist.la +HEAD = implicitList.h +libImplicitlist_la_SOURCES = $(HEAD) \ + simplicitLists.c \ + dimplicitLists.c \ + cimplicitLists.c \ + zimplicitLists.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libImplicitlist.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I . + +testFloatImplicitList_SOURCES = testFloatImplicitList.c +testFloatImplicitList_LDADD = $(check_LDADD) +testFloatImplicitList_CFLAGS = $(check_INCLUDES) +testDoubleImplicitList_SOURCES = testDoubleImplicitList.c +testDoubleImplicitList_LDADD = $(check_LDADD) +testDoubleImplicitList_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/implicitList/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/implicitList/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libImplicitlist.la: $(libImplicitlist_la_OBJECTS) $(libImplicitlist_la_DEPENDENCIES) + $(libImplicitlist_la_LINK) -rpath $(pkglibdir) $(libImplicitlist_la_OBJECTS) $(libImplicitlist_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleImplicitList$(EXEEXT): $(testDoubleImplicitList_OBJECTS) $(testDoubleImplicitList_DEPENDENCIES) + @rm -f testDoubleImplicitList$(EXEEXT) + $(testDoubleImplicitList_LINK) $(testDoubleImplicitList_OBJECTS) $(testDoubleImplicitList_LDADD) $(LIBS) +testFloatImplicitList$(EXEEXT): $(testFloatImplicitList_OBJECTS) $(testFloatImplicitList_DEPENDENCIES) + @rm -f testFloatImplicitList$(EXEEXT) + $(testFloatImplicitList_LINK) $(testFloatImplicitList_OBJECTS) $(testFloatImplicitList_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libImplicitlist_la-cimplicitLists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libImplicitlist_la-dimplicitLists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libImplicitlist_la-simplicitLists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libImplicitlist_la-zimplicitLists.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libImplicitlist_la-simplicitLists.lo: simplicitLists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -MT libImplicitlist_la-simplicitLists.lo -MD -MP -MF $(DEPDIR)/libImplicitlist_la-simplicitLists.Tpo -c -o libImplicitlist_la-simplicitLists.lo `test -f 'simplicitLists.c' || echo '$(srcdir)/'`simplicitLists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libImplicitlist_la-simplicitLists.Tpo $(DEPDIR)/libImplicitlist_la-simplicitLists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='simplicitLists.c' object='libImplicitlist_la-simplicitLists.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -c -o libImplicitlist_la-simplicitLists.lo `test -f 'simplicitLists.c' || echo '$(srcdir)/'`simplicitLists.c + +libImplicitlist_la-dimplicitLists.lo: dimplicitLists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -MT libImplicitlist_la-dimplicitLists.lo -MD -MP -MF $(DEPDIR)/libImplicitlist_la-dimplicitLists.Tpo -c -o libImplicitlist_la-dimplicitLists.lo `test -f 'dimplicitLists.c' || echo '$(srcdir)/'`dimplicitLists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libImplicitlist_la-dimplicitLists.Tpo $(DEPDIR)/libImplicitlist_la-dimplicitLists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dimplicitLists.c' object='libImplicitlist_la-dimplicitLists.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -c -o libImplicitlist_la-dimplicitLists.lo `test -f 'dimplicitLists.c' || echo '$(srcdir)/'`dimplicitLists.c + +libImplicitlist_la-cimplicitLists.lo: cimplicitLists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -MT libImplicitlist_la-cimplicitLists.lo -MD -MP -MF $(DEPDIR)/libImplicitlist_la-cimplicitLists.Tpo -c -o libImplicitlist_la-cimplicitLists.lo `test -f 'cimplicitLists.c' || echo '$(srcdir)/'`cimplicitLists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libImplicitlist_la-cimplicitLists.Tpo $(DEPDIR)/libImplicitlist_la-cimplicitLists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cimplicitLists.c' object='libImplicitlist_la-cimplicitLists.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -c -o libImplicitlist_la-cimplicitLists.lo `test -f 'cimplicitLists.c' || echo '$(srcdir)/'`cimplicitLists.c + +libImplicitlist_la-zimplicitLists.lo: zimplicitLists.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -MT libImplicitlist_la-zimplicitLists.lo -MD -MP -MF $(DEPDIR)/libImplicitlist_la-zimplicitLists.Tpo -c -o libImplicitlist_la-zimplicitLists.lo `test -f 'zimplicitLists.c' || echo '$(srcdir)/'`zimplicitLists.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libImplicitlist_la-zimplicitLists.Tpo $(DEPDIR)/libImplicitlist_la-zimplicitLists.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zimplicitLists.c' object='libImplicitlist_la-zimplicitLists.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libImplicitlist_la_CFLAGS) $(CFLAGS) -c -o libImplicitlist_la-zimplicitLists.lo `test -f 'zimplicitLists.c' || echo '$(srcdir)/'`zimplicitLists.c + +testDoubleImplicitList-testDoubleImplicitList.o: testDoubleImplicitList.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleImplicitList_CFLAGS) $(CFLAGS) -MT testDoubleImplicitList-testDoubleImplicitList.o -MD -MP -MF $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Tpo -c -o testDoubleImplicitList-testDoubleImplicitList.o `test -f 'testDoubleImplicitList.c' || echo '$(srcdir)/'`testDoubleImplicitList.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Tpo $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleImplicitList.c' object='testDoubleImplicitList-testDoubleImplicitList.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleImplicitList_CFLAGS) $(CFLAGS) -c -o testDoubleImplicitList-testDoubleImplicitList.o `test -f 'testDoubleImplicitList.c' || echo '$(srcdir)/'`testDoubleImplicitList.c + +testDoubleImplicitList-testDoubleImplicitList.obj: testDoubleImplicitList.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleImplicitList_CFLAGS) $(CFLAGS) -MT testDoubleImplicitList-testDoubleImplicitList.obj -MD -MP -MF $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Tpo -c -o testDoubleImplicitList-testDoubleImplicitList.obj `if test -f 'testDoubleImplicitList.c'; then $(CYGPATH_W) 'testDoubleImplicitList.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleImplicitList.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Tpo $(DEPDIR)/testDoubleImplicitList-testDoubleImplicitList.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleImplicitList.c' object='testDoubleImplicitList-testDoubleImplicitList.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleImplicitList_CFLAGS) $(CFLAGS) -c -o testDoubleImplicitList-testDoubleImplicitList.obj `if test -f 'testDoubleImplicitList.c'; then $(CYGPATH_W) 'testDoubleImplicitList.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleImplicitList.c'; fi` + +testFloatImplicitList-testFloatImplicitList.o: testFloatImplicitList.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatImplicitList_CFLAGS) $(CFLAGS) -MT testFloatImplicitList-testFloatImplicitList.o -MD -MP -MF $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Tpo -c -o testFloatImplicitList-testFloatImplicitList.o `test -f 'testFloatImplicitList.c' || echo '$(srcdir)/'`testFloatImplicitList.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Tpo $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatImplicitList.c' object='testFloatImplicitList-testFloatImplicitList.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatImplicitList_CFLAGS) $(CFLAGS) -c -o testFloatImplicitList-testFloatImplicitList.o `test -f 'testFloatImplicitList.c' || echo '$(srcdir)/'`testFloatImplicitList.c + +testFloatImplicitList-testFloatImplicitList.obj: testFloatImplicitList.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatImplicitList_CFLAGS) $(CFLAGS) -MT testFloatImplicitList-testFloatImplicitList.obj -MD -MP -MF $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Tpo -c -o testFloatImplicitList-testFloatImplicitList.obj `if test -f 'testFloatImplicitList.c'; then $(CYGPATH_W) 'testFloatImplicitList.c'; else $(CYGPATH_W) '$(srcdir)/testFloatImplicitList.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Tpo $(DEPDIR)/testFloatImplicitList-testFloatImplicitList.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatImplicitList.c' object='testFloatImplicitList-testFloatImplicitList.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatImplicitList_CFLAGS) $(CFLAGS) -c -o testFloatImplicitList-testFloatImplicitList.obj `if test -f 'testFloatImplicitList.c'; then $(CYGPATH_W) 'testFloatImplicitList.c'; else $(CYGPATH_W) '$(srcdir)/testFloatImplicitList.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/implicitList/cimplicitLists.c b/2.3-1/src/c/implicitList/cimplicitLists.c new file mode 100644 index 00000000..3f5dc482 --- /dev/null +++ b/2.3-1/src/c/implicitList/cimplicitLists.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "implicitList.h" + +void cimplicitLists(floatComplex start, floatComplex step,floatComplex end, float *out) +{ + simplicitLists(creals(start), creals(step), creals(end), out); +} diff --git a/2.3-1/src/c/implicitList/dimplicitLists.c b/2.3-1/src/c/implicitList/dimplicitLists.c new file mode 100644 index 00000000..a06f91e1 --- /dev/null +++ b/2.3-1/src/c/implicitList/dimplicitLists.c @@ -0,0 +1,42 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "implicitList.h" + +void dimplicitLists(double start, double step, double end, double *out) +{ + int i = 0; + int iNbElements = 0; + if (start <= end) + { + if (start < start + step) + { + iNbElements = (int)(floor((end - start) / step) + 1); + out[0] = start; + } + } + else + { + if (start > start + step) + { + iNbElements = (int)(floor((start - end) / step) + 1); + out[0] = start; + } + } + + for (i = 1 ; i < iNbElements ; ++i) + { + start += step; + out[i] = start; + } +} diff --git a/2.3-1/src/c/implicitList/dynlib_implicitlist.h b/2.3-1/src/c/implicitList/dynlib_implicitlist.h new file mode 100644 index 00000000..297c64b3 --- /dev/null +++ b/2.3-1/src/c/implicitList/dynlib_implicitlist.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_IMPLICITLIST_H__ +#define __DYNLIB_IMPLICITLIST_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if IMPLICITLIST_EXPORTS + #define EXTERN_IMPLIST __declspec (dllexport) + #else + #define EXTERN_IMPLIST __declspec (dllimport) + #endif +#else + #define EXTERN_IMPLIST +#endif + +#endif /* __DYNLIB_IMPLICITLIST_H__ */ diff --git a/2.3-1/src/c/implicitList/implicitList.h b/2.3-1/src/c/implicitList/implicitList.h new file mode 100644 index 00000000..9de2e0ec --- /dev/null +++ b/2.3-1/src/c/implicitList/implicitList.h @@ -0,0 +1,42 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __IMPLICITLIST_H__ +#define __IMPLICITLIST_H__ + +#include "dynlib_implicitlist.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Create implicit Lists with scilab syntax +** start:step:end +** or start:end <=> start:1:end +*/ + +EXTERN_IMPLIST void simplicitLists(float start, float step, float end, float *out); + +EXTERN_IMPLIST void dimplicitLists(double start, double step, double end, double *out); + +EXTERN_IMPLIST void cimplicitLists(floatComplex start, floatComplex step, floatComplex end, float *out); + +EXTERN_IMPLIST void zimplicitLists(doubleComplex start, doubleComplex step, doubleComplex end, double *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__IMPLICITLIST_H__ */ diff --git a/2.3-1/src/c/implicitList/implicitList.vcxproj b/2.3-1/src/c/implicitList/implicitList.vcxproj new file mode 100644 index 00000000..6b4ccc28 --- /dev/null +++ b/2.3-1/src/c/implicitList/implicitList.vcxproj @@ -0,0 +1,204 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4C99D2F9-1AA2-460D-B9B8-7D44A5F9E7CD} + implicitList + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPLICITLIST_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + ../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPLICITLIST_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + ../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPLICITLIST_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + ../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPLICITLIST_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/implicitList.vcxproj.filters b/2.3-1/src/c/implicitList/implicitList.vcxproj.filters new file mode 100644 index 00000000..f066cfce --- /dev/null +++ b/2.3-1/src/c/implicitList/implicitList.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/int_OpColon.h b/2.3-1/src/c/implicitList/int_OpColon.h new file mode 100644 index 00000000..af84c2f4 --- /dev/null +++ b/2.3-1/src/c/implicitList/int_OpColon.h @@ -0,0 +1,101 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPCOLON_H__ +#define __INT_OPCOLON_H__ + +#define s0s0OpColons0(in1,in2) in1 + +#define d0d0OpColond0(in1,in2) in1 + +#define c0c0OpColons0(in1,in2) in1 + +#define z0z0OpColond0(in1,in2) in1 + + + +#define s0s0OpColons2(in1,in2,out) simplicitLists(in1,1.0,in2,out) + +#define d0d0OpColond2(in1,in2,out) dimplicitLists(in1,1.0,in2,out) + +#define c0c0OpColons2(in1,in2,out) cimplicitLists(in1,FloatComplex(1.0f,0.0f),in2,out) + +#define z0z0OpColond2(in1,in2,out) zimplicitLists(in1,DoubleComplex(1.0,0.0),in2,out) + +/*mixed input*/ +#define s0c0OpColons0(in1,in2) in1 + +#define d0z0OpColond0(in1,in2) in1 + +#define c0s0OpColons0(in1,in2) in1 + +#define z0d0OpColond0(in1,in2) in1 + + + +#define s0c0OpColons2(in1,in2,out) cimplicitLists(FloatComplex(in1,0.0f),FloatComplex(1.0f,0.0f),in2,out) + +#define d0z0OpColond2(in1,in2,out) zimplicitLists(DoubleComplex(in1,0.0),DoubleComplex(1.0,0.0),in2,out) + +#define c0s0OpColons2(in1,in2,out) cimplicitLists(in1,FloatComplex(1.0f,0.0f),FloatComplex(in2,0.0f),out) + +#define z0d0OpColond2(in1,in2,out) zimplicitLists(in1,DoubleComplex(1.0,0.0),DoubleComplex(in2,0.0),out) + + +/*three input*/ + +#define s0s0s0OpColons0(in1,in2,in3) in1 +#define s0s0c0OpColons0(in1,in2,in3) in1 +#define s0c0s0OpColons0(in1,in2,in3) in1 +#define s0c0c0OpColons0(in1,in2,in3) in1 + +#define d0d0d0OpColond0(in1,in2,in3) in1 +#define d0d0z0OpColond0(in1,in2,in3) in1 +#define d0z0d0OpColond0(in1,in2,in3) in1 +#define d0z0z0OpColond0(in1,in2,in3) in1 + +#define c0c0c0OpColons0(in1,in2,in3) in1 +#define c0c0s0OpColons0(in1,in2,in3) in1 +#define c0s0c0OpColons0(in1,in2,in3) in1 +#define c0s0s0OpColons0(in1,in2,in3) in1 + +#define z0z0z0OpColond0(in1,in2,in3) in1 +#define z0z0d0OpColond0(in1,in2,in3) in1 +#define z0d0z0OpColond0(in1,in2,in3) in1 +#define z0d0d0OpColond0(in1,in2,in3) in1 + + +#define s0s0s0OpColons2(in1,in2,in3,out) simplicitLists(in1,in2,in3,out) +#define s0s0c0OpColons2(in1,in2,in3,out) cimplicitLists(FloatComplex(in1,0.0f),FloatComplex(in2,0.0f),in3,out) +#define s0c0s0OpColons2(in1,in2,in3,out) cimplicitLists(FloatComplex(in1,0.0f),in2,FloatComplex(in3,0.0f),out) +#define s0c0c0OpColons2(in1,in2,in3,out) cimplicitLists(FloatComplex(in1,0.0f),in2,in3,out) + +#define d0d0d0OpColond2(in1,in2,in3,out) dimplicitLists(in1,in2,in3,out) +#define d0d0z0OpColond2(in1,in2,in3,out) zimplicitLists(DoubleComplex(in1,0.0),DoubleComplex(in2,0.0),in3,out) +#define d0z0d0OpColond2(in1,in2,in3,out) zimplicitLists(DoubleComplex(in1,0.0),in2,DoubleComplex(in3,0.0),out) +#define d0z0z0OpColond2(in1,in2,in3,out) zimplicitLists(DoubleComplex(in1,0.0),in2,in3,out) + +#define c0c0c0OpColons2(in1,in2,in3,out) cimplicitLists(in1,in2,in3,out) +#define c0c0s0OpColons2(in1,in2,in3,out) cimplicitLists(in1,in2,FloatComplex(in3,0.0f),out) +#define c0s0c0OpColons2(in1,in2,in3,out) cimplicitLists(in1,FloatComplex(in2,0.0f),in3,out) +#define c0s0s0OpColons2(in1,in2,in3,out) cimplicitLists(in1,FloatComplex(in2,0.0f),FloatComplex(in3,0.0f),out) + +#define z0z0z0OpColond2(in1,in2,in3,out) zimplicitLists(in1,in2,in3,out) +#define z0z0d0OpColond2(in1,in2,in3,out) zimplicitLists(in1,in2,DoubleComplex(in3,0.0),out) +#define z0d0z0OpColond2(in1,in2,in3,out) zimplicitLists(in1,DoubleComplex(in2,0.0),in3,out) +#define z0d0d0OpColond2(in1,in2,in3,out) zimplicitLists(in1,DoubleComplex(in2,0.0),DoubleComplex(in3,0.0),out) + + + +#endif /* !__INT_OPCOLON_H__ */ diff --git a/2.3-1/src/c/implicitList/simplicitLists.c b/2.3-1/src/c/implicitList/simplicitLists.c new file mode 100644 index 00000000..d5f741ae --- /dev/null +++ b/2.3-1/src/c/implicitList/simplicitLists.c @@ -0,0 +1,42 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "implicitList.h" + +void simplicitLists(float start, float step, float end, float *out) +{ + int i = 0; + if (start <= end) + { + if (start < start + step) + { + while (start <= end) + { + out[i] = start; + start += step; + ++i; + } + } + } + else + { + if (start > start + step) + { + while (start >= end) + { + out[i] = start; + start += step; + ++i; + } + } + } +} diff --git a/2.3-1/src/c/implicitList/testDoubleImplicitList.c b/2.3-1/src/c/implicitList/testDoubleImplicitList.c new file mode 100644 index 00000000..dfcb9fb3 --- /dev/null +++ b/2.3-1/src/c/implicitList/testDoubleImplicitList.c @@ -0,0 +1,142 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "implicitList.h" + +static void testdimplicitLists(void) +{ + int i = 0; + double one_to_five[5] = {0}; + double five_to_one[5] = {0}; + double five_to_one_by_minus_ten[5] = {0}; + double result[1001] = {0}; + + /* + ** 1:1:5 + */ + dimplicitLists(1.0, 1.0, 5.0, one_to_five); + for (i = 0 ; i < 5 ; ++i) + { + printf("one_to_five[%d] = %e\n", i, one_to_five[i]); + assert(one_to_five[i] == (i + 1) * 1.0); + } + + /* + ** 5:1:1 + */ + dimplicitLists(5.0, 1.0, 1.0, five_to_one); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one[%d] = %e\n", i, five_to_one[i]); + assert(five_to_one[i] == 0.0); + } + + /* + ** 5:-10:1 + */ + dimplicitLists(5.0, -10.0, 1.0, five_to_one_by_minus_ten); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one_by_minus_ten[%d] = %e\n", i, five_to_one_by_minus_ten[i]); + } + + /* + ** 5:-10:1 + */ + dimplicitLists(5.0, -10.0, 1.0, five_to_one_by_minus_ten); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one_by_minus_ten[%d] = %e\n", i, five_to_one_by_minus_ten[i]); + } + + /* + ** 0:1e-03:1 + */ + dimplicitLists(0.0, 1e-04, 0.1, result); + for (i = 0 ; i < 1001 ; ++i) + { + printf("result[%d] = %e\n", i, result[i]); + } +} + +static void testzimplicitLists(void) +{ + int i = 0; + double one_to_five[5] = {0}; + double five_to_one[5] = {0}; + double five_to_one_by_minus_ten[5] = {0}; + double result[1001] = {0}; + + /* + ** 1:1:5 + */ + zimplicitLists(DoubleComplex(1.0, 2.0), + DoubleComplex(1.0, -3.0), + DoubleComplex(5.0, 10.0), one_to_five); + for (i = 0 ; i < 5 ; ++i) + { + printf("one_to_five[%d] = %e\n", i, one_to_five[i]); + } + + /* + ** 5:1:1 + */ + zimplicitLists(DoubleComplex(5.0, 2.0), + DoubleComplex(1.0, -3.0), + DoubleComplex(1.0, 10.0), five_to_one); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one[%d] = %e\n", i, five_to_one[i]); + } + + /* + ** 5:-10:1 + */ + zimplicitLists(DoubleComplex(5.0, 2.0), + DoubleComplex(-10.0, -3.0), + DoubleComplex(1.0, 10.0), five_to_one_by_minus_ten); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one_by_minus_ten[%d] = %e\n", i, five_to_one_by_minus_ten[i]); + } + + /* + ** 5:-10:1 + */ + zimplicitLists(DoubleComplex(5.0, 2.0), + DoubleComplex(-10.0, -3.0), + DoubleComplex(1.0, 10.0), five_to_one_by_minus_ten); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one_by_minus_ten[%d] = %e\n", i, five_to_one_by_minus_ten[i]); + } + + /* + ** 0:1e-03:1 + */ + zimplicitLists(DoubleComplex(0.0, 2.0), + DoubleComplex(1e-04, -3.0), + DoubleComplex(0.1, 10.0), result); + for (i = 0 ; i < 1001 ; ++i) + { + printf("result[%d] = %e\n", i, result[i]); + } +} + +int main(void) +{ + testdimplicitLists(); + testzimplicitLists(); + return 0; +} diff --git a/2.3-1/src/c/implicitList/testFloatImplicitList.c b/2.3-1/src/c/implicitList/testFloatImplicitList.c new file mode 100644 index 00000000..5c021c67 --- /dev/null +++ b/2.3-1/src/c/implicitList/testFloatImplicitList.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "implicitList.h" + +static void testsimplicitLists(void) +{ + int i = 0; + float one_to_five[5] = {0}; + float five_to_one[5] = {0}; + float five_to_one_by_minus_ten[5] = {0}; + float result[1001] = {0}; + /* + ** 1:1:5 + */ + simplicitLists(1.0f, 1.0f, 5.0f, one_to_five); + for (i = 0 ; i < 5 ; ++i) + { + printf("one_to_five[%d] = %e\n", i, one_to_five[i]); + } + + /* + ** 5:1:1 + */ + simplicitLists(5.0f, 1.0f, 1.0f, five_to_one); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one[%d] = %e\n", i, five_to_one[i]); + } + + /* + ** 5:-10:1 + */ + simplicitLists(5.0f, -10.0f, 1.0f, five_to_one_by_minus_ten); + for (i = 0 ; i < 5 ; ++i) + { + printf("five_to_one_by_minus_ten[%d] = %e\n", i, five_to_one_by_minus_ten[i]); + } + + /* + ** 0:1e-03:1 + */ + simplicitLists(0.0f, 1e-03f, 1.0f, result); + for (i = 0 ; i < 1001 ; ++i) + { + printf("result[%d] = %e\n", i, result[i]); + } +} + + +int main(void) +{ + testsimplicitLists(); + return 0; +} diff --git a/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj b/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj new file mode 100644 index 00000000..6557823b --- /dev/null +++ b/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {15D96388-C17C-4085-991F-9003E0CE9C6A} + testDoubleImplicitList + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {4c99d2f9-1aa2-460d-b9b8-7d44a5f9e7cd} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj.filters b/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj.filters new file mode 100644 index 00000000..929ee3dd --- /dev/null +++ b/2.3-1/src/c/implicitList/test_DoubleImplicitList/testDoubleImplicitList.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj b/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj new file mode 100644 index 00000000..2399ddd5 --- /dev/null +++ b/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {93CF027E-C286-4F61-A9D6-DE3C899C5E77} + testFloatImplicitList + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {4c99d2f9-1aa2-460d-b9b8-7d44a5f9e7cd} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj.filters b/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj.filters new file mode 100644 index 00000000..3532926b --- /dev/null +++ b/2.3-1/src/c/implicitList/test_FloatImplicitList/testFloatImplicitList.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/implicitList/zimplicitLists.c b/2.3-1/src/c/implicitList/zimplicitLists.c new file mode 100644 index 00000000..56d492dc --- /dev/null +++ b/2.3-1/src/c/implicitList/zimplicitLists.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "implicitList.h" + +void zimplicitLists(doubleComplex start, doubleComplex step,doubleComplex end, double *out) +{ + dimplicitLists(zreals(start), zreals(step), zreals(end), out); +} diff --git a/2.3-1/src/c/matrixOperations/Makefile.am b/2.3-1/src/c/matrixOperations/Makefile.am new file mode 100644 index 00000000..a6ecb2c2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/Makefile.am @@ -0,0 +1,38 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS= cat \ + division \ + expm \ + eye \ + hilb \ + infiniteNorm \ + multiplication \ + trace \ + transpose \ + ones \ + jmat \ + inversion\ + chol \ + determ \ + dist \ + fill \ + magnitude \ + squaredMagnitude\ + logm \ + powm \ + zeros \ + spec \ + spec2 + + + diff --git a/2.3-1/src/c/matrixOperations/Makefile.in b/2.3-1/src/c/matrixOperations/Makefile.in new file mode 100644 index 00000000..c120e1c3 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/Makefile.in @@ -0,0 +1,583 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/matrixOperations +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = cat \ + division \ + expm \ + eye \ + hilb \ + infiniteNorm \ + multiplication \ + trace \ + transpose \ + ones \ + jmat \ + inversion\ + chol \ + determ \ + dist \ + fill \ + magnitude \ + squaredMagnitude\ + logm \ + powm \ + zeros \ + spec \ + spec2 + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/cat/Makefile.am b/2.3-1/src/c/matrixOperations/cat/Makefile.am new file mode 100644 index 00000000..fd315ddc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/Makefile.am @@ -0,0 +1,52 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixConcatenation_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixConcatenation.la + +HEAD = ../includes/cat.h + +libMatrixConcatenation_la_SOURCES = $(HEAD) \ + scats.c \ + scata.c \ + dcats.c \ + dcata.c \ + ccats.c \ + ccata.c \ + zcats.c \ + zcata.c + +check_PROGRAMS = testFloatMatrixConcatenation \ + testDoubleMatrixConcatenation + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixConcatenation.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixConcatenation_SOURCES = testDoubleMatrixConcatenation.c +testDoubleMatrixConcatenation_LDADD = $(check_LDADD) +testDoubleMatrixConcatenation_CFLAGS = $(check_INCLUDES) + +testFloatMatrixConcatenation_SOURCES = testFloatMatrixConcatenation.c +testFloatMatrixConcatenation_LDADD = $(check_LDADD) +testFloatMatrixConcatenation_CFLAGS = $(check_INCLUDES) + +TESTS = testFloatMatrixConcatenation \ + testDoubleMatrixConcatenation \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/cat/Makefile.in b/2.3-1/src/c/matrixOperations/cat/Makefile.in new file mode 100644 index 00000000..3e7a8559 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/Makefile.in @@ -0,0 +1,792 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMatrixConcatenation$(EXEEXT) \ + testDoubleMatrixConcatenation$(EXEEXT) +TESTS = testFloatMatrixConcatenation$(EXEEXT) \ + testDoubleMatrixConcatenation$(EXEEXT) +subdir = src/c/matrixOperations/cat +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixConcatenation_la_LIBADD = +am__objects_1 = +am_libMatrixConcatenation_la_OBJECTS = $(am__objects_1) \ + libMatrixConcatenation_la-scats.lo \ + libMatrixConcatenation_la-scata.lo \ + libMatrixConcatenation_la-dcats.lo \ + libMatrixConcatenation_la-dcata.lo \ + libMatrixConcatenation_la-ccats.lo \ + libMatrixConcatenation_la-ccata.lo \ + libMatrixConcatenation_la-zcats.lo \ + libMatrixConcatenation_la-zcata.lo +libMatrixConcatenation_la_OBJECTS = \ + $(am_libMatrixConcatenation_la_OBJECTS) +libMatrixConcatenation_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testDoubleMatrixConcatenation_OBJECTS = testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.$(OBJEXT) +testDoubleMatrixConcatenation_OBJECTS = \ + $(am_testDoubleMatrixConcatenation_OBJECTS) +testDoubleMatrixConcatenation_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixConcatenation_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMatrixConcatenation_OBJECTS = testFloatMatrixConcatenation-testFloatMatrixConcatenation.$(OBJEXT) +testFloatMatrixConcatenation_OBJECTS = \ + $(am_testFloatMatrixConcatenation_OBJECTS) +testFloatMatrixConcatenation_DEPENDENCIES = $(check_LDADD) +testFloatMatrixConcatenation_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixConcatenation_la_SOURCES) \ + $(testDoubleMatrixConcatenation_SOURCES) \ + $(testFloatMatrixConcatenation_SOURCES) +DIST_SOURCES = $(libMatrixConcatenation_la_SOURCES) \ + $(testDoubleMatrixConcatenation_SOURCES) \ + $(testFloatMatrixConcatenation_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixConcatenation_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixConcatenation.la +HEAD = ../includes/cat.h +libMatrixConcatenation_la_SOURCES = $(HEAD) \ + scats.c \ + scata.c \ + dcats.c \ + dcata.c \ + ccats.c \ + ccata.c \ + zcats.c \ + zcata.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixConcatenation.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixConcatenation_SOURCES = testDoubleMatrixConcatenation.c +testDoubleMatrixConcatenation_LDADD = $(check_LDADD) +testDoubleMatrixConcatenation_CFLAGS = $(check_INCLUDES) +testFloatMatrixConcatenation_SOURCES = testFloatMatrixConcatenation.c +testFloatMatrixConcatenation_LDADD = $(check_LDADD) +testFloatMatrixConcatenation_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/cat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/cat/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixConcatenation.la: $(libMatrixConcatenation_la_OBJECTS) $(libMatrixConcatenation_la_DEPENDENCIES) + $(libMatrixConcatenation_la_LINK) -rpath $(pkglibdir) $(libMatrixConcatenation_la_OBJECTS) $(libMatrixConcatenation_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMatrixConcatenation$(EXEEXT): $(testDoubleMatrixConcatenation_OBJECTS) $(testDoubleMatrixConcatenation_DEPENDENCIES) + @rm -f testDoubleMatrixConcatenation$(EXEEXT) + $(testDoubleMatrixConcatenation_LINK) $(testDoubleMatrixConcatenation_OBJECTS) $(testDoubleMatrixConcatenation_LDADD) $(LIBS) +testFloatMatrixConcatenation$(EXEEXT): $(testFloatMatrixConcatenation_OBJECTS) $(testFloatMatrixConcatenation_DEPENDENCIES) + @rm -f testFloatMatrixConcatenation$(EXEEXT) + $(testFloatMatrixConcatenation_LINK) $(testFloatMatrixConcatenation_OBJECTS) $(testFloatMatrixConcatenation_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-ccata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-ccats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-dcata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-dcats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-scata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-scats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-zcata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixConcatenation_la-zcats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixConcatenation_la-scats.lo: scats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-scats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-scats.Tpo -c -o libMatrixConcatenation_la-scats.lo `test -f 'scats.c' || echo '$(srcdir)/'`scats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-scats.Tpo $(DEPDIR)/libMatrixConcatenation_la-scats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scats.c' object='libMatrixConcatenation_la-scats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-scats.lo `test -f 'scats.c' || echo '$(srcdir)/'`scats.c + +libMatrixConcatenation_la-scata.lo: scata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-scata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-scata.Tpo -c -o libMatrixConcatenation_la-scata.lo `test -f 'scata.c' || echo '$(srcdir)/'`scata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-scata.Tpo $(DEPDIR)/libMatrixConcatenation_la-scata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scata.c' object='libMatrixConcatenation_la-scata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-scata.lo `test -f 'scata.c' || echo '$(srcdir)/'`scata.c + +libMatrixConcatenation_la-dcats.lo: dcats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-dcats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-dcats.Tpo -c -o libMatrixConcatenation_la-dcats.lo `test -f 'dcats.c' || echo '$(srcdir)/'`dcats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-dcats.Tpo $(DEPDIR)/libMatrixConcatenation_la-dcats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcats.c' object='libMatrixConcatenation_la-dcats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-dcats.lo `test -f 'dcats.c' || echo '$(srcdir)/'`dcats.c + +libMatrixConcatenation_la-dcata.lo: dcata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-dcata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-dcata.Tpo -c -o libMatrixConcatenation_la-dcata.lo `test -f 'dcata.c' || echo '$(srcdir)/'`dcata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-dcata.Tpo $(DEPDIR)/libMatrixConcatenation_la-dcata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcata.c' object='libMatrixConcatenation_la-dcata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-dcata.lo `test -f 'dcata.c' || echo '$(srcdir)/'`dcata.c + +libMatrixConcatenation_la-ccats.lo: ccats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-ccats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-ccats.Tpo -c -o libMatrixConcatenation_la-ccats.lo `test -f 'ccats.c' || echo '$(srcdir)/'`ccats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-ccats.Tpo $(DEPDIR)/libMatrixConcatenation_la-ccats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccats.c' object='libMatrixConcatenation_la-ccats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-ccats.lo `test -f 'ccats.c' || echo '$(srcdir)/'`ccats.c + +libMatrixConcatenation_la-ccata.lo: ccata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-ccata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-ccata.Tpo -c -o libMatrixConcatenation_la-ccata.lo `test -f 'ccata.c' || echo '$(srcdir)/'`ccata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-ccata.Tpo $(DEPDIR)/libMatrixConcatenation_la-ccata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccata.c' object='libMatrixConcatenation_la-ccata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-ccata.lo `test -f 'ccata.c' || echo '$(srcdir)/'`ccata.c + +libMatrixConcatenation_la-zcats.lo: zcats.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-zcats.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-zcats.Tpo -c -o libMatrixConcatenation_la-zcats.lo `test -f 'zcats.c' || echo '$(srcdir)/'`zcats.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-zcats.Tpo $(DEPDIR)/libMatrixConcatenation_la-zcats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcats.c' object='libMatrixConcatenation_la-zcats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-zcats.lo `test -f 'zcats.c' || echo '$(srcdir)/'`zcats.c + +libMatrixConcatenation_la-zcata.lo: zcata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -MT libMatrixConcatenation_la-zcata.lo -MD -MP -MF $(DEPDIR)/libMatrixConcatenation_la-zcata.Tpo -c -o libMatrixConcatenation_la-zcata.lo `test -f 'zcata.c' || echo '$(srcdir)/'`zcata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixConcatenation_la-zcata.Tpo $(DEPDIR)/libMatrixConcatenation_la-zcata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcata.c' object='libMatrixConcatenation_la-zcata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixConcatenation_la_CFLAGS) $(CFLAGS) -c -o libMatrixConcatenation_la-zcata.lo `test -f 'zcata.c' || echo '$(srcdir)/'`zcata.c + +testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o: testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o `test -f 'testDoubleMatrixConcatenation.c' || echo '$(srcdir)/'`testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixConcatenation.c' object='testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.o `test -f 'testDoubleMatrixConcatenation.c' || echo '$(srcdir)/'`testDoubleMatrixConcatenation.c + +testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj: testDoubleMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj `if test -f 'testDoubleMatrixConcatenation.c'; then $(CYGPATH_W) 'testDoubleMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixConcatenation.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Tpo $(DEPDIR)/testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixConcatenation.c' object='testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixConcatenation-testDoubleMatrixConcatenation.obj `if test -f 'testDoubleMatrixConcatenation.c'; then $(CYGPATH_W) 'testDoubleMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixConcatenation.c'; fi` + +testFloatMatrixConcatenation-testFloatMatrixConcatenation.o: testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testFloatMatrixConcatenation-testFloatMatrixConcatenation.o -MD -MP -MF $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.o `test -f 'testFloatMatrixConcatenation.c' || echo '$(srcdir)/'`testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixConcatenation.c' object='testFloatMatrixConcatenation-testFloatMatrixConcatenation.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.o `test -f 'testFloatMatrixConcatenation.c' || echo '$(srcdir)/'`testFloatMatrixConcatenation.c + +testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj: testFloatMatrixConcatenation.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -MT testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj `if test -f 'testFloatMatrixConcatenation.c'; then $(CYGPATH_W) 'testFloatMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixConcatenation.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Tpo $(DEPDIR)/testFloatMatrixConcatenation-testFloatMatrixConcatenation.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixConcatenation.c' object='testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixConcatenation_CFLAGS) $(CFLAGS) -c -o testFloatMatrixConcatenation-testFloatMatrixConcatenation.obj `if test -f 'testFloatMatrixConcatenation.c'; then $(CYGPATH_W) 'testFloatMatrixConcatenation.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixConcatenation.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/cat/ccata.c b/2.3-1/src/c/matrixOperations/cat/ccata.c new file mode 100644 index 00000000..cd2b4c92 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/ccata.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 61 ;7 8 9; 10 11 12] +** +*/ + +void crowcata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void ccolumncata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/2.3-1/src/c/matrixOperations/cat/ccats.c b/2.3-1/src/c/matrixOperations/cat/ccats.c new file mode 100644 index 00000000..c4fab76f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/ccats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void crowcats(floatComplex in1, floatComplex in2, floatComplex *out) { + out[0] = in1; + out[1] = in2; +} + +void ccolumncats(floatComplex in1, floatComplex in2, floatComplex *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/2.3-1/src/c/matrixOperations/cat/dcata.c b/2.3-1/src/c/matrixOperations/cat/dcata.c new file mode 100644 index 00000000..0ec7c088 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/dcata.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 6 ;7 8 9; 10 11 12] +** +*/ + +void drowcata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out) { + int i = 0; + int j = 0; + + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void dcolumncata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/2.3-1/src/c/matrixOperations/cat/dcats.c b/2.3-1/src/c/matrixOperations/cat/dcats.c new file mode 100644 index 00000000..aea63ecf --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/dcats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void drowcats(double in1, double in2, double *out) { + out[0] = in1; + out[1] = in2; +} + +void dcolumncats(double in1, double in2, double *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/2.3-1/src/c/matrixOperations/cat/scata.c b/2.3-1/src/c/matrixOperations/cat/scata.c new file mode 100644 index 00000000..da0853c6 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/scata.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +#include "stdio.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 6 ;7 8 9; 10 11 12] +** +*/ + +void srowcata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void scolumncata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/2.3-1/src/c/matrixOperations/cat/scats.c b/2.3-1/src/c/matrixOperations/cat/scats.c new file mode 100644 index 00000000..1f82f9aa --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/scats.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void srowcats(float in1, float in2, float *out) { + out[0] = in1; + out[1] = in2; +} + +void scolumncats(float in1, float in2, float *out) { + out[0] = in1; + out[1] = in2; +} diff --git a/2.3-1/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c b/2.3-1/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c new file mode 100644 index 00000000..29ab3c65 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/testDoubleMatrixConcatenation.c @@ -0,0 +1,342 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "constant.h" +#include "cat.h" + +static void drowcatsTest(void) { + int i = 0; + double output[2] = {0}; + + /* + ** [ 42 51 ] + */ + drowcats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + drowcats(DPI, DPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == DPI); + assert(output[1] == DPI / 2); +} + +static void dcolumncatsTest(void) { + int i = 0; + double output[2] = {0}; + + /* + ** [ 42 51 ] + */ + dcolumncats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + dcolumncats(DPI, DPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == DPI); + assert(output[1] == DPI / 2); +} + +static void dcolumncataTest(void) { + int i = 0; + double in1[12] = {0.0, 1.0, 2.0 , 3.0 , 4.0, 5.0 , 6.0 , 7.0 , 8.0 , 9.0, 10.0 , 11.0}; + double in2_1_1[1] = {12.0}; + double out_1_13[13] = {0}; + + double in2_2_2[4] = {DPI, DPI / 2, DPI / 3, DPI / 4}; + double out_2_8[16] = {0}; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + dcolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e\n", i, out_1_13[i]); + assert(out_1_13[i] == (double) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + dcolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e\n", i, out_2_8[i]); + } + for (i = 0 ; i < 12 ; ++i) { + assert(out_2_8[i] == in1[i]); + } + for (i = 0 ; i < 4 ; ++i) { + assert(out_2_8[i + 12] == in2_2_2[i]); + } + +} + +static void drowcataTest() { + int i = 0; + double in1[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + double in2[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + double out_4_3[12] = {0}; + double out_6_2[12] = {0}; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + drowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e\n", i, out_4_3[i]); + assert(out_4_3[i] == (double) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + drowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 2.0); + assert(out_6_2[2] == 5.0); + assert(out_6_2[3] == 3.0); + assert(out_6_2[4] == 4.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 9.0); + assert(out_6_2[8] == 10.0); + assert(out_6_2[9] == 8.0); + assert(out_6_2[10] == 11.0); + assert(out_6_2[11] == 12.0); + + drowcata(in1, 1, 6, in2, 1, 6, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 3.0); + assert(out_6_2[2] == 2.0); + assert(out_6_2[3] == 4.0); + assert(out_6_2[4] == 5.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 8.0); + assert(out_6_2[8] == 9.0); + assert(out_6_2[9] == 11.0); + assert(out_6_2[10] == 10.0); + assert(out_6_2[11] == 12.0); + +} + +static void zrowcatsTest(void) { + int i = 0; + doubleComplex output[2]; + + /* + ** [ 42+25i 51+38i ] + */ + zrowcats(DoubleComplex(42.0, 25.0), + DoubleComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == 42.0); + assert(zimags(output[0]) == 25.0); + assert(zreals(output[1]) == 51.0); + assert(zimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + zrowcats(DoubleComplex(DPI, DPI/2), + DoubleComplex(DPI/2, DPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == DPI); + assert(zimags(output[0]) == DPI / 2); + assert(zreals(output[1]) == DPI / 2); + assert(zimags(output[1]) == DPI); +} + +static void zcolumncatsTest(void) { + int i = 0; + doubleComplex output[2]; + /* + ** [ 42+25i 51+38i ] + */ + zcolumncats(DoubleComplex(42.0, 25.0), + DoubleComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == 42.0); + assert(zimags(output[0]) == 25.0); + assert(zreals(output[1]) == 51.0); + assert(zimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + zcolumncats(DoubleComplex(DPI, DPI/2), + DoubleComplex(DPI/2, DPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, zreals(output[i]), zimags(output[i])); + } + assert(zreals(output[0]) == DPI); + assert(zimags(output[0]) == DPI / 2); + assert(zreals(output[1]) == DPI / 2); + assert(zimags(output[1]) == DPI); + +} + +static void zcolumncataTest(void) { + int i = 0; + double in1_real[12] = {0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0}; + double in1_imag[12] = {11.0 , 10.0 , 9.0 , 8.0 , 7.0 , 6.0 , 5.0 , 4.0 , 3.0 , 2.0 , 1.0 , 0.0}; + doubleComplex *in1 = DoubleComplexMatrix(in1_real, in1_imag, 12); + double in2_real[1] = {12.0}; + double in2_imag[1] = {-1.0}; + doubleComplex *in2_1_1 = DoubleComplexMatrix(in2_real, in2_imag, 1); + doubleComplex out_1_13[13]; + + double in2_2_2_real[4] = {DPI, DPI / 2, DPI / 3, DPI / 4}; + double in2_2_2_imag[4] = {DPI / 4, DPI / 3, DPI / 2, DPI}; + doubleComplex *in2_2_2 = DoubleComplexMatrix(in2_2_2_real, in2_2_2_imag, 4); + doubleComplex out_2_8[16]; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + zcolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e + %e i\n", i, zreals(out_1_13[i]), zimags(out_1_13[i])); + assert(zreals(out_1_13[i]) == (double) i); + assert(zimags(out_1_13[i]) == 11.0 - (double) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + zcolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e + %e i\n", i, zreals(out_2_8[i]), zimags(out_2_8[i])); + } + for (i = 0 ; i < 12 ; ++i) { + assert(zreals(out_2_8[i]) == zreals(in1[i])); + assert(zimags(out_2_8[i]) == zimags(in1[i])); + } + for (i = 0 ; i < 4 ; ++i) { + assert(zreals(out_2_8[i + 12]) == zreals(in2_2_2[i])); + assert(zimags(out_2_8[i + 12]) == zimags(in2_2_2[i])); + } + +} + +static void zrowcataTest() { + int i = 0; + double in1_real[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + double in1_imag[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + doubleComplex *in1 = DoubleComplexMatrix(in1_real, in1_imag, 6); + double in2_real[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + double in2_imag[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + doubleComplex *in2 = DoubleComplexMatrix(in2_real, in2_imag, 6); + doubleComplex out_4_3[12]; + doubleComplex out_6_2[12]; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + zrowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e + %e i\n", i, zreals(out_4_3[i]), zimags(out_4_3[i])); + assert(zreals(out_4_3[i]) == (double) i + 1.0); + assert(zimags(out_4_3[i]) == (double) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + zrowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e + %e i\n", i, zreals(out_6_2[i]), zimags(out_6_2[i])); + } + assert(zreals(out_6_2[0]) == 1.0); + assert(zimags(out_6_2[0]) == 1.0); + assert(zreals(out_6_2[1]) == 2.0); + assert(zimags(out_6_2[1]) == 2.0); + assert(zreals(out_6_2[2]) == 5.0); + assert(zimags(out_6_2[2]) == 5.0); + assert(zreals(out_6_2[3]) == 3.0); + assert(zimags(out_6_2[3]) == 3.0); + assert(zreals(out_6_2[4]) == 4.0); + assert(zimags(out_6_2[4]) == 4.0); + assert(zreals(out_6_2[5]) == 7.0); + assert(zimags(out_6_2[5]) == 7.0); + assert(zreals(out_6_2[6]) == 6.0); + assert(zimags(out_6_2[6]) == 6.0); + assert(zreals(out_6_2[7]) == 9.0); + assert(zimags(out_6_2[7]) == 9.0); + assert(zreals(out_6_2[8]) == 10.0); + assert(zimags(out_6_2[8]) == 10.0); + assert(zreals(out_6_2[9]) == 8.0); + assert(zimags(out_6_2[9]) == 8.0); + assert(zreals(out_6_2[10]) == 11.0); + assert(zimags(out_6_2[10]) == 11.0); + assert(zreals(out_6_2[11]) == 12.0); + assert(zimags(out_6_2[11]) == 12.0); +} + +int main(void) { + drowcatsTest(); + dcolumncatsTest(); + drowcataTest(); + dcolumncataTest(); + zrowcatsTest(); + zcolumncatsTest(); + zrowcataTest(); + zcolumncataTest(); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c b/2.3-1/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c new file mode 100644 index 00000000..b34a80f0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/testFloatMatrixConcatenation.c @@ -0,0 +1,341 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "constant.h" +#include "cat.h" + +static void srowcatsTest(void) { + int i = 0; + float output[2] = {0}; + + /* + ** [ 42 51 ] + */ + srowcats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + srowcats(FPI, FPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == FPI); + assert(output[1] == FPI / 2); +} + +static void scolumncatsTest(void) { + int i = 0; + float output[2] = {0}; + + /* + ** [ 42 51 ] + */ + scolumncats(42.0, 51.0, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == 42.0); + assert(output[1] == 51.0); + + /* + ** [ PI PI/2 ] + */ + scolumncats(FPI, FPI / 2, output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e\n", i, output[i]); + } + assert(output[0] == FPI); + assert(output[1] == FPI / 2); +} + +static void scolumncataTest(void) { + int i = 0; + float in1[12] = {0.0, 1.0, 2.0 , 3.0 , 4.0, 5.0 , 6.0 , 7.0 , 8.0 , 9.0, 10.0 , 11.0}; + float in2_1_1[1] = {12.0}; + float out_1_13[13] = {0}; + float in2_2_2[4] = {FPI, FPI / 2, FPI / 3, FPI / 4}; + float out_2_8[16] = {0}; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + scolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e\n", i, out_1_13[i]); + assert(out_1_13[i] == (float) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + scolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e\n", i, out_2_8[i]); + } + for (i = 0 ; i < 12 ; ++i) { + assert(out_2_8[i] == in1[i]); + } + for (i = 0 ; i < 4 ; ++i) { + assert(out_2_8[i + 12] == in2_2_2[i]); + } + + + +} + +static void srowcataTest() { + int i = 0; + float in1[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + float in2[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + float out_4_3[12] = {0}; + float out_6_2[12] = {0}; + + float inNono1[6]={1.0,3.0,5.0,2.0,4.0,6.0}; + float inNono2[2]={1.0,2.0}; + float outNono[8]={0}; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + srowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e\n", i, out_4_3[i]); + assert(out_4_3[i] == (float) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + srowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e\n", i, out_6_2[i]); + } + assert(out_6_2[0] == 1.0); + assert(out_6_2[1] == 2.0); + assert(out_6_2[2] == 5.0); + assert(out_6_2[3] == 3.0); + assert(out_6_2[4] == 4.0); + assert(out_6_2[5] == 7.0); + assert(out_6_2[6] == 6.0); + assert(out_6_2[7] == 9.0); + assert(out_6_2[8] == 10.0); + assert(out_6_2[9] == 8.0); + assert(out_6_2[10] == 11.0); + assert(out_6_2[11] == 12.0); + + + srowcata(inNono1, 3, 2, inNono2, 1, 2, outNono); + assert(outNono[0] == 1.0); + assert(outNono[1] == 3.0); + assert(outNono[2] == 5.0); + assert(outNono[3] == 1.0); + assert(outNono[4] == 2.0); + assert(outNono[5] == 4.0); + assert(outNono[6] == 6.0); + assert(outNono[7] == 2.0); + +} + +static void crowcatsTest(void) { + int i = 0; + floatComplex output[2]; + + /* + ** [ 42+25i 51+38i ] + */ + crowcats(FloatComplex(42.0, 25.0), + FloatComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == 42.0); + assert(cimags(output[0]) == 25.0); + assert(creals(output[1]) == 51.0); + assert(cimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + crowcats(FloatComplex(FPI, FPI/2), + FloatComplex(FPI/2, FPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == FPI); + assert(cimags(output[0]) == FPI / 2); + assert(creals(output[1]) == FPI / 2); + assert(cimags(output[1]) == FPI); +} + +static void ccolumncatsTest(void) { + int i = 0; + floatComplex output[2]; + /* + ** [ 42+25i 51+38i ] + */ + ccolumncats(FloatComplex(42.0, 25.0), + FloatComplex(51.0, 38.0), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == 42.0); + assert(cimags(output[0]) == 25.0); + assert(creals(output[1]) == 51.0); + assert(cimags(output[1]) == 38.0); + + /* + ** [ PI+PI/2i PI/2+PIi ] + */ + ccolumncats(FloatComplex(FPI, FPI/2), + FloatComplex(FPI/2, FPI), + output); + for (i = 0 ; i < 2 ; ++i) { + printf("output[%d] = %e + %e i\n", i, creals(output[i]), cimags(output[i])); + } + assert(creals(output[0]) == FPI); + assert(cimags(output[0]) == FPI / 2); + assert(creals(output[1]) == FPI / 2); + assert(cimags(output[1]) == FPI); + +} + +static void ccolumncataTest(void) { + int i = 0; + float in1_real[12] = {0.0 , 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0}; + float in1_imag[12] = {11.0 , 10.0 , 9.0 , 8.0 , 7.0 , 6.0 , 5.0 , 4.0 , 3.0 , 2.0 , 1.0 , 0.0}; + floatComplex *in1 = FloatComplexMatrix(in1_real, in1_imag, 12); + float in2_real[1] = {12.0}; + float in2_imag[1] = {-1.0}; + floatComplex *in2_1_1 = FloatComplexMatrix(in2_real, in2_imag, 1); + floatComplex out_1_13[13]; + + float in2_2_2_real[4] = {FPI, FPI / 2, FPI / 3, FPI / 4}; + float in2_2_2_imag[4] = {FPI / 4, FPI / 3, FPI / 2, FPI}; + floatComplex *in2_2_2 = FloatComplexMatrix(in2_2_2_real, in2_2_2_imag, 4); + floatComplex out_2_8[16]; + + /* + ** columncat( [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 ], [ 12.0 ] ) + ** [ 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 ] + */ + ccolumncata(in1, 1, 12, in2_1_1, 1, 1, out_1_13); + for (i = 0 ; i < 13 ; ++i) { + printf("out_1_13[%d] = %e + %e i\n", i, creals(out_1_13[i]), cimags(out_1_13[i])); + assert(creals(out_1_13[i]) == (float) i); + assert(cimags(out_1_13[i]) == 11.0 - (float) i); + } + + /* + ** [ 0 2 4 6 8 10 ] , [ PI PI/3 ] => [ 0 2 4 6 8 10 PI PI/3 ] + ** [ 1 3 5 7 9 11 ] [ PI/2 PI/4] [ 1 3 5 7 9 11 PI/2 PI/4 ] + */ + ccolumncata(in1, 2, 6, in2_2_2, 2, 2, out_2_8); + for (i = 0 ; i < 16 ; ++i) { + printf("out_2_8[%d] = %e + %e i\n", i, creals(out_2_8[i]), cimags(out_2_8[i])); + } + for (i = 0 ; i < 12 ; ++i) { + assert(creals(out_2_8[i]) == creals(in1[i])); + assert(cimags(out_2_8[i]) == cimags(in1[i])); + } + for (i = 0 ; i < 4 ; ++i) { + assert(creals(out_2_8[i + 12]) == creals(in2_2_2[i])); + assert(cimags(out_2_8[i + 12]) == cimags(in2_2_2[i])); + } + +} + +static void crowcataTest() { + int i = 0; + float in1_real[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + float in1_imag[6] = {1.0 , 2.0, 5.0 , 6.0, 9.0 , 10.0}; + floatComplex *in1 = FloatComplexMatrix(in1_real, in1_imag, 6); + float in2_real[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + float in2_imag[6] = {3.0 , 4.0 , 7.0 , 8.0 , 11.0 , 12.0}; + floatComplex *in2 = FloatComplexMatrix(in2_real, in2_imag, 6); + floatComplex out_4_3[12]; + floatComplex out_6_2[12]; + /* + ** [ 1 5 9 ] ; [ 3 7 11 ] => [ 1 5 9 ] + ** [ 2 6 10 ] [ 4 8 12 ] [ 2 6 10 ] + ** [ 3 7 11 ] + ** [ 4 8 12 ] + */ + crowcata(in1, 2, 3, in2, 2, 3, out_4_3); + for (i = 0 ; i < 12 ; ++i) { + printf("out_4_3[%d] = %e + %e i\n", i, creals(out_4_3[i]), cimags(out_4_3[i])); + assert(creals(out_4_3[i]) == (float) i + 1.0); + assert(cimags(out_4_3[i]) == (float) i + 1.0); + } + + /* + ** [ 1 6 ] ; [ 3 8 ] + ** [ 2 9 ] [ 4 11 ] + ** [ 5 10 ] [ 7 12 ] + */ + crowcata(in1, 3, 2, in2, 3, 2, out_6_2); + for (i = 0 ; i < 12 ; ++i) { + printf("out_6_2[%d] = %e + %e i\n", i, creals(out_6_2[i]), cimags(out_6_2[i])); + } + assert(creals(out_6_2[0]) == 1.0); + assert(cimags(out_6_2[0]) == 1.0); + assert(creals(out_6_2[1]) == 2.0); + assert(cimags(out_6_2[1]) == 2.0); + assert(creals(out_6_2[2]) == 5.0); + assert(cimags(out_6_2[2]) == 5.0); + assert(creals(out_6_2[3]) == 3.0); + assert(cimags(out_6_2[3]) == 3.0); + assert(creals(out_6_2[4]) == 4.0); + assert(cimags(out_6_2[4]) == 4.0); + assert(creals(out_6_2[5]) == 7.0); + assert(cimags(out_6_2[5]) == 7.0); + assert(creals(out_6_2[6]) == 6.0); + assert(cimags(out_6_2[6]) == 6.0); + assert(creals(out_6_2[7]) == 9.0); + assert(cimags(out_6_2[7]) == 9.0); + assert(creals(out_6_2[8]) == 10.0); + assert(cimags(out_6_2[8]) == 10.0); + assert(creals(out_6_2[9]) == 8.0); + assert(cimags(out_6_2[9]) == 8.0); + assert(creals(out_6_2[10]) == 11.0); + assert(cimags(out_6_2[10]) == 11.0); + assert(creals(out_6_2[11]) == 12.0); + assert(cimags(out_6_2[11]) == 12.0); +} + +int main(void) { + srowcatsTest(); + scolumncatsTest(); + srowcataTest(); + scolumncataTest(); + crowcatsTest(); + ccolumncatsTest(); + crowcataTest(); + ccolumncataTest(); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj b/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj new file mode 100644 index 00000000..703f7465 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7F36A592-B667-43A4-B3C3-66636F2DECB8} + testDoubleMatrixConcatenation + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters b/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters new file mode 100644 index 00000000..cce0dbd2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/test_DoubleMatrixConcatenation/testDoubleMatrixConcatenation.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj b/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj new file mode 100644 index 00000000..4efaa48d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B9413124-1841-4373-BFE2-AE6C78F24731} + testFloatMatrixConcatenation + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters b/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters new file mode 100644 index 00000000..c53933d0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/test_FloatMatrixConcatenation/testFloatMatrixConcatenation.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/cat/zcata.c b/2.3-1/src/c/matrixOperations/cat/zcata.c new file mode 100644 index 00000000..485553d7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/zcata.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" +/* +** Emulate Scilab (from help cat) : +** then the concatenation is done according to the rows +** +** A1=[1 2 3 ; 4 5 6]; A2=[7 8 9 ; 10 11 12]; y=cat(1,A1,A2) => y=[1 2 3 ; 4 5 61 ;7 8 9; 10 11 12] +** +*/ + +void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out) { + int i = 0; + int j = 0; + for (i = 0 ; i < columns1 && i < columns2 ; ++i) + { + for (j = 0 ; j < lines1 ; ++j) + { + out[i*(lines1 + lines2) + j] = in1[i*lines1 + j]; + } + for (j = 0 ; j < lines2 ; ++j) + { + out[i*(lines1 + lines2) + lines1 + j] = in2[i*lines2 + j]; + } + } +} + + +/* +** Emulate Scilab (from help cat) : +** the concatenation is done according to the columns +** +** A1=[1 2 3;4 5 6]; A2=[7 8 9 ;10 11 12]; y=cat(2,A1,A2) => y=[1 2 3 7 8 9 ; 4 5 6 10 11 12] +** +*/ +void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out) { + int i = 0; + for (i = 0 ; i < lines1 * columns1 ; ++i) { + out[i] = in1[i]; + } + for (i = 0; i < lines2 * columns2 ; ++i) { + out[i + lines1 * columns1] = in2[i]; + } +} diff --git a/2.3-1/src/c/matrixOperations/cat/zcats.c b/2.3-1/src/c/matrixOperations/cat/zcats.c new file mode 100644 index 00000000..107000c9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/cat/zcats.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "cat.h" + +void zrowcats(doubleComplex in1, doubleComplex in2, doubleComplex *out) { + out[0] = in1; + out[1] = in2; +} + +void zcolumncats(doubleComplex in1, doubleComplex in2, doubleComplex *out) { + out[0] = in1; + out[1] = in2; +} + diff --git a/2.3-1/src/c/matrixOperations/chol/Makefile.am b/2.3-1/src/c/matrixOperations/chol/Makefile.am new file mode 100644 index 00000000..875adf20 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/Makefile.am @@ -0,0 +1,71 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixChol_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixChol.la + +HEAD = ../includes/chol.h + +libMatrixChol_la_SOURCES = $(HEAD) \ + schols.c \ + schola.c \ + dchols.c \ + dchola.c \ + cchola.c \ + zchola.c + + +############ +## CHECK +############ + + +check_PROGRAMS = testDoubleChol testFloatChol + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixChol.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testDoubleChol_SOURCES = testDoubleChol.c +testDoubleChol_LDADD = $(check_LDADD) +testDoubleChol_CFLAGS = $(check_INCLUDES) + +testFloatChol_SOURCES = testFloatChol.c +testFloatChol_LDADD = $(check_LDADD) +testFloatChol_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleChol testFloatChol + + + + diff --git a/2.3-1/src/c/matrixOperations/chol/Makefile.in b/2.3-1/src/c/matrixOperations/chol/Makefile.in new file mode 100644 index 00000000..f7409811 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/Makefile.in @@ -0,0 +1,772 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleChol$(EXEEXT) testFloatChol$(EXEEXT) +TESTS = testDoubleChol$(EXEEXT) testFloatChol$(EXEEXT) +subdir = src/c/matrixOperations/chol +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixChol_la_LIBADD = +am__objects_1 = +am_libMatrixChol_la_OBJECTS = $(am__objects_1) \ + libMatrixChol_la-schols.lo libMatrixChol_la-schola.lo \ + libMatrixChol_la-dchols.lo libMatrixChol_la-dchola.lo \ + libMatrixChol_la-cchola.lo libMatrixChol_la-zchola.lo +libMatrixChol_la_OBJECTS = $(am_libMatrixChol_la_OBJECTS) +libMatrixChol_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixChol_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleChol_OBJECTS = testDoubleChol-testDoubleChol.$(OBJEXT) +testDoubleChol_OBJECTS = $(am_testDoubleChol_OBJECTS) +testDoubleChol_DEPENDENCIES = $(check_LDADD) +testDoubleChol_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleChol_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatChol_OBJECTS = testFloatChol-testFloatChol.$(OBJEXT) +testFloatChol_OBJECTS = $(am_testFloatChol_OBJECTS) +testFloatChol_DEPENDENCIES = $(check_LDADD) +testFloatChol_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatChol_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixChol_la_SOURCES) $(testDoubleChol_SOURCES) \ + $(testFloatChol_SOURCES) +DIST_SOURCES = $(libMatrixChol_la_SOURCES) $(testDoubleChol_SOURCES) \ + $(testFloatChol_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixChol_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixChol.la +HEAD = ../includes/chol.h +libMatrixChol_la_SOURCES = $(HEAD) \ + schols.c \ + schola.c \ + dchols.c \ + dchola.c \ + cchola.c \ + zchola.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixChol.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I .\ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testDoubleChol_SOURCES = testDoubleChol.c +testDoubleChol_LDADD = $(check_LDADD) +testDoubleChol_CFLAGS = $(check_INCLUDES) +testFloatChol_SOURCES = testFloatChol.c +testFloatChol_LDADD = $(check_LDADD) +testFloatChol_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/chol/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/chol/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixChol.la: $(libMatrixChol_la_OBJECTS) $(libMatrixChol_la_DEPENDENCIES) + $(libMatrixChol_la_LINK) -rpath $(pkglibdir) $(libMatrixChol_la_OBJECTS) $(libMatrixChol_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleChol$(EXEEXT): $(testDoubleChol_OBJECTS) $(testDoubleChol_DEPENDENCIES) + @rm -f testDoubleChol$(EXEEXT) + $(testDoubleChol_LINK) $(testDoubleChol_OBJECTS) $(testDoubleChol_LDADD) $(LIBS) +testFloatChol$(EXEEXT): $(testFloatChol_OBJECTS) $(testFloatChol_DEPENDENCIES) + @rm -f testFloatChol$(EXEEXT) + $(testFloatChol_LINK) $(testFloatChol_OBJECTS) $(testFloatChol_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-cchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-dchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-dchols.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-schola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-schols.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixChol_la-zchola.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleChol-testDoubleChol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatChol-testFloatChol.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixChol_la-schols.lo: schols.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-schols.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-schols.Tpo -c -o libMatrixChol_la-schols.lo `test -f 'schols.c' || echo '$(srcdir)/'`schols.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-schols.Tpo $(DEPDIR)/libMatrixChol_la-schols.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='schols.c' object='libMatrixChol_la-schols.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-schols.lo `test -f 'schols.c' || echo '$(srcdir)/'`schols.c + +libMatrixChol_la-schola.lo: schola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-schola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-schola.Tpo -c -o libMatrixChol_la-schola.lo `test -f 'schola.c' || echo '$(srcdir)/'`schola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-schola.Tpo $(DEPDIR)/libMatrixChol_la-schola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='schola.c' object='libMatrixChol_la-schola.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-schola.lo `test -f 'schola.c' || echo '$(srcdir)/'`schola.c + +libMatrixChol_la-dchols.lo: dchols.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-dchols.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-dchols.Tpo -c -o libMatrixChol_la-dchols.lo `test -f 'dchols.c' || echo '$(srcdir)/'`dchols.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-dchols.Tpo $(DEPDIR)/libMatrixChol_la-dchols.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dchols.c' object='libMatrixChol_la-dchols.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-dchols.lo `test -f 'dchols.c' || echo '$(srcdir)/'`dchols.c + +libMatrixChol_la-dchola.lo: dchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-dchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-dchola.Tpo -c -o libMatrixChol_la-dchola.lo `test -f 'dchola.c' || echo '$(srcdir)/'`dchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-dchola.Tpo $(DEPDIR)/libMatrixChol_la-dchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dchola.c' object='libMatrixChol_la-dchola.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-dchola.lo `test -f 'dchola.c' || echo '$(srcdir)/'`dchola.c + +libMatrixChol_la-cchola.lo: cchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-cchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-cchola.Tpo -c -o libMatrixChol_la-cchola.lo `test -f 'cchola.c' || echo '$(srcdir)/'`cchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-cchola.Tpo $(DEPDIR)/libMatrixChol_la-cchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cchola.c' object='libMatrixChol_la-cchola.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-cchola.lo `test -f 'cchola.c' || echo '$(srcdir)/'`cchola.c + +libMatrixChol_la-zchola.lo: zchola.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -MT libMatrixChol_la-zchola.lo -MD -MP -MF $(DEPDIR)/libMatrixChol_la-zchola.Tpo -c -o libMatrixChol_la-zchola.lo `test -f 'zchola.c' || echo '$(srcdir)/'`zchola.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixChol_la-zchola.Tpo $(DEPDIR)/libMatrixChol_la-zchola.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zchola.c' object='libMatrixChol_la-zchola.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixChol_la_CFLAGS) $(CFLAGS) -c -o libMatrixChol_la-zchola.lo `test -f 'zchola.c' || echo '$(srcdir)/'`zchola.c + +testDoubleChol-testDoubleChol.o: testDoubleChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -MT testDoubleChol-testDoubleChol.o -MD -MP -MF $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo -c -o testDoubleChol-testDoubleChol.o `test -f 'testDoubleChol.c' || echo '$(srcdir)/'`testDoubleChol.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo $(DEPDIR)/testDoubleChol-testDoubleChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleChol.c' object='testDoubleChol-testDoubleChol.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -c -o testDoubleChol-testDoubleChol.o `test -f 'testDoubleChol.c' || echo '$(srcdir)/'`testDoubleChol.c + +testDoubleChol-testDoubleChol.obj: testDoubleChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -MT testDoubleChol-testDoubleChol.obj -MD -MP -MF $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo -c -o testDoubleChol-testDoubleChol.obj `if test -f 'testDoubleChol.c'; then $(CYGPATH_W) 'testDoubleChol.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleChol.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleChol-testDoubleChol.Tpo $(DEPDIR)/testDoubleChol-testDoubleChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleChol.c' object='testDoubleChol-testDoubleChol.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleChol_CFLAGS) $(CFLAGS) -c -o testDoubleChol-testDoubleChol.obj `if test -f 'testDoubleChol.c'; then $(CYGPATH_W) 'testDoubleChol.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleChol.c'; fi` + +testFloatChol-testFloatChol.o: testFloatChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -MT testFloatChol-testFloatChol.o -MD -MP -MF $(DEPDIR)/testFloatChol-testFloatChol.Tpo -c -o testFloatChol-testFloatChol.o `test -f 'testFloatChol.c' || echo '$(srcdir)/'`testFloatChol.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatChol-testFloatChol.Tpo $(DEPDIR)/testFloatChol-testFloatChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatChol.c' object='testFloatChol-testFloatChol.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -c -o testFloatChol-testFloatChol.o `test -f 'testFloatChol.c' || echo '$(srcdir)/'`testFloatChol.c + +testFloatChol-testFloatChol.obj: testFloatChol.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -MT testFloatChol-testFloatChol.obj -MD -MP -MF $(DEPDIR)/testFloatChol-testFloatChol.Tpo -c -o testFloatChol-testFloatChol.obj `if test -f 'testFloatChol.c'; then $(CYGPATH_W) 'testFloatChol.c'; else $(CYGPATH_W) '$(srcdir)/testFloatChol.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatChol-testFloatChol.Tpo $(DEPDIR)/testFloatChol-testFloatChol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatChol.c' object='testFloatChol-testFloatChol.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatChol_CFLAGS) $(CFLAGS) -c -o testFloatChol-testFloatChol.obj `if test -f 'testFloatChol.c'; then $(CYGPATH_W) 'testFloatChol.c'; else $(CYGPATH_W) '$(srcdir)/testFloatChol.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/chol/cchola.c b/2.3-1/src/c/matrixOperations/chol/cchola.c new file mode 100644 index 00000000..4b657e6c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/cchola.c @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include + +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "multiplication.h" +#include "division.h" +#include "subtraction.h" +#include "sqrt.h" +#endif +#include "chol.h" + + +void cchola(floatComplex * in, int size, floatComplex *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param out : output upper triangular matrix + */ + + /* + We compute U as A=Ut*U + */ + + +#ifndef WITHOUT_LAPACK + + /*We have to use a double, copy of in, + cause dpotrf works only with double, not with float*/ + doubleComplex* tmp; + int i=0, j=0, info=0; + + tmp=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for(i=0;i +void dchola(double * in, int size, double *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param U : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + int i=0,j=0,info=0; + + for (i=0;i + +double dchols(double in){ + return dsqrts(in); +} diff --git a/2.3-1/src/c/matrixOperations/chol/schola.c b/2.3-1/src/c/matrixOperations/chol/schola.c new file mode 100644 index 00000000..cb394c35 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/schola.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "sqrt.h" +#endif +#include "chol.h" + +void schola(float * in, int size, float *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param U : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + + /*We have to use a double, copy of in, + cause dpotrf works only with double, not with float*/ + double* tmp; + int i=0,j=0,info=0; + + tmp=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + for (i=0;i +#include +#include +#include +#include "chol.h" + +/* FIXME : assert à 1e-14 pour une valeur d'entrée de 0.003... */ + + +static void dcholsTest(void){ + double in=4; + double out; + printf("\n >>> DCholS <<<\n"); + out=dchols(in); + assert( (fabs(out-2) / fabs(out)) <1e-16); + +} + +static void dcholaTest(void){ + /* in2 non viable car non définie positive, ne fonctionne pas dans Scilab */ + double in2[49]={0.2113249,0.7560439,0.0002211,0.3303271, 0.6653811,0.6283918,0.8497452 ,\ + 0.6857310,0.8782165,0.0683740,0.5608486,0.6623569,0.7263507,0.1985144 ,\ + 0.5442573, 0.2320748 , 0.2312237, 0.2164633, 0.8833888, 0.6525135, 0.3076091 ,\ + 0.9329616, 0.2146008 , 0.312642 , 0.3616361 , 0.2922267 , 0.5664249 , 0.4826472 ,\ + 0.3321719, 0.5935095, 0.5015342 , 0.4368588 , 0.2693125 , 0.6325745 , 0.4051954 ,\ + 0.9184708, 0.0437334, 0.4818509 , 0.2639556 , 0.4148104 , 0.2806498 , 0.1280058 ,\ + 0.7783129, 0.2119030, 0.1121355 ,0.6856896 ,0.1531217 ,0.6970851 ,0.8415518 }; + + + double in[9]= {0.722725308034569025040,0.8976796260103583335877,0.2427821881137788295746,\ + 0.4337721113115549087524,0.9677053210325539112091,0.5068534435704350471497,\ + 0.523297640960663557053,0.5596947595477104187012,0.5617307000793516635895}; + double res[9]={0.8501325238070644996213,0,0,\ + 0.5102405791617476982225,0.8410468907315681308390,0,\ + 0.6155483131232661886401,0.2920372626834314977451,0.3123222878611475739064}; + double out[9]={0}, out2[49]={0}; + int size=3; + int i; + + printf("\n >>> DCholA <<<\n"); + dchola(in2,7,out2); + for (i=0;i<49;i++)printf("out2[i]= %f\n",out2[i]); + dchola(in,size,out); + for (i=0;i<9;i++){ + if (out[i]>1e-16) assert( (fabs(out[i]-res[i]) / fabs(out[i])) <3e-16); + } +} + + +static void zcholsTest(void){ + doubleComplex in; + doubleComplex out; + in=DoubleComplex(3,1); + printf("\n >>> ZCholS <<<\n"); + out=zchols(in); + printf("result : %f\n",zreals(out)); + +} + + + +static void zcholaTest(void){ + + { + double inR[9]= {9,4,2,4,5,1,2,1,4}; + double inI[9]= {1,-1,2,-1,-4,1,2,1,4}; + double resR[9]= {3,0,0,1.333333333333333259319,\ + 1.763834207376393736766,0,0.6666666666666666296592,\ + 0.1889822365046136265487,1.7525491637693282331867}; + double resI[9]= {0,0,0,- 0.3333333333333333148296,\ + 0,0,0.6666666666666666296592,- 0.0629940788348712366052,0}; + doubleComplex *in, out[9]; + int i; + + printf("\n >>> ZCholA Test1 <<<\n"); + in=DoubleComplexMatrix(inR,inI,9); + + zchola(in,3,out); + for (i=0;i<9;i++) printf("indice : %d out : %f+%f *i\n",i,zreals(out[i]),zimags(out[i])); + for (i=0;i<9;i++){ + if (zreals(out[i])>1e-16) + assert( (fabs(zreals(out[i])-resR[i]) / fabs(zreals(out[i]))) <3e-16); + if (zimags(out[i])>1e-16) + assert( (fabs(zimags(out[i])-resI[i]) / fabs(zimags(out[i]))) <3e-16); + } + free(in); + } + + + { + double inR[9]= {1.90865864663256012967,0.9230693052910239337905,1.7121882610664511670251, + 0.9230693052910239337905,1.6572668858351540244200,0.8330281942607563605563, + 1.7121882610664511670251,0.8330281942607563605563,1.6029756354175805910245}; + double inI[9]= {0.0000000000000001301043,- 0.0097963300301950190230,- 0.2359069351837047023857, + 0.0097963300301950190230,0,- 0.0909413002461877950644, + 0.2359069351837046468745,0.0909413002461877811866,0.0000000000000000034694}; + double resR[9]= {1.381542126260564051776 ,0,0, + 0.6681441613289825776079,1.1003635695246982706408 ,0, + 1.239331199911254843826,0.0034220321368758992685,0.1941496531533084546339 }; + double resI[9]= {0,0,0, + 0.0070908659562273776769,0,0, + 0.1707562373231691910114,- 0.0130507331536391171789,0}; + + doubleComplex *in, out[9]; + int i; + + printf("\n >>> ZCholA Test2 <<<\n"); + in=DoubleComplexMatrix(inR,inI,9); + + zchola(in,3,out); + + for (i=0;i<9;i++){ + if (zreals(out[i])>1e-16) + assert( (fabs(zreals(out[i])-resR[i]) / fabs(zreals(out[i]))) <3e-15); + if (zimags(out[i])>1e-16) + assert( (fabs(zimags(out[i])-resI[i]) / fabs(zimags(out[i]))) <1e-15); + } + free(in); + } + + + +} + + +static int cholTest(void){ + printf("\n >>> Double Chol <<<\n"); + dcholsTest(); + dcholaTest(); + zcholsTest(); + zcholaTest(); + return 0; +} + + +int main (void){ + assert(cholTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/chol/testFloatChol.c b/2.3-1/src/c/matrixOperations/chol/testFloatChol.c new file mode 100644 index 00000000..884d0478 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/testFloatChol.c @@ -0,0 +1,97 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + #include + #include + #include + #include "chol.h" + +static void scholsTest(void){ + float in=4; + float out; + printf("\n >>> SCholS <<<\n"); + out=schols(in); + printf("result : %f\n",out); + +} + +static void scholaTest(void){ + float in[9]= {0.722725308034569025040f,0.8976796260103583335877f,0.2427821881137788295746f,\ +0.4337721113115549087524f,0.9677053210325539112091f,0.5068534435704350471497f,\ +0.523297640960663557053f,0.5596947595477104187012f,0.5617307000793516635895f}; + float res[9]={0.8501325238070644996213f,0.0f,0.0f,\ +0.5102405791617476982225f,0.8410468907315681308390f,0.0f,\ +0.6155483131232661886401f,0.2920372626834314977451f,0.3123222878611475739064f}; + float out[9]; + int size=3; + int i; + printf("\n >>> SCholA <<<\n"); + schola(in,size,out); + for (i=0;i<9;i++){ + if (out[i]>1e-16) assert( (fabs(out[i]-res[i]) / fabs(out[i])) <1e-6); + } +} + + +static void ccholsTest(void){ + floatComplex in; + floatComplex out; + in=FloatComplex(3,1); + printf("\n >>> CCholS <<<\n"); + out=cchols(in); + printf("result : %f\n",creals(out)); + +} + + + + + + + +static void ccholaTest(void){ + float inR[9]= {9.0f,4.0f,2.0f,4.0f,5.0f,1.0f,2.0f,1.0f,4.0f}; + float inI[9]= {0.0f,-1.0f,2.0f,-1.0f,0.0f,1.0f,2.0f,1.0f,0.0f}; + float resR[9]= {3.0f,0.0f,0.0f,1.333333333333333259319f,\ + 1.763834207376393736766f,0.0f,0.6666666666666666296592f,\ + 0.1889822365046136265487f,1.7525491637693282331867f}; + float resI[9]= {0.0f,0.0f,0.0f,- 0.3333333333333333148296f,\ + 0.0f,0.0f,0.6666666666666666296592f,- 0.0629940788348712366052f,0.0f}; + floatComplex *in, out[9]; + int i; + + printf("\n >>> CCholA <<<\n"); + in=FloatComplexMatrix(inR,inI,9); + + cchola(in,3,out); + for (i=0;i<9;i++) printf("indice : %d out : %f+%f *i\n",i,creals(out[i]),cimags(out[i])); + for (i=0;i<9;i++){ + if (creals(out[i])>1e-16) + assert( (fabs(creals(out[i])-resR[i]) / fabs(creals(out[i]))) <1e-8); + if (cimags(out[i])>1e-16) + assert( (fabs(cimags(out[i])-resI[i]) / fabs(cimags(out[i]))) <1e-8); + } +} +static int cholTest(void){ + printf("\n >>> Float Chol <<<\n"); + scholsTest(); + scholaTest(); + ccholsTest(); + ccholaTest(); + return 0; +} + + +int main (void){ + assert(cholTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj b/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj new file mode 100644 index 00000000..4a973585 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2B2D70A6-F2DB-4160-972C-9ECFA0B0699A} + testDoubleChol + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters b/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters new file mode 100644 index 00000000..bb07d366 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/test_DoubleChol/testDoubleChol.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj b/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj new file mode 100644 index 00000000..ba9fabde --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C5BA0B86-B432-4EF6-95DE-75C026994F4F} + testFloatChol + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters b/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters new file mode 100644 index 00000000..ae308d52 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/test_FloatChol/testFloatChol.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/chol/zchola.c b/2.3-1/src/c/matrixOperations/chol/zchola.c new file mode 100644 index 00000000..730c2415 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/chol/zchola.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "multiplication.h" +#include "division.h" +#include "subtraction.h" +#include "sqrt.h" +#endif + +#include "chol.h" + +void zchola(doubleComplex * in, int size, doubleComplex *out){ + /* param in : input matrix (square matrix) + param size : number of rows or columns + param out : output upper triangular matrix + */ + +#ifndef WITHOUT_LAPACK + int i=0, j=0, info=0; + + for(i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "division.h" +#endif + +#include "determ.h" +#include "multiplication.h" +#include "subtraction.h" +#include "addition.h" + + + +floatComplex cdeterma(floatComplex *in, int size){ +#ifndef WITHOUT_LAPACK + int i=0,info=0; + doubleComplex *inCopy,out_tmp; + int *vectPivot; + floatComplex out, tmp1,tmp2; + + + /*Calculation of the determinant*/ + switch(size){ + case 2 : out = cdiffs(cmuls(in[0],in[3]),cmuls(in[1],in[2])); + break; + case 3 : /*regle de Sarrus*/ + out=FloatComplex(0,0); + /*Addition part*/ + tmp1 = cmuls(in[0],in[4]); + tmp2 = cmuls(tmp1,in[8]); + out = cadds(out,tmp2); + tmp1 = cmuls(in[1],in[5]); + tmp2 = cmuls(tmp1,in[6]); + out = cadds(out,tmp2); + tmp1 = cmuls(in[2],in[3]); + tmp2 = cmuls(tmp1,in[7]); + out = cadds(out,tmp2); + /*Subtraction part*/ + tmp1 = cmuls(in[0],in[5]); + tmp2 = cmuls(tmp1,in[7]); + out = cdiffs(out,tmp2); + tmp1 = cmuls(in[1],in[3]); + tmp2 = cmuls(tmp1,in[8]); + out = cdiffs(out,tmp2); + tmp1 = cmuls(in[2],in[4]); + tmp2 = cmuls(tmp1,in[6]); + out = cdiffs(out,tmp2); + break; + + default : + + + /*We must have a doubleComplex matrix cause + zgetrf accept only double parameters*/ + + /*Copy the input matrix*/ + inCopy=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" +#include "lapack.h" + +double ddeterma(double * in, int size){ +#ifndef WITHOUT_LAPACK + int i=0, info=0; + double out=0; + double *inCopy=NULL; + int* tmp=NULL; + + /*Calculation of the determinant*/ + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + for (i=0;i +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#endif +#include "determ.h" + +float sdeterma(float * in, int size){ +#ifndef WITHOUT_LAPACK + float out; + double *inCopy; + int* tmp; + int info=0,i=0; + + + + /*Calculation of the determinant*/ + + switch (size){ + case 2 : out = in[0]*in[3]-in[1]*in[2]; + break; + case 3 : /*regle de Sarrus*/ + out = in[0]*in[4]*in[8]+in[1]*in[5]*in[6]+in[2]*in[3]*in[7] + -in[0]*in[5]*in[7]-in[1]*in[3]*in[8]-in[2]*in[4]*in[6]; + break; + default : + + /*Copy the input matrix*/ + inCopy=(double*)malloc((unsigned int)(size*size)*sizeof(double)); + tmp=(int*)malloc((unsigned int)size*sizeof(int)); + for (i=0;i +#include +#include +#include "determ.h" + + + +#define IN2 {0.1998337740078568458557,0.5618660743348300457001,\ +0.5896177329123020172119,0.6853979662992060184479f} + +#define RES2 -0.1943205386467572182152 + +#define IN3 {0.8906224733218550682068,0.5042212805710732936859,0.3493615407496690750122,\ +0.3873778772540390491486,0.9222898678854107856751,0.9488184261135756969452,\ +0.3435337245464324951172,0.3760118731297552585602,0.7340940563008189201355} + +#define RES3 0.2464108526639412488635 + +#define IN4 {0.2615761472843587398529,0.4993493836373090744019,0.2638578419573605060577,\ + 0.5253563085570931434631,\ +0.5376229803077876567841,0.1199925504624843597412,0.2256303490139544010162,\ + 0.6274093082174658775330,\ +0.7608432597480714321137,0.0485566202551126480103,0.6723949727602303028107,\ + 0.2017172696068882942200,\ +0.3911573919467628002167,0.8300316557288169860840,0.5878720157779753208160,\ + 0.4829179299995303153992} + +#define RES4 0.0079215378363537460038 + +#define IN5 {0.2232865034602582454681,0.8400885667651891708374,0.1205995907075703144074,\ + 0.2855364168062806129456,0.8607514644972980022430,\ +0.8494101651012897491455,0.5257060811854898929596,0.9931209897622466087341,\ + 0.6488562873564660549164,0.9923190940171480178833,\ +0.0500419777818024158478,0.7485506581142544746399,0.4104058998636901378632,\ + 0.6084526330232620239258,0.8544210889376699924469,\ +0.0642646728083491325378,0.8279082938097417354584,0.9262343775480985641480,\ + 0.5667211269028484821320,0.5711638936772942543030,\ +0.8160110483877360820770,0.0568927936255931854248,0.5595936686731874942780,\ + 0.1249340316280722618103,0.7279222286306321620941} + +#define RES5 0.0501241717143536200108 + +#define IN6 {0.2677766475826501846314,0.5465334919281303882599,0.9885407658293843269348,\ + 0.7395656588487327098846,0.0037173107266426086426,0.5900572859682142734528,\ +0.3096467358991503715515,0.2552205710671842098236,0.6251879390329122543335,\ + 0.1157417376525700092316,0.6117004090920090675354,0.6783956284634768962860,\ +0.3320095278322696685791,0.0258709923364222049713,0.5174468224868178367615,\ + 0.3916873238049447536469,0.2413538414984941482544,0.5064434898085892200470,\ +0.4236102001741528511047,0.2893727528862655162811,0.0887932181358337402344,\ + 0.6212881752289831638336,0.3454984454438090324402,0.7064867629669606685638,\ +0.5211472492665052413940,0.2870400850661098957062,0.6502795079723000526428,\ + 0.0881334762088954448700,0.4498763345181941986084,0.722725308034569025040,\ +0.8976796260103583335877,0.2427821881137788295746,0.4337721113115549087524,\ + 0.9677053210325539112091,0.5068534435704350471497,0.523297640960663557053} + +#define RES6 -0.0275938917848303037761 + +#define IN8 {0.5596947595477104187012,0.5617307000793516635895,0.468176002614200115204,\ + 0.7794546722434461116791,0.7901071812957525253296,0.9808542062528431415558,\ + 0.8187066102400422096252,0.4256872381083667278290,\ +0.2461560554802417755127,0.922953246627002954483,0.1000745808705687522888,\ + 0.4678218117915093898773,0.3950497675687074661255,0.0366117102093994617462,\ + 0.5175368534401059150696,0.8325451570563018321991,\ +0.6104832142591476440430,0.1871111788786947727203,0.0189574835821986198425,\ + 0.8433564766310155391693,0.0748594831675291061401,0.8532815133221447467804,\ + 0.0124590108171105384827,0.1867539356462657451630,\ +0.4920584075152873992920,0.7489608139730989933014,0.9414957007393240928650,\ + 0.212405560072511434555,0.5795019958168268203735,0.2628147569485008716583,\ + 0.4360986622050404548645,0.9110545101575553417206,\ +0.8082667365670204162598,0.8102653049863874912262,0.2590428395196795463562,\ + 0.4139087288640439510346,0.3599927779287099838257,0.6912787933833897113800,\ + 0.7656858796253800392151,0.3572649653069674968720,\ +0.7693399824202060699463,0.5477633909322321414948,0.0962288742884993553162,\ + 0.9561171731911599636078,0.2207408566027879714966,0.0143259358592331409454,\ + 0.8191489772871136665344,0.1304992842487990856171,\ +0.9682003557682037353516,0.6561381467618048191071,0.2445538965985178947449,\ + 0.5283123566769063472748,0.8468925636261701583862,0.7876622085459530353546,\ + 0.1262082615867257118225,0.7883860985748469829559,\ +0.3453042469918727874756,0.2659857333637773990631,0.9709818651899695396423,\ + 0.8875247663818299770355,0.2066752854734659194946,0.8525160965509712696075,\ + 0.6744697811082005500794,0.9152874383144080638886} + +#define RES8 0.1359018266554544440705 + +#define IN10 {0.0284859761595726013184,0.2367841475643217563629,0.7015343559905886650085,\ + 0.1202526628039777278900,0.8287412133067846298218,0.3161072959192097187042,\ + 0.5305190766230225563049,0.5715174819342792034149,0.0478015430271625518799,\ + 0.8248619721271097660065,\ +0.5798843121156096458435,0.2791808298788964748383,0.9545110929757356643677,\ + 0.9071154636330902576447,0.3360149310901761054993,0.1175613063387572765350,\ + 0.9253723770380020141602,0.7263671257533133029938,0.9009497938677668571472,\ + 0.3948993249796330928803,\ +0.5655179750174283981323,0.7061489676125347614288,0.6787831196561455726624,\ + 0.413293636869639158249,0.1402290873229503631592,0.4952356130816042423248,\ + 0.4194877287372946739197,0.8626222289167344570160,0.2857509646564722061157,\ + 0.2512136367149651050568,\ +0.3389101596549153327942,0.3921975973062217235565,0.4681552127003669738770,\ + 0.3361602746881544589996,0.5336876614019274711609,0.2039063959382474422455,\ + 0.1589989718049764633179,0.0181815107353031635284,0.4098370606079697608948,\ + 0.0105834598653018474579,\ +0.1965309716761112213135,0.2725595370866358280182,0.3437655037268996238709,\ + 0.2033702037297189235687,0.3011944610625505447388,0.2762595904059708118439,\ + 0.2944530742242932319641,0.5718073952011764049530,0.2141770124435424804688,\ + 0.6895461627282202243805,\ +0.5855572847649455070496,0.4204123034141957759857,0.4277572017163038253784,\ + 0.318458587396889925003,0.5761894444003701210022,0.4254902224056422710419,\ + 0.9761981628835201263428,0.2518960000015795230866,0.4391129007562994956970,\ + 0.075930369552224874496,\ +0.2559380177408456802368,0.0670616743154823780060,0.7651131572201848030090,\ + 0.0417361590079963207245,0.3438271805644035339356,0.1970167332328855991364,\ + 0.2122898651286959648132,0.3140398501418530941010,0.7821625377982854843140,\ + 0.0540932347066700458527,\ +0.9190206909552216529846,0.4603515709750354290009,0.2992685027420520782471,\ + 0.0029166326858103275299,0.8993470584973692893982,0.8387927166186273097992,\ + 0.4343749452382326126099,0.7767876130528748035431,0.1395317660644650459290,\ + 0.1150637227110564708710,\ +0.5355419963598251342773,0.4311733045615255832672,0.614538478665053844452,\ + 0.9258962138555943965912,0.0993817280977964401245,0.4280578647740185260773,\ + 0.9431830951943993568420,0.0327395270578563213348,0.9213267080485820770264,\ + 0.9449024409987032413483,\ +0.9007069906219840049744,0.8094316101633012294769,0.0251954291015863418579,\ + 0.0019645062275230884552,0.5075221331790089607239,0.4076042952947318553925,\ + 0.8408046141266822814941,0.501726570073515176773,0.9128780765458941459656,\ + 0.4435729472897946834564} + +#define RES10 -0.0105698586359502730292 + + + + +#define ZINR2 {0.9625065480358898639679,0.9798011491075158119202,\ +0.0785698364488780498505,0.9150031916797161102295} +#define ZINI2 {0.6172610134817659854889,0.9964194735512137413025,\ +0.0468598580919206142426,0.9245926234871149063110} +#define ZRESR2 0.2796908427268796071274 +#define ZRESI2 1.3305203939304277582778 + +#define ZINR3 {0.9689865079708397388458,0.4916289718821644783020,0.2977053108625113964081,\ +0.0603054538369178771973,0.631347181741148233414,0.0241030259057879447937,\ +0.1527438252232968807221,0.9481177683919668197632,0.2744265575893223285675} +#define ZINI3 {0.4794727200642228126526,0.485576837789267301559,0.676400367170572280884,\ +0.8321249918080866336823,0.0125875836238265037537,0.5453779897652566432953,\ +0.8426716942340135574341,0.9029165101237595081329,0.4409482078626751899719} +#define ZRESR3 0.3208274162176448784933 +#define ZRESI3 -0.5045627162227295237074 + +#define ZINR4 {0.8332359003834426403046,0.7233976423740386962891,0.4377150186337530612946,\ + 0.3080607382580637931824,\ +0.8749813153408467769623,0.5355882328003644943237,0.3085998897440731525421,\ + 0.3354632416740059852600,\ +0.2342486302368342876434,0.2589411698281764984131,0.8521509231068193912506,\ + 0.4821739485487341880798,\ +0.6095217890106141567230,0.9872822705656290054321,0.9811426815576851367950,\ + 0.3303113700821995735169} +#define ZINI4 {0.3589145573787391185761,0.2780527696013450622559,0.9583482020534574985504,\ + 0.0156362904235720634460,\ +0.2964351712726056575775,0.4685934986919164657593,0.4262020816095173358917,\ + 0.4217656338587403297424,\ +0.1034853602759540081024,0.4279759414494037628174,0.7860729382373392581940,\ + 0.8568082069978117942810,\ +0.1993437460623681545258,0.7131301630288362503052,0.5208952468819916248322,\ + 0.9311723159626126289368} +#define ZRESR4 0.5916307061533252475982 +#define ZRESI4 -0.104762389048400544889 + +#define ZINR5 {0.4143836158327758312225,0.5980196148157119750977,0.5549105503596365451813,\ + 0.8552952585741877555847,0.3097750707529485225678,\ +0.9446128141134977340698,0.2442680452950298786163,0.8760446915403008460999,\ + 0.4874215493910014629364,0.3844018988311290740967,\ +0.0922345430590212345123,0.0705418726429343223572,0.7338807261548936367035,\ + 0.7792180571705102920532,0.7827638057060539722443,\ +0.2161567779257893562317,0.3420197847299277782440,0.430093832314014434814,\ + 0.6261752569116652011871,0.9554250938817858695984,\ +0.45415506651625037193,0.0029223021119832992554,0.0106920679099857807159,\ + 0.9746370846405625343323,0.7704260940663516521454} +#define ZINI5 {0.6396631337702274322510,0.9535886184312403202057,0.4148483341559767723084,\ + 0.4661539695225656032562,0.2238455135375261306763,\ +0.3456973326392471790314,0.2340623633936047554016,0.6619341480545699596405,\ + 0.2691179513931274414063,0.9830248900689184665680,\ +0.7393351225182414054871,0.2902135862968862056732,0.3995949607342481613159,\ + 0.9792278115637600421906,0.0075513580814003944397,\ +0.7021022657863795757294,0.8907506130635738372803,0.6526974202133715152741,\ + 0.4136228552088141441345,0.8581690913997590541840,\ +0.2396089676767587661743,0.4820041772909462451935,0.9848585547879338264465,\ + 0.4469721647910773754120,0.2329813763499259948731} +#define ZRESR5 -0.2050520846829704535441 +#define ZRESI5 1.3442626005968567604043 + +#define ZINR6 {0.2234513931907713413239,0.8002565456554293632507,0.7750734328292310237885,\ + 0.4825006630271673202515,0.7844883133657276630402,0.1534679317846894264221,\ +0.7722877110354602336884,0.8952021785080432891846,0.9467325792647898197174,\ + 0.6981825744733214378357,0.9559160820208489894867,0.0484017301350831985474,\ +0.5323520642705261707306,0.2946867095306515693665,0.6977136689238250255585,\ + 0.9376203864812850952148,0.1075560846365988254547,0.7763424394652247428894,\ +0.6373417838476598262787,0.0663061570376157760620,0.8169459854252636432648,\ + 0.354739100672304630280,0.5860544512979686260223,0.3461025469005107879639,\ +0.4424751014448702335358,0.8822665056213736534119,0.7643693066202104091644,\ + 0.7764139864593744277954,0.2807680931873619556427,0.6908600600436329841614,\ +0.7174728694371879100800,0.372018136084079742432,0.9325496577657759189606,\ + 0.2256677551195025444031,0.7521101920865476131439,0.3074750658124685287476} +#define ZINI6 {0.5979326148517429828644,0.1923890346661210060120,0.2387088830582797527313,\ + 0.7470833100378513336182,0.9713153676129877567291,0.4370355373248457908630,\ +0.6224875054322183132172,0.3291327971965074539185,0.3296387386508285999298,\ + 0.2768637137487530708313,0.4872983503155410289764,0.7732046544551849365234,\ +0.9077521809376776218414,0.5012293187901377677918,0.5159545852802693843842,\ + 0.5792678873986005783081,0.154639363754540681839,0.7611137786880135536194,\ +0.6907917778007686138153,0.2873229347169399261475,0.9642531336285173892975,\ + 0.5660724332556128501892,0.5782137936912477016449,0.266342097893357276917,\ +0.4747098502703011035919,0.6073546530678868293762,0.0409730705432593822479,\ + 0.501256845891475677490,0.5295930975116789340973,0.6259458316490054130554,\ +0.2219352661632001399994,0.3467419948428869247437,0.3951167692430317401886,\ + 0.5442812526598572731018,0.1430782820098102092743,0.7165467627346515655518} +#define ZRESR6 0.0374364367907719236550 +#define ZRESI6 0.0027318151340892903034 + +#define ZINR8 {0.826897530350834131241,0.0803818320855498313904,0.7634756616316735744476,\ + 0.6771226990967988967896,0.0800866526551544666290,0.5631617354229092597961,\ + 0.8400143641047179698944,0.9142984896898269653320,\ +0.9566112258471548557282,0.1676578698679804801941,0.4345969124697148799896,\ + 0.0417516361922025680542,0.4832747434265911579132,0.2889312515035271644592,\ + 0.4115779171697795391083,0.2200270108878612518311,\ +0.3144670636393129825592,0.2733902474865317344666,0.7691849744878709316254,\ + 0.0548522863537073135376,0.4532337454147636890411,0.2262856932356953620911,\ + 0.1486739399842917919159,0.2435002401471138000488,\ +0.384454759303480386734,0.1141278846189379692078,0.3649685769341886043549,\ + 0.9379479344934225082398,0.2138825734145939350128,0.8807754451408982276917,\ + 0.3025345797650516033173,0.2935827709734439849854,\ +0.9067896143533289432526,0.7959460681304335594177,0.0202379724942147731781,\ + 0.1722054202109575271606,0.2199751031585037708283,0.7548991339281201362610,\ + 0.4089378821663558483124,0.4680796265602111816406,\ +0.420881266240030527115,0.7480402020737528800964,0.2455636872909963130951,\ + 0.0257788877934217453003,0.3875689213164150714874,0.2191973784938454627991,\ + 0.9874265412800014019013,0.6185800097882747650147,\ +0.1833024383522570133209,0.5313195576891303062439,0.1505152708850800991058,\ + 0.9561535362154245376587,0.6994940754957497119904,0.2583465399220585823059,\ + 0.6155266496352851390839,0.1903010532259941101074,\ +0.4607576900161802768707,0.5220010234043002128601,0.7053800462745130062103,\ + 0.8874893691390752792358,0.1858218242414295673370,0.0922524714842438697815,\ + 0.3779664481990039348602,0.9369315691292285919190} +#define ZINI8 {0.1980521664954721927643,0.4702028548344969749451,0.3778818598948419094086,\ + 0.3629649449139833450317,0.2793333870358765125275,0.6721442686393857002258,\ + 0.6908950763754546642304,0.5104757994413375854492,\ +0.0610603489913046360016,0.9335384247824549674988,0.1448998316191136837006,\ + 0.5721211265772581100464,0.5459886942990124225617,0.0516680190339684486389,\ + 0.5011013220064342021942,0.9260971657931804656982,\ +0.8546948046423494815826,0.5857099732384085655212,0.8791871047578752040863,\ + 0.2532048318535089492798,0.790395137388259172440,0.6329805525019764900208,\ + 0.8602323713712394237518,0.9019620195031166076660,\ +0.3158749365247786045075,0.4001023573800921440125,0.1110895960591733455658,\ + 0.4705127831548452377319,0.5362763185985386371613,0.2878431910648941993713,\ + 0.8740125591866672039032,0.0740833915770053863525,\ +0.2814957336522638797760,0.7083768015727400779724,0.1652647457085549831390,\ + 0.2667352575808763504028,0.8819408011622726917267,0.3537154989317059516907,\ + 0.0264621186070144176483,0.0861647427082061767578,\ +0.2313965209759771823883,0.1340646473690867424011,0.6724002673290669918060,\ + 0.1902998369187116622925,0.7307508592493832111359,0.5048490324988961219788,\ + 0.8791159312240779399872,0.5544437132775783538818,\ +0.2063297093845903873444,0.401161103509366512299,0.4559328979812562465668,\ + 0.6977151576429605484009,0.3965912279672920703888,0.498381090350449085236,\ + 0.1452422770671546459198,0.9075358733534812927246,\ +0.1009295457042753696442,0.0177189959213137626648,0.7937671481631696224213,\ + 0.4309146609157323837280,0.584337853360921144485,0.7954284632578492164612,\ + 0.1390615846030414104462,0.1012784726917743682861} +#define ZRESR8 -0.2866880544829432109211 +#define ZRESI8 -0.5082321435837643397449 + +#define ZINR10 {0.3316808626987040042877,0.8344425177201628684998,0.0549940518103539943695,\ + 0.3696003425866365432739,0.7453266424126923084259,0.0571811841800808906555,\ + 0.5999651807360351085663,0.2085741907358169555664,0.8798878290690481662750,\ + 0.4782809792086482048035,\ +0.7116099162958562374115,0.8585865031927824020386,0.8078222130425274372101,\ + 0.5159962782636284828186,0.8917340408079326152802,0.8842348866164684295654,\ + 0.70964269945397973061,0.6610225578770041465759,0.7252350724302232265472,\ + 0.510143497958779335022,\ +0.2824866441078484058380,0.2214915128424763679504,0.5767575385980308055878,\ + 0.7048253491520881652832,0.5607945644296705722809,0.3628880484029650688171,\ + 0.3088326244615018367767,0.9813414867967367172241,0.7428482254035770893097,\ + 0.1616391474381089210510,\ +0.3652521963231265544891,0.3835070468485355377197,0.1169181005097925662994,\ + 0.8911246126517653465271,0.0634272000752389431000,0.6263941843062639236450,\ + 0.6807702076621353626251,0.2588596837595105171204,0.4394804346375167369843,\ + 0.8598818778991699218750,\ +0.5482823201455175876617,0.8135995296761393547058,0.4898237003944814205170,\ + 0.0240026097744703292847,0.7369195525534451007843,0.2411156157031655311585,\ + 0.1529693226329982280731,0.2648359201848506927490,0.4298193217255175113678,\ + 0.7673939457163214683533,\ +0.8753260499797761440277,0.3796988371759653091431,0.3062356826849281787872,\ + 0.3880051793530583381653,0.1047293278388679027557,0.7603831812739372253418,\ + 0.0340930395759642124176,0.1423966242000460624695,0.5554559468291699886322,\ + 0.8031897451728582382202,\ +0.5183992316015064716339,0.1518561029806733131409,0.5884730662219226360321,\ + 0.2545093484222888946533,0.9992679939605295658112,0.6398976957425475120544,\ + 0.5506716123782098293304,0.4607007671147584915161,0.5933007937856018543243,\ + 0.6538193570449948310852,\ +0.4168340521864593029022,0.9910155385732650756836,0.3720780410803854465485,\ + 0.7061824081465601921082,0.5780865414999425411224,0.602319641038775444031,\ + 0.5715096746571362018585,0.0549629041925072669983,0.1205854485742747784,\ + 0.0143620483577251434326,\ +0.0257951230742037296295,0.8411248764023184776306,0.4381882525049149990082,\ + 0.4643401596695184707642,0.4197426405735313892365,0.8023654492571949958801,\ + 0.5228588166646659374237,0.5095121040940284729004,0.4531980180181562900543,\ + 0.7817818326875567436218,\ +0.776557037141174077988,0.0466059204190969467163,0.5113326688297092914581,\ + 0.7502101892605423927307,0.6883628661744296550751,0.0167756117880344390869,\ + 0.9345410899259150028229,0.5609863763675093650818,0.2205847105942666530609,\ + 0.7648540753871202468872} +#define ZINI10 {0.4816976976580917835236,0.1558785634115338325501,0.2476022052578628063202,\ + 0.5216529071331024169922,0.0805230387486517429352,0.4409417239949107170105,\ + 0.8911933614872395992279,0.9780590813606977462769,0.4588093762286007404327,\ + 0.5510440031066536903381,\ +0.0960960905067622661591,0.4196785055100917816162,0.7502556503750383853912,\ + 0.7218149593099951744080,0.2895541018806397914887,0.3907764498144388198853,\ + 0.6686618146486580371857,0.4877656819298863410950,0.4685971769504249095917,\ + 0.3562648519873619079590,\ +0.3442325466312468051910,0.4253307832404971122742,0.5588058172725141048431,\ + 0.3304864969104528427124,0.4157403339631855487824,0.1595822656527161598206,\ + 0.3883102680556476116180,0.9415460713207721710205,0.4722979352809488773346,\ + 0.8533652639016509056091,\ +0.1207739165984094142914,0.8999380934983491897583,0.4384902161546051502228,\ + 0.8976056622341275215149,0.4911110657267272472382,0.3402217179536819458008,\ + 0.9966153600253164768219,0.0215395865961909294128,0.6876890822313725948334,\ + 0.0044924151152372360229,\ +0.6397854541428387165070,0.5416147718206048011780,0.2247649203054606914520,\ + 0.7364005260169506072998,0.4496364505030214786530,0.9678138038143515586853,\ + 0.6489060199819505214691,0.2544666919857263565064,0.1923975017853081226349,\ + 0.6861492367461323738098,\ +0.4231455805711448192596,0.6734441593289375305176,0.8270696722902357578278,\ + 0.9360805852338671684265,0.8326222090981900691986,0.7424779590219259262085,\ + 0.0194640238769352436066,0.8016031915321946144104,0.2554539437405765056610,\ + 0.2688109613955020904541,\ +0.7558490769006311893463,0.4347589677199721336365,0.6425966522656381130219,\ + 0.6957868058234453201294,0.6499576461501419544220,0.2303190128877758979797,\ + 0.5504368054680526256561,0.3038997054100036621094,0.0371030517853796482086,\ + 0.1703881053254008293152,\ +0.5698686256073415279388,0.0036411266773939132690,0.4491547052748501300812,\ + 0.0576810697093605995178,0.4956056098453700542450,0.1888933442533016204834,\ + 0.5641230703331530094147,0.8562210192903876304627,0.0794764286838471889496,\ + 0.6196198705583810806274,\ +0.2241039988584816455841,0.8582094730809330940247,0.7114551994018256664276,\ + 0.8026027604937553405762,0.6153324418701231479645,0.8958183480426669120789,\ + 0.8721761344932019710541,0.8389767911285161972046,0.2040955354459583759308,\ + 0.3166538262739777565002,\ +0.7006825651042163372040,0.2073105163872241973877,0.5222550616599619388580,\ + 0.9416420971974730491638,0.52116033947095274925,0.4509841967374086380005,\ + 0.3961292845197021961212,0.7240869747474789619446,0.6724055963568389415741,\ + 0.2386146038770675659180} +#define ZRESR10 -0.0701164785573487325809 +#define ZRESI10 -0.3697118554850691296565 + +static void ddetermaTest(void){ + double in2[]=IN2; double res2=RES2; + double in3[]=IN3; double res3=RES3; + double in4[]=IN4; double res4=RES4; + double in5[]=IN5; double res5=RES5; + double in6[]=IN6; double res6=RES6; + double in8[]=IN8; double res8=RES8; + double in10[]=IN10; double res10=RES10; + double out2,out3,out4,out5,out6,out8,out10; + printf("\n >>> DDetermA <<<\n"); + out2=ddeterma(in2,2); + out3=ddeterma(in3,3); + out4=ddeterma(in4,4); + out5=ddeterma(in5,5); + out6=ddeterma(in6,6); + out8=ddeterma(in8,8); + out10=ddeterma(in10,10); + + assert((fabs(out2-res2)/fabs(out2))<3e-8); + assert((fabs(out3-res3)/fabs(out3))<3e-15); + assert((fabs(out4-res4)/fabs(out4))<3e-15); + assert((fabs(out5-res5)/fabs(out5))<3e-15); + assert((fabs(out6-res6)/fabs(out6))<3e-15); + assert((fabs(out8-res8)/fabs(out8))<3e-15); + assert((fabs(out10-res10)/fabs(out10))<3e-15); +} + +static void zdetermaTest(void){ + double inR2[]=ZINR2; double inI2[]=ZINI2; double resR2=ZRESR2; double resI2=ZRESI2; + double inR3[]=ZINR3; double inI3[]=ZINI3; double resR3=ZRESR3; double resI3=ZRESI3; + double inR4[]=ZINR4; double inI4[]=ZINI4; double resR4=ZRESR4; double resI4=ZRESI4; + double inR5[]=ZINR5; double inI5[]=ZINI5; double resR5=ZRESR5; double resI5=ZRESI5; + double inR6[]=ZINR6; double inI6[]=ZINI6; double resR6=ZRESR6; double resI6=ZRESI6; + double inR8[]=ZINR8; double inI8[]=ZINI8; double resR8=ZRESR8; double resI8=ZRESI8; + double inR10[]=ZINR10; double inI10[]=ZINI10; double resR10=ZRESR10; double resI10=ZRESI10; + doubleComplex out2,out3,out4,out5,out6,out8,out10; + doubleComplex *in2, *in3, *in4, *in5, *in6, *in8, *in10; + printf("\n >>> ZDetermA <<<\n"); + in2=DoubleComplexMatrix(inR2,inI2,4); + in3=DoubleComplexMatrix(inR3,inI3,9); + in4=DoubleComplexMatrix(inR4,inI4,16); + in5=DoubleComplexMatrix(inR5,inI5,25); + in6=DoubleComplexMatrix(inR6,inI6,36); + in8=DoubleComplexMatrix(inR8,inI8,64); + in10=DoubleComplexMatrix(inR10,inI10,100); + + out2=zdeterma(in2,2); + out3=zdeterma(in3,3); + out4=zdeterma(in4,4); + out5=zdeterma(in5,5); + out6=zdeterma(in6,6); + out8=zdeterma(in8,8); + out10=zdeterma(in10,10); + + + assert((fabs(zreals(out2)-resR2)/fabs(zreals(out2)))<3e-16); + assert((fabs(zimags(out2)-resI2)/fabs(zimags(out2)))<3e-16); + + assert((fabs(zreals(out3)-resR3)/fabs(zreals(out3)))<3e-16); + assert((fabs(zimags(out3)-resI3)/fabs(zimags(out3)))<1e-16); + + assert((fabs(zreals(out4)-resR4)/fabs(zreals(out4)))<3e-16); + assert((fabs(zimags(out4)-resI4)/fabs(zimags(out4)))<3e-15); + + assert((fabs(zreals(out5)-resR5)/fabs(zreals(out5)))<3e-15); + assert((fabs(zimags(out5)-resI5)/fabs(zimags(out5)))<3e-15); + + assert((fabs(zreals(out6)-resR6)/fabs(zreals(out6)))<3e-15); + assert((fabs(zimags(out6)-resI6)/fabs(zimags(out6)))<3e-12); + + assert((fabs(zreals(out8)-resR8)/fabs(zreals(out8)))<3e-15); + assert((fabs(zimags(out8)-resI8)/fabs(zimags(out8)))<3e-15); + + assert((fabs(zreals(out10)-resR10)/fabs(zreals(out10)))<3e-14); + assert((fabs(zimags(out10)-resI10)/fabs(zimags(out10)))<3e-15); +} + +static int determTest(void){ + printf("\n >>> Double Determ <<<\n"); + ddetermaTest(); + zdetermaTest(); + return 0; +} + + +int main (void){ + assert(determTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/determ/testFloatDeterm.c b/2.3-1/src/c/matrixOperations/determ/testFloatDeterm.c new file mode 100644 index 00000000..d429d020 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/testFloatDeterm.c @@ -0,0 +1,453 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "determ.h" + + + +#define IN2 {0.1998337740078568458557f,0.5618660743348300457001f,\ +0.5896177329123020172119f,0.6853979662992060184479f} + +#define RES2 -0.1943205386467572182152f + +#define IN3 {0.8906224733218550682068f,0.5042212805710732936859f,0.3493615407496690750122f,\ +0.3873778772540390491486f,0.9222898678854107856751f,0.9488184261135756969452f,\ +0.3435337245464324951172f,0.3760118731297552585602f,0.7340940563008189201355f} + +#define RES3 0.2464108526639412488635f + +#define IN4 {0.2615761472843587398529f,0.4993493836373090744019f,0.2638578419573605060577f,\ + 0.5253563085570931434631f,\ +0.5376229803077876567841f,0.1199925504624843597412f,0.2256303490139544010162f,\ + 0.6274093082174658775330f,\ +0.7608432597480714321137f,0.0485566202551126480103f,0.6723949727602303028107f,\ + 0.2017172696068882942200f,\ +0.3911573919467628002167f,0.8300316557288169860840f,0.5878720157779753208160f,\ + 0.4829179299995303153992f} + +#define RES4 0.0079215378363537460038f + +#define IN5 {0.2232865034602582454681f,0.8400885667651891708374f,0.1205995907075703144074f,\ + 0.2855364168062806129456f,0.8607514644972980022430f,\ +0.8494101651012897491455f,0.5257060811854898929596f,0.9931209897622466087341f,\ + 0.6488562873564660549164f,0.9923190940171480178833f,\ +0.0500419777818024158478f,0.7485506581142544746399f,0.4104058998636901378632f,\ + 0.6084526330232620239258f,0.8544210889376699924469f,\ +0.0642646728083491325378f,0.8279082938097417354584f,0.9262343775480985641480f,\ + 0.5667211269028484821320f,0.5711638936772942543030f,\ +0.8160110483877360820770f,0.0568927936255931854248f,0.5595936686731874942780f,\ + 0.1249340316280722618103f,0.7279222286306321620941f} + +#define RES5 0.0501241717143536200108f + +#define IN6 {0.2677766475826501846314f,0.5465334919281303882599f,0.9885407658293843269348f,\ + 0.7395656588487327098846f,0.0037173107266426086426f,0.5900572859682142734528f,\ +0.3096467358991503715515f,0.2552205710671842098236f,0.6251879390329122543335f,\ + 0.1157417376525700092316f,0.6117004090920090675354f,0.6783956284634768962860f,\ +0.3320095278322696685791f,0.0258709923364222049713f,0.5174468224868178367615f,\ + 0.3916873238049447536469f,0.2413538414984941482544f,0.5064434898085892200470f,\ +0.4236102001741528511047f,0.2893727528862655162811f,0.0887932181358337402344f,\ + 0.6212881752289831638336f,0.3454984454438090324402f,0.7064867629669606685638f,\ +0.5211472492665052413940f,0.2870400850661098957062f,0.6502795079723000526428f,\ + 0.0881334762088954448700f,0.4498763345181941986084f,0.722725308034569025040f,\ +0.8976796260103583335877f,0.2427821881137788295746f,0.4337721113115549087524f,\ + 0.9677053210325539112091f,0.5068534435704350471497f,0.523297640960663557053f} + +#define RES6 -0.0275938917848303037761f + +#define IN8 {0.5596947595477104187012f,0.5617307000793516635895f,0.468176002614200115204f,\ + 0.7794546722434461116791f,0.7901071812957525253296f,0.9808542062528431415558f,\ + 0.8187066102400422096252f,0.4256872381083667278290f,\ +0.2461560554802417755127f,0.922953246627002954483f,0.1000745808705687522888f,\ + 0.4678218117915093898773f,0.3950497675687074661255f,0.0366117102093994617462f,\ + 0.5175368534401059150696f,0.8325451570563018321991f,\ +0.6104832142591476440430f,0.1871111788786947727203f,0.0189574835821986198425f,\ + 0.8433564766310155391693f,0.0748594831675291061401f,0.8532815133221447467804f,\ + 0.0124590108171105384827f,0.1867539356462657451630f,\ +0.4920584075152873992920f,0.7489608139730989933014f,0.9414957007393240928650f,\ + 0.212405560072511434555f,0.5795019958168268203735f,0.2628147569485008716583f,\ + 0.4360986622050404548645f,0.9110545101575553417206f,\ +0.8082667365670204162598f,0.8102653049863874912262f,0.2590428395196795463562f,\ + 0.4139087288640439510346f,0.3599927779287099838257f,0.6912787933833897113800f,\ + 0.7656858796253800392151f,0.3572649653069674968720f,\ +0.7693399824202060699463f,0.5477633909322321414948f,0.0962288742884993553162f,\ + 0.9561171731911599636078f,0.2207408566027879714966f,0.0143259358592331409454f,\ + 0.8191489772871136665344f,0.1304992842487990856171f,\ +0.9682003557682037353516f,0.6561381467618048191071f,0.2445538965985178947449f,\ + 0.5283123566769063472748f,0.8468925636261701583862f,0.7876622085459530353546f,\ + 0.1262082615867257118225f,0.7883860985748469829559f,\ +0.3453042469918727874756f,0.2659857333637773990631f,0.9709818651899695396423f,\ + 0.8875247663818299770355f,0.2066752854734659194946f,0.8525160965509712696075f,\ + 0.6744697811082005500794f,0.9152874383144080638886f} + +#define RES8 0.1359018266554544440705f + +#define IN10 {0.0284859761595726013184f,0.2367841475643217563629f,0.7015343559905886650085f,\ + 0.1202526628039777278900f,0.8287412133067846298218f,0.3161072959192097187042f,\ + 0.5305190766230225563049f,0.5715174819342792034149f,0.0478015430271625518799f,\ + 0.8248619721271097660065f,\ +0.5798843121156096458435f,0.2791808298788964748383f,0.9545110929757356643677f,\ + 0.9071154636330902576447f,0.3360149310901761054993f,0.1175613063387572765350f,\ + 0.9253723770380020141602f,0.7263671257533133029938f,0.9009497938677668571472f,\ + 0.3948993249796330928803f,\ +0.5655179750174283981323f,0.7061489676125347614288f,0.6787831196561455726624f,\ + 0.413293636869639158249f,0.1402290873229503631592f,0.4952356130816042423248f,\ + 0.4194877287372946739197f,0.8626222289167344570160f,0.2857509646564722061157f,\ + 0.2512136367149651050568f,\ +0.3389101596549153327942f,0.3921975973062217235565f,0.4681552127003669738770f,\ + 0.3361602746881544589996f,0.5336876614019274711609f,0.2039063959382474422455f,\ + 0.1589989718049764633179f,0.0181815107353031635284f,0.4098370606079697608948f,\ + 0.0105834598653018474579f,\ +0.1965309716761112213135f,0.2725595370866358280182f,0.3437655037268996238709f,\ + 0.2033702037297189235687f,0.3011944610625505447388f,0.2762595904059708118439f,\ + 0.2944530742242932319641f,0.5718073952011764049530f,0.2141770124435424804688f,\ + 0.6895461627282202243805f,\ +0.5855572847649455070496f,0.4204123034141957759857f,0.4277572017163038253784f,\ + 0.318458587396889925003f,0.5761894444003701210022f,0.4254902224056422710419f,\ + 0.9761981628835201263428f,0.2518960000015795230866f,0.4391129007562994956970f,\ + 0.075930369552224874496f,\ +0.2559380177408456802368f,0.0670616743154823780060f,0.7651131572201848030090f,\ + 0.0417361590079963207245f,0.3438271805644035339356f,0.1970167332328855991364f,\ + 0.2122898651286959648132f,0.3140398501418530941010f,0.7821625377982854843140f,\ + 0.0540932347066700458527f,\ +0.9190206909552216529846f,0.4603515709750354290009f,0.2992685027420520782471f,\ + 0.0029166326858103275299f,0.8993470584973692893982f,0.8387927166186273097992f,\ + 0.4343749452382326126099f,0.7767876130528748035431f,0.1395317660644650459290f,\ + 0.1150637227110564708710f,\ +0.5355419963598251342773f,0.4311733045615255832672f,0.614538478665053844452f,\ + 0.9258962138555943965912f,0.0993817280977964401245f,0.4280578647740185260773f,\ + 0.9431830951943993568420f,0.0327395270578563213348f,0.9213267080485820770264f,\ + 0.9449024409987032413483f,\ +0.9007069906219840049744f,0.8094316101633012294769f,0.0251954291015863418579f,\ + 0.0019645062275230884552f,0.5075221331790089607239f,0.4076042952947318553925f,\ + 0.8408046141266822814941f,0.501726570073515176773f,0.9128780765458941459656f,\ + 0.4435729472897946834564f} + +#define RES10 -0.0105698586359502730292f + + + + +#define CINR2 {0.9625065480358898639679f,0.9798011491075158119202f,\ +0.0785698364488780498505f,0.9150031916797161102295f} +#define CINI2 {0.6172610134817659854889f,0.9964194735512137413025f,\ +0.0468598580919206142426f,0.9245926234871149063110f} +#define CRESR2 0.2796908427268796071274f +#define CRESI2 1.3305203939304277582778f + +#define CINR3 {0.9689865079708397388458f,0.4916289718821644783020f,0.2977053108625113964081f,\ +0.0603054538369178771973f,0.631347181741148233414f,0.0241030259057879447937f,\ +0.1527438252232968807221f,0.9481177683919668197632f,0.2744265575893223285675f} +#define CINI3 {0.4794727200642228126526f,0.485576837789267301559f,0.676400367170572280884f,\ +0.8321249918080866336823f,0.0125875836238265037537f,0.5453779897652566432953f,\ +0.8426716942340135574341f,0.9029165101237595081329f,0.4409482078626751899719f} +#define CRESR3 0.3208274162176448784933f +#define CRESI3 -0.5045627162227295237074f + +#define CINR4 {0.8332359003834426403046f,0.7233976423740386962891f,0.4377150186337530612946f,\ + 0.3080607382580637931824f,\ +0.8749813153408467769623f,0.5355882328003644943237f,0.3085998897440731525421f,\ + 0.3354632416740059852600f,\ +0.2342486302368342876434f,0.2589411698281764984131f,0.8521509231068193912506f,\ + 0.4821739485487341880798f,\ +0.6095217890106141567230f,0.9872822705656290054321f,0.9811426815576851367950f,\ + 0.3303113700821995735169f} +#define CINI4 {0.3589145573787391185761f,0.2780527696013450622559f,0.9583482020534574985504f,\ + 0.0156362904235720634460f,\ +0.2964351712726056575775f,0.4685934986919164657593f,0.4262020816095173358917f,\ + 0.4217656338587403297424f,\ +0.1034853602759540081024f,0.4279759414494037628174f,0.7860729382373392581940f,\ + 0.8568082069978117942810f,\ +0.1993437460623681545258f,0.7131301630288362503052f,0.5208952468819916248322f,\ + 0.9311723159626126289368f} +#define CRESR4 0.5916307061533252475982f +#define CRESI4 -0.104762389048400544889f + +#define CINR5 {0.4143836158327758312225f,0.5980196148157119750977f,0.5549105503596365451813f,\ + 0.8552952585741877555847f,0.3097750707529485225678f,\ +0.9446128141134977340698f,0.2442680452950298786163f,0.8760446915403008460999f,\ + 0.4874215493910014629364f,0.3844018988311290740967f,\ +0.0922345430590212345123f,0.0705418726429343223572f,0.7338807261548936367035f,\ + 0.7792180571705102920532f,0.7827638057060539722443f,\ +0.2161567779257893562317f,0.3420197847299277782440f,0.430093832314014434814f,\ + 0.6261752569116652011871f,0.9554250938817858695984f,\ +0.45415506651625037193f,0.0029223021119832992554f,0.0106920679099857807159f,\ + 0.9746370846405625343323f,0.7704260940663516521454f} +#define CINI5 {0.6396631337702274322510f,0.9535886184312403202057f,0.4148483341559767723084f,\ + 0.4661539695225656032562f,0.2238455135375261306763f,\ +0.3456973326392471790314f,0.2340623633936047554016f,0.6619341480545699596405f,\ + 0.2691179513931274414063f,0.9830248900689184665680f,\ +0.7393351225182414054871f,0.2902135862968862056732f,0.3995949607342481613159f,\ + 0.9792278115637600421906f,0.0075513580814003944397f,\ +0.7021022657863795757294f,0.8907506130635738372803f,0.6526974202133715152741f,\ + 0.4136228552088141441345f,0.8581690913997590541840f,\ +0.2396089676767587661743f,0.4820041772909462451935f,0.9848585547879338264465f,\ + 0.4469721647910773754120f,0.2329813763499259948731f} +#define CRESR5 -0.2050520846829704535441f +#define CRESI5 1.3442626005968567604043f + +#define CINR6 {0.2234513931907713413239f,0.8002565456554293632507f,0.7750734328292310237885f,\ + 0.4825006630271673202515f,0.7844883133657276630402f,0.1534679317846894264221f,\ +0.7722877110354602336884f,0.8952021785080432891846f,0.9467325792647898197174f,\ + 0.6981825744733214378357f,0.9559160820208489894867f,0.0484017301350831985474f,\ +0.5323520642705261707306f,0.2946867095306515693665f,0.6977136689238250255585f,\ + 0.9376203864812850952148f,0.1075560846365988254547f,0.7763424394652247428894f,\ +0.6373417838476598262787f,0.0663061570376157760620f,0.8169459854252636432648f,\ + 0.354739100672304630280f,0.5860544512979686260223f,0.3461025469005107879639f,\ +0.4424751014448702335358f,0.8822665056213736534119f,0.7643693066202104091644f,\ + 0.7764139864593744277954f,0.2807680931873619556427f,0.6908600600436329841614f,\ +0.7174728694371879100800f,0.372018136084079742432f,0.9325496577657759189606f,\ + 0.2256677551195025444031f,0.7521101920865476131439f,0.3074750658124685287476f} +#define CINI6 {0.5979326148517429828644f,0.1923890346661210060120f,0.2387088830582797527313f,\ + 0.7470833100378513336182f,0.9713153676129877567291f,0.4370355373248457908630f,\ +0.6224875054322183132172f,0.3291327971965074539185f,0.3296387386508285999298f,\ + 0.2768637137487530708313f,0.4872983503155410289764f,0.7732046544551849365234f,\ +0.9077521809376776218414f,0.5012293187901377677918f,0.5159545852802693843842f,\ + 0.5792678873986005783081f,0.154639363754540681839f,0.7611137786880135536194f,\ +0.6907917778007686138153f,0.2873229347169399261475f,0.9642531336285173892975f,\ + 0.5660724332556128501892f,0.5782137936912477016449f,0.266342097893357276917f,\ +0.4747098502703011035919f,0.6073546530678868293762f,0.0409730705432593822479f,\ + 0.501256845891475677490f,0.5295930975116789340973f,0.6259458316490054130554f,\ +0.2219352661632001399994f,0.3467419948428869247437f,0.3951167692430317401886f,\ + 0.5442812526598572731018f,0.1430782820098102092743f,0.7165467627346515655518f} +#define CRESR6 0.0374364367907719236550f +#define CRESI6 0.0027318151340892903034f + +#define CINR8 {0.826897530350834131241f,0.0803818320855498313904f,0.7634756616316735744476f,\ + 0.6771226990967988967896f,0.0800866526551544666290f,0.5631617354229092597961f,\ + 0.8400143641047179698944f,0.9142984896898269653320f,\ +0.9566112258471548557282f,0.1676578698679804801941f,0.4345969124697148799896f,\ + 0.0417516361922025680542f,0.4832747434265911579132f,0.2889312515035271644592f,\ + 0.4115779171697795391083f,0.2200270108878612518311f,\ +0.3144670636393129825592f,0.2733902474865317344666f,0.7691849744878709316254f,\ + 0.0548522863537073135376f,0.4532337454147636890411f,0.2262856932356953620911f,\ + 0.1486739399842917919159f,0.2435002401471138000488f,\ +0.384454759303480386734f,0.1141278846189379692078f,0.3649685769341886043549f,\ + 0.9379479344934225082398f,0.2138825734145939350128f,0.8807754451408982276917f,\ + 0.3025345797650516033173f,0.2935827709734439849854f,\ +0.9067896143533289432526f,0.7959460681304335594177f,0.0202379724942147731781f,\ + 0.1722054202109575271606f,0.2199751031585037708283f,0.7548991339281201362610f,\ + 0.4089378821663558483124f,0.4680796265602111816406f,\ +0.420881266240030527115f,0.7480402020737528800964f,0.2455636872909963130951f,\ + 0.0257788877934217453003f,0.3875689213164150714874f,0.2191973784938454627991f,\ + 0.9874265412800014019013f,0.6185800097882747650147f,\ +0.1833024383522570133209f,0.5313195576891303062439f,0.1505152708850800991058f,\ + 0.9561535362154245376587f,0.6994940754957497119904f,0.2583465399220585823059f,\ + 0.6155266496352851390839f,0.1903010532259941101074f,\ +0.4607576900161802768707f,0.5220010234043002128601f,0.7053800462745130062103f,\ + 0.8874893691390752792358f,0.1858218242414295673370f,0.0922524714842438697815f,\ + 0.3779664481990039348602f,0.9369315691292285919190f} +#define CINI8 {0.1980521664954721927643f,0.4702028548344969749451f,0.3778818598948419094086f,\ + 0.3629649449139833450317f,0.2793333870358765125275f,0.6721442686393857002258f,\ + 0.6908950763754546642304f,0.5104757994413375854492f,\ +0.0610603489913046360016f,0.9335384247824549674988f,0.1448998316191136837006f,\ + 0.5721211265772581100464f,0.5459886942990124225617f,0.0516680190339684486389f,\ + 0.5011013220064342021942f,0.9260971657931804656982f,\ +0.8546948046423494815826f,0.5857099732384085655212f,0.8791871047578752040863f,\ + 0.2532048318535089492798f,0.790395137388259172440f,0.6329805525019764900208f,\ + 0.8602323713712394237518f,0.9019620195031166076660f,\ +0.3158749365247786045075f,0.4001023573800921440125f,0.1110895960591733455658f,\ + 0.4705127831548452377319f,0.5362763185985386371613f,0.2878431910648941993713f,\ + 0.8740125591866672039032f,0.0740833915770053863525f,\ +0.2814957336522638797760f,0.7083768015727400779724f,0.1652647457085549831390f,\ + 0.2667352575808763504028f,0.8819408011622726917267f,0.3537154989317059516907f,\ + 0.0264621186070144176483f,0.0861647427082061767578f,\ +0.2313965209759771823883f,0.1340646473690867424011f,0.6724002673290669918060f,\ + 0.1902998369187116622925f,0.7307508592493832111359f,0.5048490324988961219788f,\ + 0.8791159312240779399872f,0.5544437132775783538818f,\ +0.2063297093845903873444f,0.401161103509366512299f,0.4559328979812562465668f,\ + 0.6977151576429605484009f,0.3965912279672920703888f,0.498381090350449085236f,\ + 0.1452422770671546459198f,0.9075358733534812927246f,\ +0.1009295457042753696442f,0.0177189959213137626648f,0.7937671481631696224213f,\ + 0.4309146609157323837280f,0.584337853360921144485f,0.7954284632578492164612f,\ + 0.1390615846030414104462f,0.1012784726917743682861f} +#define CRESR8 -0.2866880544829432109211f +#define CRESI8 -0.5082321435837643397449f + +#define CINR10 {0.3316808626987040042877f,0.8344425177201628684998f,0.0549940518103539943695f,\ + 0.3696003425866365432739f,0.7453266424126923084259f,0.0571811841800808906555f,\ + 0.5999651807360351085663f,0.2085741907358169555664f,0.8798878290690481662750f,\ + 0.4782809792086482048035f,\ +0.7116099162958562374115f,0.8585865031927824020386f,0.8078222130425274372101f,\ + 0.5159962782636284828186f,0.8917340408079326152802f,0.8842348866164684295654f,\ + 0.70964269945397973061f,0.6610225578770041465759f,0.7252350724302232265472f,\ + 0.510143497958779335022f,\ +0.2824866441078484058380f,0.2214915128424763679504f,0.5767575385980308055878f,\ + 0.7048253491520881652832f,0.5607945644296705722809f,0.3628880484029650688171f,\ + 0.3088326244615018367767f,0.9813414867967367172241f,0.7428482254035770893097f,\ + 0.1616391474381089210510f,\ +0.3652521963231265544891f,0.3835070468485355377197f,0.1169181005097925662994f,\ + 0.8911246126517653465271f,0.0634272000752389431000f,0.6263941843062639236450f,\ + 0.6807702076621353626251f,0.2588596837595105171204f,0.4394804346375167369843f,\ + 0.8598818778991699218750f,\ +0.5482823201455175876617f,0.8135995296761393547058f,0.4898237003944814205170f,\ + 0.0240026097744703292847f,0.7369195525534451007843f,0.2411156157031655311585f,\ + 0.1529693226329982280731f,0.2648359201848506927490f,0.4298193217255175113678f,\ + 0.7673939457163214683533f,\ +0.8753260499797761440277f,0.3796988371759653091431f,0.3062356826849281787872f,\ + 0.3880051793530583381653f,0.1047293278388679027557f,0.7603831812739372253418f,\ + 0.0340930395759642124176f,0.1423966242000460624695f,0.5554559468291699886322f,\ + 0.8031897451728582382202f,\ +0.5183992316015064716339f,0.1518561029806733131409f,0.5884730662219226360321f,\ + 0.2545093484222888946533f,0.9992679939605295658112f,0.6398976957425475120544f,\ + 0.5506716123782098293304f,0.4607007671147584915161f,0.5933007937856018543243f,\ + 0.6538193570449948310852f,\ +0.4168340521864593029022f,0.9910155385732650756836f,0.3720780410803854465485f,\ + 0.7061824081465601921082f,0.5780865414999425411224f,0.602319641038775444031f,\ + 0.5715096746571362018585f,0.0549629041925072669983f,0.1205854485742747784f,\ + 0.0143620483577251434326f,\ +0.0257951230742037296295f,0.8411248764023184776306f,0.4381882525049149990082f,\ + 0.4643401596695184707642f,0.4197426405735313892365f,0.8023654492571949958801f,\ + 0.5228588166646659374237f,0.5095121040940284729004f,0.4531980180181562900543f,\ + 0.7817818326875567436218f,\ +0.776557037141174077988f,0.0466059204190969467163f,0.5113326688297092914581f,\ + 0.7502101892605423927307f,0.6883628661744296550751f,0.0167756117880344390869f,\ + 0.9345410899259150028229f,0.5609863763675093650818f,0.2205847105942666530609f,\ + 0.7648540753871202468872f} +#define CINI10 {0.4816976976580917835236f,0.1558785634115338325501f,0.2476022052578628063202f,\ + 0.5216529071331024169922f,0.0805230387486517429352f,0.4409417239949107170105f,\ + 0.8911933614872395992279f,0.9780590813606977462769f,0.4588093762286007404327f,\ + 0.5510440031066536903381f,\ +0.0960960905067622661591f,0.4196785055100917816162f,0.7502556503750383853912f,\ + 0.7218149593099951744080f,0.2895541018806397914887f,0.3907764498144388198853f,\ + 0.6686618146486580371857f,0.4877656819298863410950f,0.4685971769504249095917f,\ + 0.3562648519873619079590f,\ +0.3442325466312468051910f,0.4253307832404971122742f,0.5588058172725141048431f,\ + 0.3304864969104528427124f,0.4157403339631855487824f,0.1595822656527161598206f,\ + 0.3883102680556476116180f,0.9415460713207721710205f,0.4722979352809488773346f,\ + 0.8533652639016509056091f,\ +0.1207739165984094142914f,0.8999380934983491897583f,0.4384902161546051502228f,\ + 0.8976056622341275215149f,0.4911110657267272472382f,0.3402217179536819458008f,\ + 0.9966153600253164768219f,0.0215395865961909294128f,0.6876890822313725948334f,\ + 0.0044924151152372360229f,\ +0.6397854541428387165070f,0.5416147718206048011780f,0.2247649203054606914520f,\ + 0.7364005260169506072998f,0.4496364505030214786530f,0.9678138038143515586853f,\ + 0.6489060199819505214691f,0.2544666919857263565064f,0.1923975017853081226349f,\ + 0.6861492367461323738098f,\ +0.4231455805711448192596f,0.6734441593289375305176f,0.8270696722902357578278f,\ + 0.9360805852338671684265f,0.8326222090981900691986f,0.7424779590219259262085f,\ + 0.0194640238769352436066f,0.8016031915321946144104f,0.2554539437405765056610f,\ + 0.2688109613955020904541f,\ +0.7558490769006311893463f,0.4347589677199721336365f,0.6425966522656381130219f,\ + 0.6957868058234453201294f,0.6499576461501419544220f,0.2303190128877758979797f,\ + 0.5504368054680526256561f,0.3038997054100036621094f,0.0371030517853796482086f,\ + 0.1703881053254008293152f,\ +0.5698686256073415279388f,0.0036411266773939132690f,0.4491547052748501300812f,\ + 0.0576810697093605995178f,0.4956056098453700542450f,0.1888933442533016204834f,\ + 0.5641230703331530094147f,0.8562210192903876304627f,0.0794764286838471889496f,\ + 0.6196198705583810806274f,\ +0.2241039988584816455841f,0.8582094730809330940247f,0.7114551994018256664276f,\ + 0.8026027604937553405762f,0.6153324418701231479645f,0.8958183480426669120789f,\ + 0.8721761344932019710541f,0.8389767911285161972046f,0.2040955354459583759308f,\ + 0.3166538262739777565002f,\ +0.7006825651042163372040f,0.2073105163872241973877f,0.5222550616599619388580f,\ + 0.9416420971974730491638f,0.52116033947095274925f,0.4509841967374086380005f,\ + 0.3961292845197021961212f,0.7240869747474789619446f,0.6724055963568389415741f,\ + 0.2386146038770675659180f} +#define CRESR10 -0.0701164785573487325809f +#define CRESI10 -0.3697118554850691296565f + + +static void sdetermaTest(void){ + float in2[]=IN2; float res2=RES2; + float in3[]=IN3; float res3=RES3; + float in4[]=IN4; float res4=RES4; + float in5[]=IN5; float res5=RES5; + float in6[]=IN6; float res6=RES6; + float in8[]=IN8; float res8=RES8; + float in10[]=IN10; float res10=RES10; + float out2,out3,out4,out5,out6,out8,out10; + + out2=sdeterma(in2,2); + out3=sdeterma(in3,3); + out4=sdeterma(in4,4); + out5=sdeterma(in5,5); + out6=sdeterma(in6,6); + out8=sdeterma(in8,8); + out10=sdeterma(in10,10); + + assert((fabs(out2-res2)/fabs(out2))<1e-6); + assert((fabs(out3-res3)/fabs(out3))<1e-7); + assert((fabs(out4-res4)/fabs(out4))<3e-6); + assert((fabs(out5-res5)/fabs(out5))<1e-6); + assert((fabs(out6-res6)/fabs(out6))<1e-6); + assert((fabs(out8-res8)/fabs(out8))<1e-6); + assert((fabs(out10-res10)/fabs(out10))<3e-6); + +} + +static void cdetermaTest(void){ + float inR2[]=CINR2; float inI2[]=CINI2; float resR2=CRESR2; float resI2=CRESI2; + float inR3[]=CINR3; float inI3[]=CINI3; float resR3=CRESR3; float resI3=CRESI3; + float inR4[]=CINR4; float inI4[]=CINI4; float resR4=CRESR4; float resI4=CRESI4; + float inR5[]=CINR5; float inI5[]=CINI5; float resR5=CRESR5; float resI5=CRESI5; + float inR6[]=CINR6; float inI6[]=CINI6; float resR6=CRESR6; float resI6=CRESI6; + float inR8[]=CINR8; float inI8[]=CINI8; float resR8=CRESR8; float resI8=CRESI8; + float inR10[]=CINR10; float inI10[]=CINI10; float resR10=CRESR10; float resI10=CRESI10; + floatComplex out2,out3,out4,out5,out6,out8,out10; + floatComplex *in2, *in3, *in4, *in5, *in6, *in8, *in10; + + in2=FloatComplexMatrix(inR2,inI2,4); + in3=FloatComplexMatrix(inR3,inI3,9); + in4=FloatComplexMatrix(inR4,inI4,16); + in5=FloatComplexMatrix(inR5,inI5,25); + in6=FloatComplexMatrix(inR6,inI6,36); + in8=FloatComplexMatrix(inR8,inI8,64); + in10=FloatComplexMatrix(inR10,inI10,100); + + out2=cdeterma(in2,2); + out3=cdeterma(in3,3); + out4=cdeterma(in4,4); + out5=cdeterma(in5,5); + out6=cdeterma(in6,6); + out8=cdeterma(in8,8); + out10=cdeterma(in10,10); + + + assert((fabs(creals(out2)-resR2)/fabs(creals(out2)))<1e-6); + assert((fabs(cimags(out2)-resI2)/fabs(cimags(out2)))<1e-6); + + assert((fabs(creals(out3)-resR3)/fabs(creals(out3)))<1e-6); + assert((fabs(cimags(out3)-resI3)/fabs(cimags(out3)))<1e-6); + + assert((fabs(creals(out4)-resR4)/fabs(creals(out4)))<1e-6); + assert((fabs(cimags(out4)-resI4)/fabs(cimags(out4)))<1e-6); + + assert((fabs(creals(out5)-resR5)/fabs(creals(out5)))<3e-6); + assert((fabs(cimags(out5)-resI5)/fabs(cimags(out5)))<1e-6); + + assert((fabs(creals(out6)-resR6)/fabs(creals(out6)))<1e-6); + assert((fabs(cimags(out6)-resI6)/fabs(cimags(out6)))<3e-6); + + assert((fabs(creals(out8)-resR8)/fabs(creals(out8)))<1e-6); + assert((fabs(cimags(out8)-resI8)/fabs(cimags(out8)))<1e-6); + + assert((fabs(creals(out10)-resR10)/fabs(creals(out10)))<3e-6); + assert((fabs(cimags(out10)-resI10)/fabs(cimags(out10)))<1e-6); +} + +static int determTest(void){ + printf("\n >>> Float Determ <<<\n"); + sdetermaTest(); + cdetermaTest(); + return 0; +} + + +int main (void){ + assert(determTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj b/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj new file mode 100644 index 00000000..5a221aba --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7F13C8AE-27AC-43B4-8C1E-263C5A4C9942} + testDoubleDeterm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters b/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters new file mode 100644 index 00000000..71bf090d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_DoubleDeterm/testDoubleDeterm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj b/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj new file mode 100644 index 00000000..8131ad90 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3F1C1C41-424E-4E23-8990-AEB55196376D} + testDoubleDist + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters b/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters new file mode 100644 index 00000000..71bf090d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_DoubleDist/testDoubleDist.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj b/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj new file mode 100644 index 00000000..e80f9c12 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {204A5126-03B1-4E9D-8CC1-CCA9F64BD081} + testFloatDeterm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters b/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters new file mode 100644 index 00000000..df479e86 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/test_FloatDeterm/testFloatDeterm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/determ/zdeterma.c b/2.3-1/src/c/matrixOperations/determ/zdeterma.c new file mode 100644 index 00000000..ea7e98d0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/determ/zdeterma.c @@ -0,0 +1,138 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#ifndef WITHOUT_LAPACK +#include "lapack.h" +#else +#include "division.h" +#endif +#include "determ.h" +#include "multiplication.h" +#include "subtraction.h" +#include "addition.h" + + +doubleComplex zdeterma(doubleComplex * in, int size){ +#ifndef WITHOUT_LAPACK + doubleComplex tmp1,tmp2,out; + int i=0,info=0; + doubleComplex *inCopy; + int* vectPivot; + + switch(size){ + case 2 : out = zdiffs(zmuls(in[0],in[3]),zmuls(in[1],in[2])); + break; + case 3 : /*regle de Sarrus*/ + out=DoubleComplex(0,0); + /*Addition Part*/ + tmp1 = zmuls(in[0],in[4]); + tmp2 = zmuls(tmp1,in[8]); + out = zadds(out,tmp2); + tmp1 = zmuls(in[1],in[5]); + tmp2 = zmuls(tmp1,in[6]); + out = zadds(out,tmp2); + tmp1 = zmuls(in[2],in[3]); + tmp2 = zmuls(tmp1,in[7]); + out = zadds(out,tmp2); + /*Subtraction Part*/ + tmp1 = zmuls(in[0],in[5]); + tmp2 = zmuls(tmp1,in[7]); + out = zdiffs(out,tmp2); + tmp1 = zmuls(in[1],in[3]); + tmp2 = zmuls(tmp1,in[8]); + out = zdiffs(out,tmp2); + tmp1 = zmuls(in[2],in[4]); + tmp2 = zmuls(tmp1,in[6]); + out = zdiffs(out,tmp2); + break; + + default : + /*Allocate inCopy and Copy in in inCopy*/ + inCopy=(doubleComplex*)malloc((unsigned int)(size*size)*sizeof(doubleComplex)); + for (i=0;i +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" +#include "conj.h" +#include "subtraction.h" + +float cdista(floatComplex* in1,floatComplex* in2, int lines, int columns){ + int i=0; + float out = 0; + floatComplex *a, *at, *mul; + floatComplex *eigenvalues; + + + /* FIXME : malloc here*/ + a=(floatComplex*)malloc((unsigned int)(lines*columns)*sizeof(floatComplex)); + at=(floatComplex*)malloc((unsigned int)(lines*columns)*sizeof(floatComplex)); + mul=(floatComplex*)malloc((unsigned int)(lines*lines)*sizeof(floatComplex)); + eigenvalues=(floatComplex*)malloc((unsigned int)(lines)*sizeof(floatComplex)); + + for (i=0;iout) out = creals(eigenvalues[i]); + } + + + free(a); + free(at); + free(mul); + free(eigenvalues); + + return out; +} diff --git a/2.3-1/src/c/matrixOperations/dist/cdists.c b/2.3-1/src/c/matrixOperations/dist/cdists.c new file mode 100644 index 00000000..c949e568 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/cdists.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "dist.h" +#include "pow.h" +#include "sqrt.h" + +float cdists(floatComplex in1, floatComplex in2){ + float out=0; + + out+=spows(creals(in1)-creals(in2),2); + out+=spows(cimags(in1)-cimags(in2),2); + return ssqrts(out); +} + + diff --git a/2.3-1/src/c/matrixOperations/dist/ddista.c b/2.3-1/src/c/matrixOperations/dist/ddista.c new file mode 100644 index 00000000..bf051a60 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/ddista.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" + + +double ddista(double* in1,double* in2, int lines, int columns){ + int i=0; + double out=0; + double *a, *at, *mul; + doubleComplex *eigenvalues,*mulCpx; + + + /* FIXME : malloc here*/ + a=(double*)malloc((unsigned int)(lines*columns)*sizeof(double)); + at=(double*)malloc((unsigned int)(lines*columns)*sizeof(double)); + mul=(double*)malloc((unsigned int)(lines*lines)*sizeof(double)); + eigenvalues=(doubleComplex*)malloc((unsigned int)(lines)*sizeof(doubleComplex)); + mulCpx=(doubleComplex*)malloc((unsigned int)(lines*lines)*sizeof(doubleComplex)); + + for (i=0;iout) out = zreals(eigenvalues[i]); + } + + free(a); + free(at); + free(mul); + free(eigenvalues); + free(mulCpx); + + return out; +} diff --git a/2.3-1/src/c/matrixOperations/dist/ddists.c b/2.3-1/src/c/matrixOperations/dist/ddists.c new file mode 100644 index 00000000..2bbd6feb --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/ddists.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "dist.h" +#include "abs.h" + +double ddists(double in1, double in2){ + return dabss(in2-in1); +} + + + diff --git a/2.3-1/src/c/matrixOperations/dist/sdista.c b/2.3-1/src/c/matrixOperations/dist/sdista.c new file mode 100644 index 00000000..438c3908 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/sdista.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" + + +float sdista(float* in1,float* in2, int lines, int columns){ + int i=0; + float out=0; + float *a, *at, *mul; + floatComplex *eigenvalues,*mulCpx; + + + /* FIXME : malloc here*/ + a=(float*)malloc((unsigned int)(lines*columns)*sizeof(float)); + at=(float*)malloc((unsigned int)(lines*columns)*sizeof(float)); + mul=(float*)malloc((unsigned int)(lines*lines)*sizeof(float)); + eigenvalues=(floatComplex*)malloc((unsigned int)(lines)*sizeof(floatComplex)); + mulCpx=(floatComplex*)malloc((unsigned int)(lines*lines)*sizeof(floatComplex)); + + for (i=0;iout) out = creals(eigenvalues[i]); + } + + free(a); + free(at); + free(mul); + free(eigenvalues); + free(mulCpx); + + return out; +} diff --git a/2.3-1/src/c/matrixOperations/dist/sdists.c b/2.3-1/src/c/matrixOperations/dist/sdists.c new file mode 100644 index 00000000..beb3895a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/sdists.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "dist.h" +#include "abs.h" + +float sdists(float in1, float in2){ + return sabss(in2-in1); +} + + diff --git a/2.3-1/src/c/matrixOperations/dist/testDoubleDist.c b/2.3-1/src/c/matrixOperations/dist/testDoubleDist.c new file mode 100644 index 00000000..0ec69657 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/testDoubleDist.c @@ -0,0 +1,116 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "dist.h" + +static void ddistsTest(void){ + double in1=2,in2=1; + printf("%f\n",ddists(in1,in2)); + +} + +static void ddistaTest(void){ + double in1[4]={3,4,5,6}; + double in2[4]={0}; + double out; + double result=9.271109059321277712229; + + double in3[6]={1,4,2,5,3,6}; + double in4[6]={0}; + double result2=9.5080320006957226297573; + + out=ddista(in1,in2,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=ddista(in3,in4,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <3e-16); +} + +static void zdistsTest(void){ + doubleComplex in1,in2; + double out; + in1=DoubleComplex(3,4); + in2=DoubleComplex(0,0); + + out=zdists(in1,in2); + printf("%f\n",out); + assert(fabs(out-5) / fabs(out) <1e-16); + +} + +static void zdistaTest(void){ + double in1[4]={3,4,5,6}; + double in2[4]={0}; + double out; + double result=9.271109059321277712229; + + double in3[6]={1,4,2,5,3,6}; + double in4[6]={0}; + double result2=9.5080320006957226297573; + + + double in5[15]={1.9379387702792882919312, 6.797837591730058193207, 5.88365742936730384827, 9.331753817386925220490 , 5.509122880175709724426 , + 8.0405469564720988273621 , 1.074489727616310119629 , 7.4039250845089554786682 , 5.6103316973894834518433 , 7.6611549546942114830017 , + 7.8306589089334011077881 , 1.4388314681127667427063 , 1.6471924725919961929321 , 3.1774142337962985038757 , 5.0265956297516822814941}; + double in6[15]={6.9204960623756051064 , 7.0065794046968221664429 , 8.8706119870766997337341 , 6.9797694869339466094971 , 6.7989911558106541633606 , + 3.6159398127347230911255 , 2.6739976881071925163269 , 0.7736870646476745605469 , 1.494100340642035007477 , 3.2018390577286481857300 , + 2.0260545751079916954041 , 4.4988587312400341033936 , 7.7075743721798062324524 , 2.4352242145687341690063 , 2.1261148853227496147156}; + double in7[15]={0}; + double result3=28.509738138317576527925; + doubleComplex *in1Cpx, *in2Cpx, *in3Cpx, *in4Cpx,*in5Cpx,*in6Cpx; + + in1Cpx=DoubleComplexMatrix(in1,in2,4); + in2Cpx=DoubleComplexMatrix(in2,in2,4); + in3Cpx=DoubleComplexMatrix(in3,in4,6); + in4Cpx=DoubleComplexMatrix(in4,in4,6); + in5Cpx=DoubleComplexMatrix(in5,in6,15); + in6Cpx=DoubleComplexMatrix(in7,in7,15); + + + + out=zdista(in1Cpx,in2Cpx,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=zdista(in3Cpx,in4Cpx,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <3e-16); + + out=zdista(in5Cpx,in6Cpx,5,3); + printf("%f\n",out); + assert(fabs(out-result3) / fabs(out) <3e-16); + +} + +static int distTest(void){ + printf("\n>>> Double Dist Tests <<<\n"); + printf(">>> double <<<\n"); + ddistsTest(); + ddistaTest(); + printf(">>> doubleComplex <<<\n"); + zdistsTest(); + zdistaTest(); + return 0; +} + +int main(void){ + assert(distTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/dist/testFloatDist.c b/2.3-1/src/c/matrixOperations/dist/testFloatDist.c new file mode 100644 index 00000000..895767ec --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/testFloatDist.c @@ -0,0 +1,116 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "dist.h" + +static void sdistsTest(void){ + float in1=2,in2=1; + printf("%f\n",sdists(in1,in2)); + +} + +static void sdistaTest(void){ + float in1[4]={3,4,5,6}; + float in2[4]={0}; + float out; + float result=9.271109059321277712229f; + + float in3[6]={1,4,2,5,3,6}; + float in4[6]={0}; + float result2=9.5080320006957226297573f; + + out=sdista(in1,in2,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=sdista(in3,in4,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <1e-15); +} + +static void cdistsTest(void){ + floatComplex in1,in2; + float out; + in1=FloatComplex(3,4); + in2=FloatComplex(0,0); + + out=cdists(in1,in2); + printf("%f\n",out); + assert(fabs(out-5) / fabs(out) <1e-16); + +} + +static void cdistaTest(void){ + float in1[4]={3,4,5,6}; + float in2[4]={0}; + float out; + float result=9.271109059321277712229f; + + float in3[6]={1,4,2,5,3,6}; + float in4[6]={0}; + float result2=9.5080320006957226297573f; + + + float in5[15]={1.9379387702792882919312f, 6.797837591730058193207f, 5.88365742936730384827f, 9.331753817386925220490f , 5.509122880175709724426f , + 8.0405469564720988273621f , 1.074489727616310119629f , 7.4039250845089554786682f , 5.6103316973894834518433f , 7.6611549546942114830017f , + 7.8306589089334011077881f , 1.4388314681127667427063f , 1.6471924725919961929321f , 3.1774142337962985038757f , 5.0265956297516822814941f}; + float in6[15]={6.9204960623756051064f , 7.0065794046968221664429f , 8.8706119870766997337341f , 6.9797694869339466094971f , 6.7989911558106541633606f , + 3.6159398127347230911255f , 2.6739976881071925163269f , 0.7736870646476745605469f , 1.494100340642035007477f , 3.2018390577286481857300f , + 2.0260545751079916954041f , 4.4988587312400341033936f , 7.7075743721798062324524f , 2.4352242145687341690063f , 2.1261148853227496147156f}; + float in7[15]={0}; + float result3=28.509738138317576527925f; + floatComplex *in1Cpx, *in2Cpx, *in3Cpx, *in4Cpx,*in5Cpx,*in6Cpx; + + in1Cpx=FloatComplexMatrix(in1,in2,4); + in2Cpx=FloatComplexMatrix(in2,in2,4); + in3Cpx=FloatComplexMatrix(in3,in4,6); + in4Cpx=FloatComplexMatrix(in4,in4,6); + in5Cpx=FloatComplexMatrix(in5,in6,15); + in6Cpx=FloatComplexMatrix(in7,in7,15); + + + + out=cdista(in1Cpx,in2Cpx,2,2); + printf("%f\n",out); + assert(fabs(out-result) / fabs(out) <1e-16); + + + out=cdista(in3Cpx,in4Cpx,2,3); + printf("%f\n",out); + assert(fabs(out-result2) / fabs(out) <1e-15); + + out=cdista(in5Cpx,in6Cpx,5,3); + printf("%f\n",out); + assert(fabs(out-result3) / fabs(out) <1e-15); + +} + +static int distTest(void){ + printf("\n>>> Float Dist Tests <<<\n"); + printf(">>> float <<<\n"); + sdistsTest(); + sdistaTest(); + printf(">>> floatComplex <<<\n"); + cdistsTest(); + cdistaTest(); + return 0; +} + +int main(void){ + assert(distTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj b/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj new file mode 100644 index 00000000..b3095196 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3902CF74-70D4-4FA4-AA53-71643B94BAB9} + testFloatDist + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters b/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters new file mode 100644 index 00000000..4bfcafe5 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/test_FloatDist/testFloatDist.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/dist/zdista.c b/2.3-1/src/c/matrixOperations/dist/zdista.c new file mode 100644 index 00000000..72afa184 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/zdista.c @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "dist.h" +#include "matrixTranspose.h" +#include "matrixMultiplication.h" +#include "spec.h" +#include "sqrt.h" +#include "conj.h" +#include "subtraction.h" + +double zdista(doubleComplex* in1,doubleComplex* in2, int lines, int columns){ + int i=0; + double out = 0; + doubleComplex *a, *at, *mul; + doubleComplex *eigenvalues; + + + /* FIXME : malloc here*/ + a=(doubleComplex*)malloc((unsigned int)(lines*columns)*sizeof(doubleComplex)); + at=(doubleComplex*)malloc((unsigned int)(lines*columns)*sizeof(doubleComplex)); + mul=(doubleComplex*)malloc((unsigned int)(lines*lines)*sizeof(doubleComplex)); + eigenvalues=(doubleComplex*)malloc((unsigned int)(lines)*sizeof(doubleComplex)); + + for (i=0;iout) out = zreals(eigenvalues[i]); + } + + + free(a); + free(at); + free(mul); + free(eigenvalues); + + return out; +} diff --git a/2.3-1/src/c/matrixOperations/dist/zdists.c b/2.3-1/src/c/matrixOperations/dist/zdists.c new file mode 100644 index 00000000..5d257bd2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/dist/zdists.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "dist.h" +#include "pow.h" +#include "sqrt.h" + +double zdists(doubleComplex in1, doubleComplex in2){ + double out=0; + + out+=dpows(zreals(in1)-zreals(in2),2); + out+=dpows(zimags(in1)-zimags(in2),2); + return dsqrts(out); +} + + diff --git a/2.3-1/src/c/matrixOperations/division/Makefile.am b/2.3-1/src/c/matrixOperations/division/Makefile.am new file mode 100644 index 00000000..919ce997 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/Makefile.am @@ -0,0 +1,73 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixDivision.la + +HEAD = ../includes/matrixDivision.h + +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_PROGRAMS = testMatrixRDivision \ + testMatrixLDivision + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) + +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixRDivision \ + testMatrixLDivision diff --git a/2.3-1/src/c/matrixOperations/division/Makefile.in b/2.3-1/src/c/matrixOperations/division/Makefile.in new file mode 100644 index 00000000..02a150dc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/Makefile.in @@ -0,0 +1,880 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixRDivision$(EXEEXT) \ + testMatrixLDivision$(EXEEXT) +TESTS = testMatrixRDivision$(EXEEXT) testMatrixLDivision$(EXEEXT) +subdir = src/c/matrixOperations/division +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixDivision_la_LIBADD = +am__objects_1 = +am_libMatrixDivision_la_OBJECTS = $(am__objects_1) \ + libMatrixDivision_la-srdivma.lo \ + libMatrixDivision_la-sldivma.lo \ + libMatrixDivision_la-drdivma.lo \ + libMatrixDivision_la-dldivma.lo \ + libMatrixDivision_la-zrdivma.lo \ + libMatrixDivision_la-zldivma.lo \ + libMatrixDivision_la-crdivma.lo \ + libMatrixDivision_la-cldivma.lo \ + libMatrixDivision_la-crdivcsv.lo \ + libMatrixDivision_la-crdivscv.lo \ + libMatrixDivision_la-crdivv.lo libMatrixDivision_la-drdivv.lo \ + libMatrixDivision_la-srdivv.lo \ + libMatrixDivision_la-zrdivdzv.lo \ + libMatrixDivision_la-zrdivv.lo \ + libMatrixDivision_la-zrdivzdv.lo +libMatrixDivision_la_OBJECTS = $(am_libMatrixDivision_la_OBJECTS) +libMatrixDivision_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixDivision_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +testMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_OBJECTS = \ + testMatrixLDivision-testMatrixLDivision.$(OBJEXT) +testMatrixLDivision_DEPENDENCIES = $(check_LDADD) +testMatrixLDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixLDivision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixRDivision_OBJECTS = \ + testMatrixRDivision-testMatrixRDivision.$(OBJEXT) +testMatrixRDivision_OBJECTS = $(am_testMatrixRDivision_OBJECTS) +testMatrixRDivision_DEPENDENCIES = $(check_LDADD) +testMatrixRDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixRDivision_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_SOURCES) +DIST_SOURCES = $(libMatrixDivision_la_SOURCES) testMatrixLDivision.c \ + $(testMatrixRDivision_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixDivision.la +HEAD = ../includes/matrixDivision.h +libMatrixDivision_la_SOURCES = $(HEAD) \ + srdivma.c \ + sldivma.c \ + drdivma.c \ + dldivma.c \ + zrdivma.c \ + zldivma.c \ + crdivma.c \ + cldivma.c \ + crdivcsv.c \ + crdivscv.c \ + crdivv.c \ + drdivv.c \ + srdivv.c \ + zrdivdzv.c \ + zrdivv.c \ + zrdivzdv.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + libMatrixDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +ztestMatrixLDivision_SOURCES = testMatrixLDivision.c +testMatrixLDivision_LDADD = $(check_LDADD) +testMatrixLDivision_CFLAGS = $(check_INCLUDES) +testMatrixRDivision_SOURCES = testMatrixRDivision.c +testMatrixRDivision_LDADD = $(check_LDADD) +testMatrixRDivision_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/division/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/division/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixDivision.la: $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_la_DEPENDENCIES) + $(libMatrixDivision_la_LINK) -rpath $(pkglibdir) $(libMatrixDivision_la_OBJECTS) $(libMatrixDivision_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixLDivision$(EXEEXT): $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_DEPENDENCIES) + @rm -f testMatrixLDivision$(EXEEXT) + $(testMatrixLDivision_LINK) $(testMatrixLDivision_OBJECTS) $(testMatrixLDivision_LDADD) $(LIBS) +testMatrixRDivision$(EXEEXT): $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_DEPENDENCIES) + @rm -f testMatrixRDivision$(EXEEXT) + $(testMatrixRDivision_LINK) $(testMatrixRDivision_OBJECTS) $(testMatrixRDivision_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-cldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivscv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-crdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-dldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-drdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-sldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-srdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zldivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixDivision_la-srdivma.lo: srdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivma.Tpo $(DEPDIR)/libMatrixDivision_la-srdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivma.c' object='libMatrixDivision_la-srdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivma.lo `test -f 'srdivma.c' || echo '$(srcdir)/'`srdivma.c + +libMatrixDivision_la-sldivma.lo: sldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-sldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-sldivma.Tpo $(DEPDIR)/libMatrixDivision_la-sldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sldivma.c' object='libMatrixDivision_la-sldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-sldivma.lo `test -f 'sldivma.c' || echo '$(srcdir)/'`sldivma.c + +libMatrixDivision_la-drdivma.lo: drdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivma.Tpo $(DEPDIR)/libMatrixDivision_la-drdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivma.c' object='libMatrixDivision_la-drdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivma.lo `test -f 'drdivma.c' || echo '$(srcdir)/'`drdivma.c + +libMatrixDivision_la-dldivma.lo: dldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-dldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-dldivma.Tpo $(DEPDIR)/libMatrixDivision_la-dldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dldivma.c' object='libMatrixDivision_la-dldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-dldivma.lo `test -f 'dldivma.c' || echo '$(srcdir)/'`dldivma.c + +libMatrixDivision_la-zrdivma.lo: zrdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivma.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivma.c' object='libMatrixDivision_la-zrdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivma.lo `test -f 'zrdivma.c' || echo '$(srcdir)/'`zrdivma.c + +libMatrixDivision_la-zldivma.lo: zldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zldivma.Tpo $(DEPDIR)/libMatrixDivision_la-zldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zldivma.c' object='libMatrixDivision_la-zldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zldivma.lo `test -f 'zldivma.c' || echo '$(srcdir)/'`zldivma.c + +libMatrixDivision_la-crdivma.lo: crdivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivma.Tpo $(DEPDIR)/libMatrixDivision_la-crdivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivma.c' object='libMatrixDivision_la-crdivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivma.lo `test -f 'crdivma.c' || echo '$(srcdir)/'`crdivma.c + +libMatrixDivision_la-cldivma.lo: cldivma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-cldivma.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-cldivma.Tpo $(DEPDIR)/libMatrixDivision_la-cldivma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cldivma.c' object='libMatrixDivision_la-cldivma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-cldivma.lo `test -f 'cldivma.c' || echo '$(srcdir)/'`cldivma.c + +libMatrixDivision_la-crdivcsv.lo: crdivcsv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivcsv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivcsv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivcsv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivcsv.c' object='libMatrixDivision_la-crdivcsv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivcsv.lo `test -f 'crdivcsv.c' || echo '$(srcdir)/'`crdivcsv.c + +libMatrixDivision_la-crdivscv.lo: crdivscv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivscv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivscv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivscv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivscv.c' object='libMatrixDivision_la-crdivscv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivscv.lo `test -f 'crdivscv.c' || echo '$(srcdir)/'`crdivscv.c + +libMatrixDivision_la-crdivv.lo: crdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-crdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-crdivv.Tpo $(DEPDIR)/libMatrixDivision_la-crdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivv.c' object='libMatrixDivision_la-crdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-crdivv.lo `test -f 'crdivv.c' || echo '$(srcdir)/'`crdivv.c + +libMatrixDivision_la-drdivv.lo: drdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-drdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-drdivv.Tpo $(DEPDIR)/libMatrixDivision_la-drdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivv.c' object='libMatrixDivision_la-drdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-drdivv.lo `test -f 'drdivv.c' || echo '$(srcdir)/'`drdivv.c + +libMatrixDivision_la-srdivv.lo: srdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-srdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-srdivv.Tpo $(DEPDIR)/libMatrixDivision_la-srdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivv.c' object='libMatrixDivision_la-srdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-srdivv.lo `test -f 'srdivv.c' || echo '$(srcdir)/'`srdivv.c + +libMatrixDivision_la-zrdivdzv.lo: zrdivdzv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivdzv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivdzv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivdzv.c' object='libMatrixDivision_la-zrdivdzv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivdzv.lo `test -f 'zrdivdzv.c' || echo '$(srcdir)/'`zrdivdzv.c + +libMatrixDivision_la-zrdivv.lo: zrdivv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivv.c' object='libMatrixDivision_la-zrdivv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivv.lo `test -f 'zrdivv.c' || echo '$(srcdir)/'`zrdivv.c + +libMatrixDivision_la-zrdivzdv.lo: zrdivzdv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -MT libMatrixDivision_la-zrdivzdv.lo -MD -MP -MF $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Tpo $(DEPDIR)/libMatrixDivision_la-zrdivzdv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivzdv.c' object='libMatrixDivision_la-zrdivzdv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixDivision_la_CFLAGS) $(CFLAGS) -c -o libMatrixDivision_la-zrdivzdv.lo `test -f 'zrdivzdv.c' || echo '$(srcdir)/'`zrdivzdv.c + +testMatrixLDivision-testMatrixLDivision.o: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.o -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.o `test -f 'testMatrixLDivision.c' || echo '$(srcdir)/'`testMatrixLDivision.c + +testMatrixLDivision-testMatrixLDivision.obj: testMatrixLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -MT testMatrixLDivision-testMatrixLDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Tpo $(DEPDIR)/testMatrixLDivision-testMatrixLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixLDivision.c' object='testMatrixLDivision-testMatrixLDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixLDivision_CFLAGS) $(CFLAGS) -c -o testMatrixLDivision-testMatrixLDivision.obj `if test -f 'testMatrixLDivision.c'; then $(CYGPATH_W) 'testMatrixLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixLDivision.c'; fi` + +testMatrixRDivision-testMatrixRDivision.o: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.o -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.o `test -f 'testMatrixRDivision.c' || echo '$(srcdir)/'`testMatrixRDivision.c + +testMatrixRDivision-testMatrixRDivision.obj: testMatrixRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -MT testMatrixRDivision-testMatrixRDivision.obj -MD -MP -MF $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Tpo $(DEPDIR)/testMatrixRDivision-testMatrixRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixRDivision.c' object='testMatrixRDivision-testMatrixRDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixRDivision_CFLAGS) $(CFLAGS) -c -o testMatrixRDivision-testMatrixRDivision.obj `if test -f 'testMatrixRDivision.c'; then $(CYGPATH_W) 'testMatrixRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixRDivision.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/division/cldivma.c b/2.3-1/src/c/matrixOperations/division/cldivma.c new file mode 100644 index 00000000..d21510cc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/cldivma.c @@ -0,0 +1,65 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +/******FIXME********/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" + +void cldivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/division/crdivcsv.c b/2.3-1/src/c/matrixOperations/division/crdivcsv.c new file mode 100644 index 00000000..77b7750a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/crdivcsv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivcsv (floatComplex* in1,float* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(in1 , FloatComplexMatrix(in2,ZEROS,size),size ); + } diff --git a/2.3-1/src/c/matrixOperations/division/crdivma.c b/2.3-1/src/c/matrixOperations/division/crdivma.c new file mode 100644 index 00000000..ca6f3565 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/crdivma.c @@ -0,0 +1,62 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixDivision.h" +#include "lapack.h" + +void crdivma ( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin1 = NULL; + doubleComplex *dblin2 = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = DoubleComplex ( (double) creals( in1[i]) , (double) cimags ( in1[i])) ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = DoubleComplex ( (double) creals( in2[i]) , (double) cimags ( in2[i])) ; + } + + zrdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/division/crdivscv.c b/2.3-1/src/c/matrixOperations/division/crdivscv.c new file mode 100644 index 00000000..0f4de323 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/crdivscv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +floatComplex crdivscv (float* in1, floatComplex* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return crdivv(FloatComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/2.3-1/src/c/matrixOperations/division/crdivv.c b/2.3-1/src/c/matrixOperations/division/crdivv.c new file mode 100644 index 00000000..db7a81cb --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/crdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size){ + + floatComplex out[1] ={ FloatComplex (0.0f , 0.0f)}; + crdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/2.3-1/src/c/matrixOperations/division/dldivma.c b/2.3-1/src/c/matrixOperations/division/dldivma.c new file mode 100644 index 00000000..2c81d841 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/dldivma.c @@ -0,0 +1,111 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void dldivma (double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ){ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pXb = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns1, max(min(lines1, columns1) + 3 * lines1 + 1, 2 * min(lines1, columns1) + columns2)); + + + lines2 = 0 ; + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int) lines1 * (unsigned int) columns1); + pXb = (double*)malloc(sizeof(double) * (unsigned int) max(lines1,columns1) * (unsigned int) columns2); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) columns1); + pIwork = (int*)malloc(sizeof(int) *(unsigned int) columns1); + + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) *(unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + + dblAnorm = dlange_(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + if(lines1 == columns1) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + dgetrf_(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(dgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(dgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, in2, &columns1, &iInfo); + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, out, &columns1); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(dlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int) columns1); + C2F(dgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(dlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + } + } + + free(pAf); + free(pXb); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); +} diff --git a/2.3-1/src/c/matrixOperations/division/drdivma.c b/2.3-1/src/c/matrixOperations/division/drdivma.c new file mode 100644 index 00000000..aad029a9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/drdivma.c @@ -0,0 +1,129 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void drdivma ( double * in1, int lines1, int columns1, + double * in2, int lines2, int columns2, + double * out){ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + double *pAf = NULL; + double *pAt = NULL; + double *pBt = NULL; + double *pDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + int *pIwork = NULL; + + iWork = max(4 * columns2, max(min(lines2, columns2) + 3 * lines2 + 1, 2 * min(lines2, columns2) + lines1)); + + + /* Array allocations*/ + pAf = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + pAt = (double*)malloc(sizeof(double) * (unsigned int)columns2 *(unsigned int) lines2); + pBt = (double*)malloc(sizeof(double) * (unsigned int)max(lines2,columns2) * (unsigned int)lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns2); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)lines2); + pIwork = (int*)malloc(sizeof(int) * (unsigned int)columns2); + + + cNorm = '1'; + pDwork = (double*)malloc(sizeof(double) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = dlange_(&cNorm, &lines2, &columns1, in2, &lines2, pDwork); + + /*tranpose A and B*/ + + dtransposea(in2, lines2, columns2, pAt); + dtransposea(in1, lines1, columns2, pBt); + + if(lines2 == columns2) + { + cNorm = 'F'; + dlacpy_(&cNorm, &columns2, &columns2, pAt, &columns2, pAf, &columns2); + dgetrf_(&columns2, &columns2, pAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + dgecon_(&cNorm, &columns2, pAf, &columns2, &dblAnorm, &dblRcond, pDwork, pIwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + dgetrs_(&cNorm, &columns2, &lines1, pAf, &columns2, pIpiv, pBt, &columns2, &iInfo); + dtransposea(pBt, columns2, lines1, out); + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + memset(pJpvt, 0x00, (unsigned int)sizeof(int) * (unsigned int)lines2); + dgelsy_(&columns2, &lines2, &lines1, pAt, &columns2, pBt, &iMax, + pJpvt, &dblRcond, &pRank[0], pDwork, &iWork, &iInfo); + + if(iInfo == 0) + { + + + /* TransposeRealMatrix(pBt, lines1, lines2, out, Max(lines1,columns1), lines2);*/ + + /*Mega caca de la mort qui tue des ours a mains nues + mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = pBt[ji]; + } + } + } + } + } + + free(pAf); + free(pAt); + free(pBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pIwork); + free(pDwork); + +} + diff --git a/2.3-1/src/c/matrixOperations/division/drdivv.c b/2.3-1/src/c/matrixOperations/division/drdivv.c new file mode 100644 index 00000000..c6c2bf60 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/drdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +double drdivv(double *in1, double *in2, int size){ + + double out[1] = { 0.0} ; + drdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/2.3-1/src/c/matrixOperations/division/sldivma.c b/2.3-1/src/c/matrixOperations/division/sldivma.c new file mode 100644 index 00000000..766cfffd --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/sldivma.c @@ -0,0 +1,61 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixDivision.h" +#include "lapack.h" +void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + dldivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/division/srdivma.c b/2.3-1/src/c/matrixOperations/division/srdivma.c new file mode 100644 index 00000000..bc1f0358 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/srdivma.c @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +/****FIXME****/ +/**** WARNING NOT WORK AT ALL FOR THE MOMENT ***/ +/**** Because of problem of conversion float-> double ****/ +#include "matrixDivision.h" +#include "lapack.h" +void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ){ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin1 = NULL; + double *dblin2 = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin1 = (double*)malloc(sizeof(double) * (unsigned int)columns1 * (unsigned int)lines1); + dblin2 = (double*)malloc(sizeof(double) * (unsigned int)columns2 * (unsigned int)lines2); + dblout = (double*)malloc(sizeof(double) * (unsigned int)lines1 * (unsigned int)lines2); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < lines1 * columns1 ; i ++ ) + { + dblin1[i] = (double) in1[i] ; + } + + for ( i = 0 ; i < lines2 * columns2 ; i ++ ) + { + dblin2[i] = (double) in2[i] ; + } + + drdivma( dblin1 , lines1 , columns1 , dblin2 , lines2 , columns2 , dblout ); + + + for ( i = 0 ; i < min(lines2,columns2) * lines1 ; i++ ) + { + out[i] = (float) dblout[i] ; + + } + + free ( dblin1); + free ( dblin2); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/division/srdivv.c b/2.3-1/src/c/matrixOperations/division/srdivv.c new file mode 100644 index 00000000..023e06fa --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/srdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixDivision.h" + +float srdivv(float *in1, float *in2, int size){ + + float out[1] = {0.0f} ; + srdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + + diff --git a/2.3-1/src/c/matrixOperations/division/testMatrixLDivision.c b/2.3-1/src/c/matrixOperations/division/testMatrixLDivision.c new file mode 100644 index 00000000..b2f83193 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/testMatrixLDivision.c @@ -0,0 +1,456 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include "matrixDivision.h" + + +#define LINES 2 +#define COLUMNS1 2 +#define COLUMNS2 2 + +#define ZLINES 2 +#define ZCOLUMNS1 2 +#define ZCOLUMNS2 1 + + +static void sldivmaTest ( void ){ + int i = 0; + + float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { -1.25f , 0.75f , -1.166666666666666f ,0.83333333333333333f }; + + + float out [(COLUMNS2)*(LINES)] ; + + sldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-06 ) ; + } + + + +} + + +static void dldivmaTest ( void ) +{ + int i = 0 ; +/* here the matrixes are linearized in the wrong way so need to transpose them */ +/* double in1[] = +{0.84155184263363481,0.26385784195736051,0.52570608118548989,0.54653349192813039, + 0.62128817522898316,0.98085420625284314,0.74896081397309899,0.01432593585923314, + 0.23678414756432176,0.70614896761253476,0.27255953708663583,0.06706167431548238, + 0.43117330456152558,0.7741842647083104,0.57694048294797540,0.26086253346875310, + 0.14094856614246964, +0.40620247554033995,0.52535630855709314,0.99312098976224661,0.98854076582938433, + 0.34549844544380903,0.81870661024004221,0.94149570073932409,0.81914897728711367, + 0.70153435599058867,0.67878311965614557,0.34376550372689962,0.76511315722018480, + 0.61453847866505384,0.79220082703977823,0.39386960770934820,0.36363423336297274, + 0.67591095995157957, +0.40948254754766822,0.53762298030778766,0.64885628735646605,0.73956565884873271, + 0.70648676296696067,0.42568723810836673,0.21240556007251143,0.13049928424879909, + 0.12025266280397773,0.41329363686963916,0.20337020372971892,0.04173615900799632, + 0.92589621385559440,0.55046048713847995,0.68885837262496352,0.17466178117319942, + 0.45126775791868567, +0.87841258011758327,0.11999255046248436,0.99231909401714802,0.00371731072664261, + 0.52114724926650524,0.24615605548024178,0.57950199581682682,0.96820035576820374, + 0.82874121330678463,0.14022908732295036,0.30119446106255054,0.34382718056440353, + 0.09938172809779644,0.40850437059998512,0.97023218311369419,0.92341394722461700, + 0.75430292449891567, +0.11383596854284406,0.2256303490139544,0.05004197778180242,0.59005728596821427, + 0.28704008506610990,0.92295324662700295,0.26281475694850087,0.6561381467618048, + 0.31610729591920972,0.49523561308160424,0.27625959040597081,0.1970167332328856, + 0.42805786477401853,0.72174380579963326,0.85157642932608724,0.76051409030333161, + 0.13702143030241132, +0.19983377400785685,0.62740930821746588,0.74855065811425447,0.3096467358991504, + 0.65027950797230005,0.10007458087056875,0.43609866220504045,0.24455389659851789, + 0.53051907662302256,0.41948772873729467,0.29445307422429323,0.21228986512869596, + 0.94318309519439936,0.47685358580201864,0.33933044690638781,0.56402041297405958, + 0.66082405392080545, +0.56186607433483005,0.76084325974807143,0.41040589986369014,0.25522057106718421, + 0.08813347620889544,0.46782181179150939,0.91105451015755534,0.52831235667690635, + 0.57151748193427920,0.86262222891673446,0.57180739520117640,0.31403985014185309, + 0.03273952705785632,0.63930579042062163,0.87725317804142833,0.37970651825889945, + 0.38900542212650180, +0.58961773291230202,0.04855662025511265,0.60845263302326202,0.62518793903291225, + 0.44987633451819420,0.39504976756870747,0.80826673656702042,0.84689256362617016, + 0.04780154302716255,0.28575096465647221,0.21417701244354248,0.78216253779828548, + 0.92132670804858208,0.99638652987778187,0.11314024776220322,0.87762261740863323, + 0.70018205419182777, +0.68539796629920602,0.67239497276023030,0.85442108893766999,0.11574173765257001, + 0.72272530803456903,0.03661171020939946,0.81026530498638749,0.78766220854595304, + 0.82486197212710977,0.25121363671496511,0.68954616272822022,0.05409323470667005, + 0.94490244099870324,0.15747882844880223,0.5264128320850432,0.82174257980659604, + 0.91680057207122445, +0.89062247332185507,0.20171726960688829,0.06426467280834913,0.61170040909200907, + 0.89767962601035833,0.51753685344010592,0.25904283951967955,0.12620826158672571, + 0.5798843121156096,0.33891015965491533,0.58555728476494551,0.91902069095522165, + 0.900706990621984,0.53506936598569155,0.52973940502852201,0.67870581243187189, + 0.21228999551385641, +0.50422128057107329,0.39115739194676280,0.82790829380974174,0.67839562846347690, + 0.24278218811377883,0.83254515705630183,0.41390872886404395,0.78838609857484698, + 0.27918082987889647,0.39219759730622172,0.42041230341419578,0.46035157097503543, + 0.80943161016330123,0.21290646074339747,0.92917560925707221,0.08220098121091723, + 0.26978330826386809, +0.34936154074966908,0.83003165572881699,0.92623437754809856,0.33200952783226967, + 0.43377211131155491,0.61048321425914764,0.35999277792870998,0.34530424699187279, + 0.95451109297573566,0.46815521270036697,0.42775720171630383,0.29926850274205208, + 0.02519542910158634,0.55914506316184998,0.97654302977025509,0.25527314469218254, + 0.31998893804848194, +0.38737787725403905,0.58787201577797532,0.56672112690284848,0.02587099233642220, + 0.96770532103255391,0.18711117887869477,0.69127879338338971,0.26598573336377740, + 0.90711546363309026,0.33616027468815446,0.31845858739688993,0.00291663268581033, + 0.00196450622752309,0.43049659812822938,0.62254639761522412,0.74444567272439599, + 0.02321802498772740, +0.92228986788541079,0.48291792999953032,0.57116389367729425,0.51744682248681784, + 0.50685344357043505,0.01895748358219862,0.76568587962538004,0.97098186518996954, + 0.33601493109017611,0.53368766140192747,0.57618944440037012,0.89934705849736929, + 0.50752213317900896,0.02280548494309187,0.98225832823663950,0.22695036139339209, + 0.72654472757130861, +0.94881842611357570,0.22328650346025825,0.81601104838773608,0.39168732380494475, + 0.52329764096066356,0.84335647663101554,0.35726496530696750,0.88752476638182998, + 0.11756130633875728,0.20390639593824744,0.42549022240564227,0.83879271661862731, + 0.40760429529473186,0.57614597817882895,0.75429888023063540,0.68369307881221175, + 0.15340585587546229, +0.34353372454643250,0.84008856676518917,0.05689279362559319,0.24135384149849415, + 0.5596947595477104,0.07485948316752911,0.76933998242020607,0.20667528547346592, + 0.92537237703800201,0.15899897180497646,0.97619816288352013,0.43437494523823261, + 0.84080461412668228,0.71491303853690624,0.54547880962491035,0.93650726415216923, + 0.23552638292312622, +0.37601187312975526,0.12059959070757031,0.55959366867318749,0.50644348980858922, + 0.56173070007935166,0.85328151332214475,0.54776339093223214,0.85251609655097127, + 0.72636712575331330,0.01818151073530316,0.25189600000157952,0.77678761305287480, + 0.5017265700735152,0.93216359661892056,0.72860160330310464,0.50530174048617482, + 0.08797382796183228, +0.73409405630081892,0.28553641680628061,0.12493403162807226,0.42361020017415285, + 0.46817600261420012,0.01245901081711054,0.09622887428849936,0.67446978110820055, + 0.90094979386776686,0.40983706060796976,0.43911290075629950,0.13953176606446505, + 0.91287807654589415,0.12326993141323328,0.02525969501584768,0.25248145777732134, + 0.71059537213295698, +0.26157614728435874,0.86075146449729800,0.72792222863063216,0.28937275288626552, + 0.77945467224344611,0.18675393564626575,0.95611717319115996,0.91528743831440806, + 0.39489932497963309,0.01058345986530185,0.07593036955222487,0.11506372271105647, + 0.44357294728979468,0.28655522270128131,0.40251684701070189,0.68188397912308574, + 0.68887275597080588, +0.49934938363730907,0.84941016510128975,0.26777664758265018,0.08879321813583374, + 0.79010718129575253,0.49205840751528740,0.22074085660278797,0.02848597615957260, + 0.56551797501742840,0.19653097167611122,0.25593801774084568,0.53554199635982513, + 0.59837839566171169,0.01247995719313622,0.09831319935619831,0.28363681584596634, + 0.65953194908797741}; + + + double in2[] = +{0.18151161121204495,0.77340125897899270,0.25145971449092031,0.37096222722902894, + 0.46179189579561353,0.47909884760156274,0.66919379355385900,0.06942595774307847, + 0.56079538213089108,0.69204960623756051,0.99401472182944417,0.00291080260649323, +0.3904965976253152,0.4244190966710448,0.38433500844985247,0.30322382133454084, + 0.62512917164713144,0.28169692959636450,0.20426016021519899,0.11522095929831266, + 0.94247916433960199,0.70065794046968222,0.18287624139338732,0.30681814532727003, +0.15869047446176410,0.72621259605512023,0.43964602379128337,0.95195201179012656, + 0.70597065938636661,0.23800977831706405,0.8310431349091232,0.48626806726679206, + 0.68177247745916247,0.88706119870766997,0.30219173757359385,0.79026939114555717, +0.62407150492072105,0.70999773032963276,0.65407369285821915,0.71278580836951733, + 0.70181696489453316,0.32942054606974125,0.01221632957458496,0.76715826056897640, + 0.27342410013079643,0.69797694869339466,0.37854864448308945,0.95779503695666790, +0.63760355720296502,0.47457459988072515,0.58781063789501786,0.11923700617626309, + 0.40879997471347451,0.23067280324175954,0.48844617092981935,0.08805298106744885, + 0.20717754075303674,0.67989911558106542,0.71531985932961106,0.66892711864784360, +0.42704886104911566,0.9438692079856992,0.60208318661898375,0.50091631803661585, + 0.06362213846296072,0.21362966019660234,0.95498770754784346,0.70085612777620554, + 0.19379387702792883,0.36159398127347231,0.95241537224501371,0.29296159837394953, +0.10716815060004592,0.14596485672518611,0.04535020282492042,0.32900535268709064, + 0.06573933875188231,0.40549980429932475,0.05874312063679099,0.18791387928649783, + 0.67978375917300582,0.26739976881071925,0.47039186349138618,0.82238993747159839, +0.23822965659201145,0.07141010463237762,0.20294443331658840,0.48089468106627464, + 0.53310041315853596,0.30953712016344070,0.82584649138152599,0.20178856328129768, + 0.58836574293673038,0.07736870646476746,0.18709417246282101,0.01798455044627190, +0.94629473658278584,0.67337385797873139,0.78442738251760602,0.33036959776654840, + 0.03315818728879094,0.67629716033115983,0.29807415651157498,0.40628212550655007, + 0.93317538173869252,0.14941003406420350,0.25571879046037793,0.87107013771310449, +0.45766852516680956,0.65369247179478407,0.26375361625105143,0.63044753577560186, + 0.31578356493264437,0.97069163154810667,0.07757596764713526,0.40966569539159536, + 0.55091228801757097,0.32018390577286482,0.44350660685449839,0.31810243334621191, +0.89644787041470408,0.19968961318954825,0.43832763982936740,0.21171907847747207, + 0.37858232436701655,0.54417965700849891,0.58460923237726092,0.17695645010098815, + 0.80405469564720988,0.20260545751079917,0.72340781940147281,0.57244732743129134, +0.44384705275297165,0.60141251794993877,0.86648589745163918,0.44860231317579746, + 0.46195234358310699,0.02047479711472988,0.75287136062979698,0.33129312284290791, + 0.10744897276163101,0.44988587312400341,0.87619100883603096,0.57386581040918827, +0.80895681912079453,0.18993748771026731,0.37921421090140939,0.59145097108557820, + 0.62873698258772492,0.89413649635389447,0.05172297963872552,0.05184767069295049, + 0.74039250845089555,0.77075743721798062,0.03733208635821939,0.34920182498171926, +0.68317985069006681,0.25839814636856318,0.76687160786241293,0.68067426700145006, + 0.28785153012722731,0.34903638903051615,0.59586250688880682,0.41492417920380831, + 0.56103316973894835,0.24352242145687342,0.42934664245694876,0.7067297669127584, +0.03401931514963508,0.09878737432882190,0.60066213225945830,0.07392961112782359, + 0.3292048736475408,0.11053651524707675,0.38337053125724196,0.72212355909869075, + 0.76611549546942115,0.21261148853227496,0.31572330510243773,0.35992007283493876, +0.23805456422269344,0.06199027225375175,0.78567356057465076,0.94336947053670883, + 0.47192330472171307,0.20233777537941933,0.49002202786505222,0.07746253907680511, + 0.78306589089334011,0.10992341861128807,0.36824773438274860,0.40523112565279007, +0.94920115964487195,0.04034968325868249,0.73871155502274632,0.12863306934013963, + 0.33537696348503232,0.13046909729018807,0.52727950783446431,0.58558783913031220, + 0.14388314681127667,0.69814807781949639,0.14587742509320378,0.61408105725422502, +0.21827886346727610,0.74001471605151892,0.55442603398114443,0.20190807711333036, + 0.55530697200447321,0.85739529784768820,0.06889454741030931,0.37079446297138929, + 0.16471924725919962,0.41509064938873053,0.67683792579919100,0.65240467619150877, +0.61546878470107913,0.61626600986346602,0.99291495559737086,0.19693034281954169, + 0.11960808141157031,0.63780163740739226,0.88430777518078685,0.21161167463287711, + 0.31774142337962985,0.50298188393935561,0.52619793592020869,0.02951709320768714, +0.83135433867573738,0.6583583448082209,0.97574284672737122,0.89286901615560055, + 0.76139996573328972,0.40711227245628834,0.71912937611341476,0.19032685272395611, + 0.50265956297516823,0.75116067565977573,0.400362566113472,0.56688958965241909} +; + + double result[] = +{-1.35304848520861487,0.45754085729476712,-0.6736280871889024,0.33207797896852592, + 0.43686665386108053,1.19699150804728482,-0.53382978138054371,0.29027772826683890, + -0.00827371705993142,-0.14056593966637726,0.97528495242825564,-0.50640321961329704, +-1.02292396789679763,0.14683824772822532,0.07187827219700703,0.26493234152584039, + 0.19039952557132572,0.55480813680166574,0.39823783903528059,0.10487653718583664, + -0.01169765032881238,-0.12935543309398898,0.91373948525086457,-0.42095065668914605, +-0.19349758378824730,-0.02882981029864774,-0.22391869192699457,-0.15720068678475169, + -0.07066729236062046,-0.22778476192919797,-0.07232798550562215,0.25736303036550690, + 0.46282933263406362,-0.30812642599955187,-0.13899968979779151,-0.29110054036689564, +-1.03603776312515605,0.41831226411022665,-0.26815455630947649,0.32749202801394556, + 0.71958381253175108,0.50743495139986494,-0.77843454048260496,-0.65128619093814355, + 0.45389989732032809,0.25340453725266349,-0.22487431273588654,-0.69327413947497007, +1.23257217178938916,-0.20500752874670841,1.17935058240805546,-0.07005924340124725, + 0.02202972751083646,-0.74349480264981749,0.78826180830363013,0.00378475165255014, + 0.20312102001296634,0.76317680003707100,-1.2444586343524908,0.61835799875331021, +0.82435969088956451,0.14161838805165022,0.54413699368884894,-0.35024810526933553, + 0.10736628125177422,-0.30342706713796774,0.16551618468279145,-0.33044241080800685, + 0.26090949768379634,0.36311977822561886,-0.02216943459020578,0.28290526888357609, +0.60758986375566237,-0.17769508155988095,-0.37428738263361294,0.06973138803028064, + -0.26917609149376737,0.57488494776039478,-0.16182837448139925,-0.54589681560051329, + 0.35855708857331126,-0.06225155630035748,-0.01420478239284544,-0.51044946988565809, +0.30247332250465692,-0.58709398545244817,0.52755056373610110,-0.87395680874726944, + -0.25878588799924235,-0.14016351767195534,0.26932123245105705,0.18741971186875042, + -0.10443218008098379,-0.04666556894424437,-0.28998246181099013,0.39888953797173432, +0.29894996645459254,0.44648385188893014,-0.2747623990687768,0.12767005544410789, + 0.31187612680253268,0.93787911555703019,-0.69506239058785912,0.05675543905552551, + -0.38364317006532606,0.3015716880761152,0.60874303825197718,-0.02132168933396992, +0.28919354677500908,0.08791044194229901,-0.66719204004654808,-0.38892391716572344, + -0.35074795512020418,0.52079480741130679,-0.12341534994946383,0.10603293453188402, + 0.13292792440340936,-0.03924161719101939,0.50135087079896590,0.13741552942080246, +0.38584460158392103,-1.05581700070645756,1.33305654920496308,-0.4661197871120432, + -0.29411616444505956,-2.27258047015748854,0.15783833704105082,-0.52713266629484568, + 1.16440529465468257,-0.45001368365485012,-2.15999736051125257,1.01319717905315843, +0.29660053528020919,-0.30427398541498984,-0.12504282968902436,0.25589579382097077, + -0.08693274594974670,-0.03498727188829748,0.07574429063044799,0.24558509581470137, + -0.11120224069858284,-0.21580250756805028,-0.02724340730221109,-0.16362172134690667, +0.39424507332817937,0.26915663350224511,-0.48616892178714571,0.06722217755862435, + -0.30789732141190385,0.93830157987553686,0.36043785223845126,0.42644383761017990, + -0.13641385018671429,-0.30094945006660034,1.13850388440322159,-0.12250602188987858, +-0.66991170773376507,-0.33568935537136302,0.34616388717968199,0.16394571168478128, + 0.11497788571365419,-1.12355992799920523,0.90321218371657097,0.51843407168999134, + -0.5333460102169536,0.19508185891564755,-0.24491167665302710,0.43625522780082732, +0.52362419925864290,0.35626701996484733,0.07409894473807596,0.6687300563276672, + 0.02130172947699538,0.07525160898747016,0.33548314852403621,0.36350170853544833, + -0.43456386741360986,0.30564069254711729,0.60413672598431878,0.62344267157598554, +-0.55671778762503188,0.51384740986051547,-0.66364280764764905,0.20946393028509858, + 0.21734134196942456,1.01080770232414596,-0.81218225821401002,-0.14076620249135630, + 0.32963958497594853,-0.23647842638263297,0.58596014599473090,-0.68150457913031526, +0.52872556238983059,0.57098625620273025,1.06212082783082407,0.59423966432136910, + 0.34731906030365728,-1.35636228486699051,0.60027136476023302,-0.01921912593105047, + -0.26023872041264290,0.60546432820947238,-0.64774098495099597,1.07329929083653908} +; + +*/ + + + double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { -1.25 , 0.75 , -1.166666666666666 ,0.83333333333333333 }; + + + double out [(COLUMNS2)*(LINES)] ; + + dldivma( in1 , LINES , COLUMNS1 , in2 , LINES , COLUMNS2 , out ) ; + for ( i = 0 ; i < LINES *COLUMNS2 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-15 ) ; + } + +} + + + +static void cldivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 10.0f , 9.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex* out ; + floatComplex Result[ZLINES*ZLINES] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = FloatComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = FloatComplex ( 0 , 0 ); + Result[1] = FloatComplex ( 0.5f , 0 ); + + + cldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; +} + +} + + + + + + + + + +static void zldivmaTest (void ) +{ + int i = 0 ; + + double tin1[] = { 10 , 9 , 2 ,4}; + double tin2[] = { 1 , 2}; +/* + double tin1[] = { 4 , 3 , 8 , 9 } ; + double tin2[] = { 1 , 3 , 2 , 4 } ; +*/ + + + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex Result[ZLINES*ZLINES] ; + + in1 = DoubleComplexMatrix ( tin1 , tin1 , ZLINES*ZCOLUMNS1 ); + in2 = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZCOLUMNS2 ); + out = DoubleComplexMatrix ( tin2 , tin2 , ZLINES*ZLINES ); + + Result[0] = DoubleComplex ( 0 , 0 ); + Result[1] = DoubleComplex ( 0.5 , 0 ); + /* + Result[0] = DoubleComplex ( -1.25 , 0 ); + Result[1] = DoubleComplex ( 0.75 , 0 ); + Result[2] = DoubleComplex ( -1.16666666 , 0 ); + Result[3] = DoubleComplex ( 0.833333333333 , 0 ); */ + + zldivma ( in1 , ZLINES , ZCOLUMNS1 , in2 ,ZLINES , ZCOLUMNS2 , out) ; + + for ( i = 0 ; i < (ZCOLUMNS1*ZCOLUMNS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-16 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-16 ) ; + + } + +} + + + +static void mytest (void ){ + double in1[2] = { 1 , 4 } ; + double in2[3] = { 1 , 2 , 3 }; + double out[6] = { 0 , 0 , 0 , 0 ,0 , 0 } ; + + int i = 0 ; + + dldivma ( in1 , 1, 2, in2 , 1, 3 , out ); + + for ( i = 0 ; i <6; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testLDivma (void) { + printf ("&&&& WARNING , TESTS FOR COMPLEX ARE STILL WRONG &&&&&&\n\n" ) ; + + printf("\n\n\n\n*********************\n"); + printf("***** Left Tests ****\n"); + printf("*********************\n"); + + + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + printf("\n\t>>>>Float real Tests\n"); + sldivmaTest(); + + printf("\n\n\n\t>>>> Double real Tests\n"); + dldivmaTest(); + + + + printf("\n\t>>>> Double complex Tests\n"); + zldivmaTest(); + printf("\n\t>>>> Float complex Tests\n"); + cldivmaTest(); + + return 0; +} + +int main(void) { + assert(testLDivma () == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/division/testMatrixRDivision.c b/2.3-1/src/c/matrixOperations/division/testMatrixRDivision.c new file mode 100644 index 00000000..9f4bf279 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/testMatrixRDivision.c @@ -0,0 +1,504 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "matrixDivision.h" + +#define LINES1 2 +#define LINES2 1 +#define COLUMNS 2 + +#define ZLINES1 2 +#define ZLINES2 1 +#define ZCOLUMNS 2 + + + + +static void sdivmaTest ( void ) +{ + int i = 0 ; +/* + float in1[] = + {0.51323400903493166f,0.6807207581587136f,0.54669387824833393f,0.24904179340228438f, + 0.95017496403306723f,0.91187966475263238f,0.78931419923901558f,0.30985609395429492f, + 0.71984737459570169f,0.9819172923453152f,0.76060794852674007f,0.504620002117008f, + 0.06844846438616514f,0.1693508871831f,0.76318027824163437f,0.30514528928324580f, + 0.92679917532950640f,0.04813073994591832f,0.93056132830679417f,0.31760499393567443f, +0.20109100220724940f,0.75775502342730761f,0.15586951794102788f,0.59756303764879704f, + 0.93055095290765166f,0.94091763999313116f,0.42790159443393350f,0.01439402624964714f, + 0.85971397114917636f,0.11901073250919580f,0.59864782588556409f,0.15444914810359478f, + 0.44080717256292701f,0.09636751096695662f,0.47461007768288255f,0.42803008854389191f, + 0.92924218205735087f,0.47864412236958742f,0.44434435339644551f,0.52509398944675922f, +0.78608208894729614f,0.46497652260586619f,0.06789979804307222f,0.24485790403559804f, + 0.71605867333710194f,0.99458031123504043f,0.84305586572736502f,0.45727639505639672f, + 0.29075053706765175f,0.55482550663873553f,0.28596154693514109f,0.07587631093338132f, + 0.66903266869485378f,0.32733985921368f,0.90166416298598051f,0.83553476119413972f, + 0.80835641175508499f,0.73590047238394618f,0.83198319096118212f,0.93355408729985356f, +0.78650354826822877f,0.74095427244901657f,0.95994638977572322f,0.51785656530410051f, + 0.78444739105179906f,0.13383972086012363f,0.43243235861882567f,0.74689115490764380f, + 0.96420694747939706f,0.22162469848990440f,0.41627834690734744f,0.81930211279541254f, + 0.21618453459814191f,0.08386900834739208f,0.48852836480364203f,0.20842899661511183f, + 0.22902313107624650f,0.78962677717208862f,0.25109061924740672f,0.57858273852616549f, +0.69515300076454878f,0.48902340466156602f,0.47249071300029755f,0.59868981270119548f, + 0.75798543263226748f,0.80475882859900594f,0.61186199076473713f,0.6943939602933824f, + 0.10014689620584249f,0.01250550756230950f,0.47080435231328011f,0.58039451343938708f, + 0.95630660001188517f,0.32801365898922086f,0.27026554010808468f,0.52016736706718802f, + 0.16067446302622557f,0.04408275568857789f,0.88035558909177780f,0.92851745663210750f, +0.42481321236118674f,0.73924016486853361f,0.16896168375387788f,0.39154956489801407f, + 0.97163037536665797f,0.88981838244944811f,0.90427244128659368f,0.31537816859781742f, + 0.06473635649308562f,0.58296835329383612f,0.14059370616450906f,0.63762421533465385f, + 0.67373040271922946f,0.44792105350643396f,0.60066422121599317f,0.06632651202380657f, + 0.66453591873869300f,0.19733488839119673f,0.45683057839050889f,0.08710412681102753f, +0.34466254524886608f,0.09304937114939094f,0.06055234652012587f,0.10790407890453935f, + 0.15703585743904114f,0.72192603675648570f,0.34105927217751741f,0.62482782872393727f, + 0.68893781490623951f,0.03671516245231032f,0.98292266484349966f,0.73650254914537072f, + 0.13196587935090065f,0.18807678623124957f,0.43376339320093393f,0.47929613338783383f, + 0.15195304714143276f,0.18539744755253196f,0.92726647388190031f,0.80549291754141450f, +0.64977857517078519f,0.70831089280545712f,0.90016864379867911f,0.51403949689120054f, + 0.49954565847292542f,0.55090149492025375f,0.92046913085505366f,0.74058383423835039f, + 0.82662396552041173f,0.3313873652368784f,0.68757036840543151f,0.06999884452670813f, + 0.41287241736426950f,0.04925781115889549f,0.85545881045982242f,0.31712341401726007f, + 0.03992868261411786f,0.92384314350783825f,0.74299975624307990f,0.00424729567021132f, +0.01225362811237574f,0.3223448325879872f,0.93296645395457745f,0.08063758304342628f, + 0.74957344215363264f,0.82469086581841111f,0.35314525663852692f,0.44088636664673686f, + 0.79343967605382204f,0.06321920128539205f,0.87087013013660908f,0.05352633958682418f, + 0.47160778101533651f,0.38195306668058038f,0.04547535255551338f,0.02313599688932300f, + 0.63996278587728739f,0.36444053100422025f,0.37049167416989803f,0.76907502254471183f, +0.89965870184823871f,0.89933154825121164f,0.64569224463775754f,0.34696785174310207f, + 0.39040711661800742f,0.08694788347929716f,0.22625351930037141f,0.21681279689073563f, + 0.33453882811591029f,0.15584628004580736f,0.95653126062825322f,0.83982629515230656f, + 0.50479181623086333f,0.54758223798125982f,0.83060362795367837f,0.21214072033762932f, + 0.02860224200412631f,0.95791505370289087f,0.91556971566751599f,0.94719038717448711f, +0.30791273340582848f,0.81771020544692874f,0.74679336044937372f,0.87552759842947125f, + 0.49545058421790600f,0.48191254725679755f,0.39087839704006910f,0.88425681227818131f, + 0.54299664497375488f,0.20552197424694896f,0.31019500363618135f,0.57183724315837026f, + 0.54999292083084583f,0.12055991357192397f,0.26517685409635305f,0.29529260704293847f, + 0.95132300630211830f,0.57458581728860736f,0.71528563741594553f,0.91191364871338010f, +0.18359116325154901f,0.45608301833271980f,0.17441136343404651f,0.18253823462873697f, + 0.77341705607250333f,0.01534702442586422f,0.27907355269417167f,0.94600243400782347f, + 0.39083331311121583f,0.35583620518445969f,0.58566563902422786f,0.44004907924681902f, + 0.79277362348511815f,0.96740394271910191f,0.06400812184438109f,0.07406814303249121f, + 0.03709788480773568f,0.85063817724585533f,0.10404936922714114f,0.12005183193832636f, +0.52963322307914495f,0.42104291776195168f,0.92252827808260918f,0.17444357229396701f, + 0.34813721571117640f,0.98178615467622876f,0.51038642041385174f,0.35229418566450477f, + 0.33187932055443525f,0.12522496515884995f,0.17751775681972504f,0.30953403143212199f, + 0.30514361429959536f,0.69633625121787190f,0.58739017136394978f,0.95729830628260970f, + 0.78135449346154928f,0.41670671710744500f,0.55824907496571541f,0.17518991930410266f, +0.11329598492011428f,0.87877958174794912f,0.81112976977601647f,0.1327551044523716f, + 0.88772260351106524f,0.77383322361856699f,0.39891980635002255f,0.42609489522874355f, + 0.29346287390217185f,0.29799025785177946f,0.62878308678045869f,0.90327445417642593f, + 0.88942573545500636f,0.11638559121638536f,0.92788035096600652f,0.30957929231226444f, + 0.2565767071209848f,0.42655616905540228f,0.26941573480144143f,0.65786541625857353f, +0.98608913458883762f,0.04273471748456359f,0.26294819917529821f,0.66961710015311837f, + 0.19781696423888206f,0.62439860356971622f,0.25354105327278376f,0.55396229820325971f, + 0.92479544691741467f,0.09095242014154792f,0.63873832207173109f,0.97996837133541703f, + 0.67638632655143738f,0.89037371007725596f,0.41085386741906404f,0.07612052233889699f, + 0.31289586611092091f,0.62697393959388137f,0.15661530848592520f,0.28013094374909997f}; + +float in2[] = + {0.56034345272928476f,0.89566554129123688f,0.53930272068828344f,0.3547350224107504f, + 0.80800013709813356f,0.62323769554495811f,0.58200186025351286f,0.56180121190845966f, + 0.23549679014831781f,0.28873602300882339f,0.43252215441316366f,0.7673156540840864f, + 0.06873596925288439f,0.18797885254025459f,0.86748637538403273f,0.73920361138880253f, + 0.97392784897238016f,0.86080306768417358f,0.39093428757041693f,0.57339327596127987f, +0.16198171628639102f,0.66783405328169465f,0.1454864419065416f,0.32747871475294232f, + 0.51621831534430385f,0.79978153714910150f,0.09275748720392585f,0.14153907122090459f, + 0.06119967205449939f,0.32070356840267777f,0.73968251561746001f,0.37837028549984097f, + 0.56752133695408702f,0.11224916437640786f,0.28770424565300345f,0.00037088664248586f, + 0.79149663401767612f,0.58377730334177613f,0.59390504425391555f,0.02694623963907361f, +0.76592414453625679f,0.02564378362149000f,0.74512455798685551f,0.02366107050329447f, + 0.06156063079833984f,0.04258572962135077f,0.63941287063062191f,0.38405111897736788f, + 0.14321060106158257f,0.42103306483477354f,0.05339348502457142f,0.93415357265621424f, + 0.59929492324590683f,0.66478141304105520f,0.14329732768237591f,0.42867958266288042f, + 0.10990926995873451f,0.63394964020699263f,0.05351450480520725f,0.54702291730791330f, +0.69746216991916299f,0.03159578284248710f,0.25769635709002614f,0.59392183972522616f, + 0.01609914982691407f,0.86753786867484450f,0.32879876391962171f,0.22861831961199641f, + 0.33929981896653771f,0.75886590173467994f,0.61312689306214452f,0.48855357570573688f, + 0.10645245248451829f,0.14542592084035277f,0.18745915638282895f,0.87820987729355693f, + 0.92918653646484017f,0.92348486324772239f,0.39261205168440938f,0.68466226710006595f, +0.08946218248456717f,0.42732305638492107f,0.77090662438422441f,0.924068246036768f, + 0.50982708018273115f,0.34508761204779148f,0.10317245963960886f,0.63696919381618500f, + 0.88041578140109777f,0.65034613572061062f,0.80938913393765688f,0.9986613355576992f, + 0.38141551148146391f,0.43060396797955036f,0.61948752496391535f,0.80996788293123245f, + 0.05324298795312643f,0.29668187908828259f,0.00448737759143114f,0.82276185229420662f, +0.19805425917729735f,0.10866974340751767f,0.99788628844544291f,0.6723356381990016f, + 0.46966064115986228f,0.79823006363585591f,0.67132972134277225f,0.35570297623053193f, + 0.52579802041873336f,0.25843874411657453f,0.19287035940214992f,0.59324032673612237f, + 0.25955950608476996f,0.61404782952740788f,0.21750316722318530f,0.81994143361225724f, + 0.19624035572633147f,0.8358787004835904f,0.42109713284298778f,0.31491625169292092f, +0.25988535769283772f,0.76794129703193903f,0.84549946337938309f,0.48446214850991964f, + 0.52822500281035900f,0.37241784948855639f,0.85067357495427132f,0.16846220474690199f, + 0.71482414938509464f,0.78300847951322794f,0.54156896471977234f,0.89239248540252447f, + 0.00643130205571651f,0.21658254135400057f,0.44520513340830803f,0.32618630956858397f, + 0.52326664514839649f,0.32250450644642115f,0.26230763643980026f,0.23438148852437735f, +0.50999558391049504f,0.37397424085065722f,0.64668390387669206f,0.64172910666093230f, + 0.03306737588718534f,0.18668571440503001f,0.83025926211848855f,0.99121205648407340f, + 0.38945918949320912f,0.27384403301402926f,0.41589357936754823f,0.99599931901320815f, + 0.81049045221880078f,0.96830060658976436f,0.40803860733285546f,0.52525822212919593f, + 0.33058117749169469f,0.23706211848184466f,0.17479355866089463f,0.62723324215039611f, +0.16741782892495394f,0.15187738463282585f,0.72003478836268187f,0.59474316425621510f, + 0.71126131806522608f,0.50548844784498215f,0.43874060269445181f,0.84671537391841412f, + 0.46396317798644304f,0.84823036566376686f,0.28646126668900251f,0.48104315437376499f, + 0.26604998949915171f,0.66378767788410187f,0.63686545100063086f,0.79531485401093960f, + 0.95694970060139894f,0.70720722898840904f,0.83713256847113371f,0.62996550090610981f, +0.34009417472407222f,0.72199993440881371f,0.67456434061750770f,0.10675506712868810f, + 0.79017778439447284f,0.34282173449173570f,0.58765271818265319f,0.07389529095962644f, + 0.16408033994957805f,0.12704358855262399f,0.51104495069012046f,0.07703803153708577f, + 0.12485344661399722f,0.51966900611296296f,0.49762418633326888f,0.77279568510130048f, + 0.95798523304983974f,0.22388020763173699f,0.83013197174295783f,0.04275623383000493f}; + + +float result[] = +{-0.13425098694507090f,0.24735018618193444f,-0.13997367470679392f,0.11987585715392905f, + -0.07023550140255914f,-0.32818483956327921f,0.82293845909628660f,-0.04825208923032670f, + 0.41107043821212774f,0.28834120500378574f, +0.26097631689267364f,0.41112922481604613f,-0.48704150701173060f,0.16756167892414930f, + 0.18525816194433214f,0.24194769618197037f,0.04516579999951376f,0.08210988946198612f, + -0.17724539433971653f,0.21570365259908197f, +0.46476238563747729f,0.12929328091152756f,0.03791742144738922f,0.33232469296313982f, + -0.14531956716307623f,-0.04355937726216118f,-0.32871318476723438f,0.16208735115250936f, + 0.27759742819012267f,0.20883772519304408f, +0.60589399320385928f,0.06028369176400562f,0.33610957414517950f,-0.32741653379843827f, + 0.32006732568590329f,0.12357809346654614f,0.26645037101516444f,-0.15778041923768410f, + -0.02281069075548223f,-0.21831876232917027f, +0.11316162639341981f,0.44869069077875356f,0.05087241573803265f,-0.07310286041500898f, + 0.24172631454502305f,0.20582249789901347f,-0.49030030296647070f,0.49725834464740676f, + -0.15098926456955386f,0.29845287904710704f, +0.26126025652717821f,0.61602266860724408f,-0.04395376298763495f,-0.31468851985942192f, + -0.42610430769336133f,0.07619666627024707f,0.42141080474076514f,0.34732212135875368f, + 0.21966932936729675f,-0.16465486570712187f, +0.01801836442044520f,0.13867951307716378f,-0.22823955222461578f,0.35528257041935002f, + 0.3416886047495104f,-0.05324845913867078f,-0.18334602929956423f,0.34486570917896908f, + -0.09850219178062529f,0.15717539967151753f, +0.26027320955453370f,0.24744146889140337f,-0.164185466873868f,-0.18897859269730288f, + -0.10286928200189474f,0.54800666111794050f,0.32097861553203794f,0.16617893447929227f, + -0.03433269255504845f,-0.01421332288783149f, +-0.24887241840873561f,0.52303584234440914f,0.02976416459895397f,-0.12264750867737524f, + 0.30087087321455463f,0.28120264259279731f,-0.02981261204955734f,-0.05832040687613257f, + 0.09480786369785668f,0.26640553810556677f, +0.28112837735944118f,0.53844297257991636f,0.87478164836631844f,-0.1409682347398108f, + 0.66145942836153393f,-0.26119505204825816f,-0.34297154024663806f,-0.24798246038042729f, + -0.30432340939641339f,0.37887301625026215f, +0.38327878821721156f,0.28922881585078497f,-0.34742629642806333f,-0.03677194909448467f, + -0.04829379940842784f,0.06878313210496664f,0.04495930782786764f,0.47892284040726463f, + 0.32833980213443120f,-0.23534654463679133f, +-0.02763634740677747f,0.72078725530634646f,0.48763002329592203f,-0.57876872035917137f, + 0.23063708055466298f,0.04745273757978258f,-0.28751023415434818f,0.138229588096174f, + 0.36392895348902060f,-0.15741181362164816f, +0.13480297497174423f,-0.06082319210597478f,-0.03346206227374363f,0.157369564795072f, + -0.09939329142432089f,0.50801256096451919f,-0.21552055455365590f,0.18726599728475304f, + -0.09981549922929681f,0.56837678961938298f, +0.51101691288362061f,0.72117205689181529f,0.47311124338037619f,-0.59816447223287172f, + 0.56148184747810326f,0.06803537921378118f,-0.12236345370998958f,-0.2366952577209536f, + -0.10560524465448745f,-0.03700000431544657f, +-0.07318875604760167f,0.49681103126620946f,0.16658812117729807f,0.19247716660649325f, + 0.17479922937365650f,0.20305642078183334f,-0.11893261285117168f,0.52167729786941019f, + -0.26590601210923126f,-0.17052720242327102f}; + */ + + /*float in1[] = { 4.0f , 3.0f , 8.0f , 9.0f } ; + float in2[] = { 1.0f , 3.0f , 2.0f , 4.0f } ; + float result[] = { 4.0f , 7.5f , 0.0f ,-1.5f }; +float out[(COLUMNS)*(LINES2)] ;*/ + + float in1[] = { 1.0f ,3.0f ,2.0f ,4.0f } ; + float in2[] = { 1.0f , 2.0f } ; + float result[] = { 1.0f , 2.2f }; + float out [(COLUMNS)*(LINES2)] ; + + + + srdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + + for ( i = 0 ; i < LINES2 *COLUMNS ; ++i ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 1e-6 ) ; + } + +} + + + + + + + +static void drdivmaTest ( void ) +{ + int i = 0 ; + +/* double in1[] = { 4 , 3 , 8 , 9 } ; + double in2[] = { 1 , 3 , 2 , 4 } ; + double result[] = { 4 , 7.5 , 0 ,-1.5 };*/ + + + double in1[] = { 1 ,3 ,2 ,4 } ; + double in2[] = { 1 , 2 } ; + double result[] = { 1 , 2.2 }; + double out [(COLUMNS)*(LINES2)] ; + + drdivma ( in1 , LINES1 , COLUMNS , in2 , LINES2 , COLUMNS , out) ; + for ( i = 0 ; i < LINES2 *COLUMNS ; i++ ) + { + printf ( "\t\t %d out : %e result : %e assert : %e \n" , + i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-16 ) ; + } + +} + +static void crdivmaTest (void ) +{ + int i = 0 ; + + float tin1[] = { 1.0f , 3.0f , 2.0f ,4.0f}; + float tin2[] = { 1.0f , 2.0f}; + + + floatComplex* in1 ; + floatComplex* in2 ; + floatComplex out[ZLINES2*ZCOLUMNS] ; + floatComplex Result[ZLINES1*ZLINES2] ; + + in1 = FloatComplexMatrix ( tin1 , tin1 , ZLINES1*ZCOLUMNS ); + in2 = FloatComplexMatrix ( tin2 , tin2 , ZLINES2*ZCOLUMNS ); + + + Result[0] = FloatComplex ( 1.0f , 0 ); + Result[1] = FloatComplex ( 2.2f , 0 ); + + crdivma ( in1 , ZLINES1 , ZCOLUMNS , in2 ,ZLINES2 , ZCOLUMNS , out) ; + + for ( i = 0 ; i < (ZLINES2*ZCOLUMNS ) ; i++ ) + { + printf ( "\t\t %d out : %e + %e * i result : %e + %e * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-06 && creals (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-16 ); + + + if ( cimags(out[i]) < 1e-06 && cimags (Result[i]) < 1e-08 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-16 ) ; + + } + +} + + + + + +static void zrdivmaTest ( void ){ + int i = 0 ; + +/* double tin1 [] = + {0.69949407549574971,0.25834653992205858,0.61552664963528514,0.19030105322599411, + 0.46075769001618028,0.52200102340430021,0.70538004627451301,0.88748936913907528, + 0.18582182424142957,0.09225247148424387,0.37796644819900393,0.93693156912922859, + 0.19805216649547219, +0.47020285483449697,0.37788185989484191,0.36296494491398335,0.27933338703587651, + 0.67214426863938570,0.69089507637545466,0.5104757994413376,0.06106034899130464, + 0.93353842478245497,0.14489983161911368,0.57212112657725811,0.54598869429901242, + 0.05166801903396845, +0.50110132200643420,0.92609716579318047,0.85469480464234948,0.58570997323840857, + 0.8791871047578752,0.25320483185350895,0.7903951373882592,0.63298055250197649, + 0.86023237137123942,0.90196201950311661,0.31587493652477860,0.40010235738009214, + 0.11108959605917335, +0.47051278315484524,0.53627631859853864,0.28784319106489420,0.87401255918666720, + 0.07408339157700539,0.28149573365226388,0.70837680157274008,0.16526474570855498, + 0.26673525758087635,0.88194080116227269,0.35371549893170595,0.02646211860701442, + 0.08616474270820618, +0.23139652097597718,0.13406464736908674,0.67240026732906699,0.19029983691871166, + 0.73075085924938321,0.50484903249889612,0.87911593122407794,0.55444371327757835, + 0.2063297093845904,0.40116110350936651,0.45593289798125625,0.69771515764296055, + 0.39659122796729207, +0.49838109035044909,0.14524227706715465,0.90753587335348129,0.10092954570427537, + 0.01771899592131376,0.79376714816316962,0.43091466091573238,0.58433785336092114, + 0.79542846325784922,0.13906158460304141,0.10127847269177437,0.331680862698704, + 0.83444251772016287, +0.05499405181035399,0.36960034258663654,0.74532664241269231,0.05718118418008089, + 0.59996518073603511,0.20857419073581696,0.87988782906904817,0.47828097920864820, + 0.71160991629585624,0.85858650319278240,0.80782221304252744,0.51599627826362848, + 0.89173404080793262, +0.88423488661646843,0.70964269945397973,0.66102255787700415,0.72523507243022323, + 0.51014349795877934,0.28248664410784841,0.22149151284247637,0.57675753859803081, + 0.70482534915208817,0.56079456442967057,0.36288804840296507,0.30883262446150184, + 0.98134148679673672, +0.74284822540357709,0.16163914743810892,0.36525219632312655,0.38350704684853554, + 0.11691810050979257,0.89112461265176535,0.06342720007523894,0.62639418430626392, + 0.68077020766213536,0.25885968375951052,0.43948043463751674,0.85988187789916992, + 0.54828232014551759, +0.81359952967613935,0.48982370039448142,0.02400260977447033,0.73691955255344510, + 0.24111561570316553,0.15296932263299823,0.26483592018485069,0.42981932172551751, + 0.76739394571632147,0.87532604997977614,0.37969883717596531,0.30623568268492818, + 0.38800517935305834} +; + double tin2[] = + {0.10472932783886790,0.76038318127393723,0.03409303957596421,0.14239662420004606, + 0.55545594682916999,0.80318974517285824,0.51839923160150647, +0.15185610298067331,0.58847306622192264,0.25450934842228889,0.99926799396052957, + 0.63989769574254751,0.55067161237820983,0.46070076711475849, +0.59330079378560185,0.65381935704499483,0.41683405218645930,0.99101553857326508, + 0.37207804108038545,0.70618240814656019,0.57808654149994254, +0.60231964103877544,0.57150967465713620,0.05496290419250727,0.12058544857427478, + 0.01436204835772514,0.02579512307420373,0.84112487640231848, +0.43818825250491500,0.46434015966951847,0.41974264057353139,0.80236544925719500, + 0.52285881666466594,0.50951210409402847,0.45319801801815629, +0.78178183268755674,0.77655703714117408,0.04660592041909695,0.51133266882970929, + 0.75021018926054239,0.68836286617442966,0.01677561178803444, +0.93454108992591500,0.56098637636750937,0.22058471059426665,0.76485407538712025, + 0.48169769765809178,0.15587856341153383,0.24760220525786281, +0.5216529071331024,0.08052303874865174,0.44094172399491072,0.89119336148723960, + 0.97805908136069775,0.45880937622860074,0.55104400310665369, +0.09609609050676227,0.41967850551009178,0.75025565037503839,0.72181495930999517, + 0.28955410188063979,0.39077644981443882,0.66866181464865804, +0.48776568192988634,0.46859717695042491,0.35626485198736191,0.34423254663124681, + 0.42533078324049711,0.55880581727251410,0.33048649691045284}; + + double tresult [] = +{0.09451169317317064,0.75015055776907902,0.36496074775718695,0.68454978838459446, + 0.13580235186649750,-0.73350613524989861,0.36833823393043919,0.27427787570717332, + 0.17435767433670571,1.27922130237729870,-0.15718152608891298,-0.66812523122285583, + 0.43535989166783623, +-0.17216817930992268,-1.11920478787033972,0.09365729285784405,-0.91168598672719281, + -0.5256902016286176,1.47418373212534837,0.32785551967187748,0.09665910045214705, + 0.38963814934750451,-0.74599090807052515,0.77435560834796702,1.17862196275483577, + 0.41913747422722752, +0.65168405083167491,-0.79778304970274549,-0.36689764540805470,-0.07037790812871010, + -0.90964747913660449,0.87009086524746737,-0.86086796711204328,0.69420170666117553, + 0.39900228216491013,0.01839542030829135,0.34079166496122038,0.94979559344928910, + 1.29342689865858507, +-0.64010890644433138,0.43942520236508265,0.36871562427022309,-0.23543430717113373, + 0.9837594524525952,-0.15541789413277388,0.51832027142464965,-0.49730447418173146, + 0.37785363034287500,0.05031307256758123,0.14529056591993289,-0.19261761155662854, + -0.65165849136819898, +0.56992829732488970,-0.67626872453203313,0.08987541550832115,-0.27809079516465274, + -0.52685742082861620,0.87085948155471882,-0.36015598439076552,0.24628281709439132, + 0.16018284982540432,-0.78765458348414275,0.4868803314915888,0.67004786693098373, + 1.38638653773561149, +0.49065638508775172,1.15002211885645633,0.31098171282535453,0.772677804931936, + 0.77563266454559698,-0.93158860042668212,0.20092451587523308,0.56834988643083173, + -0.03774794264631696,0.70322729924980754,-0.84660509947179974,-0.48910607201144141, + -0.91999377725600595, +0.57044463605090034,0.85729374705550832,0.03549271915962299,1.08806327983132478, + 0.40323683962485551,-0.27978276073461661,0.45277262688908537,0.06218152458345420, + -0.2153422115217984,0.68840508909853904,0.09945644614561956,-0.17861252621808085, + -0.44037299008464365} +;*/ + + double bR[6]={1,4,2,5,3,6}; + double bI[6]={1,0,4,0,1,2}; + double dR[9]={4,8,3,2,8,4,3,4,5}; + double dI[9]={0,0,4,0,-1,0,0,0,0}; + double rR[6]={0.9845119462120300868335,1.191739704646416209144,- 0.1118981870572697823185, + 0.2069876335694560698375,0.0988113819185977154680,0.3193660703565854852570}; + double rI[6]={- 1.3492616160403412273183,- 0.3196061952215153434409,0.5309160763597071674980, + - 0.3168447592748228625048,0.5848241085364388469614,0.8452395245527674072505}; + doubleComplex* in1 ; + doubleComplex* in2 ; + doubleComplex* out ; + doubleComplex* Result ; + + in1 = DoubleComplexMatrix ( bR,bI,6 ); + in2 = DoubleComplexMatrix ( dR,dI,9 ); + out = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + Result = (doubleComplex*)malloc((unsigned int)6*sizeof(doubleComplex)); + + Result = DoubleComplexMatrix ( rR , rI , 6 ); + + zrdivma ( in1 , 2 , 3 , in2 ,3 , 3 , out) ; + + for ( i = 0 ; i < (6 ) ; i++ ) + { + printf ( "\t\t %d out : %1.20f + %1.20f * i result : %1.20f + %1.20f * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + if ( zreals(out[i]) < 1e-16 && zreals (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-16 && zimags (Result[i]) < 1e-16 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(Result); + free(out); +} + + + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 , 13 } ; + double in2[16] = { 2 , 6 , 10 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + drdivma ( in1 , 1 , 4 , in2 ,1, 3 , out ); + + for ( i = 0 ; i <1; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + + +static int testRDivma (void) { + + printf("\n\n\n\n**********************\n"); + printf("***** Right Tests ****\n"); + printf("**********************\n"); + mytest ( ); + printf("\n\t>>>> Float real Tests\n"); + sdivmaTest(); + + printf("\n\n\n\n\t>>>> Double real Tests\n"); + drdivmaTest(); + + printf("\n\t>>>> Float complex Tests\n"); + crdivmaTest(); + + printf("\n\t>>>> Double complex Tests\n"); + zrdivmaTest(); + return 0; +} + + +int main(void) { + assert(testRDivma () == 0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj b/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj new file mode 100644 index 00000000..73c770d2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B1F2A8CE-764A-4D51-AABD-998D48783894} + testMatrixLDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters b/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters new file mode 100644 index 00000000..c7100b46 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/test_MatrixLDivision/testMatrixLDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj b/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj new file mode 100644 index 00000000..5e554d6d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {33833932-6973-483B-B0D1-B3CC800BDFF5} + testMatrixRDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters b/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters new file mode 100644 index 00000000..edfc1006 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/test_MatrixRDivision/testMatrixRDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/division/zldivma.c b/2.3-1/src/c/matrixOperations/division/zldivma.c new file mode 100644 index 00000000..85577351 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/zldivma.c @@ -0,0 +1,125 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" +#include "lapack.h" + +void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + int iRank = 0; + + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + doubleComplex *pAf = NULL; + doubleComplex *pXb = NULL; + doubleComplex *pDwork = NULL; + + + double *pRwork = NULL; + + + int *pIpiv = NULL; + int *pJpvt = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + pAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines1 *(unsigned int)columns1); + pXb = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines1,columns1) *(unsigned int) columns2); + + + pIpiv = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pJpvt = (int*)malloc(sizeof(int) * (unsigned int)columns1); + pRwork = (double*)malloc(sizeof(double) * (unsigned int)columns1*2); + + + cNorm = '1'; + pDwork = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines1, &columns1, in1, &lines1, pDwork); + + if(lines1 == columns1) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns1, in1, &columns1, pAf, &columns1); + + C2F(zlacpy)(&cNorm, &columns1, &columns2, in2, &columns1, pXb, &columns1); + C2F(zgetrf)(&columns1, &columns1, pAf, &columns1, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns1, pAf, &columns1, &dblAnorm, &dblRcond, pDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns1, &columns2, pAf, &columns1, pIpiv, pXb, &columns1, &iInfo); + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &columns1, out, &columns1); + + iExit = 1; + } + + } + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines1, columns1); + C2F(zlacpy)(&cNorm, &lines1, &columns2, in2, &lines1, pXb, &iMax); + memset(pJpvt, 0x00,(unsigned int) sizeof(int) * (unsigned int)columns1); + C2F(zgelsy)( &lines1, &columns1, &columns2, in1, &lines1, pXb, &iMax, + pJpvt, &dblRcond, &iRank, pDwork, &iWork, pRwork, &iInfo); + + + if(iInfo == 0) + { + + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns1, &columns2, pXb, &iMax, out, &columns1); + + } + } + + + + + + free(pAf); + free(pXb); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(pDwork); + +} diff --git a/2.3-1/src/c/matrixOperations/division/zrdivdzv.c b/2.3-1/src/c/matrixOperations/division/zrdivdzv.c new file mode 100644 index 00000000..eb17a8b9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/zrdivdzv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivdzv (double* in1, doubleComplex* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(DoubleComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/2.3-1/src/c/matrixOperations/division/zrdivma.c b/2.3-1/src/c/matrixOperations/division/zrdivma.c new file mode 100644 index 00000000..73e69f4c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/zrdivma.c @@ -0,0 +1,165 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixDivision.h" + +void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ) +{ + + char cNorm = 0; + int iExit = 0; + + /*temporary variables*/ + int iWork = 0; + int iInfo = 0; + int iMax = 0; + double dblRcond = 0; + + double dblEps = 0; + double dblAnorm = 0; + + + doubleComplex *poAf = NULL; + doubleComplex *poAt = NULL; + doubleComplex *poBt = NULL; + doubleComplex *poDwork = NULL; + + int *pRank = NULL; + int *pIpiv = NULL; + int *pJpvt = NULL; + double *pRwork = NULL; + + iWork = max(2*columns2, min(lines2, columns2) + max(2 * min(lines2, columns2), max(lines2 + 1, min(lines2, columns2) + lines1))); + + + + /* Array allocations*/ + + + poAf = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) lines2 *(unsigned int) columns2); + poAt = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)lines2 *(unsigned int) columns2); + poBt = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) max(lines2, columns2) *(unsigned int) lines1); + + pRank = (int*)malloc(sizeof(int)); + pIpiv = (int*)malloc(sizeof(int) *(unsigned int) columns2); + pJpvt = (int*)malloc(sizeof(int) *(unsigned int) lines2); + pRwork = (double*)malloc(sizeof(double) * 2 *(unsigned int) lines2); + + + + cNorm = '1'; + poDwork = (doubleComplex*)malloc(sizeof(doubleComplex) *(unsigned int) iWork); + dblEps = getRelativeMachinePrecision() ; + dblAnorm = C2F(zlange)(&cNorm, &lines2, &columns2, in2, &lines2, poDwork); + + /* hermitian tranpose A (transpose + conjugate )*/ + + ztransposea(in2, lines2, columns2, poAt); + zconja ( poAt , lines2*columns2 , poAt ); + { + int i,j,ij,ji; + for(j = 0 ; j < lines1 ; j++) + { + for(i = 0 ; i < columns2 ; i++) + { + ij = i + j * max(lines2, columns2); + ji = j + i * lines1; + + poBt[ij] = DoubleComplex (zreals ( in1[ji] ) , - zimags ( in1[ji] ) ); + } + } + } + + if(lines2 == columns2) + { + cNorm = 'F'; + C2F(zlacpy)(&cNorm, &columns2, &columns2, poAt, &columns1, poAf, &columns2); + C2F(zgetrf)(&columns2, &columns2, poAf, &columns2, pIpiv, &iInfo); + if(iInfo == 0) + { + cNorm = '1'; + C2F(zgecon)(&cNorm, &columns2, poAf, &columns2, &dblAnorm, + &dblRcond, poDwork, pRwork, &iInfo); + if(dblRcond > sqrt(dblEps)) + { + cNorm = 'N'; + C2F(zgetrs)(&cNorm, &columns2, &lines1, poAf, &columns2, pIpiv, poBt, &columns2, &iInfo); + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + + } + } + } + + iExit = 1; + } + } + + } + + if(iExit == 0) + { + dblRcond = sqrt(dblEps); + cNorm = 'F'; + iMax = max(lines2, columns2); + + memset(pJpvt, 0x00,(unsigned int) sizeof(int) *(unsigned int) lines2); + C2F(zgelsy)(&columns2, &lines2, &lines1, poAt, &columns2, poBt, &iMax, + pJpvt, &dblRcond, &pRank[0], poDwork, &iWork, pRwork, &iInfo); + + if(iInfo == 0) + { + + /*// TransposeRealMatrix(pBt, lines1, lines2, _pdblRealOut, Max(lines1,columns1), lines2); + + //Mega caca de la mort qui tue des ours a mains nues + //mais je ne sais pas comment le rendre "beau" :(*/ + { + int i,j,ij,ji; + for(j = 0 ; j < lines2 ; j++) + { + for(i = 0 ; i < lines1 ; i++) + { + ij = i + j * lines1; + ji = j + i * max(lines2, columns2); + out[ij] = DoubleComplex ( zreals( poBt[ji]) , -zimags ( poBt[ji])); + } + } + } + } + } + + + + free(poAf); + free(poAt); + free(poBt); + free(pRank); + free(pIpiv); + free(pJpvt); + free(pRwork); + free(poDwork); + +} + + diff --git a/2.3-1/src/c/matrixOperations/division/zrdivv.c b/2.3-1/src/c/matrixOperations/division/zrdivv.c new file mode 100644 index 00000000..f06abc4b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/zrdivv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "division.h" +#include "matrixDivision.h" + +doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size){ + + doubleComplex out[1] ={ DoubleComplex (0.0 , 0.0) }; + zrdivma ( in1,1 ,size ,in2 , 1 , size , out ); + + return out[0] ; +} + diff --git a/2.3-1/src/c/matrixOperations/division/zrdivzdv.c b/2.3-1/src/c/matrixOperations/division/zrdivzdv.c new file mode 100644 index 00000000..9a0e2838 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/division/zrdivzdv.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "zeros.h" +#include "matrixDivision.h" + +doubleComplex zrdivzdv (doubleComplex* in1,double* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zrdivv(in1 , DoubleComplexMatrix(in2,ZEROS,size),size ); + } diff --git a/2.3-1/src/c/matrixOperations/expm/Makefile.am b/2.3-1/src/c/matrixOperations/expm/Makefile.am new file mode 100644 index 00000000..682a2505 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/Makefile.am @@ -0,0 +1,79 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixExponential_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixExponential.la + +HEAD = ../includes/matrixExponential.h + +libMatrixExponential_la_SOURCES = $(HEAD) \ + dexpma.c \ + zexpma.c \ + sexpma.c \ + cexpma.c + + +check_PROGRAMS = testMatrixExponential + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + libMatrixExponential.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + + +testMatrixExponential_SOURCES = testMatrixExponential.c +testMatrixExponential_LDADD = $(check_LDADD) +testMatrixExponential_CFLAGS = $(check_INCLUDES) + + +TESTS = testMatrixExponential diff --git a/2.3-1/src/c/matrixOperations/expm/Makefile.in b/2.3-1/src/c/matrixOperations/expm/Makefile.in new file mode 100644 index 00000000..5bbe3312 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/Makefile.in @@ -0,0 +1,753 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixExponential$(EXEEXT) +TESTS = testMatrixExponential$(EXEEXT) +subdir = src/c/matrixOperations/expm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixExponential_la_LIBADD = +am__objects_1 = +am_libMatrixExponential_la_OBJECTS = $(am__objects_1) \ + libMatrixExponential_la-dexpma.lo \ + libMatrixExponential_la-zexpma.lo \ + libMatrixExponential_la-sexpma.lo \ + libMatrixExponential_la-cexpma.lo +libMatrixExponential_la_OBJECTS = \ + $(am_libMatrixExponential_la_OBJECTS) +libMatrixExponential_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixExponential_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixExponential_OBJECTS = \ + testMatrixExponential-testMatrixExponential.$(OBJEXT) +testMatrixExponential_OBJECTS = $(am_testMatrixExponential_OBJECTS) +testMatrixExponential_DEPENDENCIES = $(check_LDADD) +testMatrixExponential_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixExponential_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixExponential_la_SOURCES) \ + $(testMatrixExponential_SOURCES) +DIST_SOURCES = $(libMatrixExponential_la_SOURCES) \ + $(testMatrixExponential_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixExponential_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixExponential.la +HEAD = ../includes/matrixExponential.h +libMatrixExponential_la_SOURCES = $(HEAD) \ + dexpma.c \ + zexpma.c \ + sexpma.c \ + cexpma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + libMatrixExponential.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixExponential_SOURCES = testMatrixExponential.c +testMatrixExponential_LDADD = $(check_LDADD) +testMatrixExponential_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/expm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/expm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixExponential.la: $(libMatrixExponential_la_OBJECTS) $(libMatrixExponential_la_DEPENDENCIES) + $(libMatrixExponential_la_LINK) -rpath $(pkglibdir) $(libMatrixExponential_la_OBJECTS) $(libMatrixExponential_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixExponential$(EXEEXT): $(testMatrixExponential_OBJECTS) $(testMatrixExponential_DEPENDENCIES) + @rm -f testMatrixExponential$(EXEEXT) + $(testMatrixExponential_LINK) $(testMatrixExponential_OBJECTS) $(testMatrixExponential_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-cexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-dexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-sexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixExponential_la-zexpma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixExponential-testMatrixExponential.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixExponential_la-dexpma.lo: dexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-dexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-dexpma.Tpo -c -o libMatrixExponential_la-dexpma.lo `test -f 'dexpma.c' || echo '$(srcdir)/'`dexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-dexpma.Tpo $(DEPDIR)/libMatrixExponential_la-dexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dexpma.c' object='libMatrixExponential_la-dexpma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-dexpma.lo `test -f 'dexpma.c' || echo '$(srcdir)/'`dexpma.c + +libMatrixExponential_la-zexpma.lo: zexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-zexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-zexpma.Tpo -c -o libMatrixExponential_la-zexpma.lo `test -f 'zexpma.c' || echo '$(srcdir)/'`zexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-zexpma.Tpo $(DEPDIR)/libMatrixExponential_la-zexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zexpma.c' object='libMatrixExponential_la-zexpma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-zexpma.lo `test -f 'zexpma.c' || echo '$(srcdir)/'`zexpma.c + +libMatrixExponential_la-sexpma.lo: sexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-sexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-sexpma.Tpo -c -o libMatrixExponential_la-sexpma.lo `test -f 'sexpma.c' || echo '$(srcdir)/'`sexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-sexpma.Tpo $(DEPDIR)/libMatrixExponential_la-sexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sexpma.c' object='libMatrixExponential_la-sexpma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-sexpma.lo `test -f 'sexpma.c' || echo '$(srcdir)/'`sexpma.c + +libMatrixExponential_la-cexpma.lo: cexpma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -MT libMatrixExponential_la-cexpma.lo -MD -MP -MF $(DEPDIR)/libMatrixExponential_la-cexpma.Tpo -c -o libMatrixExponential_la-cexpma.lo `test -f 'cexpma.c' || echo '$(srcdir)/'`cexpma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixExponential_la-cexpma.Tpo $(DEPDIR)/libMatrixExponential_la-cexpma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cexpma.c' object='libMatrixExponential_la-cexpma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixExponential_la_CFLAGS) $(CFLAGS) -c -o libMatrixExponential_la-cexpma.lo `test -f 'cexpma.c' || echo '$(srcdir)/'`cexpma.c + +testMatrixExponential-testMatrixExponential.o: testMatrixExponential.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -MT testMatrixExponential-testMatrixExponential.o -MD -MP -MF $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo -c -o testMatrixExponential-testMatrixExponential.o `test -f 'testMatrixExponential.c' || echo '$(srcdir)/'`testMatrixExponential.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo $(DEPDIR)/testMatrixExponential-testMatrixExponential.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixExponential.c' object='testMatrixExponential-testMatrixExponential.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -c -o testMatrixExponential-testMatrixExponential.o `test -f 'testMatrixExponential.c' || echo '$(srcdir)/'`testMatrixExponential.c + +testMatrixExponential-testMatrixExponential.obj: testMatrixExponential.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -MT testMatrixExponential-testMatrixExponential.obj -MD -MP -MF $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo -c -o testMatrixExponential-testMatrixExponential.obj `if test -f 'testMatrixExponential.c'; then $(CYGPATH_W) 'testMatrixExponential.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixExponential.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixExponential-testMatrixExponential.Tpo $(DEPDIR)/testMatrixExponential-testMatrixExponential.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixExponential.c' object='testMatrixExponential-testMatrixExponential.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixExponential_CFLAGS) $(CFLAGS) -c -o testMatrixExponential-testMatrixExponential.obj `if test -f 'testMatrixExponential.c'; then $(CYGPATH_W) 'testMatrixExponential.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixExponential.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/expm/cexpma.c b/2.3-1/src/c/matrixOperations/expm/cexpma.c new file mode 100644 index 00000000..7da0fc70 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/cexpma.c @@ -0,0 +1,173 @@ +/* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixExponential.h" + +void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim) +{ + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + float fltExp = 0; + float fltS = 0; + float fltS2 = 0; + double fltCst = 0.5; + + + + floatComplex *pfltMatrixA = NULL; + floatComplex *pfltMatrixX = NULL; + floatComplex *pfltMatrixD = NULL; + floatComplex *pfltMatrixcX = NULL; + floatComplex *pfltMatrixcA = NULL; + floatComplex *pfltMatrixEye = NULL; + floatComplex *pfltMatrixTemp = NULL; + floatComplex *pfltMatrixTemp2 = NULL; + + + + + iSquare = _iLeadDim * _iLeadDim; + + pfltMatrixA = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixX = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixD = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixcX = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixcA = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixEye = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixTemp = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + pfltMatrixTemp2 = (floatComplex*)malloc(sizeof(floatComplex) * (unsigned int) iSquare); + + + /*// Scale A by power of 2 so that its norm is < 1/2 .*/ + sfrexps( cinfnorma( in, _iLeadDim, _iLeadDim) , &fltExp); + fltS = max(0, fltExp + 1); + fltS2 = spows(2.0f, fltS); + + /*A = A./2^s */ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixA[iIndex1] = crdivs ( in[iIndex1] , FloatComplex ( fltS2 , 0 )); + + + /* Pade approximation for exp(A) + //X = A */ + /*C2F(zcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ; + + + ceyea(pfltMatrixEye, _iLeadDim, _iLeadDim); + + /*cmulma ( & cfltCst , 1 ,1, + pfltMatrixA , _iLeadDim, _iLeadDim, + pfltMatrixcA);*/ + + /* cA = A * c */ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcA[iIndex1] = cmuls ( pfltMatrixA[iIndex1] , FloatComplex((float) fltCst , 0) ) ; + + /*E = Eye + cA*/ + + cadda (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ; + + /* D = Eye - cA */ + + cdiffa (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare,pfltMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + fltCst = fltCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + /*Temp = X */ + /*C2F(zcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ; + /* X = A * Temp; */ + + cmulma ( pfltMatrixA , _iLeadDim , _iLeadDim, + pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixX ); + /* cX = c * X */ + + /* cmulma ( & cfltCst , 1 ,1, + pfltMatrixX , _iLeadDim, _iLeadDim, + pfltMatrixcX);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcX[iIndex1] = cmuls ( pfltMatrixX[iIndex1] , FloatComplex((float) fltCst , 0) ) ; + + /* E = E + cX */ + + cadda ( out, iSquare , pfltMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /* D = D + cX */ + { + cadda ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ) ; + } + else /* D = D - cX */ + { + cdiffa ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ); + } + + /* Toggle iFlag */ + iFlag = !iFlag; + } + + /* Temp = E */ + /*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = out[iIndex1] ; + + /* E = D\E */ + cldivma ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out ) ; + + /*/ Undo scaling by repeated squaring */ + for(iLoop1 = 0 ; iLoop1 < fltS ; iLoop1++) + { + /*//Temp = E */ + /*//Temp2 = E */ + + /*C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne); + C2F(zcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pfltMatrixTemp [iIndex1] = out[iIndex1] ; + pfltMatrixTemp2[iIndex1] = out[iIndex1] ; + } + + /* E = E*E*/ + cmulma ( pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + + } + + free(pfltMatrixA); + free(pfltMatrixX); + free(pfltMatrixD); + free(pfltMatrixcX); + free(pfltMatrixcA); + free(pfltMatrixEye); + free(pfltMatrixTemp); + free(pfltMatrixTemp2); + + + + return ; +} diff --git a/2.3-1/src/c/matrixOperations/expm/dexpma.c b/2.3-1/src/c/matrixOperations/expm/dexpma.c new file mode 100644 index 00000000..d9b42327 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/dexpma.c @@ -0,0 +1,163 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixExponential.h" + +void dexpma (double* in, double* out, int _iLeadDim){ + + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + double dblExp = 0; + double dblS = 0; + double dblS2 = 0; + double dblCst = 0.5; + + double *pdblMatrixA = NULL;/*A'*/ + double *pdblMatrixX = NULL;/*X*/ + double *pdblMatrixD = NULL;/*D*/ + double *pdblMatrixcX = NULL;/*cX*/ + double *pdblMatrixcA = NULL;/*cX*/ + double *pdblMatrixEye = NULL;/*Eye*/ + double *pdblMatrixTemp = NULL;/*Temp*/ + double *pdblMatrixTemp2 = NULL;/*Temp2*/ + + + + iSquare = _iLeadDim * _iLeadDim; + + pdblMatrixA = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixX = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixD = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixcX = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixcA = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixEye = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixTemp = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + pdblMatrixTemp2 = (double*)malloc(sizeof(double) *(unsigned int) iSquare); + + + + /* Scale A by power of 2 so that its norm is < 1/2 .*/ + dfrexps( dinfnorma( in, _iLeadDim, _iLeadDim), &dblExp); + dblS = max(0, dblExp + 1); + dblS2 = dpows(2, dblS); + + /*A = A./2^s*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixA[iIndex1] = in[iIndex1] / dblS2 ; + + /* Pade approximation for exp(A)*/ + /*X = A */ + /*C2F(dcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ; + + deyea(pdblMatrixEye, _iLeadDim, _iLeadDim); + + + /*cA = A * c*/ + + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcA[iIndex1] = pdblMatrixA[iIndex1] * dblCst ; + + + /*E = Eye + cA*/ + dadda (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ; + + /*D = Eye - cA*/ + ddiffa (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare,pdblMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + /*Temp = X*/ + /*C2F(dcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ; + /*X = A * Temp;*/ + + dmulma ( pdblMatrixA , _iLeadDim , _iLeadDim, + pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixX ); + + /*cX = c * X*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcX[iIndex1] = pdblMatrixX[iIndex1] * dblCst ; + + /*E = E + cX*/ + dadda ( out, iSquare , pdblMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /*D = D + cX*/ + { + dadda ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ) ; + } + else /*D = D - cX*/ + { + ddiffa ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ); + } + + /*Toggle iFlag*/ + iFlag = !iFlag; + } + + /*Temp = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = out[iIndex1] ; + + /*E = D\E*/ + dldivma ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out ); + + /* Undo scaling by repeated squaring*/ + for(iLoop1 = 0 ; iLoop1 < dblS ; iLoop1++) + { + /*Temp = E*/ + /*Temp2 = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne); + C2F(dcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pdblMatrixTemp [iIndex1] = out[iIndex1] ; + pdblMatrixTemp2[iIndex1] = out[iIndex1] ; + } + /* E = E*E*/ + dmulma ( pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + } + + free(pdblMatrixA); + free(pdblMatrixX); + free(pdblMatrixD); + free(pdblMatrixcX); + free(pdblMatrixcA); + free(pdblMatrixEye); + free(pdblMatrixTemp); + free(pdblMatrixTemp2); + + + + return ; +} diff --git a/2.3-1/src/c/matrixOperations/expm/sexpma.c b/2.3-1/src/c/matrixOperations/expm/sexpma.c new file mode 100644 index 00000000..cd969981 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/sexpma.c @@ -0,0 +1,167 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixExponential.h" + +void sexpma (float* in, float* out, int _iLeadDim){ + + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + float fltExp = 0; + float fltS = 0; + float fltS2 = 0; + float fltCst = 0.5f; + double dblCst = 0.5; + + float *pfltMatrixA = NULL;/*A'*/ + float *pfltMatrixX = NULL;/*X*/ + float *pfltMatrixD = NULL;/*D*/ + float *pfltMatrixcX = NULL;/*cX*/ + float *pfltMatrixcA = NULL;/*cX*/ + float *pfltMatrixEye = NULL;/*Eye*/ + float *pfltMatrixTemp = NULL;/*Temp*/ + float *pfltMatrixTemp2 = NULL;/*Temp2*/ + + + + iSquare = _iLeadDim * _iLeadDim; + + pfltMatrixA = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixX = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixD = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixcX = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixcA = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixEye = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixTemp = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + pfltMatrixTemp2 = (float*)malloc(sizeof(float) *(unsigned int) iSquare); + + + + /* Scale A by power of 2 so that its norm is < 1/2 .*/ + sfrexps( sinfnorma( in, _iLeadDim, _iLeadDim), &fltExp); + fltS = max(0, fltExp + 1); + fltS2 = spows(2, fltS); + + /*A = A./2^s*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixA[iIndex1] = in[iIndex1] / fltS2; + + /* Pade approximation for exp(A)*/ + /*X = A */ + /*C2F(dcopy)(&iSquare, pfltMatrixA, &iOne, pfltMatrixX, &iOne );*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixX[iIndex1] = pfltMatrixA[iIndex1] ; + + seyea(pfltMatrixEye, _iLeadDim, _iLeadDim); + + + /*cA = A * c*/ + + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcA[iIndex1] = pfltMatrixA[iIndex1] * fltCst ; + + + /*E = Eye + cA*/ + sadda (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare, out ) ; + + /*D = Eye - cA*/ + sdiffa (pfltMatrixEye , iSquare, pfltMatrixcA ,iSquare,pfltMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + + + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + + dblCst += 0 ; + /*Temp = X*/ + /*C2F(dcopy)(&iSquare, pfltMatrixX, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = pfltMatrixX[iIndex1] ; + /*X = A * Temp;*/ + + smulma ( pfltMatrixA , _iLeadDim , _iLeadDim, + pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixX ); + + /*cX = c * X*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixcX[iIndex1] = pfltMatrixX[iIndex1] * (float) dblCst ; + + /*E = E + cX*/ + sadda ( out, iSquare , pfltMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /*D = D + cX*/ + { + sadda ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ) ; + } + else /*D = D - cX*/ + { + sdiffa ( pfltMatrixD, iSquare , pfltMatrixcX , iSquare , pfltMatrixD ); + } + + /*Toggle iFlag*/ + iFlag = !iFlag; + } + + /*Temp = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pfltMatrixTemp[iIndex1] = out[iIndex1] ; + + /*E = D\E*/ + sldivma ( pfltMatrixD , _iLeadDim , _iLeadDim , pfltMatrixTemp , _iLeadDim , _iLeadDim , out ); + + /* Undo scaling by repeated squaring*/ + for(iLoop1 = 0 ; iLoop1 < fltS ; iLoop1++) + { + /*Temp = E*/ + /*Temp2 = E*/ + /*C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp, &iOne); + C2F(dcopy)(&iSquare, out, &iOne, pfltMatrixTemp2, &iOne);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pfltMatrixTemp [iIndex1] = out[iIndex1] ; + pfltMatrixTemp2[iIndex1] = out[iIndex1] ; + } + /* E = E*E*/ + smulma ( pfltMatrixTemp , _iLeadDim , _iLeadDim, + pfltMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + } + + free(pfltMatrixA); + free(pfltMatrixX); + free(pfltMatrixD); + free(pfltMatrixcX); + free(pfltMatrixcA); + free(pfltMatrixEye); + free(pfltMatrixTemp); + free(pfltMatrixTemp2); + + + + return ; +} diff --git a/2.3-1/src/c/matrixOperations/expm/testMatrixExponential.c b/2.3-1/src/c/matrixOperations/expm/testMatrixExponential.c new file mode 100644 index 00000000..278c36c8 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/testMatrixExponential.c @@ -0,0 +1,570 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixExponential.h" + + +#define LEADDIM 10 + +#define DMATRIX_IN {0.15869047446176410,0.80895681912079453,0.72621259605512023,0.18993748771026731,\ + 0.43964602379128337,0.37921421090140939,0.95195201179012656,0.59145097108557820,\ + 0.70597065938636661,0.62873698258772492,\ +0.62407150492072105,0.68317985069006681,0.70999773032963276,0.25839814636856318,\ + 0.65407369285821915,0.76687160786241293,0.71278580836951733,0.68067426700145006,\ + 0.70181696489453316,0.28785153012722731,\ +0.63760355720296502,0.03401931514963508,0.47457459988072515,0.09878737432882190,\ + 0.58781063789501786,0.60066213225945830,0.11923700617626309,0.07392961112782359,\ + 0.40879997471347451,0.3292048736475408,\ +0.42704886104911566,0.23805456422269344,0.9438692079856992,0.06199027225375175,\ + 0.60208318661898375,0.78567356057465076,0.50091631803661585,0.94336947053670883,\ + 0.06362213846296072,0.47192330472171307,\ +0.10716815060004592,0.94920115964487195,0.14596485672518611,0.04034968325868249,\ + 0.04535020282492042,0.73871155502274632,0.32900535268709064,0.12863306934013963,\ + 0.06573933875188231,0.33537696348503232,\ +0.23822965659201145,0.21827886346727610,0.07141010463237762,0.74001471605151892,\ + 0.20294443331658840,0.55442603398114443,0.48089468106627464,0.20190807711333036,\ + 0.53310041315853596,0.55530697200447321,\ +0.94629473658278584,0.61546878470107913,0.67337385797873139,0.61626600986346602,\ + 0.78442738251760602,0.99291495559737086,0.33036959776654840,0.19693034281954169,\ + 0.03315818728879094,0.11960808141157031,\ +0.45766852516680956,0.83135433867573738,0.65369247179478407,0.6583583448082209,\ + 0.26375361625105143,0.97574284672737122,0.63044753577560186,0.89286901615560055,\ + 0.31578356493264437,0.76139996573328972,\ +0.89644787041470408,0.77340125897899270,0.19968961318954825,0.25145971449092031,\ + 0.43832763982936740,0.37096222722902894,0.21171907847747207,0.46179189579561353,\ + 0.37858232436701655,0.47909884760156274,\ +0.44384705275297165,0.4244190966710448,0.60141251794993877,0.38433500844985247,\ + 0.86648589745163918,0.30322382133454084,0.44860231317579746,0.62512917164713144,\ + 0.46195234358310699,0.28169692959636450} + +#define DMATRIX_RESULT {14.6458099031118518,15.9879935334969154,14.5023146230340352,9.79104027026660262,\ + 13.658147977601745,18.2826677794023276,13.9913488019182726,13.0555850244756648,\ + 11.2702097163264696,12.2080852641231488,\ +14.9576657268129818,18.0415870145381838,15.4577532112657572,10.6060207869925502,\ + 14.6987916130120198,19.9917861348452170,14.8484467294549827,14.0994958596124,\ + 12.1294313366477713,12.8836800651605152,\ +7.72729140087719646,8.27571528291814396,8.78222511899259928,5.22537042408334251,\ + 7.61718988429527233,10.1106593547443495,7.22727291477849576,6.72646688774223733,\ + 6.21430065514425589,6.69442204331610213,\ +11.8618893865302528,13.2731189359057637,12.8373872935372706,9.52692469532374631,\ + 11.9056327368823247,16.3654355264039921,11.8674243780595265,11.7206072002431814,\ + 9.24712051368910970,10.6966525674175159,\ +7.25089971320127891,8.98673751651268127,7.49831172728240691,5.29368504368777693,\ + 8.12154956830077346,10.3089262075282218,7.4337348502224856,6.83888206810676191,\ + 5.87125977419815737,6.5321378683758375,\ +9.25854069422946502,10.4059421461299539,9.47515410794143342,7.263789985253827,\ + 9.16034813421007321,13.6353552693330933,9.3726649654333336,8.83558176180042132,\ + 7.6055387753197277,8.4871270614444292,\ +12.6878667266786511,14.1417583108624711,13.0448499416136254,9.182764814582713,\ + 12.4852121681423256,17.073953108953809,13.2550267101027224,11.3640159258193041,\ + 9.6279844249894015,10.6765282334921068,\ +16.0691497196859565,18.4667994666424704,16.975871456346809,12.083598083627443,\ + 15.7522021028722747,22.0489520587189212,16.1322911282790358,16.8044904865300744,\ + 12.7829232118433556,14.5730443462997599,\ +11.943978463537455,13.6259118560125358,11.8068134298221956,8.21687415305816771,\ + 11.4127920042158735,15.2296090993128281,11.3826577511842082,11.0976684273648587,\ + 10.3857413785092909,10.2894980707345525,\ +11.5843985401712821,13.2781579371486753,12.1725305229437293,8.37850128011447204,\ + 11.8141382209783163,15.4022074994757734,11.484608766021573,11.1535660239869383,\ + 9.31343988645433285,11.1349864749012912} + + + + + +#define ZRMATRIX_IN {0.21132486546412110,0.56084860628470778,0.30760907428339124,0.50153415976092219, \ + 0.28064980218186975,0.40948254754766822,0.38737787725403905,0.53762298030778766,\ + 0.58787201577797532,0.64885628735646605,\ +0.75604385416954756,0.66235693730413914,0.93296162132173777,0.43685875833034515,\ + 0.12800584640353918,0.87841258011758327,0.92228986788541079,0.11999255046248436,\ + 0.48291792999953032,0.99231909401714802,\ +0.00022113462910056,0.72635067673400044,0.21460078610107303,0.26931248093023896,\ + 0.77831285959109664,0.11383596854284406,0.94881842611357570,0.2256303490139544,\ + 0.22328650346025825,0.05004197778180242,\ +0.33032709173858166,0.19851438421756029,0.31264199689030647,0.63257448654621840,\ + 0.21190304495394230,0.19983377400785685,0.34353372454643250,0.62740930821746588,\ + 0.84008856676518917,0.74855065811425447,\ +0.66538110421970487,0.54425731627270579,0.36163610080257058,0.40519540151581168,\ + 0.11213546665385365,0.56186607433483005,0.37601187312975526,0.76084325974807143,\ + 0.12059959070757031,0.41040589986369014,\ +0.62839178834110498,0.23207478970289230,0.2922266637906432,0.91847078315913677,\ + 0.68568959552794695,0.58961773291230202,0.73409405630081892,0.04855662025511265,\ + 0.28553641680628061,0.60845263302326202,\ +0.84974523587152362,0.23122371966019273,0.56642488157376647,0.04373343335464597,\ + 0.15312166837975383,0.68539796629920602,0.26157614728435874,0.67239497276023030,\ + 0.86075146449729800,0.85442108893766999,\ +0.68573101982474327,0.21646326314657927,0.48264719732105732,0.48185089323669672,\ + 0.69708506017923355,0.89062247332185507,0.49934938363730907,0.20171726960688829,\ + 0.84941016510128975,0.06426467280834913,\ +0.87821648130193353,0.88338878145441413,0.33217189135029912,0.26395560009405017,\ + 0.84155184263363481,0.50422128057107329,0.26385784195736051,0.39115739194676280,\ + 0.52570608118548989,0.82790829380974174,\ +0.06837403681129217,0.65251349471509457,0.59350947011262178,0.41481037065386772,\ + 0.40620247554033995,0.34936154074966908,0.52535630855709314,0.83003165572881699,\ + 0.99312098976224661,0.92623437754809856} + +#define ZIMATRIX_IN {0.56672112690284848,0.73956565884873271,0.02587099233642220,0.70648676296696067,\ + 0.96770532103255391,0.42568723810836673,0.18711117887869477,0.21240556007251143,\ + 0.69127879338338971,0.13049928424879909,\ +0.57116389367729425,0.00371731072664261,0.51744682248681784,0.52114724926650524,\ + 0.50685344357043505,0.24615605548024178,0.01895748358219862,0.57950199581682682,\ + 0.76568587962538004,0.96820035576820374,\ +0.81601104838773608,0.59005728596821427,0.39168732380494475,0.28704008506610990,\ + 0.52329764096066356,0.92295324662700295,0.84335647663101554,0.26281475694850087,\ + 0.35726496530696750,0.6561381467618048,\ +0.05689279362559319,0.3096467358991504,0.24135384149849415,0.65027950797230005,\ + 0.5596947595477104,0.10007458087056875,0.07485948316752911,0.43609866220504045,\ + 0.76933998242020607,0.24455389659851789,\ +0.55959366867318749,0.25522057106718421,0.50644348980858922,0.08813347620889544,\ + 0.56173070007935166,0.46782181179150939,0.85328151332214475,0.91105451015755534,\ + 0.54776339093223214,0.52831235667690635,\ +0.12493403162807226,0.62518793903291225,0.42361020017415285,0.44987633451819420,\ + 0.46817600261420012,0.39504976756870747,0.01245901081711054,0.80826673656702042,\ + 0.09622887428849936,0.84689256362617016,\ +0.72792222863063216,0.11574173765257001,0.28937275288626552,0.72272530803456903,\ + 0.77945467224344611,0.03661171020939946,0.18675393564626575,0.81026530498638749,\ + 0.95611717319115996,0.78766220854595304,\ +0.26777664758265018,0.61170040909200907,0.08879321813583374,0.89767962601035833,\ + 0.79010718129575253,0.51753685344010592,0.49205840751528740,0.25904283951967955,\ + 0.22074085660278797,0.12620826158672571,\ +0.54653349192813039,0.67839562846347690,0.62128817522898316,0.24278218811377883,\ + 0.98085420625284314,0.83254515705630183,0.74896081397309899,0.41390872886404395,\ + 0.01432593585923314,0.78838609857484698,\ +0.98854076582938433,0.33200952783226967,0.34549844544380903,0.43377211131155491,\ + 0.81870661024004221,0.61048321425914764,0.94149570073932409,0.35999277792870998,\ + 0.81914897728711367,0.34530424699187279} + + +#define ZRMATRIX_RESULT {4.6052332809216896,2.16205411267794823,1.12245312965776556,4.0468190853821735,\ + 7.29705295628955231,2.45894799152591625,2.29331674633863614,4.21571156291592253,\ + 2.81922686558935887,2.348781949769843,\ +2.07401297354815162,1.50063692688995753,0.25219828236411757,2.7063265188290884,\ + 6.35812780561968260,0.67264506810224134,0.79079814568186024,2.91747981321864280,\ + 1.01032692983832129,0.75975015828076931,\ +7.04077899650083694,5.39363072316827363,4.99449464719530045,6.79878933472462954,\ + 11.2977866849707205,5.7026161792862045,6.09443833294921244,7.35970702338152272,\ + 6.14030297304667272,5.80227288585002476,\ +1.52422494456658053,0.15792523935350228,-0.39437456229879331,3.21063571532312331,\ + 4.72654937095295491,0.19681048033039794,0.13926710536989889,2.4098033377935764,\ + 1.19110231590601412,0.24431206393184518,\ +5.84910802491279558,3.67968516288822922,2.73879619563976862,5.69547375492497387,\ + 10.2284804678743431,4.40378197582331143,3.9855513762320007,6.24858736599414133,\ + 4.57057059205936156,4.19331143449899635,\ +2.84423960711997825,0.91341486330902766,0.32799575263405639,3.63130361353437925,\ + 6.73358898182897025,2.44092642244158631,1.4035651670524776,3.29646069585033841,\ + 1.63804041671370615,1.34065096546340268,\ +5.04689360696997724,2.58451417966281571,1.89915292921285772,4.62170835433455451,\ + 9.05019265678329887,3.33670002112993291,3.66038974983755372,5.62296495186113443,\ + 4.04432332701467434,3.48415716881126114,\ +2.99051528256943167,0.76077291642727529,0.19995186822386554,2.96972391032047955,\ + 6.60462877127714787,1.8346028052798535,1.31621250911818244,3.73816126628208467,\ + 1.3788533261260996,0.30973924698106181,\ +5.20595600060592734,3.44646883779368096,1.85946748567920750,5.1361216710529769,\ + 10.0941765681228333,3.49429925842045552,3.05021742013193098,5.4348094549241184,\ + 4.51765668386982977,3.40850797720926035,\ +4.65702831667450212,3.03706964016556746,2.06940591125521856,5.11047315752830578,\ + 9.94379845012778674,3.3321507049026704,3.29919175160893818,5.94111235727490428,\ + 4.22429837741492253,4.41612421969640145} + +#define ZIMATRIX_RESULT {-14.2670217568608670,-12.454640354285063,-11.2804810864205063,-12.2724799117031509,\ + -14.2468231668880438,-13.7336716491454212,-13.4126704881317167,-13.2354295209306141,\ + -15.0748008268599314,-16.4106582082002141,\ +-18.1383938627890586,-16.2500310962210612,-13.6080240801173602,-16.1094229201551187,\ + -18.8440235801764437,-17.4411014766214336,-16.8096205594578301,-16.4844610002227725,\ + -18.6024277051838922,-19.7565384964549153,\ +-13.6088148145822956,-12.746762149308113,-10.9388281270062464,-12.2279241359128505,\ + -13.2072598928012983,-13.2417837783338328,-12.6472077791728861,-12.2778413042734709,\ + -14.8521542656410972,-15.7031049148228732,\ +-13.2144981163630746,-11.2231448799035274,-9.7632306445459864,-11.1681914913523084,\ + -13.2326349218083568,-12.3373828754640584,-11.7842111257382829,-11.8870664403988826,\ + -13.3125999502667849,-14.6665812584015534,\ +-14.2784445192169489,-13.0211070334450945,-11.1550881344005877,-12.7744646170515193,\ + -13.8646425595775469,-13.6955906712953759,-12.98118927813419,-12.5125330823426655,\ + -15.2470302805889251,-16.6299797243330687,\ +-15.3135193060880574,-12.8989039623516373,-11.1097185418698405,-12.9878481756480575,\ + -15.1819592065246791,-14.1554345301917017,-13.7019470831634962,-13.1000905274159241,\ + -15.697504333561957,-16.4727155095115592,\ +-16.6151865381969657,-15.0301220873079888,-13.119515101239017,-14.6038902499774128,\ + -16.5465022870658487,-16.2745681097221642,-15.5790325754692791,-14.9778105214080721,\ + -17.5880407064706752,-18.9858728410024717,\ +-15.2244202423134851,-12.9437967685452655,-11.4320003274904263,-12.6340981883688794,\ + -15.2648705712828949,-14.0427697860698029,-13.5757724082098221,-13.5147279252801411,\ + -15.9307999370437052,-16.8057661616885916,\ +-18.255930649471658,-16.1956269359019345,-13.6756135725252594,-16.3611958886634667,\ + -18.0721805983153097,-17.0517408001458151,-16.231614445430882,-16.4843630200203357,\ + -19.7691884354979948,-20.3871124127432672,\ +-18.2105493706955421,-16.9125659016652854,-14.4302205379609418,-16.7267447227195518,\ + -18.7135188739136353,-17.6467699531147559,-16.5820479292089722,-17.0861611432949942,\ + -19.7638794191151916,-21.2748129090505991} + +#define FMATRIX_IN {0.15869047446176410f,0.80895681912079453f,0.72621259605512023f,0.18993748771026731f,\ + 0.43964602379128337f,0.37921421090140939f,0.95195201179012656f,0.59145097108557820f,\ + 0.70597065938636661f,0.62873698258772492f,\ +0.62407150492072105f,0.68317985069006681f,0.70999773032963276f,0.25839814636856318f,\ + 0.65407369285821915f,0.76687160786241293f,0.71278580836951733f,0.68067426700145006f,\ + 0.70181696489453316f,0.28785153012722731f,\ +0.63760355720296502f,0.03401931514963508f,0.47457459988072515f,0.09878737432882190f,\ + 0.58781063789501786f,0.60066213225945830f,0.11923700617626309f,0.07392961112782359f,\ + 0.40879997471347451f,0.3292048736475408f,\ +0.42704886104911566f,0.23805456422269344f,0.9438692079856992f,0.06199027225375175f,\ + 0.60208318661898375f,0.78567356057465076f,0.50091631803661585f,0.94336947053670883f,\ + 0.06362213846296072f,0.47192330472171307f,\ +0.10716815060004592f,0.94920115964487195f,0.14596485672518611f,0.04034968325868249f,\ + 0.04535020282492042f,0.73871155502274632f,0.32900535268709064f,0.12863306934013963f,\ + 0.06573933875188231f,0.33537696348503232f,\ +0.23822965659201145f,0.21827886346727610f,0.07141010463237762f,0.74001471605151892f,\ + 0.20294443331658840f,0.55442603398114443f,0.48089468106627464f,0.20190807711333036f,\ + 0.53310041315853596f,0.55530697200447321f,\ +0.94629473658278584f,0.61546878470107913f,0.67337385797873139f,0.61626600986346602f,\ + 0.78442738251760602f,0.99291495559737086f,0.33036959776654840f,0.19693034281954169f,\ + 0.03315818728879094f,0.11960808141157031f,\ +0.45766852516680956f,0.83135433867573738f,0.65369247179478407f,0.6583583448082209f,\ + 0.26375361625105143f,0.97574284672737122f,0.63044753577560186f,0.89286901615560055f,\ + 0.31578356493264437f,0.76139996573328972f,\ +0.89644787041470408f,0.77340125897899270f,0.19968961318954825f,0.25145971449092031f,\ + 0.43832763982936740f,0.37096222722902894f,0.21171907847747207f,0.46179189579561353f,\ + 0.37858232436701655f,0.47909884760156274f,\ +0.44384705275297165f,0.4244190966710448f,0.60141251794993877f,0.38433500844985247f,\ + 0.86648589745163918f,0.30322382133454084f,0.44860231317579746f,0.62512917164713144f,\ + 0.46195234358310699f,0.28169692959636450f} + +#define FMATRIX_RESULT {14.6458099031118518f,15.9879935334969154f,14.5023146230340352f,9.79104027026660262f,\ + 13.658147977601745f,18.2826677794023276f,13.9913488019182726f,13.0555850244756648f,\ + 11.2702097163264696f,12.2080852641231488f,\ +14.9576657268129818f,18.0415870145381838f,15.4577532112657572f,10.6060207869925502f,\ + 14.6987916130120198f,19.9917861348452170f,14.8484467294549827f,14.0994958596124f,\ + 12.1294313366477713f,12.8836800651605152f,\ +7.72729140087719646f,8.27571528291814396f,8.78222511899259928f,5.22537042408334251f,\ + 7.61718988429527233f,10.1106593547443495f,7.22727291477849576f,6.72646688774223733f,\ + 6.21430065514425589f,6.69442204331610213f,\ +11.8618893865302528f,13.2731189359057637f,12.8373872935372706f,9.52692469532374631f,\ + 11.9056327368823247f,16.3654355264039921f,11.8674243780595265f,11.7206072002431814f,\ + 9.24712051368910970f,10.6966525674175159f,\ +7.25089971320127891f,8.98673751651268127f,7.49831172728240691f,5.29368504368777693f,\ + 8.12154956830077346f,10.3089262075282218f,7.4337348502224856f,6.83888206810676191f,\ + 5.87125977419815737f,6.5321378683758375f,\ +9.25854069422946502f,10.4059421461299539f,9.47515410794143342f,7.263789985253827f,\ + 9.16034813421007321f,13.6353552693330933f,9.3726649654333336f,8.83558176180042132f,\ + 7.6055387753197277f,8.4871270614444292f,\ +12.6878667266786511f,14.1417583108624711f,13.0448499416136254f,9.182764814582713f,\ + 12.4852121681423256f,17.073953108953809f,13.2550267101027224f,11.3640159258193041f,\ + 9.6279844249894015f,10.6765282334921068f,\ +16.0691497196859565f,18.4667994666424704f,16.975871456346809f,12.083598083627443f,\ + 15.7522021028722747f,22.0489520587189212f,16.1322911282790358f,16.8044904865300744f,\ + 12.7829232118433556f,14.5730443462997599f,\ +11.943978463537455f,13.6259118560125358f,11.8068134298221956f,8.21687415305816771f,\ + 11.4127920042158735f,15.2296090993128281f,11.3826577511842082f,11.0976684273648587f,\ + 10.3857413785092909f,10.2894980707345525f,\ +11.5843985401712821f,13.2781579371486753f,12.1725305229437293f,8.37850128011447204f,\ + 11.8141382209783163f,15.4022074994757734f,11.484608766021573f,11.1535660239869383f,\ + 9.31343988645433285f,11.1349864749012912f} + + + + + +#define CRMATRIX_IN {0.21132486546412110f,0.56084860628470778f,0.30760907428339124f,0.50153415976092219f, \ + 0.28064980218186975f,0.40948254754766822f,0.38737787725403905f,0.53762298030778766f,\ + 0.58787201577797532f,0.64885628735646605f,\ +0.75604385416954756f,0.66235693730413914f,0.93296162132173777f,0.43685875833034515f,\ + 0.12800584640353918f,0.87841258011758327f,0.92228986788541079f,0.11999255046248436f,\ + 0.48291792999953032f,0.99231909401714802f,\ +0.00022113462910056f,0.72635067673400044f,0.21460078610107303f,0.26931248093023896f,\ + 0.77831285959109664f,0.11383596854284406f,0.94881842611357570f,0.2256303490139544f,\ + 0.22328650346025825f,0.05004197778180242f,\ +0.33032709173858166f,0.19851438421756029f,0.31264199689030647f,0.63257448654621840f,\ + 0.21190304495394230f,0.19983377400785685f,0.34353372454643250f,0.62740930821746588f,\ + 0.84008856676518917f,0.74855065811425447f,\ +0.66538110421970487f,0.54425731627270579f,0.36163610080257058f,0.40519540151581168f,\ + 0.11213546665385365f,0.56186607433483005f,0.37601187312975526f,0.76084325974807143f,\ + 0.12059959070757031f,0.41040589986369014f,\ +0.62839178834110498f,0.23207478970289230f,0.2922266637906432f,0.91847078315913677f,\ + 0.68568959552794695f,0.58961773291230202f,0.73409405630081892f,0.04855662025511265f,\ + 0.28553641680628061f,0.60845263302326202f,\ +0.84974523587152362f,0.23122371966019273f,0.56642488157376647f,0.04373343335464597f,\ + 0.15312166837975383f,0.68539796629920602f,0.26157614728435874f,0.67239497276023030f,\ + 0.86075146449729800f,0.85442108893766999f,\ +0.68573101982474327f,0.21646326314657927f,0.48264719732105732f,0.48185089323669672f,\ + 0.69708506017923355f,0.89062247332185507f,0.49934938363730907f,0.20171726960688829f,\ + 0.84941016510128975f,0.06426467280834913f,\ +0.87821648130193353f,0.88338878145441413f,0.33217189135029912f,0.26395560009405017f,\ + 0.84155184263363481f,0.50422128057107329f,0.26385784195736051f,0.39115739194676280f,\ + 0.52570608118548989f,0.82790829380974174f,\ +0.06837403681129217f,0.65251349471509457f,0.59350947011262178f,0.41481037065386772f,\ + 0.40620247554033995f,0.34936154074966908f,0.52535630855709314f,0.83003165572881699f,\ + 0.99312098976224661f,0.92623437754809856f} + +#define CIMATRIX_IN {0.56672112690284848f,0.73956565884873271f,0.02587099233642220f,0.70648676296696067f,\ + 0.96770532103255391f,0.42568723810836673f,0.18711117887869477f,0.21240556007251143f,\ + 0.69127879338338971f,0.13049928424879909f,\ +0.57116389367729425f,0.00371731072664261f,0.51744682248681784f,0.52114724926650524f,\ + 0.50685344357043505f,0.24615605548024178f,0.01895748358219862f,0.57950199581682682f,\ + 0.76568587962538004f,0.96820035576820374f,\ +0.81601104838773608f,0.59005728596821427f,0.39168732380494475f,0.28704008506610990f,\ + 0.52329764096066356f,0.92295324662700295f,0.84335647663101554f,0.26281475694850087f,\ + 0.35726496530696750f,0.6561381467618048f,\ +0.05689279362559319f,0.3096467358991504f,0.24135384149849415f,0.65027950797230005f,\ + 0.5596947595477104f,0.10007458087056875f,0.07485948316752911f,0.43609866220504045f,\ + 0.76933998242020607f,0.24455389659851789f,\ +0.55959366867318749f,0.25522057106718421f,0.50644348980858922f,0.08813347620889544f,\ + 0.56173070007935166f,0.46782181179150939f,0.85328151332214475f,0.91105451015755534f,\ + 0.54776339093223214f,0.52831235667690635f,\ +0.12493403162807226f,0.62518793903291225f,0.42361020017415285f,0.44987633451819420f,\ + 0.46817600261420012f,0.39504976756870747f,0.01245901081711054f,0.80826673656702042f,\ + 0.09622887428849936f,0.84689256362617016f,\ +0.72792222863063216f,0.11574173765257001f,0.28937275288626552f,0.72272530803456903f,\ + 0.77945467224344611f,0.03661171020939946f,0.18675393564626575f,0.81026530498638749f,\ + 0.95611717319115996f,0.78766220854595304f,\ +0.26777664758265018f,0.61170040909200907f,0.08879321813583374f,0.89767962601035833f,\ + 0.79010718129575253f,0.51753685344010592f,0.49205840751528740f,0.25904283951967955f,\ + 0.22074085660278797f,0.12620826158672571f,\ +0.54653349192813039f,0.67839562846347690f,0.62128817522898316f,0.24278218811377883f,\ + 0.98085420625284314f,0.83254515705630183f,0.74896081397309899f,0.41390872886404395f,\ + 0.01432593585923314f,0.78838609857484698f,\ +0.98854076582938433f,0.33200952783226967f,0.34549844544380903f,0.43377211131155491f,\ + 0.81870661024004221f,0.61048321425914764f,0.94149570073932409f,0.35999277792870998f,\ + 0.81914897728711367f,0.34530424699187279f} + + +#define CRMATRIX_RESULT {4.6052332809216896f,2.16205411267794823f,1.12245312965776556f,4.0468190853821735f,\ + 7.29705295628955231f,2.45894799152591625f,2.29331674633863614f,4.21571156291592253f,\ + 2.81922686558935887f,2.348781949769843f,\ +2.07401297354815162f,1.50063692688995753f,0.25219828236411757f,2.7063265188290884f,\ + 6.35812780561968260f,0.67264506810224134f,0.79079814568186024f,2.91747981321864280f,\ + 1.01032692983832129f,0.75975015828076931f,\ +7.04077899650083694f,5.39363072316827363f,4.99449464719530045f,6.79878933472462954f,\ + 11.2977866849707205f,5.7026161792862045f,6.09443833294921244f,7.35970702338152272f,\ + 6.14030297304667272f,5.80227288585002476f,\ +1.52422494456658053f,0.15792523935350228f,-0.39437456229879331f,3.21063571532312331f,\ + 4.72654937095295491f,0.19681048033039794f,0.13926710536989889f,2.4098033377935764f,\ + 1.19110231590601412f,0.24431206393184518f,\ +5.84910802491279558f,3.67968516288822922f,2.73879619563976862f,5.69547375492497387f,\ + 10.2284804678743431f,4.40378197582331143f,3.9855513762320007f,6.24858736599414133f,\ + 4.57057059205936156f,4.19331143449899635f,\ +2.84423960711997825f,0.91341486330902766f,0.32799575263405639f,3.63130361353437925f,\ + 6.73358898182897025f,2.44092642244158631f,1.4035651670524776f,3.29646069585033841f,\ + 1.63804041671370615f,1.34065096546340268f,\ +5.04689360696997724f,2.58451417966281571f,1.89915292921285772f,4.62170835433455451f,\ + 9.05019265678329887f,3.33670002112993291f,3.66038974983755372f,5.62296495186113443f,\ + 4.04432332701467434f,3.48415716881126114f,\ +2.99051528256943167f,0.76077291642727529f,0.19995186822386554f,2.96972391032047955f,\ + 6.60462877127714787f,1.8346028052798535f,1.31621250911818244f,3.73816126628208467f,\ + 1.3788533261260996f,0.30973924698106181f,\ +5.20595600060592734f,3.44646883779368096f,1.85946748567920750f,5.1361216710529769f,\ + 10.0941765681228333f,3.49429925842045552f,3.05021742013193098f,5.4348094549241184f,\ + 4.51765668386982977f,3.40850797720926035f,\ +4.65702831667450212f,3.03706964016556746f,2.06940591125521856f,5.11047315752830578f,\ + 9.94379845012778674f,3.3321507049026704f,3.29919175160893818f,5.94111235727490428f,\ + 4.22429837741492253f,4.41612421969640145f} + +#define CIMATRIX_RESULT {-14.2670217568608670f,-12.454640354285063f,-11.2804810864205063f,-12.2724799117031509f,\ + -14.2468231668880438f,-13.7336716491454212f,-13.4126704881317167f,-13.2354295209306141f,\ + -15.0748008268599314f,-16.4106582082002141f,\ +-18.1383938627890586f,-16.2500310962210612f,-13.6080240801173602f,-16.1094229201551187f,\ + -18.8440235801764437f,-17.4411014766214336f,-16.8096205594578301f,-16.4844610002227725f,\ + -18.6024277051838922f,-19.7565384964549153f,\ +-13.6088148145822956f,-12.746762149308113f,-10.9388281270062464f,-12.2279241359128505f,\ + -13.2072598928012983f,-13.2417837783338328f,-12.6472077791728861f,-12.2778413042734709f,\ + -14.8521542656410972f,-15.7031049148228732f,\ +-13.2144981163630746f,-11.2231448799035274f,-9.7632306445459864f,-11.1681914913523084f,\ + -13.2326349218083568f,-12.3373828754640584f,-11.7842111257382829f,-11.8870664403988826f,\ + -13.3125999502667849f,-14.6665812584015534f,\ +-14.2784445192169489f,-13.0211070334450945f,-11.1550881344005877f,-12.7744646170515193f,\ + -13.8646425595775469f,-13.6955906712953759f,-12.98118927813419f,-12.5125330823426655f,\ + -15.2470302805889251f,-16.6299797243330687f,\ +-15.3135193060880574f,-12.8989039623516373f,-11.1097185418698405f,-12.9878481756480575f,\ + -15.1819592065246791f,-14.1554345301917017f,-13.7019470831634962f,-13.1000905274159241f,\ + -15.697504333561957f,-16.4727155095115592f,\ +-16.6151865381969657f,-15.0301220873079888f,-13.119515101239017f,-14.6038902499774128f,\ + -16.5465022870658487f,-16.2745681097221642f,-15.5790325754692791f,-14.9778105214080721f,\ + -17.5880407064706752f,-18.9858728410024717f,\ +-15.2244202423134851f,-12.9437967685452655f,-11.4320003274904263f,-12.6340981883688794f,\ + -15.2648705712828949f,-14.0427697860698029f,-13.5757724082098221f,-13.5147279252801411f,\ + -15.9307999370437052f,-16.8057661616885916f,\ +-18.255930649471658f,-16.1956269359019345f,-13.6756135725252594f,-16.3611958886634667f,\ + -18.0721805983153097f,-17.0517408001458151f,-16.231614445430882f,-16.4843630200203357f,\ + -19.7691884354979948f,-20.3871124127432672f,\ +-18.2105493706955421f,-16.9125659016652854f,-14.4302205379609418f,-16.7267447227195518f,\ + -18.7135188739136353f,-17.6467699531147559f,-16.5820479292089722f,-17.0861611432949942f,\ + -19.7638794191151916f,-21.2748129090505991f} + +/* FIXME: assert are 1e04 and 1e14 */ +static void sexpmaTest (void ) { + + int i = 0 ; + + float in[] = FMATRIX_IN ; + + float result[] = FMATRIX_RESULT ; + + float out[LEADDIM*LEADDIM] ; + + float mon_test[9]={4,8,3,2,8,4,3,4,5}; + float result_mon_test[9]={179660.90104359941324219f,452187.79172967246267945f,273148.88425553269917145f, + 163436.47016010177321732f,411353.63271151197841391f,248489.23907714022789150f, + 138776.82498170930193737f,349268.28353250800864771f,210989.61389596699154936f}; + float out_mon_test[9] ; + + sexpma ( in, out, LEADDIM) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-6 ) ; + } + + sexpma(mon_test,out_mon_test,3); + for ( i = 0 ; i < 9 ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out_mon_test[i] - result_mon_test[i] ) / fabs( out_mon_test[i]) < 3e-5 ) ; + } +} + + + +static void dexpmaTest (void ) { + + int i = 0 ; + + double in[] = DMATRIX_IN ; + + double result[] = DMATRIX_RESULT ; + + double out[LEADDIM*LEADDIM] ; + + + dexpma ( in, out, LEADDIM) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-14 ) ; + } +} + + +static void cexpmaTest ( void) { + + int i = 0 ; + + float tRealIn [] = CRMATRIX_IN ; + float tImagIn [] = CIMATRIX_IN ; + + + + float tRealResult [] = CRMATRIX_RESULT ; + float tImagResult [] = CIMATRIX_RESULT ; + + floatComplex out[LEADDIM*LEADDIM ] ; + + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + cexpma ( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t + %e\t * i result : %e\t + %e\t * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 3e-16 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-4 ); + + + if ( cimags(out[i]) < 3e-16 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } +} + + + +static void zexpmaTest ( void) { + + int i = 0 ; + + double tRealIn [] = ZRMATRIX_IN ; + double tImagIn [] = ZIMATRIX_IN ; + + + + double tRealResult [] = ZRMATRIX_RESULT ; + double tImagResult [] = ZIMATRIX_RESULT ; + + doubleComplex out[LEADDIM*LEADDIM ] ; + + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + zexpma ( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t + %e\t * i result : %e\t + %e\t * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 3e-16 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-13 ); + + + if ( zimags(out[i]) < 3e-16 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-14) ; + + } +} + + +static int testExponential(void) { + + printf("\n>>>> Matrix Exponential Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dexpmaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sexpmaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cexpmaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zexpmaTest(); + + return 0; +} + + + +int main(void) { + assert(testExponential() == 0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj b/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj new file mode 100644 index 00000000..bac19e9a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1A4DDF0E-CF14-43FF-BBA3-6928EF6D1072} + testMatrixExponential + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters b/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters new file mode 100644 index 00000000..14a23849 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/test_MatrixExponential/testMatrixExponential.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/expm/zexpma.c b/2.3-1/src/c/matrixOperations/expm/zexpma.c new file mode 100644 index 00000000..3de35e02 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/expm/zexpma.c @@ -0,0 +1,178 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixExponential.h" + +void zexpma(doubleComplex * in, doubleComplex * out, int _iLeadDim) +{ + int iIndex1 = 0; + int iMax = 0; + int iFlag = 0; + int iLoop1 = 0; + int iSquare = 0; + + + double dblExp = 0; + double dblS = 0; + double dblS2 = 0; + double dblCst = 0.5; + + doubleComplex zdblCst ; + + doubleComplex *pdblMatrixA = NULL; + doubleComplex *pdblMatrixX = NULL; + doubleComplex *pdblMatrixD = NULL; + doubleComplex *pdblMatrixcX = NULL; + doubleComplex *pdblMatrixcA = NULL; + doubleComplex *pdblMatrixEye = NULL; + doubleComplex *pdblMatrixTemp = NULL; + doubleComplex *pdblMatrixTemp2 = NULL; + + + + + iSquare = _iLeadDim * _iLeadDim; + + pdblMatrixA = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixX = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixD = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixcX = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixcA = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixEye = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixTemp = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + pdblMatrixTemp2 = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int) iSquare); + + zdblCst = DoubleComplex ( 0.5 , 0 ); + + /*// Scale A by power of 2 so that its norm is < 1/2 .*/ + dfrexps( zinfnorma( in, _iLeadDim, _iLeadDim) , &dblExp); + dblS = max(0, dblExp + 1); + dblS2 = pow(2, dblS); + + /*A = A./2^s */ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixA[iIndex1] = zrdivs ( in[iIndex1] , DoubleComplex ( dblS2 , 0 )); + + + /* Pade approximation for exp(A) + //X = A */ + /*C2F(zcopy)(&iSquare, pdblMatrixA, &iOne, pdblMatrixX, &iOne );*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixX[iIndex1] = pdblMatrixA[iIndex1] ; + + + zeyea(pdblMatrixEye, _iLeadDim, _iLeadDim); + + /* zmulma ( & zdblCst , 1 ,1, + pdblMatrixA , _iLeadDim, _iLeadDim, + pdblMatrixcA);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcA[iIndex1] = zmuls ( pdblMatrixA[iIndex1] , zdblCst ) ; + + /* cA = A * c */ + + + /*E = Eye + cA*/ + + zadda (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare, out ) ; + + /* D = Eye - cA */ + + zdiffa (pdblMatrixEye , iSquare, pdblMatrixcA ,iSquare,pdblMatrixD ) ; + + iMax = 6; + iFlag = 1; + + for(iLoop1 = 2 ; iLoop1 <= iMax ; iLoop1++) + { + dblCst = dblCst * (iMax - iLoop1 + 1 ) / (iLoop1 * (2 * iMax - iLoop1 + 1)); + zdblCst = DoubleComplex( dblCst , 0); + + /*Temp = X */ + /*C2F(zcopy)(&iSquare, pdblMatrixX, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = pdblMatrixX[iIndex1] ; + /* X = A * Temp; */ + + zmulma ( pdblMatrixA , _iLeadDim , _iLeadDim, + pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixX ); + /* cX = c * X */ + + /* zmulma ( & zdblCst , 1 ,1, + pdblMatrixX , _iLeadDim, _iLeadDim, + pdblMatrixcX);*/ + + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixcX[iIndex1] = zmuls ( pdblMatrixX[iIndex1] , zdblCst ) ; + + /* E = E + cX */ + + zadda ( out, iSquare , pdblMatrixcX , iSquare , out ) ; + + if(iFlag == 1) /* D = D + cX */ + { + zadda ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ) ; + } + else /* D = D - cX */ + { + zdiffa ( pdblMatrixD, iSquare , pdblMatrixcX , iSquare , pdblMatrixD ); + } + + /* Toggle iFlag */ + iFlag = !iFlag; + } + + /* Temp = E */ + /*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + pdblMatrixTemp[iIndex1] = out[iIndex1] ; + + /* E = D\E */ + zldivma ( pdblMatrixD , _iLeadDim , _iLeadDim , pdblMatrixTemp , _iLeadDim , _iLeadDim , out ) ; + + /*/ Undo scaling by repeated squaring */ + for(iLoop1 = 0 ; iLoop1 < dblS ; iLoop1++) + { + /*//Temp = E */ + /*//Temp2 = E */ + + /*C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp, &iOne); + C2F(zcopy)(&iSquare, out, &iOne, pdblMatrixTemp2, &iOne);*/ + for ( iIndex1 = 0 ; iIndex1 < iSquare ; iIndex1++ ) + { + pdblMatrixTemp [iIndex1] = out[iIndex1] ; + pdblMatrixTemp2[iIndex1] = out[iIndex1] ; + } + + /* E = E*E*/ + zmulma ( pdblMatrixTemp , _iLeadDim , _iLeadDim, + pdblMatrixTemp2 , _iLeadDim , _iLeadDim, + out ); + + } + + free(pdblMatrixA); + free(pdblMatrixX); + free(pdblMatrixD); + free(pdblMatrixcX); + free(pdblMatrixcA); + free(pdblMatrixEye); + free(pdblMatrixTemp); + free(pdblMatrixTemp2); + + + + return ; +} diff --git a/2.3-1/src/c/matrixOperations/eye/Makefile.am b/2.3-1/src/c/matrixOperations/eye/Makefile.am new file mode 100644 index 00000000..706830dc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/Makefile.am @@ -0,0 +1,46 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixEye_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixEye.la + +HEAD = ../includes/matrixEye.h + +libMatrixEye_la_SOURCES = $(HEAD) \ + seyea.c \ + deyea.c \ + ceyea.c \ + zeyea.c + + + +check_PROGRAMS = testMatrixEye + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixEye.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/includes + +testMatrixEye_SOURCES = testMatrixEye.c +testMatrixEye_LDADD = $(check_LDADD) +testMatrixEye_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixEye diff --git a/2.3-1/src/c/matrixOperations/eye/Makefile.in b/2.3-1/src/c/matrixOperations/eye/Makefile.in new file mode 100644 index 00000000..5a07fc0a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/Makefile.in @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixEye$(EXEEXT) +TESTS = testMatrixEye$(EXEEXT) +subdir = src/c/matrixOperations/eye +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixEye_la_LIBADD = +am__objects_1 = +am_libMatrixEye_la_OBJECTS = $(am__objects_1) libMatrixEye_la-seyea.lo \ + libMatrixEye_la-deyea.lo libMatrixEye_la-ceyea.lo \ + libMatrixEye_la-zeyea.lo +libMatrixEye_la_OBJECTS = $(am_libMatrixEye_la_OBJECTS) +libMatrixEye_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixEye_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatrixEye_OBJECTS = testMatrixEye-testMatrixEye.$(OBJEXT) +testMatrixEye_OBJECTS = $(am_testMatrixEye_OBJECTS) +testMatrixEye_DEPENDENCIES = $(check_LDADD) +testMatrixEye_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixEye_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixEye_la_SOURCES) $(testMatrixEye_SOURCES) +DIST_SOURCES = $(libMatrixEye_la_SOURCES) $(testMatrixEye_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixEye_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixEye.la +HEAD = ../includes/matrixEye.h +libMatrixEye_la_SOURCES = $(HEAD) \ + seyea.c \ + deyea.c \ + ceyea.c \ + zeyea.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixEye.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/includes + +testMatrixEye_SOURCES = testMatrixEye.c +testMatrixEye_LDADD = $(check_LDADD) +testMatrixEye_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/eye/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/eye/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixEye.la: $(libMatrixEye_la_OBJECTS) $(libMatrixEye_la_DEPENDENCIES) + $(libMatrixEye_la_LINK) -rpath $(pkglibdir) $(libMatrixEye_la_OBJECTS) $(libMatrixEye_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixEye$(EXEEXT): $(testMatrixEye_OBJECTS) $(testMatrixEye_DEPENDENCIES) + @rm -f testMatrixEye$(EXEEXT) + $(testMatrixEye_LINK) $(testMatrixEye_OBJECTS) $(testMatrixEye_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-ceyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-deyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-seyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixEye_la-zeyea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixEye-testMatrixEye.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixEye_la-seyea.lo: seyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-seyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-seyea.Tpo -c -o libMatrixEye_la-seyea.lo `test -f 'seyea.c' || echo '$(srcdir)/'`seyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-seyea.Tpo $(DEPDIR)/libMatrixEye_la-seyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='seyea.c' object='libMatrixEye_la-seyea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-seyea.lo `test -f 'seyea.c' || echo '$(srcdir)/'`seyea.c + +libMatrixEye_la-deyea.lo: deyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-deyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-deyea.Tpo -c -o libMatrixEye_la-deyea.lo `test -f 'deyea.c' || echo '$(srcdir)/'`deyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-deyea.Tpo $(DEPDIR)/libMatrixEye_la-deyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='deyea.c' object='libMatrixEye_la-deyea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-deyea.lo `test -f 'deyea.c' || echo '$(srcdir)/'`deyea.c + +libMatrixEye_la-ceyea.lo: ceyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-ceyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-ceyea.Tpo -c -o libMatrixEye_la-ceyea.lo `test -f 'ceyea.c' || echo '$(srcdir)/'`ceyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-ceyea.Tpo $(DEPDIR)/libMatrixEye_la-ceyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ceyea.c' object='libMatrixEye_la-ceyea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-ceyea.lo `test -f 'ceyea.c' || echo '$(srcdir)/'`ceyea.c + +libMatrixEye_la-zeyea.lo: zeyea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -MT libMatrixEye_la-zeyea.lo -MD -MP -MF $(DEPDIR)/libMatrixEye_la-zeyea.Tpo -c -o libMatrixEye_la-zeyea.lo `test -f 'zeyea.c' || echo '$(srcdir)/'`zeyea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixEye_la-zeyea.Tpo $(DEPDIR)/libMatrixEye_la-zeyea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zeyea.c' object='libMatrixEye_la-zeyea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixEye_la_CFLAGS) $(CFLAGS) -c -o libMatrixEye_la-zeyea.lo `test -f 'zeyea.c' || echo '$(srcdir)/'`zeyea.c + +testMatrixEye-testMatrixEye.o: testMatrixEye.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -MT testMatrixEye-testMatrixEye.o -MD -MP -MF $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo -c -o testMatrixEye-testMatrixEye.o `test -f 'testMatrixEye.c' || echo '$(srcdir)/'`testMatrixEye.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo $(DEPDIR)/testMatrixEye-testMatrixEye.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixEye.c' object='testMatrixEye-testMatrixEye.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -c -o testMatrixEye-testMatrixEye.o `test -f 'testMatrixEye.c' || echo '$(srcdir)/'`testMatrixEye.c + +testMatrixEye-testMatrixEye.obj: testMatrixEye.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -MT testMatrixEye-testMatrixEye.obj -MD -MP -MF $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo -c -o testMatrixEye-testMatrixEye.obj `if test -f 'testMatrixEye.c'; then $(CYGPATH_W) 'testMatrixEye.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixEye.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixEye-testMatrixEye.Tpo $(DEPDIR)/testMatrixEye-testMatrixEye.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixEye.c' object='testMatrixEye-testMatrixEye.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixEye_CFLAGS) $(CFLAGS) -c -o testMatrixEye-testMatrixEye.obj `if test -f 'testMatrixEye.c'; then $(CYGPATH_W) 'testMatrixEye.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixEye.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/eye/ceyea.c b/2.3-1/src/c/matrixOperations/eye/ceyea.c new file mode 100644 index 00000000..735018c6 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/ceyea.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "eye.h" + +void ceyea(floatComplex *in, int _iRows, int _iCols) +{ + int i , j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = FloatComplex ( (i == j)? 1.0f:0 , 0) ; + + +} diff --git a/2.3-1/src/c/matrixOperations/eye/deyea.c b/2.3-1/src/c/matrixOperations/eye/deyea.c new file mode 100644 index 00000000..eed9c05d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/deyea.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "eye.h" + +void deyea(double *in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?1:0 ; +} + diff --git a/2.3-1/src/c/matrixOperations/eye/seyea.c b/2.3-1/src/c/matrixOperations/eye/seyea.c new file mode 100644 index 00000000..2f256b86 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/seyea.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "eye.h" + +void seyea(float* in, int _iRows, int _iCols) +{ + int i, j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = (i == j)?1.0f:0 ; +} + diff --git a/2.3-1/src/c/matrixOperations/eye/testMatrixEye.c b/2.3-1/src/c/matrixOperations/eye/testMatrixEye.c new file mode 100644 index 00000000..a3682743 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/testMatrixEye.c @@ -0,0 +1,348 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include + +#include "eye.h" + +#define LEADDIM 10 +#define ROWS 10 +#define COLS 5 + +#define ROWS2 5 +#define COLS2 10 + +static void deyeaTest ( void ) +{ + int i, j = 0 ; + + double result = 0 ; + double in [LEADDIM*LEADDIM] ; + double in2 [ROWS * COLS]; + double in3 [ROWS2 * COLS2]; + + deyea ( in , LEADDIM , LEADDIM ) ; + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + if ( i%(LEADDIM+1) == 0 ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + if ( in[i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 3e-16 ) ; + } + + deyea ( in2, ROWS, COLS ); + for ( i = 0 ; i < ROWS ; i++ ) + { + for ( j = 0 ; j < COLS ; ++j ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in[i * ROWS + j] , result , + fabs( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) ) ; + + if ( in[i * ROWS + j] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) < 3e-16 ) ; + } + } + + deyea ( in3, ROWS2, COLS2); + for ( j = 0 ; j < COLS2 ; ++j ) + { + for ( i = 0 ; i < ROWS2 ; i++ ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in3[j * ROWS2 + i] , result , + fabs( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) ) ; + + if ( in3[j * ROWS2 + i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) < 3e-16 ) ; + } + } + +} + + +static void seyeaTest ( void ) +{ + int i, j = 0 ; + + float result = 0 ; + + float in[LEADDIM*LEADDIM] ; + float in2 [ROWS * COLS]; + float in3 [ROWS2 * COLS2]; + seyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++) + { + if ( i%(LEADDIM+1) == 0 ) + result = 1.0f ; + else + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + if ( in[i] < 1e-6 && result < 1e-6 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 1e-6 ) ; + } + + seyea ( in2, ROWS, COLS ); + for ( i = 0 ; i < ROWS ; i++ ) + { + for ( j = 0 ; j < COLS ; ++j ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in[i * ROWS + j] , result , + fabs( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) ) ; + + if ( in[i * ROWS + j] < 1e-8 && result < 1e-8 ) + assert(1); + else + assert ( fabs ( in[i * ROWS + j] - result) / fabs( in[i * ROWS + j]) < 1e-8 ) ; + } + } + + seyea ( in3, ROWS2, COLS2); + for ( j = 0 ; j < COLS2 ; ++j ) + { + for ( i = 0 ; i < ROWS2 ; i++ ) + { + if ( i == j ) + result = 1 ; + else + result = 0 ; + + printf ( "\t\t in[%d, %d] : %e\tresult : %e\tassert : %e \n" , i, j, + in3[j * ROWS2 + i] , result , + fabs( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) ) ; + + if ( in3[j * ROWS2 + i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in3[j * ROWS2 + i] - result) / fabs( in3[j * ROWS2 + i]) < 1e-14 ) ; + } + } + +} + + +static void zeyeaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[LEADDIM*LEADDIM] ; + + zeyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + if ( i%(LEADDIM+1) == 0 ) + result = DoubleComplex ( 1 , 0 ) ; + else + result = DoubleComplex ( 0 , 0 ) ; + + printf ( "\t\t %d in : %e\tresult : %e \n" , i, zreals( in[i]) , zreals ( result ) ) ; + + if ( zreals( in[i]) < 1e-14 && zreals( result) < 1e-14 ) + assert(1); + else + assert ( fabs ( zreals(in[i]) - zreals(result)) / fabs( zreals(in[i])) < 3e-16) ; + + if ( zimags ( in[i]) < 1e-14 ) + assert (1); + else + assert (0); + + } +} + + + + + +static void ceyeaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[LEADDIM*LEADDIM] ; + + ceyea ( in , LEADDIM , LEADDIM ) ; + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++) + { + if ( i%(LEADDIM+1) == 0 ) + result = FloatComplex ( 1.0f , 0 ) ; + else + result = FloatComplex ( 0 , 0 ) ; + + printf ( "\t\t %d in : %e\tresult : %e \n" , i, creals( in[i]) , creals ( result ) ) ; + if ( creals( in[i]) < 1e-6 && creals( result) < 1e-6 ) + assert(1); + else + assert ( fabs ( creals(in[i]) - creals(result)) / fabs( creals(in[i])) < 1e-6 ) ; + + if ( cimags ( in[i]) < 1e-6 ) + assert (1); + else + assert (0); + + } +} + +/* EYES TEST */ + +static void ceyesTest ( void ) +{ + + + floatComplex result = FloatComplex ( 1.0f , 0 ) ; + + floatComplex in = FloatComplex ( LEADDIM, LEADDIM ) ; + + in = ceyes ( in ) ; + + + + assert ( (creals(in) - creals(result)) / fabs( creals(in)) < 1e-6 ) ; + assert ( cimags (in) == 0) ; +} + + + + + +static void zeyesTest ( void ) +{ + + doubleComplex result = DoubleComplex ( 1 , 0 ) ; + + doubleComplex in = DoubleComplex ( LEADDIM , LEADDIM ) ; + + in = zeyes ( in ) ; + + + assert ( (zreals(in) - zreals(result)) / fabs( zreals(in)) < 1e-16 ) ; + assert ( zimags (in) == 0) ; +} + + + +static void deyesTest ( void ) +{ + + + double result = 1 ; + + double in = LEADDIM ; + + in = deyes ( in ) ; + + + assert ( (in - result) / in < 1e-16 ) ; ; +} + + + +static void seyesTest ( void ) +{ + + + float result = 1.0f ; + + float in = 154.0f ; + + in = seyes ( in ) ; + + + assert ( (in - result) / in < 1e-8 ) ; + +} + + + +static int testEye(void) { + + printf("\n>>>> Matrix Eye Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + deyeaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + seyeaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + ceyeaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zeyeaTest(); + + + + + printf("\t>>>> Matrix Double Realt Tests\n"); + deyesTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + seyesTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + ceyesTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zeyesTest(); + + return 0; +} + + + +int main(void) { + assert(testEye() == 0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj b/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj new file mode 100644 index 00000000..de03d195 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4F99E000-AC7D-4C3B-80C5-5A5A64D5757F} + testMatrixEye + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters b/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters new file mode 100644 index 00000000..66c22dc0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/test_MatrixEye/testMatrixEye.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/eye/zeyea.c b/2.3-1/src/c/matrixOperations/eye/zeyea.c new file mode 100644 index 00000000..622cc48e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/eye/zeyea.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "eye.h" + +void zeyea(doubleComplex *in, int _iRows, int _iCols) +{ + int i , j ; + + for ( i = 0 ; i < _iCols ; i++ ) + for ( j = 0 ; j < _iRows ; j++ ) + in[i*_iRows + j] = DoubleComplex ( (i == j)? 1:0 , 0) ; + +} + diff --git a/2.3-1/src/c/matrixOperations/fill/Makefile.am b/2.3-1/src/c/matrixOperations/fill/Makefile.am new file mode 100644 index 00000000..e7506e2d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/Makefile.am @@ -0,0 +1,55 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixFill_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixFill.la + +HEAD = ../includes/fill.h + +libMatrixFill_la_SOURCES = $(HEAD) \ + sfilla.c \ + dfilla.c \ + cfilla.c \ + zfilla.c + + +############ +## CHECK +############ + + +check_PROGRAMS = testDoubleFill testFloatFill + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixFill.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleFill_SOURCES = testDoubleFill.c +testDoubleFill_LDADD = $(check_LDADD) +testDoubleFill_CFLAGS = $(check_INCLUDES) + +testFloatFill_SOURCES = testFloatFill.c +testFloatFill_LDADD = $(check_LDADD) +testFloatFill_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleFill testFloatFill + + + + diff --git a/2.3-1/src/c/matrixOperations/fill/Makefile.in b/2.3-1/src/c/matrixOperations/fill/Makefile.in new file mode 100644 index 00000000..a28b991d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/Makefile.in @@ -0,0 +1,739 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleFill$(EXEEXT) testFloatFill$(EXEEXT) +TESTS = testDoubleFill$(EXEEXT) testFloatFill$(EXEEXT) +subdir = src/c/matrixOperations/fill +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixFill_la_LIBADD = +am__objects_1 = +am_libMatrixFill_la_OBJECTS = $(am__objects_1) \ + libMatrixFill_la-sfilla.lo libMatrixFill_la-dfilla.lo \ + libMatrixFill_la-cfilla.lo libMatrixFill_la-zfilla.lo +libMatrixFill_la_OBJECTS = $(am_libMatrixFill_la_OBJECTS) +libMatrixFill_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixFill_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleFill_OBJECTS = testDoubleFill-testDoubleFill.$(OBJEXT) +testDoubleFill_OBJECTS = $(am_testDoubleFill_OBJECTS) +testDoubleFill_DEPENDENCIES = $(check_LDADD) +testDoubleFill_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleFill_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatFill_OBJECTS = testFloatFill-testFloatFill.$(OBJEXT) +testFloatFill_OBJECTS = $(am_testFloatFill_OBJECTS) +testFloatFill_DEPENDENCIES = $(check_LDADD) +testFloatFill_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatFill_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixFill_la_SOURCES) $(testDoubleFill_SOURCES) \ + $(testFloatFill_SOURCES) +DIST_SOURCES = $(libMatrixFill_la_SOURCES) $(testDoubleFill_SOURCES) \ + $(testFloatFill_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixFill_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixFill.la +HEAD = ../includes/fill.h +libMatrixFill_la_SOURCES = $(HEAD) \ + sfilla.c \ + dfilla.c \ + cfilla.c \ + zfilla.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixFill.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleFill_SOURCES = testDoubleFill.c +testDoubleFill_LDADD = $(check_LDADD) +testDoubleFill_CFLAGS = $(check_INCLUDES) +testFloatFill_SOURCES = testFloatFill.c +testFloatFill_LDADD = $(check_LDADD) +testFloatFill_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/fill/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/fill/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixFill.la: $(libMatrixFill_la_OBJECTS) $(libMatrixFill_la_DEPENDENCIES) + $(libMatrixFill_la_LINK) -rpath $(pkglibdir) $(libMatrixFill_la_OBJECTS) $(libMatrixFill_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleFill$(EXEEXT): $(testDoubleFill_OBJECTS) $(testDoubleFill_DEPENDENCIES) + @rm -f testDoubleFill$(EXEEXT) + $(testDoubleFill_LINK) $(testDoubleFill_OBJECTS) $(testDoubleFill_LDADD) $(LIBS) +testFloatFill$(EXEEXT): $(testFloatFill_OBJECTS) $(testFloatFill_DEPENDENCIES) + @rm -f testFloatFill$(EXEEXT) + $(testFloatFill_LINK) $(testFloatFill_OBJECTS) $(testFloatFill_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-cfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-dfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-sfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixFill_la-zfilla.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleFill-testDoubleFill.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatFill-testFloatFill.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixFill_la-sfilla.lo: sfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-sfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-sfilla.Tpo -c -o libMatrixFill_la-sfilla.lo `test -f 'sfilla.c' || echo '$(srcdir)/'`sfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-sfilla.Tpo $(DEPDIR)/libMatrixFill_la-sfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfilla.c' object='libMatrixFill_la-sfilla.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-sfilla.lo `test -f 'sfilla.c' || echo '$(srcdir)/'`sfilla.c + +libMatrixFill_la-dfilla.lo: dfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-dfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-dfilla.Tpo -c -o libMatrixFill_la-dfilla.lo `test -f 'dfilla.c' || echo '$(srcdir)/'`dfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-dfilla.Tpo $(DEPDIR)/libMatrixFill_la-dfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfilla.c' object='libMatrixFill_la-dfilla.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-dfilla.lo `test -f 'dfilla.c' || echo '$(srcdir)/'`dfilla.c + +libMatrixFill_la-cfilla.lo: cfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-cfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-cfilla.Tpo -c -o libMatrixFill_la-cfilla.lo `test -f 'cfilla.c' || echo '$(srcdir)/'`cfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-cfilla.Tpo $(DEPDIR)/libMatrixFill_la-cfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfilla.c' object='libMatrixFill_la-cfilla.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-cfilla.lo `test -f 'cfilla.c' || echo '$(srcdir)/'`cfilla.c + +libMatrixFill_la-zfilla.lo: zfilla.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -MT libMatrixFill_la-zfilla.lo -MD -MP -MF $(DEPDIR)/libMatrixFill_la-zfilla.Tpo -c -o libMatrixFill_la-zfilla.lo `test -f 'zfilla.c' || echo '$(srcdir)/'`zfilla.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixFill_la-zfilla.Tpo $(DEPDIR)/libMatrixFill_la-zfilla.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfilla.c' object='libMatrixFill_la-zfilla.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixFill_la_CFLAGS) $(CFLAGS) -c -o libMatrixFill_la-zfilla.lo `test -f 'zfilla.c' || echo '$(srcdir)/'`zfilla.c + +testDoubleFill-testDoubleFill.o: testDoubleFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -MT testDoubleFill-testDoubleFill.o -MD -MP -MF $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo -c -o testDoubleFill-testDoubleFill.o `test -f 'testDoubleFill.c' || echo '$(srcdir)/'`testDoubleFill.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo $(DEPDIR)/testDoubleFill-testDoubleFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFill.c' object='testDoubleFill-testDoubleFill.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -c -o testDoubleFill-testDoubleFill.o `test -f 'testDoubleFill.c' || echo '$(srcdir)/'`testDoubleFill.c + +testDoubleFill-testDoubleFill.obj: testDoubleFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -MT testDoubleFill-testDoubleFill.obj -MD -MP -MF $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo -c -o testDoubleFill-testDoubleFill.obj `if test -f 'testDoubleFill.c'; then $(CYGPATH_W) 'testDoubleFill.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFill.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFill-testDoubleFill.Tpo $(DEPDIR)/testDoubleFill-testDoubleFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFill.c' object='testDoubleFill-testDoubleFill.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFill_CFLAGS) $(CFLAGS) -c -o testDoubleFill-testDoubleFill.obj `if test -f 'testDoubleFill.c'; then $(CYGPATH_W) 'testDoubleFill.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFill.c'; fi` + +testFloatFill-testFloatFill.o: testFloatFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -MT testFloatFill-testFloatFill.o -MD -MP -MF $(DEPDIR)/testFloatFill-testFloatFill.Tpo -c -o testFloatFill-testFloatFill.o `test -f 'testFloatFill.c' || echo '$(srcdir)/'`testFloatFill.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFill-testFloatFill.Tpo $(DEPDIR)/testFloatFill-testFloatFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFill.c' object='testFloatFill-testFloatFill.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -c -o testFloatFill-testFloatFill.o `test -f 'testFloatFill.c' || echo '$(srcdir)/'`testFloatFill.c + +testFloatFill-testFloatFill.obj: testFloatFill.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -MT testFloatFill-testFloatFill.obj -MD -MP -MF $(DEPDIR)/testFloatFill-testFloatFill.Tpo -c -o testFloatFill-testFloatFill.obj `if test -f 'testFloatFill.c'; then $(CYGPATH_W) 'testFloatFill.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFill.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFill-testFloatFill.Tpo $(DEPDIR)/testFloatFill-testFloatFill.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFill.c' object='testFloatFill-testFloatFill.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFill_CFLAGS) $(CFLAGS) -c -o testFloatFill-testFloatFill.obj `if test -f 'testFloatFill.c'; then $(CYGPATH_W) 'testFloatFill.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFill.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/fill/cfilla.c b/2.3-1/src/c/matrixOperations/fill/cfilla.c new file mode 100644 index 00000000..0c591047 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/cfilla.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "fill.h" + +void cfilla (floatComplex* in, int rows, int cols, floatComplex constant){ + int i; + + for (i=0;i +#include +#include "fill.h" + +static void dfillaTest(){ + double in[6]; + double constant=7; + int i; + dfilla(in, 2,3,constant); + for (i=0;i<6;i++) + printf("indice : %d -- valeur : %f\n",i,in[i]); + +} + +static void zfillaTest(){ + doubleComplex in[9]; + doubleComplex constant=DoubleComplex(1,1); + int i; + + zfilla(in, 3, 3, constant); + for (i=0;i<9;i++) + printf("indice : %d -- valeur : %f+%f *i\n",i,zreals(in[i]),zimags(in[i])); +} + + +static int fillTest(){ + dfillaTest(); + zfillaTest(); + return 0; +} + +int main(void){ + assert(fillTest()==0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/fill/testFloatFill.c b/2.3-1/src/c/matrixOperations/fill/testFloatFill.c new file mode 100644 index 00000000..cfe1e61b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/testFloatFill.c @@ -0,0 +1,47 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "fill.h" + +static void sfillaTest(){ + float in[8]; + float constant=2; + int i; + sfilla(in, 4, 2, constant); + for (i=0;i<8;i++) + printf("indice : %d -- valeur : %f\n",i,in[i]); +} + +static void cfillaTest(){ + floatComplex in[15]; + floatComplex constant=FloatComplex(4,0); + int i; + cfilla(in, 3, 5, constant); + for (i=0;i<15;i++) + printf("indice : %d -- valeur : %f+%f *i\n",i,creals(in[i]),cimags(in[i])); +} + + +static int fillTest(){ + sfillaTest(); + cfillaTest(); + return 0; +} + +int main(void){ + assert(fillTest()==0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj b/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj new file mode 100644 index 00000000..69daa27f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {903B0194-F1A9-4302-AC3D-7E88E0406E26} + testDoubleFill + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters b/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters new file mode 100644 index 00000000..6bf973ff --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/test_DoubleFill/testDoubleFill.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj b/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj new file mode 100644 index 00000000..e5c4f797 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {054C79A1-A607-496B-96CE-6F0BB404F754} + testFloatFill + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters b/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters new file mode 100644 index 00000000..071148d7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/test_FloatFill/testFloatFill.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/fill/zfilla.c b/2.3-1/src/c/matrixOperations/fill/zfilla.c new file mode 100644 index 00000000..2936cc59 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/fill/zfilla.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "fill.h" + + +void zfilla (doubleComplex* in, int rows, int cols, doubleComplex constant){ + int i; + + for (i=0;i +#include +#include +#include +#include "hilb.h" + +#define SIZE 6 + +static void shilbaTest ( void ){ + + int i = 0 ; + int j = 0 ; + + + float Result[] = + {36.0f,-630.0f,3360.0f,-7560.0f,7560.0f,-2772.0f, +-630.0f,14700.0f,-88200.0f,211680.0f,-220500.0f,83160.0f, +3360.0f,-88200.0f,564480.0f,-1411200.0f,1512000.0f,-582120.0f, +-7560.0f,211680.0f,-1411200.0f,3628800.0f,-3969000.0f,1552320.0f, +7560.0f,-220500.0f,1512000.0f,-3969000.0f,4410000.0f,-1746360.0f, +-2772.0f,83160.0f,-582120.0f,1552320.0f,-1746360.0f,698544.0f}; + + + + float out[SIZE*SIZE] ; + shilba ( out , SIZE ) ; + + for (i = 0 ; i < SIZE ; i++) + { + printf ("\n\t" ) ; + for ( j = 0 ; j < SIZE; j++) + printf ("%e\t" , out[i + j*SIZE] ); + + } + + for ( i = 0 ; i < SIZE*SIZE ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-06 ) ; + } + + printf ("\n\n" ) ; +} + +static void dhilbaTest ( void ){ + + int i = 0 ; + int j = 0 ; + + double Result[] = +{36,-630,3360,-7560,7560,-2772, +-630,14700,-88200,211680,-220500,83160, +3360,-88200,564480,-1411200,1512000,-582120, +-7560,211680,-1411200,3628800,-3969000,1552320, +7560,-220500,1512000,-3969000,4410000,-1746360, +-2772,83160,-582120,1552320,-1746360,698544} +; + + + double out[SIZE*SIZE] ; + + dhilba ( out , SIZE ) ; + + for (i = 0 ; i < SIZE ; i++) + { + printf ("\n\t" ) ; + for ( j = 0 ; j < SIZE; j++) + printf ("%e\t" , out[i + j*SIZE] ); + + } + + + for ( i = 0 ; i < SIZE*SIZE ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-16 ) ; + } + + printf ("\n\n" ) ; +} + + + +static int testHilbert(void) { + + printf("\n>>>>Hilbert's Matrix Tests\n"); + + printf("\n\t>>> Float Test\n"); + shilbaTest(); + + printf("\n\t>>> Double Test\n"); + dhilbaTest(); + + return 0; +} + + + +int main(void) { + assert(testHilbert() == 0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj b/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj new file mode 100644 index 00000000..53b805d2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F7747E9B-A57F-43D2-8C1F-1F77C670B406} + testHilbert + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters b/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters new file mode 100644 index 00000000..0e5affae --- /dev/null +++ b/2.3-1/src/c/matrixOperations/hilb/test_Hilbert/testHilbert.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/includes/cat.h b/2.3-1/src/c/matrixOperations/includes/cat.h new file mode 100644 index 00000000..9f64a157 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/cat.h @@ -0,0 +1,105 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CAT_H__ +#define __CAT_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief concat 2 floats scalars +*/ +EXTERN_MATOPS void srowcats(float in1, float in2, float *out); +EXTERN_MATOPS void scolumncats(float in1, float in2, float *out); + +/* +** \brief concat 2 double scalars +*/ +EXTERN_MATOPS void drowcats(double in1, double in2, double *out); +EXTERN_MATOPS void dcolumncats(double in1, double in2, double *out); + +/* +** \brief concat 2 floats complex scalars +*/ +EXTERN_MATOPS void crowcats(floatComplex in1, floatComplex in2, floatComplex *out); +EXTERN_MATOPS void ccolumncats(floatComplex in1, floatComplex in2, floatComplex *out); + +/* +** \brief concat 2 double complex scalars +*/ +EXTERN_MATOPS void zrowcats(doubleComplex in1, doubleComplex in2, doubleComplex *out); +EXTERN_MATOPS void zcolumncats(doubleComplex in1, doubleComplex in2, doubleComplex *out); + +/* +** \brief Concat float arrays +** \param in1 the float array to process +** \param lines1 +** \param columns1 +** \param in2 the float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void srowcata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); +EXTERN_MATOPS void scolumncata(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float* out); + +/* +** \brief Concat double arrays +** \param in1 the double array to process +** \param lines1 +** \param columns1 +** \param in2 the double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void drowcata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); +EXTERN_MATOPS void dcolumncata(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double* out); + +/* +** \brief Concat Complex float arrays +** \param in1 the Complex float array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex float array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void crowcata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); +EXTERN_MATOPS void ccolumncata(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex* out); + +/* +** \brief Concat Complex double arrays +** \param in1 the Complex double array to process +** \param lines1 +** \param columns1 +** \param in2 the Complex double array to process to concat +** \param lines2 +** \param columns2 +** \param out the concatenation +*/ +EXTERN_MATOPS void zrowcata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); +EXTERN_MATOPS void zcolumncata(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__CAT_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/chol.h b/2.3-1/src/c/matrixOperations/includes/chol.h new file mode 100644 index 00000000..0a17406d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/chol.h @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __CHOL_H__ +#define __CHOL_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double dchols(double in); +EXTERN_MATOPS void dchola(double *in, int size, double *out); + +EXTERN_MATOPS float schols(float in); +EXTERN_MATOPS void schola(float *in, int size, float *out); + +#define zchols(in) DoubleComplex(dchols(zreals(in)),0) + +EXTERN_MATOPS void zchola (doubleComplex *in, int size, doubleComplex *out); + +#define cchols(in) FloatComplex(schols(creals(in)),0) +EXTERN_MATOPS void cchola(floatComplex *in, int size, floatComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CHOL_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/determ.h b/2.3-1/src/c/matrixOperations/includes/determ.h new file mode 100644 index 00000000..d915c31b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/determ.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __DETERM_H__ +#define __DETERM_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS double ddeterma (double *in, int rows); + +EXTERN_MATOPS float sdeterma (float *in, int rows); + +EXTERN_MATOPS doubleComplex zdeterma (doubleComplex *in, int rows); + +EXTERN_MATOPS floatComplex cdeterma (floatComplex *in, int rows); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __DETERM_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/dist.h b/2.3-1/src/c/matrixOperations/includes/dist.h new file mode 100644 index 00000000..bf45a8d7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/dist.h @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + + +#ifndef __DIST_H__ +#define __DIST_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + /* Computes the euclidian distance + between 2 scalars/arrays. + We assume both arrays have the same + numbers of lines and columns.*/ + +EXTERN_MATOPS float sdists( float in1, float in2); +EXTERN_MATOPS float sdista( float* in1, float* in2, int lines, int columns); + +EXTERN_MATOPS double ddists( double in1, double in2); +EXTERN_MATOPS double ddista( double* in1, double* in2, int lines, int columns); + +EXTERN_MATOPS float cdists( floatComplex in1, floatComplex in2); +EXTERN_MATOPS float cdista( floatComplex* in1, floatComplex* in2, int lines, int columns); + +EXTERN_MATOPS double zdists( doubleComplex in1, doubleComplex in2); +EXTERN_MATOPS double zdista( doubleComplex* in1, doubleComplex* in2, int lines, int columns); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__DIST_H__*/ + diff --git a/2.3-1/src/c/matrixOperations/includes/dynlib_matrixoperations.h b/2.3-1/src/c/matrixOperations/includes/dynlib_matrixoperations.h new file mode 100644 index 00000000..a0597a59 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/dynlib_matrixoperations.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_MATRIXOPERATIONS_H__ +#define __DYNLIB_MATRIXOPERATIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if MATRIXOPERATIONS_EXPORTS + #define EXTERN_MATOPS __declspec (dllexport) + #else + #define EXTERN_MATOPS __declspec (dllimport) + #endif +#else + #define EXTERN_MATOPS +#endif + +#endif /* __DYNLIB_MATRIXOPERATIONS_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/eye.h b/2.3-1/src/c/matrixOperations/includes/eye.h new file mode 100644 index 00000000..f7f2ef2f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/eye.h @@ -0,0 +1,69 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __EYE_H__ +#define __EYE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float Eye value +*/ +#define seyes(in) 1.0f + +/* +** \brief create a Double Eye value +*/ +#define deyes(in) 1.0 + +/* +** \brief create a float complex Eye value +*/ +#define ceyes(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex Eye value +*/ +#define zeyes(in) DoubleComplex(1, 0) + +/* +** \brief create a float Eye matrix +*/ +EXTERN_MATOPS void seyea(float* in, int _iRows, int _iCols); + +/* +** \brief create a Double Eye matrix +*/ +EXTERN_MATOPS void deyea(double* in, int _iRows, int _iCols); + +/* +** \brief create a float complex Eye matrix +*/ +EXTERN_MATOPS void ceyea(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief create a Double complex Eye matrix +*/ +EXTERN_MATOPS void zeyea(doubleComplex* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__EYE_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/fill.h b/2.3-1/src/c/matrixOperations/includes/fill.h new file mode 100644 index 00000000..09b8d811 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/fill.h @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __FILL_H__ +#define __FILL_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/*filling of a array with constant*/ + +EXTERN_MATOPS void dfilla (double* in, int rows, int cols, double constant); + +EXTERN_MATOPS void sfilla (float* in, int rows, int cols, float constant); + +EXTERN_MATOPS void cfilla (floatComplex* in, int rows, int cols, floatComplex constant); + +EXTERN_MATOPS void zfilla (doubleComplex* in, int rows, int cols, doubleComplex constant); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __FILL_H__ */ + + diff --git a/2.3-1/src/c/matrixOperations/includes/hilb.h b/2.3-1/src/c/matrixOperations/includes/hilb.h new file mode 100644 index 00000000..65efd0e2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/hilb.h @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __HILB_H__ +#define __HILB_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in float precision +** param size: matrix's size +*/ + +EXTERN_MATOPS void shilba ( float* out, int size) ; + +/* +** generate an Hilbert's matrix +** param out : the hilbert's matrix in double precision +** param size: matrix's size +*/ + + +EXTERN_MATOPS void dhilba ( double* out, int size ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__HILB_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/infiniteNorm.h b/2.3-1/src/c/matrixOperations/includes/infiniteNorm.h new file mode 100644 index 00000000..130cfeaf --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/infiniteNorm.h @@ -0,0 +1,67 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __INFINITENORM_H__ +#define __INFINITENORM_H__ + +#include "dynlib_matrixoperations.h" +#include "sign.h" +#include "pythag.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Compute the infinite norm of a given floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float sinfnorma(float* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given doubles matrix. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS double dinfnorma(double* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex floats matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS float cinfnorma(floatComplex* in, int _iRows, int _iCols); + +/* +** \brief Compute the infinite norm of a given complex doubles matrix. +** \param in : input matrix. +** \param _iRows : number of rows of the matrix . +** \param _iCols : number of columns of the matrix . +*/ + +EXTERN_MATOPS double zinfnorma(doubleComplex* in, int _iRows, int _iCols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__INFINITENORM_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/jmat.h b/2.3-1/src/c/matrixOperations/includes/jmat.h new file mode 100644 index 00000000..38a8b1e2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/jmat.h @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __JMAT_H__ +#define __JMAT_H__ + +#include "dynlib_matrixoperations.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sjmata(float in1, float in2, float* out); +EXTERN_MATOPS void djmata(double in1, double in2, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__JMAT_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/logm.h b/2.3-1/src/c/matrixOperations/includes/logm.h new file mode 100644 index 00000000..7eec569d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/logm.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __LOGM_H__ +#define __LOGM_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void slogma (float* in, int size, float* out); + +EXTERN_MATOPS void dlogma (double* in, int size, double* out); + +EXTERN_MATOPS void clogma (floatComplex* in, int size, floatComplex* out); + +EXTERN_MATOPS void zlogma (doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __LOGM_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixDivision.h b/2.3-1/src/c/matrixOperations/includes/matrixDivision.h new file mode 100644 index 00000000..7702313b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixDivision.h @@ -0,0 +1,102 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXDIVISION_H__ +#define __MATRIXDIVISION_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "lapack.h" +#include "cat.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "min.h" +#include "max.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void srdivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + +EXTERN_MATOPS void sldivma ( float* in1, int lines1, int columns1 , + float* in2, int lines2, int columns2 , + float* out ); + + +EXTERN_MATOPS void drdivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + + +EXTERN_MATOPS void dldivma ( double* in1, int lines1, int columns1 , + double* in2, int lines2, int columns2 , + double* out ); + +EXTERN_MATOPS void zrdivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void zldivma( doubleComplex* in1, int lines1, int columns1 , + doubleComplex* in2, int lines2, int columns2 , + doubleComplex* out ); + +EXTERN_MATOPS void crdivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +EXTERN_MATOPS void cldivma( floatComplex* in1, int lines1, int columns1 , + floatComplex* in2, int lines2, int columns2 , + floatComplex* out ); + +/*special case row vector /row vector => scalar */ +/* +** \brief Compute a division for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the right division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS double drdivv(double *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivv(doubleComplex *in1, doubleComplex *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivzdv(doubleComplex *in1, double *in2, int size2); + +EXTERN_MATOPS doubleComplex zrdivdzv(double *in1, doubleComplex *in2, int size2); + +/* +** \brief Compute a division for float. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the division of the two vectors = in1 .* in2. +*/ +EXTERN_MATOPS float srdivv(float *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivv(floatComplex *in1, floatComplex *in2, int size2); + +EXTERN_MATOPS floatComplex crdivcsv(floatComplex *in1, float *in2, int size2); + +EXTERN_MATOPS floatComplex crdivscv(float *in1, floatComplex *in2, int size2); + + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXDIVISION_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixExponential.h b/2.3-1/src/c/matrixOperations/includes/matrixExponential.h new file mode 100644 index 00000000..4b3cd8a0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixExponential.h @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXEXPONENTIAL_H__ +#define __MATRIXEXPONENTIAL_H__ + +#include +#include +#include "dynlib_matrixoperations.h" +#include "lapack.h" +#include "blas.h" +#include "abs.h" +#include "exp.h" +#include "max.h" +#include "pow.h" +#include "matrixDivision.h" +#include "matrixMultiplication.h" +#include "addition.h" +#include "subtraction.h" +#include "eye.h" +#include "infiniteNorm.h" +#include "frexp.h" +#include "division.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS void sexpma (float* in, float* out, int _iLeadDim); + +EXTERN_MATOPS void dexpma (double* in, double* out, int _iLeadDim); + +EXTERN_MATOPS void cexpma(floatComplex * in, floatComplex * out, int _iLeadDim); + +EXTERN_MATOPS void zexpma (doubleComplex * in, doubleComplex * out, int _iLeadDim); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXEXPONENTIAL_H__ */ + diff --git a/2.3-1/src/c/matrixOperations/includes/matrixInversion.h b/2.3-1/src/c/matrixOperations/includes/matrixInversion.h new file mode 100644 index 00000000..90312459 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixInversion.h @@ -0,0 +1,66 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __MATRIXINVERSION_H__ +#define __MATRIXINVERSION_H__ + +#include "abs.h" +#include "dynlib_matrixoperations.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the matrix inverse for floats. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + +EXTERN_MATOPS void sinverma ( float* in, float* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void dinverma ( double* in, double* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex floats . +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ); + +/* +** \brief Compute the matrix inverse for complex doubles. +** \param in : input matrix. +** \param leadDimIn : the leading dimension of the matrix . +** \param out : the matrix inverse of the input . +*/ + + +EXTERN_MATOPS void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXINVERSION_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixMagnitude.h b/2.3-1/src/c/matrixOperations/includes/matrixMagnitude.h new file mode 100644 index 00000000..7b65c6d9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixMagnitude.h @@ -0,0 +1,41 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MAGNITUDE_H__ +#define __MAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float smagns(float in); +EXTERN_MATOPS float smagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dmagns(double in); +EXTERN_MATOPS double dmagna(double* in, int rows, int cols); + +EXTERN_MATOPS float cmagns(floatComplex in); +EXTERN_MATOPS float cmagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zmagns(doubleComplex in); +EXTERN_MATOPS double zmagna(doubleComplex* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __MAGNITUDE_H__*/ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixMultiplication.h b/2.3-1/src/c/matrixOperations/includes/matrixMultiplication.h new file mode 100644 index 00000000..228dd163 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixMultiplication.h @@ -0,0 +1,91 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXMULTIPLICATION_H__ +#define __MATRIXMULTIPLICATION_H__ + +#include "dynlib_matrixoperations.h" +#include "multiplication.h" +#include "addition.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** columns1 = lines2; +** +*/ + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out); + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out); + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +EXTERN_MATOPS void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXMULTIPLICATION_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixPow.h b/2.3-1/src/c/matrixOperations/includes/matrixPow.h new file mode 100644 index 00000000..d7ffab31 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixPow.h @@ -0,0 +1,43 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXPOW_H__ +#define __MATRIXPOW_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + powm is only working on square matrix + so the size is limited to rows +*/ +EXTERN_MATOPS void spowma(float* in, int rows, float expand, float* out); + +EXTERN_MATOPS void dpowma(double* in, int rows, double expand, double* out); + +EXTERN_MATOPS void cpowma(floatComplex* in, int rows, floatComplex expand, floatComplex* out); + +EXTERN_MATOPS void zpowma(doubleComplex* in, int rows, doubleComplex expand, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + + +#endif/*__MATRIXPOW_H__*/ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixSquaredMagnitude.h b/2.3-1/src/c/matrixOperations/includes/matrixSquaredMagnitude.h new file mode 100644 index 00000000..9ee64c32 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixSquaredMagnitude.h @@ -0,0 +1,41 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SQUAREDMAGNITUDE_H__ +#define __SQUAREDMAGNITUDE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_MATOPS float ssquMagns(float in); +EXTERN_MATOPS float ssquMagna(float* in, int rows, int cols); + +EXTERN_MATOPS double dsquMagns(double in); +EXTERN_MATOPS double dsquMagna(double* in, int rows, int cols); + +EXTERN_MATOPS float csquMagns(floatComplex in); +EXTERN_MATOPS float csquMagna(floatComplex* in, int rows, int cols); + +EXTERN_MATOPS double zsquMagns(doubleComplex in); +EXTERN_MATOPS double zsquMagna(doubleComplex* in, int rows, int cols); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SQUAREDMAGNITUDE_H__*/ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixTrace.h b/2.3-1/src/c/matrixOperations/includes/matrixTrace.h new file mode 100644 index 00000000..76b77454 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixTrace.h @@ -0,0 +1,70 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRICXTRACE_H__ +#define __MATRICXTRACE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE SQUARE +** +*/ + + +/* +** \brief Compute the trace of a float scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float scalar containing the trace. +*/ + +EXTERN_MATOPS float stracea ( float* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double scalar matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double scalar containing the trace. +*/ +EXTERN_MATOPS double dtracea ( double* in ,int lines ) ; + +/* +** \brief Compute the trace of a float complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : float complex containing the trace. +*/ +EXTERN_MATOPS floatComplex ctracea ( floatComplex* in ,int lines ) ; + + +/* +** \brief Compute the trace of a double complex matrix. +** \param in : input array. +** \param lines : number of lines +** \param out : double complex containing the trace. +*/ +EXTERN_MATOPS doubleComplex ztracea ( doubleComplex* in ,int lines ) ; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRICXTRACE_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/matrixTranspose.h b/2.3-1/src/c/matrixOperations/includes/matrixTranspose.h new file mode 100644 index 00000000..122b618d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/matrixTranspose.h @@ -0,0 +1,61 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MATRIXTRANSPOSE_H__ +#define __MATRIXTRANSPOSE_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Compute the transpose of a float matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float matrix. +*/ +EXTERN_MATOPS void stransposea ( float* in , int lines1 , int column1, float* out ); +/* +** \brief Compute the transpose of a double matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double matrix. +*/ +EXTERN_MATOPS void dtransposea ( double* in , int lines1 , int column1, double* out ); +/* +** \brief Compute the transpose of a float complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed float complex matrix. +*/ +EXTERN_MATOPS void ctransposea ( floatComplex* in , int lines1 , int column1, floatComplex* out ); +/* +** \brief Compute the transpose of a double complex matrix. +** \param in : input matrix. +** \param lines1 : number of lines +** \param column1 : number of column1 +** \param out : the transposed double complex matrix. +*/ +EXTERN_MATOPS void ztransposea ( doubleComplex* in , int lines1 , int column1, doubleComplex* out ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MATRIXTRANSPOSE_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/ones.h b/2.3-1/src/c/matrixOperations/includes/ones.h new file mode 100644 index 00000000..63d8bd4b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/ones.h @@ -0,0 +1,69 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __ONES_H__ +#define __ONES_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define soness(in) 1.0f + +/* +** \brief create a Double one value +*/ +#define doness(in) 1.0 + +/* +** \brief create a float complex one value +*/ +#define coness(in) FloatComplex(1.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zoness(in) DoubleComplex(1, 0) + + + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void sonesa ( float* in , int rows , int cols ); +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void conesa ( floatComplex* in , int rows ,int cols ); +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void donesa ( double* in , int rows ,int cols ); +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zonesa ( doubleComplex* in , int rows ,int cols ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ONES_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/spec.h b/2.3-1/src/c/matrixOperations/includes/spec.h new file mode 100644 index 00000000..b7b7d35c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/spec.h @@ -0,0 +1,56 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __SPEC_H__ +#define __SPEC_H__ + +#include "dynlib_matrixoperations.h" +#include "doubleComplex.h" +#include "floatComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* spec gives only the eigenvalues + If you want the eigenvalues and the eigenvectors, use spec2 */ + +/* spec */ +#define sspecs(in) in +#define dspecs(in) in +#define cspecs(in) in +#define zspecs(in) in + +EXTERN_MATOPS void sspeca(float* in, int rows, float* out); +EXTERN_MATOPS void dspeca(double* in, int rows, double* out); +EXTERN_MATOPS void cspeca(floatComplex* in, int rows, floatComplex* out); +EXTERN_MATOPS void zspeca(doubleComplex* in, int rows,doubleComplex* out); + + + +/* spec2 */ +#define sspec2s(in,out) sspecs(1);*out=in; +#define dspec2s(in,out) dspecs(1);*out=in; +#define cspec2s(in,out) cspecs(FloatComplex(1,0));*out=FloatComplex(creals(in),cimags(in)); +#define zspec2s(in,out) zspecs(DoubleComplex(1,0));*out=DoubleComplex(zreals(in),zimags(in)); + +EXTERN_MATOPS void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors); +EXTERN_MATOPS void dspec2a(double* in, int rows, double* eigenvalues,double* eigenvectors); +EXTERN_MATOPS void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors); +EXTERN_MATOPS void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues,doubleComplex* eigenvectors); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __SPEC_H__ */ diff --git a/2.3-1/src/c/matrixOperations/includes/zeros.h b/2.3-1/src/c/matrixOperations/includes/zeros.h new file mode 100644 index 00000000..06b2e5a5 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/includes/zeros.h @@ -0,0 +1,74 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __ZEROS_H__ +#define __ZEROS_H__ + +#include "dynlib_matrixoperations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief create a float one value +*/ +#define szeross(in) 0.0f + +/* +** \brief create a Double one value +*/ +#define dzeross(in) 0 + +/* +** \brief create a float complex one value +*/ +#define czeross(in) FloatComplex(0.0f, 0) + +/* +** \brief create a Double complex one value +*/ +#define zzeross(in) DoubleComplex(0, 0) + + + +/* +** \brief create a float matrix full of one +*/ +EXTERN_MATOPS void szerosa ( float* in , int rows , int cols ); +/* +** \brief create a float complex matrix full of one +*/ +EXTERN_MATOPS void czerosa ( floatComplex* in , int rows ,int cols ); +/* +** \brief create a double matrix full of one +*/ +EXTERN_MATOPS void dzerosa ( double* in , int rows ,int cols ); +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void zzerosa ( doubleComplex* in , int rows ,int cols ); + +/* +** \brief create a double complex matrix full of one +*/ +EXTERN_MATOPS void dzerosh ( double* in , int rows ,int cols , int levels); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ZEROS_H__ */ diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.am b/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.am new file mode 100644 index 00000000..5cc3503c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.am @@ -0,0 +1,58 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixInfiniteNorm_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixInfiniteNorm.la + +HEAD = ../includes/infiniteNorm.h + +libMatrixInfiniteNorm_la_SOURCES = $(HEAD) \ + sinfnorma.c \ + dinfnorma.c \ + cinfnorma.c \ + zinfnorma.c + +check_PROGRAMS = testMatrixInfiniteNorm + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInfiniteNorm.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixInfiniteNorm_SOURCES = testMatrixInfiniteNorm.c +testMatrixInfiniteNorm_LDADD = $(check_LDADD) +testMatrixInfiniteNorm_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixInfiniteNorm diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.in b/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.in new file mode 100644 index 00000000..7152f5cd --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/Makefile.in @@ -0,0 +1,734 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixInfiniteNorm$(EXEEXT) +TESTS = testMatrixInfiniteNorm$(EXEEXT) +subdir = src/c/matrixOperations/infiniteNorm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixInfiniteNorm_la_LIBADD = +am__objects_1 = +am_libMatrixInfiniteNorm_la_OBJECTS = $(am__objects_1) \ + libMatrixInfiniteNorm_la-sinfnorma.lo \ + libMatrixInfiniteNorm_la-dinfnorma.lo \ + libMatrixInfiniteNorm_la-cinfnorma.lo \ + libMatrixInfiniteNorm_la-zinfnorma.lo +libMatrixInfiniteNorm_la_OBJECTS = \ + $(am_libMatrixInfiniteNorm_la_OBJECTS) +libMatrixInfiniteNorm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixInfiniteNorm_OBJECTS = \ + testMatrixInfiniteNorm-testMatrixInfiniteNorm.$(OBJEXT) +testMatrixInfiniteNorm_OBJECTS = $(am_testMatrixInfiniteNorm_OBJECTS) +testMatrixInfiniteNorm_DEPENDENCIES = $(check_LDADD) +testMatrixInfiniteNorm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixInfiniteNorm_la_SOURCES) \ + $(testMatrixInfiniteNorm_SOURCES) +DIST_SOURCES = $(libMatrixInfiniteNorm_la_SOURCES) \ + $(testMatrixInfiniteNorm_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixInfiniteNorm_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixInfiniteNorm.la +HEAD = ../includes/infiniteNorm.h +libMatrixInfiniteNorm_la_SOURCES = $(HEAD) \ + sinfnorma.c \ + dinfnorma.c \ + cinfnorma.c \ + zinfnorma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInfiniteNorm.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMatrixInfiniteNorm_SOURCES = testMatrixInfiniteNorm.c +testMatrixInfiniteNorm_LDADD = $(check_LDADD) +testMatrixInfiniteNorm_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/infiniteNorm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/infiniteNorm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixInfiniteNorm.la: $(libMatrixInfiniteNorm_la_OBJECTS) $(libMatrixInfiniteNorm_la_DEPENDENCIES) + $(libMatrixInfiniteNorm_la_LINK) -rpath $(pkglibdir) $(libMatrixInfiniteNorm_la_OBJECTS) $(libMatrixInfiniteNorm_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixInfiniteNorm$(EXEEXT): $(testMatrixInfiniteNorm_OBJECTS) $(testMatrixInfiniteNorm_DEPENDENCIES) + @rm -f testMatrixInfiniteNorm$(EXEEXT) + $(testMatrixInfiniteNorm_LINK) $(testMatrixInfiniteNorm_OBJECTS) $(testMatrixInfiniteNorm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixInfiniteNorm_la-sinfnorma.lo: sinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-sinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-sinfnorma.lo `test -f 'sinfnorma.c' || echo '$(srcdir)/'`sinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-sinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinfnorma.c' object='libMatrixInfiniteNorm_la-sinfnorma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-sinfnorma.lo `test -f 'sinfnorma.c' || echo '$(srcdir)/'`sinfnorma.c + +libMatrixInfiniteNorm_la-dinfnorma.lo: dinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-dinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-dinfnorma.lo `test -f 'dinfnorma.c' || echo '$(srcdir)/'`dinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-dinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinfnorma.c' object='libMatrixInfiniteNorm_la-dinfnorma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-dinfnorma.lo `test -f 'dinfnorma.c' || echo '$(srcdir)/'`dinfnorma.c + +libMatrixInfiniteNorm_la-cinfnorma.lo: cinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-cinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-cinfnorma.lo `test -f 'cinfnorma.c' || echo '$(srcdir)/'`cinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-cinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinfnorma.c' object='libMatrixInfiniteNorm_la-cinfnorma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-cinfnorma.lo `test -f 'cinfnorma.c' || echo '$(srcdir)/'`cinfnorma.c + +libMatrixInfiniteNorm_la-zinfnorma.lo: zinfnorma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -MT libMatrixInfiniteNorm_la-zinfnorma.lo -MD -MP -MF $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Tpo -c -o libMatrixInfiniteNorm_la-zinfnorma.lo `test -f 'zinfnorma.c' || echo '$(srcdir)/'`zinfnorma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Tpo $(DEPDIR)/libMatrixInfiniteNorm_la-zinfnorma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinfnorma.c' object='libMatrixInfiniteNorm_la-zinfnorma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInfiniteNorm_la_CFLAGS) $(CFLAGS) -c -o libMatrixInfiniteNorm_la-zinfnorma.lo `test -f 'zinfnorma.c' || echo '$(srcdir)/'`zinfnorma.c + +testMatrixInfiniteNorm-testMatrixInfiniteNorm.o: testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -MT testMatrixInfiniteNorm-testMatrixInfiniteNorm.o -MD -MP -MF $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.o `test -f 'testMatrixInfiniteNorm.c' || echo '$(srcdir)/'`testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInfiniteNorm.c' object='testMatrixInfiniteNorm-testMatrixInfiniteNorm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.o `test -f 'testMatrixInfiniteNorm.c' || echo '$(srcdir)/'`testMatrixInfiniteNorm.c + +testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj: testMatrixInfiniteNorm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -MT testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj -MD -MP -MF $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj `if test -f 'testMatrixInfiniteNorm.c'; then $(CYGPATH_W) 'testMatrixInfiniteNorm.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInfiniteNorm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Tpo $(DEPDIR)/testMatrixInfiniteNorm-testMatrixInfiniteNorm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInfiniteNorm.c' object='testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInfiniteNorm_CFLAGS) $(CFLAGS) -c -o testMatrixInfiniteNorm-testMatrixInfiniteNorm.obj `if test -f 'testMatrixInfiniteNorm.c'; then $(CYGPATH_W) 'testMatrixInfiniteNorm.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInfiniteNorm.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/cinfnorma.c b/2.3-1/src/c/matrixOperations/infiniteNorm/cinfnorma.c new file mode 100644 index 00000000..5d67aca9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/cinfnorma.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "infiniteNorm.h" + +float cinfnorma(floatComplex* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + float fltTemp = 0; + float fltRef = 0; + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + fltTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + fltTemp += spythags( creals( in[iIndex1 + iIndex2 * _iRows]), + cimags( in[iIndex1 + iIndex2 * _iRows])); + } + if(fltTemp > fltRef) + fltRef = fltTemp; + } + + return fltRef; +} + + diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/dinfnorma.c b/2.3-1/src/c/matrixOperations/infiniteNorm/dinfnorma.c new file mode 100644 index 00000000..ba414bba --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/dinfnorma.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "infiniteNorm.h" + +double dinfnorma(double* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + double dblTemp = 0; + double dblRef = 0; + + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + dblTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + dblTemp += in[iIndex1 + iIndex2 * _iRows]; + } + if(dblTemp > dblRef) + dblRef = dblTemp; + } + + return dblRef; + +} diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/sinfnorma.c b/2.3-1/src/c/matrixOperations/infiniteNorm/sinfnorma.c new file mode 100644 index 00000000..3c614afd --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/sinfnorma.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "infiniteNorm.h" + +float sinfnorma(float* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + float fltTemp = 0; + float fltRef = 0; + + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + fltTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + fltTemp += in[iIndex1 + iIndex2 * _iRows]; + } + if(fltTemp > fltRef) + fltRef = fltTemp; + } + + return fltRef; + + +} + diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c b/2.3-1/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c new file mode 100644 index 00000000..8dc4c7ff --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/testMatrixInfiniteNorm.c @@ -0,0 +1,316 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "infiniteNorm.h" + + +#define LEADDIM 10 + +#define DMATRIX_IN {0.15869047446176410,0.80895681912079453,0.72621259605512023,0.18993748771026731,\ + 0.43964602379128337,0.37921421090140939,0.95195201179012656,0.59145097108557820,\ + 0.70597065938636661,0.62873698258772492,\ +0.62407150492072105,0.68317985069006681,0.70999773032963276,0.25839814636856318,\ + 0.65407369285821915,0.76687160786241293,0.71278580836951733,0.68067426700145006,\ + 0.70181696489453316,0.28785153012722731,\ +0.63760355720296502,0.03401931514963508,0.47457459988072515,0.09878737432882190,\ + 0.58781063789501786,0.60066213225945830,0.11923700617626309,0.07392961112782359,\ + 0.40879997471347451,0.3292048736475408,\ +0.42704886104911566,0.23805456422269344,0.9438692079856992,0.06199027225375175,\ + 0.60208318661898375,0.78567356057465076,0.50091631803661585,0.94336947053670883,\ + 0.06362213846296072,0.47192330472171307,\ +0.10716815060004592,0.94920115964487195,0.14596485672518611,0.04034968325868249,\ + 0.04535020282492042,0.73871155502274632,0.32900535268709064,0.12863306934013963,\ + 0.06573933875188231,0.33537696348503232,\ +0.23822965659201145,0.21827886346727610,0.07141010463237762,0.74001471605151892,\ + 0.20294443331658840,0.55442603398114443,0.48089468106627464,0.20190807711333036,\ + 0.53310041315853596,0.55530697200447321,\ +0.94629473658278584,0.61546878470107913,0.67337385797873139,0.61626600986346602,\ + 0.78442738251760602,0.99291495559737086,0.33036959776654840,0.19693034281954169,\ + 0.03315818728879094,0.11960808141157031,\ +0.45766852516680956,0.83135433867573738,0.65369247179478407,0.6583583448082209,\ + 0.26375361625105143,0.97574284672737122,0.63044753577560186,0.89286901615560055,\ + 0.31578356493264437,0.76139996573328972,\ +0.89644787041470408,0.77340125897899270,0.19968961318954825,0.25145971449092031,\ + 0.43832763982936740,0.37096222722902894,0.21171907847747207,0.46179189579561353,\ + 0.37858232436701655,0.47909884760156274,\ +0.44384705275297165,0.4244190966710448,0.60141251794993877,0.38433500844985247,\ + 0.86648589745163918,0.30322382133454084,0.44860231317579746,0.62512917164713144,\ + 0.46195234358310699,0.28169692959636450} + +#define DRESULT_OUT 6.46840295149013400 + +#define FMATRIX_IN {0.15869047446176410f,0.80895681912079453f,0.72621259605512023f,0.18993748771026731f,\ + 0.43964602379128337f,0.37921421090140939f,0.95195201179012656f,0.59145097108557820f,\ + 0.70597065938636661f,0.62873698258772492f,\ +0.62407150492072105f,0.68317985069006681f,0.70999773032963276f,0.25839814636856318f,\ + 0.65407369285821915f,0.76687160786241293f,0.71278580836951733f,0.68067426700145006f,\ + 0.70181696489453316f,0.28785153012722731f,\ +0.63760355720296502f,0.03401931514963508f,0.47457459988072515f,0.09878737432882190f,\ + 0.58781063789501786f,0.60066213225945830f,0.11923700617626309f,0.07392961112782359f,\ + 0.40879997471347451f,0.3292048736475408f,\ +0.42704886104911566f,0.23805456422269344f,0.9438692079856992f,0.06199027225375175f,\ + 0.60208318661898375f,0.78567356057465076f,0.50091631803661585f,0.94336947053670883f,\ + 0.06362213846296072f,0.47192330472171307f,\ +0.10716815060004592f,0.94920115964487195f,0.14596485672518611f,0.04034968325868249f,\ + 0.04535020282492042f,0.73871155502274632f,0.32900535268709064f,0.12863306934013963f,\ + 0.06573933875188231f,0.33537696348503232f,\ +0.23822965659201145f,0.21827886346727610f,0.07141010463237762f,0.74001471605151892f,\ + 0.20294443331658840f,0.55442603398114443f,0.48089468106627464f,0.20190807711333036f,\ + 0.53310041315853596f,0.55530697200447321f,\ +0.94629473658278584f,0.61546878470107913f,0.67337385797873139f,0.61626600986346602f,\ + 0.78442738251760602f,0.99291495559737086f,0.33036959776654840f,0.19693034281954169f,\ + 0.03315818728879094f,0.11960808141157031f,\ +0.45766852516680956f,0.83135433867573738f,0.65369247179478407f,0.6583583448082209f,\ + 0.26375361625105143f,0.97574284672737122f,0.63044753577560186f,0.89286901615560055f,\ + 0.31578356493264437f,0.76139996573328972f,\ +0.89644787041470408f,0.77340125897899270f,0.19968961318954825f,0.25145971449092031f,\ + 0.43832763982936740f,0.37096222722902894f,0.21171907847747207f,0.46179189579561353f,\ + 0.37858232436701655f,0.47909884760156274f,\ +0.44384705275297165f,0.4244190966710448f,0.60141251794993877f,0.38433500844985247f,\ + 0.86648589745163918f,0.30322382133454084f,0.44860231317579746f,0.62512917164713144f,\ + 0.46195234358310699f,0.28169692959636450f} + +#define FRESULT_OUT 6.46840295149013400f + + +#define ZRMATRIX_IN {0.21132486546412110,0.56084860628470778,0.30760907428339124,0.50153415976092219, \ + 0.28064980218186975,0.40948254754766822,0.38737787725403905,0.53762298030778766,\ + 0.58787201577797532,0.64885628735646605,\ +0.75604385416954756,0.66235693730413914,0.93296162132173777,0.43685875833034515,\ + 0.12800584640353918,0.87841258011758327,0.92228986788541079,0.11999255046248436,\ + 0.48291792999953032,0.99231909401714802,\ +0.00022113462910056,0.72635067673400044,0.21460078610107303,0.26931248093023896,\ + 0.77831285959109664,0.11383596854284406,0.94881842611357570,0.2256303490139544,\ + 0.22328650346025825,0.05004197778180242,\ +0.33032709173858166,0.19851438421756029,0.31264199689030647,0.63257448654621840,\ + 0.21190304495394230,0.19983377400785685,0.34353372454643250,0.62740930821746588,\ + 0.84008856676518917,0.74855065811425447,\ +0.66538110421970487,0.54425731627270579,0.36163610080257058,0.40519540151581168,\ + 0.11213546665385365,0.56186607433483005,0.37601187312975526,0.76084325974807143,\ + 0.12059959070757031,0.41040589986369014,\ +0.62839178834110498,0.23207478970289230,0.2922266637906432,0.91847078315913677,\ + 0.68568959552794695,0.58961773291230202,0.73409405630081892,0.04855662025511265,\ + 0.28553641680628061,0.60845263302326202,\ +0.84974523587152362,0.23122371966019273,0.56642488157376647,0.04373343335464597,\ + 0.15312166837975383,0.68539796629920602,0.26157614728435874,0.67239497276023030,\ + 0.86075146449729800,0.85442108893766999,\ +0.68573101982474327,0.21646326314657927,0.48264719732105732,0.48185089323669672,\ + 0.69708506017923355,0.89062247332185507,0.49934938363730907,0.20171726960688829,\ + 0.84941016510128975,0.06426467280834913,\ +0.87821648130193353,0.88338878145441413,0.33217189135029912,0.26395560009405017,\ + 0.84155184263363481,0.50422128057107329,0.26385784195736051,0.39115739194676280,\ + 0.52570608118548989,0.82790829380974174,\ +0.06837403681129217,0.65251349471509457,0.59350947011262178,0.41481037065386772,\ + 0.40620247554033995,0.34936154074966908,0.52535630855709314,0.83003165572881699,\ + 0.99312098976224661,0.92623437754809856} + +#define ZIMATRIX_IN {0.56672112690284848,0.73956565884873271,0.02587099233642220,0.70648676296696067,\ + 0.96770532103255391,0.42568723810836673,0.18711117887869477,0.21240556007251143,\ + 0.69127879338338971,0.13049928424879909,\ +0.57116389367729425,0.00371731072664261,0.51744682248681784,0.52114724926650524,\ + 0.50685344357043505,0.24615605548024178,0.01895748358219862,0.57950199581682682,\ + 0.76568587962538004,0.96820035576820374,\ +0.81601104838773608,0.59005728596821427,0.39168732380494475,0.28704008506610990,\ + 0.52329764096066356,0.92295324662700295,0.84335647663101554,0.26281475694850087,\ + 0.35726496530696750,0.6561381467618048,\ +0.05689279362559319,0.3096467358991504,0.24135384149849415,0.65027950797230005,\ + 0.5596947595477104,0.10007458087056875,0.07485948316752911,0.43609866220504045,\ + 0.76933998242020607,0.24455389659851789,\ +0.55959366867318749,0.25522057106718421,0.50644348980858922,0.08813347620889544,\ + 0.56173070007935166,0.46782181179150939,0.85328151332214475,0.91105451015755534,\ + 0.54776339093223214,0.52831235667690635,\ +0.12493403162807226,0.62518793903291225,0.42361020017415285,0.44987633451819420,\ + 0.46817600261420012,0.39504976756870747,0.01245901081711054,0.80826673656702042,\ + 0.09622887428849936,0.84689256362617016,\ +0.72792222863063216,0.11574173765257001,0.28937275288626552,0.72272530803456903,\ + 0.77945467224344611,0.03661171020939946,0.18675393564626575,0.81026530498638749,\ + 0.95611717319115996,0.78766220854595304,\ +0.26777664758265018,0.61170040909200907,0.08879321813583374,0.89767962601035833,\ + 0.79010718129575253,0.51753685344010592,0.49205840751528740,0.25904283951967955,\ + 0.22074085660278797,0.12620826158672571,\ +0.54653349192813039,0.67839562846347690,0.62128817522898316,0.24278218811377883,\ + 0.98085420625284314,0.83254515705630183,0.74896081397309899,0.41390872886404395,\ + 0.01432593585923314,0.78838609857484698,\ +0.98854076582938433,0.33200952783226967,0.34549844544380903,0.43377211131155491,\ + 0.81870661024004221,0.61048321425914764,0.94149570073932409,0.35999277792870998,\ + 0.81914897728711367,0.34530424699187279} + +#define ZRESULT_OUT 8.6410312306124072989633 + +#define CRMATRIX_IN {0.21132486546412110f,0.56084860628470778f,0.30760907428339124f,0.50153415976092219f, \ + 0.28064980218186975f,0.40948254754766822f,0.38737787725403905f,0.53762298030778766f,\ + 0.58787201577797532f,0.64885628735646605f,\ +0.75604385416954756f,0.66235693730413914f,0.93296162132173777f,0.43685875833034515f,\ + 0.12800584640353918f,0.87841258011758327f,0.92228986788541079f,0.11999255046248436f,\ + 0.48291792999953032f,0.99231909401714802f,\ +0.00022113462910056f,0.72635067673400044f,0.21460078610107303f,0.26931248093023896f,\ + 0.77831285959109664f,0.11383596854284406f,0.94881842611357570f,0.2256303490139544f,\ + 0.22328650346025825f,0.05004197778180242f,\ +0.33032709173858166f,0.19851438421756029f,0.31264199689030647f,0.63257448654621840f,\ + 0.21190304495394230f,0.19983377400785685f,0.34353372454643250f,0.62740930821746588f,\ + 0.84008856676518917f,0.74855065811425447f,\ +0.66538110421970487f,0.54425731627270579f,0.36163610080257058f,0.40519540151581168f,\ + 0.11213546665385365f,0.56186607433483005f,0.37601187312975526f,0.76084325974807143f,\ + 0.12059959070757031f,0.41040589986369014f,\ +0.62839178834110498f,0.23207478970289230f,0.2922266637906432f,0.91847078315913677f,\ + 0.68568959552794695f,0.58961773291230202f,0.73409405630081892f,0.04855662025511265f,\ + 0.28553641680628061f,0.60845263302326202f,\ +0.84974523587152362f,0.23122371966019273f,0.56642488157376647f,0.04373343335464597f,\ + 0.15312166837975383f,0.68539796629920602f,0.26157614728435874f,0.67239497276023030f,\ + 0.86075146449729800f,0.85442108893766999f,\ +0.68573101982474327f,0.21646326314657927f,0.48264719732105732f,0.48185089323669672f,\ + 0.69708506017923355f,0.89062247332185507f,0.49934938363730907f,0.20171726960688829f,\ + 0.84941016510128975f,0.06426467280834913f,\ +0.87821648130193353f,0.88338878145441413f,0.33217189135029912f,0.26395560009405017f,\ + 0.84155184263363481f,0.50422128057107329f,0.26385784195736051f,0.39115739194676280f,\ + 0.52570608118548989f,0.82790829380974174f,\ +0.06837403681129217f,0.65251349471509457f,0.59350947011262178f,0.41481037065386772f,\ + 0.40620247554033995f,0.34936154074966908f,0.52535630855709314f,0.83003165572881699f,\ + 0.99312098976224661f,0.92623437754809856f} + +#define CIMATRIX_IN {0.56672112690284848f,0.73956565884873271f,0.02587099233642220f,0.70648676296696067f,\ + 0.96770532103255391f,0.42568723810836673f,0.18711117887869477f,0.21240556007251143f,\ + 0.69127879338338971f,0.13049928424879909f,\ +0.57116389367729425f,0.00371731072664261f,0.51744682248681784f,0.52114724926650524f,\ + 0.50685344357043505f,0.24615605548024178f,0.01895748358219862f,0.57950199581682682f,\ + 0.76568587962538004f,0.96820035576820374f,\ +0.81601104838773608f,0.59005728596821427f,0.39168732380494475f,0.28704008506610990f,\ + 0.52329764096066356f,0.92295324662700295f,0.84335647663101554f,0.26281475694850087f,\ + 0.35726496530696750f,0.6561381467618048f,\ +0.05689279362559319f,0.3096467358991504f,0.24135384149849415f,0.65027950797230005f,\ + 0.5596947595477104f,0.10007458087056875f,0.07485948316752911f,0.43609866220504045f,\ + 0.76933998242020607f,0.24455389659851789f,\ +0.55959366867318749f,0.25522057106718421f,0.50644348980858922f,0.08813347620889544f,\ + 0.56173070007935166f,0.46782181179150939f,0.85328151332214475f,0.91105451015755534f,\ + 0.54776339093223214f,0.52831235667690635f,\ +0.12493403162807226f,0.62518793903291225f,0.42361020017415285f,0.44987633451819420f,\ + 0.46817600261420012f,0.39504976756870747f,0.01245901081711054f,0.80826673656702042f,\ + 0.09622887428849936f,0.84689256362617016f,\ +0.72792222863063216f,0.11574173765257001f,0.28937275288626552f,0.72272530803456903f,\ + 0.77945467224344611f,0.03661171020939946f,0.18675393564626575f,0.81026530498638749f,\ + 0.95611717319115996f,0.78766220854595304f,\ +0.26777664758265018f,0.61170040909200907f,0.08879321813583374f,0.89767962601035833f,\ + 0.79010718129575253f,0.51753685344010592f,0.49205840751528740f,0.25904283951967955f,\ + 0.22074085660278797f,0.12620826158672571f,\ +0.54653349192813039f,0.67839562846347690f,0.62128817522898316f,0.24278218811377883f,\ + 0.98085420625284314f,0.83254515705630183f,0.74896081397309899f,0.41390872886404395f,\ + 0.01432593585923314f,0.78838609857484698f,\ +0.98854076582938433f,0.33200952783226967f,0.34549844544380903f,0.43377211131155491f,\ + 0.81870661024004221f,0.61048321425914764f,0.94149570073932409f,0.35999277792870998f,\ + 0.81914897728711367f,0.34530424699187279f} + +#define CRESULT_OUT 8.6410312306124072989633f + +static void sinfnormaTest(void) { + + float in[] = FMATRIX_IN ; + + float out = 0; + + float result = FRESULT_OUT ; + + out = sinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %e\tresult : %e\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 1e-6 ) ; + + + +} + +static void dinfnormaTest(void) { + + double in[] = DMATRIX_IN ; + + double out = 0; + + double result = DRESULT_OUT ; + + out = dinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-16 ) ; + + + +} + +static void zinfnormaTest(void) { + + double Rin[] = ZRMATRIX_IN ; + double Iin[] = ZIMATRIX_IN ; + + doubleComplex* in = DoubleComplexMatrix ( Rin , Iin , LEADDIM*LEADDIM ) ; + + double out = 0; + + double result = ZRESULT_OUT ; + + out = zinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-16 ) ; + + + +} + +static void cinfnormaTest(void) { + + float Rin[] = CRMATRIX_IN ; + float Iin[] = CIMATRIX_IN ; + + floatComplex* in = FloatComplexMatrix ( Rin , Iin , LEADDIM*LEADDIM ) ; + + float out = 0; + + float result = CRESULT_OUT ; + + out = cinfnorma ( in , LEADDIM , LEADDIM ); + + printf ( "\t\t out : %.16f\tresult : %.16f\tassert : %e \n" , out , result , fabs ( out - result ) / fabs( out) ) ; + assert ( fabs ( out - result ) / fabs( out) < 3e-6 ) ; + + + +} + +static int testInfiniteNorm(void) { + + printf("\n>>>> Matrix Exponential Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dinfnormaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sinfnormaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cinfnormaTest();; + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zinfnormaTest(); + + return 0; +} + + + +int main(void) { + assert(testInfiniteNorm() == 0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj b/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj new file mode 100644 index 00000000..2b4cd276 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {43BF5E9A-3456-45FE-9DEF-9E962B4D4E3D} + testMatrixInfiniteNorm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../auxiliaryFunctions/includes;../../../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters b/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters new file mode 100644 index 00000000..4d00eb49 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/test_MatrixInfiniteNorm/testMatrixInfiniteNorm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/infiniteNorm/zinfnorma.c b/2.3-1/src/c/matrixOperations/infiniteNorm/zinfnorma.c new file mode 100644 index 00000000..bc683903 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/infiniteNorm/zinfnorma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "infiniteNorm.h" + +double zinfnorma(doubleComplex* in, int _iRows, int _iCols) +{ + int iIndex1 = 0, iIndex2 = 0; + double dblTemp = 0; + double dblRef = 0; + + for(iIndex1 = 0 ; iIndex1 < _iRows ; iIndex1++) + { + dblTemp = 0; + for(iIndex2 = 0 ; iIndex2 < _iCols ; iIndex2++) + { + dblTemp += dpythags( zreals( in[iIndex1 + iIndex2 * _iRows]), + zimags( in[iIndex1 + iIndex2 * _iRows])); + } + if(dblTemp > dblRef) + dblRef = dblTemp; + } + + return dblRef; +} diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpApex.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpApex.h new file mode 100644 index 00000000..4915e204 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpApex.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPAPEX_H__ +#define __INT_OPAPEX_H__ + +#define s0OpApexs0(in) in + +#define d0OpApexd0(in) in + +#define c0OpApexc0(in) cconjs(in) + +#define z0OpApexz0(in) zconjs(in) + +#define s2OpApexs2(in,size,out) stransposea(in,size[0],size[1],out); + +#define d2OpApexd2(in,size,out) dtransposea(in,size[0],size[1],out); + +#define c2OpApexc2(in,size,out) ctransposea(in,size[0],size[1],out);cconja(out,size[0]*size[1],out); + +#define z2OpApexz2(in,size,out) ztransposea(in,size[0],size[1],out);zconja(out,size[0]*size[1],out); + +#endif /* !__INT_OPAPEX_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpBackSlash.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpBackSlash.h new file mode 100644 index 00000000..898c37be --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpBackSlash.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPBACKSLASH_H__ +#define __INT_OPBACKSLASH_H__ + +/* Matrix \ Matrix */ + +#define s2s2OpBackSlashs2(in1,size1,in2,size2,out) sldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpBackSlashd2(in1,size1,in2,size2,out) dldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpBackSlashz2(in1,size1,in2,size2,out) zldivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpBackSlashc2(in1,size1,in2,size2,out) cldivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPBACKSLASH_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpCc.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpCc.h new file mode 100644 index 00000000..2cd3d558 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpCc.h @@ -0,0 +1,134 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPCC_H__ +#define __INT_OPCC_H__ + +/* + /!\ + / ! \ We used rowcat because disp isn't right. In the real case, it must be columncat for Cc. + /__!_ \ + +*/ + + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpCcs2(in1,in2,out) srowcats(in1,in2,out) + +#define d0d0OpCcd2(in1,in2,out) drowcats(in1,in2,out) + +#define c0c0OpCcc2(in1,in2,out) crowcats(in1,in2,out) + +#define z0z0OpCcz2(in1,in2,out) zrowcats(in1,in2,out) + +#define s2s2OpCcs2(in1,size1,in2,size2,out) srowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2OpCcd2(in1,size1,in2,size2,out) drowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define c2c2OpCcc2(in1,size1,in2,size2,out) crowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2OpCcz2(in1,size1,in2,size2,out) zrowcata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* Differents input elements */ +#define s0c0OpCcc2(in1,in2,out) c0c0OpCcc2(FloatComplex(in1,0),in2,out) + +#define d0z0OpCcz2(in1,in2,out) z0z0OpCcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0OpCcc2(in1,in2,out) c0c0OpCcc2(in1,FloatComplex(in2,0),out) + +#define z0d0OpCcz2(in1,in2,out) z0z0OpCcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2OpCcc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpCcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2OpCcz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpCcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2OpCcc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpCcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2OpCcz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpCcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0OpCcs2(in1,size,in2,out) { float temp=in2; \ + srowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0OpCcd2(in1,size,in2,out) { double temp=in2; \ + drowcata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0OpCcc2(in1,size,in2,out) { floatComplex temp = in2; \ + crowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + +#define z2z0OpCcz2(in1,size,in2,out) { doubleComplex temp =in2; \ + zrowcata(in1, size[0], size[1],&temp, 1, 1, out);\ + } + + +/* Different type */ +#define s2c0OpCcc2(in1,size,in2,out) sfilla((float *)out,size[0],size[1],0); \ + c2c0OpCcc2(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]),size,in2,out) + +#define d2z0OpCcz2(in1,size,in2,out) dfilla((double *)out,size[0],size[1],0); \ + z2z0OpCcz2(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]),size,in2,out) + +#define c2s0OpCcc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2, 0); c2c0OpCcc2(in1, size, temp, out)} + +#define z2d0OpCcz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2, 0); z2z0OpCcz2(in1, size, temp, out)} + + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpCcs2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + srowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define d0d2OpCcd2(in1,in2,size,out) { \ + double __tmp1 = in1 ;\ + drowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define c0c2OpCcc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + crowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2OpCcz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zrowcata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +/* Different type */ +#define s0c2OpCcc2(in1,in2,size,out) c0c2OpCcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2OpCcz2(in1,in2,size,out) z0z2OpCcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2OpCcc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpCcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2OpCcz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpCcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + +#endif /* !__INT_OPCC_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpDotApex.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpDotApex.h new file mode 100644 index 00000000..4978ca56 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpDotApex.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPDOTAPEX_H__ +#define __INT_OPDOTAPEX_H__ + +#define s0OpDotApexs0(in) in + +#define d0OpDotApexd0(in) in + +#define c0OpDotApexc0(in) in + +#define z0OpDotApexz0(in) in + +#define s2OpDotApexs2(in,size,out) stransposea(in,size[0],size[1],out); + +#define d2OpDotApexd2(in,size,out) dtransposea(in,size[0],size[1],out); + +#define c2OpDotApexc2(in,size,out) ctransposea(in,size[0],size[1],out); + +#define z2OpDotApexz2(in,size,out) ztransposea(in,size[0],size[1],out); + +#endif /* !__INT_OPDOTAPEX_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpRc.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpRc.h new file mode 100644 index 00000000..1e8f1c92 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpRc.h @@ -0,0 +1,139 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPRC_H__ +#define __INT_OPRC_H__ + +/* + /!\ + / ! \ We used columncat because disp isn't right. In the real case, it must be rowcat for Rc. + /__!_ \ + +*/ + + +/* Column Cat */ + +/* Same input elements */ + +#define s0s0OpRcs2(in1,in2,out) scolumncats(in1,in2,out) + +#define d0d0OpRcd2(in1,in2,out) dcolumncats(in1,in2,out) + +#define c0c0OpRcc2(in1,in2,out) ccolumncats(in1,in2,out) + +#define z0z0OpRcz2(in1,in2,out) zcolumncats(in1,in2,out) + +#define s2s2OpRcs2(in1,size1,in2,size2,out) scolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define d2d2OpRcd2(in1,size1,in2,size2,out) dcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define c2c2OpRcc2(in1,size1,in2,size2,out) ccolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +#define z2z2OpRcz2(in1,size1,in2,size2,out) zcolumncata(in1, size1[0], size1[1], in2, size2[0], size2[1], out) + +/* Differents input elements */ +#define s0c0OpRcc2(in1,in2,out) c0c0OpRcc2(FloatComplex(in1,0),in2,out) + +#define d0z0OpRcz2(in1,in2,out) z0z0OpRcz2(DoubleComplex(in1,0),in2,out) + +#define c0s0OpRcc2(in1,in2,out) c0c0OpRcc2(in1,FloatComplex(in2,0),out) + +#define z0d0OpRcz2(in1,in2,out) z0z0OpRcz2(in1,DoubleComplex(in2,0),out) + +#define s2c2OpRcc2(in1,size1,in2,size2,out) sfilla((float*)out,size1[0],size1[1],0); \ + c2c2OpRcc2(FloatComplexMatrix(in1,(float*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define d2z2OpRcz2(in1,size1,in2,size2,out) dfilla((double*)out,size1[0],size1[1],0); \ + z2z2OpRcz2(DoubleComplexMatrix(in1,(double*)out,size1[0]*size1[1]), size1, in2, size2, out) + +#define c2s2OpRcc2(in1,size1,in2,size2,out) sfilla((float*)out,size2[0],size2[1],0); \ + c2c2OpRcc2(in1, size1, FloatComplexMatrix(in2,(float*)out,size2[0]*size2[1]), size2, out) + +#define z2d2OpRcz2(in1,size1,in2,size2,out) dfilla((double*)out,size2[0],size2[1],0); \ + z2z2OpRcz2(in1, size1, DoubleComplexMatrix(in2,(double*)out,size2[0]*size2[1]), size2, out) + +/* Matrix-Scalar */ + +/* Same type */ + +#define s2s0OpRcs2(in1,size,in2,out) { float temp=in2; \ + scolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define d2d0OpRcd2(in1,size,in2,out) { double temp=in2; \ + dcolumncata(in1, size[0], size[1],&temp, 1, 1, out); \ + } + +#define c2c0OpRcc2(in1,size,in2,out) { floatComplex temp=in2; \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2z0OpRcz2(in1,size,in2,out) { doubleComplex temp=in2; \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +/* Different type */ +#define s2c0OpRcc2(in1,size,in2,out) { floatComplex temp=in2; \ + sfilla((float *)out,size[0],size[1],0); \ + scolumncata(FloatComplexMatrix(in1,(float*)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define d2z0OpRcz2(in1,size,in2,out) { doubleComplex temp=in2; \ + dfilla((double *)out,size[0],size[1],0); \ + zcolumncata(DoubleComplexMatrix(in1,(double *)out,size[0]*size[1]), size[0], size[1], &temp , 1, 1, out); \ + } + +#define c2s0OpRcc2(in1,size,in2,out) { floatComplex temp = FloatComplex(in2,0); \ + ccolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +#define z2d0OpRcz2(in1,size,in2,out) { doubleComplex temp = DoubleComplex(in2,0); \ + zcolumncata(in1, size[0], size[1], &temp, 1, 1, out); \ + } + +/* Scalar-Matrix */ + +/* Same type */ +#define s0s2OpRcs2(in1,in2,size,out) { \ + float __tmp1 = in1 ;\ + scolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out);\ +} +#define d0d2OpRcd2(in1,in2,size,out) {\ + double __tmp1 = in1 ;\ + dcolumncata(&__tmp1 , 1, 1, in2, size[0], size[1], out); \ +} + +#define c0c2OpRcc2(in1,in2,size,out) { \ + floatComplex __tmp1 = in1 ;\ + ccolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +#define z0z2OpRcz2(in1,in2,size,out) { \ + doubleComplex __tmp1 = in1 ;\ + zcolumncata(&__tmp1, 1, 1, in2, size[0], size[1], out);\ +} + +/* Different type */ +#define s0c2OpRcc2(in1,in2,size,out) c0c2OpRcc2(FloatComplex(in1,0),in2,size,out) + +#define d0z2OpRcz2(in1,in2,size,out) z0z2OpRcz2(DoubleComplex(in1,0),in2,size,out) + +#define c0s2OpRcc2(in1,in2,size,out) sfilla((float*)out,size[0],size[1],0); \ + c0c2OpRcc2(in1,FloatComplexMatrix(in2,(float*)out,size[0]*size[1]),size,out) + +#define z0d2OpRcz2(in1,in2,size,out) dfilla((double*)out,size[0],size[1],0); \ + z0z2OpRcz2(in1,DoubleComplexMatrix(in2,(double*)out,size[0]*size[1]),size,out) + +#endif /* !__INT_OPRC_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpSlash.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpSlash.h new file mode 100644 index 00000000..20930a0a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpSlash.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPSLASH_H__ +#define __INT_OPSLASH_H__ + + +/* Matrix / Matrix */ + +#define s2s2OpSlashs2(in1,size1,in2,size2,out) srdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpSlashd2(in1,size1,in2,size2,out) drdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpSlashc2(in1,size1,in2,size2,out) crdivma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpSlashz2(in1,size1,in2,size2,out) zrdivma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpSlashc2(in1,size1,in2,size2,out) crdivma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define d2z2OpSlashc2(in1,size1,in2,size2,out) crdivma(DoubleComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPSLASH_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_OpStar.h b/2.3-1/src/c/matrixOperations/interfaces/int_OpStar.h new file mode 100644 index 00000000..400918a4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_OpStar.h @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPSTAR_H__ +#define __INT_OPSTAR_H__ + +/* Matrix * Matrix */ + +#define s2s2OpStars2(in1,size1,in2,size2,out) smulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define d2d2OpStard2(in1,size1,in2,size2,out) dmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2c2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define c2s2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],FloatComplexMatrix(in2,0,size2[0]*size2[1]),size2[0],size2[1],out) + +#define s2c2OpStarc2(in1,size1,in2,size2,out) cmulma(FloatComplexMatrix(in1,0,size1[0]*size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2z2OpStarz2(in1,size1,in2,size2,out) zmulma(in1,size1[0],size1[1],in2,size2[0],size2[1],out) + +#define z2d2OpStarc2(in1,size1,in2,size2,out) cmulma(in1,size1[0],size1[1],DoubleComplexMatrix(in2,0,size2[0],size2[1]),size2[0],size2[1],out) + +#define d2z2OpStarc2(in1,size1,in2,size2,out) cmulma(DoubleComplexMatrix(in1,0,size1[0],size1[1]),size1[0],size1[1],in2,size2[0],size2[1],out) + + +#endif /* !__INT_OPSTAR_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_chol.h b/2.3-1/src/c/matrixOperations/interfaces/int_chol.h new file mode 100644 index 00000000..861ad4d1 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_chol.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CHOL_H__ +#define __INT_CHOL_H__ + +#define s0chols0(in) schols(in) + +#define d0chold0(in) dchols(in) + +#define c0cholc0(in) cchols(in) + +#define z0cholz0(in) zchols(in) + +#define s2chols2(in,size,out) schola(in, size[0], out) + +#define d2chold2(in,size,out) dchola(in, size[0], out) + +#define c2cholc2(in,size,out) cchola(in, size[0], out) + +#define z2cholz2(in,size,out) zchola(in, size[0], out) + +#endif /* !__INT_CHOL_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_det.h b/2.3-1/src/c/matrixOperations/interfaces/int_det.h new file mode 100644 index 00000000..f7760b16 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_det.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DETERM_H__ +#define __INT_DETERM_H__ + +#define s0dets0(in) in + +#define d0detd0(in) in + +#define c0detc0(in) in + +#define z0detz0(in) in + +#define s2dets0(in,size) sdeterma(in, size[0]) + +#define d2detd0(in,size) ddeterma(in, size[0]) + +#define c2detc0(in,size) cdeterma(in, size[0]) + +#define z2detz0(in,size) zdeterma(in, size[0]) + +#endif /* !__INT_DETERM_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_dist.h b/2.3-1/src/c/matrixOperations/interfaces/int_dist.h new file mode 100644 index 00000000..36809c78 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_dist.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DIST_H__ +#define __INT_DIST_H__ + +#define s0s0dists0(in1,in2) sdists(in1,in2) + +#define d0d0distd0(in1,in2) ddists(in1,in2) + +#define c0c0dists0(in1,in2) cdists(in1,in2) + +#define z0z0distd0(in1,in2) zdists(in1,in2) + +#define s2s2dists0(in1,size1,in2,size2) sdista(in1, in2, size1[0], size2[1]) + +#define d2d2distd0(in1,size1,in2,size2) ddista(in1, in2, size1[0], size2[1]) + +#define c2c2dists0(in1,size1,in2,size2) cdista(in1, in2, size1[0], size2[1]) + +#define z2z2distd0(in1,size1,in2,size2) zdista(in1, in2, size1[0], size2[1]) + +#endif /* !__INT_DIST_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_expm.h b/2.3-1/src/c/matrixOperations/interfaces/int_expm.h new file mode 100644 index 00000000..6e54fb32 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_expm.h @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_EXPM_H__ +#define __INT_EXPM_H__ + +#define s2expms2(in,size,out) sexpma(in, out, size[0]) + +#define d2expmd2(in,size,out) dexpma(in, out, size[0]) + +#define c2expmc2(in,size,out) cexpma(in, out, size[0]) + +#define z2expmz2(in,size,out) zexpma(in, out, size[0]) + +#endif /* !__INT_EXPM_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_eye.h b/2.3-1/src/c/matrixOperations/interfaces/int_eye.h new file mode 100644 index 00000000..81ed7fdd --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_eye.h @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_EYE_H__ +#define __INT_EYE_H__ + + +#define eyes0() 1.0f + +#define eyed0() 1 + + + +#define s0eyes0(in) seyes(in) + +#define d0eyed0(in) deyes(in) + +#define c0eyec0(in) ceyes(in) + +#define z0eyez0(in) zeyes(in) + + +#define s0s0eyes0(in1,in2) 1.0f + +#define d0d0eyed0(in,in2) 1 + + +#define s0s0eyes2(in1,in2,out) seyea(out, in1, in2) + +#define d0d0eyed2(in1,in2,out) deyea(out, in1, in2) + + +#define s2eyes2(in,size,out) seyea(out, size[0], size[1]) + +#define d2eyed2(in,size,out) deyea(out, size[0], size[1]) + +#define c2eyec2(in,size,out) ceyea(out, size[0], size[1]) + +#define z2eyez2(in,size,out) zeyea(out, size[0], size[1]) + + +#endif /* !__INT_EYE_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_fill.h b/2.3-1/src/c/matrixOperations/interfaces/int_fill.h new file mode 100644 index 00000000..5614cb1f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_fill.h @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_FILL_H__ +#define __INT_FILL_H__ + + +#define fills0(in) in; + +#define filld0(in) in; + +#define fillc0(in) in; + +#define fillz0(in) in; + +#define s0fills0(in,out) out=in; + +#define d0filld0(in,out) out=in; + +#define c0fillc0(in,out) out=in; + +#define z0fillz0(in,out) out=in; + +#define s2s0fills2(in1,size,in2,out) sfilla(out,size[0],size[1],in2); + +#define d2d0filld2(in1,size,in2,out) dfilla(out,size[0],size[1],in2); + +#define c2c0fillc2(in1,size,in2,out) cfilla(out,size[0],size[1],in2); + +#define z2z0fillz2(in1,size,in2,out) zfilla(out,size[0],size[1],in2); + +#define s0s0s0fills2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define d0d0d0filld2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define s0s0c0fillc2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#define d0d0z0fillz2(in1,in2,in3,out) sfilla(out,in1,in2,in3) + +#endif /* !__INT_FILL_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_invert.h b/2.3-1/src/c/matrixOperations/interfaces/int_invert.h new file mode 100644 index 00000000..d31481b6 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_invert.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_INV_H__ +#define __INT_INV_H__ + +#define s0invs0(in) 1.0f/in + +#define d0invd0(in) 1.0/in + +#define c0invc0(in) crdivs(FloatComplex(1,0),in) + +#define z0invz0(in) zrdivs(DoubleComplex(1,0),in) + +#define s2invs2(in,size,out) sinverma(in, out, size[0]) + +#define d2invd2(in,size,out) dinverma(in, out, size[0]) + +#define c2invc2(in,size,out) cinverma(in, out, size[0]) + +#define z2invz2(in,size,out) zinverma(in, out, size[0]) + +#endif /* !__INT_INV_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_ones.h b/2.3-1/src/c/matrixOperations/interfaces/int_ones.h new file mode 100644 index 00000000..0259b4c6 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_ones.h @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_ONES_H__ +#define __INT_ONES_H__ + + +#define oness0() 1.0f + +#define onesd0() 1 + + + +#define s0oness0(in) soness(in) + +#define d0onesd0(in) doness(in) + +#define c0onesc0(in) coness(in) + +#define z0onesz0(in) zoness(in) + + +#define s0s0oness0(in1,in2) 1.0f + +#define d0d0onesd0(in,in2) 1 + + +#define s0s0oness2(in1,in2,out) sonesa(out, in1, in2) + +#define d0d0onesd2(in1,in2,out) donesa(out, in1, in2) + + +#define s2oness2(in,size,out) sonesa(out, size[0], size[1]) + +#define d2onesd2(in,size,out) donesa(out, size[0], size[1]) + +#define c2onesc2(in,size,out) conesa(out, size[0], size[1]) + +#define z2onesz2(in,size,out) zonesa(out, size[0], size[1]) + + +#endif /* !__INT_ONES_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_spec.h b/2.3-1/src/c/matrixOperations/interfaces/int_spec.h new file mode 100644 index 00000000..77ab55e7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_spec.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_SPEC_H__ +#define __INT_SPEC_H__ + +/* Only eigenvalues */ + +#define s0specc0(in) FloatComplex (sspecs(in) , 0) + +#define d0specz0(in) DoubleComplex ( dspecs(in) , 0) + +#define c0specc0(in) cspecs(in) + +#define z0specz0(in) zspecs(in) + +#define s2specc2(in,size,out) {float* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(float)));\ + szerosa(ZEROS,size[0],size[0]);\ + cspeca(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0], out);\ + } + +#define d2specz2(in,size,out) {double* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(double)));\ + dzerosa(ZEROS,size[0],size[0]);\ + zspeca(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out);\ + } + +#define c2specc2(in,size,out) cspeca(in, size[0], out) + +#define z2specz2(in,size,out) zspeca(in, size[0], out) + +/* Eigenvalues and eigenvectors */ + +#define s0specc0c0(in,out) cspec2s(FloatComplex( in,0) ,out) + +#define d0specz0z0(in,out) zspec2s(DoubleComplex(in,0) ,out) + +#define c0specc0c0(in,out) cspec2s(in,out) + +#define z0specz0z0(in,out) zspec2s(in,out) + +#define s2specc2c2(in,size,out1,out2) {float* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(float)));\ + szerosa(ZEROS,size[0],size[0]);\ + cspec2a(FloatComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\ + } + +#define d2specz2z2(in,size,out1,out2) {double* ZEROS;\ + ZEROS=malloc((uint)(size[0]*size[0]*sizeof(double)));\ + dzerosa(ZEROS,size[0],size[0]);\ + zspec2a(DoubleComplexMatrix(in,ZEROS,size[0]*size[0]), size[0] , out1 , out2 );\ + } + + +#define c2specc2c2(in,size,out1,out2) cspec2a(in, size[0], out2, out1) + +#define z2specz2z2(in,size,out1,out2) zspec2a(in, size[0], out2, out1) + +#endif /* !__INT_SPEC_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_trace.h b/2.3-1/src/c/matrixOperations/interfaces/int_trace.h new file mode 100644 index 00000000..8bfea860 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_trace.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TRACE_H__ +#define __INT_TRACE_H__ + +#define s0traces0(in) in + +#define d0traced0(in) in + +#define c0tracec0(in) in + +#define z0tracez0(in) in + +#define s2traces0(in,size) stracea(in, size[0]) + +#define d2traced0(in,size) dtracea(in, size[0]) + +#define c2tracec0(in,size) ctracea(in, size[0]) + +#define z2tracez0(in,size) ztracea(in, size[0]) + +#endif /* !__INT_TRACE_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_transpose.h b/2.3-1/src/c/matrixOperations/interfaces/int_transpose.h new file mode 100644 index 00000000..250d565f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_transpose.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_TRANSPOSE_H__ +#define __INT_TRANSPOSE_H__ + +#define s0transposes0(in) in + +#define d0transposed0(in) in + +#define c0transposec0(in) in + +#define z0transposez0(in) in + +#define s2transposes2(in,size,out) stransposea(in, size[0], size[1], out) + +#define d2transposed2(in,size,out) dtransposea(in, size[0], size[1], out) + +#define c2transposec2(in,size,out) ctransposea(in, size[0], size[1], out) + +#define z2transposez2(in,size,out) ztransposea(in, size[0], size[1], out) + +#endif /* !__INT_TRANSPOSE_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_v2magn.h b/2.3-1/src/c/matrixOperations/interfaces/int_v2magn.h new file mode 100644 index 00000000..759cecf1 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_v2magn.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_V2MAGN_H__ +#define __INT_V2MAGN_H__ + +#define s0v2magns0(in) ssquMagns(in) + +#define d0v2magnd0(in) dsquMagns(in) + +#define c0v2magnc0(in) csquMagns(in) + +#define z0v2magnz0(in) zsquMagns(in) + +#define s2v2magns2(in,size) ssquMagna(in, size[0], size[1]) + +#define d2v2magnd2(in,size) dsquMagna(in, size[0], size[1]) + +#define c2v2magnc2(in,size) csquMagna(in, size[0], size[1]) + +#define z2v2magnz2(in,size) zsquMagna(in, size[0], size[1]) + +#endif /* !__INT_V2MAGN_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_vmagn.h b/2.3-1/src/c/matrixOperations/interfaces/int_vmagn.h new file mode 100644 index 00000000..8a51755e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_vmagn.h @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_VMAGN_H__ +#define __INT_VMAGN_H__ + + +#define s0vmagns0(in) smagns(in) + +#define d0vmagnd0(in) dmagns(in) + +#define c0vmagnc0(in) cmagns(in) + +#define z0vmagnz0(in) zmagns(in) + +#define s2vmagns2(in,size) smagna(in, size[0], size[1]) + +#define d2vmagnd2(in,size) dmagna(in, size[0], size[1]) + +#define c2vmagnc2(in,size) cmagna(in, size[0], size[1]) + +#define z2vmagnz2(in,size) zmagna(in, size[0], size[1]) + +#endif /* !__INT_VMAGN_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h b/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h new file mode 100644 index 00000000..4bc32138 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/int_zeros.h @@ -0,0 +1,54 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_ZEROS_H__ +#define __INT_ZEROS_H__ + + +#define zeross0() 0.0f + +#define zerosd0() 0 + + + +#define s0zeross0(in) szeross(in) + +#define d0zerosd0(in) dzeross(in) + +#define c0zerosc0(in) czeross(in) + +#define z0zerosz0(in) zzeross(in) + + +#define s0s0zeross0(in1,in2) 0.0f + +#define d0d0zerosd0(in,in2) 0 + + +#define s0s0zeross2(in1,in2,out) szerosa(out, in1, in2) + +#define d0d0zerosd2(in1,in2,out) dzerosa(out, in1, in2) + + +#define s2zeross2(in,size,out) szerosa(out, size[0], size[1]) + +#define d2zerosd2(in,size,out) dzerosa(out, size[0], size[1]) + +#define c2zerosc2(in,size,out) czerosa(out, size[0], size[1]) + +#define z2zerosz2(in,size,out) zzerosa(out, size[0], size[1]) + +#define d0d0d0zerosd3(in1, in2, in3, out) dzerosh(out, in1, in2, in3); +#endif /* !__INT_ZEROS_H__ */ diff --git a/2.3-1/src/c/matrixOperations/interfaces/interface.sh b/2.3-1/src/c/matrixOperations/interfaces/interface.sh new file mode 100644 index 00000000..8c7f073b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/interfaces/interface.sh @@ -0,0 +1,6 @@ +for i in $@; do + +./generateInterfaces.pl --function-name $i --header-file int_$i.h + +done + diff --git a/2.3-1/src/c/matrixOperations/inversion/Makefile.am b/2.3-1/src/c/matrixOperations/inversion/Makefile.am new file mode 100644 index 00000000..aa5890e3 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/Makefile.am @@ -0,0 +1,56 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixInversion.la + +HEAD = ../includes/matrixInversion.h + +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_PROGRAMS = testMatrixInversion + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixInversion diff --git a/2.3-1/src/c/matrixOperations/inversion/Makefile.in b/2.3-1/src/c/matrixOperations/inversion/Makefile.in new file mode 100644 index 00000000..5ce88abc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/Makefile.in @@ -0,0 +1,731 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixInversion$(EXEEXT) +TESTS = testMatrixInversion$(EXEEXT) +subdir = src/c/matrixOperations/inversion +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixInversion_la_LIBADD = +am__objects_1 = +am_libMatrixInversion_la_OBJECTS = $(am__objects_1) \ + libMatrixInversion_la-sinverma.lo \ + libMatrixInversion_la-dinverma.lo \ + libMatrixInversion_la-cinverma.lo \ + libMatrixInversion_la-zinverma.lo +libMatrixInversion_la_OBJECTS = $(am_libMatrixInversion_la_OBJECTS) +libMatrixInversion_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixInversion_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixInversion_OBJECTS = \ + testMatrixInversion-testMatrixInversion.$(OBJEXT) +testMatrixInversion_OBJECTS = $(am_testMatrixInversion_OBJECTS) +testMatrixInversion_DEPENDENCIES = $(check_LDADD) +testMatrixInversion_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixInversion_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_SOURCES) +DIST_SOURCES = $(libMatrixInversion_la_SOURCES) \ + $(testMatrixInversion_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixInversion_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixInversion.la +HEAD = ../includes/matrixInversion.h +libMatrixInversion_la_SOURCES = $(HEAD) \ + sinverma.c \ + dinverma.c \ + cinverma.c \ + zinverma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixInversion.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes + +testMatrixInversion_SOURCES = testMatrixInversion.c +testMatrixInversion_LDADD = $(check_LDADD) +testMatrixInversion_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/inversion/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/inversion/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixInversion.la: $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_la_DEPENDENCIES) + $(libMatrixInversion_la_LINK) -rpath $(pkglibdir) $(libMatrixInversion_la_OBJECTS) $(libMatrixInversion_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixInversion$(EXEEXT): $(testMatrixInversion_OBJECTS) $(testMatrixInversion_DEPENDENCIES) + @rm -f testMatrixInversion$(EXEEXT) + $(testMatrixInversion_LINK) $(testMatrixInversion_OBJECTS) $(testMatrixInversion_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-cinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-dinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-sinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixInversion_la-zinverma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixInversion-testMatrixInversion.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixInversion_la-sinverma.lo: sinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-sinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-sinverma.Tpo $(DEPDIR)/libMatrixInversion_la-sinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sinverma.c' object='libMatrixInversion_la-sinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-sinverma.lo `test -f 'sinverma.c' || echo '$(srcdir)/'`sinverma.c + +libMatrixInversion_la-dinverma.lo: dinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-dinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-dinverma.Tpo $(DEPDIR)/libMatrixInversion_la-dinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dinverma.c' object='libMatrixInversion_la-dinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-dinverma.lo `test -f 'dinverma.c' || echo '$(srcdir)/'`dinverma.c + +libMatrixInversion_la-cinverma.lo: cinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-cinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-cinverma.Tpo $(DEPDIR)/libMatrixInversion_la-cinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cinverma.c' object='libMatrixInversion_la-cinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-cinverma.lo `test -f 'cinverma.c' || echo '$(srcdir)/'`cinverma.c + +libMatrixInversion_la-zinverma.lo: zinverma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -MT libMatrixInversion_la-zinverma.lo -MD -MP -MF $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixInversion_la-zinverma.Tpo $(DEPDIR)/libMatrixInversion_la-zinverma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zinverma.c' object='libMatrixInversion_la-zinverma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixInversion_la_CFLAGS) $(CFLAGS) -c -o libMatrixInversion_la-zinverma.lo `test -f 'zinverma.c' || echo '$(srcdir)/'`zinverma.c + +testMatrixInversion-testMatrixInversion.o: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.o -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.o `test -f 'testMatrixInversion.c' || echo '$(srcdir)/'`testMatrixInversion.c + +testMatrixInversion-testMatrixInversion.obj: testMatrixInversion.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -MT testMatrixInversion-testMatrixInversion.obj -MD -MP -MF $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixInversion-testMatrixInversion.Tpo $(DEPDIR)/testMatrixInversion-testMatrixInversion.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixInversion.c' object='testMatrixInversion-testMatrixInversion.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixInversion_CFLAGS) $(CFLAGS) -c -o testMatrixInversion-testMatrixInversion.obj `if test -f 'testMatrixInversion.c'; then $(CYGPATH_W) 'testMatrixInversion.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixInversion.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/inversion/cinverma.c b/2.3-1/src/c/matrixOperations/inversion/cinverma.c new file mode 100644 index 00000000..069fb399 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/cinverma.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixInversion.h" +#include "lapack.h" + +void cinverma ( floatComplex* in, floatComplex* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = DoubleComplex ( (double) creals( in[i]) , (double) cimags ( in[i])) ; + } + + zinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/inversion/dinverma.c b/2.3-1/src/c/matrixOperations/inversion/dinverma.c new file mode 100644 index 00000000..91130f36 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/dinverma.c @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixInversion.h" +#include "lapack.h" + +void dinverma ( double* in, double* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn*leadDimIn) ); + double* work = (double*) malloc ( sizeof(double) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + dgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + dgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); + + +} + diff --git a/2.3-1/src/c/matrixOperations/inversion/sinverma.c b/2.3-1/src/c/matrixOperations/inversion/sinverma.c new file mode 100644 index 00000000..f02a0e8b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/sinverma.c @@ -0,0 +1,55 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include "matrixInversion.h" +#include "lapack.h" + +void sinverma ( float* in, float* out, int leadDimIn ) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need double matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + double *dblin = NULL; + double *dblout = NULL; + + + + /* Array allocations*/ + dblin = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + dblout = (double*)malloc(sizeof(double) * (unsigned int)(leadDimIn * leadDimIn)); + + + + /*copy and cast all the float value into double value */ + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i ++ ) + { + dblin[i] = (double) in[i] ; + } + + dinverma ( dblin, dblout, leadDimIn ); + + + for ( i = 0 ; i < (leadDimIn * leadDimIn) ; i++ ) + { + out[i] =(float) dblout[i] ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c b/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c new file mode 100644 index 00000000..2a0e0058 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/testMatrixInversion.c @@ -0,0 +1,581 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixInversion.h" +#include +#include +#include + +#define LEADDIM 10 + +#define SMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define SMATRIX_TEST {-0.52918209318099763f,-1.4122060840199684f,-2.81447731203224061f,-1.55267562705322471f,\ + 1.7795249093271313f,3.41331242497436538f,-1.88904543501184552f,1.12197724430279377f,\ + 0.72267367241531266f,-0.34793324767314804f,\ +-0.04291642356311276f,-3.42251783874691506f,0.02468613395048536f,0.08908661449574046f,\ + 0.97788374996171823f,4.61261377725807620f,-2.59399616857143833f,1.20317500146072143f,\ + -0.02166245003208622f,-1.3267013649317376f,\ +-2.67087412768695565f,-0.22033432555244847f,-5.29579931307827412f,-1.14315667195430248f,\ + 0.09168583909366912f,1.5851803683202144f,1.66558750370151065f,-0.86555486622239652f,\ + 1.8195567574793376f,3.61754347340892135f,\ +-1.89697408392725020f,1.8626200864938904f,0.79417407448685418f,-0.05121347333860876f,\ + -0.58894433303940863f,-2.25150397211694164f,1.83391219779456915f,-1.71612581802446540f,\ + 1.573412079629398f,1.342726670155854f,\ +-2.25362434223770558f,-3.27855988666729736f,-4.38426363396032048f,-1.74427000048068570f,\ + 2.03129249683994884f,4.82780099711724908f,-0.73809777439724900f,2.2509436506925824f,\ + 0.94584198058114821f,0.25243671945739055f,\ +3.84378244490602494f,3.72355620392145159f,6.53582696174593814f,1.94952916234761564f,\ + -3.13395988068588593f,-4.02699662712894213f,-0.76253598522946087f,0.23575927310254180f,\ + -1.8359327702678865f,-2.83401823371425543f,\ +-1.18180799907519307f,0.63788382527496235f,-3.78074265572599399f,-0.54137361290359209f,\ + 0.70395890323932231f,-2.37398893454907611f,2.2701087812490388f,-0.86112335471809098f,\ + 0.47829335155324559f,3.33447092282135671f,\ +-0.74596393761410851f,-2.37451784604461391f,-1.71445760029220273f,1.04267932396181950f,\ + 0.72418115460071419f,2.59078382027510390f,-0.24977554095572621f,1.00522161428916723f,\ + -0.63851725590828357f,-0.32538135452852734f,\ +-1.03321944290699186f,0.06105622131119152f,-0.23434658474553238f,-0.78361018751135569f,\ + 1.52101204019895975f,-0.98475391631291920f,0.82324943504312742f,-1.09543520381998416f,\ + -0.06310749918170644f,1.29987814669920709f,\ +6.08715177443300171f,4.38684491456130132f,10.9588676689371631f,3.07570017972914656f,\ + -3.9362327692213568f,-6.43408376602510224f,-0.44360914322700107f,-0.86171558904483270f,\ + -2.44206676099519093f,-4.96806164188692279f} + +#define DMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define DMATRIX_TEST {-0.52918209318099763,-1.4122060840199684,-2.81447731203224061,-1.55267562705322471,\ + 1.7795249093271313,3.41331242497436538,-1.88904543501184552,1.12197724430279377,\ + 0.72267367241531266,-0.34793324767314804,\ +-0.04291642356311276,-3.42251783874691506,0.02468613395048536,0.08908661449574046,\ + 0.97788374996171823,4.61261377725807620,-2.59399616857143833,1.20317500146072143,\ + -0.02166245003208622,-1.3267013649317376,\ +-2.67087412768695565,-0.22033432555244847,-5.29579931307827412,-1.14315667195430248,\ + 0.09168583909366912,1.5851803683202144,1.66558750370151065,-0.86555486622239652,\ + 1.8195567574793376,3.61754347340892135,\ +-1.89697408392725020,1.8626200864938904,0.79417407448685418,-0.05121347333860876,\ + -0.58894433303940863,-2.25150397211694164,1.83391219779456915,-1.71612581802446540,\ + 1.573412079629398,1.342726670155854,\ +-2.25362434223770558,-3.27855988666729736,-4.38426363396032048,-1.74427000048068570,\ + 2.03129249683994884,4.82780099711724908,-0.73809777439724900,2.2509436506925824,\ + 0.94584198058114821,0.25243671945739055,\ +3.84378244490602494,3.72355620392145159,6.53582696174593814,1.94952916234761564,\ + -3.13395988068588593,-4.02699662712894213,-0.76253598522946087,0.23575927310254180,\ + -1.8359327702678865,-2.83401823371425543,\ +-1.18180799907519307,0.63788382527496235,-3.78074265572599399,-0.54137361290359209,\ + 0.70395890323932231,-2.37398893454907611,2.2701087812490388,-0.86112335471809098,\ + 0.47829335155324559,3.33447092282135671,\ +-0.74596393761410851,-2.37451784604461391,-1.71445760029220273,1.04267932396181950,\ + 0.72418115460071419,2.59078382027510390,-0.24977554095572621,1.00522161428916723,\ + -0.63851725590828357,-0.32538135452852734,\ +-1.03321944290699186,0.06105622131119152,-0.23434658474553238,-0.78361018751135569,\ + 1.52101204019895975,-0.98475391631291920,0.82324943504312742,-1.09543520381998416,\ + -0.06310749918170644,1.29987814669920709,\ +6.08715177443300171,4.38684491456130132,10.9588676689371631,3.07570017972914656,\ + -3.9362327692213568,-6.43408376602510224,-0.44360914322700107,-0.86171558904483270,\ + -2.44206676099519093,-4.96806164188692279} + +#define CRMATRIX_IN {0.56672112690284848f,0.57116389367729425f,0.81601104838773608f,0.05689279362559319f,\ + 0.55959366867318749f,0.12493403162807226f,0.72792222863063216f,0.26777664758265018f,\ + 0.54653349192813039f,0.98854076582938433f,\ +0.73956565884873271f,0.00371731072664261f,0.59005728596821427f,0.3096467358991504f,\ + 0.25522057106718421f,0.62518793903291225f,0.11574173765257001f,0.61170040909200907f,\ + 0.67839562846347690f,0.33200952783226967f,\ +0.02587099233642220f,0.51744682248681784f,0.39168732380494475f,0.24135384149849415f,\ + 0.50644348980858922f,0.42361020017415285f,0.28937275288626552f,0.08879321813583374f,\ + 0.62128817522898316f,0.34549844544380903f,\ +0.70648676296696067f,0.52114724926650524f,0.28704008506610990f,0.65027950797230005f,\ + 0.08813347620889544f,0.44987633451819420f,0.72272530803456903f,0.89767962601035833f,\ + 0.24278218811377883f,0.43377211131155491f,\ +0.96770532103255391f,0.50685344357043505f,0.52329764096066356f,0.5596947595477104f,\ + 0.56173070007935166f,0.46817600261420012f,0.77945467224344611f,0.79010718129575253f,\ + 0.98085420625284314f,0.81870661024004221f,\ +0.42568723810836673f,0.24615605548024178f,0.92295324662700295f,0.10007458087056875f,\ + 0.46782181179150939f,0.39504976756870747f,0.03661171020939946f,0.51753685344010592f,\ + 0.83254515705630183f,0.61048321425914764f,\ +0.18711117887869477f,0.01895748358219862f,0.84335647663101554f,0.07485948316752911f,\ + 0.85328151332214475f,0.01245901081711054f,0.18675393564626575f,0.49205840751528740f,\ + 0.74896081397309899f,0.94149570073932409f,\ +0.21240556007251143f,0.57950199581682682f,0.26281475694850087f,0.43609866220504045f,\ + 0.91105451015755534f,0.80826673656702042f,0.81026530498638749f,0.25904283951967955f,\ + 0.41390872886404395f,0.35999277792870998f,\ +0.69127879338338971f,0.76568587962538004f,0.35726496530696750f,0.76933998242020607f,\ + 0.54776339093223214f,0.09622887428849936f,0.95611717319115996f,0.22074085660278797f,\ + 0.01432593585923314f,0.81914897728711367f,\ +0.13049928424879909f,0.96820035576820374f,0.6561381467618048f,0.24455389659851789f,\ + 0.52831235667690635f,0.84689256362617016f,0.78766220854595304f,0.12620826158672571f,\ + 0.78838609857484698f,0.34530424699187279f} + +#define CIMATRIX_IN {0.26598573336377740f,0.12025266280397773f,0.90711546363309026f,0.41329363686963916f,\ + 0.33616027468815446f,0.20337020372971892f,0.31845858739688993f,0.04173615900799632f,\ + 0.00291663268581033f,0.92589621385559440f,\ +0.97098186518996954f,0.82874121330678463f,0.33601493109017611f,0.14022908732295036f,\ + 0.53368766140192747f,0.30119446106255054f,0.57618944440037012f,0.34382718056440353f,\ + 0.89934705849736929f,0.09938172809779644f,\ +0.88752476638182998f,0.31610729591920972f,0.11756130633875728f,0.49523561308160424f,\ + 0.20390639593824744f,0.27625959040597081f,0.42549022240564227f,0.1970167332328856f,\ + 0.83879271661862731f,0.42805786477401853f,\ +0.20667528547346592f,0.53051907662302256f,0.92537237703800201f,0.41948772873729467f,\ + 0.15899897180497646f,0.29445307422429323f,0.97619816288352013f,0.21228986512869596f,\ + 0.43437494523823261f,0.94318309519439936f,\ +0.85251609655097127f,0.57151748193427920f,0.72636712575331330f,0.86262222891673446f,\ + 0.01818151073530316f,0.57180739520117640f,0.25189600000157952f,0.31403985014185309f,\ + 0.77678761305287480f,0.03273952705785632f,\ +0.67446978110820055f,0.04780154302716255f,0.90094979386776686f,0.28575096465647221f,\ + 0.40983706060796976f,0.21417701244354248f,0.43911290075629950f,0.78216253779828548f,\ + 0.13953176606446505f,0.92132670804858208f,\ +0.91528743831440806f,0.82486197212710977f,0.39489932497963309f,0.25121363671496511f,\ + 0.01058345986530185f,0.68954616272822022f,0.07593036955222487f,0.05409323470667005f,\ + 0.11506372271105647f,0.94490244099870324f,\ +0.02848597615957260f,0.5798843121156096f,0.56551797501742840f,0.33891015965491533f,\ + 0.19653097167611122f,0.58555728476494551f,0.25593801774084568f,0.91902069095522165f,\ + 0.53554199635982513f,0.900706990621984f,\ +0.23678414756432176f,0.27918082987889647f,0.70614896761253476f,0.39219759730622172f,\ + 0.27255953708663583f,0.42041230341419578f,0.06706167431548238f,0.46035157097503543f,\ + 0.43117330456152558f,0.80943161016330123f,\ +0.70153435599058867f,0.95451109297573566f,0.67878311965614557f,0.46815521270036697f,\ + 0.34376550372689962f,0.42775720171630383f,0.76511315722018480f,0.29926850274205208f,\ + 0.61453847866505384f,0.02519542910158634f} + +#define CRMATRIX_RESULT {1.13334136062879454f,1.00204710284162091f,-0.36268445209785111f,0.44135219666801256f,\ + -0.28889550886983612f,-0.83933700493692454f,0.02619582683916769f,-0.03686600548096228f,\ + -0.3105979269805872f,-0.41314497983816856f,\ +-1.35807279244359291f,-0.95351719301170645f,0.24508427491574258f,-0.29038757219777517f,\ + 0.37390577835866062f,1.1835902691419622f,-0.05725271188164360f,-0.45507733751420543f,\ + 0.89349083196709700f,0.22599186865989143f,\ +0.04475841273073522f,0.65452526617183937f,-0.45264724847008608f,1.48730985056287901f,\ + -0.62424039568072809f,-0.07013705727696817f,0.66279285096827567f,-0.49314454581179629f,\ + -0.75846179749076570f,0.03847068162421585f,\ +-0.28834686632766587f,-0.12621821344664338f,0.66167042153468991f,-0.30750952923310820f,\ + -0.38799028698820520f,-0.06244610332663336f,-0.16699468178690519f,-0.25703548004808097f,\ + 1.05027930016160997f,0.31201179786307248f,\ +3.09851038226275932f,0.68543010150986716f,0.67201299485007393f,-1.36595464827487545f,\ + -0.97056467795873491f,-2.43637154663396904f,-0.44698290573897426f,0.25335968244039719f,\ + 0.52656196888052886f,0.8186504936893056f,\ +1.61532430192389009f,0.61052036715893920f,0.37049911672435160f,-0.89240571480272601f,\ + -0.10120030002332725f,-0.89781867625900547f,-0.69692694811392220f,1.15675538992405480f,\ + -0.60391534256305657f,-0.22021828342698485f,\ +-0.3741129583278592f,-0.04777966095669883f,-0.71234429260192467f,0.67967568250401755f,\ + 0.25551727122371526f,-0.21501817490214456f,0.33990052672394827f,0.26217278721004078f,\ + -0.62229775428125067f,0.12867275098729825f,\ +-1.29410590757942501f,-0.90500447621878899f,-0.02669409932542677f,-0.65737384875432148f,\ + 1.06680350537307067f,1.0309312701659521f,-0.17448425396711695f,0.10358425160515741f,\ + 0.48518012284543799f,-0.12380980760248197f,\ +-1.74148559631895505f,-0.80563620794306168f,0.09831541569063014f,0.29858001971458137f,\ + 0.71315790168444038f,1.51589578494898358f,0.26752178758245609f,-0.07814488857312252f,\ + -0.33226019516643074f,-0.25594588429781640f,\ +-0.55157638336116810f,-0.32553554473562663f,0.18945085905693287f,-0.49018398019943904f,\ + 0.22032383413091419f,0.80929284051108974f,-0.26930477901947342f,0.01565276572275408f,\ + 0.50897245662655299f,-0.2000796589321248f} + +#define CIMATRIX_RESULT {-0.72071682835421724f,-0.27956750077582515f,-0.12213482023956473f,0.66199681493358187f,\ + 0.19294748584842841f,0.71511499705121806f,-0.07262892107788382f,0.16934235088255833f,\ + -0.28481834522168847f,-0.4356262417043216f,\ +0.89322305892893428f,-0.47480723687179577f,0.74313808566553685f,-0.47801173363000360f,\ + 0.13877492668810687f,-0.24397029588270253f,-0.56410605487977428f,0.13174383488792796f,\ + -0.11275208753659083f,-0.02853860897251614f,\ +-2.35574562422712885f,-0.66252937112300103f,0.41163350762074485f,0.21189678704881354f,\ + 0.57210153384651341f,1.59871861336304111f,0.24013928122080053f,0.1908634439410304f,\ + 0.04233444329438218f,-0.74974593479018292f,\ +0.21852271998327827f,0.46641793006923571f,-0.50775725878230649f,0.36932403849454087f,\ + -0.97035140329820424f,-0.59905481375287661f,0.47057866052210873f,-0.27484558236611223f,\ + 0.14983776443256616f,0.65314738162484509f,\ +1.21784046668363755f,0.89544041489161419f,-0.55385999040744260f,2.3960585010456512f,\ + -1.08813967734866801f,-1.76566044616615891f,1.01831164014477937f,-0.39749297613335716f,\ + -1.42421433146953369f,0.1681331405197976f,\ +1.2139424005771302f,1.25657353572343178f,-0.00767306183273730f,0.23949549471191356f,\ + -0.93651648982768132f,-0.892557290343648f,-0.31803824197434533f,-0.30269705651930523f,\ + 0.06480270543120303f,0.04863444130781940f,\ +-0.4833117651305104f,0.0427206592410736f,-0.32334126501314669f,-0.77563551313076551f,\ + 0.77531171370204577f,0.4186703610529936f,0.06140053814127502f,0.40102788900264252f,\ + 0.23384530409440230f,-0.64994440926481989f,\ +1.96328712223105617f,0.26113952707794202f,0.7924550400337056f,-0.65512478202793500f,\ + -0.18012047754401772f,-1.54644464183129848f,-0.24103692367484025f,0.06994604293168416f,\ + -0.14071021436989639f,0.02396061029170871f,\ +-0.38634718234016863f,-0.79360643330422442f,-0.24953759611467596f,-1.18124389108964234f,\ + 0.36517943778230522f,0.69540420551183901f,-0.15267947346137922f,0.23673803504827576f,\ + 0.58370191145957184f,0.41325242999322420f,\ +0.27463944706760368f,-0.07374243215114486f,-0.23939703640616677f,-0.68898202198243763f,\ + 0.18544512532830235f,-0.26697093307764330f,-0.38327334858322648f,-0.29893133575699177f,\ + 0.40729781218472505f,0.82660964787147106f} + + + +#define ZRMATRIX_IN {0.56672112690284848,0.57116389367729425,0.81601104838773608,0.05689279362559319,\ + 0.55959366867318749,0.12493403162807226,0.72792222863063216,0.26777664758265018,\ + 0.54653349192813039,0.98854076582938433,\ +0.73956565884873271,0.00371731072664261,0.59005728596821427,0.3096467358991504,\ + 0.25522057106718421,0.62518793903291225,0.11574173765257001,0.61170040909200907,\ + 0.67839562846347690,0.33200952783226967,\ +0.02587099233642220,0.51744682248681784,0.39168732380494475,0.24135384149849415,\ + 0.50644348980858922,0.42361020017415285,0.28937275288626552,0.08879321813583374,\ + 0.62128817522898316,0.34549844544380903,\ +0.70648676296696067,0.52114724926650524,0.28704008506610990,0.65027950797230005,\ + 0.08813347620889544,0.44987633451819420,0.72272530803456903,0.89767962601035833,\ + 0.24278218811377883,0.43377211131155491,\ +0.96770532103255391,0.50685344357043505,0.52329764096066356,0.5596947595477104,\ + 0.56173070007935166,0.46817600261420012,0.77945467224344611,0.79010718129575253,\ + 0.98085420625284314,0.81870661024004221,\ +0.42568723810836673,0.24615605548024178,0.92295324662700295,0.10007458087056875,\ + 0.46782181179150939,0.39504976756870747,0.03661171020939946,0.51753685344010592,\ + 0.83254515705630183,0.61048321425914764,\ +0.18711117887869477,0.01895748358219862,0.84335647663101554,0.07485948316752911,\ + 0.85328151332214475,0.01245901081711054,0.18675393564626575,0.49205840751528740,\ + 0.74896081397309899,0.94149570073932409,\ +0.21240556007251143,0.57950199581682682,0.26281475694850087,0.43609866220504045,\ + 0.91105451015755534,0.80826673656702042,0.81026530498638749,0.25904283951967955,\ + 0.41390872886404395,0.35999277792870998,\ +0.69127879338338971,0.76568587962538004,0.35726496530696750,0.76933998242020607,\ + 0.54776339093223214,0.09622887428849936,0.95611717319115996,0.22074085660278797,\ + 0.01432593585923314,0.81914897728711367,\ +0.13049928424879909,0.96820035576820374,0.6561381467618048,0.24455389659851789,\ + 0.52831235667690635,0.84689256362617016,0.78766220854595304,0.12620826158672571,\ + 0.78838609857484698,0.34530424699187279} + +#define ZIMATRIX_IN {0.26598573336377740,0.12025266280397773,0.90711546363309026,0.41329363686963916,\ + 0.33616027468815446,0.20337020372971892,0.31845858739688993,0.04173615900799632,\ + 0.00291663268581033,0.92589621385559440,\ +0.97098186518996954,0.82874121330678463,0.33601493109017611,0.14022908732295036,\ + 0.53368766140192747,0.30119446106255054,0.57618944440037012,0.34382718056440353,\ + 0.89934705849736929,0.09938172809779644,\ +0.88752476638182998,0.31610729591920972,0.11756130633875728,0.49523561308160424,\ + 0.20390639593824744,0.27625959040597081,0.42549022240564227,0.1970167332328856,\ + 0.83879271661862731,0.42805786477401853,\ +0.20667528547346592,0.53051907662302256,0.92537237703800201,0.41948772873729467,\ + 0.15899897180497646,0.29445307422429323,0.97619816288352013,0.21228986512869596,\ + 0.43437494523823261,0.94318309519439936,\ +0.85251609655097127,0.57151748193427920,0.72636712575331330,0.86262222891673446,\ + 0.01818151073530316,0.57180739520117640,0.25189600000157952,0.31403985014185309,\ + 0.77678761305287480,0.03273952705785632,\ +0.67446978110820055,0.04780154302716255,0.90094979386776686,0.28575096465647221,\ + 0.40983706060796976,0.21417701244354248,0.43911290075629950,0.78216253779828548,\ + 0.13953176606446505,0.92132670804858208,\ +0.91528743831440806,0.82486197212710977,0.39489932497963309,0.25121363671496511,\ + 0.01058345986530185,0.68954616272822022,0.07593036955222487,0.05409323470667005,\ + 0.11506372271105647,0.94490244099870324,\ +0.02848597615957260,0.5798843121156096,0.56551797501742840,0.33891015965491533,\ + 0.19653097167611122,0.58555728476494551,0.25593801774084568,0.91902069095522165,\ + 0.53554199635982513,0.900706990621984,\ +0.23678414756432176,0.27918082987889647,0.70614896761253476,0.39219759730622172,\ + 0.27255953708663583,0.42041230341419578,0.06706167431548238,0.46035157097503543,\ + 0.43117330456152558,0.80943161016330123,\ +0.70153435599058867,0.95451109297573566,0.67878311965614557,0.46815521270036697,\ + 0.34376550372689962,0.42775720171630383,0.76511315722018480,0.29926850274205208,\ + 0.61453847866505384,0.02519542910158634} + +#define ZRMATRIX_RESULT {1.13334136062879454,1.00204710284162091,-0.36268445209785111,0.44135219666801256,\ + -0.28889550886983612,-0.83933700493692454,0.02619582683916769,-0.03686600548096228,\ + -0.3105979269805872,-0.41314497983816856,\ +-1.35807279244359291,-0.95351719301170645,0.24508427491574258,-0.29038757219777517,\ + 0.37390577835866062,1.1835902691419622,-0.05725271188164360,-0.45507733751420543,\ + 0.89349083196709700,0.22599186865989143,\ +0.04475841273073522,0.65452526617183937,-0.45264724847008608,1.48730985056287901,\ + -0.62424039568072809,-0.07013705727696817,0.66279285096827567,-0.49314454581179629,\ + -0.75846179749076570,0.03847068162421585,\ +-0.28834686632766587,-0.12621821344664338,0.66167042153468991,-0.30750952923310820,\ + -0.38799028698820520,-0.06244610332663336,-0.16699468178690519,-0.25703548004808097,\ + 1.05027930016160997,0.31201179786307248,\ +3.09851038226275932,0.68543010150986716,0.67201299485007393,-1.36595464827487545,\ + -0.97056467795873491,-2.43637154663396904,-0.44698290573897426,0.25335968244039719,\ + 0.52656196888052886,0.8186504936893056,\ +1.61532430192389009,0.61052036715893920,0.37049911672435160,-0.89240571480272601,\ + -0.10120030002332725,-0.89781867625900547,-0.69692694811392220,1.15675538992405480,\ + -0.60391534256305657,-0.22021828342698485,\ +-0.3741129583278592,-0.04777966095669883,-0.71234429260192467,0.67967568250401755,\ + 0.25551727122371526,-0.21501817490214456,0.33990052672394827,0.26217278721004078,\ + -0.62229775428125067,0.12867275098729825,\ +-1.29410590757942501,-0.90500447621878899,-0.02669409932542677,-0.65737384875432148,\ + 1.06680350537307067,1.0309312701659521,-0.17448425396711695,0.10358425160515741,\ + 0.48518012284543799,-0.12380980760248197,\ +-1.74148559631895505,-0.80563620794306168,0.09831541569063014,0.29858001971458137,\ + 0.71315790168444038,1.51589578494898358,0.26752178758245609,-0.07814488857312252,\ + -0.33226019516643074,-0.25594588429781640,\ +-0.55157638336116810,-0.32553554473562663,0.18945085905693287,-0.49018398019943904,\ + 0.22032383413091419,0.80929284051108974,-0.26930477901947342,0.01565276572275408,\ + 0.50897245662655299,-0.2000796589321248} + +#define ZIMATRIX_RESULT {-0.72071682835421724,-0.27956750077582515,-0.12213482023956473,0.66199681493358187,\ + 0.19294748584842841,0.71511499705121806,-0.07262892107788382,0.16934235088255833,\ + -0.28481834522168847,-0.4356262417043216,\ +0.89322305892893428,-0.47480723687179577,0.74313808566553685,-0.47801173363000360,\ + 0.13877492668810687,-0.24397029588270253,-0.56410605487977428,0.13174383488792796,\ + -0.11275208753659083,-0.02853860897251614,\ +-2.35574562422712885,-0.66252937112300103,0.41163350762074485,0.21189678704881354,\ + 0.57210153384651341,1.59871861336304111,0.24013928122080053,0.1908634439410304,\ + 0.04233444329438218,-0.74974593479018292,\ +0.21852271998327827,0.46641793006923571,-0.50775725878230649,0.36932403849454087,\ + -0.97035140329820424,-0.59905481375287661,0.47057866052210873,-0.27484558236611223,\ + 0.14983776443256616,0.65314738162484509,\ +1.21784046668363755,0.89544041489161419,-0.55385999040744260,2.3960585010456512,\ + -1.08813967734866801,-1.76566044616615891,1.01831164014477937,-0.39749297613335716,\ + -1.42421433146953369,0.1681331405197976,\ +1.2139424005771302,1.25657353572343178,-0.00767306183273730,0.23949549471191356,\ + -0.93651648982768132,-0.892557290343648,-0.31803824197434533,-0.30269705651930523,\ + 0.06480270543120303,0.04863444130781940,\ +-0.4833117651305104,0.0427206592410736,-0.32334126501314669,-0.77563551313076551,\ + 0.77531171370204577,0.4186703610529936,0.06140053814127502,0.40102788900264252,\ + 0.23384530409440230,-0.64994440926481989,\ +1.96328712223105617,0.26113952707794202,0.7924550400337056,-0.65512478202793500,\ + -0.18012047754401772,-1.54644464183129848,-0.24103692367484025,0.06994604293168416,\ + -0.14071021436989639,0.02396061029170871,\ +-0.38634718234016863,-0.79360643330422442,-0.24953759611467596,-1.18124389108964234,\ + 0.36517943778230522,0.69540420551183901,-0.15267947346137922,0.23673803504827576,\ + 0.58370191145957184,0.41325242999322420,\ +0.27463944706760368,-0.07374243215114486,-0.23939703640616677,-0.68898202198243763,\ + 0.18544512532830235,-0.26697093307764330,-0.38327334858322648,-0.29893133575699177,\ + 0.40729781218472505,0.82660964787147106} + + +static void sinvermaTest (void) +{ + int i ; + + float in[] = SMATRIX_IN ; + + float result[] = SMATRIX_TEST ; + + float out[LEADDIM*LEADDIM]; + + + sinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-4 ) ; + } + + + +} + +static void dinvermaTest (void) +{ + int i ; + + double in[] = DMATRIX_IN ; + + double result[] = DMATRIX_TEST ; + + double out[LEADDIM*LEADDIM]; + + + dinverma (in, out, LEADDIM); + + for ( i = 0 ; i < LEADDIM*LEADDIM ; i++ ) + { + + printf ( "\t\t %d out : %e\tresult : %e\tassert : %e \n" , i , out[i] , result[i] , fabs ( out[i] - result[i] ) / fabs( out[i]) ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i]) < 3e-14 ) ; + } + + + +} + +static void cinvermaTest (void) +{ + int i = 0 ; + + float tRealIn [] = CRMATRIX_IN ; + float tImagIn [] = CIMATRIX_IN ; + + + + float tRealResult [] = CRMATRIX_RESULT ; + float tImagResult [] = CIMATRIX_RESULT ; + + floatComplex out[LEADDIM*LEADDIM ] ; + + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + cinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,creals(out[i]) , cimags(out[i]) , creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-6 && creals (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-5 ); + + + if ( cimags(out[i]) < 1e-6 && cimags (Result[i]) < 1e-6 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-5) ; + + } +} + + +static void zinvermaTest (void) +{ + int i = 0 ; + + double tRealIn [] = ZRMATRIX_IN ; + double tImagIn [] = ZIMATRIX_IN ; + + + + double tRealResult [] = ZRMATRIX_RESULT ; + double tImagResult [] = ZIMATRIX_RESULT ; + + doubleComplex out[LEADDIM*LEADDIM ] ; + + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , LEADDIM*LEADDIM ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,LEADDIM*LEADDIM) ; + + + zinverma( in ,out , LEADDIM ) ; + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (LEADDIM*LEADDIM ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t +%e\t * i assert : %e + %e \n" , + i ,zreals(out[i]) , zimags(out[i]) , zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-13 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-13 ) ; + + } +} + +static void mytest (void ){ + double in1[16] = { 1 , 5 , 9 ,13 , + 2 , 6 , 10 , 14 , + 3 , 7 , 11 , 15 , + 4 , 8 , 12 , 16 } ; + + double out[16] = { 0 } ; + + int i = 0 ; + + dinverma ( in1 , out , 4 ); + + for ( i = 0 ; i <16; i++) + { +printf ( "\t\t %d out : %20.15e\t\n" , i , out[i] ) ; + + } + +} + +static int testMatrixInversion(void) { + + printf("\n\n\n\t>>> MY TEST Tests\n"); + mytest () ; + + + printf("\n>>>> Matrix Inversion Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + dinvermaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + cinvermaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zinvermaTest(); + + return 0; +} + + + +int main(void) { + + assert(testMatrixInversion() == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj new file mode 100644 index 00000000..e874edfc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {44D3EFB8-A861-41C4-BBCD-18470FA0D5AC} + testMatrixInversion + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;../../../elementaryFunctions/includes;../../../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters new file mode 100644 index 00000000..8daf0ce4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/test_MatrixInversion/testMatrixInversion.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/inversion/zinverma.c b/2.3-1/src/c/matrixOperations/inversion/zinverma.c new file mode 100644 index 00000000..7948445e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/inversion/zinverma.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixInversion.h" +#include "lapack.h" + +void zinverma ( doubleComplex* in, doubleComplex* out, int leadDimIn ) +{ + int info = 0 ; + int* vectPivot = (int*) malloc ( sizeof(int) * (unsigned int)( leadDimIn) ); + doubleComplex* work = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (leadDimIn*leadDimIn) ); + + int i = 0 ; + + for ( i = 0 ; i < leadDimIn*leadDimIn ; i ++) + { + out[i] = in[i] ; + } + + zgetrf_ ( &leadDimIn, &leadDimIn, out, &leadDimIn, vectPivot, &info ); + zgetri_ ( &leadDimIn, out, &leadDimIn , vectPivot, work , &leadDimIn , &info ); + + free(vectPivot); + free(work); +} + diff --git a/2.3-1/src/c/matrixOperations/jmat/Makefile.am b/2.3-1/src/c/matrixOperations/jmat/Makefile.am new file mode 100644 index 00000000..08afef59 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/jmat/Makefile.am @@ -0,0 +1,35 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libJmat_la_CFLAGS= -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libJmat.la + +HEAD = ../includes/jmat.h + +libJmat_la_SOURCES = $(HEAD) \ + sjmata.c \ + djmata.c + +check_PROGRAMS = testJmat + +check_LDADD = libJmat.la + +check_INCLUDES = -I $(top_builddir)/src/c/matrixOperations/includes + +testJmat_SOURCES = testJmat.c +testJmat_LDADD = $(check_LDADD) +testJmat_CFLAGS = $(check_INCLUDES) + +TESTS = testJmat diff --git a/2.3-1/src/c/matrixOperations/jmat/Makefile.in b/2.3-1/src/c/matrixOperations/jmat/Makefile.in new file mode 100644 index 00000000..e8831170 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/jmat/Makefile.in @@ -0,0 +1,684 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testJmat$(EXEEXT) +TESTS = testJmat$(EXEEXT) +subdir = src/c/matrixOperations/jmat +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libJmat_la_LIBADD = +am__objects_1 = +am_libJmat_la_OBJECTS = $(am__objects_1) libJmat_la-sjmata.lo \ + libJmat_la-djmata.lo +libJmat_la_OBJECTS = $(am_libJmat_la_OBJECTS) +libJmat_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libJmat_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testJmat_OBJECTS = testJmat-testJmat.$(OBJEXT) +testJmat_OBJECTS = $(am_testJmat_OBJECTS) +testJmat_DEPENDENCIES = $(check_LDADD) +testJmat_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testJmat_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libJmat_la_SOURCES) $(testJmat_SOURCES) +DIST_SOURCES = $(libJmat_la_SOURCES) $(testJmat_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libJmat_la_CFLAGS = -I $(top_builddir)/src/c/matrixOperations/includes +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libJmat.la +HEAD = ../includes/jmat.h +libJmat_la_SOURCES = $(HEAD) \ + sjmata.c \ + djmata.c + +check_LDADD = libJmat.la +check_INCLUDES = -I $(top_builddir)/src/c/matrixOperations/includes +testJmat_SOURCES = testJmat.c +testJmat_LDADD = $(check_LDADD) +testJmat_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/jmat/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/jmat/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libJmat.la: $(libJmat_la_OBJECTS) $(libJmat_la_DEPENDENCIES) + $(libJmat_la_LINK) -rpath $(pkglibdir) $(libJmat_la_OBJECTS) $(libJmat_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testJmat$(EXEEXT): $(testJmat_OBJECTS) $(testJmat_DEPENDENCIES) + @rm -f testJmat$(EXEEXT) + $(testJmat_LINK) $(testJmat_OBJECTS) $(testJmat_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libJmat_la-djmata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libJmat_la-sjmata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testJmat-testJmat.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libJmat_la-sjmata.lo: sjmata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -MT libJmat_la-sjmata.lo -MD -MP -MF $(DEPDIR)/libJmat_la-sjmata.Tpo -c -o libJmat_la-sjmata.lo `test -f 'sjmata.c' || echo '$(srcdir)/'`sjmata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libJmat_la-sjmata.Tpo $(DEPDIR)/libJmat_la-sjmata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sjmata.c' object='libJmat_la-sjmata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -c -o libJmat_la-sjmata.lo `test -f 'sjmata.c' || echo '$(srcdir)/'`sjmata.c + +libJmat_la-djmata.lo: djmata.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -MT libJmat_la-djmata.lo -MD -MP -MF $(DEPDIR)/libJmat_la-djmata.Tpo -c -o libJmat_la-djmata.lo `test -f 'djmata.c' || echo '$(srcdir)/'`djmata.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libJmat_la-djmata.Tpo $(DEPDIR)/libJmat_la-djmata.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='djmata.c' object='libJmat_la-djmata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libJmat_la_CFLAGS) $(CFLAGS) -c -o libJmat_la-djmata.lo `test -f 'djmata.c' || echo '$(srcdir)/'`djmata.c + +testJmat-testJmat.o: testJmat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -MT testJmat-testJmat.o -MD -MP -MF $(DEPDIR)/testJmat-testJmat.Tpo -c -o testJmat-testJmat.o `test -f 'testJmat.c' || echo '$(srcdir)/'`testJmat.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testJmat-testJmat.Tpo $(DEPDIR)/testJmat-testJmat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testJmat.c' object='testJmat-testJmat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -c -o testJmat-testJmat.o `test -f 'testJmat.c' || echo '$(srcdir)/'`testJmat.c + +testJmat-testJmat.obj: testJmat.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -MT testJmat-testJmat.obj -MD -MP -MF $(DEPDIR)/testJmat-testJmat.Tpo -c -o testJmat-testJmat.obj `if test -f 'testJmat.c'; then $(CYGPATH_W) 'testJmat.c'; else $(CYGPATH_W) '$(srcdir)/testJmat.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testJmat-testJmat.Tpo $(DEPDIR)/testJmat-testJmat.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testJmat.c' object='testJmat-testJmat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testJmat_CFLAGS) $(CFLAGS) -c -o testJmat-testJmat.obj `if test -f 'testJmat.c'; then $(CYGPATH_W) 'testJmat.c'; else $(CYGPATH_W) '$(srcdir)/testJmat.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/jmat/djmata.c b/2.3-1/src/c/matrixOperations/jmat/djmata.c new file mode 100644 index 00000000..6ccff61d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/jmat/djmata.c @@ -0,0 +1,22 @@ +#include + +void djmata(double n, double m, double *out){ + int i,nn,mm,j; + mm=(int) m; + nn=(int) n; + + + for (i=0;i + +void sjmata(float n, float m, float *out){ + int i,nn,mm,j; + mm=(int) m; + nn=(int) n; + + + for (i=0;i +#include +#include "jmat.h" + +static void sjmataTest(void){ + +} + + +static void djmataTest(void){ + +} + + + +int main(void){ + sjmataTest(); + djmataTest(); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj b/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj new file mode 100644 index 00000000..cd31d61f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {04980E4A-FD92-4D44-8EB6-6F643A4ED9B3} + testJmat + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters b/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters new file mode 100644 index 00000000..bb1a6733 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/jmat/test_Jmat/testJmat.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/logm/Makefile.am b/2.3-1/src/c/matrixOperations/logm/Makefile.am new file mode 100644 index 00000000..f21ded7d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/Makefile.am @@ -0,0 +1,81 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + + +libLogm_la_CFLAGS = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + + +pkglib_LTLIBRARIES = libLogm.la + +HEAD = ../includes/logm.h + + +libLogm_la_SOURCES = $(HEAD) \ + zlogma.c \ + clogma.c \ + slogma.c \ + dlogma.c + +############# +## CHECK ## +############# + +check_PROGRAMS = testDoubleLogm testFloatLogm + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la + + +check_INCLUDES = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleLogm_SOURCES = testDoubleLogm.c +testDoubleLogm_LDADD = $(check_LDADD) +testDoubleLogm_CFLAGS = $(check_INCLUDES) + +testFloatLogm_SOURCES = testFloatLogm.c +testFloatLogm_LDADD = $(check_LDADD) +testFloatLogm_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleLogm testFloatLogm diff --git a/2.3-1/src/c/matrixOperations/logm/Makefile.in b/2.3-1/src/c/matrixOperations/logm/Makefile.in new file mode 100644 index 00000000..d4923eb3 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/Makefile.in @@ -0,0 +1,763 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleLogm$(EXEEXT) testFloatLogm$(EXEEXT) +TESTS = testDoubleLogm$(EXEEXT) testFloatLogm$(EXEEXT) +subdir = src/c/matrixOperations/logm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLogm_la_LIBADD = +am__objects_1 = +am_libLogm_la_OBJECTS = $(am__objects_1) libLogm_la-zlogma.lo \ + libLogm_la-clogma.lo libLogm_la-slogma.lo libLogm_la-dlogma.lo +libLogm_la_OBJECTS = $(am_libLogm_la_OBJECTS) +libLogm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLogm_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLogm_OBJECTS = testDoubleLogm-testDoubleLogm.$(OBJEXT) +testDoubleLogm_OBJECTS = $(am_testDoubleLogm_OBJECTS) +testDoubleLogm_DEPENDENCIES = $(check_LDADD) +testDoubleLogm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleLogm_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatLogm_OBJECTS = testFloatLogm-testFloatLogm.$(OBJEXT) +testFloatLogm_OBJECTS = $(am_testFloatLogm_OBJECTS) +testFloatLogm_DEPENDENCIES = $(check_LDADD) +testFloatLogm_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLogm_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLogm_la_SOURCES) $(testDoubleLogm_SOURCES) \ + $(testFloatLogm_SOURCES) +DIST_SOURCES = $(libLogm_la_SOURCES) $(testDoubleLogm_SOURCES) \ + $(testFloatLogm_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLogm_la_CFLAGS = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLogm.la +HEAD = ../includes/logm.h +libLogm_la_SOURCES = $(HEAD) \ + zlogma.c \ + clogma.c \ + slogma.c \ + dlogma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la + +check_INCLUDES = -I ./includes \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleLogm_SOURCES = testDoubleLogm.c +testDoubleLogm_LDADD = $(check_LDADD) +testDoubleLogm_CFLAGS = $(check_INCLUDES) +testFloatLogm_SOURCES = testFloatLogm.c +testFloatLogm_LDADD = $(check_LDADD) +testFloatLogm_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/logm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/logm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLogm.la: $(libLogm_la_OBJECTS) $(libLogm_la_DEPENDENCIES) + $(libLogm_la_LINK) -rpath $(pkglibdir) $(libLogm_la_OBJECTS) $(libLogm_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLogm$(EXEEXT): $(testDoubleLogm_OBJECTS) $(testDoubleLogm_DEPENDENCIES) + @rm -f testDoubleLogm$(EXEEXT) + $(testDoubleLogm_LINK) $(testDoubleLogm_OBJECTS) $(testDoubleLogm_LDADD) $(LIBS) +testFloatLogm$(EXEEXT): $(testFloatLogm_OBJECTS) $(testFloatLogm_DEPENDENCIES) + @rm -f testFloatLogm$(EXEEXT) + $(testFloatLogm_LINK) $(testFloatLogm_OBJECTS) $(testFloatLogm_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-clogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-dlogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-slogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLogm_la-zlogma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLogm-testDoubleLogm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLogm-testFloatLogm.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLogm_la-zlogma.lo: zlogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-zlogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-zlogma.Tpo -c -o libLogm_la-zlogma.lo `test -f 'zlogma.c' || echo '$(srcdir)/'`zlogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-zlogma.Tpo $(DEPDIR)/libLogm_la-zlogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlogma.c' object='libLogm_la-zlogma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-zlogma.lo `test -f 'zlogma.c' || echo '$(srcdir)/'`zlogma.c + +libLogm_la-clogma.lo: clogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-clogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-clogma.Tpo -c -o libLogm_la-clogma.lo `test -f 'clogma.c' || echo '$(srcdir)/'`clogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-clogma.Tpo $(DEPDIR)/libLogm_la-clogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clogma.c' object='libLogm_la-clogma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-clogma.lo `test -f 'clogma.c' || echo '$(srcdir)/'`clogma.c + +libLogm_la-slogma.lo: slogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-slogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-slogma.Tpo -c -o libLogm_la-slogma.lo `test -f 'slogma.c' || echo '$(srcdir)/'`slogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-slogma.Tpo $(DEPDIR)/libLogm_la-slogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slogma.c' object='libLogm_la-slogma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-slogma.lo `test -f 'slogma.c' || echo '$(srcdir)/'`slogma.c + +libLogm_la-dlogma.lo: dlogma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -MT libLogm_la-dlogma.lo -MD -MP -MF $(DEPDIR)/libLogm_la-dlogma.Tpo -c -o libLogm_la-dlogma.lo `test -f 'dlogma.c' || echo '$(srcdir)/'`dlogma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLogm_la-dlogma.Tpo $(DEPDIR)/libLogm_la-dlogma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlogma.c' object='libLogm_la-dlogma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLogm_la_CFLAGS) $(CFLAGS) -c -o libLogm_la-dlogma.lo `test -f 'dlogma.c' || echo '$(srcdir)/'`dlogma.c + +testDoubleLogm-testDoubleLogm.o: testDoubleLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -MT testDoubleLogm-testDoubleLogm.o -MD -MP -MF $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo -c -o testDoubleLogm-testDoubleLogm.o `test -f 'testDoubleLogm.c' || echo '$(srcdir)/'`testDoubleLogm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo $(DEPDIR)/testDoubleLogm-testDoubleLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLogm.c' object='testDoubleLogm-testDoubleLogm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -c -o testDoubleLogm-testDoubleLogm.o `test -f 'testDoubleLogm.c' || echo '$(srcdir)/'`testDoubleLogm.c + +testDoubleLogm-testDoubleLogm.obj: testDoubleLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -MT testDoubleLogm-testDoubleLogm.obj -MD -MP -MF $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo -c -o testDoubleLogm-testDoubleLogm.obj `if test -f 'testDoubleLogm.c'; then $(CYGPATH_W) 'testDoubleLogm.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLogm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLogm-testDoubleLogm.Tpo $(DEPDIR)/testDoubleLogm-testDoubleLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLogm.c' object='testDoubleLogm-testDoubleLogm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLogm_CFLAGS) $(CFLAGS) -c -o testDoubleLogm-testDoubleLogm.obj `if test -f 'testDoubleLogm.c'; then $(CYGPATH_W) 'testDoubleLogm.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLogm.c'; fi` + +testFloatLogm-testFloatLogm.o: testFloatLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -MT testFloatLogm-testFloatLogm.o -MD -MP -MF $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo -c -o testFloatLogm-testFloatLogm.o `test -f 'testFloatLogm.c' || echo '$(srcdir)/'`testFloatLogm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo $(DEPDIR)/testFloatLogm-testFloatLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLogm.c' object='testFloatLogm-testFloatLogm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -c -o testFloatLogm-testFloatLogm.o `test -f 'testFloatLogm.c' || echo '$(srcdir)/'`testFloatLogm.c + +testFloatLogm-testFloatLogm.obj: testFloatLogm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -MT testFloatLogm-testFloatLogm.obj -MD -MP -MF $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo -c -o testFloatLogm-testFloatLogm.obj `if test -f 'testFloatLogm.c'; then $(CYGPATH_W) 'testFloatLogm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLogm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLogm-testFloatLogm.Tpo $(DEPDIR)/testFloatLogm-testFloatLogm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLogm.c' object='testFloatLogm-testFloatLogm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLogm_CFLAGS) $(CFLAGS) -c -o testFloatLogm-testFloatLogm.obj `if test -f 'testFloatLogm.c'; then $(CYGPATH_W) 'testFloatLogm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLogm.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/logm/clogma.c b/2.3-1/src/c/matrixOperations/logm/clogma.c new file mode 100644 index 00000000..16c1bb4b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/clogma.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "logm.h" + +void clogma (floatComplex* in, int rows, floatComplex* out){ + doubleComplex *inCopy, *outCopy; + int i=0; + + inCopy = (doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCopy = (doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for(i=0;i +#include "logm.h" + +void dlogma (double* in, int rows, double* out){ + doubleComplex *inCpx,*outCpx; + int i; + + inCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include "logm.h" + +void slogma (float* in, int rows, float* out){ + doubleComplex *inCpx, *outCopy; + int i; + + inCpx=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + outCopy=(doubleComplex *)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include +#include +#include +#include "logm.h" + + +/* FIXME : Untested*/ + +static void dlogmaTest(void){ + int i=0; + + double in4[4] = {0.0683740368112921714783,0.5608486062847077846527, + 0.6623569373041391372681,0.7263506767340004444122 }; + double in9[9] = {0.1985143842175602912903,0.5442573162727057933807,0.2320747897028923034668, + 0.2312237196601927280426,0.2164632631465792655945,0.8833887814544141292572, + 0.6525134947150945663452,0.3076090742833912372589,0.9329616213217377662659}; + double in16[16] = {2.1460078610107302665710,3.126419968903064727783,3.6163610080257058143616,2.922266637906432151794, + 5.664248815737664699554,4.8264719732105731964111,3.3217189135029911994934,5.9350947011262178421021, + 5.0153415976092219352722,4.3685875833034515380859,2.6931248093023896217346,6.3257448654621839523315, + 4.051954015158116817474,9.1847078315913677215576,0.4373343335464596748352,4.818508932366967201233}; + double inHer[16] = {2,3,4,5,3,1,7,9,4,7,2,4,5,9,4,7}; + + double result4R[4]={- 0.8770746698483730119378,0.5288031941140065583795, + 0.6245116064569415925689,- 0.2566930821175439358939}; + + double result9R[9]={- 0.8537183024765053751537,1.9622873186332121520081,- 0.8931518563294031931577, + - 0.6983367178614473536,- 1.1199049557115796638129,1.539392415892589571769, + 1.0815849580686147657,- 0.4078285487954845245362,0.1789837218054647349774,}; + + double result16R[16]={1.4069394184534917968676,- 1.7915236034592834091228,2.3099248310776610004780,0.5320777350783232328979, + 0.6986579270151970222358,0.9874373592109859654187,0.8902400742596190408307,0.6067035092100719895214, + 0.0466142343271527676007,0.3821963653954382200695,1.129789301050062144682,1.2310339071369393870725, + 0.424502387440284123521,3.4580528009566289249221,- 2.1337657344549150195689,1.0826836628584670663145}; + + double resultHerR[16]={- 0.0707459665791660696765,0.9744491331561414559914,0.0316695005563280007621,0.9186825501429138896015, + 0.9744491331561416780360,1.9318283614573175110962,- 0.0664515082056250649956,0.3546926741474874522631, + 0.0316695005563280562733,- 0.0664515082056250649956,0.3206743709780528472919,1.82590946141052867802, + 0.9186825501429141116461,0.3546926741474875632854,1.82590946141052867802,0.9537374500729456361370}; + + + double out4[4],out9[9],out16[16],outHer[16]; + + + dlogma(in4,2,out4); + dlogma(in9,3,out9); + dlogma(in16,4,out16); + dlogma(inHer,4,outHer); + + for(i=0;i<4;i++) { + assert( (fabs(out4[i]-result4R[i]) / fabs(out4[i])) <3e-15); + } + + for(i=0;i<9;i++) { + assert( (fabs(out9[i]-result9R[i]) / fabs(out9[i])) <3e-14); + } + + for(i=0;i<16;i++) { + + assert( (fabs(out16[i]-result16R[i]) / fabs(out16[i])) <3e-14); + } + + for(i=0;i<16;i++) { + assert( (fabs(outHer[i]-resultHerR[i]) / fabs(outHer[i])) <3e-13); + } +} + + +static void zlogmaTest(void){ + int i; + + + double in4D[4] = {0.0683740368112921714783,0.5608486062847077846527, + 0.6623569373041391372681,0.7263506767340004444122 }; + double in9D[9] = {0.1985143842175602912903,0.5442573162727057933807,0.2320747897028923034668, + 0.2312237196601927280426,0.2164632631465792655945,0.8833887814544141292572, + 0.6525134947150945663452,0.3076090742833912372589,0.9329616213217377662659}; + double in16D[16] = {2.1460078610107302665710,3.126419968903064727783,3.6163610080257058143616,2.922266637906432151794, + 5.664248815737664699554,4.8264719732105731964111,3.3217189135029911994934,5.9350947011262178421021, + 5.0153415976092219352722,4.3685875833034515380859,2.6931248093023896217346,6.3257448654621839523315, + 4.051954015158116817474,9.1847078315913677215576,0.4373343335464596748352,4.818508932366967201233}; + double inHerD[16] = {2,3,4,5,3,1,7,9,4,7,2,4,5,9,4,7}; + + + double result4R[4]={- 0.8770746698483730119378,0.5288031941140065583795, + 0.6245116064569415925689,- 0.2566930821175439358939}; + double result4I[4]={2.3169161534469857599561,- 1.2719608554746495432397, + - 1.5021738258100643115256,0.8246765001428078001311}; + double result9R[9]={- 0.8537183024765053751537,1.9622873186332121520081,- 0.8931518563294031931577, + - 0.6983367178614473536,- 1.1199049557115796638129,1.539392415892589571769, + 1.0815849580686147657,- 0.4078285487954845245362,0.1789837218054647349774,}; + double result9I[9]={+ 0.0000000000000006661338,-0.0000000000000005551115,+0.0000000000000001110223, + -0.0000000000000002844947,+0.0000000000000004163336,+ 0.0000000000000008743006, + -0.0000000000000001665335,+ 0.0000000000000004996004,-0.0000000000000003330669}; + double result16R[16]={1.4069394184534917968676,- 1.7915236034592834091228,2.3099248310776610004780,0.5320777350783232328979, + 0.6986579270151970222358,0.9874373592109859654187,0.8902400742596190408307,0.6067035092100719895214, + 0.0466142343271527676007,0.3821963653954382200695,1.129789301050062144682,1.2310339071369393870725, + 0.424502387440284123521,3.4580528009566289249221,- 2.1337657344549150195689,1.0826836628584670663145}; + double result16I[16]={-1.4875734535892033427729,+ 1.8146634352088595321106,-0.0551064758054355952055,-0.8617364610492967980093, + + 1.0892397305420760122985,-1.3287434690517783142383,+ 0.0403503858667347281575,+ 0.6309857092212021179023, + + 1.3838992102024216813,-1.6881931367553519862668,+ 0.0512659110447117594145,+ 0.8016790061501579689463, + -0.6500053973791579675634,+ 0.7929296025459252605927,-0.0240791515993044047406,-0.3765416419935233571792}; + + + doubleComplex out4[4],out9[9],out16[16],outHer[16]; + doubleComplex in4[4],in9[9],in16[16],inHer[16]; + + + for(i=0;i<4;i++) in4[i]=DoubleComplex(in4D[i],0); + for(i=0;i<9;i++) in9[i]=DoubleComplex(in9D[i],0); + for(i=0;i<16;i++) in16[i]=DoubleComplex(in16D[i],0); + for(i=0;i<16;i++) inHer[i]=DoubleComplex(inHerD[i],0); + + + zlogma(in4,2,out4); + zlogma(in9,3,out9); + zlogma(in16,4,out16); + zlogma(inHer,4,outHer); + + + + + for(i=0;i<4;i++) { + assert( fabs(zreals(out4[i])-result4R[i]) / fabs(zreals(out4[i])) <3e-15); + assert( fabs(zimags(out4[i])-result4I[i]) / fabs(zimags(out4[i])) <3e-15); + } + + for(i=0;i<9;i++) { + assert( fabs(zreals(out9[i])-result9R[i]) / fabs(zreals(out9[i])) <3e-14); + if (zimags(out9[i])>3e-16) assert( fabs(zimags(out9[i])-result9I[i]) / fabs(zimags(out9[i])) <1e-16); + else assert(1); + } + + /* FIXME : sign pb with the imaginary part below : it's due to the reals eigenvalues which are + stored like that : eigenvalues + (-0)*i instead of eigenvalues + 0 *i + When we do operations with eigenvalues the sign isn't good + */ + + for(i=0;i<16;i++) { + printf("out[%d] = %f + %f *i ---result = %f + %f *i --- assert : %f + %f*i\n", + i, + zreals(out16[i]), + zimags(out16[i]), + result16R[i], + result16I[i], + fabs(zreals(out16[i])-result16R[i]) / fabs(zreals(out16[i])), + fabs(zimags(out16[i])-result16I[i]) / fabs(zimags(out16[i]))); + + assert( fabs(zreals(out16[i])-result16R[i]) / fabs(zreals(out16[i])) <3e-13); + assert( fabs(zimags(out16[i])-result16I[i]) / fabs(zimags(out16[i])) <3e-13); + } + + +} + +static int logmTest(void){ + dlogmaTest(); + zlogmaTest(); + return 0; +} + +int main (void){ + assert(logmTest()==0); + return 0; +} + + + + + + + + diff --git a/2.3-1/src/c/matrixOperations/logm/testFloatLogm.c b/2.3-1/src/c/matrixOperations/logm/testFloatLogm.c new file mode 100644 index 00000000..3ddd4b06 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/testFloatLogm.c @@ -0,0 +1,185 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "logm.h" + + +static void slogmaTest(void){ + int i=0; + + float in4[4] = {0.0683740368112921714783f,0.5608486062847077846527f, + 0.6623569373041391372681f,0.7263506767340004444122f }; + float in9[9] = {0.1985143842175602912903f,0.5442573162727057933807f,0.2320747897028923034668f, + 0.2312237196601927280426f,0.2164632631465792655945f,0.8833887814544141292572f, + 0.6525134947150945663452f,0.3076090742833912372589f,0.9329616213217377662659f}; + float in16[16] = {2.1460078610107302665710f,3.126419968903064727783f,3.6163610080257058143616f,2.922266637906432151794f, + 5.664248815737664699554f,4.8264719732105731964111f,3.3217189135029911994934f,5.9350947011262178421021f, + 5.0153415976092219352722f,4.3685875833034515380859f,2.6931248093023896217346f,6.3257448654621839523315f, + 4.051954015158116817474f,9.1847078315913677215576f,0.4373343335464596748352f,4.818508932366967201233f}; + float inHer[16] = {2.0f,3.0f,4.0f,5.0f,3.0f,1.0f,7.0f,9.0f,4.0f,7.0f,2.0f,4.0f,5.0f,9.0f,4.0f,7.0f}; + + float result4R[4]={- 0.8770746698483730119378f,0.5288031941140065583795f, + 0.6245116064569415925689f,- 0.2566930821175439358939f}; + + float result9R[9]={- 0.8537183024765053751537f,1.9622873186332121520081f,- 0.8931518563294031931577f, + - 0.6983367178614473536f,- 1.1199049557115796638129f,1.539392415892589571769f, + 1.0815849580686147657f,- 0.4078285487954845245362f,0.1789837218054647349774f}; + + float result16R[16]={1.4069394184534917968676f,- 1.7915236034592834091228f,2.3099248310776610004780f,0.5320777350783232328979f, + 0.6986579270151970222358f,0.9874373592109859654187f,0.8902400742596190408307f,0.6067035092100719895214f, + 0.0466142343271527676007f,0.3821963653954382200695f,1.129789301050062144682f,1.2310339071369393870725f, + 0.424502387440284123521f,3.4580528009566289249221f,- 2.1337657344549150195689f,1.0826836628584670663145f}; + + float resultHerR[16]={- 0.0707459665791660696765f,0.9744491331561414559914f,0.0316695005563280007621f,0.9186825501429138896015f, + 0.9744491331561416780360f,1.9318283614573175110962f,- 0.0664515082056250649956f,0.3546926741474874522631f, + 0.0316695005563280562733f,- 0.0664515082056250649956f,0.3206743709780528472919f,1.82590946141052867802f, + 0.9186825501429141116461f,0.3546926741474875632854f,1.82590946141052867802f,0.9537374500729456361370f}; + + + float out4[4],out9[9],out16[16],outHer[16]; + + + slogma(in4,2,out4); + slogma(in9,3,out9); + slogma(in16,4,out16); + slogma(inHer,4,outHer); + + for(i=0;i<4;i++) { + assert( (fabs(out4[i]-result4R[i]) / fabs(out4[i])) <1e-6); + } + + for(i=0;i<9;i++) { + assert( (fabs(out9[i]-result9R[i]) / fabs(out9[i])) <1e-6); + } + + for(i=0;i<16;i++) { + assert( (fabs(out16[i]-result16R[i]) / fabs(out16[i])) <1e-6); + } + + for(i=0;i<16;i++) { + assert( (fabs(outHer[i]-resultHerR[i]) / fabs(outHer[i])) <1e-7); + } +} + + +static void clogmaTest(void){ + int i; + + float in4D[4] = {0.0683740368112921714783f,0.5608486062847077846527f, + 0.6623569373041391372681f,0.7263506767340004444122f }; + float in9D[9] = {0.1985143842175602912903f,0.5442573162727057933807f,0.2320747897028923034668f, + 0.2312237196601927280426f,0.2164632631465792655945f,0.8833887814544141292572f, + 0.6525134947150945663452f,0.3076090742833912372589f,0.9329616213217377662659f}; + float in16D[16] = {2.1460078610107302665710f,3.126419968903064727783f,3.6163610080257058143616f,2.922266637906432151794f, + 5.664248815737664699554f,4.8264719732105731964111f,3.3217189135029911994934f,5.9350947011262178421021f, + 5.0153415976092219352722f,4.3685875833034515380859f,2.6931248093023896217346f,6.3257448654621839523315f, + 4.051954015158116817474f,9.1847078315913677215576f,0.4373343335464596748352f,4.818508932366967201233f}; + float inHerD[16] = {2.0f,3.0f,4.0f,5.0f,3.0f,1.0f,7.0f,9.0f,4.0f,7.0f,2.0f,4.0f,5.0f,9.0f,4.0f,7.0f}; + + + float result4R[4]={- 0.8770746698483730119378f,0.5288031941140065583795f, + 0.6245116064569415925689f,- 0.2566930821175439358939f}; + float result4I[4]={2.3169161534469857599561f,- 1.2719608554746495432397f, + - 1.5021738258100643115256f,0.8246765001428078001311f}; + float result9R[9]={- 0.8537183024765053751537f,1.9622873186332121520081f,- 0.8931518563294031931577f, + - 0.6983367178614473536f,- 1.1199049557115796638129f,1.539392415892589571769f, + 1.0815849580686147657f,- 0.4078285487954845245362f,0.1789837218054647349774f}; + float result9I[9]={- 0.0000000000000006661338f,0.0000000000000005551115f,0.0000000000000001110223f, + 0.0000000000000002844947f,0.0000000000000004163336f,- 0.0000000000000008743006f, + 0.0000000000000001665335f,- 0.0000000000000004996004f,0.0000000000000003330669f}; + float result16R[16]={1.4069394184534917968676f,- 1.7915236034592834091228f,2.3099248310776610004780f,0.5320777350783232328979f, + 0.6986579270151970222358f,0.9874373592109859654187f,0.8902400742596190408307f,0.6067035092100719895214f, + 0.0466142343271527676007f,0.3821963653954382200695f,1.129789301050062144682f,1.2310339071369393870725f, + 0.424502387440284123521f,3.4580528009566289249221f,- 2.1337657344549150195689f,1.0826836628584670663145f}; + float result16I[16]={-1.4875734535892033427729f,+ 1.8146634352088595321106f,-0.0551064758054355952055f,-0.8617364610492967980093f, + + 1.0892397305420760122985f,-1.3287434690517783142383f,+ 0.0403503858667347281575f,+ 0.6309857092212021179023f, + + 1.3838992102024216813f,-1.6881931367553519862668f,+ 0.0512659110447117594145f,+ 0.8016790061501579689463f, + -0.6500053973791579675634f,+ 0.7929296025459252605927f,-0.0240791515993044047406f,-0.3765416419935233571792f}; + float resultHerR[16]={- 0.0707459665791660696765f,0.9744491331561414559914f,0.0316695005563280007621f,0.9186825501429138896015f, + 0.9744491331561416780360f,1.9318283614573175110962f,- 0.0664515082056250649956f,0.3546926741474874522631f, + 0.0316695005563280562733f,- 0.0664515082056250649956f,0.3206743709780528472919f,1.82590946141052867802f, + 0.9186825501429141116461f,0.3546926741474875632854f,1.82590946141052867802f,0.9537374500729456361370f}; + float resultHerI[16]={2.1383917599789858954296f,- 0.5351429414718615884539f,- 1.3567950682942089279948f,0.1340361867044403687554f, + - 0.5351429414718615884539f,2.2766753224580762449136f,- 0.6151069729626167381653f,- 1.1421039303668867326280f, + - 1.3567950682942089279948f,- 0.6151069729626165161207f,1.2861990290089324595613f,0.4088471998565592624431f, + 0.1340361867044403965110f,- 1.1421039303668867326280f,0.4088471998565592624431f,0.5819191957335942966267f}; + + floatComplex out4[4],out9[9],out16[16],outHer[16]; + floatComplex in4[4],in9[9],in16[16],inHer[16]; + + + for(i=0;i<4;i++) in4[i]=FloatComplex(in4D[i],0); + for(i=0;i<9;i++) in9[i]=FloatComplex(in9D[i],0); + for(i=0;i<16;i++) in16[i]=FloatComplex(in16D[i],0); + for(i=0;i<16;i++) inHer[i]=FloatComplex(inHerD[i],0); + + + clogma(in4,2,out4); + clogma(in9,3,out9); + clogma(in16,4,out16); + clogma(inHer,4,outHer); + + + + + for(i=0;i<4;i++) { + assert( fabs(creals(out4[i])-result4R[i]) / fabs(creals(out4[i])) <1e-6); + assert( fabs(cimags(out4[i])-result4I[i]) / fabs(cimags(out4[i])) <1e-6); + } + + for(i=0;i<9;i++) { + assert( fabs(creals(out9[i])-result9R[i]) / fabs(creals(out9[i])) <1e-6); + if (cimags(out9[i])>1e-15) assert( fabs(cimags(out9[i])-result9I[i]) / fabs(cimags(out9[i])) <1e-7); + else assert(1); + } + + /* FIXME : sign pb with the imaginary part below : it's due to the reals eigenvalues which are + stored like that : eigenvalues + (-0)*i instead of eigenvalues + 0 *i + When we do operations with eigenvalues the sign isn't good + */ + + for(i=0;i<16;i++) { + printf("out[%d] = %f + %f *i ---result = %f + %f *i --- assert : %f + %f*i\n", + i, + creals(out16[i]), + cimags(out16[i]), + result16R[i], + result16I[i], + fabs(creals(out16[i])-result16R[i]) / fabs(creals(out16[i])), + fabs(cimags(out16[i])-result16I[i]) / fabs(cimags(out16[i]))); + + assert( fabs(creals(out16[i])-result16R[i]) / fabs(creals(out16[i])) <1e-6); + assert( fabs(cimags(out16[i])-result16I[i]) / fabs(cimags(out16[i])) <3e-6); + + } + + for(i=0;i<16;i++) { + assert( fabs(creals(outHer[i])-resultHerR[i]) / fabs(creals(outHer[i])) <1e-7); + assert( fabs(cimags(outHer[i])-resultHerI[i]) / fabs(cimags(outHer[i])) <1e-7); + } +} + +static int logmTest(void){ + slogmaTest(); + clogmaTest(); + return 0; +} + +int main (void){ + assert(logmTest()==0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj b/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj new file mode 100644 index 00000000..7b57b301 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DF3336E6-F783-4577-B014-75D0E0377B3E} + testDoubleLogm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters b/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters new file mode 100644 index 00000000..44276aae --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/test_DoubleLogm/testDoubleLogm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj b/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj new file mode 100644 index 00000000..91169df2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BAFD5FA4-3D99-48FF-BBFD-5017207870E7} + testFloatLogm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters b/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters new file mode 100644 index 00000000..e96ff69e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/test_FloatLogm/testFloatLogm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/logm/zlogma.c b/2.3-1/src/c/matrixOperations/logm/zlogma.c new file mode 100644 index 00000000..3fb7b274 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/logm/zlogma.c @@ -0,0 +1,100 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "lapack.h" +#include "logm.h" +#include "log.h" +#include "matrixMultiplication.h" +#include "matrixTranspose.h" +#include "matrixInversion.h" +#include "max.h" +#include "conj.h" +#include "spec.h" + +void zlogma (doubleComplex* in, int rows, doubleComplex* out){ + + /* Algo : */ + /* find eigenvalues and eigenvectors */ + /* use formula + * logm = Vp * diag(log(diag(vp)) * inv(Vp) */ + + + int i = 0,j = 0; + doubleComplex *eigenvalues, *eigenvectors, *tmp, *tmp2; + int hermitienne = 0; + + + /* Data initialization */ + eigenvalues = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + tmp2 = (doubleComplex*) malloc( (unsigned int) (rows*rows)*sizeof(doubleComplex)); + + + + + + /* hermitian test */ + for (i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/cmagns.c b/2.3-1/src/c/matrixOperations/magnitude/cmagns.c new file mode 100644 index 00000000..78d773b7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/cmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +float cmagns(floatComplex in){ + return cabss(in); +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/dmagna.c b/2.3-1/src/c/matrixOperations/magnitude/dmagna.c new file mode 100644 index 00000000..21e4d9eb --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/dmagna.c @@ -0,0 +1,43 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixMagnitude.h" + +double dmagna(double* in, int rows, int cols){ + int i=0,j=0; + double out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/dmagns.c b/2.3-1/src/c/matrixOperations/magnitude/dmagns.c new file mode 100644 index 00000000..d651cacf --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/dmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +double dmagns(double in){ + return dabss(in); +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/smagna.c b/2.3-1/src/c/matrixOperations/magnitude/smagna.c new file mode 100644 index 00000000..761baf8e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/smagna.c @@ -0,0 +1,45 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixMagnitude.h" + +float smagna(float* in, int rows, int cols){ + int i=0,j=0; + float out=0, colSum=0; + + + /* Other method : + srowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/smagns.c b/2.3-1/src/c/matrixOperations/magnitude/smagns.c new file mode 100644 index 00000000..3ccf383a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/smagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +float smagns(float in){ + return sabss(in); +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/testDoubleMagnitude.c b/2.3-1/src/c/matrixOperations/magnitude/testDoubleMagnitude.c new file mode 100644 index 00000000..14189d2b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/testDoubleMagnitude.c @@ -0,0 +1,192 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixMagnitude.h" +#include +static void dmagnsTest(void){ + double in[11]={-5,-4,-3,-2,-1,0,1,2,3,4,5}; + double res[11]={5,4,3,2,1,0,1,2,3,4,5}; + double out; + int i; + + for (i=0;i<11;i++) { + out=dmagns(in[i]); + if (out==0) assert( fabs(out-res[i])==0); + else assert( fabs(out-res[i])/fabs(out)==0); + } +} + + +static void zmagnsTest(void){ + double inR[8] = {0.3493615407496690750122,0.9222898678854107856751,- 0.8906224733218550682068,- 0.3435337245464324951172, \ + 0.5896177329123020172119,0.5896177329123020172119,- 0.5896177329123020172119,- 0.5896177329123020172119}; + double inI[8] = { 0.3873778772540390491486,0.9488184261135756969452,0.5042212805710732936859,- 0.3760118731297552585602, \ + 0.6853979662992060184479,- 0.6853979662992060184479,0.6853979662992060184479,- 0.6853979662992060184479}; + double res[8] = {0.5216465335270885628205,1.3232063354355325657252,1.0234488212737711254618, 0.5093136053899318671512, \ + 0.9041125168759308605715,0.9041125168759308605715,0.9041125168759308605715,0.9041125168759308605715}; + int i; + double out; + doubleComplex in; + + for (i=0;i<8;i++) { + in = DoubleComplex(inR[i],inI[i]); + out=zmagns(in); + assert( fabs(out-res[i])/fabs(out)<3e-16); + } +} + + +static void dmagnaTest(void){ + double in1[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + double in2[12] = {0.2017172696068882942200,0.8400885667651891708374,0.3911573919467628002167,\ + 0.1205995907075703144074,0.8300316557288169860840,0.2855364168062806129456,\ + 0.5878720157779753208160,0.8607514644972980022430,0.4829179299995303153992,\ + 0.8494101651012897491455,0.2232865034602582454681,0.5257060811854898929596}; + double in3[12] = {0.2017172696068882942200,0.4829179299995303153992,0.2855364168062806129456,\ + 0.3911573919467628002167,0.2232865034602582454681,0.8607514644972980022430,\ + 0.8300316557288169860840,0.8400885667651891708374,0.8494101651012897491455,\ + 0.5878720157779753208160,0.1205995907075703144074,0.5257060811854898929596}; + double in4[12] = {0.2017172696068882942200,0.5878720157779753208160,0.8400885667651891708374,\ + 0.8607514644972980022430,0.3911573919467628002167,0.4829179299995303153992,\ + 0.1205995907075703144074,0.8494101651012897491455,0.8300316557288169860840,\ + 0.2232865034602582454681,0.2855364168062806129456,0.5257060811854898929596}; + double in5[12] = {0.2017172696068882942200,0.8300316557288169860840,0.4829179299995303153992,\ + 0.8400885667651891708374,0.2855364168062806129456,0.8494101651012897491455,\ + 0.3911573919467628002167,0.5878720157779753208160,0.2232865034602582454681,\ + 0.1205995907075703144074,0.8607514644972980022430,0.5257060811854898929596}; + double in6[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ +0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ +0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ +0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + double res[6] = {6.1990750515833497047424,1.448623480275273323059,2.5195303875952959060669,\ + 2.4904293166473507881165,3.4897020040079951286316,6.1990750515833497047424}; + double out1,out2,out3,out4,out5,out6; + + out1=dmagna(in1,1,12); + out2=dmagna(in2,2,6); + out3=dmagna(in3,3,4); + out4=dmagna(in4,4,3); + out5=dmagna(in5,6,2); + out6=dmagna(in6,12,1); + + + assert( fabs(out1-res[0])/fabs(out1)<1e-16); + assert( fabs(out2-res[1])/fabs(out2)<1e-16); + assert( fabs(out3-res[2])/fabs(out3)<1e-16); + assert( fabs(out4-res[3])/fabs(out4)<1e-16); + assert( fabs(out5-res[4])/fabs(out5)<1e-16); + assert( fabs(out6-res[5])/fabs(out6)<1e-16); + +} + + +static void zmagnaTest(void){ + double inr1[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + + double inr2[12] = {0.2017172696068882942200,0.8400885667651891708374,0.3911573919467628002167,\ + 0.1205995907075703144074,0.8300316557288169860840,0.2855364168062806129456,\ + 0.5878720157779753208160,0.8607514644972980022430,0.4829179299995303153992,\ + 0.8494101651012897491455,0.2232865034602582454681,0.5257060811854898929596}; + + double inr3[12] = {0.2017172696068882942200,0.4829179299995303153992,0.2855364168062806129456,\ + 0.3911573919467628002167,0.2232865034602582454681,0.8607514644972980022430,\ + 0.8300316557288169860840,0.8400885667651891708374,0.8494101651012897491455,\ + 0.5878720157779753208160,0.1205995907075703144074,0.5257060811854898929596}; + + double inr4[12] = {0.2017172696068882942200,0.5878720157779753208160,0.8400885667651891708374,\ + 0.8607514644972980022430,0.3911573919467628002167,0.4829179299995303153992,\ + 0.1205995907075703144074,0.8494101651012897491455,0.8300316557288169860840,\ + 0.2232865034602582454681,0.2855364168062806129456,0.5257060811854898929596}; + + double inr5[12] = {0.2017172696068882942200,0.8300316557288169860840,0.4829179299995303153992,\ + 0.8400885667651891708374,0.2855364168062806129456,0.8494101651012897491455,\ + 0.3911573919467628002167,0.5878720157779753208160,0.2232865034602582454681,\ + 0.1205995907075703144074,0.8607514644972980022430,0.5257060811854898929596}; + + double inr6[12] = {0.2017172696068882942200,0.3911573919467628002167,0.8300316557288169860840,\ + 0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ + 0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ + 0.8607514644972980022430,0.8494101651012897491455,0.5257060811854898929596}; + + double in7[12]={0}; + + double res[6] = {6.1990750515833497047424,1.448623480275273323059,2.5195303875952959060669,\ + 2.4904293166473507881165,3.4897020040079951286316,6.1990750515833497047424}; + + double inR[12] = {0.9931209897622466087341,0.6488562873564660549164,0.9923190940171480178833,\ + 0.0500419777818024158478,\ + 0.7485506581142544746399,0.4104058998636901378632,0.6084526330232620239258,\ + 0.8544210889376699924469,\ + 0.0642646728083491325378,0.8279082938097417354584,0.9262343775480985641480,\ + 0.5667211269028484821320}; + double inI[12] = {0.5711638936772942543030,0.8160110483877360820770,0.0568927936255931854248,\ + 0.5595936686731874942780,\ + 0.1249340316280722618103,0.7279222286306321620941,0.2677766475826501846314,\ + 0.5465334919281303882599,\ + 0.9885407658293843269348,0.7395656588487327098846,0.0037173107266426086426,\ + 0.5900572859682142734528}; + double result = 3.8451319979533651327586; + + double out1,out2,out3,out4,out5,out6; + double out; + doubleComplex* in,*in1,*in2,*in3,*in4,*in5,*in6; + + in=DoubleComplexMatrix(inR,inI,12); + out = zmagna(in, 4,3); + assert(fabs(out-result)/fabs(out) <1e-16); + + + in1=DoubleComplexMatrix(inr1,in7,12); + in2=DoubleComplexMatrix(inr2,in7,12); + in3=DoubleComplexMatrix(inr3,in7,12); + in4=DoubleComplexMatrix(inr4,in7,12); + in5=DoubleComplexMatrix(inr5,in7,12); + in6=DoubleComplexMatrix(inr6,in7,12); + + out1=zmagna(in1,1,12); + out2=zmagna(in2,2,6); + out3=zmagna(in3,3,4); + out4=zmagna(in4,4,3); + out5=zmagna(in5,6,2); + out6=zmagna(in6,12,1); + + assert( fabs(out1-res[0])/fabs(out1)<1e-16); + assert( fabs(out2-res[1])/fabs(out2)<1e-16); + assert( fabs(out3-res[2])/fabs(out3)<1e-16); + assert( fabs(out4-res[3])/fabs(out4)<1e-16); + assert( fabs(out5-res[4])/fabs(out5)<1e-16); + assert( fabs(out6-res[5])/fabs(out6)<1e-16); +} + + +static int magnTest(void){ + printf("\n >>> Double Magnitude Tests <<< \n"); + dmagnsTest(); + dmagnaTest(); + zmagnsTest(); + zmagnaTest(); + return 0; +} + +int main (void){ + assert (magnTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/magnitude/testFloatMagnitude.c b/2.3-1/src/c/matrixOperations/magnitude/testFloatMagnitude.c new file mode 100644 index 00000000..441d2600 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/testFloatMagnitude.c @@ -0,0 +1,183 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "matrixMagnitude.h" +#include + +static void smagnsTest(void){ + float in[11]={-5.0f,-4.0f,-3.0f,-2.0f,-1.0f,0.0f,1.0f,2.0f,3.0f,4.0f,5.0f}; + float res[11]={5.0f,4.0f,3.0f,2.0f,1.0f,0.0f,1.0f,2.0f,3.0f,4.0f,5.0f}; + float out; + int i; + + for (i=0;i<11;i++) { + out=smagns(in[i]); + if (out==0) assert( fabs(out-res[i])==0); + else assert( fabs(out-res[i])/fabs(out)==0); + } +} + + +static void cmagnsTest(void){ + float inR[8] = {0.3493615407496690750122f,0.9222898678854107856751f,- 0.8906224733218550682068f,- 0.3435337245464324951172f, \ + 0.5896177329123020172119f,0.5896177329123020172119f,- 0.5896177329123020172119f,- 0.5896177329123020172119f}; + float inI[8] = { 0.3873778772540390491486f,0.9488184261135756969452f,0.5042212805710732936859f,- 0.3760118731297552585602f, \ + 0.6853979662992060184479f,- 0.6853979662992060184479f,0.6853979662992060184479f,- 0.6853979662992060184479f}; + float res[8] = {0.5216465335270885628205f,1.3232063354355325657252f,1.0234488212737711254618f, 0.5093136053899318671512f, \ + 0.9041125168759308605715f,0.9041125168759308605715f,0.9041125168759308605715f,0.9041125168759308605715f}; + int i; + float out; + floatComplex in; + + for (i=0;i<8;i++) { + in = FloatComplex(inR[i],inI[i]); + out=cmagns(in); + assert( fabs(out-res[i])/fabs(out)<1e-6); + } +} + + +static void smagnaTest(void){ + float in1[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in2[12] = {0.2017172696068882942200f,0.8400885667651891708374f,0.3911573919467628002167f,\ + 0.1205995907075703144074f,0.8300316557288169860840f,0.2855364168062806129456f,\ + 0.5878720157779753208160f,0.8607514644972980022430f,0.4829179299995303153992f,\ + 0.8494101651012897491455f,0.2232865034602582454681f,0.5257060811854898929596f}; + float in3[12] = {0.2017172696068882942200f,0.4829179299995303153992f,0.2855364168062806129456f,\ + 0.3911573919467628002167f,0.2232865034602582454681f,0.8607514644972980022430f,\ + 0.8300316557288169860840f,0.8400885667651891708374f,0.8494101651012897491455f,\ + 0.5878720157779753208160f,0.1205995907075703144074f,0.5257060811854898929596f}; + float in4[12] = {0.2017172696068882942200f,0.5878720157779753208160f,0.8400885667651891708374f,\ + 0.8607514644972980022430f,0.3911573919467628002167f,0.4829179299995303153992f,\ + 0.1205995907075703144074f,0.8494101651012897491455f,0.8300316557288169860840f,\ + 0.2232865034602582454681f,0.2855364168062806129456f,0.5257060811854898929596f}; + float in5[12] = {0.2017172696068882942200f,0.8300316557288169860840f,0.4829179299995303153992f,\ + 0.8400885667651891708374f,0.2855364168062806129456f,0.8494101651012897491455f,\ + 0.3911573919467628002167f,0.5878720157779753208160f,0.2232865034602582454681f,\ + 0.1205995907075703144074f,0.8607514644972980022430f,0.5257060811854898929596f}; + float in6[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ +0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ +0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ +0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float res[6] = {6.1990750515833497047424f,1.448623480275273323059f,2.5195303875952959060669f,\ + 2.4904293166473507881165f,3.4897020040079951286316f,6.1990750515833497047424f}; + float out1,out2,out3,out4,out5,out6; + + out1=smagna(in1,1,12); + out2=smagna(in2,2,6); + out3=smagna(in3,3,4); + out4=smagna(in4,4,3); + out5=smagna(in5,6,2); + out6=smagna(in6,12,1); + + assert( fabs(out1-res[0])/fabs(out1)<1e-6); + assert( fabs(out2-res[1])/fabs(out2)<1e-6); + assert( fabs(out3-res[2])/fabs(out3)<1e-6); + assert( fabs(out4-res[3])/fabs(out4)<1e-6); + assert( fabs(out5-res[4])/fabs(out5)<1e-6); + assert( fabs(out6-res[5])/fabs(out6)<1e-6); +} + + +static void cmagnaTest(void){ + float inR[12] = {0.9931209897622466087341f,0.6488562873564660549164f,0.9923190940171480178833f, \ + 0.0500419777818024158478f,\ +0.7485506581142544746399f,0.4104058998636901378632f,0.6084526330232620239258f,\ + 0.8544210889376699924469f,\ +0.0642646728083491325378f,0.8279082938097417354584f,0.9262343775480985641480f,\ + 0.5667211269028484821320f}; + float inI[12] = {0.5711638936772942543030f,0.8160110483877360820770f,0.0568927936255931854248f, \ + 0.5595936686731874942780f,\ +0.1249340316280722618103f,0.7279222286306321620941f,0.2677766475826501846314f,\ + 0.5465334919281303882599f,\ +0.9885407658293843269348f,0.7395656588487327098846f,0.0037173107266426086426f,\ + 0.5900572859682142734528f}; + float result = 3.8451319979533651327586f; + + float in1[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in2[12] = {0.2017172696068882942200f,0.8400885667651891708374f,0.3911573919467628002167f,\ + 0.1205995907075703144074f,0.8300316557288169860840f,0.2855364168062806129456f,\ + 0.5878720157779753208160f,0.8607514644972980022430f,0.4829179299995303153992f,\ + 0.8494101651012897491455f,0.2232865034602582454681f,0.5257060811854898929596f}; + float in3[12] = {0.2017172696068882942200f,0.4829179299995303153992f,0.2855364168062806129456f,\ + 0.3911573919467628002167f,0.2232865034602582454681f,0.8607514644972980022430f,\ + 0.8300316557288169860840f,0.8400885667651891708374f,0.8494101651012897491455f,\ + 0.5878720157779753208160f,0.1205995907075703144074f,0.5257060811854898929596f}; + float in4[12] = {0.2017172696068882942200f,0.5878720157779753208160f,0.8400885667651891708374f,\ + 0.8607514644972980022430f,0.3911573919467628002167f,0.4829179299995303153992f,\ + 0.1205995907075703144074f,0.8494101651012897491455f,0.8300316557288169860840f,\ + 0.2232865034602582454681f,0.2855364168062806129456f,0.5257060811854898929596f}; + float in5[12] = {0.2017172696068882942200f,0.8300316557288169860840f,0.4829179299995303153992f,\ + 0.8400885667651891708374f,0.2855364168062806129456f,0.8494101651012897491455f,\ + 0.3911573919467628002167f,0.5878720157779753208160f,0.2232865034602582454681f,\ + 0.1205995907075703144074f,0.8607514644972980022430f,0.5257060811854898929596f}; + float in6[12] = {0.2017172696068882942200f,0.3911573919467628002167f,0.8300316557288169860840f,\ + 0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ + 0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ + 0.8607514644972980022430f,0.8494101651012897491455f,0.5257060811854898929596f}; + float in7[12] = {0}; + float res[6] = {6.1990750515833497047424f,1.448623480275273323059f,2.5195303875952959060669f,\ + 2.4904293166473507881165f,3.4897020040079951286316f,6.1990750515833497047424f}; + float out; + floatComplex *in; + floatComplex *In1,*In2,*In3,*In4,*In5,*In6; + float out1,out2,out3,out4,out5,out6; + + in=FloatComplexMatrix(inR,inI,12); + out = cmagna(in, 4,3); + assert(fabs(out-result)/fabs(out) <1e-6); + + + In1=FloatComplexMatrix(in1,in7,12); + In2=FloatComplexMatrix(in2,in7,12); + In3=FloatComplexMatrix(in3,in7,12); + In4=FloatComplexMatrix(in4,in7,12); + In5=FloatComplexMatrix(in5,in7,12); + In6=FloatComplexMatrix(in6,in7,12); + out1=cmagna(In1,1,12); + out2=cmagna(In2,2,6); + out3=cmagna(In3,3,4); + out4=cmagna(In4,4,3); + out5=cmagna(In5,6,2); + out6=cmagna(In6,12,1); + assert( fabs(out1-res[0])/fabs(out1)<1e-6); + assert( fabs(out2-res[1])/fabs(out2)<1e-6); + assert( fabs(out3-res[2])/fabs(out3)<1e-6); + assert( fabs(out4-res[3])/fabs(out4)<1e-6); + assert( fabs(out5-res[4])/fabs(out5)<1e-6); + assert( fabs(out6-res[5])/fabs(out6)<1e-6); +} + + + +static int magnTest(void){ + printf("\n >>> Float Magnitude Tests <<< \n"); + smagnsTest(); + smagnaTest(); + cmagnsTest(); + cmagnaTest(); + return 0; +} + +int main (void){ + assert (magnTest()==0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj b/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj new file mode 100644 index 00000000..ae847606 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {818553D4-0DEF-4BBE-A43A-45611DD84580} + testDoubleMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters b/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters new file mode 100644 index 00000000..2fa7f702 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/test_DoubleMagnitude/testDoubleMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj b/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj new file mode 100644 index 00000000..710b616e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1E12C5A2-EDF1-47BB-A2EF-60A288DC278D} + testFloatMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters b/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters new file mode 100644 index 00000000..4ec3a5f9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/test_FloatMagnitude/testFloatMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/magnitude/zmagna.c b/2.3-1/src/c/matrixOperations/magnitude/zmagna.c new file mode 100644 index 00000000..8982da1f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/zmagna.c @@ -0,0 +1,46 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "matrixMagnitude.h" + +double zmagna(doubleComplex* in, int rows, int cols){ + int i=0,j=0; + double out=0, colSum=0; + + + /* Other method : + zrowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/magnitude/zmagns.c b/2.3-1/src/c/matrixOperations/magnitude/zmagns.c new file mode 100644 index 00000000..5f132aa0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/magnitude/zmagns.c @@ -0,0 +1,23 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixMagnitude.h" +#include "abs.h" + +double zmagns(doubleComplex in){ + return zabss(in); +} + + diff --git a/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj b/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj new file mode 100644 index 00000000..db4a828d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj @@ -0,0 +1,934 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FD335544-52BF-4736-A34E-77F591D158D5} + matrixOperations + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../../../includes;../type;../elementaryFunctions/includes;../operations/includes;../auxiliaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;MATRIXOPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + + + {72b46833-b150-432d-b231-3e0ecd91e190} + + + {9b622a66-546a-4b33-b947-0a189d259d37} + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj.filters b/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj.filters new file mode 100644 index 00000000..18b2850f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/matrixOperations.vcxproj.filters @@ -0,0 +1,576 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {50669223-b754-4e72-9393-58022d4f7620} + + + {ff7a57b0-c6bc-43c3-8d86-36786e8fe9d5} + + + {dd4e5fd5-24a0-440a-bdf0-b6578a4b9be2} + + + {0c8faacf-3f59-484b-9bd3-d9ec25039ca0} + + + {d27faf2b-2d32-434c-b4db-80c4090d283d} + + + {75693e96-1cec-40f8-b111-eba4dfbbe311} + + + {da1a0d02-b218-44ad-898e-7b971205770d} + + + {6bb535d0-7b17-4940-bdfb-ff142424a6fc} + + + {4eed3cb8-2d46-495f-bf5a-12a2c7f48361} + + + {3216afe8-00b8-4910-99e1-885cebf71f18} + + + {bbed4850-0b3c-4f03-8a72-de19980d8bab} + + + {6d360e1d-6db1-4a93-bbfe-38a15bcbcd75} + + + {280aa00d-6dd5-4468-a6ab-88643dcbe4f7} + + + {0166b150-dcc9-40ac-b233-993d67fca2d7} + + + {ff21e2a8-d2a4-4a19-b1ea-b7d1d3a8d2d8} + + + {78c5b505-dff8-483f-84ae-2a14c3cb4fe0} + + + {6429efdd-0d73-49a9-8b3b-3ca1463bebde} + + + {0880c91a-9165-4b91-8457-9d008eed7217} + + + {a5b7de6e-4acf-4d8f-b93b-5c71afb35071} + + + {24575c01-f16e-4bdb-9cd0-febf8695e09a} + + + {c292263c-96bf-4106-92a6-d8de899c2bb6} + + + {7155bd34-e1bf-4931-914c-7076b45a976e} + + + {873959cb-ab2f-47b4-aaf1-61e0804f3922} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\cat + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\chol + + + Source Files\determ + + + Source Files\determ + + + Source Files\determ + + + Source Files\determ + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\expm + + + Source Files\expm + + + Source Files\expm + + + Source Files\expm + + + Source Files\eye + + + Source Files\eye + + + Source Files\eye + + + Source Files\eye + + + Source Files\fill + + + Source Files\fill + + + Source Files\fill + + + Source Files\fill + + + Source Files\hilb + + + Source Files\hilb + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\infiniteNorm + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\inversion + + + Source Files\jmat + + + Source Files\jmat + + + Source Files\logm + + + Source Files\logm + + + Source Files\logm + + + Source Files\logm + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\magnitude + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\ones + + + Source Files\ones + + + Source Files\ones + + + Source Files\ones + + + Source Files\pown + + + Source Files\pown + + + Source Files\pown + + + Source Files\pown + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\spec2 + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\squaredMagnitude + + + Source Files\trace + + + Source Files\trace + + + Source Files\trace + + + Source Files\trace + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\transpose + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\zeros + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + Source Files\dist + + + + + Source Files\cat + + + Source Files\chol + + + Source Files\determ + + + Source Files\expm + + + Source Files\eye + + + Source Files\fill + + + Source Files\infiniteNorm + + + Source Files\inversion + + + Source Files\jmat + + + Source Files\logm + + + Source Files\magnitude + + + Source Files\ones + + + Source Files\pown + + + Source Files\spec + + + Source Files\spec2 + + + Source Files\squaredMagnitude + + + Source Files\trace + + + Source Files\transpose + + + Source Files\zeros + + + Source Files\dist + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/multiplication/Makefile.am b/2.3-1/src/c/matrixOperations/multiplication/Makefile.am new file mode 100644 index 00000000..f281aadb --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/Makefile.am @@ -0,0 +1,49 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixMultiplication.la + +HEAD = ../includes/matrixMultiplication.h + +libMatrixMultiplication_la_SOURCES = $(HEAD) \ + smulma.c \ + dmulma.c \ + cmulma.c \ + zmulma.c + +check_PROGRAMS = testFloatMatrixMultiplication testDoubleMatrixMultiplication + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testFloatMatrixMultiplication_SOURCES = testFloatMatrixMultiplication.c +testFloatMatrixMultiplication_LDADD = $(check_LDADD) +testFloatMatrixMultiplication_CFLAGS = $(check_INCLUDES) + +testDoubleMatrixMultiplication_SOURCES = testDoubleMatrixMultiplication.c +testDoubleMatrixMultiplication_LDADD = $(check_LDADD) +testDoubleMatrixMultiplication_CFLAGS = $(check_INCLUDES) +TESTS = testFloatMatrixMultiplication testDoubleMatrixMultiplication diff --git a/2.3-1/src/c/matrixOperations/multiplication/Makefile.in b/2.3-1/src/c/matrixOperations/multiplication/Makefile.in new file mode 100644 index 00000000..7bc3f740 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/Makefile.in @@ -0,0 +1,756 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMatrixMultiplication$(EXEEXT) \ + testDoubleMatrixMultiplication$(EXEEXT) +TESTS = testFloatMatrixMultiplication$(EXEEXT) \ + testDoubleMatrixMultiplication$(EXEEXT) +subdir = src/c/matrixOperations/multiplication +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixMultiplication_la_LIBADD = +am__objects_1 = +am_libMatrixMultiplication_la_OBJECTS = $(am__objects_1) \ + libMatrixMultiplication_la-smulma.lo \ + libMatrixMultiplication_la-dmulma.lo \ + libMatrixMultiplication_la-cmulma.lo \ + libMatrixMultiplication_la-zmulma.lo +libMatrixMultiplication_la_OBJECTS = \ + $(am_libMatrixMultiplication_la_OBJECTS) +libMatrixMultiplication_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testDoubleMatrixMultiplication_OBJECTS = testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.$(OBJEXT) +testDoubleMatrixMultiplication_OBJECTS = \ + $(am_testDoubleMatrixMultiplication_OBJECTS) +testDoubleMatrixMultiplication_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixMultiplication_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMatrixMultiplication_OBJECTS = testFloatMatrixMultiplication-testFloatMatrixMultiplication.$(OBJEXT) +testFloatMatrixMultiplication_OBJECTS = \ + $(am_testFloatMatrixMultiplication_OBJECTS) +testFloatMatrixMultiplication_DEPENDENCIES = $(check_LDADD) +testFloatMatrixMultiplication_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixMultiplication_la_SOURCES) \ + $(testDoubleMatrixMultiplication_SOURCES) \ + $(testFloatMatrixMultiplication_SOURCES) +DIST_SOURCES = $(libMatrixMultiplication_la_SOURCES) \ + $(testDoubleMatrixMultiplication_SOURCES) \ + $(testFloatMatrixMultiplication_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixMultiplication.la +HEAD = ../includes/matrixMultiplication.h +libMatrixMultiplication_la_SOURCES = $(HEAD) \ + smulma.c \ + dmulma.c \ + cmulma.c \ + zmulma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + libMatrixMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testFloatMatrixMultiplication_SOURCES = testFloatMatrixMultiplication.c +testFloatMatrixMultiplication_LDADD = $(check_LDADD) +testFloatMatrixMultiplication_CFLAGS = $(check_INCLUDES) +testDoubleMatrixMultiplication_SOURCES = testDoubleMatrixMultiplication.c +testDoubleMatrixMultiplication_LDADD = $(check_LDADD) +testDoubleMatrixMultiplication_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/multiplication/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/multiplication/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixMultiplication.la: $(libMatrixMultiplication_la_OBJECTS) $(libMatrixMultiplication_la_DEPENDENCIES) + $(libMatrixMultiplication_la_LINK) -rpath $(pkglibdir) $(libMatrixMultiplication_la_OBJECTS) $(libMatrixMultiplication_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMatrixMultiplication$(EXEEXT): $(testDoubleMatrixMultiplication_OBJECTS) $(testDoubleMatrixMultiplication_DEPENDENCIES) + @rm -f testDoubleMatrixMultiplication$(EXEEXT) + $(testDoubleMatrixMultiplication_LINK) $(testDoubleMatrixMultiplication_OBJECTS) $(testDoubleMatrixMultiplication_LDADD) $(LIBS) +testFloatMatrixMultiplication$(EXEEXT): $(testFloatMatrixMultiplication_OBJECTS) $(testFloatMatrixMultiplication_DEPENDENCIES) + @rm -f testFloatMatrixMultiplication$(EXEEXT) + $(testFloatMatrixMultiplication_LINK) $(testFloatMatrixMultiplication_OBJECTS) $(testFloatMatrixMultiplication_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-cmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-dmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-smulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixMultiplication_la-zmulma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixMultiplication_la-smulma.lo: smulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-smulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-smulma.Tpo -c -o libMatrixMultiplication_la-smulma.lo `test -f 'smulma.c' || echo '$(srcdir)/'`smulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-smulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-smulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smulma.c' object='libMatrixMultiplication_la-smulma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-smulma.lo `test -f 'smulma.c' || echo '$(srcdir)/'`smulma.c + +libMatrixMultiplication_la-dmulma.lo: dmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-dmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-dmulma.Tpo -c -o libMatrixMultiplication_la-dmulma.lo `test -f 'dmulma.c' || echo '$(srcdir)/'`dmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-dmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-dmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmulma.c' object='libMatrixMultiplication_la-dmulma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-dmulma.lo `test -f 'dmulma.c' || echo '$(srcdir)/'`dmulma.c + +libMatrixMultiplication_la-cmulma.lo: cmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-cmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-cmulma.Tpo -c -o libMatrixMultiplication_la-cmulma.lo `test -f 'cmulma.c' || echo '$(srcdir)/'`cmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-cmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-cmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulma.c' object='libMatrixMultiplication_la-cmulma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-cmulma.lo `test -f 'cmulma.c' || echo '$(srcdir)/'`cmulma.c + +libMatrixMultiplication_la-zmulma.lo: zmulma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -MT libMatrixMultiplication_la-zmulma.lo -MD -MP -MF $(DEPDIR)/libMatrixMultiplication_la-zmulma.Tpo -c -o libMatrixMultiplication_la-zmulma.lo `test -f 'zmulma.c' || echo '$(srcdir)/'`zmulma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixMultiplication_la-zmulma.Tpo $(DEPDIR)/libMatrixMultiplication_la-zmulma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmulma.c' object='libMatrixMultiplication_la-zmulma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMatrixMultiplication_la-zmulma.lo `test -f 'zmulma.c' || echo '$(srcdir)/'`zmulma.c + +testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o: testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o `test -f 'testDoubleMatrixMultiplication.c' || echo '$(srcdir)/'`testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixMultiplication.c' object='testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.o `test -f 'testDoubleMatrixMultiplication.c' || echo '$(srcdir)/'`testDoubleMatrixMultiplication.c + +testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj: testDoubleMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj `if test -f 'testDoubleMatrixMultiplication.c'; then $(CYGPATH_W) 'testDoubleMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixMultiplication.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Tpo $(DEPDIR)/testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMatrixMultiplication.c' object='testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixMultiplication-testDoubleMatrixMultiplication.obj `if test -f 'testDoubleMatrixMultiplication.c'; then $(CYGPATH_W) 'testDoubleMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMatrixMultiplication.c'; fi` + +testFloatMatrixMultiplication-testFloatMatrixMultiplication.o: testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testFloatMatrixMultiplication-testFloatMatrixMultiplication.o -MD -MP -MF $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.o `test -f 'testFloatMatrixMultiplication.c' || echo '$(srcdir)/'`testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixMultiplication.c' object='testFloatMatrixMultiplication-testFloatMatrixMultiplication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.o `test -f 'testFloatMatrixMultiplication.c' || echo '$(srcdir)/'`testFloatMatrixMultiplication.c + +testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj: testFloatMatrixMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -MT testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj `if test -f 'testFloatMatrixMultiplication.c'; then $(CYGPATH_W) 'testFloatMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixMultiplication.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Tpo $(DEPDIR)/testFloatMatrixMultiplication-testFloatMatrixMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMatrixMultiplication.c' object='testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixMultiplication_CFLAGS) $(CFLAGS) -c -o testFloatMatrixMultiplication-testFloatMatrixMultiplication.obj `if test -f 'testFloatMatrixMultiplication.c'; then $(CYGPATH_W) 'testFloatMatrixMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMatrixMultiplication.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/multiplication/cmulma.c b/2.3-1/src/c/matrixOperations/multiplication/cmulma.c new file mode 100644 index 00000000..33eab648 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/cmulma.c @@ -0,0 +1,44 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for floats complex matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void cmulma(floatComplex *in1, int lines1, int columns1, + floatComplex *in2, int lines2, int columns2, + floatComplex *out) +{ + int i = 0; + int k = 0; + floatComplex accu = FloatComplex(0, 0); + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = FloatComplex(0,0); + for (k = 0; k < columns1 ; ++k) + { + accu = cadds(accu, + cmuls(in1[i % lines1 + k *lines1] , + in2[k + (i / lines1) *lines2] )); + } + out[i] = accu; + } +} diff --git a/2.3-1/src/c/matrixOperations/multiplication/dmulma.c b/2.3-1/src/c/matrixOperations/multiplication/dmulma.c new file mode 100644 index 00000000..8edd3112 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/dmulma.c @@ -0,0 +1,67 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef WITHOUT_BLAS +#include "lapack.h" +#endif +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void dmulma(double *in1, int lines1, int columns1, + double *in2, int lines2, int columns2, + double *out) +{ +#ifndef WITHOUT_BLAS + /* + ** USES BLAS DGEMM FUNCTION. + */ + double One = 1; + double Zero = 0; + + /* Cr <- 1*Ar*Br + 0*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1 , &lines1, in2, &lines2, &Zero, out, &lines1); +#else + /* + ** DO NOT USE ANY BLAS FUNCTION. + */ + int i = 0; + int k = 0; + double accu = 0; + + /* + ** How to convert 2 index matrixes to one. + ** #define in1(a, b) in1[a+b*lines1] + ** #define in2(c, d) in2[c+d*lines2] + */ + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = 0; + for (k = 0; k < columns1 ; ++k) + { + accu += in1[i % lines1 + k * lines1] + * in2[k + (i / lines1) * lines2]; + } + out[i] = accu; + } +#endif +} diff --git a/2.3-1/src/c/matrixOperations/multiplication/smulma.c b/2.3-1/src/c/matrixOperations/multiplication/smulma.c new file mode 100644 index 00000000..edf10a01 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/smulma.c @@ -0,0 +1,49 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for floats matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void smulma(float *in1, int lines1, int columns1, + float *in2, int lines2, int columns2, + float *out) +{ + int i = 0; + int k = 0; + float accu = 0; + + /* + ** How to convert 2 index matrixes to one. + ** #define in1(a, b) in1[a+b*lines1] + ** #define in2(c, d) in2[c+d*lines2] + */ + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = 0; + for (k = 0; k < columns1 ; ++k) + { + accu += in1[i % lines1 + k * lines1] + * in2[k + (i / lines1) * lines2]; + } + out[i] = accu; + } +} diff --git a/2.3-1/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c b/2.3-1/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c new file mode 100644 index 00000000..01d2a371 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/testDoubleMatrixMultiplication.c @@ -0,0 +1,354 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "matrixMultiplication.h" + +int testFloatMultiplication(void); + +static void zmulmaTest(void) { + double realM1[4] = {1.0, 2.0, 3.0, 4.0}; + double imagM1[4] = {1.0, 2.0, 3.0, 4.0}; + double realM3[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}; + double imagM3[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}; + + doubleComplex *M1; + doubleComplex *M2; + doubleComplex M1_mul_M2[4]; + doubleComplex *M3; + doubleComplex *M4; + doubleComplex M3_mul_M4[4]; + doubleComplex miscM3_mul_M4[9]; + + int i = 0; + + printf("\n>>>> Matrix Complex Double Multiplication Tests\n"); + + M1 = DoubleComplexMatrix(realM1, imagM1, 4); + M2 = DoubleComplexMatrix(realM1, imagM1, 4); + + /* + [ 1+1.%i 3+3.%i] * [ 1+1.%i 3+3.%i] = [ 14.%i 30.%i ] + [ 2+2.%i 4+4.%i] [ 2+2.%i 4+4.%i] [ 20.%i 44.%i ] + */ + zmulma(M1, 2, 2, M2, 2, 2, M1_mul_M2); + for (i = 0; i < 4; ++i) + { + printf("M1_mul_M2[%d] = %e + %e i\n", i, zreals(M1_mul_M2[i]), zimags(M1_mul_M2[i])); + } + for (i = 0; i < 4; ++i) + { + assert(zreals(M1_mul_M2[i]) == 0.0); + } + assert(zimags(M1_mul_M2[0]) == 14.0); + assert(zimags(M1_mul_M2[1]) == 20.0); + assert(zimags(M1_mul_M2[2]) == 30.0); + assert(zimags(M1_mul_M2[3]) == 44.0); + + M3 = DoubleComplexMatrix(realM3, imagM3, 6); + M4 = DoubleComplexMatrix(realM3, imagM3, 6); + + /* + [ 1+1.%i 3+3.%i 5+5.%i ] * [ 1+1.%i 4+4.%i ] = [ 44.%i 98.%i ] + [ 2+2.%i 4+4.%i 6+6.%i ] [ 2+2.%i 5+5.%i ] [ 56.%i 128.%i ] + [ 3+3.%i 6+6.%i ] + */ + zmulma(M3, 2, 3, M4, 3, 2, M3_mul_M4); + for (i = 0; i < 4; ++i) + { + printf("M3_mul_M4[%d] = %e + %e i\n", i, zreals(M3_mul_M4[i]), zimags(M3_mul_M4[i])); + } + for (i = 0; i < 4; ++i) + { + assert(zreals(M3_mul_M4[i]) == 0.0); + } + assert(zimags(M3_mul_M4[0]) == 44.0); + assert(zimags(M3_mul_M4[1]) == 56.0); + assert(zimags(M3_mul_M4[2]) == 98.0); + assert(zimags(M3_mul_M4[3]) == 128.0); + + /* + [ 1+1.%i 4+4.%i ] * [ 1+1.%i 3+3.%i 5+5.%i ] = [ 18.%i 38.%i 58.%i ] + [ 2+2.%i 5+5.%i ] [ 2+2.%i 4+4.%i 6+6.%i ] [ 24.%i 52.%i 80.%i ] + [ 3+3.%i 6+6.%i ] [ 30.%i 66.%i 102.%i ] + */ + zmulma(M3, 3, 2, M4, 2, 3, miscM3_mul_M4); + for (i = 0; i < 9; ++i) + { + printf("miscM3_mul_M4[%d] = %e + %e i\n", i, zreals(miscM3_mul_M4[i]), zimags(miscM3_mul_M4[i])); + } + for (i = 0; i < 9; ++i) + { + assert(zreals(miscM3_mul_M4[i]) == 0.0); + } + assert(zimags(miscM3_mul_M4[0]) == 18.0); + assert(zimags(miscM3_mul_M4[1]) == 24.0); + assert(zimags(miscM3_mul_M4[2]) == 30.0); + assert(zimags(miscM3_mul_M4[3]) == 38.0); + assert(zimags(miscM3_mul_M4[4]) == 52.0); + assert(zimags(miscM3_mul_M4[5]) == 66.0); + assert(zimags(miscM3_mul_M4[6]) == 58.0); + assert(zimags(miscM3_mul_M4[7]) == 80.0); + assert(zimags(miscM3_mul_M4[8]) == 102.0); +} + +static void dmulmaTest(void) { + double M1[4] = {1.0, 2.0, 3.0, 4.0}; + double M2[4] = {1.0, 2.0, 3.0, 4.0}; + double M1_by_M2[4]; + double M3[4] = {1.0, 0.0, 1.0, 0.0}; + double M4[4] = {0.0, 1.0, 0.0, 1.0}; + double M3_by_M4[4]; + double M5[4] = {1.0, 0.0, 0.0, 1.0}; + double M6[4] = {42.0, 51.0, 69.0, 1664.0}; + double M5_by_M6[4]; + double M7[6] = {1.0, 4.0, 2.0, 5.0, 3.0, 6.0}; + double M8[6] = {1.0, 3.0, 5.0, 2.0, 4.0, 6.0}; + double M7_by_M8[4]; + double miscM7_by_M8[9]; + double M9[6] = {1, 4, 2, 5, 3, 6}; + double M10[9] = {4, 8, 3, 2, 8, 4, 3, 4, 5}; + double M9_by_M10[6]; + + int i = 0; + + printf("\n>>>> Matrix Real Double Multiplication Tests\n"); + /* + [ 1 3 ] * [ 1 3 ] = [ 7 15 ] + [ 2 4 ] [ 2 4 ] [10 22 ] + */ + dmulma(M1, 2, 2, M2, 2, 2, M1_by_M2); + for (i = 0; i < 4; ++i) { + printf("M1_by_M2[%d] = %e\n", i, M1_by_M2[i]); + } + assert(M1_by_M2[0] == 7.0); + assert(M1_by_M2[1] == 10.0); + assert(M1_by_M2[2] == 15.0); + assert(M1_by_M2[3] == 22.0); + /* + [ 1 1 ] * [ 0 0 ] = [ 1 1 ] + [ 0 0 ] [ 1 1 ] [ 0 0 ] + */ + dmulma(M3, 2, 2, M4, 2, 2, M3_by_M4); + for (i = 0; i < 4; ++i) { + printf("M3_by_M4[%d] = %e\n", i, M3_by_M4[i]); + } + assert(M3_by_M4[0] == 1.0); + assert(M3_by_M4[1] == 0.0); + assert(M3_by_M4[2] == 1.0); + assert(M3_by_M4[3] == 0.0); + + /* + [ 1 0 ] * [ 42 69 ] = [ 42 69 ] + [ 0 1 ] [ 51 1664 ] [ 51 1664 ] + */ + dmulma(M5, 2, 2, M6, 2, 2, M5_by_M6); + for (i = 0; i < 4; ++i) { + printf("M5_by_M6[%d] = %e\n", i, M5_by_M6[i]); + } + assert(M5_by_M6[0] == 42.0); + assert(M5_by_M6[1] == 51.0); + assert(M5_by_M6[2] == 69.0); + assert(M5_by_M6[3] == 1664.0); + + /* + [ 1 2 3 ] * [ 1 2 ] = [ 22 28 ] + [ 4 5 6 ] [ 3 4 ] [ 49 64 ] + [ 5 6 ] + */ + dmulma(M7, 2, 3, M8, 3, 2, M7_by_M8); + for (i = 0; i < 4; ++i) { + printf("M7_by_M8[%d] = %e\n", i, M7_by_M8[i]); + } + assert(M7_by_M8[0] == 22.0); + assert(M7_by_M8[1] == 49.0); + assert(M7_by_M8[2] == 28.0); + assert(M7_by_M8[3] == 64.0); + + /* + [ 1 5 ] * [ 1 5 4 ] = [ 16 15 34 ] + [ 4 3 ] [ 3 2 6 ] [ 13 26 34 ] + [ 2 6 ] [ 20 22 44 ] + */ + dmulma(M7, 3, 2, M8, 2, 3, miscM7_by_M8); + for (i = 0; i < 9; ++i) { + printf("miscM7_by_M8[%d] = %e\n", i, miscM7_by_M8[i]); + } + assert(miscM7_by_M8[0] == 16.0); + assert(miscM7_by_M8[1] == 13.0); + assert(miscM7_by_M8[2] == 20.0); + assert(miscM7_by_M8[3] == 15.0); + assert(miscM7_by_M8[4] == 26.0); + assert(miscM7_by_M8[5] == 22.0); + assert(miscM7_by_M8[6] == 34.0); + assert(miscM7_by_M8[7] == 34.0); + assert(miscM7_by_M8[8] == 44.0); + + /* + [ 1 2 3 ] * [ 4 2 3 ] = [ 29 30 26 ] + [ 4 5 6 ] [ 8 8 4 ] [ 74 72 62 ] + [ 3 4 5 ] + */ + dmulma(M9, 2, 3, M10, 3, 3, M9_by_M10); + for (i = 0; i < 6; ++i) { + printf("M9_by_M10[%d] = %e\n", i, M9_by_M10[i]); + } + assert(M9_by_M10[0] == 29.0); + assert(M9_by_M10[1] == 74.0); + assert(M9_by_M10[2] == 30.0); + assert(M9_by_M10[3] == 72.0); + assert(M9_by_M10[4] == 26.0); + assert(M9_by_M10[5] == 62.0); + +} + + + + +static void dmulma2Test(void){ + int i=0; + double in1[16]={0.2164632631465792655945 , 0.8833887814544141292572 , 0.6525134947150945663452 , 0.3076090742833912372589, 0.9329616213217377662659, + 0.2146007861010730266571 , 0.3126419968903064727783 , 0.3616361008025705814362 , 0.2922266637906432151794 , 0.5664248815737664699554 , + 0.4826471973210573196411 , 0.3321718913502991199493 , 0.5935094701126217842102 , 0.5015341597609221935272 , 0.4368587583303451538086 , + 0.2693124809302389621735 }; + double in2[16]={ 0.6325744865462183952332 , 0.4051954015158116817474 , 0.9184707831591367721558 , 0.0437334333546459674835 , 0.4818508932366967201233 , + 0.2639556000940501689911 , 0.4148103706538677215576 , 0.2806498021818697452545 , 0.1280058464035391807556 , 0.7783128595910966396332 , + 0.2119030449539422988892 , 0.1121354666538536548615 , 0.6856895955279469490051 , 0.1531216683797538280487 , 0.6970850601792335510254 , + 0.8415518426336348056793 }; + double result1[1]={3.4777275993941634268936}; + double result2[4]={1.9089008209228131018875 , 1.5406061588610213686223 , + 1.8239702765316110344429, 1.4540285665075025622883}; + double result4[16]={0.8093187558996659536348 , 1.1879429718699099360890 , 1.0018471710504197602631 , 0.6579870739173818705581, + 0.6383504274229201413959 , 0.8580211304925904336471 , 0.7197492031038768001139 , 0.4570484210841743166753 , + 0.8823217718625468997118 , 0.4563724043650834172325 , 0.4781206002867167681458 , 0.4214295036121353255076 , + 0.9944590770529683210199 , 1.4555038456021862636192 , 1.199379422070573131265 , 0.7244911422701945102887}; + double result8[64]={0.2553380379093421193026,0.7883219621670439769545,0.6083298137928665472174,0.3291801751097247485944,0.83065502662064605310 , + 0.3389703173185232287779,0.3747825106430331398855,0.3378859496255101069195, + 0.211595258152759591042, 0.8361384907451508974319,0.6204223995507252009674,0.2970569646365784355346,0.8828541978493160691244 , + 0.2190383628278015915036,0.3062578731251097141630,0.3439301521590905075243, + 0.1814378811044508321704,0.5751726929430913681784,0.4418116408800580319216,0.2359003381269093035932,0.6062085389345149843976 , + 0.2357883305794587769366,0.2659581411763266567405,0.2453412157151133865529 , + 0.1718045618038900324009,0.5254058588311405486593,0.406124205051207498585, 0.2208234097178256027938,0.5535704713264770759906 , + 0.2297740943495505672178,0.2522914667188620452265,0.2255928995139138970583 , + 0.255152333558011423786, 0.5539346979946898619218,0.4591760625013173724440,0.2979094145476890442836,0.5813605948770583786711 , + 0.4178206413298739541062,0.3800327928667431298671,0.2559009023296956453208 , + 0.0786381978942892051476,0.2507090910879711254111,0.1923914651044380252909,0.1024315495419729910021,0.2642508697778033210923 , + 0.1017143270719664260859,0.1152371518487332324732,0.1068312716501549353154 , + 0.1931728416583101681781,0.6924624191277827245372,0.5213254583603328384811,0.2617870559185208612085,0.7306012370300282166014 , + 0.2239452735136546190908,0.2812679063146140134855,0.2892076880831473406630 , + 0.3968171941968219318397,1.09247302468375151463, 0.8610300469787290911228,0.4939695572954598823401,1.149822596137767938274 , + 0.5716619981842931963456,0.5855773582603787108525,0.4787315376620214779635 }; + double result16[256]={0.1369291375410663369472,0.5588092048492155905493,0.4127633888838795339638,0.1945856522217737638592,0.5901677185749256704384 , + 0.1357509820803011191259,0.1977693506556700286936,0.2287617707817625745115,0.1848551318024805323326,0.3583059286285278921547 , + 0.3053103030283391694510,0.2101234636160017044126,0.3754389483168098506916,0.3172577135961544003706,0.2763457047440365799140 , + 0.1703602043449341518766 , + 0.0877099188241009936062,0.3579450719959849647189,0.2643954674855681918899,0.1246417823641658567668,0.3780317587503042031649 , + 0.0869552516898331046002,0.1266810994606728801859,0.1465332850673101428018,0.1184089003682757823555,0.2295127573178283864053 , + 0.1955664249089870132536,0.1345945228879510124909,0.2404873080457204104210,0.203219335238222109652, 0.1770131599873631389475 , + 0.1091241788437475462859 , + 0.1988151828274209720338,0.8113667859364313006410,0.5993145805128781145044,0.2825299473639234504319,0.8568979909927945115555 , + 0.1971045520768189285299,0.287152539732276168571, 0.3321521927227535364580,0.2684016527517738559538,0.5202447045798785918436 , + 0.4432973493130339392998,0.30509017719196090956, 0.5451211078267039766843,0.4606444724966738402117,0.4012420058936001510119 , + 0.2473556452745266642790 , + 0.0094666816925501173080,0.0386336243999785347580,0.0285366554341297228026,0.0134528009494570312266,0.0408016148885166698990 , + 0.0093852291768059120658,0.0136729079348656499399,0.0158155883130832522476,0.0127800753253386294162,0.0247717048087195516881 , + 0.0211078190378471211575,0.0145270172726550076542,0.0259562068565215887939,0.0219338107509826525654,0.0191053333928335386527 , + 0.0117779594363369693316 , + 0.1043030167001093577728,0.4256616734190865058984,0.3144142102774669100818,0.1482217072111654543321,0.4495483905894361309485 , + 0.1034055804720993287926,0.1506468254648987425970,0.174254678198354717722, 0.1408096789751012989367,0.272932335137809511938 , + 0.2325639831473396978989,0.1600573225552646139391,0.2859830683182053578939,0.2416646828695165061252,0.210500782919751050493 , + 0.1297684594960265003216 , + 0.0571366905221716223084,0.2331754159251516189677,0.1722345910669886293043,0.0811951377968477827629,0.2462604446206972941269 , + 0.0566450792759636348461,0.0825236059037830066432,0.0954558740030149316391,0.0771348644043414743976,0.1495110195240048345244 , + 0.1273974306025911218399,0.0876786309157438353834,0.1566601483450788256935,0.1323827501073594481440,0.1153113157114278863880 , + 0.0710865375167586688310 , + 0.0897912064187782466007,0.3664388278665740572571,0.2706693645994189267867,0.1275994341199866433101,0.3870021559463034388493 , + 0.08901863162519749184, 0.1296871426120334014343,0.1500104050157337609583,0.121218650721939893988, 0.2349589150731871967093 , + 0.2002070628157982257189,0.1377883453718138639932,0.2461938832839972723932,0.2080415707060042362908,0.1812135434663988964310 , + 0.1117136100363851081152 , + 0.0607503719817294868255,0.2479228867648642919974,0.1831277832127918003824,0.0863304258469818203148,0.2618354944672221518154 , + 0.0602276681673398900374,0.0877429145810092459001,0.1014931001520641418168,0.0820133553851117719224,0.1589670309645665469134 , + 0.1354548404517885995535,0.0932239755978389733615,0.1665683153801736371413,0.1407554627243530753766,0.1226043241068286160367 , + 0.0755824944981801360999 , + 0.0277085632143499079050,0.1130789286734633775078,0.0835255421807369752285,0.0393757599150546533373,0.1194245419993072432341 , + 0.0274701552637327192641,0.0400200034332363480116,0.0462915351733086607999,0.0374067214402037592769,0.0725056963898744188946 , + 0.0617816630073779321508,0.0425199441037594910719,0.0759726820702821964426,0.0641993046204846901093,0.0559204751188750043278 , + 0.0344735720685122454254 , + 0.1684761413360341408829,0.6875528486244794068583,0.5078596439934851547449,0.2394160982416763117087,0.7261360273796675368629 , + 0.1670265515008234058492,0.2433332866279651618413,0.2814660277470227844887,0.2274437703436615054731,0.440855769321226442781 , + 0.3756505203205803833377,0.2585336546326343909463,0.4619360528777511909482,0.3903504860661412556588,0.3400127894335067679776 , + 0.209609367156386977582 , + 0.0458692245814266291726,0.1871927726683430270871,0.1382695964036666780306,0.0651832994961140249623,0.1976974083832430950647 , + 0.0454745600243270306495,0.0662497911215368939786,0.0766317909253355217247,0.0619237198739692532024,0.1200271571431572731337 , + 0.1022744107508182648259,0.0703882352252384740909,0.1257664639258653793696,0.1062766156017563717873,0.0925717011049985438742 , + 0.0570681347532181540427 , + 0.0242732090263575867040,0.0990592132451698637041,0.0731699052278139971950,0.0344938870917280079875,0.1046180867770489658630 , + 0.0240643592937276537547,0.0350582562168871778030,0.0405522329223763147721,0.0327689733128625759750,0.0635163184196280983240 , + 0.0541218687007713472603,0.0372482500458589660397,0.066553461394560253783, 0.0562397670476394023753,0.0489873607271963315557 , + 0.0301994807248194101212 , + 0.1484266073536374686004,0.6057304962494031164155,0.4474217142677203162826,0.2109243417261047193190,0.6397220767671999430704 , + 0.1471495262216242216891,0.2143753643927638896649,0.247970111687618482987, 0.2003767828970874909089,0.3883916479432811819095 , + 0.3309461615137729850744,0.2277668098257397411022,0.4069632685035297625653,0.3438967551499154673422,0.2995495053023755072097 , + 0.1846647661196834933062 , + 0.0331452159959298997549,0.1352659640442576416408,0.0999139549510789648501,0.0471016146630244963989,0.1428566399910645989824 , + 0.0328600304034029899736,0.0478722641694215370056,0.0553743231012384373724,0.0447462343046726856999,0.0867319228783796081217 , + 0.0739037440926125499541,0.0508627141924161210729,0.0908791602628282874088,0.0767957472920304112796,0.0668925419218501238205 , + 0.0412375763955288299201 , + 0.1508933068171264824109,0.6157971218818100167525,0.4548574087312337033140,0.2144296900585161147479,0.6503536079439788952783 , + 0.1495950018937773073890,0.2179380652168350362974,0.2520911230909432809710,0.2037068415144771826864,0.3948463226588642127624 , + 0.3364461505898876381160,0.2315520628717731010937,0.4137265846904019661601,0.3496119699388837709364,0.3045277138405338979155 , + 0.1877337069762743115842 , + 0.1821650579634931654827,0.7434174567948435008447,0.5491239338208003806230,0.2588689832740145302381,0.7851355715297718695922 , + 0.1805976869739845391827,0.2631044485676965472010,0.3043355269932461748539,0.2459238873796954771844,0.4766759028019415533883 , + 0.4061726382474953322976,0.2795398672369437398366,0.4994689881937890429953,0.4220669962905158612010,0.3676392930435437023107 , + 0.2266404145710782247480 }; + double out1[1],out2[4],out4[16],out8[64],out16[256]; + + + dmulma(in1, 1, 16, in2, 16, 1, out1); + dmulma(in1, 2, 8, in2, 8, 2, out2); + dmulma(in1, 4, 4, in2, 4, 4, out4); + dmulma(in1, 8, 2, in2, 2, 8, out8); + dmulma(in1, 16, 1, in2, 1, 16, out16); + + + assert( (fabs(out1[0]-result1[0]) / fabs(out1[0])) <1e-16); + for (i=0;i<4;i++) assert( (fabs(out2[i]-result2[i]) / fabs(out2[i])) <3e-16); + for (i=0;i<16;i++) assert( (fabs(out4[i]-result4[i]) / fabs(out4[i])) <3e-16); + for (i=0;i<64;i++) assert( (fabs(out8[i]-result8[i]) / fabs(out8[i])) <3e-16); + for (i=0;i<256;i++) assert( (fabs(out16[i]-result16[i]) / fabs(out16[i])) <1e-16); +} + + + + + + +static int testDoubleMultiplication(void) { + + printf("\n>>>> Matrix Double Multiplication Tests\n"); + dmulmaTest(); + dmulma2Test(); + zmulmaTest(); + return 0; +} + + + +int main(void) { + + assert(testDoubleMultiplication() == 0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c b/2.3-1/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c new file mode 100644 index 00000000..f8ba0cde --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/testFloatMatrixMultiplication.c @@ -0,0 +1,213 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "matrixMultiplication.h" + +int testFloatMultiplication(void); + +static void cmulmaTest(void) { + float realM1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float imagM1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float realM3[6] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + float imagM3[6] = {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}; + + floatComplex *M1; + floatComplex *M2; + floatComplex M1_mul_M2[4]; + floatComplex *M3; + floatComplex *M4; + floatComplex M3_mul_M4[4]; + floatComplex miscM3_mul_M4[9]; + + int i = 0; + + printf("\n>>>> Matrix Complex Float Multiplication Tests\n"); + + M1 = FloatComplexMatrix(realM1, imagM1, 4); + M2 = FloatComplexMatrix(realM1, imagM1, 4); + + /* + [ 1+1.%i 3+3.%i] * [ 1+1.%i 3+3.%i] = [ 14.%i 30.%i ] + [ 2+2.%i 3+3.%i] [ 2+2.%i 3+3.%i] [ 20.%i 44.%i ] + */ + cmulma(M1, 2, 2, M2, 2, 2, M1_mul_M2); + for (i = 0; i < 4; ++i) + { + printf("M1_mul_M2[%d] = %e + %e i\n", i, creals(M1_mul_M2[i]), cimags(M1_mul_M2[i])); + } + for (i = 0; i < 4; ++i) + { + assert(creals(M1_mul_M2[i]) == 0.0f); + } + assert(cimags(M1_mul_M2[0]) == 14.0f); + assert(cimags(M1_mul_M2[1]) == 20.0f); + assert(cimags(M1_mul_M2[2]) == 30.0f); + assert(cimags(M1_mul_M2[3]) == 44.0f); + + M3 = FloatComplexMatrix(realM3, imagM3, 6); + M4 = FloatComplexMatrix(realM3, imagM3, 6); + + /* + [ 1+1.%i 3+3.%i 5+5.%i ] * [ 1+1.%i 4+4.%i ] = [ 44.%i 98.%i ] + [ 2+2.%i 4+4.%i 6+6.%i ] [ 2+2.%i 5+5.%i ] [ 56.%i 128.%i ] + [ 3+3.%i 6+6.%i ] + */ + cmulma(M3, 2, 3, M4, 3, 2, M3_mul_M4); + for (i = 0; i < 4; ++i) + { + printf("M3_mul_M4[%d] = %e + %e i\n", i, creals(M3_mul_M4[i]), cimags(M3_mul_M4[i])); + } + for (i = 0; i < 4; ++i) + { + assert(creals(M3_mul_M4[i]) == 0.0f); + } + assert(cimags(M3_mul_M4[0]) == 44.0f); + assert(cimags(M3_mul_M4[1]) == 56.0f); + assert(cimags(M3_mul_M4[2]) == 98.0f); + assert(cimags(M3_mul_M4[3]) == 128.0f); + + /* + [ 1+1.%i 4+4.%i ] * [ 1+1.%i 3+3.%i 5+5.%i ] = [ 18.%i 38.%i 58.%i ] + [ 2+2.%i 5+5.%i ] [ 2+2.%i 4+4.%i 6+6.%i ] [ 24.%i 52.%i 80.%i ] + [ 3+3.%i 6+6.%i ] [ 30.%i 66.%i 102.%i ] + */ + cmulma(M3, 3, 2, M4, 2, 3, miscM3_mul_M4); + for (i = 0; i < 9; ++i) + { + printf("miscM3_mul_M4[%d] = %e + %e i\n", i, creals(miscM3_mul_M4[i]), cimags(miscM3_mul_M4[i])); + } + for (i = 0; i < 9; ++i) + { + assert(creals(miscM3_mul_M4[i]) == 0.0); + } + assert(cimags(miscM3_mul_M4[0]) == 18.0); + assert(cimags(miscM3_mul_M4[1]) == 24.0); + assert(cimags(miscM3_mul_M4[2]) == 30.0); + assert(cimags(miscM3_mul_M4[3]) == 38.0); + assert(cimags(miscM3_mul_M4[4]) == 52.0); + assert(cimags(miscM3_mul_M4[5]) == 66.0); + assert(cimags(miscM3_mul_M4[6]) == 58.0); + assert(cimags(miscM3_mul_M4[7]) == 80.0); + assert(cimags(miscM3_mul_M4[8]) == 102.0); + +} + +static void smulmaTest(void) { + float M1[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float M2[4] = {1.0f, 2.0f, 3.0f, 4.0f}; + float M1_by_M2[4]; + float M3[4] = {1.0f, 0.0f, 1.0f, 0.0f}; + float M4[4] = {0.0f, 1.0f, 0.0f, 1.0f}; + float M3_by_M4[4]; + float M5[4] = {1.0f, 0.0f, 0.0f, 1.0f}; + float M6[4] = {42.0f, 51.0f, 69.0f, 1664.0f}; + float M5_by_M6[4]; + float M7[6] = {1.0f, 4.0f, 2.0f, 5.0f, 3.0f, 6.0f}; + float M8[6] = {1.0f, 3.0f, 5.0f, 2.0f, 4.0f, 6.0f}; + float M7_by_M8[4]; + float miscM7_by_M8[9]; + + int i = 0; + + printf("\n>>>> Matrix Float Multiplication Tests\n"); + /* + [ 1 3 ] * [ 1 3 ] = [ 7 15 ] + [ 2 4 ] [ 2 4 ] [10 22 ] + */ + smulma(M1, 2, 2, M2, 2, 2, M1_by_M2); + for (i = 0; i < 4; ++i) { + printf("M1_by_M2[%d] = %e\n", i, M1_by_M2[i]); + } + assert(M1_by_M2[0] == 7.0f); + assert(M1_by_M2[1] == 10.0f); + assert(M1_by_M2[2] == 15.0f); + assert(M1_by_M2[3] == 22.0f); + /* + [ 1 1 ] * [ 0 0 ] = [ 1 1 ] + [ 0 0 ] [ 1 1 ] [ 0 0 ] + */ + smulma(M3, 2, 2, M4, 2, 2, M3_by_M4); + for (i = 0; i < 4; ++i) { + printf("M3_by_M4[%d] = %e\n", i, M3_by_M4[i]); + } + assert(M3_by_M4[0] == 1.0f); + assert(M3_by_M4[1] == 0.0f); + assert(M3_by_M4[2] == 1.0f); + assert(M3_by_M4[3] == 0.0f); + + /* + [ 1 0 ] * [ 42 69 ] = [ 42 69 ] + [ 0 1 ] [ 51 1664 ] [ 51 1664 ] + */ + smulma(M5, 2, 2, M6, 2, 2, M5_by_M6); + for (i = 0; i < 4; ++i) { + printf("M5_by_M6[%d] = %e\n", i, M5_by_M6[i]); + } + assert(M5_by_M6[0] == 42.0f); + assert(M5_by_M6[1] == 51.0f); + assert(M5_by_M6[2] == 69.0f); + assert(M5_by_M6[3] == 1664.0f); + + /* + [ 1 2 3 ] * [ 1 2 ] = [ 22 28 ] + [ 4 5 6 ] [ 3 4 ] [ 49 64 ] + [ 5 6 ] + */ + smulma(M7, 2, 3, M8, 3, 2, M7_by_M8); + for (i = 0; i < 4; ++i) { + printf("M7_by_M8[%d] = %e\n", i, M7_by_M8[i]); + } + assert(M7_by_M8[0] == 22.0f); + assert(M7_by_M8[1] == 49.0f); + assert(M7_by_M8[2] == 28.0f); + assert(M7_by_M8[3] == 64.0f); + + /* + [ 1 5 ] * [ 1 5 4 ] = [ 16 15 34 ] + [ 4 3 ] [ 3 2 6 ] [ 13 26 34 ] + [ 2 6 ] [ 20 22 44 ] + */ + smulma(M7, 3, 2, M8, 2, 3, miscM7_by_M8); + for (i = 0; i < 9; ++i) { + printf("miscM7_by_M8[%d] = %e\n", i, miscM7_by_M8[i]); + } + assert(miscM7_by_M8[0] == 16.0f); + assert(miscM7_by_M8[1] == 13.0f); + assert(miscM7_by_M8[2] == 20.0f); + assert(miscM7_by_M8[3] == 15.0f); + assert(miscM7_by_M8[4] == 26.0f); + assert(miscM7_by_M8[5] == 22.0f); + assert(miscM7_by_M8[6] == 34.0f); + assert(miscM7_by_M8[7] == 34.0f); + assert(miscM7_by_M8[8] == 44.0f); + + + +} + +int testFloatMultiplication(void) { + + printf("\n>>>> Matrix Multiplication Tests\n"); + smulmaTest(); + cmulmaTest(); + + return 0; +} + +int main(void) { + assert(testFloatMultiplication() == 0); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj b/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj new file mode 100644 index 00000000..57565ddc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C4FBEB3F-D766-4C74-9377-7D4434A2FC6C} + testDoubleMatrixMultiplication + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters b/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters new file mode 100644 index 00000000..91469343 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/test_DoubleMatrixMultiplication/testDoubleMatrixMultiplication.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj b/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj new file mode 100644 index 00000000..12758bf1 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {4CE33021-55F3-46CC-A548-A151D07B24CF} + testFloatMatrixMultiplication + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters b/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters new file mode 100644 index 00000000..3f7d25f1 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/test_FloatMatrixMultiplication/testFloatMatrixMultiplication.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/multiplication/zmulma.c b/2.3-1/src/c/matrixOperations/multiplication/zmulma.c new file mode 100644 index 00000000..6a38e7da --- /dev/null +++ b/2.3-1/src/c/matrixOperations/multiplication/zmulma.c @@ -0,0 +1,103 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#ifndef WITHOUT_BLAS +#include "lapack.h" +#endif +#include "matrixMultiplication.h" + +/* +** \brief Compute a multiplication for doubles matrixes. +** \param in1 : input matrix. +** \param lines1 : lines of in1 matrix. +** \param columns1 : columns of in1 matrix. +** \param in2 : input arry. +** \param lines2 : lines of in2 matrix. +** \param columns2 : columns of in2 matrix. +** \param out : Matrix that contains the multiplication in1 * in2. +*/ +void zmulma(doubleComplex *in1, int lines1, int columns1, + doubleComplex *in2, int lines2, int columns2, + doubleComplex *out) +{ +#ifndef WITHOUT_BLAS + /* + ** USES BLAS DGEMM FUNCTION. + */ + int i = 0; + double One = 1; + double MinusOne = -1; + double Zero = 0; + + double *in1Real = (double*)malloc((unsigned int) lines1 * (unsigned int) columns1 * sizeof(double)); + double *in1Imag = (double*)malloc((unsigned int) lines1 * (unsigned int) columns1 * sizeof(double)); + double *in2Real = (double*)malloc((unsigned int) lines2 * (unsigned int) columns2 * sizeof(double)); + double *in2Imag = (double*)malloc((unsigned int) lines2 * (unsigned int) columns2 * sizeof(double)); + + double *RealOut = (double*)malloc((unsigned int) lines1 * (unsigned int) columns2 * sizeof(double)); + double *ImagOut = (double*)malloc((unsigned int) lines1 * (unsigned int) columns2 * sizeof(double)); + + zreala(in1, lines1 * columns1, in1Real); + zreala(in2, lines2 * columns2, in2Real); + zimaga(in1, lines1 * columns1, in1Imag); + zimaga(in2, lines2 * columns2, in2Imag); + + /* Cr <- 1*Ar*Br + 0*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Real, &lines1, in2Real, &lines2, &Zero, RealOut, &lines1); + + + /* Cr <- -1*Ai*Bi + 1*Cr */ + dgemm_("N","N", &lines1, &columns2, &columns1, &MinusOne, + in1Imag, &lines1, in2Imag, &lines2, &One, RealOut, &lines1); + + /* Ci <- 1*Ar*Bi + 0*Ci */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Real, &lines1, in2Imag, &lines2, &Zero, ImagOut, &lines1); + + /* Ci <- 1*Ai*Br + 1*Ci */ + dgemm_("N","N", &lines1, &columns2, &columns1, &One, + in1Imag, &lines1, in2Real, &lines2, &One, ImagOut, &lines1); + + /* Now fill output matrix */ + for(i = 0 ; i < lines1 * columns2 ; ++i) + { + out[i] = DoubleComplex(RealOut[i], ImagOut[i]); + } + /* FREE allocated variguru_dim_structables */ + free(in1Real); + free(in2Real); + free(in1Imag); + free(in2Imag); + free(RealOut); + free(ImagOut); +#else + /* + ** DO NOT USE ANY BLAS FUNCTION. + */ + int i = 0; + int k = 0; + doubleComplex accu = DoubleComplex(0, 0); + + for (i = 0 ; i < lines1 * columns2 ; ++i) + { + accu = DoubleComplex(0,0); + for (k = 0; k < columns1 ; ++k) + { + accu = zadds(accu, + zmuls(in1[i % lines1 + k *lines1] , + in2[k + (i / lines1) *lines2] )); + } + out[i] = accu; + } +#endif +} diff --git a/2.3-1/src/c/matrixOperations/ones/Makefile.am b/2.3-1/src/c/matrixOperations/ones/Makefile.am new file mode 100644 index 00000000..8f1419c8 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/Makefile.am @@ -0,0 +1,42 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixOnes_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixOnes.la + +HEAD = ../includes/matrixOnes.h + +libMatrixOnes_la_SOURCES = $(HEAD) \ + sonesa.c \ + donesa.c \ + conesa.c \ + zonesa.c + +check_PROGRAMS = testMatrixOnes + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixOnes.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixOnes_SOURCES = testMatrixOnes.c +testMatrixOnes_LDADD = $(check_LDADD) +testMatrixOnes_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixOnes diff --git a/2.3-1/src/c/matrixOperations/ones/Makefile.in b/2.3-1/src/c/matrixOperations/ones/Makefile.in new file mode 100644 index 00000000..b5a9bf34 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/Makefile.in @@ -0,0 +1,710 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixOnes$(EXEEXT) +TESTS = testMatrixOnes$(EXEEXT) +subdir = src/c/matrixOperations/ones +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixOnes_la_LIBADD = +am__objects_1 = +am_libMatrixOnes_la_OBJECTS = $(am__objects_1) \ + libMatrixOnes_la-sonesa.lo libMatrixOnes_la-donesa.lo \ + libMatrixOnes_la-conesa.lo libMatrixOnes_la-zonesa.lo +libMatrixOnes_la_OBJECTS = $(am_libMatrixOnes_la_OBJECTS) +libMatrixOnes_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixOnes_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatrixOnes_OBJECTS = testMatrixOnes-testMatrixOnes.$(OBJEXT) +testMatrixOnes_OBJECTS = $(am_testMatrixOnes_OBJECTS) +testMatrixOnes_DEPENDENCIES = $(check_LDADD) +testMatrixOnes_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixOnes_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixOnes_la_SOURCES) $(testMatrixOnes_SOURCES) +DIST_SOURCES = $(libMatrixOnes_la_SOURCES) $(testMatrixOnes_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixOnes_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixOnes.la +HEAD = ../includes/matrixOnes.h +libMatrixOnes_la_SOURCES = $(HEAD) \ + sonesa.c \ + donesa.c \ + conesa.c \ + zonesa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixOnes.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixOnes_SOURCES = testMatrixOnes.c +testMatrixOnes_LDADD = $(check_LDADD) +testMatrixOnes_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/ones/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/ones/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixOnes.la: $(libMatrixOnes_la_OBJECTS) $(libMatrixOnes_la_DEPENDENCIES) + $(libMatrixOnes_la_LINK) -rpath $(pkglibdir) $(libMatrixOnes_la_OBJECTS) $(libMatrixOnes_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixOnes$(EXEEXT): $(testMatrixOnes_OBJECTS) $(testMatrixOnes_DEPENDENCIES) + @rm -f testMatrixOnes$(EXEEXT) + $(testMatrixOnes_LINK) $(testMatrixOnes_OBJECTS) $(testMatrixOnes_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-conesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-donesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-sonesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixOnes_la-zonesa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixOnes-testMatrixOnes.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixOnes_la-sonesa.lo: sonesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-sonesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-sonesa.Tpo -c -o libMatrixOnes_la-sonesa.lo `test -f 'sonesa.c' || echo '$(srcdir)/'`sonesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-sonesa.Tpo $(DEPDIR)/libMatrixOnes_la-sonesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sonesa.c' object='libMatrixOnes_la-sonesa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-sonesa.lo `test -f 'sonesa.c' || echo '$(srcdir)/'`sonesa.c + +libMatrixOnes_la-donesa.lo: donesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-donesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-donesa.Tpo -c -o libMatrixOnes_la-donesa.lo `test -f 'donesa.c' || echo '$(srcdir)/'`donesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-donesa.Tpo $(DEPDIR)/libMatrixOnes_la-donesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='donesa.c' object='libMatrixOnes_la-donesa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-donesa.lo `test -f 'donesa.c' || echo '$(srcdir)/'`donesa.c + +libMatrixOnes_la-conesa.lo: conesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-conesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-conesa.Tpo -c -o libMatrixOnes_la-conesa.lo `test -f 'conesa.c' || echo '$(srcdir)/'`conesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-conesa.Tpo $(DEPDIR)/libMatrixOnes_la-conesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='conesa.c' object='libMatrixOnes_la-conesa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-conesa.lo `test -f 'conesa.c' || echo '$(srcdir)/'`conesa.c + +libMatrixOnes_la-zonesa.lo: zonesa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -MT libMatrixOnes_la-zonesa.lo -MD -MP -MF $(DEPDIR)/libMatrixOnes_la-zonesa.Tpo -c -o libMatrixOnes_la-zonesa.lo `test -f 'zonesa.c' || echo '$(srcdir)/'`zonesa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixOnes_la-zonesa.Tpo $(DEPDIR)/libMatrixOnes_la-zonesa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zonesa.c' object='libMatrixOnes_la-zonesa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixOnes_la_CFLAGS) $(CFLAGS) -c -o libMatrixOnes_la-zonesa.lo `test -f 'zonesa.c' || echo '$(srcdir)/'`zonesa.c + +testMatrixOnes-testMatrixOnes.o: testMatrixOnes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -MT testMatrixOnes-testMatrixOnes.o -MD -MP -MF $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo -c -o testMatrixOnes-testMatrixOnes.o `test -f 'testMatrixOnes.c' || echo '$(srcdir)/'`testMatrixOnes.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo $(DEPDIR)/testMatrixOnes-testMatrixOnes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixOnes.c' object='testMatrixOnes-testMatrixOnes.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -c -o testMatrixOnes-testMatrixOnes.o `test -f 'testMatrixOnes.c' || echo '$(srcdir)/'`testMatrixOnes.c + +testMatrixOnes-testMatrixOnes.obj: testMatrixOnes.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -MT testMatrixOnes-testMatrixOnes.obj -MD -MP -MF $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo -c -o testMatrixOnes-testMatrixOnes.obj `if test -f 'testMatrixOnes.c'; then $(CYGPATH_W) 'testMatrixOnes.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixOnes.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixOnes-testMatrixOnes.Tpo $(DEPDIR)/testMatrixOnes-testMatrixOnes.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixOnes.c' object='testMatrixOnes-testMatrixOnes.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixOnes_CFLAGS) $(CFLAGS) -c -o testMatrixOnes-testMatrixOnes.obj `if test -f 'testMatrixOnes.c'; then $(CYGPATH_W) 'testMatrixOnes.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixOnes.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/ones/conesa.c b/2.3-1/src/c/matrixOperations/ones/conesa.c new file mode 100644 index 00000000..f1cf2d8b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/conesa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ones.h" + +void conesa ( floatComplex* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = FloatComplex ( 1.0f , 0); + + } + +} diff --git a/2.3-1/src/c/matrixOperations/ones/donesa.c b/2.3-1/src/c/matrixOperations/ones/donesa.c new file mode 100644 index 00000000..5380755d --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/donesa.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ones.h" + +void donesa ( double* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 1 ; + + } + +} + diff --git a/2.3-1/src/c/matrixOperations/ones/sonesa.c b/2.3-1/src/c/matrixOperations/ones/sonesa.c new file mode 100644 index 00000000..fef8aa0f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/sonesa.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ones.h" + +void sonesa ( float* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 1.0f ; + + } + +} + + + diff --git a/2.3-1/src/c/matrixOperations/ones/testMatrixOnes.c b/2.3-1/src/c/matrixOperations/ones/testMatrixOnes.c new file mode 100644 index 00000000..7668f30b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/testMatrixOnes.c @@ -0,0 +1,160 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include + +#include "ones.h" + +#define ROWS 20 +#define COLS 50 + +static void donesaTest ( void ) +{ + int i = 0 ; + + double result = 0 ; + + double in [ROWS*COLS] ; + + donesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = 1 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + if ( in[i] < 1e-14 && result < 1e-14 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 3e-16 ) ; + } +} + + +static void sonesaTest ( void ) +{ + int i = 0 ; + + float result = 0 ; + + float in[ROWS*COLS] ; + + sonesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = 1.0f ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + if ( in[i] < 1e-6 && result < 1e-6 ) + assert(1); + else + assert ( fabs ( in[i] - result) / fabs( in[i]) < 1e-6 ) ; + } +} + + +static void zonesaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[ROWS*COLS] ; + + zonesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = DoubleComplex ( 1 , 0 ) ; + + + printf ( "\t\t %d in : %e %e*i\tresult : %e %e*i\n" , i, zreals( in[i]) , zimags(in[i]), zreals ( result ),zimags(result) ) ; + + if ( zreals( in[i]) < 1e-14 && zreals( result) < 1e-14 ) + assert(1); + else + assert ( fabs ( zreals(in[i]) - zreals(result)) / fabs( zreals(in[i])) < 1e-16 ) ; + + if ( zimags ( in[i]) < 1e-14 ) + assert (1); + else + assert (0); + + } +} + + + + + +static void conesaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[ROWS*COLS] ; + + conesa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = FloatComplex ( 1.0f , 0 ) ; + + + printf ( "\t\t %d in : %e %e*i\tresult : %e %e*i\n" , i, creals( in[i]) , cimags(in[i]), creals ( result ),cimags(result) ) ; + if ( creals( in[i]) < 1e-6 && creals( result) < 1e-6 ) + assert(1); + else + assert ( fabs ( creals(in[i]) - creals(result)) / fabs( creals(in[i])) < 1e-6 ) ; + + if ( cimags ( in[i]) < 1e-6 ) + assert (1); + else + assert (0); + + } +} + + + +static int testEye(void) { + + printf("\n>>>> Matrix ONES Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + donesaTest(); + + printf("\n\n\t>>>> Matrix Float Realt Tests\n"); + sonesaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + conesaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zonesaTest(); + + return 0; +} + + + +int main(void) { + assert(testEye() == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj b/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj new file mode 100644 index 00000000..b37976e9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D21BD764-EEC6-4474-9D4B-808EF2217CC4} + testMatrixOnes + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters b/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters new file mode 100644 index 00000000..56b655d4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/test_MatrixOnes/testMatrixOnes.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/ones/zonesa.c b/2.3-1/src/c/matrixOperations/ones/zonesa.c new file mode 100644 index 00000000..a6364c02 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/ones/zonesa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ones.h" + +void zonesa ( doubleComplex* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = DoubleComplex ( 1 , 0); + + } + +} diff --git a/2.3-1/src/c/matrixOperations/powm/Makefile.am b/2.3-1/src/c/matrixOperations/powm/Makefile.am new file mode 100644 index 00000000..5f6ef268 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/Makefile.am @@ -0,0 +1,86 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixPow.la + +HEAD = ../includes/matrixPow.h + +libMatrixPow_la_SOURCES = $(HEAD) \ + spowma.c\ + dpowma.c\ + cpowma.c\ + zpowma.c + +check_PROGRAMS = testDoubleMatrixPow testFloatMatrixPow + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/expm/libMatrixExponential.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixPow.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixPow_SOURCES = testDoublePowm.c +testDoubleMatrixPow_LDADD = $(check_LDADD) +testDoubleMatrixPow_CFLAGS = $(check_INCLUDES) + +testFloatMatrixPow_SOURCES = testFloatPowm.c +testFloatMatrixPow_LDADD = $(check_LDADD) +testFloatMatrixPow_CFLAGS = $(check_INCLUDES) + +TESTS = testDoubleMatrixPow testFloatMatrixPow diff --git a/2.3-1/src/c/matrixOperations/powm/Makefile.in b/2.3-1/src/c/matrixOperations/powm/Makefile.in new file mode 100644 index 00000000..20e16602 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/Makefile.in @@ -0,0 +1,784 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleMatrixPow$(EXEEXT) \ + testFloatMatrixPow$(EXEEXT) +TESTS = testDoubleMatrixPow$(EXEEXT) testFloatMatrixPow$(EXEEXT) +subdir = src/c/matrixOperations/powm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixPow_la_LIBADD = +am__objects_1 = +am_libMatrixPow_la_OBJECTS = $(am__objects_1) \ + libMatrixPow_la-spowma.lo libMatrixPow_la-dpowma.lo \ + libMatrixPow_la-cpowma.lo libMatrixPow_la-zpowma.lo +libMatrixPow_la_OBJECTS = $(am_libMatrixPow_la_OBJECTS) +libMatrixPow_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMatrixPow_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMatrixPow_OBJECTS = \ + testDoubleMatrixPow-testDoublePowm.$(OBJEXT) +testDoubleMatrixPow_OBJECTS = $(am_testDoubleMatrixPow_OBJECTS) +testDoubleMatrixPow_DEPENDENCIES = $(check_LDADD) +testDoubleMatrixPow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testFloatMatrixPow_OBJECTS = \ + testFloatMatrixPow-testFloatPowm.$(OBJEXT) +testFloatMatrixPow_OBJECTS = $(am_testFloatMatrixPow_OBJECTS) +testFloatMatrixPow_DEPENDENCIES = $(check_LDADD) +testFloatMatrixPow_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatMatrixPow_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixPow_la_SOURCES) $(testDoubleMatrixPow_SOURCES) \ + $(testFloatMatrixPow_SOURCES) +DIST_SOURCES = $(libMatrixPow_la_SOURCES) \ + $(testDoubleMatrixPow_SOURCES) $(testFloatMatrixPow_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixPow_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/includes \ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixPow.la +HEAD = ../includes/matrixPow.h +libMatrixPow_la_SOURCES = $(HEAD) \ + spowma.c\ + dpowma.c\ + cpowma.c\ + zpowma.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/frexp/libFrexp.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la\ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/cat/libMatrixConcatenation.la \ + $(top_builddir)/src/c/matrixOperations/expm/libMatrixExponential.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la \ + $(top_builddir)/src/c/matrixOperations/infiniteNorm/libMatrixInfiniteNorm.la \ + $(top_builddir)/src/c/matrixOperations/eye/libMatrixEye.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/division/libMatrixDivision.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixPow.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes\ + -I $(top_builddir)/src/c/elementaryFunctions/includes\ + -I $(top_builddir)/src/c/operations/includes\ + -I $(top_builddir)/src/c/matrixOperations/includes + +testDoubleMatrixPow_SOURCES = testDoublePowm.c +testDoubleMatrixPow_LDADD = $(check_LDADD) +testDoubleMatrixPow_CFLAGS = $(check_INCLUDES) +testFloatMatrixPow_SOURCES = testFloatPowm.c +testFloatMatrixPow_LDADD = $(check_LDADD) +testFloatMatrixPow_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/powm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/powm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixPow.la: $(libMatrixPow_la_OBJECTS) $(libMatrixPow_la_DEPENDENCIES) + $(libMatrixPow_la_LINK) -rpath $(pkglibdir) $(libMatrixPow_la_OBJECTS) $(libMatrixPow_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMatrixPow$(EXEEXT): $(testDoubleMatrixPow_OBJECTS) $(testDoubleMatrixPow_DEPENDENCIES) + @rm -f testDoubleMatrixPow$(EXEEXT) + $(testDoubleMatrixPow_LINK) $(testDoubleMatrixPow_OBJECTS) $(testDoubleMatrixPow_LDADD) $(LIBS) +testFloatMatrixPow$(EXEEXT): $(testFloatMatrixPow_OBJECTS) $(testFloatMatrixPow_DEPENDENCIES) + @rm -f testFloatMatrixPow$(EXEEXT) + $(testFloatMatrixPow_LINK) $(testFloatMatrixPow_OBJECTS) $(testFloatMatrixPow_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-cpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-dpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-spowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixPow_la-zpowma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMatrixPow-testFloatPowm.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixPow_la-spowma.lo: spowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-spowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-spowma.Tpo -c -o libMatrixPow_la-spowma.lo `test -f 'spowma.c' || echo '$(srcdir)/'`spowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-spowma.Tpo $(DEPDIR)/libMatrixPow_la-spowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='spowma.c' object='libMatrixPow_la-spowma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-spowma.lo `test -f 'spowma.c' || echo '$(srcdir)/'`spowma.c + +libMatrixPow_la-dpowma.lo: dpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-dpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-dpowma.Tpo -c -o libMatrixPow_la-dpowma.lo `test -f 'dpowma.c' || echo '$(srcdir)/'`dpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-dpowma.Tpo $(DEPDIR)/libMatrixPow_la-dpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dpowma.c' object='libMatrixPow_la-dpowma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-dpowma.lo `test -f 'dpowma.c' || echo '$(srcdir)/'`dpowma.c + +libMatrixPow_la-cpowma.lo: cpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-cpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-cpowma.Tpo -c -o libMatrixPow_la-cpowma.lo `test -f 'cpowma.c' || echo '$(srcdir)/'`cpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-cpowma.Tpo $(DEPDIR)/libMatrixPow_la-cpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cpowma.c' object='libMatrixPow_la-cpowma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-cpowma.lo `test -f 'cpowma.c' || echo '$(srcdir)/'`cpowma.c + +libMatrixPow_la-zpowma.lo: zpowma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -MT libMatrixPow_la-zpowma.lo -MD -MP -MF $(DEPDIR)/libMatrixPow_la-zpowma.Tpo -c -o libMatrixPow_la-zpowma.lo `test -f 'zpowma.c' || echo '$(srcdir)/'`zpowma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixPow_la-zpowma.Tpo $(DEPDIR)/libMatrixPow_la-zpowma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zpowma.c' object='libMatrixPow_la-zpowma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixPow_la_CFLAGS) $(CFLAGS) -c -o libMatrixPow_la-zpowma.lo `test -f 'zpowma.c' || echo '$(srcdir)/'`zpowma.c + +testDoubleMatrixPow-testDoublePowm.o: testDoublePowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -MT testDoubleMatrixPow-testDoublePowm.o -MD -MP -MF $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo -c -o testDoubleMatrixPow-testDoublePowm.o `test -f 'testDoublePowm.c' || echo '$(srcdir)/'`testDoublePowm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePowm.c' object='testDoubleMatrixPow-testDoublePowm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixPow-testDoublePowm.o `test -f 'testDoublePowm.c' || echo '$(srcdir)/'`testDoublePowm.c + +testDoubleMatrixPow-testDoublePowm.obj: testDoublePowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -MT testDoubleMatrixPow-testDoublePowm.obj -MD -MP -MF $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo -c -o testDoubleMatrixPow-testDoublePowm.obj `if test -f 'testDoublePowm.c'; then $(CYGPATH_W) 'testDoublePowm.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePowm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Tpo $(DEPDIR)/testDoubleMatrixPow-testDoublePowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoublePowm.c' object='testDoubleMatrixPow-testDoublePowm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMatrixPow_CFLAGS) $(CFLAGS) -c -o testDoubleMatrixPow-testDoublePowm.obj `if test -f 'testDoublePowm.c'; then $(CYGPATH_W) 'testDoublePowm.c'; else $(CYGPATH_W) '$(srcdir)/testDoublePowm.c'; fi` + +testFloatMatrixPow-testFloatPowm.o: testFloatPowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -MT testFloatMatrixPow-testFloatPowm.o -MD -MP -MF $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo -c -o testFloatMatrixPow-testFloatPowm.o `test -f 'testFloatPowm.c' || echo '$(srcdir)/'`testFloatPowm.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPowm.c' object='testFloatMatrixPow-testFloatPowm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -c -o testFloatMatrixPow-testFloatPowm.o `test -f 'testFloatPowm.c' || echo '$(srcdir)/'`testFloatPowm.c + +testFloatMatrixPow-testFloatPowm.obj: testFloatPowm.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -MT testFloatMatrixPow-testFloatPowm.obj -MD -MP -MF $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo -c -o testFloatMatrixPow-testFloatPowm.obj `if test -f 'testFloatPowm.c'; then $(CYGPATH_W) 'testFloatPowm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPowm.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Tpo $(DEPDIR)/testFloatMatrixPow-testFloatPowm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatPowm.c' object='testFloatMatrixPow-testFloatPowm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMatrixPow_CFLAGS) $(CFLAGS) -c -o testFloatMatrixPow-testFloatPowm.obj `if test -f 'testFloatPowm.c'; then $(CYGPATH_W) 'testFloatPowm.c'; else $(CYGPATH_W) '$(srcdir)/testFloatPowm.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/powm/cpowma.c b/2.3-1/src/c/matrixOperations/powm/cpowma.c new file mode 100644 index 00000000..d023a7aa --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/cpowma.c @@ -0,0 +1,64 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void cpowma(floatComplex* in, int rows, floatComplex power, floatComplex* out){ + int i=0, j=0; + int hermitian=0; + floatComplex *eigenvalues,*eigenvectors,*tmp; + + /* Data initialization */ + eigenvalues = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + eigenvectors = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + tmp = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + + /* symmetric test*/ + for(i=0;i +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "zeros.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void dpowma(double* in, int rows, double power, double* out){ + int i=0, j=0; + int symmetric=0; + doubleComplex *eigenvalues,*eigenvectors,*tmp; + double* ZEROS; + + /* Data initialization */ + eigenvalues = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + ZEROS=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + + /* symmetric test*/ + for(i=0;i +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "zeros.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void spowma(float* in, int rows, float power, float* out){ + int i=0, j=0; + int symmetric=0; + floatComplex *eigenvalues,*eigenvectors,*tmp; + float* ZEROS; + + /* Data initialization */ + eigenvalues = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + eigenvectors = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + tmp = (floatComplex*)malloc((unsigned int)(rows*rows)*sizeof(floatComplex)); + ZEROS = (float*)malloc((unsigned int)(rows*rows)*sizeof(float)); + + /* symmetric test*/ + for(i=0;i +#include +#include + + +static void dpowmaTest(void){ + double in1[4]={1,5,4,2}; + double expand1=2.2; + double result1R[4]={ 27.93459280052221771484 , 23.580294119266994812278 , + 18.864235295413593007652 , 32.650651624375619519469 }; + double out1[4]; + int i; + + double in2[16]={ 2.5358983855694532394409 , 9.0725262500345706939697, 0.0026536155492067337036, 3.9639251008629798889160 , + 7.9845732506364583969116, 7.5407014600932598114014, 10.196942830458283424377 , 8.2287722378969192504883 , + 10.538597775623202323914, 0.8204884417355060577393, 6.7301832754164934158325, 7.9482832476496696472168, + 8.7162081208080053329468 , 2.3821726106107234954834 , 6.5310877952724695205688, 2.784897476434707641602 }; + double expand2 = 3.4683557949028909206390; + double result2R[16]={13801.893971410685480805 , 9622.6108799100766191259 , 10325.586569611912636901, 10694.791005280343597406 , + 24728.411825244897045195 , 18392.823733925368287601 , 18631.05868385956637212 , 19357.84707477861229563 , + 16169.682243927050876664 , 12258.542785024719705689 , 12630.164466338968850323 , 12827.915677254180991440 , + 13742.841851328515986097 , 10198.0420642120679986 , 10658.784670951883526868 , 10839.51135004585739807 }; + double out2[16]; + + + dpowma(in1, 2, expand1, out1); + dpowma(in2, 4, expand2, out2); + + for (i=0;i<4;i++) { + assert( fabs(out1[i]-result1R[i]) / fabs(out1[i]) <3e-15); + } + + for (i=0;i<16;i++) { + assert( fabs(out2[i]-result2R[i]) / fabs(out2[i]) <3e-14); + } + +} + +/* FIXME : assert 1e-14 */ +static void zpowmaTest(void){ + /* Tests 1 */ + { + double inR[9]={1,2,3,4,5,6,7,8,9}; + double inI[9]={1,2,3,4,5,6,7,8,9}; + double resultR[9]={- 4.7115011361608578610571,- 2.0782061409646632732517,0.5550888542315330909105, + - 2.3202132490900626571317,- 2.4412168031527574640904,- 2.5622203572154611528333, + 0.0710746379807356554181,- 2.80422746534086453352,- 5.6795295686624518438634}; + double resultI[9]={- 12.188702380084603049681,- 4.0827818504168584823333,4.0231386792508754268738, + - 3.0919079733956360556135,- 2.5964710348850239540752,- 2.1010340963744131848046, + 6.0048864332933264975622,- 1.1101602193531934226201,- 8.2252068719997026846613}; + doubleComplex *in,out[9]; + int i; + + in=DoubleComplexMatrix(inR,inI,9); + + zpowma(in, 3, DoubleComplex(1,1), out); + + for (i=0;i<9;i++) printf("out[%d] = %f+%f*i\n",i,zreals(out[i]),zimags(out[i])); + + for (i=0;i<9;i++){ + assert( (fabs(zreals(out[i])-resultR[i])/ fabs(zreals(out[i])) ) <3e-13); + assert( (fabs(zimags(out[i])-resultI[i])/ fabs(zimags(out[i])) ) <3e-13); + } + } + + /* Tests 2 and 3 */ + { + double in1R[4]={1,5,4,2}; + double in1I[4]={0}; + double expand1=2.2; + double result1R[4]={ 27.93459280052221771484 , 23.580294119266994812278 , + 18.864235295413593007652 , 32.650651624375619519469 }; + double result1I[4]={ 3.6611113731522362257920 , - 3.6611113731522362257920 , + - 2.9288890985217883589087 , 2.9288890985217883589087 }; + doubleComplex out1[4]; + int i; + + double in2R[16]={ 2.5358983855694532394409 , 9.0725262500345706939697, 0.0026536155492067337036, 3.9639251008629798889160 , + 7.9845732506364583969116, 7.5407014600932598114014, 10.196942830458283424377 , 8.2287722378969192504883 , + 10.538597775623202323914, 0.8204884417355060577393, 6.7301832754164934158325, 7.9482832476496696472168, + 8.7162081208080053329468 , 2.3821726106107234954834 , 6.5310877952724695205688, 2.784897476434707641602 }; + double in2I[16]={0}; + double expand2 = 3.4683557949028909206390; + double result2R[16]={13801.893971410685480805 , 9622.6108799100766191259 , 10325.586569611912636901, 10694.791005280343597406 , + 24728.411825244897045195 , 18392.823733925368287601 , 18631.05868385956637212 , 19357.84707477861229563 , + 16169.682243927050876664 , 12258.542785024719705689 , 12630.164466338968850323 , 12827.915677254180991440 , + 13742.841851328515986097 , 10198.0420642120679986 , 10658.784670951883526868 , 10839.51135004585739807 }; + double result2I[16]={ - 7.1981835972120027378196 , 1.9386514637886893552832, - 17.692616672339234185074 , 24.561537532538231687340 , + - 2.2418859631076406557781 , 0.6037961445855435371755, - 5.5103941755046683681485, 7.649730724813480264857 , + - 4.865855522250573272913 , 1.310496989059492634056 , - 11.95992230200565309417 , 16.603201547139228466676 , + 16.00935601900000193609 , - 4.3117212921047043394651 , 39.34984366402868971591 , - 54.626892107189902958453 }; + doubleComplex out2[16]; + doubleComplex *in1,*in2; + + + in1=DoubleComplexMatrix(in1R,in1I,4); + in2=DoubleComplexMatrix(in2R,in2I,16); + + zpowma(in1, 2, DoubleComplex(expand1,0), out1); + zpowma(in2, 4, DoubleComplex(expand2,0), out2); + + for (i=0;i<4;i++) { + assert( fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i])) <3e-15); + assert( fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i])) <3e-15); + } + + /* + FIXME : assert 1e-11 maybe due to spec2 + */ + for (i=0;i<16;i++) { + printf("out[%d] = %1.16f+%1.16f*i --- result = %1.16f+%1.16f*i\n",i,zreals(out2[i]),zimags(out2[i]),result2R[i],result2I[i]); + assert( fabs(zreals(out2[i])-result2R[i]) / fabs(zreals(out2[i])) <3e-11); + assert( fabs(zimags(out2[i])-result2I[i]) / fabs(zimags(out2[i])) <3e-11); + } + } + +} + + +int main(void){ + dpowmaTest(); + zpowmaTest(); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/powm/testFloatPowm.c b/2.3-1/src/c/matrixOperations/powm/testFloatPowm.c new file mode 100644 index 00000000..4b4b0166 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/testFloatPowm.c @@ -0,0 +1,136 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixPow.h" +#include +#include +#include + + +static void spowmaTest(void){ + float in1[4]={1,5,4,2}; + float expand1=2.2f; + float result1R[4]={ 27.93459280052221771484f , 23.580294119266994812278f , + 18.864235295413593007652f , 32.650651624375619519469f }; + float out1[4]; + int i; + + float in2[16]={ 2.5358983855694532394409f , 9.0725262500345706939697f, 0.0026536155492067337036f, 3.9639251008629798889160f , + 7.9845732506364583969116f, 7.5407014600932598114014f, 10.196942830458283424377f , 8.2287722378969192504883f , + 10.538597775623202323914f, 0.8204884417355060577393f, 6.7301832754164934158325f, 7.9482832476496696472168f, + 8.7162081208080053329468f , 2.3821726106107234954834f , 6.5310877952724695205688f, 2.784897476434707641602f }; + float expand2 = 3.4683557949028909206390f; + float result2R[16]={13801.893971410685480805f , 9622.6108799100766191259f , 10325.586569611912636901f, 10694.791005280343597406f , + 24728.411825244897045195f , 18392.823733925368287601f , 18631.05868385956637212f , 19357.84707477861229563f , + 16169.682243927050876664f , 12258.542785024719705689f , 12630.164466338968850323f , 12827.915677254180991440f , + 13742.841851328515986097f , 10198.0420642120679986f , 10658.784670951883526868f , 10839.51135004585739807f }; + float out2[16]; + + + spowma(in1, 2, expand1, out1); + spowma(in2, 4, expand2, out2); + + for (i=0;i<4;i++) { + assert( fabs(out1[i]-result1R[i]) / fabs(out1[i]) <1e-6); + } + + + for (i=0;i<16;i++) { + + assert( fabs(out2[i]-result2R[i]) / fabs(out2[i]) <1e-6); + } + +} + +static void cpowmaTest(void){ + + + { + float inR[9]={1,2,3,4,5,6,7,8,9}; + float inI[9]={1,2,3,4,5,6,7,8,9}; + float resultR[9]={- 4.7115011361608578610571f,- 2.0782061409646632732517f,0.5550888542315330909105f, + - 2.3202132490900626571317f,- 2.4412168031527574640904f,- 2.5622203572154611528333f, + 0.0710746379807356554181f,- 2.80422746534086453352f,- 5.6795295686624518438634f}; + float resultI[9]={- 12.188702380084603049681f,- 4.0827818504168584823333f,4.0231386792508754268738f, + - 3.0919079733956360556135f,- 2.5964710348850239540752f,- 2.1010340963744131848046f, + 6.0048864332933264975622f,- 1.1101602193531934226201f,- 8.2252068719997026846613f}; + floatComplex *in,out[9]; + int i; + + in=FloatComplexMatrix(inR,inI,9); + + cpowma(in, 3, FloatComplex(1,1), out); + + for (i=0;i<9;i++) printf("out[%d] = %f+%f*i\n",i,creals(out[i]),cimags(out[i])); + + for (i=0;i<9;i++){ + assert( (fabs(creals(out[i])-resultR[i])/ fabs(creals(out[i])) ) <3e-5); + assert( (fabs(cimags(out[i])-resultI[i])/ fabs(cimags(out[i])) ) <1e-6); + } + } + + + { + + float in1R[4]={1,5,4,2}; + float in1I[4]={0}; + float expand1=2.2f; + float result1R[4]={ 27.93459280052221771484f , 23.580294119266994812278f , + 18.864235295413593007652f , 32.650651624375619519469f }; + float result1I[4]={ 3.6611113731522362257920f , - 3.6611113731522362257920f , + - 2.9288890985217883589087f , 2.9288890985217883589087f }; + floatComplex out1[4]; + int i; + + float in2R[16]={ 2.5358983855694532394409f , 9.0725262500345706939697f, 0.0026536155492067337036f, 3.9639251008629798889160f , + 7.9845732506364583969116f, 7.5407014600932598114014f, 10.196942830458283424377f , 8.2287722378969192504883f , + 10.538597775623202323914f, 0.8204884417355060577393f, 6.7301832754164934158325f, 7.9482832476496696472168f, + 8.7162081208080053329468f , 2.3821726106107234954834f , 6.5310877952724695205688f, 2.784897476434707641602f }; + float in2I[16]={0}; + float expand2 = 3.4683557949028909206390f; + float result2R[16]={13801.893971410685480805f , 9622.6108799100766191259f , 10325.586569611912636901f, 10694.791005280343597406f , + 24728.411825244897045195f , 18392.823733925368287601f , 18631.05868385956637212f , 19357.84707477861229563f , + 16169.682243927050876664f , 12258.542785024719705689f , 12630.164466338968850323f , 12827.915677254180991440f , + 13742.841851328515986097f , 10198.0420642120679986f , 10658.784670951883526868f , 10839.51135004585739807f }; + float result2I[16]={ - 7.1981835972120027378196f , 1.9386514637886893552832f, - 17.692616672339234185074f , 24.561537532538231687340f , + - 2.2418859631076406557781f , 0.6037961445855435371755f, - 5.5103941755046683681485f, 7.649730724813480264857f , + - 4.865855522250573272913f , 1.310496989059492634056f , - 11.95992230200565309417f , 16.603201547139228466676f , + 16.00935601900000193609f , - 4.3117212921047043394651f , 39.34984366402868971591f , - 54.626892107189902958453f }; + floatComplex out2[16]; + floatComplex *in1,*in2; + + in1=FloatComplexMatrix(in1R,in1I,4); + in2=FloatComplexMatrix(in2R,in2I,16); + + + cpowma(in1, 2, FloatComplex(expand1,0), out1); + cpowma(in2, 4, FloatComplex(expand2,0), out2); + + for (i=0;i<4;i++) { + assert( fabs(creals(out1[i])-result1R[i]) / fabs(creals(out1[i])) <1e-6); + assert( fabs(cimags(out1[i])-result1I[i]) / fabs(cimags(out1[i])) <1e-6); + } + + + for (i=0;i<16;i++) { + assert( fabs(creals(out2[i])-result2R[i]) / fabs(creals(out2[i])) <1e-6); + assert( fabs(cimags(out2[i])-result2I[i]) / fabs(cimags(out2[i])) <1e-6); + } + } +} + + +int main(void){ + spowmaTest(); + cpowmaTest(); + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj b/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj new file mode 100644 index 00000000..354d9902 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D83A0994-57A0-4C17-89DF-EDE84450C202} + testDoublePowm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters b/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters new file mode 100644 index 00000000..9f939c42 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/test_DoublePowm/testDoublePowm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj b/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj new file mode 100644 index 00000000..38e46376 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8594ACB2-D3C8-4D3A-B905-794354A8A0CC} + testFloatPowm + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters b/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters new file mode 100644 index 00000000..d06b1ae6 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/test_FloatPowm/testFloatPowm.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/powm/zpowma.c b/2.3-1/src/c/matrixOperations/powm/zpowma.c new file mode 100644 index 00000000..0de56475 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/powm/zpowma.c @@ -0,0 +1,64 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "matrixPow.h" +#include "spec.h" +#include "pow.h" +#include "matrixTranspose.h" +#include "conj.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" + +void zpowma(doubleComplex* in, int rows, doubleComplex power, doubleComplex* out){ + int i=0, j=0; + int hermitian=0; + doubleComplex *eigenvalues,*eigenvectors,*tmp; + + /* Data initialization */ + eigenvalues = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + eigenvectors = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + tmp = (doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + /* hermitian test*/ + for(i=0;i +#include "spec.h" + + + +void cspeca(floatComplex* in, int rows, floatComplex* out){ + /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex + and the doubleComplex output of dspeca into floatComplex*/ + + int i; + doubleComplex* dblin; + doubleComplex* dblout; + + dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dblout=(doubleComplex*)malloc((unsigned int)rows*sizeof(doubleComplex)); + + for (i=0;i +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "max.h" + +void dspeca(double* in, int rows,double* out){ + int i=0, j=0; + int symmetric=0; + int INFO=0; + int iWorkSize = 0; + double* pdblWork; + double* outReal; + double* outImag; + double* pdblLeftvectors; + double* pdblRightvectors; + double* inCopy; + + inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + + iWorkSize = 3*rows; + pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double)); + + for(i=0;i +#include "spec.h" + + + +void sspeca(float* in, int rows, float* out){ + /* As we use Lapack to find the eigenvalues, we must cast the float input into double + and the doubleComplex output of dspeca into floatComplex*/ + + int i; + double* dblin; + double* dblout; + + dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dblout=(double*)malloc((unsigned int)rows*sizeof(double)); + + for (i=0;i +#include "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void dspecaTest(void){ + double in[4]={1,1,1,3}; + double resultR[2]={0.5857864376269050765700,3.4142135623730949234300}; + + + double *out; + + int i; + + out=(double*)malloc((unsigned int)2*sizeof(double)); + + dspeca(in,2,out); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <3e-16); + else assert(1); + } + +} + + + + +static void zspecaTest(void){ + double inR[4]={1,1,1,3}; + double inI[4]={0,0,0,0}; + double resultR[2]={0.5857864376269050765700,3.4142135623730949234300}; + double resultI[2]={0,0}; + + double in2R[4]={1,1,-2,3}; + double in2I[4]={0,0,0,0}; + double result2R[2]={1.9999999999999997779554,1.9999999999999997779554}; + double result2I[2]={0.9999999999999997779554,-0.9999999999999997779554}; + + double in3R[16]={0.0603054538369178771973,0.631347181741148233414 ,0.0241030259057879447937,0.1527438252232968807221, + 0.9481177683919668197632,0.2744265575893223285675,0.4794727200642228126526,0.485576837789267301559, + 0.676400367170572280884,0.8321249918080866336823,0.0125875836238265037537,0.5453779897652566432953, + 0.8426716942340135574341,0.9029165101237595081329,0.4409482078626751899719,0.8332359003834426403046 }; + double in3I[16]={0.7233976423740386962891,0.4377150186337530612946,0.3080607382580637931824,0.8749813153408467769623, + 0.5355882328003644943237 ,0.3085998897440731525421,0.3354632416740059852600,0.2342486302368342876434, + 0.2589411698281764984131,0.8521509231068193912506,0.4821739485487341880798,0.6095217890106141567230, + 0.9872822705656290054321,0.9811426815576851367950,0.3303113700821995735169,0.3589145573787391185761}; + double result3R[4]={1.9486046375762748894545,0.2315060459861970343365,- 0.7694743345806510648188,- 0.2300808535483104266817}; + double result3I[4]={2.1242015857341254303492,- 0.4115101262891645017561,- 0.1980716835789462781925,0.3584662621795701720195}; + + doubleComplex *in,*in2,*in3,out[2],out2[4]; + + int i; + + in=DoubleComplexMatrix(inR,inI,4); + in2=DoubleComplexMatrix(in2R,in2I,4); + in3=DoubleComplexMatrix(in3R,in3I,16); + + zspeca(in,2,out); + for(i=0;i<2;i++){ + if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-resultR[i]) / fabs(zreals(out[i])) <3e-16); + else assert(1); + if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-resultI[i]) / fabs(zimags(out[i])) <1e-16); + else assert(1); + } + + + zspeca(in2,2,out); + for(i=0;i<2;i++){ + if (zreals(out[i])>1e-16) assert( fabs(zreals(out[i])-result2R[i]) / fabs(zreals(out[i])) <3e-16); + else assert(1); + if (zimags(out[i])>1e-16) assert( fabs(zimags(out[i])-result2I[i]) / fabs(zimags(out[i])) <3e-15); + else assert(1); + } + + + zspeca(in3,4,out2); + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-result3R[i]) / fabs(zreals(out2[i])) <3e-15); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-result3I[i]) / fabs(zimags(out2[i])) <3e-15); + else assert(1); + } + + +} + + +static int testSpec(void){ + printf(">>> Double Spec Tests <<<\n"); + printf(">>> Double <<<\n"); + dspecaTest(); + printf(">>> DoubleComplex <<<\n"); + zspecaTest(); + return 0; +} + + +int main(void){ + assert (testSpec()==0); + + + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/spec/testFloatSpec.c b/2.3-1/src/c/matrixOperations/spec/testFloatSpec.c new file mode 100644 index 00000000..9bd46adc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/testFloatSpec.c @@ -0,0 +1,110 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void sspecaTest(void){ + float in[4]={1.0f,1.0f,1.0f,3.0f}; + float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f}; + + float in1[4]={0.0f,4.0f,1.0f,0.0f}; + float result[2]={2.0f,-2.0f}; + + float in2[4]={1.0f,1.0f,-2.0f,3.0f}; + + float *out; + + int i; + + out=(float *)malloc((unsigned int)2*sizeof(float)); + + sspeca(in,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-resultR[i]) / fabs(out[i]) <1e-16); + else assert(1); + } + + + sspeca(in1,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + for(i=0;i<2;i++){ + if (out[i]>1e-16) assert( fabs(out[i]-result[i]) / fabs(out[i]) <1e-16); + else assert(1); + } + + sspeca(in2,2,out); + for (i=0;i<2;i++) printf("%f\n",out[i]); + +} + + +static void cspecaTest(void){ + float inR[4]={1.0f,1.0f,1.0f,3.0f}; + float inI[4]={0.0f,0.0f,0.0f,0.0f}; + float resultR[2]={0.5857864376269050765700f,3.4142135623730949234300f}; + float resultI[2]={0,0}; + + float in2R[4]={1.0f,1.0f,-2.0f,3.0f}; + float in2I[4]={0.0f,0.0f,0.0f,0.0f}; + float result2R[2]={1.9999999999999997779554f,1.9999999999999997779554f}; + float result2I[2]={0.9999999999999997779554f,-0.9999999999999997779554f}; + + floatComplex *in,*in2,out[4]; + + int i; + + in=FloatComplexMatrix(inR,inI,4); + in2=FloatComplexMatrix(in2R,in2I,4); + + cspeca(in,2,out); + for(i=0;i<2;i++){ + if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-resultR[i]) / fabs(creals(out[i])) <1e-15); + else assert(1); + if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-resultI[i]) / fabs(cimags(out[i])) <1e-16); + else assert(1); + } + + + cspeca(in2,2,out); + for(i=0;i<2;i++){ + if (creals(out[i])>1e-16) assert( fabs(creals(out[i])-result2R[i]) / fabs(creals(out[i])) <1e-15); + else assert(1); + if (cimags(out[i])>1e-16) assert( fabs(cimags(out[i])-result2I[i]) / fabs(cimags(out[i])) <1e-15); + else assert(1); + } + +} + + + + +static int testSpec(void){ + printf(">>> Float Spec Tests <<<\n"); + printf(">>> Float <<<\n"); + sspecaTest(); + printf(">>> FloatComplex <<<\n"); + cspecaTest(); + return 0; +} + + +int main(void){ + assert (testSpec()==0); + + + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj b/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj new file mode 100644 index 00000000..f696bff4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {651B0E61-1047-4575-BE31-D9CB28062CBA} + testDoubleSpec + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters b/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters new file mode 100644 index 00000000..dcdaea5c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/test_DoubleSpec/testDoubleSpec.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj b/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj new file mode 100644 index 00000000..0631bb40 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B7BEF8A2-3E42-4FA3-94A7-22618594057D} + testFloatSpec + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters b/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters new file mode 100644 index 00000000..2ba2e59f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/test_FloatSpec/testFloatSpec.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec/zspeca.c b/2.3-1/src/c/matrixOperations/spec/zspeca.c new file mode 100644 index 00000000..a2b1c25a --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec/zspeca.c @@ -0,0 +1,80 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "conj.h" + +void zspeca(doubleComplex* in, int rows,doubleComplex* out){ + int i = 0, j = 0; + int hermitian = 0; + int INFO = 0; + int iWorkSize = 0; + doubleComplex* pdblWork; + doubleComplex* pdblLeftvectors; + doubleComplex* pdblRightvectors; + doubleComplex* pdblRWork; + double* outReal; + double* outImag; + doubleComplex* inCopy; + + inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + iWorkSize = 2*rows; + pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex)); + pdblRWork = (doubleComplex*)malloc((unsigned int)(3*rows) * sizeof(doubleComplex)); + + for(i=0;i +#include "spec.h" + + + +void cspec2a(floatComplex* in, int rows, floatComplex* eigenvalues,floatComplex* eigenvectors){ + /* As we use Lapack to find the eigenvalues, we must cast the floatComplex input into doubleComplex + and the doubleComplex outputs of dspeca into floatComplex*/ + + int i; + doubleComplex* dblin; + doubleComplex* dbleigenvalues,*dbleigenvectors; + + dblin=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dbleigenvalues=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + dbleigenvectors=(doubleComplex*)malloc((unsigned int)(rows*rows)*sizeof(doubleComplex)); + + for (i=0;i +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "max.h" + +void dspec2a(double* in, int rows,double* eigenvalues,double* eigenvectors){ + int i=0, j=0, ij=0, ij1=0; + int symmetric=0; + int INFO=0; + int iWorkSize = 0; + double* pdblWork; + double* outReal; + double* outImag; + double* pdblLeftvectors; + double* pdblRightvectors; + double* inCopy; + + /* FIXME : malloc here */ + inCopy = (double*)malloc((unsigned int)(rows*rows) * sizeof(double)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = NULL; + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + + iWorkSize = 4*rows; + pdblWork = (double*)malloc((unsigned int)iWorkSize * sizeof(double)); + + for(i=0;i +#include "spec.h" + + + +void sspec2a(float* in, int rows, float* eigenvalues,float* eigenvectors){ + /* As we use Lapack to find the eigenvalues, we must cast the float input into double + and the doubleComplex outputs of dspec2a into floatComplex*/ + + int i; + double* dblin; + double *dbleigenvalues,*dbleigenvectors; + + dblin=(double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dbleigenvalues = (double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + dbleigenvectors = (double*)malloc((unsigned int)(rows*rows)*sizeof(double)); + + for (i=0;i1e-16) assert( fabs(out3[i]-resultValues3R[i]) / fabs(out3[i]) <3e-16); + else assert(1); + } + for(i=0;i<9;i++){ + if (out4[i]>1e-16) assert( fabs(out4[i]-resultVectors3R[i]) / fabs(out4[i]) <3e-16); + else assert(1); + } + + + dspec2a(in,2,out1,out2); + for(i=0;i<4;i++) printf("%f\n",out1[i]); + for(i=0;i<4;i++){ + if (out1[i]>1e-16) assert( fabs(out1[i]-resultValuesR[i]) / fabs(out1[i]) <3e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectorsR[i]) / fabs(out2[i]) <3e-16); + else assert(1); + } + + + dspec2a(in2,2,out1,out2); + + for(i=0;i<4;i++){ + if (out1[i]>1e-16) assert( fabs(out1[i]-resultValues2R[i]) / fabs(out1[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (out2[i]>1e-16) assert( fabs(out2[i]-resultVectors2R[i]) / fabs(out2[i]) <3e-16); + else assert(1); + } + +} + + + + +static void zspec2aTest(void){ + double inR[4]={1,1,1,3}; + double inI[4]={0,0,0,0}; + double resultValuesR[4]={0.5857864376269050765700,0,0,3.4142135623730949234300}; + double resultValuesI[4]={0,0,0,0}; + double resultVectorsR[4]={- 0.9238795325112867384831,0.3826834323650897817792, + 0.3826834323650897817792,0.9238795325112867384831}; + double resultVectorsI[4]={0,0,0,0}; + + double in2R[4]={1,1,-2,3}; + double in2I[4]={0,0,0,0}; + double resultValues2R[4]={1.9999999999999997779554,0,0,1.9999999999999997779554}; + double resultValues2I[4]={0.9999999999999997779554,0,0,-0.9999999999999997779554}; + double resultVectors2R[4]={0.8164965809277261454824,- 0.4082482904638631282523, + 0.8164965809277261454824,- 0.4082482904638631282523}; + double resultVectors2I[4]={0,- 0.4082482904638629062077,0,0.4082482904638629062077}; + + + double in3R[16]={ 0.4685934986919164657593, 0.4262020816095173358917, 0.4217656338587403297424, 0.1034853602759540081024 , + 0.4279759414494037628174, 0.7860729382373392581940, 0.8568082069978117942810, 0.1993437460623681545258 , + 0.7131301630288362503052, 0.5208952468819916248322, 0.9311723159626126289368, 0.4143836158327758312225, + 0.5980196148157119750977, 0.5549105503596365451813, 0.8552952585741877555847, 0.3097750707529485225678}; + double in3I[16]={0.9446128141134977340698, 0.2442680452950298786163, 0.8760446915403008460999, 0.4874215493910014629364, + 0.3844018988311290740967, 0.0922345430590212345123, 0.0705418726429343223572, 0.7338807261548936367035, + 0.7792180571705102920532, 0.7827638057060539722443, 0.2161567779257893562317, 0.3420197847299277782440, + 0.430093832314014434814 , 0.6261752569116652011871, 0.9554250938817858695984, 0.45415506651625037193 }; + double resultValues3R[16]={2.0556597713281337114211 , 0. , 0. , 0. , + 0. , - 0.3025728286579054682193 , 0. , 0. , + 0. , 0. , 0.1432776981289703988054 , 0. , + 0. , 0. , 0. , 0.59924918284561956571821}; + double resultValues3I[16]={2.0772175543447914947137 , 0. , 0. , 0. , + 0. , - 0.5223086999196728807959 , 0. , 0. , + 0. , 0. , 0.3871735516160564882782 , 0. , + 0. , 0. , 0. , - 0.2349232044266161556489 }; + double resultVectors3R[16]={ 0.5762578366606958546470 , 0.4529873647084416976583 , 0.5438116534400605495137 , 0.3599855200589946457868 , + - 0.3285074902800487195442, - 0.0923654569732548225147, 0.6473744750124794666846, - 0.1812302216765642182139 , + 0.7395301236826927748780, - 0.4588526195219964631811, 0.0997916953568371567496, - 0.3603263850824164338249 , + 0.0717862182160008133192, 0.6967198304315765922112, - 0.1153149977500917411355 , - 0.3232658081022470875077 }; + double resultVectors3I[16]={ 0. , - 0.1082260232744242933745, - 0.1403164362264210929254 , 0.0775054168635924967123 , + 0.0347047096401541868560, - 0.4780157518240965019984, 0. , 0.4493438228998393735303, + 0. , - 0.0484367977162360741072 , 0.0664282497469102783949 , - 0.3098340648435350952461 , + 0.1768623397230159322024, 0. , - 0.4621680558325051979551 , 0.3830799998945915163517}; + + + double in4R[49]={0.0292230211198329925537, 0.1069206790998578071594, 9.7463708464056253433228, 7.7042609406635165214539 , 6.3966313377022743225098, 9.5358861843124032020569, 4.1484833415597677230835, + 4.6615396952256560325623, 2.2384551353752613067627, 3.4569733263924717903137, 2.3406236339360475540161, 6.6193414805456995964050,2.6911795139312744140625,9.8302489006891846656799 , + 7.3933512251824140548706, 2.9021358629688620567322 , 3.9959496073424816131592 , 9.792278115637600421906 , 0.0755135808140039443970, 7.0210226578637957572937 , 8.9075061306357383728027 , + 6.5269742021337151527405 , 4.136228552088141441345 , 8.5816909139975905418396 , 2.3960896767675876617432 , 4.8200417729094624519348, 9.848585547879338264465 , 4.4697216479107737541199, + 2.3298137634992599487305, 2.2345139319077134132385, 8.0025654565542936325073, 7.7507343282923102378845, 4.8250066302716732025146, 7.8448831336572766304016 , 1.5346793178468942642212 , + 7.7228771103546023368835 , 8.9520217850804328918457, 9.4673257926478981971741, 6.9818257447332143783569, 9.5591608202084898948669, 0.4840173013508319854736, 5.3235206427052617073059, + 2.9468670953065156936646, 6.9771366892382502555847 , 9.3762038648128509521484 , 1.0755608463659882545471 , 7.7634243946522474288940, 6.3734178384765982627869 , 0.6630615703761577606201 }; + double in4I[49]={8.1694598542526364326477, 3.5473910067230463027954, 5.860544512979686260223, 3.4610254690051078796387, 4.4247510144487023353577, 8.8226650562137365341187, 7.6436930662021040916443 , + 7.764139864593744277954, 2.8076809318736195564270, 6.9086006004363298416138, 7.1747286943718791007996, 3.7201813608407974243164 , 9.3254965776577591896057, 2.2566775511950254440308, + 7.5211019208654761314392 , 3.0747506581246852874756 , 5.9793261485174298286438, 1.9238903466612100601196, 2.3870888305827975273132 , 7.4708331003785133361816, 9.7131536761298775672913, + 4.3703553732484579086304, 6.2248750543221831321716, 3.2913279719650745391846, 3.2963873865082859992981, 2.7686371374875307083130 , 4.8729835031554102897644, 7.7320465445518493652344 , + 9.0775218093767762184143, 5.0122931879013776779175, 5.1595458528026938438416, 5.79267887398600578308 , 1.5463936375454068183899 , 7.6111377868801355361938, 6.9079177780076861381531 , + 2.8732293471693992614746, 9.64253133628517389297 , 5.6607243325561285018921, 5.7821379369124770164490, 2.6634209789335727691650 , 4.7470985027030110359192, 6.0735465306788682937622, + 0.4097307054325938224793, 5.0125684589147567749023 , 5.2959309751167893409729, 6.2594583164900541305542, 2.2193526616320013999939 , 3.467419948428869247437, 3.9511676924303174018860 }; + double resultValues4R[49]={39.018457752476393807228 ,0,0,0,0,0,0, + 0,2.2455352415739073812517,0,0,0,0,0, + 0,0,- 8.4848591657394489828903,0,0,0,0, + 0,0,0,- 9.617033196016185669919,0,0,0, + 0,0,0,0,- 3.7815852014367528077798,0,0, + 0,0,0,0,0,- 4.44858427601393291440,0, + 0,0,0,0,0,0,- 0.3001282122401837670900}; + double resultValues4I[49]={36.525725390582877594170,0,0,0,0,0,0, + 0,- 5.9058762755733944516123,0,0,0,0,0, + 0,0,- 3.5959527108686115681735,0,0,0,0, + 0,0,0,1.8928051444081777088257,0,0,0, + 0,0,0,0,- 3.1889864758923365251064,0,0, + 0,0,0,0,0,3.2418188738592150777151,0, + 0,0,0,0,0,0,1.5279802073147508156836}; + + double resultVectors4R[49]={ 0.3499995148567048852684, 0.3131141942665225941234, 0.4518966551544936205431, 0.3429358568207974133912, 0.3073919828504245721490, 0.4236868694783915145763, 0.3928739146959387973368 , + 0.2654822689469810148566 , - 0.3607918093136298631762, 0.0473515544359270068586 , 0.5097969509656486986060 , -0.3771134435310480315096 , 0.2011534205484152293408, - 0.4415200724898113993078, + 0.5454886553461798515130, - 0.2173248800239625522224, - 0.2171708216301463378883 , - 0.2460117034233289534662 , -0.3694743444265859433351 , 0.3601018742104445391483, 0.1530612374027510713681, + 0.6385835932752577104310, - 0.0013906755423099548263, - 0.3368505708673739662551 , 0.1394203608831885433 , -0.2292783363046769218308 , -0.2740379414191142504187, 0.1926279946047058377889 , + - 0.6106238336849327819067, 0.0128604884735820379493, 0.2248434453925002574071, - 0.0955950290268089419854 , 0.6322383898844411431739 , - 0.1362122761803175874373, - 0.0030545591332723984190, + 0.5431360047322275619308, 0.1304324282476526930541, - 0.3713242513274904177401, - 0.2693820083406764376299 , - 0.1431429883314006001882 , 0.0533021313694299267438, 0.0071247423818797811501 , + - 0.156705245229635081738, 0.0034676864415526253982 , - 0.3351413975178426096768 , 0.2927797449896782921996 , 0.5714932440406852443005 , 0.0738366305178744797288, - 0.4509415569247051669422 }; + double resultVectors4I[49]={ 0.0720991445669864616796 , 0.0844739028302603361942 , 0. , 0.0173431366502564965337, -0.0428710162141596462515, 0.0695226101295536302871, 0.0999385617869267273150, + 0.2510960793336660668018 , - 0.1123901435582568414384, 0.0091069807153507792430, 0. , - 0.2545493692188907641771, 0.1149714203529902251111, 0.0762796210842419941667, + 0. , 0.0611827470444509316505, 0.2295643426501567385678, - 0.2950878328821502361024, 0.198556748820033573955, 0.0646801132828138114483, - 0.2660572521172601678785, + 0. , 0.2688905463703794573860, 0.2230635356255223633593 , - 0.2013432448241845862391, - 0.0386922946770884290668, 0.0358963301038670995480, - 0.3593711366897305303780 , + - 0.1386717901043315326337, 0.0600994116374372472356, - 0.1167558596038882207102 , 0.317965599565130263571, 0. , -0.0642522754144960878131, - 0.0853665514099945371695, + 0. , 0.2715431731544318272320, - 0.1184277560110737481658 , 0.3655618467608299226868, - 0.4598766797780974302512 , 0.0188698345957667955319, - 0.1446429340244405892246, + 0.346095581161616094867 , 0.0750882555805542639682, - 0.2494867985551498246188, - 0.2328934592128872882455, 0. , -0.0047307828167728396829, - 0.0078254955461786041004}; + + + + + doubleComplex *in,*in2,*in3,*in4,out1[4],out2[4],out3[16],out4[16],out5[49],out6[49]; + + int i; + + in=DoubleComplexMatrix(inR,inI,4); + in2=DoubleComplexMatrix(in2R,in2I,4); + in3=DoubleComplexMatrix(in3R,in3I,16); + in4=DoubleComplexMatrix(in4R,in4I,49); + zspec2a(in,2,out1,out2); + + + for(i=0;i<4;i++){ + if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValuesR[i]) / fabs(zreals(out1[i])) <3e-16); + else assert(1); + if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValuesI[i]) / fabs(zimags(out1[i])) <1e-16); + else assert(1); + } + + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectorsR[i]) / fabs(zreals(out2[i])) <3e-16); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectorsI[i]) / fabs(zimags(out2[i])) <1e-16); + else assert(1); + } + + + zspec2a(in2,2,out1,out2); + for(i=0;i<4;i++){ + if (zreals(out1[i])>1e-16) assert( fabs(zreals(out1[i])-resultValues2R[i]) / fabs(zreals(out1[i])) <3e-16); + else assert(1); + if (zimags(out1[i])>1e-16) assert( fabs(zimags(out1[i])-resultValues2I[i]) / fabs(zimags(out1[i])) <3e-15); + else assert(1); + } + + for(i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( fabs(zreals(out2[i])-resultVectors2R[i]) / fabs(zreals(out2[i])) <3e-16); + else assert(1); + if (zimags(out2[i])>1e-16) assert( fabs(zimags(out2[i])-resultVectors2I[i]) / fabs(zimags(out2[i])) <3e-15); + else assert(1); + } + + + + zspec2a(in3,4,out3,out4); + for(i=0;i<16;i++){ + if (zreals(out3[i])>1e-16) assert( fabs(zreals(out3[i])-resultValues3R[i]) / fabs(zreals(out3[i])) <3e-15); + else assert(1); + if (zimags(out3[i])>1e-16) assert( fabs(zimags(out3[i])-resultValues3I[i]) / fabs(zimags(out3[i])) <3e-15); + else assert(1); + } + for(i=0;i<16;i++){ + if (zreals(out4[i])>1e-16) assert( fabs(zreals(out4[i])-resultVectors3R[i]) / fabs(zreals(out4[i])) <3e-15); + else assert(1); + if (zimags(out4[i])>1e-16) assert( fabs(zimags(out4[i])-resultVectors3I[i]) / fabs(zimags(out4[i])) <3e-14); + else assert(1); + } + + /* FIXME : assert : 3e-16 maybe du to little values like 0.001... */ + zspec2a(in4,7,out5,out6); + + for(i=0;i<49;i++){ + if (zreals(out5[i])>1e-16) assert( fabs(zreals(out5[i])-resultValues4R[i]) / fabs(zreals(out5[i])) <3e-15); + else assert(1); + if (zimags(out5[i])>1e-16) assert( fabs(zimags(out5[i])-resultValues4I[i]) / fabs(zimags(out5[i])) <3e-14); + else assert(1); + } + for(i=0;i<49;i++){ + if (zreals(out6[i])>1e-16) assert( fabs(zreals(out6[i])-resultVectors4R[i]) / fabs(zreals(out6[i])) <3e-14); + else assert(1); + if (zimags(out6[i])>1e-16) assert( fabs(zimags(out6[i])-resultVectors4I[i]) / fabs(zimags(out6[i])) <3e-13); + else assert(1); + } + + + +} + + +static int testSpec2(void){ + printf(">>> Double Spec2 Tests <<<\n"); + printf(">>> Double <<<\n"); + dspec2aTest(); + printf(">>> DoubleComplex <<<\n"); + zspec2aTest(); + return 0; +} + + +int main(void){ + assert (testSpec2()==0); + + + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/spec2/testFloatSpec2.c b/2.3-1/src/c/matrixOperations/spec2/testFloatSpec2.c new file mode 100644 index 00000000..fb2bc255 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/testFloatSpec2.c @@ -0,0 +1,134 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "spec.h" +#include "stdio.h" +#include "assert.h" +#include "math.h" + +static void sspec2aTest(void){ + float in[4]={1.0f,1.0f,1.0f,3.0f}; + float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f}; + float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f, + 0.3826834323650897817792f,0.9238795325112867384831f}; + + float in2[4]={1.0f,1.0f,-2.0f,3.0f}; + float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f}; + float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f, + 0.8164965809277261454824f,- 0.4082482904638631282523f}; + float eigenvalues[4],eigenvectors[4]; + + int i; + + sspec2a(in,2,eigenvalues,eigenvectors); + + for(i=0;i<4;i++){ + if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValuesR[i]) / fabs(eigenvalues[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectorsR[i]) / fabs(eigenvectors[i]) <1e-16); + else assert(1); + } + + + sspec2a(in2,2,eigenvalues,eigenvectors); + + + + for(i=0;i<4;i++){ + if (eigenvalues[i]>1e-6) assert( fabs(eigenvalues[i]-resultValues2R[i]) / fabs(eigenvalues[i]) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (eigenvectors[i]>1e-6) assert( fabs(eigenvectors[i]-resultVectors2R[i]) / fabs(eigenvectors[i]) <1e-16); + else assert(1); + } +} + + + + +static void cspec2aTest(void){ + float inR[4]={1.0f,1.0f,1.0f,3.0f}; + float inI[4]={0.0f,0.0f,0.0f,0.0f}; + float resultValuesR[4]={0.5857864376269050765700f,0,0,3.4142135623730949234300f}; + float resultValuesI[4]={0,0,0,0}; + float resultVectorsR[4]={- 0.9238795325112867384831f,0.3826834323650897817792f, + 0.3826834323650897817792f,0.9238795325112867384831f}; + float resultVectorsI[4]={0,0,0,0}; + + float in2R[4]={1.0f,1.0f,-2.0f,3.0f}; + float in2I[4]={0.0f,0.0f,0.0f,0.0f}; + float resultValues2R[4]={1.9999999999999997779554f,0,0,1.9999999999999997779554f}; + float resultValues2I[4]={0.9999999999999997779554f,0,0,-0.9999999999999997779554f}; + float resultVectors2R[4]={0.8164965809277261454824f,- 0.4082482904638631282523f, + 0.8164965809277261454824f,- 0.4082482904638631282523f}; + float resultVectors2I[4]={0,- 0.4082482904638629062077f,0,0.4082482904638629062077f}; + + floatComplex *in,*in2,out1[4],out2[4]; + + int i; + + in=FloatComplexMatrix(inR,inI,4); + in2=FloatComplexMatrix(in2R,in2I,4); + + cspec2a(in,2,out1,out2); + for(i=0;i<4;i++){ + if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValuesR[i]) / fabs(creals(out1[i])) <1e-15); + else assert(1); + if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValuesI[i]) / fabs(cimags(out1[i])) <1e-16); + else assert(1); + } + for(i=0;i<4;i++){ + if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectorsR[i]) / fabs(creals(out2[i])) <1e-15); + else assert(1); + if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectorsI[i]) / fabs(cimags(out2[i])) <1e-16); + else assert(1); + } + + + cspec2a(in2,2,out1,out2); + for(i=0;i<4;i++){ + if (creals(out1[i])>1e-16) assert( fabs(creals(out1[i])-resultValues2R[i]) / fabs(creals(out1[i])) <1e-15); + else assert(1); + if (cimags(out1[i])>1e-16) assert( fabs(cimags(out1[i])-resultValues2I[i]) / fabs(cimags(out1[i])) <1e-15); + else assert(1); + } + for(i=0;i<4;i++){ + if (creals(out2[i])>1e-16) assert( fabs(creals(out2[i])-resultVectors2R[i]) / fabs(creals(out2[i])) <1e-15); + else assert(1); + if (cimags(out2[i])>1e-16) assert( fabs(cimags(out2[i])-resultVectors2I[i]) / fabs(cimags(out2[i])) <1e-16); + else assert(1); + } +} + + + + +static int testSpec2(void){ + printf(">>> Float Spec2 Tests <<<\n"); + printf(">>> Float <<<\n"); + sspec2aTest(); + printf(">>> FloatComplex <<<\n"); + cspec2aTest(); + return 0; +} + + +int main(void){ + assert (testSpec2()==0); + + + return 0; +} diff --git a/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj b/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj new file mode 100644 index 00000000..7c36943b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FD0A4495-C372-41EF-B8EF-0A0939DA6C1E} + testDoubleSpec2 + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters b/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters new file mode 100644 index 00000000..04f409dc --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/test_DoubleSpec2/testDoubleSpec2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj b/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj new file mode 100644 index 00000000..f4154eb1 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E20D0BC2-B28A-412C-9715-5B93B319A4A3} + testFloatSpec2 + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters b/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters new file mode 100644 index 00000000..0c38d2f2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/test_FloatSpec2/testFloatSpec2.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/spec2/zspec2a.c b/2.3-1/src/c/matrixOperations/spec2/zspec2a.c new file mode 100644 index 00000000..e33ed897 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/spec2/zspec2a.c @@ -0,0 +1,96 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "spec.h" +#include "lapack.h" +#include "zeros.h" +#include "stdio.h" +#include "conj.h" + +void zspec2a(doubleComplex* in, int rows,doubleComplex* eigenvalues, doubleComplex* eigenvectors){ + int i = 0, j = 0; + int hermitian = 0; + int INFO = 0; + int iWorkSize = 0; + doubleComplex* pdblWork; + doubleComplex* pdblLeftvectors; + doubleComplex* pdblRightvectors; + doubleComplex* pdblRWork; + double* pdblRWork2; + double* outReal; + double* outImag; + doubleComplex* inCopy; + + inCopy = (doubleComplex*)malloc((unsigned int)(rows*rows) * sizeof(doubleComplex)); + outReal = (double*)malloc((unsigned int)rows * sizeof(double)); + outImag = (double*)malloc((unsigned int)rows * sizeof(double)); + pdblLeftvectors=NULL; + pdblRightvectors=NULL; + + iWorkSize = 2*rows; + pdblWork = (doubleComplex*)malloc((unsigned int)iWorkSize * sizeof(doubleComplex)); + pdblRWork = NULL; + pdblRWork2 = NULL; + + for(i=0;i +#include + + +static void dsquMagnsTest(void){ +} + + +static void dsquMagnaTest(void){ +} + + +static void zsquMagnsTest(void){ +} + +static void zsquMagnaTest(void){ +} + + +static int squMagnTest(void){ + printf("\n >>> Squared Magnitude Double Tests<<<\n"); + dsquMagnsTest(); + dsquMagnaTest(); + zsquMagnsTest(); + zsquMagnaTest(); + return 0; +} + +int main (void){ + assert(squMagnTest()==0); + return 0; +} + + + + + + + + + + + + + + + + + + + diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c b/2.3-1/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c new file mode 100644 index 00000000..847abebd --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/testFloatSquaredMagnitude.c @@ -0,0 +1,52 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixSquaredMagnitude.h" +#include +#include + +static void ssquMagnsTest(void){ +} + + +static void ssquMagnaTest(void){ +} + + +static void csquMagnsTest(void){ +} + +static void csquMagnaTest(void){ +} + + +static int squMagnTest(void){ + printf("\n >>> Squared Magnitude Float Tests<<<\n"); + ssquMagnsTest(); + ssquMagnaTest(); + csquMagnsTest(); + csquMagnaTest(); + return 0; +} + +int main (void){ + assert(squMagnTest()==0); + return 0; +} + + + + + diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj new file mode 100644 index 00000000..2531d8ab --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {16744340-9DDC-4CC6-AC7D-A25DE89A3F5D} + testDoubleSquaredMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters new file mode 100644 index 00000000..17c18bd4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_DoubleSquaredMagnitude/testDoubleSquaredMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj new file mode 100644 index 00000000..c4c4064c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6DBADD0B-C4C1-48CF-95EA-6CF7272A0391} + testFloatSquaredMagnitude + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters new file mode 100644 index 00000000..8ee8b55e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/test_FloatSquaredMagnitude/testFloatSquaredMagnitude.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagna.c b/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagna.c new file mode 100644 index 00000000..4d1eecb8 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagna.c @@ -0,0 +1,25 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixSquaredMagnitude.h" +#include "matrixMagnitude.h" + +double zsquMagna(doubleComplex* in, int rows, int cols){ + double out; + out=zmagna(in,rows,cols); + return out*out; +} + + diff --git a/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagns.c b/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagns.c new file mode 100644 index 00000000..e845357e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/squaredMagnitude/zsquMagns.c @@ -0,0 +1,22 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "matrixSquaredMagnitude.h" + +double zsquMagns(doubleComplex in){ + return zreals(in)*zreals(in)+zimags(in)*zimags(in); +} + + diff --git a/2.3-1/src/c/matrixOperations/trace/Makefile.am b/2.3-1/src/c/matrixOperations/trace/Makefile.am new file mode 100644 index 00000000..ddf72b80 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/Makefile.am @@ -0,0 +1,41 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixTrace_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixTrace.la + +HEAD = ../includes/matrixTrace.h + +libMatrixTrace_la_SOURCES = $(HEAD) \ + stracea.c \ + dtracea.c \ + ctracea.c \ + ztracea.c + +check_PROGRAMS = testMatrixTrace + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixTrace.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTrace_SOURCES = testMatrixTrace.c +testMatrixTrace_LDADD = $(check_LDADD) +testMatrixTrace_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixTrace diff --git a/2.3-1/src/c/matrixOperations/trace/Makefile.in b/2.3-1/src/c/matrixOperations/trace/Makefile.in new file mode 100644 index 00000000..d930f1d7 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/Makefile.in @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixTrace$(EXEEXT) +TESTS = testMatrixTrace$(EXEEXT) +subdir = src/c/matrixOperations/trace +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixTrace_la_LIBADD = +am__objects_1 = +am_libMatrixTrace_la_OBJECTS = $(am__objects_1) \ + libMatrixTrace_la-stracea.lo libMatrixTrace_la-dtracea.lo \ + libMatrixTrace_la-ctracea.lo libMatrixTrace_la-ztracea.lo +libMatrixTrace_la_OBJECTS = $(am_libMatrixTrace_la_OBJECTS) +libMatrixTrace_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixTrace_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testMatrixTrace_OBJECTS = \ + testMatrixTrace-testMatrixTrace.$(OBJEXT) +testMatrixTrace_OBJECTS = $(am_testMatrixTrace_OBJECTS) +testMatrixTrace_DEPENDENCIES = $(check_LDADD) +testMatrixTrace_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixTrace_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_SOURCES) +DIST_SOURCES = $(libMatrixTrace_la_SOURCES) $(testMatrixTrace_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixTrace_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixTrace.la +HEAD = ../includes/matrixTrace.h +libMatrixTrace_la_SOURCES = $(HEAD) \ + stracea.c \ + dtracea.c \ + ctracea.c \ + ztracea.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixTrace.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTrace_SOURCES = testMatrixTrace.c +testMatrixTrace_LDADD = $(check_LDADD) +testMatrixTrace_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/trace/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/trace/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixTrace.la: $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_la_DEPENDENCIES) + $(libMatrixTrace_la_LINK) -rpath $(pkglibdir) $(libMatrixTrace_la_OBJECTS) $(libMatrixTrace_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixTrace$(EXEEXT): $(testMatrixTrace_OBJECTS) $(testMatrixTrace_DEPENDENCIES) + @rm -f testMatrixTrace$(EXEEXT) + $(testMatrixTrace_LINK) $(testMatrixTrace_OBJECTS) $(testMatrixTrace_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ctracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-dtracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-stracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTrace_la-ztracea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixTrace-testMatrixTrace.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixTrace_la-stracea.lo: stracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-stracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-stracea.Tpo -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-stracea.Tpo $(DEPDIR)/libMatrixTrace_la-stracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stracea.c' object='libMatrixTrace_la-stracea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-stracea.lo `test -f 'stracea.c' || echo '$(srcdir)/'`stracea.c + +libMatrixTrace_la-dtracea.lo: dtracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-dtracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-dtracea.Tpo $(DEPDIR)/libMatrixTrace_la-dtracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtracea.c' object='libMatrixTrace_la-dtracea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-dtracea.lo `test -f 'dtracea.c' || echo '$(srcdir)/'`dtracea.c + +libMatrixTrace_la-ctracea.lo: ctracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ctracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-ctracea.Tpo $(DEPDIR)/libMatrixTrace_la-ctracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctracea.c' object='libMatrixTrace_la-ctracea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ctracea.lo `test -f 'ctracea.c' || echo '$(srcdir)/'`ctracea.c + +libMatrixTrace_la-ztracea.lo: ztracea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -MT libMatrixTrace_la-ztracea.lo -MD -MP -MF $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTrace_la-ztracea.Tpo $(DEPDIR)/libMatrixTrace_la-ztracea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztracea.c' object='libMatrixTrace_la-ztracea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTrace_la_CFLAGS) $(CFLAGS) -c -o libMatrixTrace_la-ztracea.lo `test -f 'ztracea.c' || echo '$(srcdir)/'`ztracea.c + +testMatrixTrace-testMatrixTrace.o: testMatrixTrace.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.o -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.o `test -f 'testMatrixTrace.c' || echo '$(srcdir)/'`testMatrixTrace.c + +testMatrixTrace-testMatrixTrace.obj: testMatrixTrace.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -MT testMatrixTrace-testMatrixTrace.obj -MD -MP -MF $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTrace-testMatrixTrace.Tpo $(DEPDIR)/testMatrixTrace-testMatrixTrace.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTrace.c' object='testMatrixTrace-testMatrixTrace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTrace_CFLAGS) $(CFLAGS) -c -o testMatrixTrace-testMatrixTrace.obj `if test -f 'testMatrixTrace.c'; then $(CYGPATH_W) 'testMatrixTrace.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTrace.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/trace/ctracea.c b/2.3-1/src/c/matrixOperations/trace/ctracea.c new file mode 100644 index 00000000..75b0921e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/ctracea.c @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTrace.h" + +floatComplex ctracea ( floatComplex* in ,int lines ){ + + + int i = 0 ; + float rout = 0.0f ; + float iout = 0.0f ; + + for ( i = 0 ; i < lines ; ++i) + { + rout += creals (in[i*lines + i] ) ; + iout += cimags (in[i*lines + i] ) ; + } + + return FloatComplex ( rout , iout ) ; + +} + + diff --git a/2.3-1/src/c/matrixOperations/trace/dtracea.c b/2.3-1/src/c/matrixOperations/trace/dtracea.c new file mode 100644 index 00000000..4938776b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/dtracea.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTrace.h" + +double dtracea ( double* in ,int lines){ + + + int i = 0 ; + double out = 0 ; + + for ( i = 0 ; i < lines ; ++i) + out += in[i*lines + i] ; + + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/trace/stracea.c b/2.3-1/src/c/matrixOperations/trace/stracea.c new file mode 100644 index 00000000..06c4a8be --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/stracea.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTrace.h" + +float stracea ( float* in ,int lines ){ + + + int i = 0 ; + float out = 0 ; + + for ( i = 0 ; i < lines ; ++i) + out += in[i*lines + i] ; + + return out; +} + + diff --git a/2.3-1/src/c/matrixOperations/trace/testMatrixTrace.c b/2.3-1/src/c/matrixOperations/trace/testMatrixTrace.c new file mode 100644 index 00000000..0cbea97b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/testMatrixTrace.c @@ -0,0 +1,237 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "matrixTrace.h" + +#define LINES 10 +static void straceaTest ( void ) { + + float in[] = + {0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f, + 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f, + 0.31538392649963498f,0.50222720531746745f, +0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f, + 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f, + 0.34899875614792109f,0.05404338985681534f, +0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f, + 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f, + 0.74138183100149035f,0.01639390224590898f, +0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f, + 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f, + 0.97027219459414482f,0.60508118104189634f, +0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f, + 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f, + 0.12765105674043298f,0.29538751533254981f, +0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f, + 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f, + 0.38288621511310339f,0.64512947760522366f, +0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f, + 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f, + 0.48824774986132979f,0.94497666554525495f, +0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f, + 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f, + 0.51919496990740299f,0.5638650292530656f, +0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f, + 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f, + 0.09068560274317861f,0.97863480402156711f, +0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f, + 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f, + 0.68338975030928850f,0.93453497067093849f} +; + + float Result = 4.9177467138506472f ; + + float out = 0.0f ; + + out = stracea ( in , LINES ) ; + + assert(fabsf(out - Result) / fabsf( out )< 1e-07); + +} + +static void dtraceaTest ( void ) { + + double in[] = + {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007, + 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275, + 0.31538392649963498,0.50222720531746745, +0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593, + 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864, + 0.34899875614792109,0.05404338985681534, +0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524, + 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220, + 0.74138183100149035,0.01639390224590898, +0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461, + 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896, + 0.97027219459414482,0.60508118104189634, +0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651, + 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894, + 0.12765105674043298,0.29538751533254981, +0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209, + 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757, + 0.38288621511310339,0.64512947760522366, +0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119, + 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126, + 0.48824774986132979,0.94497666554525495, +0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213, + 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042, + 0.51919496990740299,0.5638650292530656, +0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811, + 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640, + 0.09068560274317861,0.97863480402156711, +0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532, + 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778, + 0.68338975030928850,0.93453497067093849} +; + + double Result = 4.9177467138506472 ; + + double out = 0 ; + + out = dtracea ( in , LINES ) ; + + assert(fabs(out - Result) / fabs( out )< 1e-16); +} + + + +static void ctraceaTest ( void ) { + int i = 0 ; + + float tin[] = +{0.41574033396318555f,0.49111106572672725f,0.44963645050302148f,0.83262220909819007f, + 0.64995764615014195f,0.49560560984537005f,0.61533244187012315f,0.52116033947095275f, + 0.31538392649963498f,0.50222720531746745f, +0.15958226565271616f,0.34022171795368195f,0.96781380381435156f,0.74247795902192593f, + 0.23031901288777590f,0.18889334425330162f,0.89581834804266691f,0.45098419673740864f, + 0.34899875614792109f,0.05404338985681534f, +0.38831026805564761f,0.99661536002531648f,0.64890601998195052f,0.01946402387693524f, + 0.55043680546805263f,0.56412307033315301f,0.87217613449320197f,0.39612928451970220f, + 0.74138183100149035f,0.01639390224590898f, +0.94154607132077217f,0.02153958659619093f,0.25446669198572636f,0.80160319153219461f, + 0.30389970541000366f,0.85622101929038763f,0.83897679112851620f,0.72408697474747896f, + 0.97027219459414482f,0.60508118104189634f, +0.47229793528094888f,0.68768908223137259f,0.19239750178530812f,0.25545394374057651f, + 0.03710305178537965f,0.07947642868384719f,0.20409553544595838f,0.67240559635683894f, + 0.12765105674043298f,0.29538751533254981f, +0.85336526390165091f,0.00449241511523724f,0.68614923674613237f,0.26881096139550209f, + 0.17038810532540083f,0.61961987055838108f,0.31665382627397776f,0.23861460387706757f, + 0.38288621511310339f,0.64512947760522366f, +0.12077391659840941f,0.63978545414283872f,0.42314558057114482f,0.75584907690063119f, + 0.56986862560734153f,0.22410399885848165f,0.70068256510421634f,0.71248416090384126f, + 0.48824774986132979f,0.94497666554525495f, +0.89993809349834919f,0.5416147718206048f,0.67344415932893753f,0.43475896771997213f, + 0.00364112667739391f,0.85820947308093309f,0.20731051638722420f,0.32864938955754042f, + 0.51919496990740299f,0.5638650292530656f, +0.43849021615460515f,0.22476492030546069f,0.82706967229023576f,0.64259665226563811f, + 0.44915470527485013f,0.71145519940182567f,0.52225506165996194f,0.48377691349014640f, + 0.09068560274317861f,0.97863480402156711f, +0.89760566223412752f,0.73640052601695061f,0.93608058523386717f,0.69578680582344532f, + 0.05768106970936060f,0.80260276049375534f,0.94164209719747305f,0.76627670042216778f, + 0.68338975030928850f,0.93453497067093849f} +; + floatComplex in [LINES*LINES] ; + + floatComplex Result = FloatComplex ( 4.9177467138506472f, 4.9177467138506472f); + + floatComplex out ; + + for ( i = 0 ; i < LINES*LINES ; i++ ) + in[i] = FloatComplex ( tin[i] , tin[i] ) ; + + out = ctracea ( in , LINES ) ; + + assert ( fabs( creals(out) - creals (Result) )/ fabs (creals (out)) < 1e-07 ); + assert ( fabs( cimags(out) - cimags (Result) )/ fabs (cimags (out)) < 1e-07 ); + +} + + + + + +static void ztraceaTest ( void ) { + + int i = 0 ; + + double tin[] = + {0.41574033396318555,0.49111106572672725,0.44963645050302148,0.83262220909819007, + 0.64995764615014195,0.49560560984537005,0.61533244187012315,0.52116033947095275, + 0.31538392649963498,0.50222720531746745, +0.15958226565271616,0.34022171795368195,0.96781380381435156,0.74247795902192593, + 0.23031901288777590,0.18889334425330162,0.89581834804266691,0.45098419673740864, + 0.34899875614792109,0.05404338985681534, +0.38831026805564761,0.99661536002531648,0.64890601998195052,0.01946402387693524, + 0.55043680546805263,0.56412307033315301,0.87217613449320197,0.39612928451970220, + 0.74138183100149035,0.01639390224590898, +0.94154607132077217,0.02153958659619093,0.25446669198572636,0.80160319153219461, + 0.30389970541000366,0.85622101929038763,0.83897679112851620,0.72408697474747896, + 0.97027219459414482,0.60508118104189634, +0.47229793528094888,0.68768908223137259,0.19239750178530812,0.25545394374057651, + 0.03710305178537965,0.07947642868384719,0.20409553544595838,0.67240559635683894, + 0.12765105674043298,0.29538751533254981, +0.85336526390165091,0.00449241511523724,0.68614923674613237,0.26881096139550209, + 0.17038810532540083,0.61961987055838108,0.31665382627397776,0.23861460387706757, + 0.38288621511310339,0.64512947760522366, +0.12077391659840941,0.63978545414283872,0.42314558057114482,0.75584907690063119, + 0.56986862560734153,0.22410399885848165,0.70068256510421634,0.71248416090384126, + 0.48824774986132979,0.94497666554525495, +0.89993809349834919,0.5416147718206048,0.67344415932893753,0.43475896771997213, + 0.00364112667739391,0.85820947308093309,0.20731051638722420,0.32864938955754042, + 0.51919496990740299,0.5638650292530656, +0.43849021615460515,0.22476492030546069,0.82706967229023576,0.64259665226563811, + 0.44915470527485013,0.71145519940182567,0.52225506165996194,0.48377691349014640, + 0.09068560274317861,0.97863480402156711, +0.89760566223412752,0.73640052601695061,0.93608058523386717,0.69578680582344532, + 0.05768106970936060,0.80260276049375534,0.94164209719747305,0.76627670042216778, + 0.68338975030928850,0.93453497067093849}; + + doubleComplex in [LINES*LINES] ; + + doubleComplex Result = DoubleComplex ( 4.9177467138506472, 4.9177467138506472); + + doubleComplex out ; + + + + for ( i = 0 ; i < LINES*LINES ; i++ ) + in[i] = DoubleComplex ( tin[i] , tin[i] ) ; + + out = ztracea ( in , LINES ) ; + + assert ( fabs( zreals(out) - zreals (Result) )/ fabs (zreals (out)) < 1e-16 ); + assert ( fabs( zimags(out) - zimags (Result) )/ fabs (zimags (out)) < 1e-16 ); + +} + +static int testTrace(void) { + + printf("\n>>>> Matrix Trace Tests\n"); + straceaTest(); + dtraceaTest(); + ctraceaTest(); + ztraceaTest(); + + return 0; +} + + + +int main(void) { + assert(testTrace() == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj b/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj new file mode 100644 index 00000000..3f33a6c9 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {21E5E59A-7E4E-4F65-9042-9C67C713D51C} + testMatrixTrace + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters b/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters new file mode 100644 index 00000000..e2b1b648 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/test_MatrixTrace/testMatrixTrace.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/trace/ztracea.c b/2.3-1/src/c/matrixOperations/trace/ztracea.c new file mode 100644 index 00000000..12154f40 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/trace/ztracea.c @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTrace.h" + +doubleComplex ztracea ( doubleComplex* in ,int lines ){ + + + int i = 0 ; + double rout = 0 ; + double iout = 0 ; + + for ( i = 0 ; i < lines ; ++i) + { + rout += zreals (in[i*lines + i] ) ; + iout += zimags (in[i*lines + i] ) ; + } + + return DoubleComplex ( rout , iout ) ; +} + + diff --git a/2.3-1/src/c/matrixOperations/transpose/Makefile.am b/2.3-1/src/c/matrixOperations/transpose/Makefile.am new file mode 100644 index 00000000..f36910f4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/Makefile.am @@ -0,0 +1,42 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixTranspose_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixTranspose.la + +HEAD = ../includes/matrixTranspose.h + +libMatrixTranspose_la_SOURCES = $(HEAD) \ + stransposea.c \ + dtransposea.c \ + ctransposea.c \ + ztransposea.c + +check_PROGRAMS = testMatrixTranspose + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTranspose_SOURCES = testMatrixTranspose.c +testMatrixTranspose_LDADD = $(check_LDADD) +testMatrixTranspose_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixTranspose diff --git a/2.3-1/src/c/matrixOperations/transpose/Makefile.in b/2.3-1/src/c/matrixOperations/transpose/Makefile.in new file mode 100644 index 00000000..1b14f44e --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/Makefile.in @@ -0,0 +1,718 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixTranspose$(EXEEXT) +TESTS = testMatrixTranspose$(EXEEXT) +subdir = src/c/matrixOperations/transpose +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixTranspose_la_LIBADD = +am__objects_1 = +am_libMatrixTranspose_la_OBJECTS = $(am__objects_1) \ + libMatrixTranspose_la-stransposea.lo \ + libMatrixTranspose_la-dtransposea.lo \ + libMatrixTranspose_la-ctransposea.lo \ + libMatrixTranspose_la-ztransposea.lo +libMatrixTranspose_la_OBJECTS = $(am_libMatrixTranspose_la_OBJECTS) +libMatrixTranspose_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMatrixTranspose_OBJECTS = \ + testMatrixTranspose-testMatrixTranspose.$(OBJEXT) +testMatrixTranspose_OBJECTS = $(am_testMatrixTranspose_OBJECTS) +testMatrixTranspose_DEPENDENCIES = $(check_LDADD) +testMatrixTranspose_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMatrixTranspose_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_SOURCES) +DIST_SOURCES = $(libMatrixTranspose_la_SOURCES) \ + $(testMatrixTranspose_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixTranspose_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixTranspose.la +HEAD = ../includes/matrixTranspose.h +libMatrixTranspose_la_SOURCES = $(HEAD) \ + stransposea.c \ + dtransposea.c \ + ctransposea.c \ + ztransposea.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + libMatrixTranspose.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixTranspose_SOURCES = testMatrixTranspose.c +testMatrixTranspose_LDADD = $(check_LDADD) +testMatrixTranspose_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/transpose/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/transpose/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixTranspose.la: $(libMatrixTranspose_la_OBJECTS) $(libMatrixTranspose_la_DEPENDENCIES) + $(libMatrixTranspose_la_LINK) -rpath $(pkglibdir) $(libMatrixTranspose_la_OBJECTS) $(libMatrixTranspose_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixTranspose$(EXEEXT): $(testMatrixTranspose_OBJECTS) $(testMatrixTranspose_DEPENDENCIES) + @rm -f testMatrixTranspose$(EXEEXT) + $(testMatrixTranspose_LINK) $(testMatrixTranspose_OBJECTS) $(testMatrixTranspose_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-ctransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-dtransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-stransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixTranspose_la-ztransposea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixTranspose_la-stransposea.lo: stransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-stransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-stransposea.Tpo -c -o libMatrixTranspose_la-stransposea.lo `test -f 'stransposea.c' || echo '$(srcdir)/'`stransposea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTranspose_la-stransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-stransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stransposea.c' object='libMatrixTranspose_la-stransposea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-stransposea.lo `test -f 'stransposea.c' || echo '$(srcdir)/'`stransposea.c + +libMatrixTranspose_la-dtransposea.lo: dtransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-dtransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-dtransposea.Tpo -c -o libMatrixTranspose_la-dtransposea.lo `test -f 'dtransposea.c' || echo '$(srcdir)/'`dtransposea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTranspose_la-dtransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-dtransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dtransposea.c' object='libMatrixTranspose_la-dtransposea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-dtransposea.lo `test -f 'dtransposea.c' || echo '$(srcdir)/'`dtransposea.c + +libMatrixTranspose_la-ctransposea.lo: ctransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-ctransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-ctransposea.Tpo -c -o libMatrixTranspose_la-ctransposea.lo `test -f 'ctransposea.c' || echo '$(srcdir)/'`ctransposea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTranspose_la-ctransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-ctransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ctransposea.c' object='libMatrixTranspose_la-ctransposea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-ctransposea.lo `test -f 'ctransposea.c' || echo '$(srcdir)/'`ctransposea.c + +libMatrixTranspose_la-ztransposea.lo: ztransposea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -MT libMatrixTranspose_la-ztransposea.lo -MD -MP -MF $(DEPDIR)/libMatrixTranspose_la-ztransposea.Tpo -c -o libMatrixTranspose_la-ztransposea.lo `test -f 'ztransposea.c' || echo '$(srcdir)/'`ztransposea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixTranspose_la-ztransposea.Tpo $(DEPDIR)/libMatrixTranspose_la-ztransposea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ztransposea.c' object='libMatrixTranspose_la-ztransposea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixTranspose_la_CFLAGS) $(CFLAGS) -c -o libMatrixTranspose_la-ztransposea.lo `test -f 'ztransposea.c' || echo '$(srcdir)/'`ztransposea.c + +testMatrixTranspose-testMatrixTranspose.o: testMatrixTranspose.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -MT testMatrixTranspose-testMatrixTranspose.o -MD -MP -MF $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo -c -o testMatrixTranspose-testMatrixTranspose.o `test -f 'testMatrixTranspose.c' || echo '$(srcdir)/'`testMatrixTranspose.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTranspose.c' object='testMatrixTranspose-testMatrixTranspose.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -c -o testMatrixTranspose-testMatrixTranspose.o `test -f 'testMatrixTranspose.c' || echo '$(srcdir)/'`testMatrixTranspose.c + +testMatrixTranspose-testMatrixTranspose.obj: testMatrixTranspose.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -MT testMatrixTranspose-testMatrixTranspose.obj -MD -MP -MF $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo -c -o testMatrixTranspose-testMatrixTranspose.obj `if test -f 'testMatrixTranspose.c'; then $(CYGPATH_W) 'testMatrixTranspose.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTranspose.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Tpo $(DEPDIR)/testMatrixTranspose-testMatrixTranspose.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixTranspose.c' object='testMatrixTranspose-testMatrixTranspose.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixTranspose_CFLAGS) $(CFLAGS) -c -o testMatrixTranspose-testMatrixTranspose.obj `if test -f 'testMatrixTranspose.c'; then $(CYGPATH_W) 'testMatrixTranspose.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixTranspose.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/transpose/ctransposea.c b/2.3-1/src/c/matrixOperations/transpose/ctransposea.c new file mode 100644 index 00000000..571d3b78 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/ctransposea.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTranspose.h" + +void ctransposea ( floatComplex* in , int lines , int columns, floatComplex* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} diff --git a/2.3-1/src/c/matrixOperations/transpose/dtransposea.c b/2.3-1/src/c/matrixOperations/transpose/dtransposea.c new file mode 100644 index 00000000..11a5fc05 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/dtransposea.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTranspose.h" + +void dtransposea ( double* in , int lines , int columns, double* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + + +} diff --git a/2.3-1/src/c/matrixOperations/transpose/stransposea.c b/2.3-1/src/c/matrixOperations/transpose/stransposea.c new file mode 100644 index 00000000..219f2216 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/stransposea.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include "matrixTranspose.h" + +void stransposea ( float* in , int lines , int columns, float* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} diff --git a/2.3-1/src/c/matrixOperations/transpose/testMatrixTranspose.c b/2.3-1/src/c/matrixOperations/transpose/testMatrixTranspose.c new file mode 100644 index 00000000..fe2123d3 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/testMatrixTranspose.c @@ -0,0 +1,519 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTranspose.h" +#include +#include + +#define LINE 15 +#define COLUMN 10 + + + +static void stranspaTest (void ) { + + int i = 0 ; + + + float in[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + float out[(COLUMN+1 )*(LINE+1)] ; + + float Result[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + stransposea ( in , COLUMN , LINE , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-6 ) ; + } + + + +} + + +static void dtranspaTest (void ) { + + int i = 0 ; + + + double in[] ={0.34382718056440353,0.11506372271105647,0.50752213317900896,0.15747882844880223, + 0.97023218311369419,0.40251684701070189,0.22695036139339209,0.91680057207122445, + 0.62407150492072105,0.61546878470107913, +0.1970167332328856,0.53554199635982513,0.40760429529473186,0.53506936598569155, + 0.85157642932608724,0.09831319935619831,0.68369307881221175,0.21228999551385641, + 0.63760355720296502,0.83135433867573738, +0.21228986512869596,0.43117330456152558,0.84080461412668228,0.21290646074339747, + 0.33933044690638781,0.26086253346875310,0.93650726415216923,0.26978330826386809, + 0.42704886104911566,0.77340125897899270, +0.31403985014185309,0.61453847866505384,0.5017265700735152,0.55914506316184998, + 0.87725317804142833,0.36363423336297274,0.50530174048617482,0.31998893804848194, + 0.10716815060004592,0.4244190966710448, +0.78216253779828548,0.92589621385559440,0.91287807654589415,0.43049659812822938, + 0.11314024776220322,0.17466178117319942,0.25248145777732134,0.02321802498772740, + 0.23822965659201145,0.72621259605512023, +0.05409323470667005,0.09938172809779644,0.44357294728979468,0.02280548494309187, + 0.5264128320850432,0.92341394722461700,0.68188397912308574,0.72654472757130861, + 0.94629473658278584,0.70999773032963276, +0.91902069095522165,0.42805786477401853,0.59837839566171169,0.57614597817882895, + 0.52973940502852201,0.76051409030333161,0.28363681584596634,0.15340585587546229, + 0.45766852516680956,0.47457459988072515, +0.46035157097503543,0.94318309519439936,0.7741842647083104,0.71491303853690624, + 0.92917560925707221,0.56402041297405958,0.14094856614246964,0.23552638292312622, + 0.89644787041470408,0.9438692079856992, +0.29926850274205208,0.03273952705785632,0.79220082703977823,0.93216359661892056, + 0.97654302977025509,0.37970651825889945,0.67591095995157957,0.08797382796183228, + 0.44384705275297165,0.14596485672518611, +0.00291663268581033,0.92132670804858208,0.55046048713847995,0.12326993141323328, + 0.62254639761522412,0.87762261740863323,0.45126775791868567,0.71059537213295698, + 0.80895681912079453,0.07141010463237762, +0.89934705849736929,0.94490244099870324,0.40850437059998512,0.28655522270128131, + 0.98225832823663950,0.82174257980659604,0.75430292449891567,0.68887275597080588, + 0.68317985069006681,0.67337385797873139, +0.83879271661862731,0.900706990621984,0.72174380579963326,0.01247995719313622, + 0.75429888023063540,0.67870581243187189,0.13702143030241132,0.65953194908797741, + 0.03401931514963508,0.65369247179478407, +0.43437494523823261,0.80943161016330123,0.47685358580201864,0.57694048294797540, + 0.54547880962491035,0.08220098121091723,0.66082405392080545,0.18151161121204495, + 0.23805456422269344,0.19968961318954825, +0.77678761305287480,0.02519542910158634,0.63930579042062163,0.39386960770934820, + 0.72860160330310464,0.25527314469218254,0.38900542212650180,0.3904965976253152, + 0.94920115964487195,0.60141251794993877, +0.13953176606446505,0.00196450622752309,0.99638652987778187,0.68885837262496352, + 0.02525969501584768,0.74444567272439599,0.70018205419182777,0.15869047446176410, + 0.21827886346727610,0.18993748771026731}; + + + double out[(COLUMN+1 )*(LINE+1)] ; + + double Result[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353,0.1970167332328856,0.21228986512869596,0.31403985014185309, + 0.78216253779828548,0.05409323470667005,0.91902069095522165,0.46035157097503543, + 0.29926850274205208,0.00291663268581033,0.89934705849736929,0.83879271661862731, + 0.43437494523823261,0.77678761305287480,0.13953176606446505, +0.11506372271105647,0.53554199635982513,0.43117330456152558,0.61453847866505384, + 0.92589621385559440,0.09938172809779644,0.42805786477401853,0.94318309519439936, + 0.03273952705785632,0.92132670804858208,0.94490244099870324,0.900706990621984, + 0.80943161016330123,0.02519542910158634,0.00196450622752309, +0.50752213317900896,0.40760429529473186,0.84080461412668228,0.5017265700735152, + 0.91287807654589415,0.44357294728979468,0.59837839566171169,0.7741842647083104, + 0.79220082703977823,0.55046048713847995,0.40850437059998512,0.72174380579963326, + 0.47685358580201864,0.63930579042062163,0.99638652987778187, +0.15747882844880223,0.53506936598569155,0.21290646074339747,0.55914506316184998, + 0.43049659812822938,0.02280548494309187,0.57614597817882895,0.71491303853690624, + 0.93216359661892056,0.12326993141323328,0.28655522270128131,0.01247995719313622, + 0.57694048294797540,0.39386960770934820,0.68885837262496352, +0.97023218311369419,0.85157642932608724,0.33933044690638781,0.87725317804142833, + 0.11314024776220322,0.5264128320850432,0.52973940502852201,0.92917560925707221, + 0.97654302977025509,0.62254639761522412,0.98225832823663950,0.75429888023063540, + 0.54547880962491035,0.72860160330310464,0.02525969501584768, +0.40251684701070189,0.09831319935619831,0.26086253346875310,0.36363423336297274, + 0.17466178117319942,0.92341394722461700,0.76051409030333161,0.56402041297405958, + 0.37970651825889945,0.87762261740863323,0.82174257980659604,0.67870581243187189, + 0.08220098121091723,0.25527314469218254,0.74444567272439599, +0.22695036139339209,0.68369307881221175,0.93650726415216923,0.50530174048617482, + 0.25248145777732134,0.68188397912308574,0.28363681584596634,0.14094856614246964, + 0.67591095995157957,0.45126775791868567,0.75430292449891567,0.13702143030241132, + 0.66082405392080545,0.38900542212650180,0.70018205419182777, +0.91680057207122445,0.21228999551385641,0.26978330826386809,0.31998893804848194, + 0.02321802498772740,0.72654472757130861,0.15340585587546229,0.23552638292312622, + 0.08797382796183228,0.71059537213295698,0.68887275597080588,0.65953194908797741, + 0.18151161121204495,0.3904965976253152,0.15869047446176410, +0.62407150492072105,0.63760355720296502,0.42704886104911566,0.10716815060004592, + 0.23822965659201145,0.94629473658278584,0.45766852516680956,0.89644787041470408, + 0.44384705275297165,0.80895681912079453,0.68317985069006681,0.03401931514963508, + 0.23805456422269344,0.94920115964487195,0.21827886346727610, +0.61546878470107913,0.83135433867573738,0.77340125897899270,0.4244190966710448, + 0.72621259605512023,0.70999773032963276,0.47457459988072515,0.9438692079856992, + 0.14596485672518611,0.07141010463237762,0.67337385797873139,0.65369247179478407, + 0.19968961318954825,0.60141251794993877,0.18993748771026731}; + + dtransposea ( in , COLUMN , LINE , out ); + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs ( out[i] - Result[i] ) / fabs( out[i]) < 1e-16 ) ; + } + + + +} + + + +static void ctranspaTest (void ) { + + int i = 0 ; + + + float Pin[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + floatComplex out[(COLUMN+1 )*(LINE+1)] ; + floatComplex in[(COLUMN+1 )*(LINE+1)] ; + floatComplex Result[(COLUMN+1 )*(LINE+1)] ; + + float PResult[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + in[i] = FloatComplex ( Pin[i] , Pin[i] ) ; + Result[i] = FloatComplex ( PResult[i] , PResult[i] ) ; + } + + + ctransposea ( in , COLUMN , LINE , out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-07 ); + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 1e-07 ) ; + + } + + + +} + + + + + + +static void ztranspaTest (void ) { + + int i = 0 ; + + + double Pin[] ={0.34382718056440353f,0.11506372271105647f,0.50752213317900896f,0.15747882844880223f, + 0.97023218311369419f,0.40251684701070189f,0.22695036139339209f,0.91680057207122445f, + 0.62407150492072105f,0.61546878470107913f, +0.1970167332328856f,0.53554199635982513f,0.40760429529473186f,0.53506936598569155f, + 0.85157642932608724f,0.09831319935619831f,0.68369307881221175f,0.21228999551385641f, + 0.63760355720296502f,0.83135433867573738f, +0.21228986512869596f,0.43117330456152558f,0.84080461412668228f,0.21290646074339747f, + 0.33933044690638781f,0.26086253346875310f,0.93650726415216923f,0.26978330826386809f, + 0.42704886104911566f,0.77340125897899270f, +0.31403985014185309f,0.61453847866505384f,0.5017265700735152f,0.55914506316184998f, + 0.87725317804142833f,0.36363423336297274f,0.50530174048617482f,0.31998893804848194f, + 0.10716815060004592f,0.4244190966710448f, +0.78216253779828548f,0.92589621385559440f,0.91287807654589415f,0.43049659812822938f, + 0.11314024776220322f,0.17466178117319942f,0.25248145777732134f,0.02321802498772740f, + 0.23822965659201145f,0.72621259605512023f, +0.05409323470667005f,0.09938172809779644f,0.44357294728979468f,0.02280548494309187f, + 0.5264128320850432f,0.92341394722461700f,0.68188397912308574f,0.72654472757130861f, + 0.94629473658278584f,0.70999773032963276f, +0.91902069095522165f,0.42805786477401853f,0.59837839566171169f,0.57614597817882895f, + 0.52973940502852201f,0.76051409030333161f,0.28363681584596634f,0.15340585587546229f, + 0.45766852516680956f,0.47457459988072515f, +0.46035157097503543f,0.94318309519439936f,0.7741842647083104f,0.71491303853690624f, + 0.92917560925707221f,0.56402041297405958f,0.14094856614246964f,0.23552638292312622f, + 0.89644787041470408f,0.9438692079856992f, +0.29926850274205208f,0.03273952705785632f,0.79220082703977823f,0.93216359661892056f, + 0.97654302977025509f,0.37970651825889945f,0.67591095995157957f,0.08797382796183228f, + 0.44384705275297165f,0.14596485672518611f, +0.00291663268581033f,0.92132670804858208f,0.55046048713847995f,0.12326993141323328f, + 0.62254639761522412f,0.87762261740863323f,0.45126775791868567f,0.71059537213295698f, + 0.80895681912079453f,0.07141010463237762f, +0.89934705849736929f,0.94490244099870324f,0.40850437059998512f,0.28655522270128131f, + 0.98225832823663950f,0.82174257980659604f,0.75430292449891567f,0.68887275597080588f, + 0.68317985069006681f,0.67337385797873139f, +0.83879271661862731f,0.900706990621984f,0.72174380579963326f,0.01247995719313622f, + 0.75429888023063540f,0.67870581243187189f,0.13702143030241132f,0.65953194908797741f, + 0.03401931514963508f,0.65369247179478407f, +0.43437494523823261f,0.80943161016330123f,0.47685358580201864f,0.57694048294797540f, + 0.54547880962491035f,0.08220098121091723f,0.66082405392080545f,0.18151161121204495f, + 0.23805456422269344f,0.19968961318954825f, +0.77678761305287480f,0.02519542910158634f,0.63930579042062163f,0.39386960770934820f, + 0.72860160330310464f,0.25527314469218254f,0.38900542212650180f,0.3904965976253152f, + 0.94920115964487195f,0.60141251794993877f, +0.13953176606446505f,0.00196450622752309f,0.99638652987778187f,0.68885837262496352f, + 0.02525969501584768f,0.74444567272439599f,0.70018205419182777f,0.15869047446176410f, + 0.21827886346727610f,0.18993748771026731f}; + + + doubleComplex out[(COLUMN+1 )*(LINE+1)] ; + doubleComplex in[(COLUMN+1 )*(LINE+1)] ; + doubleComplex Result[(COLUMN+1 )*(LINE+1)] ; + + double PResult[(COLUMN+1)*(LINE+1)] = + {0.34382718056440353f,0.1970167332328856f,0.21228986512869596f,0.31403985014185309f, + 0.78216253779828548f,0.05409323470667005f,0.91902069095522165f,0.46035157097503543f, + 0.29926850274205208f,0.00291663268581033f,0.89934705849736929f,0.83879271661862731f, + 0.43437494523823261f,0.77678761305287480f,0.13953176606446505f, +0.11506372271105647f,0.53554199635982513f,0.43117330456152558f,0.61453847866505384f, + 0.92589621385559440f,0.09938172809779644f,0.42805786477401853f,0.94318309519439936f, + 0.03273952705785632f,0.92132670804858208f,0.94490244099870324f,0.900706990621984f, + 0.80943161016330123f,0.02519542910158634f,0.00196450622752309f, +0.50752213317900896f,0.40760429529473186f,0.84080461412668228f,0.5017265700735152f, + 0.91287807654589415f,0.44357294728979468f,0.59837839566171169f,0.7741842647083104f, + 0.79220082703977823f,0.55046048713847995f,0.40850437059998512f,0.72174380579963326f, + 0.47685358580201864f,0.63930579042062163f,0.99638652987778187f, +0.15747882844880223f,0.53506936598569155f,0.21290646074339747f,0.55914506316184998f, + 0.43049659812822938f,0.02280548494309187f,0.57614597817882895f,0.71491303853690624f, + 0.93216359661892056f,0.12326993141323328f,0.28655522270128131f,0.01247995719313622f, + 0.57694048294797540f,0.39386960770934820f,0.68885837262496352f, +0.97023218311369419f,0.85157642932608724f,0.33933044690638781f,0.87725317804142833f, + 0.11314024776220322f,0.5264128320850432f,0.52973940502852201f,0.92917560925707221f, + 0.97654302977025509f,0.62254639761522412f,0.98225832823663950f,0.75429888023063540f, + 0.54547880962491035f,0.72860160330310464f,0.02525969501584768f, +0.40251684701070189f,0.09831319935619831f,0.26086253346875310f,0.36363423336297274f, + 0.17466178117319942f,0.92341394722461700f,0.76051409030333161f,0.56402041297405958f, + 0.37970651825889945f,0.87762261740863323f,0.82174257980659604f,0.67870581243187189f, + 0.08220098121091723f,0.25527314469218254f,0.74444567272439599f, +0.22695036139339209f,0.68369307881221175f,0.93650726415216923f,0.50530174048617482f, + 0.25248145777732134f,0.68188397912308574f,0.28363681584596634f,0.14094856614246964f, + 0.67591095995157957f,0.45126775791868567f,0.75430292449891567f,0.13702143030241132f, + 0.66082405392080545f,0.38900542212650180f,0.70018205419182777f, +0.91680057207122445f,0.21228999551385641f,0.26978330826386809f,0.31998893804848194f, + 0.02321802498772740f,0.72654472757130861f,0.15340585587546229f,0.23552638292312622f, + 0.08797382796183228f,0.71059537213295698f,0.68887275597080588f,0.65953194908797741f, + 0.18151161121204495f,0.3904965976253152f,0.15869047446176410f, +0.62407150492072105f,0.63760355720296502f,0.42704886104911566f,0.10716815060004592f, + 0.23822965659201145f,0.94629473658278584f,0.45766852516680956f,0.89644787041470408f, + 0.44384705275297165f,0.80895681912079453f,0.68317985069006681f,0.03401931514963508f, + 0.23805456422269344f,0.94920115964487195f,0.21827886346727610f, +0.61546878470107913f,0.83135433867573738f,0.77340125897899270f,0.4244190966710448f, + 0.72621259605512023f,0.70999773032963276f,0.47457459988072515f,0.9438692079856992f, + 0.14596485672518611f,0.07141010463237762f,0.67337385797873139f,0.65369247179478407f, + 0.19968961318954825f,0.60141251794993877f,0.18993748771026731f}; + + + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + in[i] = DoubleComplex ( Pin[i] , Pin[i] ) ; + Result[i] = DoubleComplex ( PResult[i] , PResult[i] ) ; + } + + + + + ztransposea ( in , COLUMN , LINE, out ); + + + + for ( i = 0 ; i < LINE*COLUMN ; i++ ) + { + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 1e-17 ); + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 1e-17 ) ; + + } + + + +} + + + + +static int testTranspa (void) { + + printf("\n>>>> Float real Tests\n"); + stranspaTest(); +printf("\t>>>> Double real Tests\n"); + dtranspaTest(); +printf("\t>>>> Double complex Tests\n"); +ctranspaTest(); +printf("\t>>>> Float complex Tests\n"); +ztranspaTest(); + return 0; +} + + +int main(void) { + assert(testTranspa() == 0); + return 0; +} + + diff --git a/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj b/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj new file mode 100644 index 00000000..2e6acf79 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8D483B26-A264-4BA6-BB6A-36306BCFA8E3} + testMatrixTranspose + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters b/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters new file mode 100644 index 00000000..a8d84ab0 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/test_MatrixTranspose/testMatrixTranspose.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/transpose/ztransposea.c b/2.3-1/src/c/matrixOperations/transpose/ztransposea.c new file mode 100644 index 00000000..e42d74d2 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/transpose/ztransposea.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTranspose.h" + +void ztransposea ( doubleComplex* in , int lines , int columns, doubleComplex* out ){ + + int i = 0 ; + int j = 0 ; + + for(i = 0 ; i < lines ; i++) + { + for(j = 0 ; j < columns ; j++) + + out[j+i*columns] = in[i+j*lines]; + } + +} diff --git a/2.3-1/src/c/matrixOperations/zeros/Makefile.am b/2.3-1/src/c/matrixOperations/zeros/Makefile.am new file mode 100644 index 00000000..7d310afa --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/Makefile.am @@ -0,0 +1,42 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMatrixZeros_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMatrixZeros.la + +HEAD = ../includes/matrixZeros.h + +libMatrixZeros_la_SOURCES = $(HEAD) \ + szerosa.c \ + dzerosa.c \ + czerosa.c \ + zzerosa.c + +check_PROGRAMS = testMatrixZeros + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixZeros.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixZeros_SOURCES = testMatrixZeros.c +testMatrixZeros_LDADD = $(check_LDADD) +testMatrixZeros_CFLAGS = $(check_INCLUDES) + +TESTS = testMatrixZeros diff --git a/2.3-1/src/c/matrixOperations/zeros/Makefile.in b/2.3-1/src/c/matrixOperations/zeros/Makefile.in new file mode 100644 index 00000000..f5fbabce --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/Makefile.in @@ -0,0 +1,712 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMatrixZeros$(EXEEXT) +TESTS = testMatrixZeros$(EXEEXT) +subdir = src/c/matrixOperations/zeros +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMatrixZeros_la_LIBADD = +am__objects_1 = +am_libMatrixZeros_la_OBJECTS = $(am__objects_1) \ + libMatrixZeros_la-szerosa.lo libMatrixZeros_la-dzerosa.lo \ + libMatrixZeros_la-czerosa.lo libMatrixZeros_la-zzerosa.lo +libMatrixZeros_la_OBJECTS = $(am_libMatrixZeros_la_OBJECTS) +libMatrixZeros_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMatrixZeros_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testMatrixZeros_OBJECTS = \ + testMatrixZeros-testMatrixZeros.$(OBJEXT) +testMatrixZeros_OBJECTS = $(am_testMatrixZeros_OBJECTS) +testMatrixZeros_DEPENDENCIES = $(check_LDADD) +testMatrixZeros_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatrixZeros_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMatrixZeros_la_SOURCES) $(testMatrixZeros_SOURCES) +DIST_SOURCES = $(libMatrixZeros_la_SOURCES) $(testMatrixZeros_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMatrixZeros_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMatrixZeros.la +HEAD = ../includes/matrixZeros.h +libMatrixZeros_la_SOURCES = $(HEAD) \ + szerosa.c \ + dzerosa.c \ + czerosa.c \ + zzerosa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libMatrixZeros.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes + +testMatrixZeros_SOURCES = testMatrixZeros.c +testMatrixZeros_LDADD = $(check_LDADD) +testMatrixZeros_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/matrixOperations/zeros/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/matrixOperations/zeros/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMatrixZeros.la: $(libMatrixZeros_la_OBJECTS) $(libMatrixZeros_la_DEPENDENCIES) + $(libMatrixZeros_la_LINK) -rpath $(pkglibdir) $(libMatrixZeros_la_OBJECTS) $(libMatrixZeros_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMatrixZeros$(EXEEXT): $(testMatrixZeros_OBJECTS) $(testMatrixZeros_DEPENDENCIES) + @rm -f testMatrixZeros$(EXEEXT) + $(testMatrixZeros_LINK) $(testMatrixZeros_OBJECTS) $(testMatrixZeros_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-czerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-dzerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-szerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMatrixZeros_la-zzerosa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatrixZeros-testMatrixZeros.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMatrixZeros_la-szerosa.lo: szerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-szerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-szerosa.Tpo -c -o libMatrixZeros_la-szerosa.lo `test -f 'szerosa.c' || echo '$(srcdir)/'`szerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-szerosa.Tpo $(DEPDIR)/libMatrixZeros_la-szerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='szerosa.c' object='libMatrixZeros_la-szerosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-szerosa.lo `test -f 'szerosa.c' || echo '$(srcdir)/'`szerosa.c + +libMatrixZeros_la-dzerosa.lo: dzerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-dzerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-dzerosa.Tpo -c -o libMatrixZeros_la-dzerosa.lo `test -f 'dzerosa.c' || echo '$(srcdir)/'`dzerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-dzerosa.Tpo $(DEPDIR)/libMatrixZeros_la-dzerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dzerosa.c' object='libMatrixZeros_la-dzerosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-dzerosa.lo `test -f 'dzerosa.c' || echo '$(srcdir)/'`dzerosa.c + +libMatrixZeros_la-czerosa.lo: czerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-czerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-czerosa.Tpo -c -o libMatrixZeros_la-czerosa.lo `test -f 'czerosa.c' || echo '$(srcdir)/'`czerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-czerosa.Tpo $(DEPDIR)/libMatrixZeros_la-czerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='czerosa.c' object='libMatrixZeros_la-czerosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-czerosa.lo `test -f 'czerosa.c' || echo '$(srcdir)/'`czerosa.c + +libMatrixZeros_la-zzerosa.lo: zzerosa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -MT libMatrixZeros_la-zzerosa.lo -MD -MP -MF $(DEPDIR)/libMatrixZeros_la-zzerosa.Tpo -c -o libMatrixZeros_la-zzerosa.lo `test -f 'zzerosa.c' || echo '$(srcdir)/'`zzerosa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMatrixZeros_la-zzerosa.Tpo $(DEPDIR)/libMatrixZeros_la-zzerosa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zzerosa.c' object='libMatrixZeros_la-zzerosa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMatrixZeros_la_CFLAGS) $(CFLAGS) -c -o libMatrixZeros_la-zzerosa.lo `test -f 'zzerosa.c' || echo '$(srcdir)/'`zzerosa.c + +testMatrixZeros-testMatrixZeros.o: testMatrixZeros.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -MT testMatrixZeros-testMatrixZeros.o -MD -MP -MF $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo -c -o testMatrixZeros-testMatrixZeros.o `test -f 'testMatrixZeros.c' || echo '$(srcdir)/'`testMatrixZeros.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo $(DEPDIR)/testMatrixZeros-testMatrixZeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixZeros.c' object='testMatrixZeros-testMatrixZeros.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -c -o testMatrixZeros-testMatrixZeros.o `test -f 'testMatrixZeros.c' || echo '$(srcdir)/'`testMatrixZeros.c + +testMatrixZeros-testMatrixZeros.obj: testMatrixZeros.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -MT testMatrixZeros-testMatrixZeros.obj -MD -MP -MF $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo -c -o testMatrixZeros-testMatrixZeros.obj `if test -f 'testMatrixZeros.c'; then $(CYGPATH_W) 'testMatrixZeros.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixZeros.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatrixZeros-testMatrixZeros.Tpo $(DEPDIR)/testMatrixZeros-testMatrixZeros.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatrixZeros.c' object='testMatrixZeros-testMatrixZeros.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatrixZeros_CFLAGS) $(CFLAGS) -c -o testMatrixZeros-testMatrixZeros.obj `if test -f 'testMatrixZeros.c'; then $(CYGPATH_W) 'testMatrixZeros.c'; else $(CYGPATH_W) '$(srcdir)/testMatrixZeros.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/matrixOperations/zeros/czerosa.c b/2.3-1/src/c/matrixOperations/zeros/czerosa.c new file mode 100644 index 00000000..3a4bf0a4 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/czerosa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void czerosa ( floatComplex* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = FloatComplex ( 0 , 0); + + } + +} diff --git a/2.3-1/src/c/matrixOperations/zeros/dzerosa.c b/2.3-1/src/c/matrixOperations/zeros/dzerosa.c new file mode 100644 index 00000000..3d4ac5ff --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/dzerosa.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void dzerosa ( double* in , int rows ,int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 0 ; + + } + +} + diff --git a/2.3-1/src/c/matrixOperations/zeros/dzerosh.c b/2.3-1/src/c/matrixOperations/zeros/dzerosh.c new file mode 100644 index 00000000..87e7e93c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/dzerosh.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2010 - DIGITEO - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void dzerosh ( double* in , int rows ,int cols, int levels) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols*levels ; i++) + { + in[i] = 0 ; + + } + +} + diff --git a/2.3-1/src/c/matrixOperations/zeros/szerosa.c b/2.3-1/src/c/matrixOperations/zeros/szerosa.c new file mode 100644 index 00000000..22be734c --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/szerosa.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void szerosa ( float* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = 0.0f ; + + } + +} + + + diff --git a/2.3-1/src/c/matrixOperations/zeros/testMatrixZeros.c b/2.3-1/src/c/matrixOperations/zeros/testMatrixZeros.c new file mode 100644 index 00000000..b6ebe36f --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/testMatrixZeros.c @@ -0,0 +1,137 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include + +#include "zeros.h" + +#define ROWS 20 +#define COLS 50 + +static void dzerosaTest ( void ) +{ + int i = 0 ; + + double result = 0 ; + + double in [ROWS*COLS] ; + + dzerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = 0 ; + + printf ( "\t\t %d in : %e\tresult : %e\tassert : %e \n" , i, in[i] , result , fabs( in[i] - result) / fabs( in[i]) ) ; + + assert ( fabs ( in[i] - result) == 0 ) ; + } +} + + +static void szerosaTest ( void ) +{ + int i = 0 ; + + float result = 0 ; + + float in[ROWS*COLS] ; + + szerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = 0.0f ; + + + assert ( fabs ( in[i] - result) == 0 ) ; + } +} + + +static void zzerosaTest ( void ) +{ + int i = 0 ; + + doubleComplex result = DoubleComplex ( 0 , 0) ; + + doubleComplex in[ROWS*COLS] ; + + zzerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++ ) + { + result = DoubleComplex ( 0 , 0 ) ; + + + assert ( fabs ( zreals(in[i]) - zreals(result)) == 0 ) ; + assert ( fabs ( zimags(in[i]) - zimags(result)) == 0 ) ; + + } +} + + + + + +static void czerosaTest ( void ) +{ + int i = 0 ; + + floatComplex result = FloatComplex ( 0 , 0 ) ; + + floatComplex in[ROWS*COLS] ; + + czerosa ( in , ROWS , COLS ) ; + + for ( i = 0 ; i < ROWS*COLS ; i++) + { + result = FloatComplex ( 0.0f , 0 ) ; + + + assert ( fabs ( creals(in[i]) - creals(result)) == 0 ) ; + assert ( fabs ( cimags(in[i]) - cimags(result)) == 0 ) ; + + } +} + + + +static int testZeros(void) { + + printf("\n>>>> Matrix ZEROS Tests\n"); + printf("\t>>>> Matrix Double Real Tests\n"); + dzerosaTest(); + + printf("\n\n\t>>>> Matrix Float Real Tests\n"); + szerosaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Float Complex Tests\n"); + czerosaTest(); + + printf("\n\n\n"); + printf("\t>>>> Matrix Double Complex Tests\n"); + zzerosaTest(); + + return 0; +} + + + +int main(void) { + assert(testZeros() == 0); + return 0; +} + diff --git a/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj b/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj new file mode 100644 index 00000000..6eac1a4b --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {D55BC043-1853-4E4C-A8A8-2756682E4B23} + testMatrixZeros + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters b/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters new file mode 100644 index 00000000..c99a5960 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/test_MatrixZeros/testMatrixZeros.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/matrixOperations/zeros/zzerosa.c b/2.3-1/src/c/matrixOperations/zeros/zzerosa.c new file mode 100644 index 00000000..8d9de666 --- /dev/null +++ b/2.3-1/src/c/matrixOperations/zeros/zzerosa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "zeros.h" + +void zzerosa ( doubleComplex* in , int rows , int cols ) +{ + int i = 0 ; + + for ( i = 0 ; i < rows*cols ; i++) + { + in[i] = DoubleComplex ( 0 , 0); + + } + +} diff --git a/2.3-1/src/c/operations/Makefile.am b/2.3-1/src/c/operations/Makefile.am new file mode 100644 index 00000000..c18c67e4 --- /dev/null +++ b/2.3-1/src/c/operations/Makefile.am @@ -0,0 +1,18 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +dist_SUBDIRS= includes + +SUBDIRS= addition \ + subtraction \ + division \ + multiplication diff --git a/2.3-1/src/c/operations/Makefile.in b/2.3-1/src/c/operations/Makefile.in new file mode 100644 index 00000000..73dcf0f9 --- /dev/null +++ b/2.3-1/src/c/operations/Makefile.in @@ -0,0 +1,565 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/operations +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_SUBDIRS = includes +SUBDIRS = addition \ + subtraction \ + division \ + multiplication + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/operations/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/operations/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/operations/addition/Makefile.am b/2.3-1/src/c/operations/addition/Makefile.am new file mode 100644 index 00000000..3e138a3d --- /dev/null +++ b/2.3-1/src/c/operations/addition/Makefile.am @@ -0,0 +1,45 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libAddition_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libAddition.la + +HEAD = ../includes/addition.h + +libAddition_la_SOURCES = $(HEAD) \ + sadds.c \ + dadds.c \ + cadds.c \ + zadds.c \ + sadda.c \ + dadda.c \ + cadda.c \ + zadda.c + +check_PROGRAMS = testAddition + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libAddition.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +testAddition_SOURCES = testAddition.c +testAddition_LDADD = $(check_LDADD) +testAddition_CFLAGS = $(check_INCLUDES) + +TESTS = testAddition \ No newline at end of file diff --git a/2.3-1/src/c/operations/addition/Makefile.in b/2.3-1/src/c/operations/addition/Makefile.in new file mode 100644 index 00000000..c0b4d56f --- /dev/null +++ b/2.3-1/src/c/operations/addition/Makefile.in @@ -0,0 +1,748 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testAddition$(EXEEXT) +TESTS = testAddition$(EXEEXT) +subdir = src/c/operations/addition +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libAddition_la_LIBADD = +am__objects_1 = +am_libAddition_la_OBJECTS = $(am__objects_1) libAddition_la-sadds.lo \ + libAddition_la-dadds.lo libAddition_la-cadds.lo \ + libAddition_la-zadds.lo libAddition_la-sadda.lo \ + libAddition_la-dadda.lo libAddition_la-cadda.lo \ + libAddition_la-zadda.lo +libAddition_la_OBJECTS = $(am_libAddition_la_OBJECTS) +libAddition_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libAddition_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testAddition_OBJECTS = testAddition-testAddition.$(OBJEXT) +testAddition_OBJECTS = $(am_testAddition_OBJECTS) +testAddition_DEPENDENCIES = $(check_LDADD) +testAddition_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testAddition_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libAddition_la_SOURCES) $(testAddition_SOURCES) +DIST_SOURCES = $(libAddition_la_SOURCES) $(testAddition_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libAddition_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libAddition.la +HEAD = ../includes/addition.h +libAddition_la_SOURCES = $(HEAD) \ + sadds.c \ + dadds.c \ + cadds.c \ + zadds.c \ + sadda.c \ + dadda.c \ + cadda.c \ + zadda.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libAddition.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +testAddition_SOURCES = testAddition.c +testAddition_LDADD = $(check_LDADD) +testAddition_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/operations/addition/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/operations/addition/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libAddition.la: $(libAddition_la_OBJECTS) $(libAddition_la_DEPENDENCIES) + $(libAddition_la_LINK) -rpath $(pkglibdir) $(libAddition_la_OBJECTS) $(libAddition_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testAddition$(EXEEXT): $(testAddition_OBJECTS) $(testAddition_DEPENDENCIES) + @rm -f testAddition$(EXEEXT) + $(testAddition_LINK) $(testAddition_OBJECTS) $(testAddition_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-cadda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-cadds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-dadda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-dadds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-sadda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-sadds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-zadda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAddition_la-zadds.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAddition-testAddition.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libAddition_la-sadds.lo: sadds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-sadds.lo -MD -MP -MF $(DEPDIR)/libAddition_la-sadds.Tpo -c -o libAddition_la-sadds.lo `test -f 'sadds.c' || echo '$(srcdir)/'`sadds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-sadds.Tpo $(DEPDIR)/libAddition_la-sadds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sadds.c' object='libAddition_la-sadds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-sadds.lo `test -f 'sadds.c' || echo '$(srcdir)/'`sadds.c + +libAddition_la-dadds.lo: dadds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-dadds.lo -MD -MP -MF $(DEPDIR)/libAddition_la-dadds.Tpo -c -o libAddition_la-dadds.lo `test -f 'dadds.c' || echo '$(srcdir)/'`dadds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-dadds.Tpo $(DEPDIR)/libAddition_la-dadds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dadds.c' object='libAddition_la-dadds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-dadds.lo `test -f 'dadds.c' || echo '$(srcdir)/'`dadds.c + +libAddition_la-cadds.lo: cadds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-cadds.lo -MD -MP -MF $(DEPDIR)/libAddition_la-cadds.Tpo -c -o libAddition_la-cadds.lo `test -f 'cadds.c' || echo '$(srcdir)/'`cadds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-cadds.Tpo $(DEPDIR)/libAddition_la-cadds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cadds.c' object='libAddition_la-cadds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-cadds.lo `test -f 'cadds.c' || echo '$(srcdir)/'`cadds.c + +libAddition_la-zadds.lo: zadds.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-zadds.lo -MD -MP -MF $(DEPDIR)/libAddition_la-zadds.Tpo -c -o libAddition_la-zadds.lo `test -f 'zadds.c' || echo '$(srcdir)/'`zadds.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-zadds.Tpo $(DEPDIR)/libAddition_la-zadds.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zadds.c' object='libAddition_la-zadds.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-zadds.lo `test -f 'zadds.c' || echo '$(srcdir)/'`zadds.c + +libAddition_la-sadda.lo: sadda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-sadda.lo -MD -MP -MF $(DEPDIR)/libAddition_la-sadda.Tpo -c -o libAddition_la-sadda.lo `test -f 'sadda.c' || echo '$(srcdir)/'`sadda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-sadda.Tpo $(DEPDIR)/libAddition_la-sadda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sadda.c' object='libAddition_la-sadda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-sadda.lo `test -f 'sadda.c' || echo '$(srcdir)/'`sadda.c + +libAddition_la-dadda.lo: dadda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-dadda.lo -MD -MP -MF $(DEPDIR)/libAddition_la-dadda.Tpo -c -o libAddition_la-dadda.lo `test -f 'dadda.c' || echo '$(srcdir)/'`dadda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-dadda.Tpo $(DEPDIR)/libAddition_la-dadda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dadda.c' object='libAddition_la-dadda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-dadda.lo `test -f 'dadda.c' || echo '$(srcdir)/'`dadda.c + +libAddition_la-cadda.lo: cadda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-cadda.lo -MD -MP -MF $(DEPDIR)/libAddition_la-cadda.Tpo -c -o libAddition_la-cadda.lo `test -f 'cadda.c' || echo '$(srcdir)/'`cadda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-cadda.Tpo $(DEPDIR)/libAddition_la-cadda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cadda.c' object='libAddition_la-cadda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-cadda.lo `test -f 'cadda.c' || echo '$(srcdir)/'`cadda.c + +libAddition_la-zadda.lo: zadda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -MT libAddition_la-zadda.lo -MD -MP -MF $(DEPDIR)/libAddition_la-zadda.Tpo -c -o libAddition_la-zadda.lo `test -f 'zadda.c' || echo '$(srcdir)/'`zadda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libAddition_la-zadda.Tpo $(DEPDIR)/libAddition_la-zadda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zadda.c' object='libAddition_la-zadda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libAddition_la_CFLAGS) $(CFLAGS) -c -o libAddition_la-zadda.lo `test -f 'zadda.c' || echo '$(srcdir)/'`zadda.c + +testAddition-testAddition.o: testAddition.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAddition_CFLAGS) $(CFLAGS) -MT testAddition-testAddition.o -MD -MP -MF $(DEPDIR)/testAddition-testAddition.Tpo -c -o testAddition-testAddition.o `test -f 'testAddition.c' || echo '$(srcdir)/'`testAddition.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testAddition-testAddition.Tpo $(DEPDIR)/testAddition-testAddition.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAddition.c' object='testAddition-testAddition.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAddition_CFLAGS) $(CFLAGS) -c -o testAddition-testAddition.o `test -f 'testAddition.c' || echo '$(srcdir)/'`testAddition.c + +testAddition-testAddition.obj: testAddition.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAddition_CFLAGS) $(CFLAGS) -MT testAddition-testAddition.obj -MD -MP -MF $(DEPDIR)/testAddition-testAddition.Tpo -c -o testAddition-testAddition.obj `if test -f 'testAddition.c'; then $(CYGPATH_W) 'testAddition.c'; else $(CYGPATH_W) '$(srcdir)/testAddition.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testAddition-testAddition.Tpo $(DEPDIR)/testAddition-testAddition.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testAddition.c' object='testAddition-testAddition.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testAddition_CFLAGS) $(CFLAGS) -c -o testAddition-testAddition.obj `if test -f 'testAddition.c'; then $(CYGPATH_W) 'testAddition.c'; else $(CYGPATH_W) '$(srcdir)/testAddition.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/operations/addition/cadda.c b/2.3-1/src/c/operations/addition/cadda.c new file mode 100644 index 00000000..bf8603f4 --- /dev/null +++ b/2.3-1/src/c/operations/addition/cadda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +void cadda(floatComplex* in1, int size1, floatComplex* in2, int size2, floatComplex* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = cadds(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/addition/cadds.c b/2.3-1/src/c/operations/addition/cadds.c new file mode 100644 index 00000000..a39d9185 --- /dev/null +++ b/2.3-1/src/c/operations/addition/cadds.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +floatComplex cadds(floatComplex z1, floatComplex z2) { + return FloatComplex(creals(z1) + creals(z2), + cimags(z1) + cimags(z2)); +} diff --git a/2.3-1/src/c/operations/addition/dadda.c b/2.3-1/src/c/operations/addition/dadda.c new file mode 100644 index 00000000..253ace04 --- /dev/null +++ b/2.3-1/src/c/operations/addition/dadda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +void dadda(double* in1, int size1, double* in2, int size2, double* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = dadds(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/addition/dadds.c b/2.3-1/src/c/operations/addition/dadds.c new file mode 100644 index 00000000..e7ad6a56 --- /dev/null +++ b/2.3-1/src/c/operations/addition/dadds.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +double dadds(double in1, double in2) +{ + return (in1 + in2); +} diff --git a/2.3-1/src/c/operations/addition/sadda.c b/2.3-1/src/c/operations/addition/sadda.c new file mode 100644 index 00000000..a675a594 --- /dev/null +++ b/2.3-1/src/c/operations/addition/sadda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +void sadda(float* in1, int size1, float* in2, int size2, float* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = sadds(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/addition/sadds.c b/2.3-1/src/c/operations/addition/sadds.c new file mode 100644 index 00000000..82b83e64 --- /dev/null +++ b/2.3-1/src/c/operations/addition/sadds.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +float sadds(float in1, float in2) +{ + return (in1 + in2); +} diff --git a/2.3-1/src/c/operations/addition/testAddition.c b/2.3-1/src/c/operations/addition/testAddition.c new file mode 100644 index 00000000..b8538d57 --- /dev/null +++ b/2.3-1/src/c/operations/addition/testAddition.c @@ -0,0 +1,128 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "addition.h" + +#define SIZE 10000 + +/* #define LOCAL_DEBUG */ + +static void zaddaTest(void) { + doubleComplex M1[SIZE]; + doubleComplex M2[SIZE]; + doubleComplex M1_and_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = DoubleComplex((double) rand(), (double) rand()); + M2[i] = DoubleComplex((double) rand(), (double) rand()); + } + zadda(M1, SIZE, M2, SIZE, M1_and_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_and_M2 = %e + %e i\n", zreals(M1_and_M2[i]), zimags(M1_and_M2[i])); +#endif + assert(zreals(M1_and_M2[i]) - (zreals(M1[i]) + zreals(M2[i])) == 0); + assert(zimags(M1_and_M2[i]) - (zimags(M1[i]) + zimags(M2[i])) == 0); + } +} + +static void caddaTest(void) { + floatComplex M1[SIZE]; + floatComplex M2[SIZE]; + floatComplex M1_and_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = FloatComplex((float) rand(), (float) rand()); + M2[i] = FloatComplex((float) rand(), (float) rand()); + } + cadda(M1, SIZE, M2, SIZE, M1_and_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_and_M2 = %e + %e i\n", creals(M1_and_M2[i]), cimags(M1_and_M2[i])); +#endif + assert(fabsf(creals(M1_and_M2[i]) - (creals(M1[i]) + creals(M2[i]))) / creals(M1_and_M2[i]) < 1e-07); + assert(fabsf(cimags(M1_and_M2[i]) - (cimags(M1[i]) + cimags(M2[i]))) / cimags(M1_and_M2[i]) < 1e-07); + } +} + +static void saddaTest(void) { + float M1[SIZE]; + float M2[SIZE]; + float M1_and_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = (float) rand(); + M2[i] = (float) rand(); + } + sadda(M1, SIZE, M2, SIZE, M1_and_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_and_M2 = %e\n", M1_and_M2[i]); + printf("M1[i] + M2[i] = %e\n", (M1[i] + M2[i])); + printf("Error = %e\n",(float) fabsf(M1_and_M2[i] - (M1[i] + M2[i])) / M1_and_M2[i]); +#endif + assert(fabsf(M1_and_M2[i] - (M1[i] + M2[i])) / M1_and_M2[i] < 1e-07); + } +} + +static void daddaTest(void) { + double M1[SIZE]; + double M2[SIZE]; + double M1_and_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = (double) rand(); + M2[i] = (double) rand(); + } + dadda(M1, SIZE, M2, SIZE, M1_and_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_and_M2 = %e\n", M1_and_M2[i]); +#endif + assert(fabs(M1_and_M2[i] - (M1[i] + M2[i])) == 0); + } + +} + +static int testAddition(void) { + + printf("\n>>>> Addition Tests\n"); + saddaTest(); + daddaTest(); + caddaTest(); + zaddaTest(); + + return 0; +} + + + +int main(void) { + assert(testAddition() == 0); + return 0; +} diff --git a/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj b/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj new file mode 100644 index 00000000..09dc859d --- /dev/null +++ b/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {59F5B75C-7FCC-4B07-A5D0-C39D5757204B} + testAddition + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj.filters b/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj.filters new file mode 100644 index 00000000..ce68739c --- /dev/null +++ b/2.3-1/src/c/operations/addition/test_Addition/testAddition.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/addition/zadda.c b/2.3-1/src/c/operations/addition/zadda.c new file mode 100644 index 00000000..bf87e13e --- /dev/null +++ b/2.3-1/src/c/operations/addition/zadda.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +void zadda(doubleComplex* in1, int size1, doubleComplex* in2, int size2, doubleComplex* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = zadds(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/addition/zadds.c b/2.3-1/src/c/operations/addition/zadds.c new file mode 100644 index 00000000..d4a94dc5 --- /dev/null +++ b/2.3-1/src/c/operations/addition/zadds.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" + +doubleComplex zadds(doubleComplex z1, doubleComplex z2) { + return DoubleComplex(zreals(z1) + zreals(z2), + zimags(z1) + zimags(z2)); +} diff --git a/2.3-1/src/c/operations/auxiliaryFunctions_Import.def b/2.3-1/src/c/operations/auxiliaryFunctions_Import.def new file mode 100644 index 00000000..8e9b2502 --- /dev/null +++ b/2.3-1/src/c/operations/auxiliaryFunctions_Import.def @@ -0,0 +1,6 @@ +LIBRARY auxiliaryFunctions.dll + + +EXPORTS +cconjs +zconjs diff --git a/2.3-1/src/c/operations/division/Makefile.am b/2.3-1/src/c/operations/division/Makefile.am new file mode 100644 index 00000000..2704a7b3 --- /dev/null +++ b/2.3-1/src/c/operations/division/Makefile.am @@ -0,0 +1,66 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libDivision.la + +HEAD = ../includes/division.h + +libDivision_la_SOURCES = $(HEAD) \ + srdivs.c \ + drdivs.c \ + crdivs.c \ + zrdivs.c \ + sldivs.c \ + dldivs.c \ + cldivs.c \ + zldivs.c \ + srdiva.c \ + drdiva.c \ + crdiva.c \ + zrdiva.c \ + sldiva.c \ + dldiva.c \ + cldiva.c \ + zldiva.c + +check_PROGRAMS = testLDivision \ + testRDivision + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + + +testLDivision_SOURCES = testLDivision.c +testLDivision_LDADD = $(check_LDADD) +testLDivision_CFLAGS = $(check_INCLUDES) + + +testRDivision_SOURCES = testRDivision.c +testRDivision_LDADD = $(check_LDADD) +testRDivision_CFLAGS = $(check_INCLUDES) + +TESTS = testLDivision \ + testRDivision diff --git a/2.3-1/src/c/operations/division/Makefile.in b/2.3-1/src/c/operations/division/Makefile.in new file mode 100644 index 00000000..17be57a1 --- /dev/null +++ b/2.3-1/src/c/operations/division/Makefile.in @@ -0,0 +1,858 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testLDivision$(EXEEXT) testRDivision$(EXEEXT) +TESTS = testLDivision$(EXEEXT) testRDivision$(EXEEXT) +subdir = src/c/operations/division +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libDivision_la_LIBADD = +am__objects_1 = +am_libDivision_la_OBJECTS = $(am__objects_1) libDivision_la-srdivs.lo \ + libDivision_la-drdivs.lo libDivision_la-crdivs.lo \ + libDivision_la-zrdivs.lo libDivision_la-sldivs.lo \ + libDivision_la-dldivs.lo libDivision_la-cldivs.lo \ + libDivision_la-zldivs.lo libDivision_la-srdiva.lo \ + libDivision_la-drdiva.lo libDivision_la-crdiva.lo \ + libDivision_la-zrdiva.lo libDivision_la-sldiva.lo \ + libDivision_la-dldiva.lo libDivision_la-cldiva.lo \ + libDivision_la-zldiva.lo +libDivision_la_OBJECTS = $(am_libDivision_la_OBJECTS) +libDivision_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDivision_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testLDivision_OBJECTS = testLDivision-testLDivision.$(OBJEXT) +testLDivision_OBJECTS = $(am_testLDivision_OBJECTS) +testLDivision_DEPENDENCIES = $(check_LDADD) +testLDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testLDivision_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testRDivision_OBJECTS = testRDivision-testRDivision.$(OBJEXT) +testRDivision_OBJECTS = $(am_testRDivision_OBJECTS) +testRDivision_DEPENDENCIES = $(check_LDADD) +testRDivision_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testRDivision_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDivision_la_SOURCES) $(testLDivision_SOURCES) \ + $(testRDivision_SOURCES) +DIST_SOURCES = $(libDivision_la_SOURCES) $(testLDivision_SOURCES) \ + $(testRDivision_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libDivision_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libDivision.la +HEAD = ../includes/division.h +libDivision_la_SOURCES = $(HEAD) \ + srdivs.c \ + drdivs.c \ + crdivs.c \ + zrdivs.c \ + sldivs.c \ + dldivs.c \ + cldivs.c \ + zldivs.c \ + srdiva.c \ + drdiva.c \ + crdiva.c \ + zrdiva.c \ + sldiva.c \ + dldiva.c \ + cldiva.c \ + zldiva.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libDivision.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +testLDivision_SOURCES = testLDivision.c +testLDivision_LDADD = $(check_LDADD) +testLDivision_CFLAGS = $(check_INCLUDES) +testRDivision_SOURCES = testRDivision.c +testRDivision_LDADD = $(check_LDADD) +testRDivision_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/operations/division/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/operations/division/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDivision.la: $(libDivision_la_OBJECTS) $(libDivision_la_DEPENDENCIES) + $(libDivision_la_LINK) -rpath $(pkglibdir) $(libDivision_la_OBJECTS) $(libDivision_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testLDivision$(EXEEXT): $(testLDivision_OBJECTS) $(testLDivision_DEPENDENCIES) + @rm -f testLDivision$(EXEEXT) + $(testLDivision_LINK) $(testLDivision_OBJECTS) $(testLDivision_LDADD) $(LIBS) +testRDivision$(EXEEXT): $(testRDivision_OBJECTS) $(testRDivision_DEPENDENCIES) + @rm -f testRDivision$(EXEEXT) + $(testRDivision_LINK) $(testRDivision_OBJECTS) $(testRDivision_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-cldiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-cldivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-crdiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-crdivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-dldiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-dldivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-drdiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-drdivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-sldiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-sldivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-srdiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-srdivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-zldiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-zldivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-zrdiva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDivision_la-zrdivs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testLDivision-testLDivision.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testRDivision-testRDivision.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libDivision_la-srdivs.lo: srdivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-srdivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-srdivs.Tpo -c -o libDivision_la-srdivs.lo `test -f 'srdivs.c' || echo '$(srcdir)/'`srdivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-srdivs.Tpo $(DEPDIR)/libDivision_la-srdivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdivs.c' object='libDivision_la-srdivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-srdivs.lo `test -f 'srdivs.c' || echo '$(srcdir)/'`srdivs.c + +libDivision_la-drdivs.lo: drdivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-drdivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-drdivs.Tpo -c -o libDivision_la-drdivs.lo `test -f 'drdivs.c' || echo '$(srcdir)/'`drdivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-drdivs.Tpo $(DEPDIR)/libDivision_la-drdivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdivs.c' object='libDivision_la-drdivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-drdivs.lo `test -f 'drdivs.c' || echo '$(srcdir)/'`drdivs.c + +libDivision_la-crdivs.lo: crdivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-crdivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-crdivs.Tpo -c -o libDivision_la-crdivs.lo `test -f 'crdivs.c' || echo '$(srcdir)/'`crdivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-crdivs.Tpo $(DEPDIR)/libDivision_la-crdivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdivs.c' object='libDivision_la-crdivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-crdivs.lo `test -f 'crdivs.c' || echo '$(srcdir)/'`crdivs.c + +libDivision_la-zrdivs.lo: zrdivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-zrdivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-zrdivs.Tpo -c -o libDivision_la-zrdivs.lo `test -f 'zrdivs.c' || echo '$(srcdir)/'`zrdivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-zrdivs.Tpo $(DEPDIR)/libDivision_la-zrdivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdivs.c' object='libDivision_la-zrdivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-zrdivs.lo `test -f 'zrdivs.c' || echo '$(srcdir)/'`zrdivs.c + +libDivision_la-sldivs.lo: sldivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-sldivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-sldivs.Tpo -c -o libDivision_la-sldivs.lo `test -f 'sldivs.c' || echo '$(srcdir)/'`sldivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-sldivs.Tpo $(DEPDIR)/libDivision_la-sldivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sldivs.c' object='libDivision_la-sldivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-sldivs.lo `test -f 'sldivs.c' || echo '$(srcdir)/'`sldivs.c + +libDivision_la-dldivs.lo: dldivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-dldivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-dldivs.Tpo -c -o libDivision_la-dldivs.lo `test -f 'dldivs.c' || echo '$(srcdir)/'`dldivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-dldivs.Tpo $(DEPDIR)/libDivision_la-dldivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dldivs.c' object='libDivision_la-dldivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-dldivs.lo `test -f 'dldivs.c' || echo '$(srcdir)/'`dldivs.c + +libDivision_la-cldivs.lo: cldivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-cldivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-cldivs.Tpo -c -o libDivision_la-cldivs.lo `test -f 'cldivs.c' || echo '$(srcdir)/'`cldivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-cldivs.Tpo $(DEPDIR)/libDivision_la-cldivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cldivs.c' object='libDivision_la-cldivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-cldivs.lo `test -f 'cldivs.c' || echo '$(srcdir)/'`cldivs.c + +libDivision_la-zldivs.lo: zldivs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-zldivs.lo -MD -MP -MF $(DEPDIR)/libDivision_la-zldivs.Tpo -c -o libDivision_la-zldivs.lo `test -f 'zldivs.c' || echo '$(srcdir)/'`zldivs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-zldivs.Tpo $(DEPDIR)/libDivision_la-zldivs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zldivs.c' object='libDivision_la-zldivs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-zldivs.lo `test -f 'zldivs.c' || echo '$(srcdir)/'`zldivs.c + +libDivision_la-srdiva.lo: srdiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-srdiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-srdiva.Tpo -c -o libDivision_la-srdiva.lo `test -f 'srdiva.c' || echo '$(srcdir)/'`srdiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-srdiva.Tpo $(DEPDIR)/libDivision_la-srdiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srdiva.c' object='libDivision_la-srdiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-srdiva.lo `test -f 'srdiva.c' || echo '$(srcdir)/'`srdiva.c + +libDivision_la-drdiva.lo: drdiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-drdiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-drdiva.Tpo -c -o libDivision_la-drdiva.lo `test -f 'drdiva.c' || echo '$(srcdir)/'`drdiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-drdiva.Tpo $(DEPDIR)/libDivision_la-drdiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drdiva.c' object='libDivision_la-drdiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-drdiva.lo `test -f 'drdiva.c' || echo '$(srcdir)/'`drdiva.c + +libDivision_la-crdiva.lo: crdiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-crdiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-crdiva.Tpo -c -o libDivision_la-crdiva.lo `test -f 'crdiva.c' || echo '$(srcdir)/'`crdiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-crdiva.Tpo $(DEPDIR)/libDivision_la-crdiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crdiva.c' object='libDivision_la-crdiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-crdiva.lo `test -f 'crdiva.c' || echo '$(srcdir)/'`crdiva.c + +libDivision_la-zrdiva.lo: zrdiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-zrdiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-zrdiva.Tpo -c -o libDivision_la-zrdiva.lo `test -f 'zrdiva.c' || echo '$(srcdir)/'`zrdiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-zrdiva.Tpo $(DEPDIR)/libDivision_la-zrdiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrdiva.c' object='libDivision_la-zrdiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-zrdiva.lo `test -f 'zrdiva.c' || echo '$(srcdir)/'`zrdiva.c + +libDivision_la-sldiva.lo: sldiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-sldiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-sldiva.Tpo -c -o libDivision_la-sldiva.lo `test -f 'sldiva.c' || echo '$(srcdir)/'`sldiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-sldiva.Tpo $(DEPDIR)/libDivision_la-sldiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sldiva.c' object='libDivision_la-sldiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-sldiva.lo `test -f 'sldiva.c' || echo '$(srcdir)/'`sldiva.c + +libDivision_la-dldiva.lo: dldiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-dldiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-dldiva.Tpo -c -o libDivision_la-dldiva.lo `test -f 'dldiva.c' || echo '$(srcdir)/'`dldiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-dldiva.Tpo $(DEPDIR)/libDivision_la-dldiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dldiva.c' object='libDivision_la-dldiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-dldiva.lo `test -f 'dldiva.c' || echo '$(srcdir)/'`dldiva.c + +libDivision_la-cldiva.lo: cldiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-cldiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-cldiva.Tpo -c -o libDivision_la-cldiva.lo `test -f 'cldiva.c' || echo '$(srcdir)/'`cldiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-cldiva.Tpo $(DEPDIR)/libDivision_la-cldiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cldiva.c' object='libDivision_la-cldiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-cldiva.lo `test -f 'cldiva.c' || echo '$(srcdir)/'`cldiva.c + +libDivision_la-zldiva.lo: zldiva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -MT libDivision_la-zldiva.lo -MD -MP -MF $(DEPDIR)/libDivision_la-zldiva.Tpo -c -o libDivision_la-zldiva.lo `test -f 'zldiva.c' || echo '$(srcdir)/'`zldiva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDivision_la-zldiva.Tpo $(DEPDIR)/libDivision_la-zldiva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zldiva.c' object='libDivision_la-zldiva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDivision_la_CFLAGS) $(CFLAGS) -c -o libDivision_la-zldiva.lo `test -f 'zldiva.c' || echo '$(srcdir)/'`zldiva.c + +testLDivision-testLDivision.o: testLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLDivision_CFLAGS) $(CFLAGS) -MT testLDivision-testLDivision.o -MD -MP -MF $(DEPDIR)/testLDivision-testLDivision.Tpo -c -o testLDivision-testLDivision.o `test -f 'testLDivision.c' || echo '$(srcdir)/'`testLDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testLDivision-testLDivision.Tpo $(DEPDIR)/testLDivision-testLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testLDivision.c' object='testLDivision-testLDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLDivision_CFLAGS) $(CFLAGS) -c -o testLDivision-testLDivision.o `test -f 'testLDivision.c' || echo '$(srcdir)/'`testLDivision.c + +testLDivision-testLDivision.obj: testLDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLDivision_CFLAGS) $(CFLAGS) -MT testLDivision-testLDivision.obj -MD -MP -MF $(DEPDIR)/testLDivision-testLDivision.Tpo -c -o testLDivision-testLDivision.obj `if test -f 'testLDivision.c'; then $(CYGPATH_W) 'testLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testLDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testLDivision-testLDivision.Tpo $(DEPDIR)/testLDivision-testLDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testLDivision.c' object='testLDivision-testLDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testLDivision_CFLAGS) $(CFLAGS) -c -o testLDivision-testLDivision.obj `if test -f 'testLDivision.c'; then $(CYGPATH_W) 'testLDivision.c'; else $(CYGPATH_W) '$(srcdir)/testLDivision.c'; fi` + +testRDivision-testRDivision.o: testRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRDivision_CFLAGS) $(CFLAGS) -MT testRDivision-testRDivision.o -MD -MP -MF $(DEPDIR)/testRDivision-testRDivision.Tpo -c -o testRDivision-testRDivision.o `test -f 'testRDivision.c' || echo '$(srcdir)/'`testRDivision.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRDivision-testRDivision.Tpo $(DEPDIR)/testRDivision-testRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRDivision.c' object='testRDivision-testRDivision.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRDivision_CFLAGS) $(CFLAGS) -c -o testRDivision-testRDivision.o `test -f 'testRDivision.c' || echo '$(srcdir)/'`testRDivision.c + +testRDivision-testRDivision.obj: testRDivision.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRDivision_CFLAGS) $(CFLAGS) -MT testRDivision-testRDivision.obj -MD -MP -MF $(DEPDIR)/testRDivision-testRDivision.Tpo -c -o testRDivision-testRDivision.obj `if test -f 'testRDivision.c'; then $(CYGPATH_W) 'testRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testRDivision.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testRDivision-testRDivision.Tpo $(DEPDIR)/testRDivision-testRDivision.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testRDivision.c' object='testRDivision-testRDivision.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testRDivision_CFLAGS) $(CFLAGS) -c -o testRDivision-testRDivision.obj `if test -f 'testRDivision.c'; then $(CYGPATH_W) 'testRDivision.c'; else $(CYGPATH_W) '$(srcdir)/testRDivision.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/operations/division/cldiva.c b/2.3-1/src/c/operations/division/cldiva.c new file mode 100644 index 00000000..21d95e31 --- /dev/null +++ b/2.3-1/src/c/operations/division/cldiva.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "division.h" + +void cldiva (floatComplex* in1, floatComplex* in2, int size, floatComplex* out ){ + int i=0; + for (i=0;i= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#include "division.h" + +/* +** \function cdivides +** \brief Divide 2 Complex numbers. +*/ +floatComplex crdivs(floatComplex z1, floatComplex z2) { +#ifndef STDC99 + return FloatComplex((z1.real*z2.real + z1.imag*z2.imag) / (z2.real*z2.real + z2.imag* z2.imag), + (z1.imag*z2.real - z1.real*z2.imag) / (z2.real*z2.real + z2.imag* z2.imag)); +#else + return z1 / z2; +#endif +} + diff --git a/2.3-1/src/c/operations/division/dldiva.c b/2.3-1/src/c/operations/division/dldiva.c new file mode 100644 index 00000000..3910c61e --- /dev/null +++ b/2.3-1/src/c/operations/division/dldiva.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "division.h" + +void dldiva (double* in1, double* in2, int size, double* out ){ + int i=0; + for (i=0;i +#include +#include +#include +#include "division.h" +/* +#define LOCAL_DEBUG +*/ + +#define numF {0.4863167726434767246246f,0.7351270420476794242859f,0.4931047945283353328705f, \ +0.4674215372651815414429f,0.9385177572257816791534f,0.1922166878357529640198f, \ +0.5954132671467959880829f,0.8327809907495975494385f,0.6687640086747705936432f, \ +0.2286918228492140769958f,0.0092464587651193141937f,0.2995736915618181228638f, \ +0.2700363886542618274689f,0.7742356555536389350891f,0.4557857620529830455780f, \ +0.7828153371810913085938f,0.4748650141991674900055f,0.6544588236138224601746f, \ +0.0774390711449086666107f,0.7298626285046339035034f,0.3178048436529934406281f, \ +0.7616757610812783241272f,0.7946523050777614116669f,0.4113068245351314544678f, \ +0.7725206376053392887115f,0.3331029405817389488220f,0.2467053062282502651215f, \ +0.2411641720682382583618f,0.4572312948293983936310f,0.0552289905026555061340f, \ +0.6602421137504279613495f,0.5951132103800773620605f,0.5022635632194578647614f, \ +0.2131066871806979179382f,0.4892856120131909847260f,0.0955289509147405624390f, \ +0.1734651257283985614777f,0.6033168220892548561096f,0.1704865540377795696259f, \ +0.8320639319717884063721f,0.3452270613051950931549f,0.4293539440259337425232f, \ +0.8373569599352777004242f,0.4865261483937501907349f,0.4168656808324158191681f, \ +0.8981839763000607490540f,0.3372378903441131114960f,0.8308038562536239624023f, \ +0.7661137380637228488922f,0.7367237089201807975769f,0.3947515948675572872162f, \ +0.5665872525423765182495f,0.3334710155613720417023f,0.3469921657815575599670f, \ +0.2654880355112254619598f,0.9756370298564434051514f,0.4311642856337130069733f, \ +0.818683846853673458099f,0.7236757851205766201019f,0.3493498060852289199829f, \ +0.3704666462726891040802f,0.5179138453677296638489f,0.7275873008184134960175f, \ +0.6663704290986061096191f,0.0011262320913374423981f,0.4708848400041460990906f, \ +0.6064285724423825740814f,0.4870011564344167709351f,0.7566543002612888813019f, \ +0.2612259620800614356995f,0.1124631459824740886688f,0.5331577099859714508057f, \ +0.2992226914502680301666f,0.6597535377368330955505f,0.1821205220185220241547f, \ +0.9226222056895494461060f,0.3579206657595932483673f,0.70540370512753725052f, \ +0.7498389291577041149139f,0.5263429582118988037109f,0.8541211136616766452789f, \ +0.4560869066044688224792f,0.4583924724720418453217f,0.4175311606377363204956f, \ +0.9077061419375240802765f,0.1282142559066414833069f,0.6094526569359004497528f, \ +0.8813044391572475433350f,0.8179020346142351627350f,0.8436457803472876548767f, \ +0.1981342858634889125824f,0.9536272827535867691040f,0.6124735889025032520294f, \ +0.7028105380013585090637f,0.3752757343463599681854f,0.9582983478903770446777f, \ +0.2590278261341154575348f,0.4027486098930239677429f,0.1812035976909101009369f, \ +0.0107346381992101669312f,0.1321770776994526386261f,0.1188249671831727027893f, \ +0.8947317148558795452118f,0.9573025591671466827393f,0.8303114459849894046783f, \ +0.8688652133569121360779f,0.8411445668898522853851f,0.7189458478242158889771f, \ +0.9357306403107941150665f,0.0784632014110684394836f,0.0029150503687560558319f, \ +0.5078603774309158325195f,0.8118851878680288791656f,0.5662105260416865348816f, \ +0.2769066258333623409271f,0.8859658371657133102417f,0.0314770196564495563507f, \ +0.6675978908315300941467f,0.7218098412267863750458f,0.1339242868125438690186f, \ +0.5291694314219057559967f,0.7163383504375815391541f,0.6395632303319871425629f, \ +0.8994555864483118057251f,0.0726564195938408374786f,0.6018624277785420417786f, \ +0.8345085862092673778534f,0.5936997011303901672363f,0.1458413922227919101715f, \ +0.6217351062223315238953f,0.8940306096337735652924f,0.5043758805841207504272f, \ +0.8378752549178898334503f,0.3477446967735886573792f,0.8344309325329959392548f, \ +0.0944887138903141021729f,0.8318038717843592166901f,0.7244135802611708641052f, \ +0.9557865164242684841156f,0.4553310591727495193481f,0.0865749013610184192657f, \ +0.1186808245256543159485f,0.2495424258522689342499f,0.3825338482856750488281f, \ +0.3061540075577795505524f,0.5395066766068339347839f,0.2025889768265187740326f, \ +0.0439127665013074874878f,0.7895004455931484699249f,0.7461489299312233924866f, \ +0.3415732602588832378387f,0.7078618071973323822021f,0.7551520229317247867584f, \ +0.4638611664995551109314f,0.3611950404010713100433f,0.5010437015444040298462f, \ +0.7341694352217018604279f,0.4257628740742802619934f,0.1802370282821357250214f, \ +0.6641272231936454772949f,0.1251899772323668003082f,0.4596314383670687675476f, \ +0.7690795301459729671478f,0.2743213679641485214233f,0.5053406287916004657745f, \ +0.3383660102263092994690f,0.0924494708888232707977f,0.9034564085304737091064f, \ +0.7907605157233774662018f,0.6128732478246092796326f,0.0111537924967706203461f, \ +0.1803618241101503372192f,0.8404827457852661609650f,0.1461249338462948799133f, \ +0.4865472274832427501678f,0.726291105151176452637f,0.5974256196059286594391f, \ +0.5671374676749110221863f,0.931484447326511144638f,0.4321434330195188522339f, \ +0.3602432166226208209991f,0.3636232325807213783264f,0.0515065859071910381317f, \ +0.546232234686613082886f,0.2797853560186922550201f,0.8320638379082083702087f, \ +0.0200121379457414150238f,0.5413506124168634414673f,0.6739169326610863208771f, \ +0.6039552362635731697083f,0.3311622324399650096893f,0.2298836484551429748535f, \ +0.2544466280378401279449f,0.9669747157022356987000f,0.1742702811025083065033f, \ +0.0957175847142934799194f,0.8599149961955845355988f,0.6998197669163346290588f, \ +0.6734260017983615398407f,0.3116958774626255035400f} + + +#define denF {0.5382980355061590671539f,0.2007744638249278068542f,0.2641933872364461421967f, \ +0.8457476180046796798706f,0.1300224070437252521515f,0.3342894474044442176819f, \ +0.0829705516807734966278f,0.4690896831452846527100f,0.1495246351696550846100f, \ +0.1354982545599341392517f,0.9212783402763307094574f,0.6837693993002176284790f, \ +0.138241392094641923904f,0.5700643183663487434387f,0.6155020031146705150604f, \ +0.4131947979331016540527f,0.7962015741504728794098f,0.0440120948478579521179f, \ +0.8602650105021893978119f,0.9661422576755285263062f,0.9491893877275288105011f, \ +0.7854409301653504371643f,0.0574280763976275920868f,0.4760875590145587921143f, \ +0.8655168102122843265533f,0.7086608028039336204529f,0.6240725568495690822601f, \ +0.7448338139802217483521f,0.5161554259248077869415f,0.4794999407604336738586f, \ +0.1032182234339416027069f,0.9591862708330154418945f,0.8719776370562613010406f, \ +0.0005343137308955192566f,0.921025411691516637802f,0.2494239937514066696167f, \ +0.8318572496064007282257f,0.0349890002980828285217f,0.1342315445654094219208f, \ +0.5583184175193309783936f,0.8753794343210756778717f,0.1880614301189780235291f, \ +0.0115720308385789394379f,0.7894487772136926651001f,0.0339100626297295093536f, \ +0.9644165011122822761536f,0.7929355385713279247284f,0.7035644128918647766113f, \ +0.2737744175828993320465f,0.1206035716459155082703f,0.4700036435388028621674f, \ +0.5317439492791891098022f,0.8852952797897160053253f,0.0311453277245163917542f, \ +0.9321248526684939861298f,0.7741013504564762115479f,0.9714403883554041385651f, \ +0.2870485251769423484802f,0.321173002477735280991f,0.1527888495475053787231f, \ +0.6298292768187820911407f,0.2454866068437695503235f,0.9391400325112044811249f, \ +0.1880467534065246582031f,0.9218494840897619724274f,0.7494041947647929191589f, \ +0.5522131337784230709076f,0.3660501223057508468628f,0.2226321403868496417999f, \ +0.7357934573665261268616f,0.4350862721912562847137f,0.3673023246228694915771f, \ +0.0456369281746447086334f,0.9513923516497015953064f,0.9992560870014131069183f, \ +0.3243254665285348892212f,0.935596418101340532303f,0.4945547403767704963684f, \ +0.3490521642379462718964f,0.5773976966738700866699f,0.5235697799362242221832f, \ +0.4020423842594027519226f,0.6091516851447522640228f,0.8970873858779668807983f, \ +0.3378558685071766376495f,0.999488809145987033844f,0.3673284496180713176727f, \ +0.6423341818153858184814f,0.4645156846381723880768f,0.2342850482091307640076f, \ +0.0761862746439874172211f,0.8228269387036561965942f,0.6512542110867798328400f, \ +0.7096372591331601142883f,0.7576267677359282970428f,0.5344285219907760620117f, \ +0.9484116234816610813141f,0.6385462163016200065613f,0.8538014753721654415131f, \ +0.7363974880427122116089f,0.4808138762600719928741f,0.4364586779847741127014f, \ +0.568298406433314085007f,0.8391566388309001922607f,0.4442326636053621768951f, \ +0.1713406285271048545837f,0.5413129306398332118988f,0.0713584516197443008423f, \ +0.9202047553844749927521f,0.5899223955348134040833f,0.2025530519895255565643f, \ +0.0949973836541175842285f,0.6029607080854475498199f,0.9388656420633196830750f, \ +0.6456290571950376033783f,0.8373190518468618392944f,0.0322129507549107074738f, \ +0.2996022338047623634338f,0.3676775391213595867157f,0.0082762874662876129150f, \ +0.4255532459355890750885f,0.6555949812754988670349f,0.7179697952233254909515f, \ +0.2722820658236742019653f,0.7042095256038010120392f,0.4107702570036053657532f, \ +0.3992546009831130504608f,0.5430093109607696533203f,0.8059121021069586277008f, \ +0.5778724877163767814636f,0.8655853583477437496185f,0.3699875753372907638550f, \ +0.8786192541010677814484f,0.3554905215278267860413f,0.9603816191665828227997f, \ +0.8857465945184230804443f,0.4488521874882280826569f,0.3125058701261878013611f, \ +0.6384749836288392543793f,0.2822567168623208999634f,0.1583893713541328907013f, \ +0.8987128259614109992981f,0.1158893737010657787323f,0.2854162082076072692871f, \ +0.1630702489055693149567f,0.5003604544326663017273f,0.2911056815646588802338f, \ +0.5963354315608739852905f,0.7874583234079182147980f,0.7593664610758423805237f, \ +0.7815607930533587932587f,0.7681679017841815948486f,0.5291136191226541996002f, \ +0.3749529337510466575623f,0.4191309860907495021820f,0.4872382152825593948364f, \ +0.0062245172448456287384f,0.1064539598301053047180f,0.5483497041277587413788f, \ +0.7272168546915054321289f,0.9423489668406546115875f,0.1960451183840632438660f, \ +0.9711097045801579952240f,0.7450918685644865036011f,0.7820150707848370075226f, \ +0.9301448473706841468811f,0.8815995822660624980927f,0.3876874260604381561279f, \ +0.0309310466982424259186f,0.5582376858219504356384f,0.6352246678434312343597f, \ +0.6774792466312646865845f,0.9145545628853142261505f,0.2878693910315632820129f, \ +0.6952623012475669384003f,0.1464569047093391418457f,0.4487714492715895175934f, \ +0.5745639307424426078796f,0.6010014801286160945892f,0.8867830093950033187866f, \ +0.5164337833411991596222f,0.4254123503342270851135f,0.3011168832890689373016f, \ +0.786999259144067764282f,0.0435073510743677616119f,0.9350835150107741355896f, \ +0.6960272691212594509125f,0.9225293714553117752075f,0.8685784828849136829376f, \ +0.7730067269876599311829f,0.7329882490448653697968f,0.5692288875579833984375f, \ +0.3994702645577490329742f,0.8404762176796793937683f,0.8976694359444081783295f, \ +0.8087318520992994308472f,0.6507181231863796710968f,0.8164275148883461952209f, \ +0.4459659676067531108856f,0.1943443678319454193115f} + + +#define resF {1.1068876620893153273073f,0.2731153288357821562471f,0.5357753365370385711941f, \ +1.8093894923050217737881f,0.1385401672399528272273f,1.7391281223724490700988f, \ +0.1393495178203974227404f,0.5632809686530556581019f,0.2235835559780715298128f, \ +0.5924927829591603023474f,99.635802600634079340125f,2.2824747918797778645228f, \ +0.5119361608395592844190f,0.7362930320726552846367f,1.3504195487421153387686f, \ +0.5278317609629509243874f,1.6766903232347427632476f,0.0672496011358359180310f, \ +11.108927286749212370864f,1.32373164475483817704f,2.986705227073049417896f, \ +1.0312011623559280693030f,0.0722681807259187569681f,1.1574997802495594623196f, \ +1.1203801789622278572978f,2.1274528575650260009411f,2.5296276208675498864409f, \ +3.0884928204404604734634f,1.128871605600388905444f,8.682033410286187802285f, \ +0.156333898253812636492f,1.6117710951508164018975f,1.7360957491460742296852f, \ +0.0025072593355198783370f,1.8823880961917311971376f,2.610978047628903286892f, \ +4.79553020304999844114f,0.0579944052892769276730f,0.7873438777797333587571f, \ +0.6710042294421446618102f,2.5356628504484581831946f,0.4380102540938083932609f, \ +0.0138197105801489764088f,1.6226235317876158692485f,0.0813452970319274021316f, \ +1.073740488095831890902f,2.351264674803376752976f,0.8468477939720634450893f, \ +0.3573547947003760105744f,0.1637025796586412118572f,1.1906313987065544335309f, \ +0.9385031994510300012990f,2.6547892874569369858762f,0.0897580141452627294774f, \ +3.5109862893579681930589f,0.7934317033562969800897f,2.2530632075140655246059f, \ +0.3506219479963034180159f,0.4438078613121239635042f,0.4373520376600132930633f, \ +1.700097115774314993075f,0.4739912034393846673730f,1.2907592414749813336527f, \ +0.2821955254840674554018f,818.52532100646453727677f,1.5914808273678857641897f, \ +0.9105988056505853744937f,0.7516411767598049076256f,0.2942323070257712447351f, \ +2.8166934538498038520515f,3.8687008832125218127374f,0.6889187153132119156851f, \ +0.1525182731077390219099f,1.4420420615147946374890f,5.486784662849729876655f, \ +0.3515257540177461059727f,2.6139770837645857071152f,0.7010946168582355975119f, \ +0.4655028575670743240522f,1.096998995931123044301f,0.6129924334637322225205f, \ +0.8815038941866950583659f,1.3288867547490224030327f,2.1485519416269607262393f, \ +0.3722084195508624238080f,7.795457705372165868596f,0.6027185958378803443125f, \ +0.7288448273670578014816f,0.5679356022842784179616f,0.2777054703132481594530f, \ +0.3845183801075117147050f,0.8628391338886128858476f,1.0633180318089598959119f, \ +1.0097134586957323687528f,2.0188536012207980441246f,0.5576849038373914435596f, \ +3.66142756798108282013f,1.5854709379908906718981f,4.7118351194579819463115f, \ +68.6001218091257953802f,3.6376494671289218985066f,3.6731226469598623474155f, \ +0.6351606822441224764475f,0.8765845560477416587020f,0.5350193180564598582905f, \ +0.1972004700995223513971f,0.6435432765634424567835f,0.0992542787967969769580f, \ +0.9834077412265110895717f,7.5184594169719387579676f,69.4852665876786659283f, \ +0.1870541351043674693777f,0.7426674572901041937456f,1.6581564610372447887698f, \ +2.3315767734050760751074f,0.9450918045841619763436f,1.0233799484987251560142f, \ +0.4487764834481295372903f,0.5093828292732275331289f,0.0617982567857320377880f, \ +0.8041909087456269311645f,0.9152029636205054607956f,1.1225939221844238868897f, \ +0.3027187444561179607838f,9.6923235350768326412663f,0.6824985877914779841547f, \ +0.4784307885874682919614f,0.9146194783775245529256f,5.5259490452190824782974f, \ +0.9294512758456500156612f,0.9681831349178503520747f,0.7335552503200706286890f, \ +1.0486277628370475056840f,1.0222744583198670742519f,1.1509420153580014467565f, \ +9.3740993823519449534842f,0.5396130057983075101191f,0.4313915125852843535093f, \ +0.6680100343091925907402f,0.6198933966312950571975f,1.8295068069860944692806f, \ +7.5725192300727837135810f,0.4644074982651374416953f,0.7461201393986430785432f, \ +0.5326412357179206580327f,0.9274407085740377088001f,1.4369275472176299413007f, \ +13.580001422664143007069f,0.9974133995786461648336f,1.0177143337132941169898f, \ +2.2881205409961036245647f,1.0851947286513756729676f,0.7006716569048940801423f, \ +0.8083300798395380848405f,1.1604007231808777245163f,0.9724465426482939989228f, \ +0.0084783116079546021193f,0.2500311002023462569888f,3.042380965521659597073f, \ +1.0949963038624970224078f,7.5273515314372811957355f,0.4265267821551810278891f, \ +1.2626908746301428454473f,2.7161277085125345998051f,1.5475008859961179030762f, \ +2.7489310960890414037f,9.536015444871994262144f,0.4291158072485590224687f, \ +0.0391155679668035854979f,0.9108534069702217683684f,56.951451089604645972031f, \ +3.7562230808750052268863f,1.0881300865145571155068f,1.9700223873795954521171f, \ +1.4289718694810824572983f,0.2016504176777083601202f,0.7511754343036146641666f, \ +1.0130946436989567427389f,0.6452082821710799498405f,2.0520571218652525757875f, \ +1.4335697648463940900854f,1.1699262099260641090126f,5.8461821529318021006816f, \ +1.4407777666134784499974f,0.1555026027575977520812f,1.1238122273905750692080f, \ +34.780255413408944775711f,1.7041254785630945978170f,1.2888509559407714810675f, \ +1.279907318578674679799f,2.2133811686323432432744f,2.4761608378120754103691f, \ +1.5699569989913235712464f,0.8691811730250974532552f,5.1510184654857242847470f, \ +8.4491460426344389134101f,0.7567237762630856234836f,1.1666253991164448056139f, \ +0.6622345534859300775210f,0.6235063787625765296951f} + + +#define numD {0.4863167726434767246246,0.7351270420476794242859,0.4931047945283353328705, \ +0.4674215372651815414429,0.9385177572257816791534,0.1922166878357529640198, \ +0.5954132671467959880829,0.8327809907495975494385,0.6687640086747705936432, \ +0.2286918228492140769958,0.0092464587651193141937,0.2995736915618181228638, \ +0.2700363886542618274689,0.7742356555536389350891,0.4557857620529830455780, \ +0.7828153371810913085938,0.4748650141991674900055,0.6544588236138224601746, \ +0.0774390711449086666107,0.7298626285046339035034,0.3178048436529934406281, \ +0.7616757610812783241272,0.7946523050777614116669,0.4113068245351314544678, \ +0.7725206376053392887115,0.3331029405817389488220,0.2467053062282502651215, \ +0.2411641720682382583618,0.4572312948293983936310,0.0552289905026555061340, \ +0.6602421137504279613495,0.5951132103800773620605,0.5022635632194578647614, \ +0.2131066871806979179382,0.4892856120131909847260,0.0955289509147405624390, \ +0.1734651257283985614777,0.6033168220892548561096,0.1704865540377795696259, \ +0.8320639319717884063721,0.3452270613051950931549,0.4293539440259337425232, \ +0.8373569599352777004242,0.4865261483937501907349,0.4168656808324158191681, \ +0.8981839763000607490540,0.3372378903441131114960,0.8308038562536239624023, \ +0.7661137380637228488922,0.7367237089201807975769,0.3947515948675572872162, \ +0.5665872525423765182495,0.3334710155613720417023,0.3469921657815575599670, \ +0.2654880355112254619598,0.9756370298564434051514,0.4311642856337130069733, \ +0.818683846853673458099,0.7236757851205766201019,0.3493498060852289199829, \ +0.3704666462726891040802,0.5179138453677296638489,0.7275873008184134960175, \ +0.6663704290986061096191,0.0011262320913374423981,0.4708848400041460990906, \ +0.6064285724423825740814,0.4870011564344167709351,0.7566543002612888813019, \ +0.2612259620800614356995,0.1124631459824740886688,0.5331577099859714508057, \ +0.2992226914502680301666,0.6597535377368330955505,0.1821205220185220241547, \ +0.9226222056895494461060,0.3579206657595932483673,0.70540370512753725052, \ +0.7498389291577041149139,0.5263429582118988037109,0.8541211136616766452789, \ +0.4560869066044688224792,0.4583924724720418453217,0.4175311606377363204956, \ +0.9077061419375240802765,0.1282142559066414833069,0.6094526569359004497528, \ +0.8813044391572475433350,0.8179020346142351627350,0.8436457803472876548767, \ +0.1981342858634889125824,0.9536272827535867691040,0.6124735889025032520294, \ +0.7028105380013585090637,0.3752757343463599681854,0.9582983478903770446777, \ +0.2590278261341154575348,0.4027486098930239677429,0.1812035976909101009369, \ +0.0107346381992101669312,0.1321770776994526386261,0.1188249671831727027893, \ +0.8947317148558795452118,0.9573025591671466827393,0.8303114459849894046783, \ +0.8688652133569121360779,0.8411445668898522853851,0.7189458478242158889771, \ +0.9357306403107941150665,0.0784632014110684394836,0.0029150503687560558319, \ +0.5078603774309158325195,0.8118851878680288791656,0.5662105260416865348816, \ +0.2769066258333623409271,0.8859658371657133102417,0.0314770196564495563507, \ +0.6675978908315300941467,0.7218098412267863750458,0.1339242868125438690186, \ +0.5291694314219057559967,0.7163383504375815391541,0.6395632303319871425629, \ +0.8994555864483118057251,0.0726564195938408374786,0.6018624277785420417786, \ +0.8345085862092673778534,0.5936997011303901672363,0.1458413922227919101715, \ +0.6217351062223315238953,0.8940306096337735652924,0.5043758805841207504272, \ +0.8378752549178898334503,0.3477446967735886573792,0.8344309325329959392548, \ +0.0944887138903141021729,0.8318038717843592166901,0.7244135802611708641052, \ +0.9557865164242684841156,0.4553310591727495193481,0.0865749013610184192657, \ +0.1186808245256543159485,0.2495424258522689342499,0.3825338482856750488281, \ +0.3061540075577795505524,0.5395066766068339347839,0.2025889768265187740326, \ +0.0439127665013074874878,0.7895004455931484699249,0.7461489299312233924866, \ +0.3415732602588832378387,0.7078618071973323822021,0.7551520229317247867584, \ +0.4638611664995551109314,0.3611950404010713100433,0.5010437015444040298462, \ +0.7341694352217018604279,0.4257628740742802619934,0.1802370282821357250214, \ +0.6641272231936454772949,0.1251899772323668003082,0.4596314383670687675476, \ +0.7690795301459729671478,0.2743213679641485214233,0.5053406287916004657745, \ +0.3383660102263092994690,0.0924494708888232707977,0.9034564085304737091064, \ +0.7907605157233774662018,0.6128732478246092796326,0.0111537924967706203461, \ +0.1803618241101503372192,0.8404827457852661609650,0.1461249338462948799133, \ +0.4865472274832427501678,0.726291105151176452637,0.5974256196059286594391, \ +0.5671374676749110221863,0.931484447326511144638,0.4321434330195188522339, \ +0.3602432166226208209991,0.3636232325807213783264,0.0515065859071910381317, \ +0.546232234686613082886,0.2797853560186922550201,0.8320638379082083702087, \ +0.0200121379457414150238,0.5413506124168634414673,0.6739169326610863208771, \ +0.6039552362635731697083,0.3311622324399650096893,0.2298836484551429748535, \ +0.2544466280378401279449,0.9669747157022356987000,0.1742702811025083065033, \ +0.0957175847142934799194,0.8599149961955845355988,0.6998197669163346290588, \ +0.6734260017983615398407,0.3116958774626255035400} + + +#define denD {0.5382980355061590671539,0.2007744638249278068542,0.2641933872364461421967, \ +0.8457476180046796798706,0.1300224070437252521515,0.3342894474044442176819, \ +0.0829705516807734966278,0.4690896831452846527100,0.1495246351696550846100, \ +0.1354982545599341392517,0.9212783402763307094574,0.6837693993002176284790, \ +0.138241392094641923904,0.5700643183663487434387,0.6155020031146705150604, \ +0.4131947979331016540527,0.7962015741504728794098,0.0440120948478579521179, \ +0.8602650105021893978119,0.9661422576755285263062,0.9491893877275288105011, \ +0.7854409301653504371643,0.0574280763976275920868,0.4760875590145587921143, \ +0.8655168102122843265533,0.7086608028039336204529,0.6240725568495690822601, \ +0.7448338139802217483521,0.5161554259248077869415,0.4794999407604336738586, \ +0.1032182234339416027069,0.9591862708330154418945,0.8719776370562613010406, \ +0.0005343137308955192566,0.921025411691516637802,0.2494239937514066696167, \ +0.8318572496064007282257,0.0349890002980828285217,0.1342315445654094219208, \ +0.5583184175193309783936,0.8753794343210756778717,0.1880614301189780235291, \ +0.0115720308385789394379,0.7894487772136926651001,0.0339100626297295093536, \ +0.9644165011122822761536,0.7929355385713279247284,0.7035644128918647766113, \ +0.2737744175828993320465,0.1206035716459155082703,0.4700036435388028621674, \ +0.5317439492791891098022,0.8852952797897160053253,0.0311453277245163917542, \ +0.9321248526684939861298,0.7741013504564762115479,0.9714403883554041385651, \ +0.2870485251769423484802,0.321173002477735280991,0.1527888495475053787231, \ +0.6298292768187820911407,0.2454866068437695503235,0.9391400325112044811249, \ +0.1880467534065246582031,0.9218494840897619724274,0.7494041947647929191589, \ +0.5522131337784230709076,0.3660501223057508468628,0.2226321403868496417999, \ +0.7357934573665261268616,0.4350862721912562847137,0.3673023246228694915771, \ +0.0456369281746447086334,0.9513923516497015953064,0.9992560870014131069183, \ +0.3243254665285348892212,0.935596418101340532303,0.4945547403767704963684, \ +0.3490521642379462718964,0.5773976966738700866699,0.5235697799362242221832, \ +0.4020423842594027519226,0.6091516851447522640228,0.8970873858779668807983, \ +0.3378558685071766376495,0.999488809145987033844,0.3673284496180713176727, \ +0.6423341818153858184814,0.4645156846381723880768,0.2342850482091307640076, \ +0.0761862746439874172211,0.8228269387036561965942,0.6512542110867798328400, \ +0.7096372591331601142883,0.7576267677359282970428,0.5344285219907760620117, \ +0.9484116234816610813141,0.6385462163016200065613,0.8538014753721654415131, \ +0.7363974880427122116089,0.4808138762600719928741,0.4364586779847741127014, \ +0.568298406433314085007,0.8391566388309001922607,0.4442326636053621768951, \ +0.1713406285271048545837,0.5413129306398332118988,0.0713584516197443008423, \ +0.9202047553844749927521,0.5899223955348134040833,0.2025530519895255565643, \ +0.0949973836541175842285,0.6029607080854475498199,0.9388656420633196830750, \ +0.6456290571950376033783,0.8373190518468618392944,0.0322129507549107074738, \ +0.2996022338047623634338,0.3676775391213595867157,0.0082762874662876129150, \ +0.4255532459355890750885,0.6555949812754988670349,0.7179697952233254909515, \ +0.2722820658236742019653,0.7042095256038010120392,0.4107702570036053657532, \ +0.3992546009831130504608,0.5430093109607696533203,0.8059121021069586277008, \ +0.5778724877163767814636,0.8655853583477437496185,0.3699875753372907638550, \ +0.8786192541010677814484,0.3554905215278267860413,0.9603816191665828227997, \ +0.8857465945184230804443,0.4488521874882280826569,0.3125058701261878013611, \ +0.6384749836288392543793,0.2822567168623208999634,0.1583893713541328907013, \ +0.8987128259614109992981,0.1158893737010657787323,0.2854162082076072692871, \ +0.1630702489055693149567,0.5003604544326663017273,0.2911056815646588802338, \ +0.5963354315608739852905,0.7874583234079182147980,0.7593664610758423805237, \ +0.7815607930533587932587,0.7681679017841815948486,0.5291136191226541996002, \ +0.3749529337510466575623,0.4191309860907495021820,0.4872382152825593948364, \ +0.0062245172448456287384,0.1064539598301053047180,0.5483497041277587413788, \ +0.7272168546915054321289,0.9423489668406546115875,0.1960451183840632438660, \ +0.9711097045801579952240,0.7450918685644865036011,0.7820150707848370075226, \ +0.9301448473706841468811,0.8815995822660624980927,0.3876874260604381561279, \ +0.0309310466982424259186,0.5582376858219504356384,0.6352246678434312343597, \ +0.6774792466312646865845,0.9145545628853142261505,0.2878693910315632820129, \ +0.6952623012475669384003,0.1464569047093391418457,0.4487714492715895175934, \ +0.5745639307424426078796,0.6010014801286160945892,0.8867830093950033187866, \ +0.5164337833411991596222,0.4254123503342270851135,0.3011168832890689373016, \ +0.786999259144067764282,0.0435073510743677616119,0.9350835150107741355896, \ +0.6960272691212594509125,0.9225293714553117752075,0.8685784828849136829376, \ +0.7730067269876599311829,0.7329882490448653697968,0.5692288875579833984375, \ +0.3994702645577490329742,0.8404762176796793937683,0.8976694359444081783295, \ +0.8087318520992994308472,0.6507181231863796710968,0.8164275148883461952209, \ +0.4459659676067531108856,0.1943443678319454193115} + + +#define resD {1.1068876620893153273073,0.2731153288357821562471,0.5357753365370385711941, \ +1.8093894923050217737881,0.1385401672399528272273,1.7391281223724490700988, \ +0.1393495178203974227404,0.5632809686530556581019,0.2235835559780715298128, \ +0.5924927829591603023474,99.635802600634079340125,2.2824747918797778645228, \ +0.5119361608395592844190,0.7362930320726552846367,1.3504195487421153387686, \ +0.5278317609629509243874,1.6766903232347427632476,0.0672496011358359180310, \ +11.108927286749212370864,1.32373164475483817704,2.986705227073049417896, \ +1.0312011623559280693030,0.0722681807259187569681,1.1574997802495594623196, \ +1.1203801789622278572978,2.1274528575650260009411,2.5296276208675498864409, \ +3.0884928204404604734634,1.128871605600388905444,8.682033410286187802285, \ +0.156333898253812636492,1.6117710951508164018975,1.7360957491460742296852, \ +0.0025072593355198783370,1.8823880961917311971376,2.610978047628903286892, \ +4.79553020304999844114,0.0579944052892769276730,0.7873438777797333587571, \ +0.6710042294421446618102,2.5356628504484581831946,0.4380102540938083932609, \ +0.0138197105801489764088,1.6226235317876158692485,0.0813452970319274021316, \ +1.073740488095831890902,2.351264674803376752976,0.8468477939720634450893, \ +0.3573547947003760105744,0.1637025796586412118572,1.1906313987065544335309, \ +0.9385031994510300012990,2.6547892874569369858762,0.0897580141452627294774, \ +3.5109862893579681930589,0.7934317033562969800897,2.2530632075140655246059, \ +0.3506219479963034180159,0.4438078613121239635042,0.4373520376600132930633, \ +1.700097115774314993075,0.4739912034393846673730,1.2907592414749813336527, \ +0.2821955254840674554018,818.52532100646453727677,1.5914808273678857641897, \ +0.9105988056505853744937,0.7516411767598049076256,0.2942323070257712447351, \ +2.8166934538498038520515,3.8687008832125218127374,0.6889187153132119156851, \ +0.1525182731077390219099,1.4420420615147946374890,5.486784662849729876655, \ +0.3515257540177461059727,2.6139770837645857071152,0.7010946168582355975119, \ +0.4655028575670743240522,1.096998995931123044301,0.6129924334637322225205, \ +0.8815038941866950583659,1.3288867547490224030327,2.1485519416269607262393, \ +0.3722084195508624238080,7.795457705372165868596,0.6027185958378803443125, \ +0.7288448273670578014816,0.5679356022842784179616,0.2777054703132481594530, \ +0.3845183801075117147050,0.8628391338886128858476,1.0633180318089598959119, \ +1.0097134586957323687528,2.0188536012207980441246,0.5576849038373914435596, \ +3.66142756798108282013,1.5854709379908906718981,4.7118351194579819463115, \ +68.6001218091257953802,3.6376494671289218985066,3.6731226469598623474155, \ +0.6351606822441224764475,0.8765845560477416587020,0.5350193180564598582905, \ +0.1972004700995223513971,0.6435432765634424567835,0.0992542787967969769580, \ +0.9834077412265110895717,7.5184594169719387579676,69.4852665876786659283, \ +0.1870541351043674693777,0.7426674572901041937456,1.6581564610372447887698, \ +2.3315767734050760751074,0.9450918045841619763436,1.0233799484987251560142, \ +0.4487764834481295372903,0.5093828292732275331289,0.0617982567857320377880, \ +0.8041909087456269311645,0.9152029636205054607956,1.1225939221844238868897, \ +0.3027187444561179607838,9.6923235350768326412663,0.6824985877914779841547, \ +0.4784307885874682919614,0.9146194783775245529256,5.5259490452190824782974, \ +0.9294512758456500156612,0.9681831349178503520747,0.7335552503200706286890, \ +1.0486277628370475056840,1.0222744583198670742519,1.1509420153580014467565, \ +9.3740993823519449534842,0.5396130057983075101191,0.4313915125852843535093, \ +0.6680100343091925907402,0.6198933966312950571975,1.8295068069860944692806, \ +7.5725192300727837135810,0.4644074982651374416953,0.7461201393986430785432, \ +0.5326412357179206580327,0.9274407085740377088001,1.4369275472176299413007, \ +13.580001422664143007069,0.9974133995786461648336,1.0177143337132941169898, \ +2.2881205409961036245647,1.0851947286513756729676,0.7006716569048940801423, \ +0.8083300798395380848405,1.1604007231808777245163,0.9724465426482939989228, \ +0.0084783116079546021193,0.2500311002023462569888,3.042380965521659597073, \ +1.0949963038624970224078,7.5273515314372811957355,0.4265267821551810278891, \ +1.2626908746301428454473,2.7161277085125345998051,1.5475008859961179030762, \ +2.7489310960890414037,9.536015444871994262144,0.4291158072485590224687, \ +0.0391155679668035854979,0.9108534069702217683684,56.951451089604645972031, \ +3.7562230808750052268863,1.0881300865145571155068,1.9700223873795954521171, \ +1.4289718694810824572983,0.2016504176777083601202,0.7511754343036146641666, \ +1.0130946436989567427389,0.6452082821710799498405,2.0520571218652525757875, \ +1.4335697648463940900854,1.1699262099260641090126,5.8461821529318021006816, \ +1.4407777666134784499974,0.1555026027575977520812,1.1238122273905750692080, \ +34.780255413408944775711,1.7041254785630945978170,1.2888509559407714810675, \ +1.279907318578674679799,2.2133811686323432432744,2.4761608378120754103691, \ +1.5699569989913235712464,0.8691811730250974532552,5.1510184654857242847470, \ +8.4491460426344389134101,0.7567237762630856234836,1.1666253991164448056139, \ +0.6622345534859300775210,0.6235063787625765296951} + + +#define CnumR {0.9886911348439753055573f,0.1642041569575667381287f,0.0116174421273171901703f, \ +0.8040989059954881668091f,0.3511620354838669300079f,0.3538791732862591743469f, \ +0.0420214342884719371796f,0.2273282110691070556641f,0.9304475435055792331696f, \ +0.0305238692089915275574f,0.7304877354763448238373f,0.3167633693665266036987f, \ +0.0185489063151180744171f,0.5621606865897774696350f,0.4824476162903010845184f, \ +0.6829614602029323577881f,0.0907177985645830631256f,0.8980422308668494224548f, \ +0.3069318956695497035980f,0.1443576756864786148071f,0.4171506580896675586700f, \ +0.4542713882401585578918f,0.8413512143306434154510f,0.5767526254057884216309f, \ +0.3367923968471586704254f,0.5443433178588747978210f,0.6477606832049787044525f, \ +0.7295965161174535751343f,0.7869994868524372577667f,0.0733593190088868141174f, \ +0.1243589068762958049774f,0.4778202064335346221924f,0.1828124211169779300690f, \ +0.7146625733003020286560f,0.8759713820181787014008f,0.4779631365090608596802f, \ +0.2395875495858490467072f,0.2876457618549466133118f,0.8872682708315551280975f, \ +0.6973481327295303344727f,0.832738290075212717056f,0.5554805574938654899597f, \ +0.3424665494821965694427f,0.7850530873984098434448f,0.4883357142098248004913f, \ +0.1615189919248223304749f,0.4352665315382182598114f,0.7534295134246349334717f, \ +0.5983185083605349063873f,0.9231166979297995567322f,0.0127727664075791835785f, \ +0.9389179740101099014282f,0.9540623095817863941193f,0.2016280265524983406067f, \ +0.3971493127755820751190f,0.710910387337207794189f,0.6920584165491163730621f, \ +0.5673230392858386039734f,0.2287593870423734188080f,0.897409206256270408630f, \ +0.2454518754966557025909f,0.4779763752594590187073f,0.6745393867604434490204f, \ +0.3962334729731082916260f,0.3951889411546289920807f,0.1898779934272170066833f, \ +0.8453572890721261501312f,0.9405217487365007400513f,0.0145239126868546009064f, \ +0.6200157897546887397766f,0.7661054241470992565155f,0.4872819185256958007812f, \ +0.6006353446282446384430f,0.3781800894066691398621f,0.7422776236198842525482f, \ +0.197737870737910270691f,0.1871016328223049640656f,0.6877400139346718788147f, \ +0.4667807440273463726044f,0.4782230518758296966553f,0.7309859753586351871490f, \ +0.413841723464429378510f,0.7107305652461946010590f,0.0503708962351083755493f, \ +0.5682807085104286670685f,0.9177785338833928108215f,0.9419820639304816722870f, \ +0.5193521305918693542480f,0.0314610176719725131989f,0.9562829090282320976257f, \ +0.7151440619491040706635f,0.4089089538902044296265f,0.8228980232961475849152f, \ +0.3444903278723359107971f,0.1768282498233020305634f,0.1319360919296741485596f, \ +0.2378812418319284915924f,0.6013250267133116722107f,0.5298825851641595363617f, \ +0.8653587270528078079224f,0.8310004216618835926056f,0.2960576163604855537415f, \ +0.8003590661101043224335f,0.7980573028326034545898f,0.6196367540396749973297f, \ +0.3147845743224024772644f,0.7509658797644078731537f,0.7205892037600278854370f, \ +0.4183134590275585651398f,0.7655796119943261146545f,0.2847539256326854228973f, \ +0.4254573099315166473389f,0.3976557464338839054108f,0.7410669168457388877869f, \ +0.1827877140603959560394f,0.8866754267364740371704f,0.461710151750594377518f, \ +0.657166269607841968536f,0.5195506396703422069550f,0.6873805895447731018066f, \ +0.537373247090727090836f,0.3867600364610552787781f,0.5998346298001706600189f, \ +0.6642422433942556381226f,0.369679727125912904739f,0.9070320362225174903870f, \ +0.7608641679398715496063f,0.2374182976782321929932f,0.9166998700238764286041f, \ +0.6792282825335860252380f,0.8834046921692788600922f,0.3948080558329820632935f, \ +0.9377963733859360218048f,0.4795896010473370552063f,0.9556053685955703258514f, \ +0.7993520200252532958984f,0.8689905651845037937164f,0.9002061216160655021667f, \ +0.5333262397907674312592f,0.9881285708397626876831f,0.5791879897005856037140f, \ +0.2385436454787850379944f,0.4406997482292354106903f,0.1319975219666957855225f, \ +0.1010133684612810611725f,0.9943918874487280845642f,0.5546766347251832485199f, \ +0.3245405498892068862915f,0.9300049361772835254669f,0.6929845931008458137512f, \ +0.0173062118701636791229f,0.8690484985709190368652f,0.9859181516803801059723f, \ +0.2530415309593081474304f,0.7195010124705731868744f,0.5323055591434240341187f, \ +0.8298887838609516620636f,0.6184823596850037574768f,0.4000358129851520061493f, \ +0.2339203245937824249268f,0.2312053726054728031158f,0.8725623702630400657654f, \ +0.2035310319624841213226f,0.1399537194520235061646f,0.6774410647340118885040f, \ +0.553180103190243244171f,0.0411705034784972667694f,0.6295938044786453247070f, \ +0.9216948249377310276031f,0.3881068406626582145691f,0.5979036255739629268646f, \ +0.1036274563521146774292f,0.1606920217163860797882f,0.1688879737630486488342f, \ +0.3298818836919963359833f,0.1034589223563671112061f,0.9374943883158266544342f, \ +0.9821662446483969688416f,0.2958797491155564785004f,0.7094252500683069229126f, \ +0.3625693586654961109161f,0.5171768637374043464661f,0.1664499524049460887909f, \ +0.6871585920453071594238f,0.7469687783159315586090f,0.6681645018979907035828f, \ +0.2545631318353116512299f,0.3507453855127096176147f,0.2413669903762638568878f, \ +0.1504721576347947120667f,0.9114818568341434001923f,0.6114324070513248443604f, \ +0.5747082964517176151276f,0.3490518992766737937927f,0.1316190264187753200531f, \ +0.1806297022849321365356f,0.4862137925811111927032f,0.1181474821642041206360f, \ +0.7101306426338851451874f,0.3959603905677795410156f} + + +#define CnumI {0.9444975801743566989899f,0.7508988408371806144714f,0.7969929589889943599701f, \ +0.6391073446720838546753f,0.7475423519499599933624f,0.8376184562221169471741f, \ +0.1913140038959681987762f,0.8142067454755306243896f,0.5972843528725206851959f, \ +0.2314895978197455406189f,0.2196294791065156459808f,0.8555385116487741470337f, \ +0.2425577160902321338654f,0.8404364408925175666809f,0.5419330331496894359589f, \ +0.7332636043429374694824f,0.7841481738723814487457f,0.463916058652102947235f, \ +0.7291909097693860530853f,0.9259582068771123886108f,0.7357061435468494892120f, \ +0.3933822894468903541565f,0.9560909713618457317352f,0.8286947794258594512939f, \ +0.9342691884376108646393f,0.9951714789494872093201f,0.6527760974131524562836f, \ +0.0654199887067079544067f,0.8941438538022339344025f,0.9945600973442196846008f, \ +0.4593119579367339611053f,0.1743795126676559448242f,0.6978968777693808078766f, \ +0.6797442315146327018738f,0.3266391619108617305756f,0.6353397201746702194214f, \ +0.0182057772763073444366f,0.7444909522309899330139f,0.1077597807161509990692f, \ +0.7073562256991863250732f,0.3643188090063631534576f,0.9882115563377737998962f, \ +0.4829082465730607509613f,0.0458393190056085586548f,0.1468743053264915943146f, \ +0.5922066839411854743958f,0.5624566259793937206268f,0.5676662698388099670410f, \ +0.6548293852247297763824f,0.1908333105966448783875f,0.0113042681477963924408f, \ +0.5330905076116323471069f,0.5382480402477085590363f,0.4563436144962906837463f, \ +0.0385018284432590007782f,0.3131976760923862457275f,0.8906985954381525516510f, \ +0.4161457186564803123474f,0.0958596668206155300140f,0.8116585630923509597778f, \ +0.5250105452723801136017f,0.2212363081052899360657f,0.6292906212620437145233f, \ +0.0095289051532745361328f,0.5361407645978033542633f,0.5845551220700144767761f, \ +0.7266371562145650386810f,0.6018460672348737716675f,0.7448990945704281330109f, \ +0.6080113211646676063538f,0.0057328860275447368622f,0.1947725974023342132568f, \ +0.1162833035923540592194f,0.2169317295774817466736f,0.58644847339019179344f, \ +0.0320366565138101577759f,0.7461734232492744922638f,0.9206809522584080696106f, \ +0.4904719027690589427948f,0.7194193229079246520996f,0.5101354592479765415192f, \ +0.118203367106616497040f,0.3125731288455426692963f,0.9160387720912694931030f, \ +0.9680844773538410663605f,0.6672369921579957008362f,0.5071030999533832073212f, \ +0.4611813314259052276611f,0.6185570643283426761627f,0.9359492277726531028748f, \ +0.1334771565161645412445f,0.9054294098168611526489f,0.0963431638665497303009f, \ +0.0557444738224148750305f,0.4043928044848144054413f,0.9148363023996353149414f, \ +0.4072272875346243381500f,0.5939936218783259391785f,0.8805318637751042842865f, \ +0.5168978702276945114136f,0.7935891007073223590851f,0.3654354223981499671936f, \ +0.6554969917051494121552f,0.6570710949599742889404f,0.3246133835054934024811f, \ +0.6009997269138693809509f,0.3747325814329087734222f,0.0345895085483789443970f, \ +0.8048593667335808277130f,0.1928026052191853523254f,0.4321800353936851024628f, \ +0.6863254979252815246582f,0.0949394428171217441559f,0.2340633375570178031921f, \ +0.1884174137376248836517f,0.2874494846910238265991f,0.4380572517402470111847f, \ +0.5726932818070054054260f,0.5540334577672183513641f,0.6376359798014163970947f, \ +0.8861551419831812381744f,0.5973066156730055809021f,0.7819859883747994899750f, \ +0.3015665132552385330200f,0.4194210064597427845001f,0.9744029538705945014954f, \ +0.8126946794800460338593f,0.8724794387817382812500f,0.8529044934548437595367f, \ +0.5554718403145670890808f,0.0156182064674794673920f,0.8275166135281324386597f, \ +0.123992592561990022659f,0.1727691153064370155334f,0.6710657696239650249481f, \ +0.4436169527471065521240f,0.0544945956207811832428f,0.5425151577219367027283f, \ +0.0359929925762116909027f,0.7427068594843149185181f,0.1810864326544106006622f, \ +0.9942650021985173225403f,0.3375321957282721996307f,0.9349375292658805847168f, \ +0.7478643828071653842926f,0.2452003313228487968445f,0.5380070446990430355072f, \ +0.3287191297858953475952f,0.45475816028192639351f,0.9380933428183197975159f, \ +0.2151815737597644329071f,0.1763018555939197540283f,0.0555533752776682376862f, \ +0.1616924917325377464294f,0.4014935842715203762054f,0.4236538577824831008911f, \ +0.3992733699269592761993f,0.6722801076248288154602f,0.7260224181227385997772f, \ +0.8333860486745834350586f,0.0086704292334616184235f,0.0351518867537379264832f, \ +0.7029411061666905879974f,0.4494737815111875534058f,0.7895763670094311237335f, \ +0.4047682592645287513733f,0.5102028916589915752411f,0.8725254051387310028076f, \ +0.9648624868132174015045f,0.1623276313766837120056f,0.1022121286951005458832f, \ +0.3143476936966180801392f,0.8267589178867638111115f,0.1295115025714039802551f, \ +0.0002295556478202342987f,0.9005581513047218322754f,0.4012833260931074619293f, \ +0.5771514577791094779968f,0.6042619436047971248627f,0.1899941917508840560913f, \ +0.6185289998538792133331f,0.7475680345669388771057f,0.3701861198060214519501f, \ +0.3796691931784152984619f,0.0825623110868036746979f,0.1093314653262495994568f, \ +0.6958573660813271999359f,0.1640254277735948562622f,0.0346795511431992053986f, \ +0.0631942944601178169250f,0.8599521922878921031952f,0.7172338664531707763672f, \ +0.6037731417454779148102f,0.3179458705708384513855f,0.8572954847477376461029f, \ +0.7672908585518598556519f,0.9375572209246456623077f,0.6549387136474251747131f, \ +0.4744220296852290630341f,0.2306616865098476409912f} + + +#define CdenR {0.0319890365935862064362f,0.1597689306363463401794f,0.7430339208804070949554f, \ +0.9168703723698854446411f,0.8414530497975647449493f,0.9393842564895749092102f, \ +0.8984190779738128185272f,0.0725589841604232788086f,0.8528734245337545871735f, \ +0.6726021049544215202332f,0.8592702611349523067474f,0.0417808722704648971558f, \ +0.7025507246144115924835f,0.8849766561761498451233f,0.0027594636194407939911f, \ +0.8899881355464458465576f,0.0313250035978853702545f,0.2663000663742423057556f, \ +0.6700097895227372646332f,0.7313312981277704238892f,0.2368951407261192798615f, \ +0.884347585029900074005f,0.956500727217644453049f,0.0312716141343116760254f, \ +0.1382475518621504306793f,0.1935445470735430717468f,0.0239577977918088436127f, \ +0.1259902473539113998413f,0.1459442754276096820831f,0.5573052400723099708557f, \ +0.2774765784852206707001f,0.4273443259298801422119f,0.0320204333402216434479f, \ +0.5027936464175581932068f,0.2516311011277139186859f,0.2821198720484972000122f, \ +0.8932410669513046741486f,0.4268560605123639106750f,0.5493166255764663219452f, \ +0.9543316066265106201172f,0.4014673479832708835602f,0.9718755809590220451355f, \ +0.6770767881534993648529f,0.6993196289986371994019f,0.9348821644671261310577f, \ +0.7902984777465462684631f,0.1206651250831782817841f,0.3983929716050624847412f, \ +0.6838250816799700260162f,0.9165824344381690025330f,0.5045909709297120571136f, \ +0.7227700296789407730103f,0.3249866780824959278107f,0.4653166653588414192200f, \ +0.1793997320346534252167f,0.2955658659338951110840f,0.3577122562564909458160f, \ +0.8742639077827334403992f,0.0804375349543988704681f,0.8205763902515172958374f, \ +0.6961649288423359394073f,0.4110742891207337379456f,0.2018502498976886272430f, \ +0.6466094143688678741455f,0.6110980794765055179596f,0.1624210691079497337341f, \ +0.5295668891631066799164f,0.7361125815659761428833f,0.6149871987290680408478f, \ +0.2243082569912075996399f,0.7770173805765807628632f,0.5068481713533401489258f, \ +0.3842710950411856174469f,0.3123001037165522575378f,0.7673347159288823604584f, \ +0.5153647791594266891479f,0.3124524806626141071320f,0.5104224691167473793030f, \ +0.8057914744131267070770f,0.4510158710181713104248f,0.7878079325892031192780f, \ +0.3774860640987753868103f,0.8862207210622727870941f,0.4092752132564783096313f, \ +0.7894572285003960132599f,0.1295815678313374519348f,0.0751712801866233348846f, \ +0.9130991771817207336426f,0.8955420576967298984528f,0.1174966199323534965515f, \ +0.9175473838113248348236f,0.6510859187692403793335f,0.2972641070373356342316f, \ +0.3178046876564621925354f,0.2074826951138675212860f,0.4011814333498477935791f, \ +0.9125325218774378299713f,0.0563758080825209617615f,0.9681987068615853786469f, \ +0.1086824852973222732544f,0.1929707420058548450470f,0.6830592053011059761047f, \ +0.9845975148491561412811f,0.587286412715911865234f,0.7180327125824987888336f, \ +0.4162877826020121574402f,0.7323389663361012935638f,0.8119378071278333663940f, \ +0.1699784700758755207062f,0.0763544896617531776428f,0.0471521834842860698700f, \ +0.2722220681607723236084f,0.7834591032005846500397f,0.9261105647310614585876f, \ +0.3781314617954194545746f,0.3550558332353830337524f,0.8634610888548195362091f, \ +0.3378356518223881721497f,0.9687665435485541820526f,0.2254242822527885437012f, \ +0.4653600030578672885895f,0.5050297928974032402039f,0.8094572662375867366791f, \ +0.1739153172820806503296f,0.8308336068876087665558f,0.9178772950544953346252f, \ +0.7052625860087573528290f,0.8998006172478199005127f,0.6733843074180185794830f, \ +0.8211324727162718772888f,0.3026339760981500148773f,0.6984135676175355911255f, \ +0.9072209936566650867462f,0.3731772648170590400696f,0.4188832002691924571991f, \ +0.0215740650892257690430f,0.9132502474822103977203f,0.7250007269904017448425f, \ +0.5181344612501561641693f,0.3798101972788572311401f,0.9359269295819103717804f, \ +0.7378503987565636634827f,0.6775109241716563701630f,0.0551267974078655242920f, \ +0.7047141403891146183014f,0.5583055457100272178650f,0.8873056150041520595551f, \ +0.5930708739906549453735f,0.8739025560207664966583f,0.7695222767069935798645f, \ +0.0288866939954459667206f,0.5428439155220985412598f,0.374539139214903116226f, \ +0.3374005360528826713562f,0.3740871041081845760345f,0.4142110701650381088257f, \ +0.2722152252681553363800f,0.0704229706898331642151f,0.9498285944573581218719f, \ +0.3199572004377841949463f,0.2244639829732477664948f,0.8119156723842024803162f, \ +0.6117301187478005886078f,0.2726398129016160964966f,0.1315172505564987659454f, \ +0.0834807949140667915344f,0.1704506087116897106171f,0.6043888628482818603516f, \ +0.0741717466153204441071f,0.3983510462567210197449f,0.4145161225460469722748f, \ +0.4785034339874982833862f,0.1325146560557186603546f,0.9634160557761788368225f, \ +0.3733813683502376079559f,0.9615952931344509124756f,0.1792585910297930240631f, \ +0.9886706164106726646423f,0.6644756025634706020355f,0.6250293198972940444946f, \ +0.2414359268732368946075f,0.3228348018601536750793f,0.2679829034022986888885f, \ +0.1444108113646507263184f,0.5242025130428373813629f,0.6338959587737917900085f, \ +0.5731068192981183528900f,0.8658696617931127548218f,0.6905007590539753437042f, \ +0.8533225739374756813049f,0.0395693923346698284149f,0.8078914172947406768799f, \ +0.4903320954181253910065f,0.1027000164613127708435f,0.3180945566855370998383f, \ +0.0674452055245637893677f,0.3333888095803558826447f,0.8215381549671292304993f, \ +0.1736259120516479015350f,0.0991585403680801391602f} + + +#define CdenI {0.8987952568568289279938f,0.315000849775969982147f,0.0550288720987737178802f, \ +0.8362890016287565231323f,0.3757084463723003864288f,0.4403073200955986976624f, \ +0.6550271878950297832489f,0.1222427897155284881592f,0.4285280019976198673248f, \ +0.6505553862079977989197f,0.304123846348375082016f,0.4213901553303003311157f, \ +0.4804654982872307300568f,0.1147165866568684577942f,0.5422563436441123485565f, \ +0.2779277041554450988770f,0.4092231714166700839996f,0.1325531704351305961609f, \ +0.7119363336823880672455f,0.4915375765413045883179f,0.2485320051200687885284f, \ +0.5632069641724228858948f,0.9166236515156924724579f,0.4785935021936893463135f, \ +0.9892991916276514530182f,0.4862101143226027488708f,0.1880847117863595485687f, \ +0.7876637298613786697388f,0.0741149676032364368439f,0.8136677043512463569641f, \ +0.2064852821640670299530f,0.2380608320236206054688f,0.6788688250817358493805f, \ +0.0723622469231486320496f,0.4169676317833364009857f,0.6501883845776319503784f, \ +0.3752250974066555500031f,0.0745300510898232460022f,0.8864620546810328960419f, \ +0.6364345215260982513428f,0.2677079201675951480865f,0.6960594644770026206970f, \ +0.7444827682338654994965f,0.4213623646646738052368f,0.1991455671377480030060f, \ +0.4808609904721379280090f,0.5516581865958869457245f,0.1599473282694816589355f, \ +0.1182241612114012241364f,0.2901592804118990898132f,0.4397455691359937191010f, \ +0.7226112987846136093140f,0.202900760341435670853f,0.7154570007696747779846f, \ +0.3668800438754260540009f,0.4158036895096302032471f,0.8334258184768259525299f, \ +0.4739205753430724143982f,0.3318080059252679347992f,0.6068793702870607376099f, \ +0.0087250215001404285431f,0.5049378024414181709290f,0.8908548909239470958710f, \ +0.7220234721899032592773f,0.2998904981650412082672f,0.986597347073256969452f, \ +0.8213773234747350215912f,0.5859730672091245651245f,0.9345314060337841510773f, \ +0.9908401081338524818420f,0.2754496405832469463348f,0.5722857229411602020264f, \ +0.1057338924147188663483f,0.9960324605926871299744f,0.2675347900949418544769f, \ +0.5329049322754144668579f,0.0993804302997887134552f,0.9757113726809620857239f, \ +0.8398896041326224803925f,0.9757724180817604064941f,0.3335785293020308017731f, \ +0.2822513980790972709656f,0.7494544475339353084564f,0.4592373128980398178101f, \ +0.9039488215930759906769f,0.0442035431042313575745f,0.0199772412888705730438f, \ +0.6720122136175632476807f,0.7285225228406488895416f,0.2960560088977217674255f, \ +0.2031218609772622585297f,0.1674261111766099929810f,0.8859982681460678577423f, \ +0.5591668086126446723938f,0.6923109102062880992889f,0.2207241952419281005859f, \ +0.241108322981745004654f,0.0926182596012949943542f,0.9330528690479695796967f, \ +0.7781645338982343673706f,0.9508441691286861896515f,0.5327433506026864051819f, \ +0.8735036174766719341278f,0.9666616283357143402100f,0.9452914656139910221100f, \ +0.1400739839300513267517f,0.4990123338066041469574f,0.1327268425375223159790f, \ +0.9768243846483528614044f,0.3724610926583409309387f,0.7944017681293189525604f, \ +0.8794557079672813415527f,0.3314093225635588169098f,0.0031166328117251396179f, \ +0.9777328907512128353119f,0.0703121032565832138062f,0.7957679857499897480011f, \ +0.5023274505510926246643f,0.3493039156310260295868f,0.2684593088924884796143f, \ +0.9741498515941202640533f,0.9015910243615508079529f,0.5996336988173425197601f, \ +0.5803879369050264358521f,0.5484640044160187244415f,0.8589230822399258613586f, \ +0.9201795118860900402069f,0.3725907355546951293945f,0.5755203464068472385406f, \ +0.1440870938822627067566f,0.7605391903780400753021f,0.8300342690199613571167f, \ +0.4151301835663616657257f,0.2624956378713250160217f,0.5758876572363078594208f, \ +0.8251774720847606658936f,0.3828161866404116153717f,0.4365336438640952110291f, \ +0.4083978212438523769379f,0.0662870798259973526001f,0.7208817270584404468536f, \ +0.6630535097792744636536f,0.6463958504609763622284f,0.993799932301044464111f, \ +0.9815895878709852695465f,0.0657920939847826957703f,0.8050008206628262996674f, \ +0.3934821542352437973022f,0.4162000496871769428253f,0.2614595824852585792542f, \ +0.6719987387768924236298f,0.1951352097094058990479f,0.4636183516122400760651f, \ +0.9582502311095595359802f,0.6627009413205087184906f,0.4255988318473100662231f, \ +0.9324015271849930286407f,0.5055249826982617378235f,0.7275368678383529186249f, \ +0.7848008275032043457031f,0.9698746153153479099274f,0.6134159592911601066589f, \ +0.6561312093399465084076f,0.8136037569493055343628f,0.4121062462218105792999f, \ +0.9611028293147683143616f,0.1216154317371547222137f,0.1221984885632991790771f, \ +0.6084936023689806461334f,0.9125110497698187828064f,0.3089236742816865444183f, \ +0.6477946285158395767212f,0.3147067544050514698029f,0.0581819834187626838684f, \ +0.4708230230025947093964f,0.4103578254580497741699f,0.7477423720993101596832f, \ +0.8020648909732699394226f,0.2554281591437757015228f,0.7351439502090215682983f, \ +0.3968368102796375751495f,0.7119807982817292213440f,0.1489503826014697551727f, \ +0.4107801504433155059814f,0.6839885697700083255768f,0.8525082385167479515076f, \ +0.8774310103617608547211f,0.7516427803784608840942f,0.0678401333279907703400f, \ +0.819040869362652301788f,0.1112091499380767345428f,0.0332822054624557495117f, \ +0.6846691765822470188141f,0.6917669652029871940613f,0.3158738478086888790131f, \ +0.2696444820612668991089f,0.1202391539700329303741f,0.6283207843080163002014f, \ +0.0934506128542125225067f,0.8008399121463298797607f} + + +#define CresR {0.4709798307531771199841f,0.4447581675093783548647f,0.0826177744953439652242f, \ +1.205396046252330988224f,0.8449132450069640754009f,0.8480990000672121720271f, \ +4.2502508379938888083416f,0.1623619707288032898429f,0.8585056587355431867437f, \ +3.1388466849496672317343f,1.1935750070427169067244f,0.4490650157900041850034f, \ +2.1895212424748247137529f,0.5809227845299023140768f,0.56073613731694649243f, \ +0.8082982497300479352020f,0.51953770817366529133f,0.2942574640122151419241f, \ +1.15793914287644739147f,0.6384564385907467443104f,0.3937873213744618183796f, \ +1.726027502041532768473f,1.036465781498592919618f,0.4067614434439539849997f, \ +0.9843295698061713672189f,0.4579374729893078699305f,0.1635265468643208597310f, \ +0.2673377630487006051396f,0.1276569435289993670324f,0.8547995406383729344313f, \ +0.5712421096762160255267f,0.9496998303500763238816f,0.9215219933031827403980f, \ +0.4199401716102647008633f,0.4080227083004296928515f,0.8668387814340499097909f, \ +3.8251647868179174949432f,0.2798561459758153735500f,0.7296876114375909772036f, \ +1.1307863949434504569069f,0.5227040207487291256783f,0.9553281397768573768303f, \ +1.6873623484630664304262f,0.9189993233013992179892f,1.8680916744683291330631f, \ +1.0945340632725206742037f,0.7172695872712858689013f,0.4393272001105434365620f, \ +0.6184165841783031414280f,1.0145435197072958377618f,39.23975822857007500488f, \ +0.9125771040829241398384f,0.34940616662082130128f,1.6886679318634245650088f, \ +0.5362354768077970401663f,0.5639723020956257659719f,0.7780379364916976125954f, \ +1.4003319167235890319034f,0.8161232260004956939881f,0.8393853039143751582074f, \ +0.5223720004390856042065f,1.110983008842490127321f,0.818747739732451629280f, \ +1.6747433378619311916680f,0.9068157856691638762925f,1.60833170305877803941f, \ +0.8405688656523967461354f,0.8381421282255379079373f,1.2701889799735286423754f, \ +0.9833168993944022551190f,1.0168770046728485834109f,1.3016322293958613176557f, \ +0.6495107529989713190943f,1.7580887380148670917634f,0.811791795379815717126f, \ +2.965105145965179822554f,0.2240951065290753552173f,0.9460239544777007125731f, \ +1.718999756730102967950f,1.2296973389194514325595f,0.9389212198179804902409f, \ +1.0234593559016138542006f,1.4334211779050687329828f,0.5243120860846904873753f, \ +1.0504722453285446626126f,0.1152767460270415350587f,0.0707222953082139449421f, \ +1.6254463990050433963575f,1.2481859371318786422478f,0.2175136535151512284791f, \ +1.2910615615872327310854f,0.4233268477489937620106f,0.4807068388081991994198f, \ +1.1549507985792513142798f,1.6255209179331293611881f,0.2983110082899964599079f, \ +1.4173997951417944829444f,0.1244573410110787203831f,1.2637054783806833668791f, \ +0.4884514729189023962697f,0.6929538011049971579780f,1.7943962247548823629728f, \ +1.2713004857643259715161f,1.032953859535653995394f,1.536353015508226782515f, \ +0.4675865183692056170628f,1.0462587829225313829085f,1.1330002369245864013436f, \ +1.041962113643855936118f,0.2090005572387043097926f,1.3318357299932417348032f, \ +1.1032964509750491366447f,2.0521925485676613121200f,1.1375468051162005434f, \ +3.6762531852618991479176f,0.38561527164112474608f,1.8447673546930116739162f, \ +0.6707863887229996713302f,1.2079499357804526216142f,0.3709954307004496576461f, \ +1.0365712069816981344417f,1.4492727922264592166357f,0.9826439254861862870882f, \ +0.5459775284828356500810f,1.7185510325107367091135f,0.9420557659158521612852f, \ +1.0363462766733533282348f,0.6588978871971996609247f,0.7068286721825971508082f, \ +0.8283838180602889345039f,0.3576856814045822896553f,1.1450642560827664073742f, \ +1.0082980823395675251675f,0.8632613198241941843136f,0.5769998142575105681829f, \ +0.4586342340414231721901f,1.0743331202123964640549f,0.8051789964613165206941f, \ +1.0185550907048162017077f,0.2778337479551458155669f,1.8265245559079639203759f, \ +0.7989360256028138485007f,1.677001282149952920975f,1.0503469849633222388263f, \ +1.4140028143314165021138f,0.5446523200971284950356f,1.5495499943879871285191f, \ +1.5081843822248834907640f,0.9349545726381919275028f,0.5723524546761384890203f, \ +3.1135949451595807957460f,0.6437016396093410142143f,0.4050990487720780852676f, \ +2.6650358323492571166469f,0.7883973138104276578986f,0.8659591728844833191658f, \ +0.7053024953584487999336f,0.4594589542097845535906f,1.321677134779998041836f, \ +0.9728202285898922552221f,1.1265695509413868879989f,0.9572634127807582160585f, \ +1.0936914939126565204930f,1.8223172561248370815434f,0.3829461524867902033620f, \ +0.9262699522472612745361f,0.2636089879247657252748f,0.4207872701626157452282f, \ +0.3681456734997125557207f,1.7105511789891454377255f,0.7594157400395155077533f, \ +2.311379502472121316714f,0.3968136705033024624889f,3.7584600137181558565658f, \ +1.1328564511602001729784f,0.5708065143880640679441f,0.4501390996974691804944f, \ +1.1049485918178350019048f,0.7752771634215889218211f,1.0810236263550128121835f, \ +0.6478013413788724639275f,0.8461714840132198434119f,0.6054575539721791521686f, \ +0.4140498893464432672573f,0.7932920209693627988656f,1.1273035377738909179612f, \ +1.3778348488206868527328f,2.8479811305391047326907f,2.8424954426663924245133f, \ +6.763933435362530666168f,0.0838692695945179311767f,0.5829756521091847831784f, \ +1.0005053747332974811712f,1.1474263302846201550977f,0.4156230215198345456784f, \ +0.3525774504986416424401f,0.2463914637535300489191f,1.148273196579604027434f, \ +0.2298339614166822753027f,1.0666533246089620057262f} + + +#define CresI {0.4591483936701460932817f,-0.1155119517747187490864f,-0.9310924334988598394247f, \ +0.0819694377628846782002f,-0.7287233873139877804448f,-0.763187199054947806864f, \ +-3.762492170029271498777f,-0.0437843680454512648725f,-0.0905413694792896739383f, \ +-2.4916556281940294148569f,0.0574678906137320935632f,0.1174306870209648884229f, \ +-2.7289896643260878050796f,-0.6644222901331670039227f,0.4940949025393515658955f, \ +-0.4608868906485130145789f,0.0201573045574557213611f,-0.0044069113482103575846f, \ +-0.4314389127933472845022f,-0.6902743621457737566161f,-0.0987167242035817960044f, \ +-0.2548733845587528579202f,-0.0883482700619244720741f,0.2453606820435244861844f, \ +0.2068645371508029129348f,0.0560010586358397413620f,0.1255687367414367316965f, \ +1.0556170148952166432110f,-0.0508624268720807917732f,-0.4973030078350189620018f, \ +-0.4494495094173277527361f,0.1516315916553793996524f,0.1955091614740893934954f, \ +-0.2981682129038163431289f,0.3238592517142263038643f,0.20807310888270824645f, \ +1.2754627683321149156370f,-0.4652261053750170738397f,0.9104699268960899649628f, \ +-0.2343654011567836148444f,0.0927986797131679780337f,-0.4464725902632422083194f, \ +-0.2054461228467904798656f,0.4830705943398990731552f,-0.1540520130863628767148f, \ +-1.0359735137341328226057f,0.3405388282389278931106f,-0.1187156901372778405879f, \ +-0.4792316908339305792097f,0.1045919568114299369466f,-0.2999491114304728145434f, \ +0.2514864063426180407212f,0.0155478062159446952378f,-0.2735523819973274539663f, \ +0.8717980527838158355536f,0.3364261929110925475328f,0.2029142596752248339786f, \ +-0.1918158596845628005578f,1.1084778145052667230885f,-0.0829219255275467775901f, \ +-1.081783493192439049579f,0.5421774728023454059667f,0.5568609105760318200851f, \ +1.781941834619454212429f,-0.4713958087204941915793f,0.2445718496622908411098f, \ +0.2491121281579287416452f,0.0866971164274075029033f,-0.8008320713990698669349f, \ +0.6338101504882612813319f,0.3519358982630789167700f,0.6541663473243117810085f, \ +0.0502911402190908199406f,1.6252765471306449551747f,-0.2809451105359275779882f, \ +2.2146130913244452820265f,-0.3625483190563351110214f,0.1522743119365968789136f, \ +-0.0069229021370069455943f,0.1905060635979277938734f,-0.1989073433264569867873f, \ +0.3897022628957311773945f,0.4240784338552809340506f,-0.4179573564331034440933f, \ +-0.1988402057439373205039f,-0.0356440742214715750036f,-0.0168647095375222925984f, \ +-0.1494425771365865129869f,-1.3843069738448403604991f,0.0967017939849821872578f, \ +0.0430607432652793456485f,-0.5279083881307125025728f,1.0204003735962423604633f, \ +1.4362803365510681263828f,0.1977169795522846496016f,-0.3955062165628914772064f, \ +-1.4128711804163340826079f,0.0310836769042206473301f,-0.3390941241024513219671f, \ +0.6074764041812149573119f,0.4824589432533142319137f,-0.4154346483371720855082f, \ +0.0501899399979248012071f,0.3607980326544134586086f,0.7206975894822468253764f, \ +-0.4477518830833556728876f,0.1424100376820599533900f,0.1298061651063174004594f, \ +0.3303537448252925612380f,0.4338741987461899873857f,0.7684141832850970299518f, \ +0.2873031419117236806571f,0.3434511048158676582709f,-0.3550844910755488470500f, \ +1.5595291773563670911784f,-0.0457132414448809254459f,-0.0267391386135805188273f, \ +0.1798214510802064736161f,-0.6158028489814036943173f,0.0464070042435799218206f, \ +0.1034419684949273582353f,0.0929020432890966946227f,-0.2813776899321288604838f, \ +0.6258852119978557393409f,-0.4661667563754944287879f,-0.0650680862663896020237f, \ +0.102444575548549118849f,-0.8520157260825024225781f,-0.0298211062249834936433f, \ +-0.4653174759501645385562f,0.8545944890801387971990f,-0.2976773769162330829374f, \ +0.3093514738325885415904f,0.2363494602874922356772f,0.1974484855458788490346f, \ +0.7777794203036600961809f,0.3731580648675694722449f,-0.0003201115706582268751f, \ +0.6970160995106667867205f,-0.1417446622937881539617f,0.6735687169118647066313f, \ +-0.5504259784814062861358f,0.1823325876192195271752f,0.0893283232282492400955f, \ +-0.7513139628213129084244f,-0.0681389663512164817094f,-0.0516841536789755529036f, \ +-0.315174493545774980774f,-0.0096538968382749029695f,-0.3974986568742733816784f, \ +0.1161709126231448979683f,0.0939526577995318662451f,0.4474141503322081603322f, \ +2.0839818065490263165884f,0.481117429953414110777f,0.1103349130284882323449f, \ +0.7841930577945639413429f,0.3179393307402755275426f,-0.5800239728555655061015f, \ +-0.1108667189012625814426f,4.1526144610214457131292f,0.6644411493894925024861f, \ +-0.5535740575269347818477f,-0.0391563103551154784165f,0.1619934487203539552613f, \ +1.0596515488428814855126f,-0.3128122097434946624617f,-0.3890589346180040597467f, \ +0.2748020770797242051664f,1.635738569956616927925f,0.3868552807413435101758f, \ +-0.7602443417718864893118f,-0.0831558796771991737273f,-2.537669265389609574157f, \ +1.426458962036896371828f,-1.0022009849938886549836f,0.6049199483603766580586f, \ +0.1673262559470924115690f,-0.7200301037654435187818f,0.7467393358286636972920f, \ +-0.0106106746626293529240f,0.153545238852170945476f,-0.451676909031678563977f, \ +0.3690242193796505754122f,0.8280032112539841282484f,1.091435550366606888062f, \ +-0.3195494879686350264691f,0.8111338563578870397563f,-0.1273427352363078746134f, \ +2.602467288932953426439f,0.0428813666356926206924f,-0.6294198199336996646380f, \ +0.1402292321928536034115f,0.9366730345322898942939f,-0.3072343945837653356179f, \ +-0.0048993749459086879255f,-0.2278153021086992413569f,-1.0472316778083061716842f, \ +-0.0219504421804297446263f,1.4011599912181635918529f} + + +#define ZnumR {0.9886911348439753055573,0.1642041569575667381287,0.0116174421273171901703, \ +0.8040989059954881668091,0.3511620354838669300079,0.3538791732862591743469, \ +0.0420214342884719371796,0.2273282110691070556641,0.9304475435055792331696, \ +0.0305238692089915275574,0.7304877354763448238373,0.3167633693665266036987, \ +0.0185489063151180744171,0.5621606865897774696350,0.4824476162903010845184, \ +0.6829614602029323577881,0.0907177985645830631256,0.8980422308668494224548, \ +0.3069318956695497035980,0.1443576756864786148071,0.4171506580896675586700, \ +0.4542713882401585578918,0.8413512143306434154510,0.5767526254057884216309, \ +0.3367923968471586704254,0.5443433178588747978210,0.6477606832049787044525, \ +0.7295965161174535751343,0.7869994868524372577667,0.0733593190088868141174, \ +0.1243589068762958049774,0.4778202064335346221924,0.1828124211169779300690, \ +0.7146625733003020286560,0.8759713820181787014008,0.4779631365090608596802, \ +0.2395875495858490467072,0.2876457618549466133118,0.8872682708315551280975, \ +0.6973481327295303344727,0.832738290075212717056,0.5554805574938654899597, \ +0.3424665494821965694427,0.7850530873984098434448,0.4883357142098248004913, \ +0.1615189919248223304749,0.4352665315382182598114,0.7534295134246349334717, \ +0.5983185083605349063873,0.9231166979297995567322,0.0127727664075791835785, \ +0.9389179740101099014282,0.9540623095817863941193,0.2016280265524983406067, \ +0.3971493127755820751190,0.710910387337207794189,0.6920584165491163730621, \ +0.5673230392858386039734,0.2287593870423734188080,0.897409206256270408630, \ +0.2454518754966557025909,0.4779763752594590187073,0.6745393867604434490204, \ +0.3962334729731082916260,0.3951889411546289920807,0.1898779934272170066833, \ +0.8453572890721261501312,0.9405217487365007400513,0.0145239126868546009064, \ +0.6200157897546887397766,0.7661054241470992565155,0.4872819185256958007812, \ +0.6006353446282446384430,0.3781800894066691398621,0.7422776236198842525482, \ +0.197737870737910270691,0.1871016328223049640656,0.6877400139346718788147, \ +0.4667807440273463726044,0.4782230518758296966553,0.7309859753586351871490, \ +0.413841723464429378510,0.7107305652461946010590,0.0503708962351083755493, \ +0.5682807085104286670685,0.9177785338833928108215,0.9419820639304816722870, \ +0.5193521305918693542480,0.0314610176719725131989,0.9562829090282320976257, \ +0.7151440619491040706635,0.4089089538902044296265,0.8228980232961475849152, \ +0.3444903278723359107971,0.1768282498233020305634,0.1319360919296741485596, \ +0.2378812418319284915924,0.6013250267133116722107,0.5298825851641595363617, \ +0.8653587270528078079224,0.8310004216618835926056,0.2960576163604855537415, \ +0.8003590661101043224335,0.7980573028326034545898,0.6196367540396749973297, \ +0.3147845743224024772644,0.7509658797644078731537,0.7205892037600278854370, \ +0.4183134590275585651398,0.7655796119943261146545,0.2847539256326854228973, \ +0.4254573099315166473389,0.3976557464338839054108,0.7410669168457388877869, \ +0.1827877140603959560394,0.8866754267364740371704,0.461710151750594377518, \ +0.657166269607841968536,0.5195506396703422069550,0.6873805895447731018066, \ +0.537373247090727090836,0.3867600364610552787781,0.5998346298001706600189, \ +0.6642422433942556381226,0.369679727125912904739,0.9070320362225174903870, \ +0.7608641679398715496063,0.2374182976782321929932,0.9166998700238764286041, \ +0.6792282825335860252380,0.8834046921692788600922,0.3948080558329820632935, \ +0.9377963733859360218048,0.4795896010473370552063,0.9556053685955703258514, \ +0.7993520200252532958984,0.8689905651845037937164,0.9002061216160655021667, \ +0.5333262397907674312592,0.9881285708397626876831,0.5791879897005856037140, \ +0.2385436454787850379944,0.4406997482292354106903,0.1319975219666957855225, \ +0.1010133684612810611725,0.9943918874487280845642,0.5546766347251832485199, \ +0.3245405498892068862915,0.9300049361772835254669,0.6929845931008458137512, \ +0.0173062118701636791229,0.8690484985709190368652,0.9859181516803801059723, \ +0.2530415309593081474304,0.7195010124705731868744,0.5323055591434240341187, \ +0.8298887838609516620636,0.6184823596850037574768,0.4000358129851520061493, \ +0.2339203245937824249268,0.2312053726054728031158,0.8725623702630400657654, \ +0.2035310319624841213226,0.1399537194520235061646,0.6774410647340118885040, \ +0.553180103190243244171,0.0411705034784972667694,0.6295938044786453247070, \ +0.9216948249377310276031,0.3881068406626582145691,0.5979036255739629268646, \ +0.1036274563521146774292,0.1606920217163860797882,0.1688879737630486488342, \ +0.3298818836919963359833,0.1034589223563671112061,0.9374943883158266544342, \ +0.9821662446483969688416,0.2958797491155564785004,0.7094252500683069229126, \ +0.3625693586654961109161,0.5171768637374043464661,0.1664499524049460887909, \ +0.6871585920453071594238,0.7469687783159315586090,0.6681645018979907035828, \ +0.2545631318353116512299,0.3507453855127096176147,0.2413669903762638568878, \ +0.1504721576347947120667,0.9114818568341434001923,0.6114324070513248443604, \ +0.5747082964517176151276,0.3490518992766737937927,0.1316190264187753200531, \ +0.1806297022849321365356,0.4862137925811111927032,0.1181474821642041206360, \ +0.7101306426338851451874,0.3959603905677795410156} + + +#define ZnumI {0.9444975801743566989899,0.7508988408371806144714,0.7969929589889943599701, \ +0.6391073446720838546753,0.7475423519499599933624,0.8376184562221169471741, \ +0.1913140038959681987762,0.8142067454755306243896,0.5972843528725206851959, \ +0.2314895978197455406189,0.2196294791065156459808,0.8555385116487741470337, \ +0.2425577160902321338654,0.8404364408925175666809,0.5419330331496894359589, \ +0.7332636043429374694824,0.7841481738723814487457,0.463916058652102947235, \ +0.7291909097693860530853,0.9259582068771123886108,0.7357061435468494892120, \ +0.3933822894468903541565,0.9560909713618457317352,0.8286947794258594512939, \ +0.9342691884376108646393,0.9951714789494872093201,0.6527760974131524562836, \ +0.0654199887067079544067,0.8941438538022339344025,0.9945600973442196846008, \ +0.4593119579367339611053,0.1743795126676559448242,0.6978968777693808078766, \ +0.6797442315146327018738,0.3266391619108617305756,0.6353397201746702194214, \ +0.0182057772763073444366,0.7444909522309899330139,0.1077597807161509990692, \ +0.7073562256991863250732,0.3643188090063631534576,0.9882115563377737998962, \ +0.4829082465730607509613,0.0458393190056085586548,0.1468743053264915943146, \ +0.5922066839411854743958,0.5624566259793937206268,0.5676662698388099670410, \ +0.6548293852247297763824,0.1908333105966448783875,0.0113042681477963924408, \ +0.5330905076116323471069,0.5382480402477085590363,0.4563436144962906837463, \ +0.0385018284432590007782,0.3131976760923862457275,0.8906985954381525516510, \ +0.4161457186564803123474,0.0958596668206155300140,0.8116585630923509597778, \ +0.5250105452723801136017,0.2212363081052899360657,0.6292906212620437145233, \ +0.0095289051532745361328,0.5361407645978033542633,0.5845551220700144767761, \ +0.7266371562145650386810,0.6018460672348737716675,0.7448990945704281330109, \ +0.6080113211646676063538,0.0057328860275447368622,0.1947725974023342132568, \ +0.1162833035923540592194,0.2169317295774817466736,0.58644847339019179344, \ +0.0320366565138101577759,0.7461734232492744922638,0.9206809522584080696106, \ +0.4904719027690589427948,0.7194193229079246520996,0.5101354592479765415192, \ +0.118203367106616497040,0.3125731288455426692963,0.9160387720912694931030, \ +0.9680844773538410663605,0.6672369921579957008362,0.5071030999533832073212, \ +0.4611813314259052276611,0.6185570643283426761627,0.9359492277726531028748, \ +0.1334771565161645412445,0.9054294098168611526489,0.0963431638665497303009, \ +0.0557444738224148750305,0.4043928044848144054413,0.9148363023996353149414, \ +0.4072272875346243381500,0.5939936218783259391785,0.8805318637751042842865, \ +0.5168978702276945114136,0.7935891007073223590851,0.3654354223981499671936, \ +0.6554969917051494121552,0.6570710949599742889404,0.3246133835054934024811, \ +0.6009997269138693809509,0.3747325814329087734222,0.0345895085483789443970, \ +0.8048593667335808277130,0.1928026052191853523254,0.4321800353936851024628, \ +0.6863254979252815246582,0.0949394428171217441559,0.2340633375570178031921, \ +0.1884174137376248836517,0.2874494846910238265991,0.4380572517402470111847, \ +0.5726932818070054054260,0.5540334577672183513641,0.6376359798014163970947, \ +0.8861551419831812381744,0.5973066156730055809021,0.7819859883747994899750, \ +0.3015665132552385330200,0.4194210064597427845001,0.9744029538705945014954, \ +0.8126946794800460338593,0.8724794387817382812500,0.8529044934548437595367, \ +0.5554718403145670890808,0.0156182064674794673920,0.8275166135281324386597, \ +0.123992592561990022659,0.1727691153064370155334,0.6710657696239650249481, \ +0.4436169527471065521240,0.0544945956207811832428,0.5425151577219367027283, \ +0.0359929925762116909027,0.7427068594843149185181,0.1810864326544106006622, \ +0.9942650021985173225403,0.3375321957282721996307,0.9349375292658805847168, \ +0.7478643828071653842926,0.2452003313228487968445,0.5380070446990430355072, \ +0.3287191297858953475952,0.45475816028192639351,0.9380933428183197975159, \ +0.2151815737597644329071,0.1763018555939197540283,0.0555533752776682376862, \ +0.1616924917325377464294,0.4014935842715203762054,0.4236538577824831008911, \ +0.3992733699269592761993,0.6722801076248288154602,0.7260224181227385997772, \ +0.8333860486745834350586,0.0086704292334616184235,0.0351518867537379264832, \ +0.7029411061666905879974,0.4494737815111875534058,0.7895763670094311237335, \ +0.4047682592645287513733,0.5102028916589915752411,0.8725254051387310028076, \ +0.9648624868132174015045,0.1623276313766837120056,0.1022121286951005458832, \ +0.3143476936966180801392,0.8267589178867638111115,0.1295115025714039802551, \ +0.0002295556478202342987,0.9005581513047218322754,0.4012833260931074619293, \ +0.5771514577791094779968,0.6042619436047971248627,0.1899941917508840560913, \ +0.6185289998538792133331,0.7475680345669388771057,0.3701861198060214519501, \ +0.3796691931784152984619,0.0825623110868036746979,0.1093314653262495994568, \ +0.6958573660813271999359,0.1640254277735948562622,0.0346795511431992053986, \ +0.0631942944601178169250,0.8599521922878921031952,0.7172338664531707763672, \ +0.6037731417454779148102,0.3179458705708384513855,0.8572954847477376461029, \ +0.7672908585518598556519,0.9375572209246456623077,0.6549387136474251747131, \ +0.4744220296852290630341,0.2306616865098476409912} + + +#define ZdenR {0.0319890365935862064362,0.1597689306363463401794,0.7430339208804070949554, \ +0.9168703723698854446411,0.8414530497975647449493,0.9393842564895749092102, \ +0.8984190779738128185272,0.0725589841604232788086,0.8528734245337545871735, \ +0.6726021049544215202332,0.8592702611349523067474,0.0417808722704648971558, \ +0.7025507246144115924835,0.8849766561761498451233,0.0027594636194407939911, \ +0.8899881355464458465576,0.0313250035978853702545,0.2663000663742423057556, \ +0.6700097895227372646332,0.7313312981277704238892,0.2368951407261192798615, \ +0.884347585029900074005,0.956500727217644453049,0.0312716141343116760254, \ +0.1382475518621504306793,0.1935445470735430717468,0.0239577977918088436127, \ +0.1259902473539113998413,0.1459442754276096820831,0.5573052400723099708557, \ +0.2774765784852206707001,0.4273443259298801422119,0.0320204333402216434479, \ +0.5027936464175581932068,0.2516311011277139186859,0.2821198720484972000122, \ +0.8932410669513046741486,0.4268560605123639106750,0.5493166255764663219452, \ +0.9543316066265106201172,0.4014673479832708835602,0.9718755809590220451355, \ +0.6770767881534993648529,0.6993196289986371994019,0.9348821644671261310577, \ +0.7902984777465462684631,0.1206651250831782817841,0.3983929716050624847412, \ +0.6838250816799700260162,0.9165824344381690025330,0.5045909709297120571136, \ +0.7227700296789407730103,0.3249866780824959278107,0.4653166653588414192200, \ +0.1793997320346534252167,0.2955658659338951110840,0.3577122562564909458160, \ +0.8742639077827334403992,0.0804375349543988704681,0.8205763902515172958374, \ +0.6961649288423359394073,0.4110742891207337379456,0.2018502498976886272430, \ +0.6466094143688678741455,0.6110980794765055179596,0.1624210691079497337341, \ +0.5295668891631066799164,0.7361125815659761428833,0.6149871987290680408478, \ +0.2243082569912075996399,0.7770173805765807628632,0.5068481713533401489258, \ +0.3842710950411856174469,0.3123001037165522575378,0.7673347159288823604584, \ +0.5153647791594266891479,0.3124524806626141071320,0.5104224691167473793030, \ +0.8057914744131267070770,0.4510158710181713104248,0.7878079325892031192780, \ +0.3774860640987753868103,0.8862207210622727870941,0.4092752132564783096313, \ +0.7894572285003960132599,0.1295815678313374519348,0.0751712801866233348846, \ +0.9130991771817207336426,0.8955420576967298984528,0.1174966199323534965515, \ +0.9175473838113248348236,0.6510859187692403793335,0.2972641070373356342316, \ +0.3178046876564621925354,0.2074826951138675212860,0.4011814333498477935791, \ +0.9125325218774378299713,0.0563758080825209617615,0.9681987068615853786469, \ +0.1086824852973222732544,0.1929707420058548450470,0.6830592053011059761047, \ +0.9845975148491561412811,0.587286412715911865234,0.7180327125824987888336, \ +0.4162877826020121574402,0.7323389663361012935638,0.8119378071278333663940, \ +0.1699784700758755207062,0.0763544896617531776428,0.0471521834842860698700, \ +0.2722220681607723236084,0.7834591032005846500397,0.9261105647310614585876, \ +0.3781314617954194545746,0.3550558332353830337524,0.8634610888548195362091, \ +0.3378356518223881721497,0.9687665435485541820526,0.2254242822527885437012, \ +0.4653600030578672885895,0.5050297928974032402039,0.8094572662375867366791, \ +0.1739153172820806503296,0.8308336068876087665558,0.9178772950544953346252, \ +0.7052625860087573528290,0.8998006172478199005127,0.6733843074180185794830, \ +0.8211324727162718772888,0.3026339760981500148773,0.6984135676175355911255, \ +0.9072209936566650867462,0.3731772648170590400696,0.4188832002691924571991, \ +0.0215740650892257690430,0.9132502474822103977203,0.7250007269904017448425, \ +0.5181344612501561641693,0.3798101972788572311401,0.9359269295819103717804, \ +0.7378503987565636634827,0.6775109241716563701630,0.0551267974078655242920, \ +0.7047141403891146183014,0.5583055457100272178650,0.8873056150041520595551, \ +0.5930708739906549453735,0.8739025560207664966583,0.7695222767069935798645, \ +0.0288866939954459667206,0.5428439155220985412598,0.374539139214903116226, \ +0.3374005360528826713562,0.3740871041081845760345,0.4142110701650381088257, \ +0.2722152252681553363800,0.0704229706898331642151,0.9498285944573581218719, \ +0.3199572004377841949463,0.2244639829732477664948,0.8119156723842024803162, \ +0.6117301187478005886078,0.2726398129016160964966,0.1315172505564987659454, \ +0.0834807949140667915344,0.1704506087116897106171,0.6043888628482818603516, \ +0.0741717466153204441071,0.3983510462567210197449,0.4145161225460469722748, \ +0.4785034339874982833862,0.1325146560557186603546,0.9634160557761788368225, \ +0.3733813683502376079559,0.9615952931344509124756,0.1792585910297930240631, \ +0.9886706164106726646423,0.6644756025634706020355,0.6250293198972940444946, \ +0.2414359268732368946075,0.3228348018601536750793,0.2679829034022986888885, \ +0.1444108113646507263184,0.5242025130428373813629,0.6338959587737917900085, \ +0.5731068192981183528900,0.8658696617931127548218,0.6905007590539753437042, \ +0.8533225739374756813049,0.0395693923346698284149,0.8078914172947406768799, \ +0.4903320954181253910065,0.1027000164613127708435,0.3180945566855370998383, \ +0.0674452055245637893677,0.3333888095803558826447,0.8215381549671292304993, \ +0.1736259120516479015350,0.0991585403680801391602} + + +#define ZdenI {0.8987952568568289279938,0.315000849775969982147,0.0550288720987737178802, \ +0.8362890016287565231323,0.3757084463723003864288,0.4403073200955986976624, \ +0.6550271878950297832489,0.1222427897155284881592,0.4285280019976198673248, \ +0.6505553862079977989197,0.304123846348375082016,0.4213901553303003311157, \ +0.4804654982872307300568,0.1147165866568684577942,0.5422563436441123485565, \ +0.2779277041554450988770,0.4092231714166700839996,0.1325531704351305961609, \ +0.7119363336823880672455,0.4915375765413045883179,0.2485320051200687885284, \ +0.5632069641724228858948,0.9166236515156924724579,0.4785935021936893463135, \ +0.9892991916276514530182,0.4862101143226027488708,0.1880847117863595485687, \ +0.7876637298613786697388,0.0741149676032364368439,0.8136677043512463569641, \ +0.2064852821640670299530,0.2380608320236206054688,0.6788688250817358493805, \ +0.0723622469231486320496,0.4169676317833364009857,0.6501883845776319503784, \ +0.3752250974066555500031,0.0745300510898232460022,0.8864620546810328960419, \ +0.6364345215260982513428,0.2677079201675951480865,0.6960594644770026206970, \ +0.7444827682338654994965,0.4213623646646738052368,0.1991455671377480030060, \ +0.4808609904721379280090,0.5516581865958869457245,0.1599473282694816589355, \ +0.1182241612114012241364,0.2901592804118990898132,0.4397455691359937191010, \ +0.7226112987846136093140,0.202900760341435670853,0.7154570007696747779846, \ +0.3668800438754260540009,0.4158036895096302032471,0.8334258184768259525299, \ +0.4739205753430724143982,0.3318080059252679347992,0.6068793702870607376099, \ +0.0087250215001404285431,0.5049378024414181709290,0.8908548909239470958710, \ +0.7220234721899032592773,0.2998904981650412082672,0.986597347073256969452, \ +0.8213773234747350215912,0.5859730672091245651245,0.9345314060337841510773, \ +0.9908401081338524818420,0.2754496405832469463348,0.5722857229411602020264, \ +0.1057338924147188663483,0.9960324605926871299744,0.2675347900949418544769, \ +0.5329049322754144668579,0.0993804302997887134552,0.9757113726809620857239, \ +0.8398896041326224803925,0.9757724180817604064941,0.3335785293020308017731, \ +0.2822513980790972709656,0.7494544475339353084564,0.4592373128980398178101, \ +0.9039488215930759906769,0.0442035431042313575745,0.0199772412888705730438, \ +0.6720122136175632476807,0.7285225228406488895416,0.2960560088977217674255, \ +0.2031218609772622585297,0.1674261111766099929810,0.8859982681460678577423, \ +0.5591668086126446723938,0.6923109102062880992889,0.2207241952419281005859, \ +0.241108322981745004654,0.0926182596012949943542,0.9330528690479695796967, \ +0.7781645338982343673706,0.9508441691286861896515,0.5327433506026864051819, \ +0.8735036174766719341278,0.9666616283357143402100,0.9452914656139910221100, \ +0.1400739839300513267517,0.4990123338066041469574,0.1327268425375223159790, \ +0.9768243846483528614044,0.3724610926583409309387,0.7944017681293189525604, \ +0.8794557079672813415527,0.3314093225635588169098,0.0031166328117251396179, \ +0.9777328907512128353119,0.0703121032565832138062,0.7957679857499897480011, \ +0.5023274505510926246643,0.3493039156310260295868,0.2684593088924884796143, \ +0.9741498515941202640533,0.9015910243615508079529,0.5996336988173425197601, \ +0.5803879369050264358521,0.5484640044160187244415,0.8589230822399258613586, \ +0.9201795118860900402069,0.3725907355546951293945,0.5755203464068472385406, \ +0.1440870938822627067566,0.7605391903780400753021,0.8300342690199613571167, \ +0.4151301835663616657257,0.2624956378713250160217,0.5758876572363078594208, \ +0.8251774720847606658936,0.3828161866404116153717,0.4365336438640952110291, \ +0.4083978212438523769379,0.0662870798259973526001,0.7208817270584404468536, \ +0.6630535097792744636536,0.6463958504609763622284,0.993799932301044464111, \ +0.9815895878709852695465,0.0657920939847826957703,0.8050008206628262996674, \ +0.3934821542352437973022,0.4162000496871769428253,0.2614595824852585792542, \ +0.6719987387768924236298,0.1951352097094058990479,0.4636183516122400760651, \ +0.9582502311095595359802,0.6627009413205087184906,0.4255988318473100662231, \ +0.9324015271849930286407,0.5055249826982617378235,0.7275368678383529186249, \ +0.7848008275032043457031,0.9698746153153479099274,0.6134159592911601066589, \ +0.6561312093399465084076,0.8136037569493055343628,0.4121062462218105792999, \ +0.9611028293147683143616,0.1216154317371547222137,0.1221984885632991790771, \ +0.6084936023689806461334,0.9125110497698187828064,0.3089236742816865444183, \ +0.6477946285158395767212,0.3147067544050514698029,0.0581819834187626838684, \ +0.4708230230025947093964,0.4103578254580497741699,0.7477423720993101596832, \ +0.8020648909732699394226,0.2554281591437757015228,0.7351439502090215682983, \ +0.3968368102796375751495,0.7119807982817292213440,0.1489503826014697551727, \ +0.4107801504433155059814,0.6839885697700083255768,0.8525082385167479515076, \ +0.8774310103617608547211,0.7516427803784608840942,0.0678401333279907703400, \ +0.819040869362652301788,0.1112091499380767345428,0.0332822054624557495117, \ +0.6846691765822470188141,0.6917669652029871940613,0.3158738478086888790131, \ +0.2696444820612668991089,0.1202391539700329303741,0.6283207843080163002014, \ +0.0934506128542125225067,0.8008399121463298797607} + + +#define ZresR {0.4709798307531771199841,0.4447581675093783548647,0.0826177744953439652242, \ +1.205396046252330988224,0.8449132450069640754009,0.8480990000672121720271, \ +4.2502508379938888083416,0.1623619707288032898429,0.8585056587355431867437, \ +3.1388466849496672317343,1.1935750070427169067244,0.4490650157900041850034, \ +2.1895212424748247137529,0.5809227845299023140768,0.56073613731694649243, \ +0.8082982497300479352020,0.51953770817366529133,0.2942574640122151419241, \ +1.15793914287644739147,0.6384564385907467443104,0.3937873213744618183796, \ +1.726027502041532768473,1.036465781498592919618,0.4067614434439539849997, \ +0.9843295698061713672189,0.4579374729893078699305,0.1635265468643208597310, \ +0.2673377630487006051396,0.1276569435289993670324,0.8547995406383729344313, \ +0.5712421096762160255267,0.9496998303500763238816,0.9215219933031827403980, \ +0.4199401716102647008633,0.4080227083004296928515,0.8668387814340499097909, \ +3.8251647868179174949432,0.2798561459758153735500,0.7296876114375909772036, \ +1.1307863949434504569069,0.5227040207487291256783,0.9553281397768573768303, \ +1.6873623484630664304262,0.9189993233013992179892,1.8680916744683291330631, \ +1.0945340632725206742037,0.7172695872712858689013,0.4393272001105434365620, \ +0.6184165841783031414280,1.0145435197072958377618,39.23975822857007500488, \ +0.9125771040829241398384,0.34940616662082130128,1.6886679318634245650088, \ +0.5362354768077970401663,0.5639723020956257659719,0.7780379364916976125954, \ +1.4003319167235890319034,0.8161232260004956939881,0.8393853039143751582074, \ +0.5223720004390856042065,1.110983008842490127321,0.818747739732451629280, \ +1.6747433378619311916680,0.9068157856691638762925,1.60833170305877803941, \ +0.8405688656523967461354,0.8381421282255379079373,1.2701889799735286423754, \ +0.9833168993944022551190,1.0168770046728485834109,1.3016322293958613176557, \ +0.6495107529989713190943,1.7580887380148670917634,0.811791795379815717126, \ +2.965105145965179822554,0.2240951065290753552173,0.9460239544777007125731, \ +1.718999756730102967950,1.2296973389194514325595,0.9389212198179804902409, \ +1.0234593559016138542006,1.4334211779050687329828,0.5243120860846904873753, \ +1.0504722453285446626126,0.1152767460270415350587,0.0707222953082139449421, \ +1.6254463990050433963575,1.2481859371318786422478,0.2175136535151512284791, \ +1.2910615615872327310854,0.4233268477489937620106,0.4807068388081991994198, \ +1.1549507985792513142798,1.6255209179331293611881,0.2983110082899964599079, \ +1.4173997951417944829444,0.1244573410110787203831,1.2637054783806833668791, \ +0.4884514729189023962697,0.6929538011049971579780,1.7943962247548823629728, \ +1.2713004857643259715161,1.032953859535653995394,1.536353015508226782515, \ +0.4675865183692056170628,1.0462587829225313829085,1.1330002369245864013436, \ +1.041962113643855936118,0.2090005572387043097926,1.3318357299932417348032, \ +1.1032964509750491366447,2.0521925485676613121200,1.1375468051162005434, \ +3.6762531852618991479176,0.38561527164112474608,1.8447673546930116739162, \ +0.6707863887229996713302,1.2079499357804526216142,0.3709954307004496576461, \ +1.0365712069816981344417,1.4492727922264592166357,0.9826439254861862870882, \ +0.5459775284828356500810,1.7185510325107367091135,0.9420557659158521612852, \ +1.0363462766733533282348,0.6588978871971996609247,0.7068286721825971508082, \ +0.8283838180602889345039,0.3576856814045822896553,1.1450642560827664073742, \ +1.0082980823395675251675,0.8632613198241941843136,0.5769998142575105681829, \ +0.4586342340414231721901,1.0743331202123964640549,0.8051789964613165206941, \ +1.0185550907048162017077,0.2778337479551458155669,1.8265245559079639203759, \ +0.7989360256028138485007,1.677001282149952920975,1.0503469849633222388263, \ +1.4140028143314165021138,0.5446523200971284950356,1.5495499943879871285191, \ +1.5081843822248834907640,0.9349545726381919275028,0.5723524546761384890203, \ +3.1135949451595807957460,0.6437016396093410142143,0.4050990487720780852676, \ +2.6650358323492571166469,0.7883973138104276578986,0.8659591728844833191658, \ +0.7053024953584487999336,0.4594589542097845535906,1.321677134779998041836, \ +0.9728202285898922552221,1.1265695509413868879989,0.9572634127807582160585, \ +1.0936914939126565204930,1.8223172561248370815434,0.3829461524867902033620, \ +0.9262699522472612745361,0.2636089879247657252748,0.4207872701626157452282, \ +0.3681456734997125557207,1.7105511789891454377255,0.7594157400395155077533, \ +2.311379502472121316714,0.3968136705033024624889,3.7584600137181558565658, \ +1.1328564511602001729784,0.5708065143880640679441,0.4501390996974691804944, \ +1.1049485918178350019048,0.7752771634215889218211,1.0810236263550128121835, \ +0.6478013413788724639275,0.8461714840132198434119,0.6054575539721791521686, \ +0.4140498893464432672573,0.7932920209693627988656,1.1273035377738909179612, \ +1.3778348488206868527328,2.8479811305391047326907,2.8424954426663924245133, \ +6.763933435362530666168,0.0838692695945179311767,0.5829756521091847831784, \ +1.0005053747332974811712,1.1474263302846201550977,0.4156230215198345456784, \ +0.3525774504986416424401,0.2463914637535300489191,1.148273196579604027434, \ +0.2298339614166822753027,1.0666533246089620057262} + + +#define ZresI {0.4591483936701460932817,-0.1155119517747187490864,-0.9310924334988598394247, \ +0.0819694377628846782002,-0.7287233873139877804448,-0.763187199054947806864, \ +-3.762492170029271498777,-0.0437843680454512648725,-0.0905413694792896739383, \ +-2.4916556281940294148569,0.0574678906137320935632,0.1174306870209648884229, \ +-2.7289896643260878050796,-0.6644222901331670039227,0.4940949025393515658955, \ +-0.4608868906485130145789,0.0201573045574557213611,-0.0044069113482103575846, \ +-0.4314389127933472845022,-0.6902743621457737566161,-0.0987167242035817960044, \ +-0.2548733845587528579202,-0.0883482700619244720741,0.2453606820435244861844, \ +0.2068645371508029129348,0.0560010586358397413620,0.1255687367414367316965, \ +1.0556170148952166432110,-0.0508624268720807917732,-0.4973030078350189620018, \ +-0.4494495094173277527361,0.1516315916553793996524,0.1955091614740893934954, \ +-0.2981682129038163431289,0.3238592517142263038643,0.20807310888270824645, \ +1.2754627683321149156370,-0.4652261053750170738397,0.9104699268960899649628, \ +-0.2343654011567836148444,0.0927986797131679780337,-0.4464725902632422083194, \ +-0.2054461228467904798656,0.4830705943398990731552,-0.1540520130863628767148, \ +-1.0359735137341328226057,0.3405388282389278931106,-0.1187156901372778405879, \ +-0.4792316908339305792097,0.1045919568114299369466,-0.2999491114304728145434, \ +0.2514864063426180407212,0.0155478062159446952378,-0.2735523819973274539663, \ +0.8717980527838158355536,0.3364261929110925475328,0.2029142596752248339786, \ +-0.1918158596845628005578,1.1084778145052667230885,-0.0829219255275467775901, \ +-1.081783493192439049579,0.5421774728023454059667,0.5568609105760318200851, \ +1.781941834619454212429,-0.4713958087204941915793,0.2445718496622908411098, \ +0.2491121281579287416452,0.0866971164274075029033,-0.8008320713990698669349, \ +0.6338101504882612813319,0.3519358982630789167700,0.6541663473243117810085, \ +0.0502911402190908199406,1.6252765471306449551747,-0.2809451105359275779882, \ +2.2146130913244452820265,-0.3625483190563351110214,0.1522743119365968789136, \ +-0.0069229021370069455943,0.1905060635979277938734,-0.1989073433264569867873, \ +0.3897022628957311773945,0.4240784338552809340506,-0.4179573564331034440933, \ +-0.1988402057439373205039,-0.0356440742214715750036,-0.0168647095375222925984, \ +-0.1494425771365865129869,-1.3843069738448403604991,0.0967017939849821872578, \ +0.0430607432652793456485,-0.5279083881307125025728,1.0204003735962423604633, \ +1.4362803365510681263828,0.1977169795522846496016,-0.3955062165628914772064, \ +-1.4128711804163340826079,0.0310836769042206473301,-0.3390941241024513219671, \ +0.6074764041812149573119,0.4824589432533142319137,-0.4154346483371720855082, \ +0.0501899399979248012071,0.3607980326544134586086,0.7206975894822468253764, \ +-0.4477518830833556728876,0.1424100376820599533900,0.1298061651063174004594, \ +0.3303537448252925612380,0.4338741987461899873857,0.7684141832850970299518, \ +0.2873031419117236806571,0.3434511048158676582709,-0.3550844910755488470500, \ +1.5595291773563670911784,-0.0457132414448809254459,-0.0267391386135805188273, \ +0.1798214510802064736161,-0.6158028489814036943173,0.0464070042435799218206, \ +0.1034419684949273582353,0.0929020432890966946227,-0.2813776899321288604838, \ +0.6258852119978557393409,-0.4661667563754944287879,-0.0650680862663896020237, \ +0.102444575548549118849,-0.8520157260825024225781,-0.0298211062249834936433, \ +-0.4653174759501645385562,0.8545944890801387971990,-0.2976773769162330829374, \ +0.3093514738325885415904,0.2363494602874922356772,0.1974484855458788490346, \ +0.7777794203036600961809,0.3731580648675694722449,-0.0003201115706582268751, \ +0.6970160995106667867205,-0.1417446622937881539617,0.6735687169118647066313, \ +-0.5504259784814062861358,0.1823325876192195271752,0.0893283232282492400955, \ +-0.7513139628213129084244,-0.0681389663512164817094,-0.0516841536789755529036, \ +-0.315174493545774980774,-0.0096538968382749029695,-0.3974986568742733816784, \ +0.1161709126231448979683,0.0939526577995318662451,0.4474141503322081603322, \ +2.0839818065490263165884,0.481117429953414110777,0.1103349130284882323449, \ +0.7841930577945639413429,0.3179393307402755275426,-0.5800239728555655061015, \ +-0.1108667189012625814426,4.1526144610214457131292,0.6644411493894925024861, \ +-0.5535740575269347818477,-0.0391563103551154784165,0.1619934487203539552613, \ +1.0596515488428814855126,-0.3128122097434946624617,-0.3890589346180040597467, \ +0.2748020770797242051664,1.635738569956616927925,0.3868552807413435101758, \ +-0.7602443417718864893118,-0.0831558796771991737273,-2.537669265389609574157, \ +1.426458962036896371828,-1.0022009849938886549836,0.6049199483603766580586, \ +0.1673262559470924115690,-0.7200301037654435187818,0.7467393358286636972920, \ +-0.0106106746626293529240,0.153545238852170945476,-0.451676909031678563977, \ +0.3690242193796505754122,0.8280032112539841282484,1.091435550366606888062, \ +-0.3195494879686350264691,0.8111338563578870397563,-0.1273427352363078746134, \ +2.602467288932953426439,0.0428813666356926206924,-0.6294198199336996646380, \ +0.1402292321928536034115,0.9366730345322898942939,-0.3072343945837653356179, \ +-0.0048993749459086879255,-0.2278153021086992413569,-1.0472316778083061716842, \ +-0.0219504421804297446263,1.4011599912181635918529} + + + + +static void sldivsTest() +{ + float M1[]=numF; + float M2[]=denF; + float Res[]=resF; + int i=0; + + for (i=0;i<200;i++){ + assert( ( fabs(sldivs(M1[i],M2[i])-Res[i]) / fabs(sldivs(M1[i],M2[i])) ) <1e-6); + } + +} + + +static void dldivsTest() +{ + double M1[]=numD; + double M2[]=denD; + double Res[]=resD; + int i=0; + + + for (i=0;i<200;i++){ + assert( ( fabs(dldivs(M1[i],M2[i])-Res[i]) / fabs(dldivs(M1[i],M2[i])) ) <1e-16); + } + +} + + +static void cldivsTest() +{ + float DR[]=CdenR; + float DI[]=CdenI; + float NR[]=CnumR; + float NI[]=CnumI; + float RR[]=CresR; + float RI[]=CresI; + int i=0; + floatComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1 = FloatComplex(NR[i],NI[i]); + in2 = FloatComplex(DR[i],DI[i]); + out = cldivs(in1,in2); + assert( fabs(creals(out)-RR[i]) < 1e-6); + assert( fabs(cimags(out)-RI[i]) < 1e-6); + } +} + + +static void zldivsTest() +{ + double DR[]=ZdenR; + double DI[]=ZdenI; + double NR[]=ZnumR; + double NI[]=ZnumI; + double RR[]=ZresR; + double RI[]=ZresI; + int i=0; + doubleComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1 = DoubleComplex(NR[i],NI[i]); + in2 = DoubleComplex(DR[i],DI[i]); + out = zldivs(in1,in2); + assert( fabs(zreals(out)-RR[i]) < 1e-14); + assert( fabs(zimags(out)-RI[i]) < 1e-14); + } + +} + + + +static void sldivaTest() +{ + float M1[]=numF; + float M2[]=denF; + float Res[]=resF; + float out[200]; + int i=0; + + sldiva(M1,M2,200,out); + + for (i=0;i<200;i++){ + assert( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <1e-6); + } +} + + +static void dldivaTest() +{ + double M1[]=numD; + double M2[]=denD; + double Res[]=resD; + double out[200]; + int i=0; + + dldiva(M1,M2,200,out); + + for (i=0;i<200;i++){ + assert( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <1e-16); + } + +} + + +static void cldivaTest() +{ + float DR[]=CdenR; + float DI[]=CdenI; + float NR[]=CnumR; + float NI[]=CnumI; + float RR[]=CresR; + float RI[]=CresI; + int i=0; + floatComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i] = FloatComplex(NR[i],NI[i]); + in2[i] = FloatComplex(DR[i],DI[i]); + } + + cldiva(in1,in2,200,out); + + for (i=0;i<200;i++){ + assert( fabs(creals(out[i])-RR[i]) < 1e-6); + assert( fabs(cimags(out[i])-RI[i]) < 1e-6); + } +} + + +static void zldivaTest() +{ + double DR[]=ZdenR; + double DI[]=ZdenI; + double NR[]=ZnumR; + double NI[]=ZnumI; + double RR[]=ZresR; + double RI[]=ZresI; + int i=0; + doubleComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i] = DoubleComplex(NR[i],NI[i]); + in2[i] = DoubleComplex(DR[i],DI[i]); + } + + zldiva(in1,in2,200,out); + + for (i=0;i<200;i++){ + assert( fabs(zreals(out[i])-RR[i]) < 5e-15); + assert( fabs(zimags(out[i])-RI[i]) < 5e-15); + } +} + + +static int testLDivision(void) { + printf(">>>SCALAIRES<<<\n");printf("\n");printf("\n"); + sldivsTest(); + dldivsTest(); + cldivsTest(); + zldivsTest(); + printf(">>>ARRAYS<<<\n");printf("\n");printf("\n"); + sldivaTest(); + dldivaTest(); + cldivaTest(); + zldivaTest(); + return 0; +} + + + +int main(void) { + assert(testLDivision() == 0); + return 0; +} diff --git a/2.3-1/src/c/operations/division/testRDivision.c b/2.3-1/src/c/operations/division/testRDivision.c new file mode 100644 index 00000000..f4dc2228 --- /dev/null +++ b/2.3-1/src/c/operations/division/testRDivision.c @@ -0,0 +1,1434 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include +#include +#include "division.h" + +#define numD {0.8930737324990332126617,0.7964982418343424797058,0.3105977787636220455170,\ +0.8362775426357984542847,0.8366548125632107257843,0.1730499723926186561584,\ +0.6256599049083888530731,0.9524160288274288177490,0.1760999918915331363678,\ +0.3954342594370245933533,0.7430971986614167690277,0.0099669340997934341431,\ +0.8562883255071938037872,0.4123467626050114631653,0.0013701054267585277557,\ +0.478847078979015350342,0.0607692175544798374176,0.4663597894832491874695,\ +0.2553804158233106136322,0.0834822561591863632202,0.4601755072362720966339,\ +0.1318861627951264381409,0.2567202891223132610321,0.1483882851898670196533,\ +0.3102459297515451908112,0.3355649625882506370544,0.9929056516848504543304,\ +0.8480489421635866165161,0.9932069522328674793243,0.0778191434219479560852,\ +0.3293439703993499279022,0.8298407644033432006836,0.0962639846839010715485,\ +0.0743350265547633171082,0.797786401119083166122,0.1787547301501035690308,\ +0.6209519659169018268585,0.0362136671319603919983,0.8750143120996654033661,\ +0.1926648132503032684326,0.4170953244902193546295,0.8075440963730216026306,\ +0.5955101824365556240082,0.9368934128433465957642,0.4351273146457970142365,\ +0.0791484387591481208801,0.8418628755025565624237,0.0468236580491065979004,\ +0.8905187272466719150543,0.8972489042207598686218,0.1566572873853147029877,\ +0.7473085876554250717163,0.9340659757144749164581,0.6858066553249955177307,\ +0.4195983703248202800751,0.5576272048056125640869,0.9217885569669306278229,\ +0.0012825494632124900818,0.2336195311509072780609,0.6507374066859483718872,\ +0.8781858873553574085236,0.7385697560384869575500,0.3637254047207534313202,\ +0.3355757892131805419922,0.2466035136021673679352,0.0068482486531138420105,\ +0.0723190023563802242279,0.6311543267220258712769,0.5204586987383663654327,\ +0.3941111722961068153381,0.6947632352821528911591,0.4012039266526699066162,\ +0.849075383041054010391,0.8391130855306982994080,0.2989268130622804164886,\ +0.0181148592382669448853,0.2118785199709236621857,0.8294900776818394660950,\ +0.7724645170383155345917,0.0249240621924400329590,0.2546977871097624301910,\ +0.1448017610237002372742,0.18158184876665472984,0.7640993203967809677124,\ +0.3819306720979511737823,0.8632451379671692848206,0.7450340534560382366180,\ +0.4418703205883502960205,0.1983149335719645023346,0.8507903432473540306091,\ +0.2671095184050500392914,0.5968565810471773147583,0.8940604371018707752228,\ +0.4514882611110806465149,0.3733475464396178722382,0.4417422562837600708008,\ +0.6670903661288321018219,0.5977000175043940544128,0.3927405043505132198334,\ +0.0467478167265653610229,0.7761418079026043415070,0.0589983472600579261780,\ +0.2301703463308513164520,0.8336486034095287322998,0.3184757144190371036530,\ +0.0484908362850546836853,0.0728295124135911464691,0.3490902576595544815063,\ +0.3259462383575737476349,0.9053150387480854988098,0.2743762019090354442596,\ +0.7859510257840156555176,0.2731794440187513828278,0.0720554692670702934265,\ +0.2605740218423306941986,0.2215009387582540512085,0.5916113932617008686066,\ +0.0858324700966477394104,0.8001660103909671306610,0.0411078669130802154541,\ +0.2831356064416468143463,0.8018129533156752586365,0.4847330353222787380219,\ +0.5162404496222734451294,0.2271098983474075794220,0.5678930180147290229797,\ +0.7612865674309432506561,0.0055178999900817871094,0.2744725891388952732086,\ +0.5693024424836039543152,0.3613458289764821529388,0.7475566845387220382690,\ +0.7227180902846157550812,0.0618810513988137245178,0.4702493171207606792450,\ +0.7143640778958797454834,0.2654818654991686344147,0.7127769580110907554626,\ +0.4804507023654878139496,0.4940285924822092056274,0.0104847666807472705841,\ +0.7673166813328862190247,0.6725491019897162914276,0.6714572831988334655762,\ +0.6595867448486387729645,0.2607971383258700370789,0.6678037284873425960541,\ +0.6759099271148443222046,0.4446999360807240009308,0.9939495110884308815002,\ +0.9958829130046069622040,0.5640800781548023223877,0.9133111224509775638580,\ +0.4908249890431761741638,0.6215975037775933742523,0.7074729967862367630005,\ +0.1573635679669678211212,0.6578523861244320869446,0.7743686395697295665741,\ +0.8528304547071456909180,0.5792482295073568820953,0.3628176329657435417175,\ +0.924179898109287023544,0.5243524145334959030151,0.7886543427594006061554,\ +0.6525151440873742103577,0.2477638195268809795380,0.2364655844867229461670,\ +0.7240293831564486026764,0.8278210600838065147400,0.4287728047929704189301,\ +0.4858888480812311172485,0.5923984018154442310333,0.0949383648112416267395,\ +0.1356843891553580760956,0.9917455688118934631348,0.7212927364744246006012,\ +0.0115638775750994682312,0.0211908905766904354095,0.1524727698415517807007,\ +0.9165380974300205707550,0.4467271203175187110901,0.5868234331719577312469,\ +0.1882771886885166168213,0.4196520284749567508698,0.2730510598048567771912,\ +0.7565603456459939479828,0.9378882069140672683716,0.0586007428355515003204,\ +0.5101847248151898384094,0.5031699347309768199921,0.7783576548099517822266,\ +0.6856653341092169284821,0.1381576983258128166199,0.371037633623927831650,\ +0.6366564910858869552612,0.4961673622019588947296,0.2994064847007393836975,\ +0.2392275254242122173309,0.5618183575570583343506} + +#define denD {0.3218038142658770084381,0.1082227518782019615173,0.1685282415710389614105,\ +0.8263800088316202163696,0.4923414406366646289825,0.7863734485581517219543,\ +0.6762332352809607982635,0.0258686169981956481934,0.3594204657711088657379,\ +0.3436427963897585868835,0.2824054299853742122650,0.1450859513133764266968,\ +0.0762176741845905780792,0.5220461571589112281799,0.6713762427680194377899,\ +0.0599394328892230987549,0.7267188713885843753815,0.2224657749757170677185,\ +0.3122289828024804592133,0.4435700643807649612427,0.3983507198281586170197,\ +0.1324583934620022773743,0.8820166247896850109100,0.5455272346735000610352,\ +0.2917219498194754123688,0.7739847479388117790222,0.3354639573954045772552,\ +0.8127403985708951950073,0.4612239454872906208038,0.6898109326139092445374,\ +0.9649041066877543926239,0.8210376314818859100342,0.2802407057024538516998,\ +0.9873316427692770957947,0.294199434574693441391,0.4859610591083765029907,\ +0.2247181800194084644318,0.9585652919486165046692,0.1503968122415244579315,\ +0.0216291621327400207520,0.0688429796136915683746,0.9950710041448473930359,\ +0.7568672685883939266205,0.6163959559053182601929,0.0865804632194340229034,\ +0.5165374809876084327698,0.1916800136677920818329,0.2940570451319217681885,\ +0.3528221980668604373932,0.1317937439307570457458,0.0549608371220529079437,\ +0.929352553561329841614,0.737892795819789171219,0.7509917514398694038391,\ +0.6889848816208541393280,0.8865169286727905273438,0.6891661235131323337555,\ +0.8677108911797404289246,0.7947537912987172603607,0.2496256213635206222534,\ +0.3935408894903957843781,0.7297343472018837928772,0.7888072351925075054169,\ +0.113488640636205673218,0.4145256043411791324615,0.6172473421320319175720,\ +0.7440188056789338588715,0.9038409832864999771118,0.3976829168386757373810,\ +0.9472072543576359748840,0.2581262919120490550995,0.1955799385905265808105,\ +0.9381833248771727085114,0.4226356102153658866882,0.0937463282607495784760,\ +0.9977992679923772811890,0.2042182614095509052277,0.9455819511786103248596,\ +0.9336234177462756633759,0.9743702597916126251221,0.4100225553847849369049,\ +0.5125095760449767112732,0.0948633304797112941742,0.5688196588307619094849,\ +0.7322562676854431629181,0.8108531581237912178040,0.5459008770994842052460,\ +0.5022544711828231811523,0.7634959020651876926422,0.7354982374235987663269,\ +0.0699520572088658809662,0.6130836438387632369995,0.0965849910862743854523,\ +0.5439325878396630287170,0.9187005828134715557098,0.5072866193950176239014,\ +0.1335940570570528507233,0.8688194593414664268494,0.7999687767587602138519,\ +0.9879787657409906387329,0.7131399479694664478302,0.3067426951602101325989,\ +0.5431228461675345897675,0.7330236807465553283691,0.6498145484365522861481,\ +0.8018737239763140678406,0.2859625308774411678314,0.1894423719495534896851,\ +0.7794728656299412250519,0.5433104271069169044495,0.5268451268784701824188,\ +0.1533693112432956695557,0.6041304902173578739166,0.5948378806933760643005,\ +0.8857938847504556179047,0.0043053645640611648560,0.1302204323001205921173,\ +0.9758609728887677192688,0.9183407831005752086639,0.0624175965785980224609,\ +0.9939593323506414890289,0.4122588960453867912292,0.8258536770008504390717,\ +0.0376359503716230392456,0.4675730471499264240265,0.4759115139022469520569,\ +0.4060978214256465435028,0.0392968021333217620850,0.4401316107250750064850,\ +0.3316476037725806236267,0.0877817696891725063324,0.1150833908468484878540,\ +0.9667435702867805957794,0.8103649737313389778137,0.3928376468829810619354,\ +0.7880131229758262634277,0.4798596971668303012848,0.0270724548026919364929,\ +0.6701857983134686946869,0.5602217521518468856812,0.2564360727556049823761,\ +0.2626037681475281715393,0.4447338129393756389618,0.8522944338619709014893,\ +0.2347065494395792484283,0.3277532672509551048279,0.2253599218092858791351,\ +0.3468936551362276077271,0.7743145865388214588165,0.1285835551097989082336,\ +0.1156307714991271495819,0.2054340392351150512695,0.4535544612444937229156,\ +0.6516549764201045036316,0.0710035725496709346771,0.1265540253371000289917,\ +0.4974718545563519001007,0.0879269847646355628967,0.1462626229040324687958,\ +0.715134423226118087769,0.9305738122202455997467,0.3140813848003745079041,\ +0.5769402063451707363129,0.1306138429790735244751,0.0478980806656181812286,\ +0.4500174494460225105286,0.0384718659333884716034,0.483350999653339385986,\ +0.2981918179430067539215,0.7112689120694994926453,0.9268360524438321590424,\ +0.9477838929742574691772,0.1729496796615421772003,0.2750928336754441261292,\ +0.0044281478039920330048,0.0611358620226383209229,0.1950612799264490604401,\ +0.3789803450927138328552,0.2549188635312020778656,0.1764185149222612380981,\ +0.6008180272765457630157,0.3703392641618847846985,0.2908470141701400279999,\ +0.5384815335273742675781,0.8090293356217443943024,0.9260985879227519035339,\ +0.1576966657303273677826,0.9518593531101942062378,0.2709982101805508136749,\ +0.1609848598018288612366,0.8782086591236293315887,0.5091647170484066009521,\ +0.7951062084175646305084,0.8432204117998480796814,0.5806765086017549037933,\ +0.3487791065126657485962,0.9397577759809792041779,0.4363934816792607307434,\ +0.5549766751937568187714,0.9105900451540946960449} + +#define resD {2.7752117685005690539413,7.3598039969520661074398,1.8430013620755494319070,\ +1.0119769763285682007137,1.6993385961606277678726,0.2200608028029340801357,\ +0.9252131842476511991435,36.817431287256695782162,0.4899553827958132434794,\ +1.1507130764601400940705,2.6313134230453778528158,0.0686967553341225334318,\ +11.2347737538324832229,0.789866483931406127006,0.0020407415983468750811,\ +7.9888490080310781138451,0.0836213561350959977414,2.0963215107319497221283,\ +0.8179266816651262761440,0.1882053431079252492353,1.155201897048870884888,\ +0.9956799214310265710992,0.2910606012483354931852,0.2720089406327768632998,\ +1.063498752642826117309,0.4335550067128443041398,2.9597983026073131362921,\ +1.0434438150912359599687,2.1534158448419846720867,0.1128122790502419231506,\ +0.3413230062103223549919,1.0107219603388561957047,0.3435046469876847918812,\ +0.0752888121222041739600,2.7117196954249602747211,0.3678375598202789920066,\ +2.7632475746433664554047,0.0377790302195727817347,5.8180376236596496042353,\ +8.9076410851193781326174,6.0586471827734049711012,0.811544194343212454967,\ +0.7868092691433471452811,1.519953860611081841725,5.025698621442897362499,\ +0.1532288394790210228624,4.3920222009250329264773,0.1592332468283501334394,\ +2.5239872437899073531753,6.8079779620811464724284,2.8503439101086094353832,\ +0.8041174307766172368872,1.2658559359923549081373,0.9132013154739780924629,\ +0.6090095465341773817158,0.6290090880051657507011,1.3375418865163728465717,\ +0.0014780838597850658872,0.2939520813976195801054,2.6068534276708055230642,\ +2.2314984562151556346521,1.0121077058665004511084,0.4611080990300331916565,\ +2.9569108179636049982264,0.5949053834541859764329,0.0110948208046701829455,\ +0.0972005032727465967390,0.6983023987549834554756,1.3087278248602665087219,\ +0.4160770206129594250832,2.6915632271929834651303,2.0513552133414121314559,\ +0.9050207571662129968360,1.9854292095810492924102,3.1886775579181523276873,\ +0.0181548131165850216984,1.0375101546183984613236,0.8772270628134669623321,\ +0.8273833992971273421091,0.0255796622915918127339,0.6211799418467155442514,\ +0.2825347423576584082738,1.9141416166649365404595,1.343306808290392950767,\ +0.5215806118057263462973,1.0646134004886980140014,1.364779000566185729326,\ +0.8797737918544228374884,0.2597459043795002364696,1.156753748625715116916,\ +3.8184655185694236223526,0.9735320572410287587317,9.2567222613630804062268,\ +0.8300445150827541196392,0.4063865348776212749193,0.8707942204558346555032,\ +4.9934134857806107277156,0.6879450167442484609381,0.4909447915477189172684,\ +0.0473166209108797850003,1.0883443146222897546238,0.1923382306765068772147,\ +0.4237905806301724420670,1.1372737679640729790975,0.4901024687509485389114,\ +0.0604719107699394076150,0.2546820109268255194479,1.8427253315457512439224,\ +0.4181623924703986028284,1.666294246493322805946,0.5207910027273101594147,\ +5.1245651389620645588252,0.4521861558758028531990,0.1211346345042424582639,\ +0.2941700392476057634994,51.447661507511597278608,4.5431533501455980683659,\ +0.0879556335187422766442,0.8713170808873182959786,0.6585941972519883114146,\ +0.2848563288520584713126,1.944925776028375352666,0.5869478441781880162509,\ +13.71668430117580506078,0.4857206798632796584947,1.1932743827907790201692,\ +1.874638393179189010951,0.1404160056424255120788,0.6236148062319990525992,\ +1.716588439077007199884,4.1164108476734497799043,6.4957825715577062197781,\ +0.7475799296707237306947,0.0763619522125708327653,1.1970576670846393430026,\ +0.9065383012889166591819,0.5532489331081913430666,26.328493784768131291685,\ +0.7168917986244236484339,0.8818447169975360822036,0.0408864734515713840191,\ +2.9219560966155495584928,1.5122508845114404074650,0.7878231471679140174302,\ +2.8102613515624832452033,0.7957117880572708301656,2.9632763586618620088586,\ +1.9484643697199064416026,0.5743142952640584164570,7.7299893461468416333560,\ +8.6126115055119605301570,2.745796559591685781498,2.0136746531937359527831,\ +0.7531976380193472486724,8.7544539162835999235313,5.590284425183250860414,\ +0.316326575113089591973,7.4818030879300874147475,5.2943713451509566425557,\ +1.1925456627578525647948,0.6224634971462769117423,1.1551707631330812020565,\ +1.6018642624403442997760,4.0145240548316589723754,16.46525981416842299154,\ +1.449977428410007318504,6.4401300408945045816722,0.4892212587877478036091,\ +2.4280658944667354859348,1.1638650952354832046609,0.4626199031235405656481,\ +0.5126578449824196193063,3.4252645218814619099135,0.3451139149747912693300,\ +30.641341518238579766376,16.221993703869831193742,3.6977750620030764849844,\ +0.0305131327385077949499,0.0831279815198794347353,0.8642673922787461604500,\ +1.5254836836115013287696,1.206264535110818991726,2.0176360924533236484990,\ +0.3496446525383871128945,0.518710521358847098661,0.2948401642824150514777,\ +4.7975671656860932046129,0.98532225779945714628,0.2162403316114491491629,\ +3.169147244301254939813,0.5729503228003851589278,1.5286951918468318911692,\ +0.8623569113789728568520,0.1638452964283871882145,0.6389747615541933045691,\ +1.8253859798300935413096,0.5279736703258748331535,0.6860929350929130254855,\ +0.4310587023151768448770,0.6169827580994304838669} + +#define numF {0.8930737324990332126617f,0.7964982418343424797058f,0.3105977787636220455170f,\ +0.8362775426357984542847f,0.8366548125632107257843f,0.1730499723926186561584f,\ +0.6256599049083888530731f,0.9524160288274288177490f,0.1760999918915331363678f,\ +0.3954342594370245933533f,0.7430971986614167690277f,0.0099669340997934341431f,\ +0.8562883255071938037872f,0.4123467626050114631653f,0.0013701054267585277557f,\ +0.478847078979015350342f,0.0607692175544798374176f,0.4663597894832491874695f,\ +0.2553804158233106136322f,0.0834822561591863632202f,0.4601755072362720966339f,\ +0.1318861627951264381409f,0.2567202891223132610321f,0.1483882851898670196533f,\ +0.3102459297515451908112f,0.3355649625882506370544f,0.9929056516848504543304f,\ +0.8480489421635866165161f,0.9932069522328674793243f,0.0778191434219479560852f,\ +0.3293439703993499279022f,0.8298407644033432006836f,0.0962639846839010715485f,\ +0.0743350265547633171082f,0.797786401119083166122f,0.1787547301501035690308f,\ +0.6209519659169018268585f,0.0362136671319603919983f,0.8750143120996654033661f,\ +0.1926648132503032684326f,0.4170953244902193546295f,0.8075440963730216026306f,\ +0.5955101824365556240082f,0.9368934128433465957642f,0.4351273146457970142365f,\ +0.0791484387591481208801f,0.8418628755025565624237f,0.0468236580491065979004f,\ +0.8905187272466719150543f,0.8972489042207598686218f,0.1566572873853147029877f,\ +0.7473085876554250717163f,0.9340659757144749164581f,0.6858066553249955177307f,\ +0.4195983703248202800751f,0.5576272048056125640869f,0.9217885569669306278229f,\ +0.0012825494632124900818f,0.2336195311509072780609f,0.6507374066859483718872f,\ +0.8781858873553574085236f,0.7385697560384869575500f,0.3637254047207534313202f,\ +0.3355757892131805419922f,0.2466035136021673679352f,0.0068482486531138420105f,\ +0.0723190023563802242279f,0.6311543267220258712769f,0.5204586987383663654327f,\ +0.3941111722961068153381f,0.6947632352821528911591f,0.4012039266526699066162f,\ +0.849075383041054010391f,0.8391130855306982994080f,0.2989268130622804164886f,\ +0.0181148592382669448853f,0.2118785199709236621857f,0.8294900776818394660950f,\ +0.7724645170383155345917f,0.0249240621924400329590f,0.2546977871097624301910f,\ +0.1448017610237002372742f,0.18158184876665472984f,0.7640993203967809677124f,\ +0.3819306720979511737823f,0.8632451379671692848206f,0.7450340534560382366180f,\ +0.4418703205883502960205f,0.1983149335719645023346f,0.8507903432473540306091f,\ +0.2671095184050500392914f,0.5968565810471773147583f,0.8940604371018707752228f,\ +0.4514882611110806465149f,0.3733475464396178722382f,0.4417422562837600708008f,\ +0.6670903661288321018219f,0.5977000175043940544128f,0.3927405043505132198334f,\ +0.0467478167265653610229f,0.7761418079026043415070f,0.0589983472600579261780f,\ +0.2301703463308513164520f,0.8336486034095287322998f,0.3184757144190371036530f,\ +0.0484908362850546836853f,0.0728295124135911464691f,0.3490902576595544815063f,\ +0.3259462383575737476349f,0.9053150387480854988098f,0.2743762019090354442596f,\ +0.7859510257840156555176f,0.2731794440187513828278f,0.0720554692670702934265f,\ +0.2605740218423306941986f,0.2215009387582540512085f,0.5916113932617008686066f,\ +0.0858324700966477394104f,0.8001660103909671306610f,0.0411078669130802154541f,\ +0.2831356064416468143463f,0.8018129533156752586365f,0.4847330353222787380219f,\ +0.5162404496222734451294f,0.2271098983474075794220f,0.5678930180147290229797f,\ +0.7612865674309432506561f,0.0055178999900817871094f,0.2744725891388952732086f,\ +0.5693024424836039543152f,0.3613458289764821529388f,0.7475566845387220382690f,\ +0.7227180902846157550812f,0.0618810513988137245178f,0.4702493171207606792450f,\ +0.7143640778958797454834f,0.2654818654991686344147f,0.7127769580110907554626f,\ +0.4804507023654878139496f,0.4940285924822092056274f,0.0104847666807472705841f,\ +0.7673166813328862190247f,0.6725491019897162914276f,0.6714572831988334655762f,\ +0.6595867448486387729645f,0.2607971383258700370789f,0.6678037284873425960541f,\ +0.6759099271148443222046f,0.4446999360807240009308f,0.9939495110884308815002f,\ +0.9958829130046069622040f,0.5640800781548023223877f,0.9133111224509775638580f,\ +0.4908249890431761741638f,0.6215975037775933742523f,0.7074729967862367630005f,\ +0.1573635679669678211212f,0.6578523861244320869446f,0.7743686395697295665741f,\ +0.8528304547071456909180f,0.5792482295073568820953f,0.3628176329657435417175f,\ +0.924179898109287023544f,0.5243524145334959030151f,0.7886543427594006061554f,\ +0.6525151440873742103577f,0.2477638195268809795380f,0.2364655844867229461670f,\ +0.7240293831564486026764f,0.8278210600838065147400f,0.4287728047929704189301f,\ +0.4858888480812311172485f,0.5923984018154442310333f,0.0949383648112416267395f,\ +0.1356843891553580760956f,0.9917455688118934631348f,0.7212927364744246006012f,\ +0.0115638775750994682312f,0.0211908905766904354095f,0.1524727698415517807007f,\ +0.9165380974300205707550f,0.4467271203175187110901f,0.5868234331719577312469f,\ +0.1882771886885166168213f,0.4196520284749567508698f,0.2730510598048567771912f,\ +0.7565603456459939479828f,0.9378882069140672683716f,0.0586007428355515003204f,\ +0.5101847248151898384094f,0.5031699347309768199921f,0.7783576548099517822266f,\ +0.6856653341092169284821f,0.1381576983258128166199f,0.371037633623927831650f,\ +0.6366564910858869552612f,0.4961673622019588947296f,0.2994064847007393836975f,\ +0.2392275254242122173309f,0.5618183575570583343506f} + +#define denF {0.3218038142658770084381f,0.1082227518782019615173f,0.1685282415710389614105f,\ +0.8263800088316202163696f,0.4923414406366646289825f,0.7863734485581517219543f,\ +0.6762332352809607982635f,0.0258686169981956481934f,0.3594204657711088657379f,\ +0.3436427963897585868835f,0.2824054299853742122650f,0.1450859513133764266968f,\ +0.0762176741845905780792f,0.5220461571589112281799f,0.6713762427680194377899f,\ +0.0599394328892230987549f,0.7267188713885843753815f,0.2224657749757170677185f,\ +0.3122289828024804592133f,0.4435700643807649612427f,0.3983507198281586170197f,\ +0.1324583934620022773743f,0.8820166247896850109100f,0.5455272346735000610352f,\ +0.2917219498194754123688f,0.7739847479388117790222f,0.3354639573954045772552f,\ +0.8127403985708951950073f,0.4612239454872906208038f,0.6898109326139092445374f,\ +0.9649041066877543926239f,0.8210376314818859100342f,0.2802407057024538516998f,\ +0.9873316427692770957947f,0.294199434574693441391f,0.4859610591083765029907f,\ +0.2247181800194084644318f,0.9585652919486165046692f,0.1503968122415244579315f,\ +0.0216291621327400207520f,0.0688429796136915683746f,0.9950710041448473930359f,\ +0.7568672685883939266205f,0.6163959559053182601929f,0.0865804632194340229034f,\ +0.5165374809876084327698f,0.1916800136677920818329f,0.2940570451319217681885f,\ +0.3528221980668604373932f,0.1317937439307570457458f,0.0549608371220529079437f,\ +0.929352553561329841614f,0.737892795819789171219f,0.7509917514398694038391f,\ +0.6889848816208541393280f,0.8865169286727905273438f,0.6891661235131323337555f,\ +0.8677108911797404289246f,0.7947537912987172603607f,0.2496256213635206222534f,\ +0.3935408894903957843781f,0.7297343472018837928772f,0.7888072351925075054169f,\ +0.113488640636205673218f,0.4145256043411791324615f,0.6172473421320319175720f,\ +0.7440188056789338588715f,0.9038409832864999771118f,0.3976829168386757373810f,\ +0.9472072543576359748840f,0.2581262919120490550995f,0.1955799385905265808105f,\ +0.9381833248771727085114f,0.4226356102153658866882f,0.0937463282607495784760f,\ +0.9977992679923772811890f,0.2042182614095509052277f,0.9455819511786103248596f,\ +0.9336234177462756633759f,0.9743702597916126251221f,0.4100225553847849369049f,\ +0.5125095760449767112732f,0.0948633304797112941742f,0.5688196588307619094849f,\ +0.7322562676854431629181f,0.8108531581237912178040f,0.5459008770994842052460f,\ +0.5022544711828231811523f,0.7634959020651876926422f,0.7354982374235987663269f,\ +0.0699520572088658809662f,0.6130836438387632369995f,0.0965849910862743854523f,\ +0.5439325878396630287170f,0.9187005828134715557098f,0.5072866193950176239014f,\ +0.1335940570570528507233f,0.8688194593414664268494f,0.7999687767587602138519f,\ +0.9879787657409906387329f,0.7131399479694664478302f,0.3067426951602101325989f,\ +0.5431228461675345897675f,0.7330236807465553283691f,0.6498145484365522861481f,\ +0.8018737239763140678406f,0.2859625308774411678314f,0.1894423719495534896851f,\ +0.7794728656299412250519f,0.5433104271069169044495f,0.5268451268784701824188f,\ +0.1533693112432956695557f,0.6041304902173578739166f,0.5948378806933760643005f,\ +0.8857938847504556179047f,0.0043053645640611648560f,0.1302204323001205921173f,\ +0.9758609728887677192688f,0.9183407831005752086639f,0.0624175965785980224609f,\ +0.9939593323506414890289f,0.4122588960453867912292f,0.8258536770008504390717f,\ +0.0376359503716230392456f,0.4675730471499264240265f,0.4759115139022469520569f,\ +0.4060978214256465435028f,0.0392968021333217620850f,0.4401316107250750064850f,\ +0.3316476037725806236267f,0.0877817696891725063324f,0.1150833908468484878540f,\ +0.9667435702867805957794f,0.8103649737313389778137f,0.3928376468829810619354f,\ +0.7880131229758262634277f,0.4798596971668303012848f,0.0270724548026919364929f,\ +0.6701857983134686946869f,0.5602217521518468856812f,0.2564360727556049823761f,\ +0.2626037681475281715393f,0.4447338129393756389618f,0.8522944338619709014893f,\ +0.2347065494395792484283f,0.3277532672509551048279f,0.2253599218092858791351f,\ +0.3468936551362276077271f,0.7743145865388214588165f,0.1285835551097989082336f,\ +0.1156307714991271495819f,0.2054340392351150512695f,0.4535544612444937229156f,\ +0.6516549764201045036316f,0.0710035725496709346771f,0.1265540253371000289917f,\ +0.4974718545563519001007f,0.0879269847646355628967f,0.1462626229040324687958f,\ +0.715134423226118087769f,0.9305738122202455997467f,0.3140813848003745079041f,\ +0.5769402063451707363129f,0.1306138429790735244751f,0.0478980806656181812286f,\ +0.4500174494460225105286f,0.0384718659333884716034f,0.483350999653339385986f,\ +0.2981918179430067539215f,0.7112689120694994926453f,0.9268360524438321590424f,\ +0.9477838929742574691772f,0.1729496796615421772003f,0.2750928336754441261292f,\ +0.0044281478039920330048f,0.0611358620226383209229f,0.1950612799264490604401f,\ +0.3789803450927138328552f,0.2549188635312020778656f,0.1764185149222612380981f,\ +0.6008180272765457630157f,0.3703392641618847846985f,0.2908470141701400279999f,\ +0.5384815335273742675781f,0.8090293356217443943024f,0.9260985879227519035339f,\ +0.1576966657303273677826f,0.9518593531101942062378f,0.2709982101805508136749f,\ +0.1609848598018288612366f,0.8782086591236293315887f,0.5091647170484066009521f,\ +0.7951062084175646305084f,0.8432204117998480796814f,0.5806765086017549037933f,\ +0.3487791065126657485962f,0.9397577759809792041779f,0.4363934816792607307434f,\ +0.5549766751937568187714f,0.9105900451540946960449f} + +#define resF {2.7752117685005690539413f,7.3598039969520661074398f,1.8430013620755494319070f,\ +1.0119769763285682007137f,1.6993385961606277678726f,0.2200608028029340801357f,\ +0.9252131842476511991435f,36.817431287256695782162f,0.4899553827958132434794f,\ +1.1507130764601400940705f,2.6313134230453778528158f,0.0686967553341225334318f,\ +11.2347737538324832229f,0.789866483931406127006f,0.0020407415983468750811f,\ +7.9888490080310781138451f,0.0836213561350959977414f,2.0963215107319497221283f,\ +0.8179266816651262761440f,0.1882053431079252492353f,1.155201897048870884888f,\ +0.9956799214310265710992f,0.2910606012483354931852f,0.2720089406327768632998f,\ +1.063498752642826117309f,0.4335550067128443041398f,2.9597983026073131362921f,\ +1.0434438150912359599687f,2.1534158448419846720867f,0.1128122790502419231506f,\ +0.3413230062103223549919f,1.0107219603388561957047f,0.3435046469876847918812f,\ +0.0752888121222041739600f,2.7117196954249602747211f,0.3678375598202789920066f,\ +2.7632475746433664554047f,0.0377790302195727817347f,5.8180376236596496042353f,\ +8.9076410851193781326174f,6.0586471827734049711012f,0.811544194343212454967f,\ +0.7868092691433471452811f,1.519953860611081841725f,5.025698621442897362499f,\ +0.1532288394790210228624f,4.3920222009250329264773f,0.1592332468283501334394f,\ +2.5239872437899073531753f,6.8079779620811464724284f,2.8503439101086094353832f,\ +0.8041174307766172368872f,1.2658559359923549081373f,0.9132013154739780924629f,\ +0.6090095465341773817158f,0.6290090880051657507011f,1.3375418865163728465717f,\ +0.0014780838597850658872f,0.2939520813976195801054f,2.6068534276708055230642f,\ +2.2314984562151556346521f,1.0121077058665004511084f,0.4611080990300331916565f,\ +2.9569108179636049982264f,0.5949053834541859764329f,0.0110948208046701829455f,\ +0.0972005032727465967390f,0.6983023987549834554756f,1.3087278248602665087219f,\ +0.4160770206129594250832f,2.6915632271929834651303f,2.0513552133414121314559f,\ +0.9050207571662129968360f,1.9854292095810492924102f,3.1886775579181523276873f,\ +0.0181548131165850216984f,1.0375101546183984613236f,0.8772270628134669623321f,\ +0.8273833992971273421091f,0.0255796622915918127339f,0.6211799418467155442514f,\ +0.2825347423576584082738f,1.9141416166649365404595f,1.343306808290392950767f,\ +0.5215806118057263462973f,1.0646134004886980140014f,1.364779000566185729326f,\ +0.8797737918544228374884f,0.2597459043795002364696f,1.156753748625715116916f,\ +3.8184655185694236223526f,0.9735320572410287587317f,9.2567222613630804062268f,\ +0.8300445150827541196392f,0.4063865348776212749193f,0.8707942204558346555032f,\ +4.9934134857806107277156f,0.6879450167442484609381f,0.4909447915477189172684f,\ +0.0473166209108797850003f,1.0883443146222897546238f,0.1923382306765068772147f,\ +0.4237905806301724420670f,1.1372737679640729790975f,0.4901024687509485389114f,\ +0.0604719107699394076150f,0.2546820109268255194479f,1.8427253315457512439224f,\ +0.4181623924703986028284f,1.666294246493322805946f,0.5207910027273101594147f,\ +5.1245651389620645588252f,0.4521861558758028531990f,0.1211346345042424582639f,\ +0.2941700392476057634994f,51.447661507511597278608f,4.5431533501455980683659f,\ +0.0879556335187422766442f,0.8713170808873182959786f,0.6585941972519883114146f,\ +0.2848563288520584713126f,1.944925776028375352666f,0.5869478441781880162509f,\ +13.71668430117580506078f,0.4857206798632796584947f,1.1932743827907790201692f,\ +1.874638393179189010951f,0.1404160056424255120788f,0.6236148062319990525992f,\ +1.716588439077007199884f,4.1164108476734497799043f,6.4957825715577062197781f,\ +0.7475799296707237306947f,0.0763619522125708327653f,1.1970576670846393430026f,\ +0.9065383012889166591819f,0.5532489331081913430666f,26.328493784768131291685f,\ +0.7168917986244236484339f,0.8818447169975360822036f,0.0408864734515713840191f,\ +2.9219560966155495584928f,1.5122508845114404074650f,0.7878231471679140174302f,\ +2.8102613515624832452033f,0.7957117880572708301656f,2.9632763586618620088586f,\ +1.9484643697199064416026f,0.5743142952640584164570f,7.7299893461468416333560f,\ +8.6126115055119605301570f,2.745796559591685781498f,2.0136746531937359527831f,\ +0.7531976380193472486724f,8.7544539162835999235313f,5.590284425183250860414f,\ +0.316326575113089591973f,7.4818030879300874147475f,5.2943713451509566425557f,\ +1.1925456627578525647948f,0.6224634971462769117423f,1.1551707631330812020565f,\ +1.6018642624403442997760f,4.0145240548316589723754f,16.46525981416842299154f,\ +1.449977428410007318504f,6.4401300408945045816722f,0.4892212587877478036091f,\ +2.4280658944667354859348f,1.1638650952354832046609f,0.4626199031235405656481f,\ +0.5126578449824196193063f,3.4252645218814619099135f,0.3451139149747912693300f,\ +30.641341518238579766376f,16.221993703869831193742f,3.6977750620030764849844f,\ +0.0305131327385077949499f,0.0831279815198794347353f,0.8642673922787461604500f,\ +1.5254836836115013287696f,1.206264535110818991726f,2.0176360924533236484990f,\ +0.3496446525383871128945f,0.518710521358847098661f,0.2948401642824150514777f,\ +4.7975671656860932046129f,0.98532225779945714628f,0.2162403316114491491629f,\ +3.169147244301254939813f,0.5729503228003851589278f,1.5286951918468318911692f,\ +0.8623569113789728568520f,0.1638452964283871882145f,0.6389747615541933045691f,\ +1.8253859798300935413096f,0.5279736703258748331535f,0.6860929350929130254855f,\ +0.4310587023151768448770f,0.6169827580994304838669f} + + +#define CnumR {0.3053411715663969516754f,0.8684180630370974540710f,0.3313439427874982357025f,\ +0.2663558926433324813843f,0.7923677195794880390167f,0.5093877995386719703674f,\ +0.5743758822791278362274f,0.5372999198734760284424f,0.4547364399768412113190f,\ +0.8820295548066496849060f,0.6209865263663232326508f,0.3768135774880647659302f,\ +0.9335849327035248279572f,0.9658922599628567695618f,0.1628772872500121593475f,\ +0.0686259418725967407227f,0.842607865575700998306f,0.2468038378283381462097f,\ +0.4037963910959661006927f,0.6407211553305387496948f,0.2586575602181255817413f,\ +0.653272570110857486725f,0.8694754014723002910614f,0.5468569807708263397217f,\ +0.9369539530016481876373f,0.8503103395923972129822f,0.0515501177869737148285f,\ +0.6273802313953638076782f,0.8446539309807121753693f,0.6094277473166584968567f,\ +0.2292158487252891063690f,0.8180890753865242004395f,0.1065300428308546543121f,\ +0.4735511047765612602234f,0.3123670606873929500580f,0.5758922155946493148804f,\ +0.9565085847862064838409f,0.4356113011017441749573f,0.0499714012257754802704f,\ +0.4900149442255496978760f,0.7888170615769922733307f,0.8495545452460646629333f,\ +0.4474280974827706813812f,0.0475020725280046463013f,0.9024910223670303821564f,\ +0.2925249831750988960266f,0.7366607296280562877655f,0.0217677354812622070312f,\ +0.0329902716912329196930f,0.5969691900536417961121f,0.7426943792961537837982f,\ +0.4529420714825391769409f,0.2646744553931057453156f,0.7714125374332070350647f,\ +0.9904671530239284038544f,0.6887647770345211029053f,0.4178880215622484683990f,\ +0.0286574354395270347595f,0.3956260806880891323090f,0.4547755364328622817993f,\ +0.5044045564718544483185f,0.640153449960052967072f,0.8830573889426887035370f,\ +0.4225513264536857604980f,0.3449804955162107944489f,0.8352892948314547538757f,\ +0.7769011496566236019135f,0.2447405960410833358765f,0.9427682091481983661652f,\ +0.4643566990271210670471f,0.3058003033511340618134f,0.5256443209946155548096f,\ +0.7063384638167917728424f,0.6439361488446593284607f,0.0671340576373040676117f,\ +0.6960939336568117141724f,0.1160622579045593738556f,0.1034545050933957099915f,\ +0.7939856606535613536835f,0.2613761276006698608398f,0.9276020326651632785797f,\ +0.4516644952818751335144f,0.2685945495031774044037f,0.3909545373171567916870f,\ +0.5062622581608593463898f,0.0817960808053612709045f,0.7260428736917674541473f,\ +0.3187382929027080535889f,0.3859493941999971866608f,0.9341296991333365440369f,\ +0.5919263935647904872894f,0.5226474497467279434204f,0.6464912262745201587677f,\ +0.8347413809970021247864f,0.8977597537450492382050f,0.1522252932190895080566f,\ +0.2030655764974653720856f,0.6291697425767779350281f,0.2178661315701901912689f,\ +0.6730475183576345443726f,0.6014883895404636859894f,0.8297548526898026466370f,\ +0.4715012605302035808563f,0.1966782845556735992432f,0.413111193571239709854f,\ +0.9953989749774336814880f,0.4339618287049233913422f,0.4649231452494859695435f,\ +0.8230779361911118030548f,0.5624991850927472114563f,0.3004282522015273571014f,\ +0.9571288526058197021484f,0.5056911953724920749664f,0.3458018628880381584167f,\ +0.1462918235920369625092f,0.0892800372093915939331f,0.3806377653963863849640f,\ +0.4279290596023201942444f,0.6277162353508174419403f,0.973642762750387191772f,\ +0.3438236177898943424225f,0.6563267400488257408142f,0.7661834782920777797699f,\ +0.7077049557119607925415f,0.566568237263709306717f,0.4663848998025059700012f,\ +0.1607741150073707103729f,0.6611637100577354431152f,0.4569083326496183872223f,\ +0.2494795573875308036804f,0.4719319283030927181244f,0.7297094669193029403687f,\ +0.8767609228380024433136f,0.9846866214647889137268f,0.5204629446379840373993f,\ +0.0243570692837238311768f,0.7086957977153360843658f,0.3529176330193877220154f,\ +0.845518832560628652573f,0.9650736916810274124146f,0.3660673541016876697540f,\ +0.0522273825481534004211f,0.0653146761469542980194f,0.2474536448717117309570f,\ +0.3402558066882193088531f,0.5330434022471308708191f,0.8843311234377324581146f,\ +0.6511900555342435836792f,0.3787677739746868610382f,0.8720673331990838050842f,\ +0.0907509098760783672333f,0.159093420952558517456f,0.3879462392069399356842f,\ +0.0035981675609946250916f,0.3878797567449510097504f,0.355407038703560829163f,\ +0.6540398863144218921661f,0.0270273657515645027161f,0.4033016446046531200409f,\ +0.5721693113446235656738f,0.4763818108476698398590f,0.8092558486387133598328f,\ +0.7195184617303311824799f,0.7523729261010885238647f,0.8064276059158146381378f,\ +0.6007828647270798683167f,0.2698240275494754314423f,0.4986709095537662506104f,\ +0.9864028231240808963776f,0.8842167323455214500427f,0.9431624910794198513031f,\ +0.2763795573264360427856f,0.1813098085112869739532f,0.173957456834614276886f,\ +0.7417211043648421764374f,0.2395282387733459472656f,0.5980439134873449802399f,\ +0.9858012227341532707214f,0.3350073709152638912201f,0.6487060766667127609253f,\ +0.0853690807707607746124f,0.6952167609706521034241f,0.35416056914255023003f,\ +0.3494555018842220306396f,0.2085028053261339664459f,0.503043591044843196869f,\ +0.2702476507984101772308f,0.2799626830965280532837f,0.3920604703016579151154f,\ +0.2273621382191777229309f,0.2002935144118964672089f,0.4767948314547538757324f,\ +0.2251090579666197299957f,0.1402857257053256034851f,0.4847956537269055843353f,\ +0.5474343802779912948608f,0.5220802356489002704620f,0.5684244418516755104065f,\ +0.3804731811396777629852f,0.0783600397408008575439f} + +#define CnumI {0.2332928166724741458893f,0.4757708823308348655701f,0.7120002261362969875336f,\ +0.9474247265607118606567f,0.7988345962949097156525f,0.7477577673271298408508f,\ +0.8264737087301909923553f,0.0092803686857223510742f,0.0395535626448690891266f,\ +0.3952374337241053581238f,0.6943654878996312618256f,0.1225995849817991256714f,\ +0.1789084826596081256866f,0.397133202292025089264f,0.5007088850252330303192f,\ +0.9878442399203777313232f,0.0894288630224764347076f,0.4005126198753714561462f,\ +0.5702695823274552822113f,0.7643308732658624649048f,0.3575342861004173755646f,\ +0.9968325765803456306458f,0.9704508963041007518768f,0.9353430047631263732910f,\ +0.2604631208814680576324f,0.7931062979623675346375f,0.6356834261678159236908f,\ +0.3900403138250112533569f,0.2490606089122593402863f,0.9967422122135758399963f,\ +0.3570490772835910320282f,0.1909146942198276519775f,0.0301763252355158329010f,\ +0.7328046923503279685974f,0.4808894596062600612640f,0.9955431837588548660278f,\ +0.8424210143275558948517f,0.8124466734007000923157f,0.6601486611180007457733f,\ +0.6013877689838409423828f,0.0190328010357916355133f,0.1712641445919871330261f,\ +0.5022003962658345699310f,0.5823920648545026779175f,0.4316027765162289142609f,\ +0.6963225165382027626038f,0.4569095293991267681122f,0.4861248694360256195068f,\ +0.9084099591709673404694f,0.6606048634275794029236f,0.7886779732070863246918f,\ +0.5602205935865640640259f,0.2211156305857002735138f,0.4836320402100682258606f,\ +0.9762249621562659740448f,0.4768665656447410583496f,0.7335670464672148227692f,\ +0.0370046747848391532898f,0.383851700928062200546f,0.0240872111171483993530f,\ +0.3064605225808918476105f,0.2136170351877808570862f,0.5479403878562152385712f,\ +0.2325751073658466339111f,0.5516138956882059574127f,0.9792927717790007591248f,\ +0.9224376133643090724945f,0.9068189132958650588989f,0.0295983594842255115509f,\ +0.6255925344303250312805f,0.4270721334032714366913f,0.0292781740427017211914f,\ +0.4844796755351126194000f,0.4425434647127985954285f,0.6420570178888738155365f,\ +0.0063550006598234176636f,0.7094187592156231403351f,0.530040563084185123444f,\ +0.9930261741392314434052f,0.2249126248061656951904f,0.1368816406466066837311f,\ +0.9666699310764670372009f,0.7699552453123033046722f,0.8880908284336328506470f,\ +0.7472088006325066089630f,0.0547038884833455085754f,0.3238168838433921337128f,\ +0.5991682484745979309082f,0.3892938815988600254059f,0.8600179655477404594421f,\ +0.2847203998826444149017f,0.6622215565294027328491f,0.1071217735297977924347f,\ +0.7656797701492905616760f,0.1452857847325503826141f,0.5683315135538578033447f,\ +0.5659160749055445194244f,0.2579597299918532371521f,0.0530021092854440212250f,\ +0.6360858995467424392700f,0.1716459286399185657501f,0.6635137097910046577454f,\ +0.1553202974610030651f,0.2751293182373046875000f,0.9776422330178320407867f,\ +0.0564875034615397453308f,0.3412302746437489986420f,0.8415098767727613449097f,\ +0.9720732276327908039093f,0.0542932013049721717834f,0.7230724911205470561981f,\ +0.5535727404057979583740f,0.840029454324394464493f,0.7208074321970343589783f,\ +0.7023338205181062221527f,0.4371505621820688247681f,0.7939680931158363819122f,\ +0.2957414807751774787903f,0.9631778332404792308807f,0.7688007876276969909668f,\ +0.5662666731514036655426f,0.9689332796260714530945f,0.2374594449065625667572f,\ +0.9858398344367742538452f,0.1576361586339771747589f,0.4183112764731049537659f,\ +0.1849739397875964641571f,0.5319241471588611602783f,0.4351434097625315189362f,\ +0.3302801763638854026794f,0.2326903692446649074554f,0.6069281268864870071411f,\ +0.1735930186696350574493f,0.6212785588577389717102f,0.7167193251661956310272f,\ +0.2898689359426498413086f,0.6340185203589498996735f,0.5792583702132105827332f,\ +0.1707650884054601192474f,0.0036281775683164596558f,0.2730329786427319049835f,\ +0.6438362905755639076233f,0.1048121522180736064911f,0.7902204506099224090576f,\ +0.6767889470793306827545f,0.0438669761642813682556f,0.1177961206994950771332f,\ +0.3653587792068719863892f,0.3132978049106895923615f,0.011188176460564136505f,\ +0.6880089822225272655487f,0.4210669174790382385254f,0.1968584679998457431793f,\ +0.7892877263948321342468f,0.484988757874816656113f,0.1450885292142629623413f,\ +0.0583454747684299945831f,0.1556424135342240333557f,0.5466435248963534832001f,\ +0.4258432425558567047119f,0.1151064471341669559479f,0.6764787202700972557068f,\ +0.1653598151169717311859f,0.7116795796900987625122f,0.0342189264483749866486f,\ +0.4127054410055279731750f,0.8268453883938491344452f,0.9931747615337371826172f,\ +0.1828565844334661960602f,0.2957681743428111076355f,0.0454563810490071773529f,\ +0.8772313874214887619019f,0.7595148091204464435577f,0.8921756902709603309631f,\ +0.4397588293068110942841f,0.2217209897935390472412f,0.8998456657864153385162f,\ +0.7754481723532080650330f,0.8920745677314698696136f,0.2994244638830423355103f,\ +0.3508522328920662403107f,0.2242373349145054817200f,0.1357615026645362377167f,\ +0.9600193724036216735840f,0.8071923130191862583160f,0.4653684152290225028992f,\ +0.6139782606624066829681f,0.7588641252368688583374f,0.503341518808156251907f,\ +0.1805540407076478004456f,0.953683211933821439743f,0.5213290341198444366455f,\ +0.1553657338954508304596f,0.4955299710854887962341f,0.8986178687773644924164f,\ +0.3114242423325777053833f,0.8460529488511383533478f,0.1703627156093716621399f,\ +0.0450246590189635753632f,0.2734745293855667114258f} + +#define CdenR {0.9344860189594328403473f,0.3965423358604311943054f,0.0580797134898602962494f,\ +0.7199462261050939559937f,0.8066167463548481464386f,0.5438358867540955543518f,\ +0.4561666990630328655243f,0.6244952566921710968018f,0.8038424537517130374908f,\ +0.3628496741876006126404f,0.7627365640364587306976f,0.6913486588746309280396f,\ +0.3727206629700958728790f,0.2957791136577725410461f,0.3323325174860656261444f,\ +0.0008663684129714965820f,0.5690847137011587619781f,0.4434423623606562614441f,\ +0.3870133324526250362396f,0.8737571369856595993042f,0.7361443494446575641632f,\ +0.9391816863790154457092f,0.5137898693792521953583f,0.4900970868766307830811f,\ +0.9071956784464418888092f,0.6801867028698325157166f,0.9960459745489060878754f,\ +0.7876451406627893447876f,0.5266905096359550952911f,0.1349894972518086433411f,\ +0.3226937535218894481659f,0.1082053259015083312988f,0.5834150635637342929840f,\ +0.4458816153928637504578f,0.7188132195733487606049f,0.5607859548181295394897f,\ +0.7495280583389103412628f,0.5450029307976365089417f,0.0415263171307742595673f,\ +0.5703056789934635162354f,0.6192081705667078495026f,0.5028523867949843406677f,\ +0.8848553202114999294281f,0.5805964190512895584106f,0.6406608712859451770782f,\ +0.8279706137254834175110f,0.2373156058602035045624f,0.3804531693458557128906f,\ +0.8352346369065344333649f,0.9365444211289286613464f,0.5359928025864064693451f,\ +0.0214806776493787765503f,0.8973965351469814777374f,0.5106831649318337440491f,\ +0.4608543138019740581512f,0.7964869998395442962646f,0.7693171859718859195709f,\ +0.9641169896349310874939f,0.3130452162586152553558f,0.2471739295870065689087f,\ +0.2838150975294411182404f,0.7340669455006718635559f,0.3209185334853827953339f,\ +0.6698743030428886413574f,0.9694103770889341831207f,0.6180369807407259941101f,\ +0.7175498842261731624603f,0.0880861785262823104858f,0.6112378169782459735870f,\ +0.8742778087034821510315f,0.9334865058772265911102f,0.1605538912117481231689f,\ +0.6615693555213510990143f,0.3046726500615477561951f,0.7484806529246270656586f,\ +0.9936459828168153762817f,0.0936959129758179187775f,0.0387948499992489814758f,\ +0.7459573703818023204803f,0.3267800062894821166992f,0.7929186024703085422516f,\ +0.2378873704001307487488f,0.9139666422270238399506f,0.0596442054957151412964f,\ +0.0783993159420788288116f,0.4375141570344567298889f,0.7363699148409068584442f,\ +0.5899660699069499969482f,0.4496206850744783878326f,0.7476333817467093467712f,\ +0.6180109954439103603363f,0.9305777642875909805298f,0.1512054172344505786896f,\ +0.6288425596430897712708f,0.9876213255338370800018f,0.0745284333825111389160f,\ +0.6498450064100325107574f,0.4635455412790179252625f,0.9222096293233335018158f,\ +0.5769933816045522689819f,0.6170878191478550434113f,0.6407913798466324806213f,\ +0.6366859371773898601532f,0.8227301277220249176025f,0.5117365554906427860260f,\ +0.3735350733622908592224f,0.6824699840508401393890f,0.9478313345462083816528f,\ +0.3556050849147140979767f,0.9670701818540692329407f,0.1988339829258620738983f,\ +0.8845246136188507080078f,0.7963846572674810886383f,0.7573833195492625236511f,\ +0.0607297732494771480560f,0.4977692048996686935425f,0.0513694887049496173859f,\ +0.4381805220618844032288f,0.2668503443710505962372f,0.2823995314538478851318f,\ +0.8257917226292192935944f,0.9953354885801672935486f,0.4116757339797914028168f,\ +0.5895656291395425796509f,0.7995157656259834766388f,0.9675096990540623664856f,\ +0.5852533015422523021698f,0.8512204512953758239746f,0.7758419984020292758942f,\ +0.251694406382739543915f,0.5444623767398297786713f,0.7714040484279394149780f,\ +0.0861698617227375507355f,0.1724245036020874977112f,0.4995132829062640666962f,\ +0.9530746228992938995361f,0.3442703173495829105377f,0.0334142660722136497498f,\ +0.3594307354651391506195f,0.9292364586144685745239f,0.1439176839776337146759f,\ +0.8703649686649441719055f,0.7802716153673827648163f,0.0671147257089614868164f,\ +0.7936308481730520725250f,0.6236943779513239860535f,0.8598271175287663936615f,\ +0.3141271602362394332886f,0.6822738503105938434601f,0.4499381193891167640686f,\ +0.8225592742674052715302f,0.2544026188552379608154f,0.3692658455111086368561f,\ +0.3905729195103049278259f,0.5385218537412583827972f,0.4445965085178613662720f,\ +0.9931504395790398120880f,0.1170117231085896492004f,0.2200156333856284618378f,\ +0.4977530911564826965332f,0.0922743999399244785309f,0.9705206854268908500671f,\ +0.1397280483506619930267f,0.8839646633714437484741f,0.4313257415778934955597f,\ +0.0158080393448472023010f,0.714107214938849210739f,0.9165776111185550689697f,\ +0.9274811879731714725494f,0.3270348375663161277771f,0.7957203290425240993500f,\ +0.8926953393965959548950f,0.2699130070395767688751f,0.2249975698068737983704f,\ +0.5183464395813643932343f,0.8567280769348144531250f,0.3264052220620214939117f,\ +0.6842326549813151359558f,0.5385535969398915767670f,0.9557395558804273605347f,\ +0.9308291976340115070343f,0.6287928083911538124084f,0.0175103764049708843231f,\ +0.8553405664861202239990f,0.1452286005951464176178f,0.3354452839121222496033f,\ +0.1867817766033113002777f,0.1848793867975473403931f,0.5902637359686195850372f,\ +0.6630419911816716194153f,0.8418594929389655590057f,0.4806790873408317565918f,\ +0.9377652578987181186676f,0.3268114877864718437195f,0.6071765660308301448822f,\ +0.5960717108100652694702f,0.1591472555883228778839f,0.9363228464499115943909f,\ +0.3163564051501452922821f,0.0469793267548084259033f} + +#define CdenI {0.6234297142364084720612f,0.0158713972195982933044f,0.3514461866579949855804f,\ +0.2617919612675905227661f,0.6386203509755432605743f,0.7260363446548581123352f,\ +0.2848846274428069591522f,0.2042924016714096069336f,0.5302058258093893527985f,\ +0.5051602600142359733582f,0.6679541333578526973724f,0.3383778762072324752808f,\ +0.850502327550202608109f,0.3495004484429955482483f,0.3094673226587474346161f,\ +0.4033286087214946746826f,0.8126155347563326358795f,0.9508021911606192588806f,\ +0.8884379244409501552582f,0.9683732483536005020142f,0.5427599516697227954865f,\ +0.4100438626483082771301f,0.2444860520772635936737f,0.2353011742234230041504f,\ +0.2446876191534101963043f,0.7461039228364825248718f,0.1897278516553342342377f,\ +0.0578716751188039779663f,0.8699762006290256977081f,0.9180997842922806739807f,\ +0.1858995254151523113251f,0.6467700041830539703369f,0.3879264430142939090729f,\ +0.5801485544070601463318f,0.730465730186551809311f,0.9288603086024522781372f,\ +0.2488190126605331897736f,0.2872996525838971138000f,0.7954623508267104625702f,\ +0.0294854342937469482422f,0.1342807062901556491852f,0.3713893024250864982605f,\ +0.1628236486576497554779f,0.8465636055916547775269f,0.5885100369341671466827f,\ +0.2055668989196419715881f,0.9999437849037349224091f,0.1852319799363613128662f,\ +0.6241121948696672916412f,0.0762432506307959556580f,0.5192227191291749477386f,\ +0.4217870775610208511353f,0.896293383557349443f,0.3812106968834996223450f,\ +0.0653464826755225658417f,0.1656720861792564392090f,0.5391645305790007114410f,\ +0.37268509995192289352f,0.4740518270991742610931f,0.8882610406726598739624f,\ +0.2579043735750019550323f,0.1640197122469544410706f,0.0461252476088702678680f,\ +0.9871898777782917022705f,0.7705319211818277835846f,0.2188409185037016868591f,\ +0.980386381503194570541f,0.2549843657761812210083f,0.1930382889695465564728f,\ +0.0413558529689908027649f,0.6094057816080749034882f,0.2207349091768264770508f,\ +0.461627910379320383072f,0.2865818915888667106628f,0.2817070647142827510834f,\ +0.3335682284086942672729f,0.3858191226609051227570f,0.0092480191960930824280f,\ +0.2342034350149333477020f,0.4566659145057201385498f,0.4261541278101503849030f,\ +0.270118071697652339935f,0.2986185825429856777191f,0.6405798587948083877563f,\ +0.7902683285064995288849f,0.8184858532622456550598f,0.7856419566087424755096f,\ +0.6445945575833320617676f,0.9410690390504896640778f,0.0695921285077929496765f,\ +0.390568414237350225449f,0.1748862918466329574585f,0.1107735713012516498566f,\ +0.0957134896889328956604f,0.4641722436062991619110f,0.3082291819155216217041f,\ +0.9145566956140100955963f,0.8496730988845229148865f,0.4925655624829232692719f,\ +0.0699981171637773513794f,0.6575574767775833606720f,0.3395233051851391792297f,\ +0.1297910916619002819061f,0.6352185606956481933594f,0.4289954849518835544586f,\ +0.9731501368805766105652f,0.6268993034027516841888f,0.1214132290333509445190f,\ +0.5771463816054165363312f,0.7915496686473488807678f,0.0012599448673427104950f,\ +0.4419956468045711517334f,0.6589268804527819156647f,0.8095262637361884117126f,\ +0.7898579365573823451996f,0.188960576429963111877f,0.4578390833921730518341f,\ +0.1825626911595463752747f,0.7303236457519233226776f,0.0136213228106498718262f,\ +0.1640241914428770542145f,0.4186121178790926933289f,0.2134475349448621273041f,\ +0.4741439130157232284546f,0.3101755906827747821808f,0.3535619759932160377502f,\ +0.8509291852824389934540f,0.8186281509697437286377f,0.5570613131858408451080f,\ +0.1091197049245238304138f,0.0021106950007379055023f,0.672485547140240669250f,\ +0.9224058729596436023712f,0.7518703686073422431946f,0.6034444528631865978241f,\ +0.0988641232252120971680f,0.5468814768828451633453f,0.8722561476752161979675f,\ +0.1444452865980565547943f,0.0008700918406248092651f,0.5909586106427013874054f,\ +0.8022277066484093666077f,0.1338769863359630107880f,0.3343364112079143524170f,\ +0.3563659996725618839264f,0.6903174361214041709900f,0.8999232030473649501801f,\ +0.0998882148414850234985f,0.2259099450893700122833f,0.1528845699504017829895f,\ +0.0680927219800651073456f,0.583055116236209869385f,0.5154030346311628818512f,\ +0.7202821774408221244812f,0.5606091110967099666595f,0.8111803885549306869507f,\ +0.8314522285945713520050f,0.7966960305348038673401f,0.461034744512289762497f,\ +0.6958770193159580230713f,0.0288563207723200321198f,0.3524053459987044334412f,\ +0.5878792009316384792328f,0.8297806400805711746216f,0.3613627743907272815704f,\ +0.0672154026105999946594f,0.1209420370869338512421f,0.4063493311405181884766f,\ +0.9195339330472052097321f,0.1438120333477854728699f,0.1241399361751973628998f,\ +0.2314603012055158615112f,0.9494726066477596759796f,0.5097879925742745399475f,\ +0.3085682312957942485809f,0.2955534420907497406006f,0.1461570323444902896881f,\ +0.6270911982282996177673f,0.8795468038879334926605f,0.8750717584043741226196f,\ +0.5151352104730904102325f,0.6276448490098118782043f,0.8114003571681678295135f,\ +0.6319486722350120544434f,0.8963286154903471469879f,0.993889416567981243134f,\ +0.3937230645678937435150f,0.6798922028392553329468f,0.7436952819116413593292f,\ +0.5029965126886963844299f,0.3928775931708514690399f,0.0862160213291645050049f,\ +0.2545022652484476566315f,0.6535046314820647239685f,0.6724785021506249904633f,\ +0.7779673803597688674927f,0.4419574779458343982697f,0.2931267665699124336243f,\ +0.6166100162081420421600f,0.3211019188165664672852f} + +#define CresR {0.3413653404019424408844f,2.2344175132148005324950f,2.1237218282923966405917f,\ +0.7493983164371829097661f,1.0858058063650062319f,0.9963985742180326843354f,\ +1.7198459262738128305870f,0.7815935562983117312896f,0.4168186594367536690342f,\ +1.3434321178932697726793f,0.911981962098162846075f,0.5097276544552961086154f,\ +0.5800104757173830671846f,2.0248874122369300287971f,1.0139055454283181223474f,\ +2.4495834700657685978342f,0.5610503386826638516638f,0.4454135788712355603636f,\ +0.7059129145012976724871f,0.7641626882509497953322f,0.4596127107989450566450f,\ +0.9734226406968744527148f,2.11268587616383074490f,1.6514323746615073851274f,\ +1.0349501481365763755349f,1.1479258233356381957435f,0.1672526298534715016864f,\ +0.8284385303102398401265f,0.6396332288988267888996f,1.1582175459339878464959f,\ +1.0119106336592462724866f,0.4929993395227346142384f,0.1504653403320495019813f,\ +1.1884643322263739317890f,0.5482451200711300209889f,1.0598086350679480904802f,\ +1.4855469245373162934243f,1.2404193423039560073562f,0.830908077323986193896f,\ +0.9112975150307812688411f,1.2230604711603207945814f,1.2559316454335625046212f,\ +0.5901059335842906428127f,0.4940502601806018856401f,1.09963502912498500841f,\ +0.5294677251535109263614f,0.5980886022378320010517f,0.5491452413615373062683f,\ +0.5468552505333802438159f,0.6902652211980354612919f,1.4501824712567750186309f,\ +1.3793191693357471638848f,0.2708476457471271636734f,1.4239995156368174811234f,\ +2.4012806448426622374370f,0.9482606453144745151107f,0.8124230280115316560341f,\ +0.0387678777428724016807f,0.9476082607188328621461f,0.1573979226170175715893f,\ +1.5108565390498809311026f,0.8925265062168799001796f,2.9364002910736672902203f,\ +0.3601917477926637189967f,0.4952564150219139760267f,1.6995003182761128091016f,\ +0.9903629069483265157103f,3.4734281760775056469015f,1.4164126838708399613864f,\ +0.5637181281840756286172f,0.4391155260043713703944f,1.219532688839149781046f,\ +1.0617216756450393866373f,1.8462770813715381201803f,0.3613617707295509462462f,\ +0.6315225765784978628758f,1.8053180173336429437114f,5.605127943643565480158f,\ +1.349328766634644738431f,0.5965910648384068482031f,0.9796604801276147522771f,\ +2.8448353799993113533162f,0.5142295803637606521619f,1.4308076569382042197986f,\ +0.9992318982023101758827f,0.0935304462073433817704f,0.6805157366122644990725f,\ +0.7520873083410550830052f,0.4963212817230637230459f,1.3448718058840083422467f,\ +0.8924911603158937056790f,0.6716532521789868592776f,3.1200451601260867917631f,\ +1.478499310078411177471f,0.8011780670061466880227f,1.8548329051165655112499f,\ +0.5160221223573354665248f,0.5452818070700454766708f,0.2076910047948466175871f,\ +1.2813550735284107151557f,0.5952417563705699743437f,1.4394238409977426762509f,\ +0.7587547408032722096038f,0.3115367449470753391516f,1.414649105208534374256f,\ +0.3927913048603896561950f,0.5939705886124994060893f,0.5944847773666142032312f,\ +1.8577169333514007565356f,0.3758234853000304576121f,1.5339323343426742862761f,\ +1.116121226627056151059f,0.8950120949596866992692f,0.6879113661687396019673f,\ +0.8981211671217470549067f,0.4481619497382871020186f,1.8047253449076017250974f,\ +1.0717620357356092419820f,1.4405626096661212631744f,3.570753936008602469343f,\ +0.5315872522905110697522f,0.9081793608312455079457f,1.7025195075778205566763f,\ +1.5455421881448592191788f,0.6824200177072907713693f,0.5646419316678596977965f,\ +0.2357892895516306430714f,0.7157266029643406524130f,0.6543068980500212905582f,\ +1.3132657769450220008878f,0.8684289380809445679787f,0.9271940107372679262809f,\ +0.2745953215375174782942f,1.0703580135019064023538f,1.1284422825202322648863f,\ +0.0564974518240219866771f,1.4145448514301877107613f,0.6785956954965183252071f,\ +2.1896764463982005821663f,1.038569068022475949675f,0.5785592848631732065812f,\ +0.4010837209168781058999f,0.1037023542206769177731f,2.4148146045420944005855f,\ +0.6754632195277164852243f,0.4190924885379074260605f,0.5592558922536016163818f,\ +2.2185337467253001264567f,0.6373271305375159956341f,1.7451524244169134281179f,\ +0.1783458684376775515990f,0.7066899058816989986909f,0.6087518348022638026151f,\ +0.8489046778360708200850f,0.7955983798271689666493f,0.3222066680434101937358f,\ +0.4160981511553115685942f,0.1961119885990144917631f,1.3057726707544050626097f,\ +0.7938951027372486146660f,5.0581062357227910553092f,0.9603173499915351740697f,\ +0.5415899445306877613149f,0.8541967975696214132597f,1.1376185966292806650557f,\ +7.8101696249237857472281f,0.5579431766320509522572f,0.8561650695644498210157f,\ +0.6349136758399940294595f,2.5988805040218991848633f,1.1658310378368867965548f,\ +0.5288397109111128147063f,0.7903478048871180883239f,1.5908154714750957214875f,\ +1.4294252157474178765995f,0.3296353175046571881701f,2.5544776256060197638931f,\ +1.3475391966885494898776f,0.9072979951101491913334f,0.5252607760481237120231f,\ +0.2298981251807218351146f,0.7321363209598960031244f,0.1766547027080781206987f,\ +0.8007189844811546386438f,0.9142431669921511350196f,0.5737031361189844913540f,\ +1.5387393815389021067830f,1.1435666477442363309081f,0.6719421582664103498317f,\ +0.3487701038639369754968f,0.6294893055431936002009f,1.1494708028880735728450f,\ +0.2654596481228954640841f,0.6924444380609823257444f,1.0947349491748781247225f,\ +0.5919494967059079071348f,2.071145426993481919453f,0.6047707100555417270016f,\ +0.3084136738554988932393f,0.8687822411868708627480f} + +#define CresI {0.0219109966763084765273f,1.1103670771212392764937f,-0.5918368028005515091294f,\ +1.0434644203834322340185f,0.1306902089737067562680f,0.0447491408259363745992f,\ +0.7377040968923224140141f,-0.2408236963367206551201f,-0.2257234835603764977474f,\ +-0.7810702459548169995784f,0.1117074633441673542356f,-0.0721502465312851976043f,\ +-0.8435050915509633151501f,-1.049992518033896704566f,0.5625036390262730945366f,\ +-0.1648871384055887456821f,-0.6439978954764388197063f,-0.0518389509872686157776f,\ +-0.1469980941163145371497f,0.0278523259422256141971f,0.1468121211307574225380f,\ +0.6363908130534828844205f,0.8834908864782332615917f,1.1156137069476812495594f,\ +0.0079625965633239471214f,-0.0931592189119542501974f,0.6063484612701055542772f,\ +0.4343290787716013179320f,-0.5836541037614180194026f,-0.493498147842463708024f,\ +0.5235160857005297652123f,-1.1824047439401572656692f,-0.0483243591007337727761f,\ +0.0971532051319880102236f,0.1118721601976361557096f,0.0198453756455191573926f,\ +0.6307818500498493241579f,0.8368296783852913200974f,-0.0194438478253851909638f,\ +1.0073856655194393106001f,-0.2344940357203251779517f,-0.5870021518253613068694f,\ +0.4589645174626295065501f,0.2827215082048526451075f,-0.3364392688062524672254f,\ +0.7095438756660266133025f,-0.5947584050308961645115f,1.0103887681286427557836f,\ +0.6789839686067032920036f,0.6491702747352749991450f,0.0666245648735558637643f,\ +-1.0036186112629006395025f,-0.0241179026237156347856f,-0.1159462687897936661319f,\ +1.7778063339362362160756f,0.4014707664509557516475f,0.3841554190219366171632f,\ +0.0233959826824065887652f,-0.2087996335518906843021f,-0.4681854256220141508038f,\ +-0.2931344646872880987942f,0.0915789695713074419769f,1.2853673263170140028677f,\ +-0.1836203292999986358414f,0.1753674426864008650817f,0.9827446901351732932994f,\ +-0.0675920858186050965699f,0.2400947924345945561075f,-0.3989012373127470145739f,\ +0.6888879992257213036311f,0.1708354561724222675512f,-1.4942974066568359692297f,\ +-0.0085262156571510854669f,-0.2841282722500402813104f,0.7218073734380161532442f,\ +-0.2056072987186062794862f,0.1375998721241953604011f,12.326487466095862544080f,\ +0.9075702833828449556108f,-0.1454500841220424389721f,-0.3538884268045125458535f,\ +0.8332871291164858362777f,0.6744192932692324449206f,-0.4770914152325650969821f,\ +-0.5414909663443179255182f,-0.0499400036212993420071f,-0.2863028848988973251721f,\ +0.1938702385181169662864f,-0.1729873927835128832875f,1.0251354376600190221325f,\ +-0.1033289986643653041165f,0.5853982662761465505241f,-1.5773030876847142778274f,\ +0.9925655191551649991766f,-0.2294389866838563163398f,-0.0453802022491614914790f,\ +0.1446261599175696077602f,-0.4430018940967428986433f,-0.0534578318707713412428f,\ +0.9469665933810936797599f,-0.3561239290952777913901f,0.2727810879337961291746f,\ +0.0892758706129039708577f,0.0938769505403498488727f,0.7245215338127788395894f,\ +-0.8720932299519229546902f,-0.0456129563594555031969f,0.8116755927992604924270f,\ +-0.2814959142726781715638f,-0.2514706362757610502712f,3.626843914392277934411f,\ +0.0681179652920591155452f,0.3142726625144375840470f,0.2164361294071718844201f,\ +-0.1161590262194092948445f,0.7080904530777263339303f,-0.6288889647478734801211f,\ +0.2283938107922484916923f,-0.3331421737315601871998f,2.550154357127961901597f,\ +0.5801384184232324381369f,0.5915175342680475401025f,-0.3059183157675403053055f,\ +0.4291810802949616032720f,-0.0675832494807970945994f,0.2260187774838739449557f,\ +-0.0267679793135976069884f,-0.0634263407834385756212f,0.0910679623605792354368f,\ +0.7428730935396401502402f,0.4240097947794032040569f,-0.0215145937633346648332f,\ +-0.924863020672384794629f,-1.0641870004695814788676f,0.0716038804713836907201f,\ +0.2982802795008926421971f,-0.4054077568543104082011f,-0.3786076564490707396793f,\ +-0.4048717571779728574555f,0.0029320062413039386581f,-0.4785486439953212656206f,\ +0.3700468522583569841444f,0.1165347960482350370137f,-0.2553835663348579809728f,\ +0.5494706041406317575948f,-0.393525875328799512598f,-0.448335747177200538705f,\ +0.4576280623833377525500f,0.2481690713632272726752f,-0.5681196823051390953907f,\ +0.8216610616768642572083f,0.0354860822693221777957f,-0.3165580473134032568616f,\ +0.4553229569175886171095f,0.0723630008683885939114f,-0.261538718222994404083f,\ +-0.2896039198710382289725f,-0.0051211050224549813786f,-0.2516323222313812113526f,\ +-0.2543632926363337265485f,-0.3343493853594096121284f,0.3483261689873968225406f,\ +-1.0951963511455886646218f,0.0032621374671314572365f,-0.8737574633254471256905f,\ +-7.1013395362907472119218f,1.0633789830820299382452f,0.7040022037881576988383f,\ +-0.4323193723566287616222f,-0.2384520130907536727971f,-0.124754648028884251865f,\ +0.8455583392591451419307f,0.0337190814024200535837f,0.3608797400846083802683f,\ +-0.0025395781382081018818f,0.1450823667587325949135f,1.6129974683352308328921f,\ +-0.1016931838187624531633f,0.1746595259838300551181f,-0.1676360531992882596519f,\ +0.2496952334332681877616f,-0.3741840755319263966960f,-0.4326683809083690657182f,\ +0.53078982935711849223f,-0.0844874840225433576535f,-0.3125071808699463327130f,\ +0.0435860282499331078143f,-0.1008112495086985055393f,0.0061350643233381426875f,\ +0.0077278585702864046811f,0.8390604068373108681556f,0.8783952661568765751809f,\ +0.0936328696083998102129f,0.1316181510631146966972f,0.2675204528497137079768f,\ +-0.2501262083422521320664f,-0.4354788291243042452905f,-0.0073818204603310075620f,\ +-0.4588062674027434395541f,-0.1169262242084459640923f} + + +#define ZnumR {0.3053411715663969516754,0.8684180630370974540710,0.3313439427874982357025,\ +0.2663558926433324813843,0.7923677195794880390167,0.5093877995386719703674,\ +0.5743758822791278362274,0.5372999198734760284424,0.4547364399768412113190,\ +0.8820295548066496849060,0.6209865263663232326508,0.3768135774880647659302,\ +0.9335849327035248279572,0.9658922599628567695618,0.1628772872500121593475,\ +0.0686259418725967407227,0.842607865575700998306,0.2468038378283381462097,\ +0.4037963910959661006927,0.6407211553305387496948,0.2586575602181255817413,\ +0.653272570110857486725,0.8694754014723002910614,0.5468569807708263397217,\ +0.9369539530016481876373,0.8503103395923972129822,0.0515501177869737148285,\ +0.6273802313953638076782,0.8446539309807121753693,0.6094277473166584968567,\ +0.2292158487252891063690,0.8180890753865242004395,0.1065300428308546543121,\ +0.4735511047765612602234,0.3123670606873929500580,0.5758922155946493148804,\ +0.9565085847862064838409,0.4356113011017441749573,0.0499714012257754802704,\ +0.4900149442255496978760,0.7888170615769922733307,0.8495545452460646629333,\ +0.4474280974827706813812,0.0475020725280046463013,0.9024910223670303821564,\ +0.2925249831750988960266,0.7366607296280562877655,0.0217677354812622070312,\ +0.0329902716912329196930,0.5969691900536417961121,0.7426943792961537837982,\ +0.4529420714825391769409,0.2646744553931057453156,0.7714125374332070350647,\ +0.9904671530239284038544,0.6887647770345211029053,0.4178880215622484683990,\ +0.0286574354395270347595,0.3956260806880891323090,0.4547755364328622817993,\ +0.5044045564718544483185,0.640153449960052967072,0.8830573889426887035370,\ +0.4225513264536857604980,0.3449804955162107944489,0.8352892948314547538757,\ +0.7769011496566236019135,0.2447405960410833358765,0.9427682091481983661652,\ +0.4643566990271210670471,0.3058003033511340618134,0.5256443209946155548096,\ +0.7063384638167917728424,0.6439361488446593284607,0.0671340576373040676117,\ +0.6960939336568117141724,0.1160622579045593738556,0.1034545050933957099915,\ +0.7939856606535613536835,0.2613761276006698608398,0.9276020326651632785797,\ +0.4516644952818751335144,0.2685945495031774044037,0.3909545373171567916870,\ +0.5062622581608593463898,0.0817960808053612709045,0.7260428736917674541473,\ +0.3187382929027080535889,0.3859493941999971866608,0.9341296991333365440369,\ +0.5919263935647904872894,0.5226474497467279434204,0.6464912262745201587677,\ +0.8347413809970021247864,0.8977597537450492382050,0.1522252932190895080566,\ +0.2030655764974653720856,0.6291697425767779350281,0.2178661315701901912689,\ +0.6730475183576345443726,0.6014883895404636859894,0.8297548526898026466370,\ +0.4715012605302035808563,0.1966782845556735992432,0.413111193571239709854,\ +0.9953989749774336814880,0.4339618287049233913422,0.4649231452494859695435,\ +0.8230779361911118030548,0.5624991850927472114563,0.3004282522015273571014,\ +0.9571288526058197021484,0.5056911953724920749664,0.3458018628880381584167,\ +0.1462918235920369625092,0.0892800372093915939331,0.3806377653963863849640,\ +0.4279290596023201942444,0.6277162353508174419403,0.973642762750387191772,\ +0.3438236177898943424225,0.6563267400488257408142,0.7661834782920777797699,\ +0.7077049557119607925415,0.566568237263709306717,0.4663848998025059700012,\ +0.1607741150073707103729,0.6611637100577354431152,0.4569083326496183872223,\ +0.2494795573875308036804,0.4719319283030927181244,0.7297094669193029403687,\ +0.8767609228380024433136,0.9846866214647889137268,0.5204629446379840373993,\ +0.0243570692837238311768,0.7086957977153360843658,0.3529176330193877220154,\ +0.845518832560628652573,0.9650736916810274124146,0.3660673541016876697540,\ +0.0522273825481534004211,0.0653146761469542980194,0.2474536448717117309570,\ +0.3402558066882193088531,0.5330434022471308708191,0.8843311234377324581146,\ +0.6511900555342435836792,0.3787677739746868610382,0.8720673331990838050842,\ +0.0907509098760783672333,0.159093420952558517456,0.3879462392069399356842,\ +0.0035981675609946250916,0.3878797567449510097504,0.355407038703560829163,\ +0.6540398863144218921661,0.0270273657515645027161,0.4033016446046531200409,\ +0.5721693113446235656738,0.4763818108476698398590,0.8092558486387133598328,\ +0.7195184617303311824799,0.7523729261010885238647,0.8064276059158146381378,\ +0.6007828647270798683167,0.2698240275494754314423,0.4986709095537662506104,\ +0.9864028231240808963776,0.8842167323455214500427,0.9431624910794198513031,\ +0.2763795573264360427856,0.1813098085112869739532,0.173957456834614276886,\ +0.7417211043648421764374,0.2395282387733459472656,0.5980439134873449802399,\ +0.9858012227341532707214,0.3350073709152638912201,0.6487060766667127609253,\ +0.0853690807707607746124,0.6952167609706521034241,0.35416056914255023003,\ +0.3494555018842220306396,0.2085028053261339664459,0.503043591044843196869,\ +0.2702476507984101772308,0.2799626830965280532837,0.3920604703016579151154,\ +0.2273621382191777229309,0.2002935144118964672089,0.4767948314547538757324,\ +0.2251090579666197299957,0.1402857257053256034851,0.4847956537269055843353,\ +0.5474343802779912948608,0.5220802356489002704620,0.5684244418516755104065,\ +0.3804731811396777629852,0.0783600397408008575439} + +#define ZnumI {0.2332928166724741458893,0.4757708823308348655701,0.7120002261362969875336,\ +0.9474247265607118606567,0.7988345962949097156525,0.7477577673271298408508,\ +0.8264737087301909923553,0.0092803686857223510742,0.0395535626448690891266,\ +0.3952374337241053581238,0.6943654878996312618256,0.1225995849817991256714,\ +0.1789084826596081256866,0.397133202292025089264,0.5007088850252330303192,\ +0.9878442399203777313232,0.0894288630224764347076,0.4005126198753714561462,\ +0.5702695823274552822113,0.7643308732658624649048,0.3575342861004173755646,\ +0.9968325765803456306458,0.9704508963041007518768,0.9353430047631263732910,\ +0.2604631208814680576324,0.7931062979623675346375,0.6356834261678159236908,\ +0.3900403138250112533569,0.2490606089122593402863,0.9967422122135758399963,\ +0.3570490772835910320282,0.1909146942198276519775,0.0301763252355158329010,\ +0.7328046923503279685974,0.4808894596062600612640,0.9955431837588548660278,\ +0.8424210143275558948517,0.8124466734007000923157,0.6601486611180007457733,\ +0.6013877689838409423828,0.0190328010357916355133,0.1712641445919871330261,\ +0.5022003962658345699310,0.5823920648545026779175,0.4316027765162289142609,\ +0.6963225165382027626038,0.4569095293991267681122,0.4861248694360256195068,\ +0.9084099591709673404694,0.6606048634275794029236,0.7886779732070863246918,\ +0.5602205935865640640259,0.2211156305857002735138,0.4836320402100682258606,\ +0.9762249621562659740448,0.4768665656447410583496,0.7335670464672148227692,\ +0.0370046747848391532898,0.383851700928062200546,0.0240872111171483993530,\ +0.3064605225808918476105,0.2136170351877808570862,0.5479403878562152385712,\ +0.2325751073658466339111,0.5516138956882059574127,0.9792927717790007591248,\ +0.9224376133643090724945,0.9068189132958650588989,0.0295983594842255115509,\ +0.6255925344303250312805,0.4270721334032714366913,0.0292781740427017211914,\ +0.4844796755351126194000,0.4425434647127985954285,0.6420570178888738155365,\ +0.0063550006598234176636,0.7094187592156231403351,0.530040563084185123444,\ +0.9930261741392314434052,0.2249126248061656951904,0.1368816406466066837311,\ +0.9666699310764670372009,0.7699552453123033046722,0.8880908284336328506470,\ +0.7472088006325066089630,0.0547038884833455085754,0.3238168838433921337128,\ +0.5991682484745979309082,0.3892938815988600254059,0.8600179655477404594421,\ +0.2847203998826444149017,0.6622215565294027328491,0.1071217735297977924347,\ +0.7656797701492905616760,0.1452857847325503826141,0.5683315135538578033447,\ +0.5659160749055445194244,0.2579597299918532371521,0.0530021092854440212250,\ +0.6360858995467424392700,0.1716459286399185657501,0.6635137097910046577454,\ +0.1553202974610030651,0.2751293182373046875000,0.9776422330178320407867,\ +0.0564875034615397453308,0.3412302746437489986420,0.8415098767727613449097,\ +0.9720732276327908039093,0.0542932013049721717834,0.7230724911205470561981,\ +0.5535727404057979583740,0.840029454324394464493,0.7208074321970343589783,\ +0.7023338205181062221527,0.4371505621820688247681,0.7939680931158363819122,\ +0.2957414807751774787903,0.9631778332404792308807,0.7688007876276969909668,\ +0.5662666731514036655426,0.9689332796260714530945,0.2374594449065625667572,\ +0.9858398344367742538452,0.1576361586339771747589,0.4183112764731049537659,\ +0.1849739397875964641571,0.5319241471588611602783,0.4351434097625315189362,\ +0.3302801763638854026794,0.2326903692446649074554,0.6069281268864870071411,\ +0.1735930186696350574493,0.6212785588577389717102,0.7167193251661956310272,\ +0.2898689359426498413086,0.6340185203589498996735,0.5792583702132105827332,\ +0.1707650884054601192474,0.0036281775683164596558,0.2730329786427319049835,\ +0.6438362905755639076233,0.1048121522180736064911,0.7902204506099224090576,\ +0.6767889470793306827545,0.0438669761642813682556,0.1177961206994950771332,\ +0.3653587792068719863892,0.3132978049106895923615,0.011188176460564136505,\ +0.6880089822225272655487,0.4210669174790382385254,0.1968584679998457431793,\ +0.7892877263948321342468,0.484988757874816656113,0.1450885292142629623413,\ +0.0583454747684299945831,0.1556424135342240333557,0.5466435248963534832001,\ +0.4258432425558567047119,0.1151064471341669559479,0.6764787202700972557068,\ +0.1653598151169717311859,0.7116795796900987625122,0.0342189264483749866486,\ +0.4127054410055279731750,0.8268453883938491344452,0.9931747615337371826172,\ +0.1828565844334661960602,0.2957681743428111076355,0.0454563810490071773529,\ +0.8772313874214887619019,0.7595148091204464435577,0.8921756902709603309631,\ +0.4397588293068110942841,0.2217209897935390472412,0.8998456657864153385162,\ +0.7754481723532080650330,0.8920745677314698696136,0.2994244638830423355103,\ +0.3508522328920662403107,0.2242373349145054817200,0.1357615026645362377167,\ +0.9600193724036216735840,0.8071923130191862583160,0.4653684152290225028992,\ +0.6139782606624066829681,0.7588641252368688583374,0.503341518808156251907,\ +0.1805540407076478004456,0.953683211933821439743,0.5213290341198444366455,\ +0.1553657338954508304596,0.4955299710854887962341,0.8986178687773644924164,\ +0.3114242423325777053833,0.8460529488511383533478,0.1703627156093716621399,\ +0.0450246590189635753632,0.2734745293855667114258} + +#define ZdenR {0.9344860189594328403473,0.3965423358604311943054,0.0580797134898602962494,\ +0.7199462261050939559937,0.8066167463548481464386,0.5438358867540955543518,\ +0.4561666990630328655243,0.6244952566921710968018,0.8038424537517130374908,\ +0.3628496741876006126404,0.7627365640364587306976,0.6913486588746309280396,\ +0.3727206629700958728790,0.2957791136577725410461,0.3323325174860656261444,\ +0.0008663684129714965820,0.5690847137011587619781,0.4434423623606562614441,\ +0.3870133324526250362396,0.8737571369856595993042,0.7361443494446575641632,\ +0.9391816863790154457092,0.5137898693792521953583,0.4900970868766307830811,\ +0.9071956784464418888092,0.6801867028698325157166,0.9960459745489060878754,\ +0.7876451406627893447876,0.5266905096359550952911,0.1349894972518086433411,\ +0.3226937535218894481659,0.1082053259015083312988,0.5834150635637342929840,\ +0.4458816153928637504578,0.7188132195733487606049,0.5607859548181295394897,\ +0.7495280583389103412628,0.5450029307976365089417,0.0415263171307742595673,\ +0.5703056789934635162354,0.6192081705667078495026,0.5028523867949843406677,\ +0.8848553202114999294281,0.5805964190512895584106,0.6406608712859451770782,\ +0.8279706137254834175110,0.2373156058602035045624,0.3804531693458557128906,\ +0.8352346369065344333649,0.9365444211289286613464,0.5359928025864064693451,\ +0.0214806776493787765503,0.8973965351469814777374,0.5106831649318337440491,\ +0.4608543138019740581512,0.7964869998395442962646,0.7693171859718859195709,\ +0.9641169896349310874939,0.3130452162586152553558,0.2471739295870065689087,\ +0.2838150975294411182404,0.7340669455006718635559,0.3209185334853827953339,\ +0.6698743030428886413574,0.9694103770889341831207,0.6180369807407259941101,\ +0.7175498842261731624603,0.0880861785262823104858,0.6112378169782459735870,\ +0.8742778087034821510315,0.9334865058772265911102,0.1605538912117481231689,\ +0.6615693555213510990143,0.3046726500615477561951,0.7484806529246270656586,\ +0.9936459828168153762817,0.0936959129758179187775,0.0387948499992489814758,\ +0.7459573703818023204803,0.3267800062894821166992,0.7929186024703085422516,\ +0.2378873704001307487488,0.9139666422270238399506,0.0596442054957151412964,\ +0.0783993159420788288116,0.4375141570344567298889,0.7363699148409068584442,\ +0.5899660699069499969482,0.4496206850744783878326,0.7476333817467093467712,\ +0.6180109954439103603363,0.9305777642875909805298,0.1512054172344505786896,\ +0.6288425596430897712708,0.9876213255338370800018,0.0745284333825111389160,\ +0.6498450064100325107574,0.4635455412790179252625,0.9222096293233335018158,\ +0.5769933816045522689819,0.6170878191478550434113,0.6407913798466324806213,\ +0.6366859371773898601532,0.8227301277220249176025,0.5117365554906427860260,\ +0.3735350733622908592224,0.6824699840508401393890,0.9478313345462083816528,\ +0.3556050849147140979767,0.9670701818540692329407,0.1988339829258620738983,\ +0.8845246136188507080078,0.7963846572674810886383,0.7573833195492625236511,\ +0.0607297732494771480560,0.4977692048996686935425,0.0513694887049496173859,\ +0.4381805220618844032288,0.2668503443710505962372,0.2823995314538478851318,\ +0.8257917226292192935944,0.9953354885801672935486,0.4116757339797914028168,\ +0.5895656291395425796509,0.7995157656259834766388,0.9675096990540623664856,\ +0.5852533015422523021698,0.8512204512953758239746,0.7758419984020292758942,\ +0.251694406382739543915,0.5444623767398297786713,0.7714040484279394149780,\ +0.0861698617227375507355,0.1724245036020874977112,0.4995132829062640666962,\ +0.9530746228992938995361,0.3442703173495829105377,0.0334142660722136497498,\ +0.3594307354651391506195,0.9292364586144685745239,0.1439176839776337146759,\ +0.8703649686649441719055,0.7802716153673827648163,0.0671147257089614868164,\ +0.7936308481730520725250,0.6236943779513239860535,0.8598271175287663936615,\ +0.3141271602362394332886,0.6822738503105938434601,0.4499381193891167640686,\ +0.8225592742674052715302,0.2544026188552379608154,0.3692658455111086368561,\ +0.3905729195103049278259,0.5385218537412583827972,0.4445965085178613662720,\ +0.9931504395790398120880,0.1170117231085896492004,0.2200156333856284618378,\ +0.4977530911564826965332,0.0922743999399244785309,0.9705206854268908500671,\ +0.1397280483506619930267,0.8839646633714437484741,0.4313257415778934955597,\ +0.0158080393448472023010,0.714107214938849210739,0.9165776111185550689697,\ +0.9274811879731714725494,0.3270348375663161277771,0.7957203290425240993500,\ +0.8926953393965959548950,0.2699130070395767688751,0.2249975698068737983704,\ +0.5183464395813643932343,0.8567280769348144531250,0.3264052220620214939117,\ +0.6842326549813151359558,0.5385535969398915767670,0.9557395558804273605347,\ +0.9308291976340115070343,0.6287928083911538124084,0.0175103764049708843231,\ +0.8553405664861202239990,0.1452286005951464176178,0.3354452839121222496033,\ +0.1867817766033113002777,0.1848793867975473403931,0.5902637359686195850372,\ +0.6630419911816716194153,0.8418594929389655590057,0.4806790873408317565918,\ +0.9377652578987181186676,0.3268114877864718437195,0.6071765660308301448822,\ +0.5960717108100652694702,0.1591472555883228778839,0.9363228464499115943909,\ +0.3163564051501452922821,0.0469793267548084259033} + +#define ZdenI {0.6234297142364084720612,0.0158713972195982933044,0.3514461866579949855804,\ +0.2617919612675905227661,0.6386203509755432605743,0.7260363446548581123352,\ +0.2848846274428069591522,0.2042924016714096069336,0.5302058258093893527985,\ +0.5051602600142359733582,0.6679541333578526973724,0.3383778762072324752808,\ +0.850502327550202608109,0.3495004484429955482483,0.3094673226587474346161,\ +0.4033286087214946746826,0.8126155347563326358795,0.9508021911606192588806,\ +0.8884379244409501552582,0.9683732483536005020142,0.5427599516697227954865,\ +0.4100438626483082771301,0.2444860520772635936737,0.2353011742234230041504,\ +0.2446876191534101963043,0.7461039228364825248718,0.1897278516553342342377,\ +0.0578716751188039779663,0.8699762006290256977081,0.9180997842922806739807,\ +0.1858995254151523113251,0.6467700041830539703369,0.3879264430142939090729,\ +0.5801485544070601463318,0.730465730186551809311,0.9288603086024522781372,\ +0.2488190126605331897736,0.2872996525838971138000,0.7954623508267104625702,\ +0.0294854342937469482422,0.1342807062901556491852,0.3713893024250864982605,\ +0.1628236486576497554779,0.8465636055916547775269,0.5885100369341671466827,\ +0.2055668989196419715881,0.9999437849037349224091,0.1852319799363613128662,\ +0.6241121948696672916412,0.0762432506307959556580,0.5192227191291749477386,\ +0.4217870775610208511353,0.896293383557349443,0.3812106968834996223450,\ +0.0653464826755225658417,0.1656720861792564392090,0.5391645305790007114410,\ +0.37268509995192289352,0.4740518270991742610931,0.8882610406726598739624,\ +0.2579043735750019550323,0.1640197122469544410706,0.0461252476088702678680,\ +0.9871898777782917022705,0.7705319211818277835846,0.2188409185037016868591,\ +0.980386381503194570541,0.2549843657761812210083,0.1930382889695465564728,\ +0.0413558529689908027649,0.6094057816080749034882,0.2207349091768264770508,\ +0.461627910379320383072,0.2865818915888667106628,0.2817070647142827510834,\ +0.3335682284086942672729,0.3858191226609051227570,0.0092480191960930824280,\ +0.2342034350149333477020,0.4566659145057201385498,0.4261541278101503849030,\ +0.270118071697652339935,0.2986185825429856777191,0.6405798587948083877563,\ +0.7902683285064995288849,0.8184858532622456550598,0.7856419566087424755096,\ +0.6445945575833320617676,0.9410690390504896640778,0.0695921285077929496765,\ +0.390568414237350225449,0.1748862918466329574585,0.1107735713012516498566,\ +0.0957134896889328956604,0.4641722436062991619110,0.3082291819155216217041,\ +0.9145566956140100955963,0.8496730988845229148865,0.4925655624829232692719,\ +0.0699981171637773513794,0.6575574767775833606720,0.3395233051851391792297,\ +0.1297910916619002819061,0.6352185606956481933594,0.4289954849518835544586,\ +0.9731501368805766105652,0.6268993034027516841888,0.1214132290333509445190,\ +0.5771463816054165363312,0.7915496686473488807678,0.0012599448673427104950,\ +0.4419956468045711517334,0.6589268804527819156647,0.8095262637361884117126,\ +0.7898579365573823451996,0.188960576429963111877,0.4578390833921730518341,\ +0.1825626911595463752747,0.7303236457519233226776,0.0136213228106498718262,\ +0.1640241914428770542145,0.4186121178790926933289,0.2134475349448621273041,\ +0.4741439130157232284546,0.3101755906827747821808,0.3535619759932160377502,\ +0.8509291852824389934540,0.8186281509697437286377,0.5570613131858408451080,\ +0.1091197049245238304138,0.0021106950007379055023,0.672485547140240669250,\ +0.9224058729596436023712,0.7518703686073422431946,0.6034444528631865978241,\ +0.0988641232252120971680,0.5468814768828451633453,0.8722561476752161979675,\ +0.1444452865980565547943,0.0008700918406248092651,0.5909586106427013874054,\ +0.8022277066484093666077,0.1338769863359630107880,0.3343364112079143524170,\ +0.3563659996725618839264,0.6903174361214041709900,0.8999232030473649501801,\ +0.0998882148414850234985,0.2259099450893700122833,0.1528845699504017829895,\ +0.0680927219800651073456,0.583055116236209869385,0.5154030346311628818512,\ +0.7202821774408221244812,0.5606091110967099666595,0.8111803885549306869507,\ +0.8314522285945713520050,0.7966960305348038673401,0.461034744512289762497,\ +0.6958770193159580230713,0.0288563207723200321198,0.3524053459987044334412,\ +0.5878792009316384792328,0.8297806400805711746216,0.3613627743907272815704,\ +0.0672154026105999946594,0.1209420370869338512421,0.4063493311405181884766,\ +0.9195339330472052097321,0.1438120333477854728699,0.1241399361751973628998,\ +0.2314603012055158615112,0.9494726066477596759796,0.5097879925742745399475,\ +0.3085682312957942485809,0.2955534420907497406006,0.1461570323444902896881,\ +0.6270911982282996177673,0.8795468038879334926605,0.8750717584043741226196,\ +0.5151352104730904102325,0.6276448490098118782043,0.8114003571681678295135,\ +0.6319486722350120544434,0.8963286154903471469879,0.993889416567981243134,\ +0.3937230645678937435150,0.6798922028392553329468,0.7436952819116413593292,\ +0.5029965126886963844299,0.3928775931708514690399,0.0862160213291645050049,\ +0.2545022652484476566315,0.6535046314820647239685,0.6724785021506249904633,\ +0.7779673803597688674927,0.4419574779458343982697,0.2931267665699124336243,\ +0.6166100162081420421600,0.3211019188165664672852} + +#define ZresR {0.3413653404019424408844,2.2344175132148005324950,2.1237218282923966405917,\ +0.7493983164371829097661,1.0858058063650062319,0.9963985742180326843354,\ +1.7198459262738128305870,0.7815935562983117312896,0.4168186594367536690342,\ +1.3434321178932697726793,0.911981962098162846075,0.5097276544552961086154,\ +0.5800104757173830671846,2.0248874122369300287971,1.0139055454283181223474,\ +2.4495834700657685978342,0.5610503386826638516638,0.4454135788712355603636,\ +0.7059129145012976724871,0.7641626882509497953322,0.4596127107989450566450,\ +0.9734226406968744527148,2.11268587616383074490,1.6514323746615073851274,\ +1.0349501481365763755349,1.1479258233356381957435,0.1672526298534715016864,\ +0.8284385303102398401265,0.6396332288988267888996,1.1582175459339878464959,\ +1.0119106336592462724866,0.4929993395227346142384,0.1504653403320495019813,\ +1.1884643322263739317890,0.5482451200711300209889,1.0598086350679480904802,\ +1.4855469245373162934243,1.2404193423039560073562,0.830908077323986193896,\ +0.9112975150307812688411,1.2230604711603207945814,1.2559316454335625046212,\ +0.5901059335842906428127,0.4940502601806018856401,1.09963502912498500841,\ +0.5294677251535109263614,0.5980886022378320010517,0.5491452413615373062683,\ +0.5468552505333802438159,0.6902652211980354612919,1.4501824712567750186309,\ +1.3793191693357471638848,0.2708476457471271636734,1.4239995156368174811234,\ +2.4012806448426622374370,0.9482606453144745151107,0.8124230280115316560341,\ +0.0387678777428724016807,0.9476082607188328621461,0.1573979226170175715893,\ +1.5108565390498809311026,0.8925265062168799001796,2.9364002910736672902203,\ +0.3601917477926637189967,0.4952564150219139760267,1.6995003182761128091016,\ +0.9903629069483265157103,3.4734281760775056469015,1.4164126838708399613864,\ +0.5637181281840756286172,0.4391155260043713703944,1.219532688839149781046,\ +1.0617216756450393866373,1.8462770813715381201803,0.3613617707295509462462,\ +0.6315225765784978628758,1.8053180173336429437114,5.605127943643565480158,\ +1.349328766634644738431,0.5965910648384068482031,0.9796604801276147522771,\ +2.8448353799993113533162,0.5142295803637606521619,1.4308076569382042197986,\ +0.9992318982023101758827,0.0935304462073433817704,0.6805157366122644990725,\ +0.7520873083410550830052,0.4963212817230637230459,1.3448718058840083422467,\ +0.8924911603158937056790,0.6716532521789868592776,3.1200451601260867917631,\ +1.478499310078411177471,0.8011780670061466880227,1.8548329051165655112499,\ +0.5160221223573354665248,0.5452818070700454766708,0.2076910047948466175871,\ +1.2813550735284107151557,0.5952417563705699743437,1.4394238409977426762509,\ +0.7587547408032722096038,0.3115367449470753391516,1.414649105208534374256,\ +0.3927913048603896561950,0.5939705886124994060893,0.5944847773666142032312,\ +1.8577169333514007565356,0.3758234853000304576121,1.5339323343426742862761,\ +1.116121226627056151059,0.8950120949596866992692,0.6879113661687396019673,\ +0.8981211671217470549067,0.4481619497382871020186,1.8047253449076017250974,\ +1.0717620357356092419820,1.4405626096661212631744,3.570753936008602469343,\ +0.5315872522905110697522,0.9081793608312455079457,1.7025195075778205566763,\ +1.5455421881448592191788,0.6824200177072907713693,0.5646419316678596977965,\ +0.2357892895516306430714,0.7157266029643406524130,0.6543068980500212905582,\ +1.3132657769450220008878,0.8684289380809445679787,0.9271940107372679262809,\ +0.2745953215375174782942,1.0703580135019064023538,1.1284422825202322648863,\ +0.0564974518240219866771,1.4145448514301877107613,0.6785956954965183252071,\ +2.1896764463982005821663,1.038569068022475949675,0.5785592848631732065812,\ +0.4010837209168781058999,0.1037023542206769177731,2.4148146045420944005855,\ +0.6754632195277164852243,0.4190924885379074260605,0.5592558922536016163818,\ +2.2185337467253001264567,0.6373271305375159956341,1.7451524244169134281179,\ +0.1783458684376775515990,0.7066899058816989986909,0.6087518348022638026151,\ +0.8489046778360708200850,0.7955983798271689666493,0.3222066680434101937358,\ +0.4160981511553115685942,0.1961119885990144917631,1.3057726707544050626097,\ +0.7938951027372486146660,5.0581062357227910553092,0.9603173499915351740697,\ +0.5415899445306877613149,0.8541967975696214132597,1.1376185966292806650557,\ +7.8101696249237857472281,0.5579431766320509522572,0.8561650695644498210157,\ +0.6349136758399940294595,2.5988805040218991848633,1.1658310378368867965548,\ +0.5288397109111128147063,0.7903478048871180883239,1.5908154714750957214875,\ +1.4294252157474178765995,0.3296353175046571881701,2.5544776256060197638931,\ +1.3475391966885494898776,0.9072979951101491913334,0.5252607760481237120231,\ +0.2298981251807218351146,0.7321363209598960031244,0.1766547027080781206987,\ +0.8007189844811546386438,0.9142431669921511350196,0.5737031361189844913540,\ +1.5387393815389021067830,1.1435666477442363309081,0.6719421582664103498317,\ +0.3487701038639369754968,0.6294893055431936002009,1.1494708028880735728450,\ +0.2654596481228954640841,0.6924444380609823257444,1.0947349491748781247225,\ +0.5919494967059079071348,2.071145426993481919453,0.6047707100555417270016,\ +0.3084136738554988932393,0.8687822411868708627480} + +#define ZresI {0.0219109966763084765273,1.1103670771212392764937,-0.5918368028005515091294,\ +1.0434644203834322340185,0.1306902089737067562680,0.0447491408259363745992,\ +0.7377040968923224140141,-0.2408236963367206551201,-0.2257234835603764977474,\ +-0.7810702459548169995784,0.1117074633441673542356,-0.0721502465312851976043,\ +-0.8435050915509633151501,-1.049992518033896704566,0.5625036390262730945366,\ +-0.1648871384055887456821,-0.6439978954764388197063,-0.0518389509872686157776,\ +-0.1469980941163145371497,0.0278523259422256141971,0.1468121211307574225380,\ +0.6363908130534828844205,0.8834908864782332615917,1.1156137069476812495594,\ +0.0079625965633239471214,-0.0931592189119542501974,0.6063484612701055542772,\ +0.4343290787716013179320,-0.5836541037614180194026,-0.493498147842463708024,\ +0.5235160857005297652123,-1.1824047439401572656692,-0.0483243591007337727761,\ +0.0971532051319880102236,0.1118721601976361557096,0.0198453756455191573926,\ +0.6307818500498493241579,0.8368296783852913200974,-0.0194438478253851909638,\ +1.0073856655194393106001,-0.2344940357203251779517,-0.5870021518253613068694,\ +0.4589645174626295065501,0.2827215082048526451075,-0.3364392688062524672254,\ +0.7095438756660266133025,-0.5947584050308961645115,1.0103887681286427557836,\ +0.6789839686067032920036,0.6491702747352749991450,0.0666245648735558637643,\ +-1.0036186112629006395025,-0.0241179026237156347856,-0.1159462687897936661319,\ +1.7778063339362362160756,0.4014707664509557516475,0.3841554190219366171632,\ +0.0233959826824065887652,-0.2087996335518906843021,-0.4681854256220141508038,\ +-0.2931344646872880987942,0.0915789695713074419769,1.2853673263170140028677,\ +-0.1836203292999986358414,0.1753674426864008650817,0.9827446901351732932994,\ +-0.0675920858186050965699,0.2400947924345945561075,-0.3989012373127470145739,\ +0.6888879992257213036311,0.1708354561724222675512,-1.4942974066568359692297,\ +-0.0085262156571510854669,-0.2841282722500402813104,0.7218073734380161532442,\ +-0.2056072987186062794862,0.1375998721241953604011,12.326487466095862544080,\ +0.9075702833828449556108,-0.1454500841220424389721,-0.3538884268045125458535,\ +0.8332871291164858362777,0.6744192932692324449206,-0.4770914152325650969821,\ +-0.5414909663443179255182,-0.0499400036212993420071,-0.2863028848988973251721,\ +0.1938702385181169662864,-0.1729873927835128832875,1.0251354376600190221325,\ +-0.1033289986643653041165,0.5853982662761465505241,-1.5773030876847142778274,\ +0.9925655191551649991766,-0.2294389866838563163398,-0.0453802022491614914790,\ +0.1446261599175696077602,-0.4430018940967428986433,-0.0534578318707713412428,\ +0.9469665933810936797599,-0.3561239290952777913901,0.2727810879337961291746,\ +0.0892758706129039708577,0.0938769505403498488727,0.7245215338127788395894,\ +-0.8720932299519229546902,-0.0456129563594555031969,0.8116755927992604924270,\ +-0.2814959142726781715638,-0.2514706362757610502712,3.626843914392277934411,\ +0.0681179652920591155452,0.3142726625144375840470,0.2164361294071718844201,\ +-0.1161590262194092948445,0.7080904530777263339303,-0.6288889647478734801211,\ +0.2283938107922484916923,-0.3331421737315601871998,2.550154357127961901597,\ +0.5801384184232324381369,0.5915175342680475401025,-0.3059183157675403053055,\ +0.4291810802949616032720,-0.0675832494807970945994,0.2260187774838739449557,\ +-0.0267679793135976069884,-0.0634263407834385756212,0.0910679623605792354368,\ +0.7428730935396401502402,0.4240097947794032040569,-0.0215145937633346648332,\ +-0.924863020672384794629,-1.0641870004695814788676,0.0716038804713836907201,\ +0.2982802795008926421971,-0.4054077568543104082011,-0.3786076564490707396793,\ +-0.4048717571779728574555,0.0029320062413039386581,-0.4785486439953212656206,\ +0.3700468522583569841444,0.1165347960482350370137,-0.2553835663348579809728,\ +0.5494706041406317575948,-0.393525875328799512598,-0.448335747177200538705,\ +0.4576280623833377525500,0.2481690713632272726752,-0.5681196823051390953907,\ +0.8216610616768642572083,0.0354860822693221777957,-0.3165580473134032568616,\ +0.4553229569175886171095,0.0723630008683885939114,-0.261538718222994404083,\ +-0.2896039198710382289725,-0.0051211050224549813786,-0.2516323222313812113526,\ +-0.2543632926363337265485,-0.3343493853594096121284,0.3483261689873968225406,\ +-1.0951963511455886646218,0.0032621374671314572365,-0.8737574633254471256905,\ +-7.1013395362907472119218,1.0633789830820299382452,0.7040022037881576988383,\ +-0.4323193723566287616222,-0.2384520130907536727971,-0.124754648028884251865,\ +0.8455583392591451419307,0.0337190814024200535837,0.3608797400846083802683,\ +-0.0025395781382081018818,0.1450823667587325949135,1.6129974683352308328921,\ +-0.1016931838187624531633,0.1746595259838300551181,-0.1676360531992882596519,\ +0.2496952334332681877616,-0.3741840755319263966960,-0.4326683809083690657182,\ +0.53078982935711849223,-0.0844874840225433576535,-0.3125071808699463327130,\ +0.0435860282499331078143,-0.1008112495086985055393,0.0061350643233381426875,\ +0.0077278585702864046811,0.8390604068373108681556,0.8783952661568765751809,\ +0.0936328696083998102129,0.1316181510631146966972,0.2675204528497137079768,\ +-0.2501262083422521320664,-0.4354788291243042452905,-0.0073818204603310075620,\ +-0.4588062674027434395541,-0.1169262242084459640923} + + + + + + + + + +static void srdivsTest() +{ + float tIn1[]=numF; + float tIn2[]=denF; + float tRes[]=resF; + int i =0; + float out=0; + + for(i=0;i<200;i++){ + out=srdivs(tIn1[i],tIn2[i]); + assert( (fabs(out-tRes[i]) / fabs(out) ) <1e-6); + } +} + + +static void drdivsTest() +{ + double tIn1[]=numD; + double tIn2[]=denD; + double tRes[]=resD; + int i =0; + double out=0; + + for(i=0;i<200;i++){ + out=drdivs(tIn1[i],tIn2[i]); + /* +printf("%d : %f ; num = %f;erreur = %1.25f\n",i,out,tIn1[i],fabs(out-tRes[i]) / fabs(out)); + */ + assert( (fabs(out-tRes[i]) / fabs(out) ) <3e-16); + } +} + + +static void crdivsTest() +{ + float NR[]=CnumR; + float NI[]=CnumI; + float DR[]=CdenR; + float DI[]=CdenI; + float RR[]=CresR; + float RI[]=CresI; + int i=0; + floatComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1 = FloatComplex(NR[i],NI[i]); + in2 = FloatComplex(DR[i],DI[i]); + out = crdivs(in1,in2); + assert( ( fabs(creals(out)-RR[i]) / fabs(creals(out)) ) < 1e-6); + if (( fabs(cimags(out)-RI[i]) / fabs(cimags(out)) ) >= 1e-5 ) + { + printf("%d : %1.25f ; num = %1.25f;erreur = %1.25f\n",i,cimags(out),RI[i], fabs(cimags(out)-RI[i]) / fabs(cimags(out))); + } + assert( ( fabs(cimags(out)-RI[i]) / fabs(cimags(out)) ) < 1e-5); + } +} + + +static void zrdivsTest() +{ + double NR[]=ZnumR; + double NI[]=ZnumI; + double DR[]=ZdenR; + double DI[]=ZdenI; + double RR[]=ZresR; + double RI[]=ZresI; + int i=0; + doubleComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1 = DoubleComplex(NR[i],NI[i]); + in2 = DoubleComplex(DR[i],DI[i]); + out = zrdivs(in1,in2); + printf("%d : %1.25f ; num = %1.25f;erreur = %1.25f\n",i,zreals(out),RR[i], fabs(zreals(out)-RR[i]) ); + assert( ( fabs(zreals(out)-RR[i]) ) < 1e-14); + printf("%d : %1.25f ; num = %1.25f;erreur = %1.25f\n",i,zimags(out),RI[i], fabs(zimags(out)-RI[i]) ); + assert( ( fabs(zimags(out)-RI[i]) ) < 1e-14); + } +} + + + +static void srdivaTest() +{ + float tIn1[]=numF; + float tIn2[]=denF; + float tRes[]=resF; + int i =0; + float out[200]; + + srdiva(tIn1,tIn2,200,out); + for(i=0;i<200;i++){ + assert( (fabs(out[i]-tRes[i]) / fabs(out[i]) ) <1e-6); + } +} + + +static void drdivaTest() +{ + double tIn1[]=numD; + double tIn2[]=denD; + double tRes[]=resD; + int i =0; + double out[200]; + + drdiva(tIn1,tIn2,200,out); + for(i=0;i<200;i++){ + printf("%d : %f ; num = %f;erreur = %1.25f\n",i,out[i],tIn1[i],fabs(out[i]-tRes[i]) / fabs(out[i])); + assert( (fabs(out[i]-tRes[i]) / fabs(out[i]) ) <1e-16); + } +} + + +static void crdivaTest() +{ + float NR[]=CnumR; + float NI[]=CnumI; + float DR[]=CdenR; + float DI[]=CdenI; + float RR[]=CresR; + float RI[]=CresI; + int i=0; + floatComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i] = FloatComplex(NR[i],NI[i]); + in2[i] = FloatComplex(DR[i],DI[i]); + } + + crdiva(in1,in2,200,out); + + for (i=0;i<200;i++){ + assert( ( fabs(creals(out[i])-RR[i]) ) < 1e-6); + assert( ( fabs(cimags(out[i])-RI[i]) ) < 3e-6); + } +} + + +static void zrdivaTest() +{ + double NR[]=ZnumR; + double NI[]=ZnumI; + double DR[]=ZdenR; + double DI[]=ZdenI; + double RR[]=ZresR; + double RI[]=ZresI; + int i=0; + doubleComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i] = DoubleComplex(NR[i],NI[i]); + in2[i] = DoubleComplex(DR[i],DI[i]); + } + + zrdiva(in1,in2,200,out); + + for (i=0;i<200;i++){ + assert( ( fabs(zreals(out[i])-RR[i]) ) < 1e-14); + assert( ( fabs(zimags(out[i])-RI[i]) ) < 1e-14); + } +} + + +static int testRDivision(void) { + printf(">>>SCALAIRES<<<\n");printf("\n");printf("\n"); + srdivsTest(); + drdivsTest(); + crdivsTest(); + zrdivsTest(); + printf(">>>ARRAYS<<<\n");printf("\n");printf("\n"); + srdivaTest(); + drdivaTest(); + crdivaTest(); + zrdivaTest(); + return 0; +} + + + +int main(void) { + assert(testRDivision() == 0); + return 0; +} diff --git a/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj b/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj new file mode 100644 index 00000000..2152b84a --- /dev/null +++ b/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {7A424759-5962-4AE5-ABB6-0B94DDD21F61} + testLDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj.filters b/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj.filters new file mode 100644 index 00000000..52f6e131 --- /dev/null +++ b/2.3-1/src/c/operations/division/test_LDivision/testLDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj b/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj new file mode 100644 index 00000000..68f805b1 --- /dev/null +++ b/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BF995E6F-88C9-4175-9EE3-ECB3D270AEA6} + testRDivision + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj.filters b/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj.filters new file mode 100644 index 00000000..44c67e7a --- /dev/null +++ b/2.3-1/src/c/operations/division/test_RDivision/testRDivision.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/division/zldiva.c b/2.3-1/src/c/operations/division/zldiva.c new file mode 100644 index 00000000..b6e3dbae --- /dev/null +++ b/2.3-1/src/c/operations/division/zldiva.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "division.h" + +void zldiva (doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out ){ + int i=0; + for (i=0;i= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + + +#include "doubleComplex.h" +#include "division.h" + +/* +** \function zdivides +** \brief Divide 2 Complex numbers. +*/ +doubleComplex zrdivs(doubleComplex z1, doubleComplex z2) { +#ifndef STDC99 + return DoubleComplex((z1.real*z2.real + z1.imag*z2.imag) / (z2.real*z2.real + z2.imag* z2.imag), + (z1.imag*z2.real - z1.real*z2.imag) / (z2.real*z2.real + z2.imag* z2.imag)); +#else + return z1 / z2; +#endif +} diff --git a/2.3-1/src/c/operations/includes/addition.h b/2.3-1/src/c/operations/includes/addition.h new file mode 100644 index 00000000..d6f03381 --- /dev/null +++ b/2.3-1/src/c/operations/includes/addition.h @@ -0,0 +1,115 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __ADDITION_H__ +#define __ADDITION_H__ + +#include "dynlib_operations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + +/* +** \brief Compute an addition with floats. +** \param in1 : input float. +** \param in2 : input float. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS float sadds(float in1, float in2); + +/* +** \brief Compute an addition element ways for floats. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +EXTERN_OPERATIONS void sadda(float *in1, int size1, + float *in2, int size2, + float *out); + +/* +** \brief Compute an addition with double. +** \param in1 : input double. +** \param in2 : input double. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS double dadds(double in1, double in2); + +/* +** \brief Compute an addition element ways for double. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +EXTERN_OPERATIONS void dadda(double *in1, int size1, + double *in2, int size2, + double * out); + +/* +** \brief Compute an addition with floats Complex. +** \param in1 : input float complex. +** \param in2 : input float complex. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS floatComplex cadds(floatComplex in1, floatComplex in2); + +/* +** \brief Compute an addition element ways for complex single precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +EXTERN_OPERATIONS void cadda(floatComplex *in1, int size1, + floatComplex *in2, int size2, + floatComplex *out); + +/* +** \brief Compute an addition with double complex. +** \param in1 : input double complex. +** \param in2 : input double conplex. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS doubleComplex zadds(doubleComplex in1, doubleComplex in2); + +/* +** \brief Compute an addition element ways for complex double precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the addition in1 + in2. +*/ +EXTERN_OPERATIONS void zadda(doubleComplex *in1, int size1, + doubleComplex *in2, int size2, + doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__ADDITION_H__ */ diff --git a/2.3-1/src/c/operations/includes/division.h b/2.3-1/src/c/operations/includes/division.h new file mode 100644 index 00000000..df4c5d2a --- /dev/null +++ b/2.3-1/src/c/operations/includes/division.h @@ -0,0 +1,181 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __DIVISION_H__ +#define __DIVISION_H__ + +#include "dynlib_operations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + + +/* +** RIGHT DIVISION +*/ + +/* +** \brief Compute a right division for floats. +** \param in1 : input float. +** \param in2 : input float. +** \return in1 / in2 = in1 ./ in2. +*/ +EXTERN_OPERATIONS float srdivs (float in1, float in2); + +/* +** \brief Compute a right division element ways for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 ./ in2. +*/ +EXTERN_OPERATIONS void srdiva (float* in1, float* in2, int size, float* out ); + +/* +** \brief Compute a right division for double. +** \param in1 : input double. +** \param in2 : input double. +** \return in1 / in2 = in1 ./ in2. +*/ +EXTERN_OPERATIONS double drdivs (double in1, double in2); + +/* +** \brief Compute a right division element ways for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 ./ in2. +*/ +EXTERN_OPERATIONS void drdiva (double* in1, double* in2, int size, double* out ); + +/* +** \brief Compute a right division for floats complex. +** \param in1 : input float complex. +** \param in2 : input float complex. +** \return in1 / in2 = in1 ./ in2. +*/ +EXTERN_OPERATIONS floatComplex crdivs (floatComplex in1, floatComplex in2); + +/* +** \brief Compute a right division element ways for float complex. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 ./ in2. +*/ +EXTERN_OPERATIONS void crdiva(floatComplex* in1, floatComplex* in2, int size, floatComplex* out ); + +/* +** \brief Compute a right division for double complex. +** \param in1 : input double complex. +** \param in2 : input double complex. +** \return in1 / in2 = in1 ./ in2. +*/ +EXTERN_OPERATIONS doubleComplex zrdivs (doubleComplex in1, doubleComplex in2); + +/* +** \brief Compute a right division element ways for double complex. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 ./ in2. +*/ +EXTERN_OPERATIONS void zrdiva(doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out ); + +/* +** LEFT DIVISION +*/ + +/* +** \brief Compute a left division for floats. +** \param in1 : input float. +** \param in2 : input float. +** \return in1 \ in2 = in1 .\ in2. +*/ +EXTERN_OPERATIONS float sldivs (float in1, float in2); + +/* +** \brief Compute a left division element ways for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 .\ in2. +*/ +EXTERN_OPERATIONS void sldiva (float* in1, float* in2, int size, float* out ); + +/* +** \brief Compute a left division for double. +** \param in1 : input double. +** \param in2 : input double. +** \return in1 \ in2 = in1 .\ in2. +*/ +EXTERN_OPERATIONS double dldivs (double in1, double in2); + +/* +** \brief Compute a left division element ways for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 .\ in2. +*/ +EXTERN_OPERATIONS void dldiva (double* in1, double* in2, int size, double* out ); + +/* +** \brief Compute a left division for floats complex. +** \param in1 : input float complex. +** \param in2 : input float complex. +** \return in1 \ in2 = in1 .\ in2. +*/ +EXTERN_OPERATIONS floatComplex cldivs (floatComplex in1, floatComplex in2); + +/* +** \brief Compute a left division element ways for float complex. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 .\ in2. +*/ +EXTERN_OPERATIONS void cldiva(floatComplex* in1, floatComplex* in2, int size, floatComplex* out ); + +/* +** \brief Compute a left division for double complex. +** \param in1 : input double complex. +** \param in2 : input double complex. +** \return in1 \ in2 = in1 .\ in2. +*/ +EXTERN_OPERATIONS doubleComplex zldivs (doubleComplex in1, doubleComplex in2); + +/* +** \brief Compute a left division element ways for double complex. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array = rows*columns. +** \param out : array that contains the division in1 .\ in2. +*/ +EXTERN_OPERATIONS void zldiva(doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out ); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__DIVISION_H__ */ diff --git a/2.3-1/src/c/operations/includes/dynlib_operations.h b/2.3-1/src/c/operations/includes/dynlib_operations.h new file mode 100644 index 00000000..e91f6322 --- /dev/null +++ b/2.3-1/src/c/operations/includes/dynlib_operations.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_OPERATIONS_H__ +#define __DYNLIB_OPERATIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if OPERATIONS_EXPORTS + #define EXTERN_OPERATIONS __declspec (dllexport) + #else + #define EXTERN_OPERATIONS __declspec (dllimport) + #endif +#else + #define EXTERN_OPERATIONS +#endif + +#endif /* __DYNLIB_OPERATIONS_H__ */ diff --git a/2.3-1/src/c/operations/includes/multiplication.h b/2.3-1/src/c/operations/includes/multiplication.h new file mode 100644 index 00000000..9931a9a9 --- /dev/null +++ b/2.3-1/src/c/operations/includes/multiplication.h @@ -0,0 +1,147 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MULTIPLICATION_H__ +#define __MULTIPLICATION_H__ + +#include "dynlib_operations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + +/* +** \brief Compute a multiplication with floats. +** \param in1 : input float. +** \param in2 : input float. +** \return : in1 * in 2 = in1 .* in2. +*/ +EXTERN_OPERATIONS float smuls(float in1, float in2); + +/* +** \brief Compute a multiplication element ways for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \param out : array that contains the multiplication = in1 .* in2. +*/ +EXTERN_OPERATIONS void smula(float *in1, float *in2, int size2, float *out); + +/* +** \brief Compute a multiplication for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the multiplication of the two vectors = in1 .* in2. +*/ +EXTERN_OPERATIONS float smulv(float *in1, float *in2, int size2); + +/* +** \brief Compute a multiplication with double. +** \param in1 : input double. +** \param in2 : input double. +** \return : in1 * in 2 = in1 .* in2. +*/ +EXTERN_OPERATIONS double dmuls(double in1, double in2); + +/* +** \brief Compute a multiplication element ways for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \param out : array that contains the multiplication = in1 .* in2. +*/ +EXTERN_OPERATIONS void dmula(double *in1, double *in2, int size,double * out); + +/* +** \brief Compute a multiplication for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the multiplication of the two vectors = in1 .* in2. +*/ +EXTERN_OPERATIONS double dmulv(double *in1, double *in2, int size2); + +/* +** \brief Compute a multiplication with floats Complex. +** \param in1 : input float complex. +** \param in2 : input float complex. +** \return : in1 * in 2 = in1 .* in2. +*/ +EXTERN_OPERATIONS floatComplex cmuls(floatComplex in1, floatComplex in2); + +/* +** \brief Compute a multiplication element ways for complex single precision. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \param out : array that contains the multiplication = in1 .* in2. +*/ +EXTERN_OPERATIONS void cmula(floatComplex *in1, floatComplex *in2, int size, floatComplex *out); + +/* +** \brief Compute a multiplication for floats. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the multiplication of the two vectors = in1 .* in2. +*/ +EXTERN_OPERATIONS floatComplex cmulv(floatComplex *in1, floatComplex *in2, int size2); + +EXTERN_OPERATIONS floatComplex cmulcsv(floatComplex *in1, float *in2, int size2); + +EXTERN_OPERATIONS floatComplex cmulscv(float *in1, floatComplex *in2, int size2); + + +/* +** \brief Compute a multiplication with double complex. +** \param in1 : input double complex. +** \param in2 : input double conplex. +** \return : in1 * in 2 = in1 .* in2. +*/ +EXTERN_OPERATIONS doubleComplex zmuls(doubleComplex in1, doubleComplex in2); + +/* +** \brief Compute a multiplication element ways for complex double precision. +** \param in1 : input array. +** \param in2 : input array. +** \param size: size of in2 array. +** \param out : array that contains the multiplication = in1 .* in2. +*/ +EXTERN_OPERATIONS void zmula(doubleComplex *in1, doubleComplex *in2, int size, doubleComplex *out); + +/* +** \brief Compute a multiplication for double. +** \param in1 : input array. +** \param in2 : input array. +** \param size : size of in2 array. +** \return : scalar that contains the multiplication of the two vectors = in1 .* in2. +*/ +EXTERN_OPERATIONS doubleComplex zmulv(doubleComplex *in1, doubleComplex *in2, int size2); + +EXTERN_OPERATIONS doubleComplex zmulzdv(doubleComplex *in1, double *in2, int size2); + +EXTERN_OPERATIONS doubleComplex zmuldzv(double *in1, doubleComplex *in2, int size2); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MULTIPLICATION_H__ */ diff --git a/2.3-1/src/c/operations/includes/subtraction.h b/2.3-1/src/c/operations/includes/subtraction.h new file mode 100644 index 00000000..8571a5de --- /dev/null +++ b/2.3-1/src/c/operations/includes/subtraction.h @@ -0,0 +1,114 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SUBTRACTION_H__ +#define __SUBTRACTION_H__ + +#include "dynlib_operations.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** +** WARNING WE ASSUME MATRIXES TO BE CONSCISTENT +** size1 = size2; +** +*/ + +/* +** \brief Compute a subtraction with floats. +** \param in1 : input float. +** \param in2 : input float. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS float sdiffs(float in1, float in2); + +/* +** \brief Compute a subtraction element ways for floats. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the subtraction in1 + in2. +*/ +EXTERN_OPERATIONS void sdiffa(float *in1, int size1, + float *in2, int size2, + float *out); + +/* +** \brief Compute a subtraction with double. +** \param in1 : input double. +** \param in2 : input double. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS double ddiffs(double in1, double in2); + +/* +** \brief Compute a subtraction element ways for double. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the subtraction in1 + in2. +*/ +EXTERN_OPERATIONS void ddiffa(double *in1, int size1, + double *in2, int size2, + double * out); + +/* +** \brief Compute a subtraction with floats Complex. +** \param in1 : input float complex. +** \param in2 : input float complex. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS floatComplex cdiffs(floatComplex in1, floatComplex in2); + +/* +** \brief Compute a subtraction element ways for complex single precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the subtraction in1 + in2. +*/ +EXTERN_OPERATIONS void cdiffa(floatComplex *in1, int size1, + floatComplex *in2, int size2, + floatComplex *out); + +/* +** \brief Compute a subtraction with double complex. +** \param in1 : input double complex. +** \param in2 : input double conplex. +** \return : in1 + in2 +*/ +EXTERN_OPERATIONS doubleComplex zdiffs(doubleComplex in1, doubleComplex in2); + +/* +** \brief Compute a subtraction element ways for complex double precision. +** \param in1 : input array. +** \param size1 : size of in1 array. +** \param in2 : input arry. +** \param size2 : size of in2 array. +** \param out : array that contains the subtraction in1 + in2. +*/ +EXTERN_OPERATIONS void zdiffa(doubleComplex *in1, int size1, + doubleComplex *in2, int size2, + doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__SUBTRACTION_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpBackSlash.h b/2.3-1/src/c/operations/interfaces/int_OpBackSlash.h new file mode 100644 index 00000000..8a733f28 --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpBackSlash.h @@ -0,0 +1,109 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPBACKSLASH_H__ +#define __INT_OPBACKSLASH_H__ + +/* Scalar \ Scalar */ + +#define s0s0OpBackSlashs0(in1,in2) sldivs(in1,in2) + +#define d0d0OpBackSlashd0(in1,in2) dldivs(in1,in2) + +#define c0c0OpBackSlashc0(in1,in2) cldivs(in1,in2) + +#define z0z0OpBackSlashz0(in1,in2) zldivs(in1,in2) + +#define s0c0OpBackSlashc0(in1,in2) cldivs(FloatComplex(in1,0),in2) + +#define c0s0OpBackSlashc0(in1,in2) cldivs(in1,FloatComplex(in2,0)) + +#define d0z0OpBackSlashz0(in1,in2) zldivs(DoubleComplex(in1,0),in2) + +#define z0d0OpBackSlashz0(in1,in2) zldivs(in1,DoubleComplex(in2,0)) + + +/* Scalar \ Matrix */ + +#define s0s2OpBackSlashs2(in1,in2,size,out) {int i;\ + for( i=0;i ok, we just have put the imaginary part to 0 + we assign a complex in a real array => ko, we can't enlarge the input matrix. So we just replace by the real part of the complex +*/ + +/* a(3)=2 */ +#define s2s0c0OpIns(in,size,indice,newVal) s2s0s0OpIns(in,size,indice,creals(newVal)) + +#define d2d0z0OpIns(in,size,indice,newVal) d2d0d0OpIns(in,size,indice,zreals(newVal)) + +#define c2s0s0OpIns(in,size,indice,newVal) c2s0c0OpIns(in,size,indice,FloatComplex(newVal,0)) + +#define z2d0d0OpIns(in,size,indice,newVal) z2d0z0OpIns(in,size,indice,DoubleComplex(newVal,0)) + + +/* a([1 2])=2 */ +#define s2s2c0OpIns(in,size1,indices,size2,newVal) s2s2s0OpIns(in,size1,indices,size2,creals(newVal)) + +#define d2d2z0OpIns(in,size1,indices,size2,newVal) d2d2d0OpIns(in,size1,indices,size2,zreals(newVal)) + +#define c2s2s0OpIns(in,size1,indices,size2,newVal) c2s2c0OpIns(in,size1,indices,size2,FloatComplex(newVal,0)) + +#define z2d2d0OpIns(in,size1,indices,size2,newVal) z2d2z0OpIns(in,size1,indices,size2,DoubleComplex(newVal,0)) + + +/* a([1 2])=[3,1] */ +#define s2s2c2OpIns(in,size1,indices,size2,newVals,size3) {int i;\ + for (i=0;i= in2) +#define d0d0OpLogGed0(in1,in2) (double) (in1 >= in2) + + +#define s2s0OpLogGes2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGes0(in1[i],in2);\ + } + +#define s0s2OpLogGes2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogGes0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define s2s2OpLogGes2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGes0(in1[i],in2[i]);\ + } + +#define d2d0OpLogGed2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGed0(in1[i],in2);\ + } + +#define d0d2OpLogGed2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = d0d0OpLogGed0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define d2d2OpLogGed2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGGE_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpLogGt.h b/2.3-1/src/c/operations/interfaces/int_OpLogGt.h new file mode 100644 index 00000000..161b654f --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpLogGt.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2007 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ + +#ifndef __OPLOGGT_H__ +#define __OPLOGGT_H__ + + +#define s0s0OpLogGts0(in1,in2) (float) (in1 > in2) +#define d0d0OpLogGtd0(in1,in2) (double) (in1 > in2) + + +#define s2s0OpLogGts2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGts0(in1[i],in2);\ + } + +#define s0s2OpLogGts2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogGts0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define s2s2OpLogGts2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogGts0(in1[i],in2[i]);\ + } + +#define d2d0OpLogGtd2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGtd0(in1[i],in2);\ + } + +#define d0d2OpLogGtd2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = d0d0OpLogGtd0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define d2d2OpLogGtd2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogGtd0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGGT_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpLogLe.h b/2.3-1/src/c/operations/interfaces/int_OpLogLe.h new file mode 100644 index 00000000..ebb09c7b --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpLogLe.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2007 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ + +#ifndef __OPLOGLE_H__ +#define __OPLOGLE_H__ + + +#define s0s0OpLogLes0(in1,in2) (float) (in1 <= in2) +#define d0d0OpLogLed0(in1,in2) (double) (in1 <= in2) + + +#define s2s0OpLogLes2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLes0(in1[i],in2);\ + } + +#define s0s2OpLogLes2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogLes0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define s2s2OpLogLes2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLes0(in1[i],in2[i]);\ + } + +#define d2d0OpLogLed2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLed0(in1[i],in2);\ + } + +#define d0d2OpLogLed2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = d0d0OpLogLed0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define d2d2OpLogLed2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLed0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLE_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpLogLt.h b/2.3-1/src/c/operations/interfaces/int_OpLogLt.h new file mode 100644 index 00000000..2c5d8639 --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpLogLt.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2007 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* + Update 23/02/09 by Arnaud Torset : Add matrix comparaison, remove include(floatComplex and doubleComplex) +*/ + +#ifndef __OPLOGLT_H__ +#define __OPLOGLT_H__ + + +#define s0s0OpLogLts0(in1,in2) (float) (in1 < in2) +#define d0d0OpLogLtd0(in1,in2) (double) (in1 < in2) + + +#define s2s0OpLogLts2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLts0(in1[i],in2);\ + } + +#define s0s2OpLogLts2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = s0s0OpLogLts0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define s2s2OpLogLts2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = s0s0OpLogLts0(in1[i],in2[i]);\ + } + +#define d2d0OpLogLtd2(in1, size1, in2, out) {int i;\ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLtd0(in1[i],in2);\ + } + +#define d0d2OpLogLtd2(in1, in2, size2, out) {int i; \ + for(i = 0 ; i < size2[0] * size2[1] ; ++i) out[i] = d0d0OpLogLtd0(in1,in2[i]);\ + } + +/* we must have size1=size2 */ +#define d2d2OpLogLtd2(in1, size1, in2, size2, out) {int i; \ + for(i = 0 ; i < size1[0] * size1[1] ; ++i) out[i] = d0d0OpLogLtd0(in1[i],in2[i]);\ + } +#endif /* !__OPLOGLT_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpLogNe.h b/2.3-1/src/c/operations/interfaces/int_OpLogNe.h new file mode 100644 index 00000000..238ef483 --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpLogNe.h @@ -0,0 +1,98 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Aranud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* Idem that OpLogEq with a !(negation) behind*/ + +#ifndef __OPLOGNE_H__ +#define __OPLOGNE_H__ + +#include "floatComplex.h" +#include "doubleComplex.h" + +#define s0s0OpLogNes0(in1,in2) (float) !(in1 == in2) +#define d0d0OpLogNed0(in1,in2) (double) !(in1 == in2) +#define c0c0OpLogNes0(in1,in2) (float) !((creals(in1) == creals(in2)) && (cimags(in1) == cimags(in2))) +#define z0z0OpLogNed0(in1,in2) (double) !((zreals(in1) == zreals(in2)) && (zimags(in1) == zimags(in2))) + +#define s0c0OpLogNes0(in1,in2) (float) !((in1==creals(in2)) && (0==cimags(in2))) +#define d0z0OpLogNed0(in1,in2) (double) !((in1==zreals(in2)) && (0==zimags(in2))) +#define c0s0OpLogNes0(in1,in2) s0c0OpLogNes0(in2,in1) +#define z0d0OpLogNed0(in1,in2) d0z0OpLogNed0(in2,in1) + + + +#define s2s0OpLogNes2(in1,size,in2,out) {int i;\ + for (i=0;i "-1" because '\0' of the first string must be removed. */ +#define g2g2OpPlusg2(in1,size1,in2,size2,out) {int i = 0, j = 0; \ + for(i = 0 ; i < size1[1]-1 ; ++i, ++j) out[j] = in1[i]; \ + for(i = 0 ; i < size2[1] ; ++i, ++j) out[j] = in2[i]; \ + } + + +#endif /* !__INT_OPPLUS_H__ */ diff --git a/2.3-1/src/c/operations/interfaces/int_OpSlash.h b/2.3-1/src/c/operations/interfaces/int_OpSlash.h new file mode 100644 index 00000000..fd8dda28 --- /dev/null +++ b/2.3-1/src/c/operations/interfaces/int_OpSlash.h @@ -0,0 +1,168 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_OPSLASH_H__ +#define __INT_OPSLASH_H__ + +/* Scalar / Scalar */ + +#define s0s0OpSlashs0(in1,in2) srdivs(in1,in2) + +#define d0d0OpSlashd0(in1,in2) drdivs(in1,in2) + +#define c0c0OpSlashc0(in1,in2) crdivs(in1,in2) + +#define z0z0OpSlashz0(in1,in2) zrdivs(in1,in2) + +#define s0c0OpSlashc0(in1,in2) crdivs(FloatComplex(in1,0),in2) + +#define c0s0OpSlashc0(in1,in2) crdivs(in1,FloatComplex(in2,0)) + +#define d0z0OpSlashz0(in1,in2) zrdivs(DoubleComplex(in1,0),in2) + +#define z0d0OpSlashz0(in1,in2) zrdivs(in1,DoubleComplex(in2,0)) + + +/* Scalar / Matrix */ + + +#define s0s2OpSlashs2(in1,in2,size,out) {int i=0;\ + sinverma(in2,out,size[0]);\ + for (i=0;i b ? a : b) + +#define s2s2OpStars0(in1, size1, in2, size2) smulv( in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define c2s2OpStarc0(in1, size1, in2, size2) cmulcsv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define s2c2OpStarc0(in1, size1, in2, size2) cmulscv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define c2c2OpStarc0(in1, size1, in2, size2) cmulv( in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + + +#define d2d2OpStard0(in1, size1, in2, size2) dmulv( in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define z2d2OpStarz0(in1, size1, in2, size2) zmulzdv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define d2z2OpStarz0(in1, size1, in2, size2) zmuldzv(in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#define z2z2OpStarz0(in1, size1, in2, size2) zmulv( in1, in2, MAX(MAX(size1[0], size1[1]), MAX(size2[0], size2[1]))) + +#endif /* !__INT_OPSTAR_H__ */ diff --git a/2.3-1/src/c/operations/matrixOperations_Import.def b/2.3-1/src/c/operations/matrixOperations_Import.def new file mode 100644 index 00000000..dc6ed571 --- /dev/null +++ b/2.3-1/src/c/operations/matrixOperations_Import.def @@ -0,0 +1,7 @@ +LIBRARY matrixOperations.dll + + +EXPORTS +szerosa +dzerosa +zzerosa diff --git a/2.3-1/src/c/operations/multiplication/Makefile.am b/2.3-1/src/c/operations/multiplication/Makefile.am new file mode 100644 index 00000000..3cc347ee --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/Makefile.am @@ -0,0 +1,58 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMultiplication.la + +HEAD = ../includes/multiplication.h + +libMultiplication_la_SOURCES = $(HEAD) \ + smuls.c \ + dmuls.c \ + cmuls.c \ + zmuls.c \ + smula.c \ + dmula.c \ + cmula.c \ + zmula.c \ + smulv.c \ + dmulv.c \ + cmulv.c \ + zmulv.c \ + zmulzdv.c \ + zmuldzv.c \ + cmulcsv.c \ + cmulscv.c + + +check_PROGRAMS = testMultiplication + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + libMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMultiplication_SOURCES = testMultiplication.c +testMultiplication_LDADD = $(check_LDADD) +testMultiplication_CFLAGS = $(check_INCLUDES) + +TESTS = testMultiplication diff --git a/2.3-1/src/c/operations/multiplication/Makefile.in b/2.3-1/src/c/operations/multiplication/Makefile.in new file mode 100644 index 00000000..5d1effe5 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/Makefile.in @@ -0,0 +1,835 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testMultiplication$(EXEEXT) +TESTS = testMultiplication$(EXEEXT) +subdir = src/c/operations/multiplication +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMultiplication_la_LIBADD = +am__objects_1 = +am_libMultiplication_la_OBJECTS = $(am__objects_1) \ + libMultiplication_la-smuls.lo libMultiplication_la-dmuls.lo \ + libMultiplication_la-cmuls.lo libMultiplication_la-zmuls.lo \ + libMultiplication_la-smula.lo libMultiplication_la-dmula.lo \ + libMultiplication_la-cmula.lo libMultiplication_la-zmula.lo \ + libMultiplication_la-smulv.lo libMultiplication_la-dmulv.lo \ + libMultiplication_la-cmulv.lo libMultiplication_la-zmulv.lo \ + libMultiplication_la-zmulzdv.lo \ + libMultiplication_la-zmuldzv.lo \ + libMultiplication_la-cmulcsv.lo \ + libMultiplication_la-cmulscv.lo +libMultiplication_la_OBJECTS = $(am_libMultiplication_la_OBJECTS) +libMultiplication_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libMultiplication_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testMultiplication_OBJECTS = \ + testMultiplication-testMultiplication.$(OBJEXT) +testMultiplication_OBJECTS = $(am_testMultiplication_OBJECTS) +testMultiplication_DEPENDENCIES = $(check_LDADD) +testMultiplication_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testMultiplication_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMultiplication_la_SOURCES) \ + $(testMultiplication_SOURCES) +DIST_SOURCES = $(libMultiplication_la_SOURCES) \ + $(testMultiplication_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMultiplication_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMultiplication.la +HEAD = ../includes/multiplication.h +libMultiplication_la_SOURCES = $(HEAD) \ + smuls.c \ + dmuls.c \ + cmuls.c \ + zmuls.c \ + smula.c \ + dmula.c \ + cmula.c \ + zmula.c \ + smulv.c \ + dmulv.c \ + cmulv.c \ + zmulv.c \ + zmulzdv.c \ + zmuldzv.c \ + cmulcsv.c \ + cmulscv.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + libMultiplication.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes + +testMultiplication_SOURCES = testMultiplication.c +testMultiplication_LDADD = $(check_LDADD) +testMultiplication_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/operations/multiplication/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/operations/multiplication/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMultiplication.la: $(libMultiplication_la_OBJECTS) $(libMultiplication_la_DEPENDENCIES) + $(libMultiplication_la_LINK) -rpath $(pkglibdir) $(libMultiplication_la_OBJECTS) $(libMultiplication_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testMultiplication$(EXEEXT): $(testMultiplication_OBJECTS) $(testMultiplication_DEPENDENCIES) + @rm -f testMultiplication$(EXEEXT) + $(testMultiplication_LINK) $(testMultiplication_OBJECTS) $(testMultiplication_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmula.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmulcsv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmuls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmulscv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-cmulv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmula.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmuls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-dmulv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smula.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smuls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-smulv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmula.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmuldzv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmuls.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmulv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMultiplication_la-zmulzdv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMultiplication-testMultiplication.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMultiplication_la-smuls.lo: smuls.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-smuls.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-smuls.Tpo -c -o libMultiplication_la-smuls.lo `test -f 'smuls.c' || echo '$(srcdir)/'`smuls.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-smuls.Tpo $(DEPDIR)/libMultiplication_la-smuls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smuls.c' object='libMultiplication_la-smuls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-smuls.lo `test -f 'smuls.c' || echo '$(srcdir)/'`smuls.c + +libMultiplication_la-dmuls.lo: dmuls.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-dmuls.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-dmuls.Tpo -c -o libMultiplication_la-dmuls.lo `test -f 'dmuls.c' || echo '$(srcdir)/'`dmuls.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-dmuls.Tpo $(DEPDIR)/libMultiplication_la-dmuls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmuls.c' object='libMultiplication_la-dmuls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-dmuls.lo `test -f 'dmuls.c' || echo '$(srcdir)/'`dmuls.c + +libMultiplication_la-cmuls.lo: cmuls.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmuls.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmuls.Tpo -c -o libMultiplication_la-cmuls.lo `test -f 'cmuls.c' || echo '$(srcdir)/'`cmuls.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-cmuls.Tpo $(DEPDIR)/libMultiplication_la-cmuls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmuls.c' object='libMultiplication_la-cmuls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmuls.lo `test -f 'cmuls.c' || echo '$(srcdir)/'`cmuls.c + +libMultiplication_la-zmuls.lo: zmuls.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmuls.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmuls.Tpo -c -o libMultiplication_la-zmuls.lo `test -f 'zmuls.c' || echo '$(srcdir)/'`zmuls.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-zmuls.Tpo $(DEPDIR)/libMultiplication_la-zmuls.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmuls.c' object='libMultiplication_la-zmuls.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmuls.lo `test -f 'zmuls.c' || echo '$(srcdir)/'`zmuls.c + +libMultiplication_la-smula.lo: smula.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-smula.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-smula.Tpo -c -o libMultiplication_la-smula.lo `test -f 'smula.c' || echo '$(srcdir)/'`smula.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-smula.Tpo $(DEPDIR)/libMultiplication_la-smula.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smula.c' object='libMultiplication_la-smula.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-smula.lo `test -f 'smula.c' || echo '$(srcdir)/'`smula.c + +libMultiplication_la-dmula.lo: dmula.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-dmula.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-dmula.Tpo -c -o libMultiplication_la-dmula.lo `test -f 'dmula.c' || echo '$(srcdir)/'`dmula.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-dmula.Tpo $(DEPDIR)/libMultiplication_la-dmula.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmula.c' object='libMultiplication_la-dmula.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-dmula.lo `test -f 'dmula.c' || echo '$(srcdir)/'`dmula.c + +libMultiplication_la-cmula.lo: cmula.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmula.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmula.Tpo -c -o libMultiplication_la-cmula.lo `test -f 'cmula.c' || echo '$(srcdir)/'`cmula.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-cmula.Tpo $(DEPDIR)/libMultiplication_la-cmula.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmula.c' object='libMultiplication_la-cmula.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmula.lo `test -f 'cmula.c' || echo '$(srcdir)/'`cmula.c + +libMultiplication_la-zmula.lo: zmula.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmula.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmula.Tpo -c -o libMultiplication_la-zmula.lo `test -f 'zmula.c' || echo '$(srcdir)/'`zmula.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-zmula.Tpo $(DEPDIR)/libMultiplication_la-zmula.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmula.c' object='libMultiplication_la-zmula.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmula.lo `test -f 'zmula.c' || echo '$(srcdir)/'`zmula.c + +libMultiplication_la-smulv.lo: smulv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-smulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-smulv.Tpo -c -o libMultiplication_la-smulv.lo `test -f 'smulv.c' || echo '$(srcdir)/'`smulv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-smulv.Tpo $(DEPDIR)/libMultiplication_la-smulv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smulv.c' object='libMultiplication_la-smulv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-smulv.lo `test -f 'smulv.c' || echo '$(srcdir)/'`smulv.c + +libMultiplication_la-dmulv.lo: dmulv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-dmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-dmulv.Tpo -c -o libMultiplication_la-dmulv.lo `test -f 'dmulv.c' || echo '$(srcdir)/'`dmulv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-dmulv.Tpo $(DEPDIR)/libMultiplication_la-dmulv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmulv.c' object='libMultiplication_la-dmulv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-dmulv.lo `test -f 'dmulv.c' || echo '$(srcdir)/'`dmulv.c + +libMultiplication_la-cmulv.lo: cmulv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmulv.Tpo -c -o libMultiplication_la-cmulv.lo `test -f 'cmulv.c' || echo '$(srcdir)/'`cmulv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-cmulv.Tpo $(DEPDIR)/libMultiplication_la-cmulv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulv.c' object='libMultiplication_la-cmulv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmulv.lo `test -f 'cmulv.c' || echo '$(srcdir)/'`cmulv.c + +libMultiplication_la-zmulv.lo: zmulv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmulv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmulv.Tpo -c -o libMultiplication_la-zmulv.lo `test -f 'zmulv.c' || echo '$(srcdir)/'`zmulv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-zmulv.Tpo $(DEPDIR)/libMultiplication_la-zmulv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmulv.c' object='libMultiplication_la-zmulv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmulv.lo `test -f 'zmulv.c' || echo '$(srcdir)/'`zmulv.c + +libMultiplication_la-zmulzdv.lo: zmulzdv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmulzdv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmulzdv.Tpo -c -o libMultiplication_la-zmulzdv.lo `test -f 'zmulzdv.c' || echo '$(srcdir)/'`zmulzdv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-zmulzdv.Tpo $(DEPDIR)/libMultiplication_la-zmulzdv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmulzdv.c' object='libMultiplication_la-zmulzdv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmulzdv.lo `test -f 'zmulzdv.c' || echo '$(srcdir)/'`zmulzdv.c + +libMultiplication_la-zmuldzv.lo: zmuldzv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-zmuldzv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-zmuldzv.Tpo -c -o libMultiplication_la-zmuldzv.lo `test -f 'zmuldzv.c' || echo '$(srcdir)/'`zmuldzv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-zmuldzv.Tpo $(DEPDIR)/libMultiplication_la-zmuldzv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmuldzv.c' object='libMultiplication_la-zmuldzv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-zmuldzv.lo `test -f 'zmuldzv.c' || echo '$(srcdir)/'`zmuldzv.c + +libMultiplication_la-cmulcsv.lo: cmulcsv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmulcsv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmulcsv.Tpo -c -o libMultiplication_la-cmulcsv.lo `test -f 'cmulcsv.c' || echo '$(srcdir)/'`cmulcsv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-cmulcsv.Tpo $(DEPDIR)/libMultiplication_la-cmulcsv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulcsv.c' object='libMultiplication_la-cmulcsv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmulcsv.lo `test -f 'cmulcsv.c' || echo '$(srcdir)/'`cmulcsv.c + +libMultiplication_la-cmulscv.lo: cmulscv.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -MT libMultiplication_la-cmulscv.lo -MD -MP -MF $(DEPDIR)/libMultiplication_la-cmulscv.Tpo -c -o libMultiplication_la-cmulscv.lo `test -f 'cmulscv.c' || echo '$(srcdir)/'`cmulscv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMultiplication_la-cmulscv.Tpo $(DEPDIR)/libMultiplication_la-cmulscv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmulscv.c' object='libMultiplication_la-cmulscv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMultiplication_la_CFLAGS) $(CFLAGS) -c -o libMultiplication_la-cmulscv.lo `test -f 'cmulscv.c' || echo '$(srcdir)/'`cmulscv.c + +testMultiplication-testMultiplication.o: testMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMultiplication_CFLAGS) $(CFLAGS) -MT testMultiplication-testMultiplication.o -MD -MP -MF $(DEPDIR)/testMultiplication-testMultiplication.Tpo -c -o testMultiplication-testMultiplication.o `test -f 'testMultiplication.c' || echo '$(srcdir)/'`testMultiplication.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMultiplication-testMultiplication.Tpo $(DEPDIR)/testMultiplication-testMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMultiplication.c' object='testMultiplication-testMultiplication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMultiplication_CFLAGS) $(CFLAGS) -c -o testMultiplication-testMultiplication.o `test -f 'testMultiplication.c' || echo '$(srcdir)/'`testMultiplication.c + +testMultiplication-testMultiplication.obj: testMultiplication.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMultiplication_CFLAGS) $(CFLAGS) -MT testMultiplication-testMultiplication.obj -MD -MP -MF $(DEPDIR)/testMultiplication-testMultiplication.Tpo -c -o testMultiplication-testMultiplication.obj `if test -f 'testMultiplication.c'; then $(CYGPATH_W) 'testMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testMultiplication.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMultiplication-testMultiplication.Tpo $(DEPDIR)/testMultiplication-testMultiplication.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMultiplication.c' object='testMultiplication-testMultiplication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMultiplication_CFLAGS) $(CFLAGS) -c -o testMultiplication-testMultiplication.obj `if test -f 'testMultiplication.c'; then $(CYGPATH_W) 'testMultiplication.c'; else $(CYGPATH_W) '$(srcdir)/testMultiplication.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/operations/multiplication/cmula.c b/2.3-1/src/c/operations/multiplication/cmula.c new file mode 100644 index 00000000..2bb94002 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/cmula.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "multiplication.h" + +void cmula(floatComplex* in1, floatComplex* in2, int size, floatComplex* out){ + int i=0; + for (i=0;i +#include "zeros.h" +#include "multiplication.h" + +floatComplex cmulcsv (floatComplex* in1, float* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size)*sizeof(float)); + szerosa(ZEROS,size , 1); + + return cmulv(in1, FloatComplexMatrix(in2,ZEROS,size), size ); + } diff --git a/2.3-1/src/c/operations/multiplication/cmuls.c b/2.3-1/src/c/operations/multiplication/cmuls.c new file mode 100644 index 00000000..817f3771 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/cmuls.c @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#include "floatComplex.h" +#include "multiplication.h" + + + +/* +** \function cmuls +** \brief Multiply 2 Complex numbers. +*/ +floatComplex cmuls(floatComplex z1, floatComplex z2) { +#ifndef STDC99 + return FloatComplex(z1.real*z2.real - z1.imag*z2.imag, + z1.real*z2.imag + z2.real*z1.imag); +#else + return z1 * z2; +#endif +} diff --git a/2.3-1/src/c/operations/multiplication/cmulscv.c b/2.3-1/src/c/operations/multiplication/cmulscv.c new file mode 100644 index 00000000..d3444764 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/cmulscv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include "zeros.h" +#include "multiplication.h" + +floatComplex cmulscv (float* in1, floatComplex* in2, int size) + { + float* ZEROS = (float *) malloc((unsigned int)(size*sizeof(float))); + szerosa(ZEROS,size , 1); + + return cmulv(FloatComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/2.3-1/src/c/operations/multiplication/cmulv.c b/2.3-1/src/c/operations/multiplication/cmulv.c new file mode 100644 index 00000000..c26372cd --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/cmulv.c @@ -0,0 +1,26 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" +#include "multiplication.h" + +floatComplex cmulv(floatComplex* in1, floatComplex* in2, int size) +{ + floatComplex out = FloatComplex(0, 0); + int i = 0; + for (i = 0 ; i < size ; ++i) + { + out = cadds(out, cmuls(in1[i], in2[i])); + } + + return out; +} diff --git a/2.3-1/src/c/operations/multiplication/dmula.c b/2.3-1/src/c/operations/multiplication/dmula.c new file mode 100644 index 00000000..976faacf --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/dmula.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "multiplication.h" + +void dmula(double* in1, double* in2, int size, double* out){ + int i=0; + for (i=0;i +#include +#include +#include +#include "multiplication.h" + + +#define FP1 {0.3874644362367689609528f,0.3987790448591113090515f,0.9963990836404263973236f,\ +0.9320784267038106918335f,0.0681476672179996967316f,0.7187465364113450050354f,\ +0.6592897172085940837860f,0.437819693237543106079f,0.9570061699487268924713f,\ +0.3977778619155287742615f,0.5414962074719369411469f,0.1475485283881425857544f,\ +0.9197258842177689075470f,0.4185347454622387886047f,0.9044831502251327037811f,\ +0.3202747702598571777344f,0.5748232551850378513336f,0.7572625903412699699402f,\ +0.3254728927277028560638f,0.5012555103749036788940f,0.2686208193190395832062f,\ +0.1170668462291359901428f,0.3667570571415126324f,0.8753886483609676361084f,\ +0.5248321653343737125397f,0.7686112513765692710876f,0.8289924389682710170746f,\ +0.6499033216387033462524f,0.5625062701292335987091f,0.216987949796020984650f,\ +0.932231280487030744553f,0.9350972101092338562012f,0.9760812097229063510895f,\ +0.9135094834491610527039f,0.2684359191916882991791f,0.0918707158416509628296f,\ +0.1712972451932728290558f,0.7311726594343781471252f,0.8692278112284839153290f,\ +0.0148080177605152130127f,0.6507192836143076419830f,0.4225442921742796897888f,\ +0.2326209298335015773773f,0.3195550013333559036255f,0.7426187139935791492462f,\ +0.7788188206031918525696f,0.6524895387701690196991f,0.9032440632581710815430f,\ +0.8669646182097494602203f,0.7087978003546595573425f,0.6945203407667577266693f,\ +0.8467157911509275436401f,0.9322743569500744342804f,0.9565412709489464759827f,\ +0.1623990009538829326630f,0.1272875182330608367920f,0.9570735306479036808014f,\ +0.6764409979805350303650f,0.3979810453020036220551f,0.1108187530189752578735f,\ +0.5097153154201805591583f,0.5844655903056263923645f,0.2591971340589225292206f,\ +0.2918234840035438537598f,0.0603091740049421787262f,0.9043274922296404838562f,\ +0.6194427101872861385345f,0.2503793593496084213257f,0.8385089416988193988800f,\ +0.8273218506947159767151f,0.7322020228020846843719f,0.2945837415754795074463f,\ +0.2909102872945368289948f,0.7045872574672102928162f,0.3046565256081521511078f,\ +0.7573066372424364089966f,0.7318075490184128284454f,0.6905383663251996040344f,\ +0.6240276503376662731171f,0.415990501642227172852f,0.2810599454678595066071f,\ +0.0562203852459788322449f,0.5804039551876485347748f,0.0042469184845685958862f,\ +0.6828171615488827228546f,0.8913354435935616493225f,0.9298026482574641704559f,\ +0.2840001545846462249756f,0.0988543094135820865631f,0.4136908343061804771423f,\ +0.6412154859863221645355f,0.6469275895506143569946f,0.4702662643976509571075f,\ +0.6048191310837864875793f,0.6713890465907752513885f,0.7139470204710960388184f,\ +0.5412713759578764438629f,0.3905201805755496025085f,0.0110893785022199153900f,\ +0.9015008416026830673218f,0.1388745536096394062042f,0.0850749695673584938049f,\ +0.3466010238043963909149f,0.4233870990574359893799f,0.8021397278644144535065f,\ +0.3178813671693205833435f,0.1802104166708886623383f,0.6968874204903841018677f,\ +0.3548216861672699451447f,0.1612617420032620429993f,0.7534236568026244640350f,\ +0.6219418197870254516602f,0.5151072838343679904938f,0.6781924543902277946472f,\ +0.6166686578653752803802f,0.7021203767508268356323f,0.1362160299904644489288f,\ +0.6087052235379815101624f,0.1892316709272563457489f,0.4761417917907238006592f,\ +0.1716100485064089298248f,0.4137103697285056114197f,0.1531781828962266445160f,\ +0.2286888156086206436157f,0.9585634139366447925568f,0.3949919315055012702942f,\ +0.0250081899575889110565f,0.4492705538868904113770f,0.91384086245670915f,\ +0.1101246578618884086609f,0.7487958460114896297455f,0.0078816469758749008179f,\ +0.2352358778007328510284f,0.8010628754273056983948f,0.6545634861104190349579f,\ +0.5162083245813846588135f,0.7027181521989405155182f,0.0551512306556105613708f,\ +0.6256400248967111110687f,0.8431313354521989822388f,0.1729404223151504993439f,\ +0.4173073070123791694641f,0.8187537300400435924530f,0.2532757520675659179688f,\ +0.8608546801842749118805f,0.1721261171624064445496f,0.7806093706749379634857f,\ +0.1373576503247022628784f,0.0021877591498196125031f,0.0146564701572060585022f,\ +0.3046997408382594585419f,0.8030776642262935638428f,0.9905262948013842105865f,\ +0.8285992136225104331970f,0.8721015579067170619965f,0.2953114155679941177368f,\ +0.5827610609121620655060f,0.2906773509457707405090f,0.020005736034363508224f,\ +0.7143468186259269714355f,0.2666406803764402866364f,0.5199280334636569023132f,\ +0.4817320345900952816010f,0.0009182598441839218140f,0.3841847111470997333527f,\ +0.4906664276495575904846f,0.4419780815951526165009f,0.6567876525223255157471f,\ +0.10470610717311501503f,0.4278714573010802268982f,0.7510527721606194972992f,\ +0.3696223665028810501099f,0.8411930543370544910431f,0.9037434207275509834290f,\ +0.441844041924923658371f,0.0109200328588485717773f,0.2038001813925802707672f,\ +0.854183482937514781952f,0.3932710154913365840912f,0.9757302235811948776245f,\ +0.0841991459019482135773f,0.2339450428262352943420f,0.483970529865473508835f,\ +0.3329230062663555145264f,0.9645385951735079288483f,0.5292069753631949424744f,\ +0.0799680328927934169769f,0.754754373803734779358f,0.0447635021992027759552f,\ +0.8463187487795948982239f,0.2000828566960990428925f,0.6944785490632057189941f,\ +0.2820438765920698642731f,0.7954674167558550834656f,0.2028178661130368709564f,\ +0.7807571645826101303101f,0.9360628505237400531769f,0.8880164856091141700745f,\ +0.3384834821335971355438f,0.8976153172552585601807f} + +#define FP2 {0.4503413387574255466461f,0.7080971030518412590027f,0.2459910525940358638763f,\ +0.5369079094380140304565f,0.2288442556746304035187f,0.8762242654338479042053f,\ +0.8204974154941737651825f,0.1096532605588436126709f,0.3977028490044176578522f,\ +0.0387893309816718101501f,0.4764164215885102748871f,0.5613568071275949478149f,\ +0.9855364081449806690216f,0.2565485062077641487122f,0.0636831256560981273651f,\ +0.4720427915453910827637f,0.3494783216156065464020f,0.4271033955737948417664f,\ +0.8822676776908338069916f,0.18796317838132381439f,0.8610891629941761493683f,\ +0.0103648686781525611877f,0.9999243463389575481415f,0.3546787090599536895752f,\ +0.4418791518546640872955f,0.7364388024434447288513f,0.5289249173365533351898f,\ +0.3544368315488100051880f,0.5421899897046387195587f,0.0146836983039975166321f,\ +0.2055264669470489025116f,0.1165965050458908081055f,0.6571860709227621555328f,\ +0.2626901743933558464050f,0.1159235103987157344818f,0.2698498796671628952026f,\ +0.9737050686962902545929f,0.8739323327317833900452f,0.9124345253221690654755f,\ +0.1049908511340618133545f,0.2417178959585726261139f,0.0428410014137625694275f,\ +0.3636728501878678798676f,0.3169804904609918594360f,0.4641480413265526294708f,\ +0.1660488517954945564270f,0.5824519577436149120331f,0.9950593486428260803223f,\ +0.4988002800382673740387f,0.0385573906823992729187f,0.7751751034520566463470f,\ +0.8296566363424062728882f,0.1661487598903477191925f,0.5635758275166153907776f,\ +0.8564593489281833171844f,0.0048462785780429840088f,0.9567344621755182743073f,\ +0.1947818165645003318787f,0.7727439603768289089203f,0.7450998444110155105591f,\ +0.9319220376200973987579f,0.8297540741041302680969f,0.8786331820301711559296f,\ +0.9850863516330718994141f,0.9117660173214972019196f,0.3733268706128001213074f,\ +0.2097233845852315425873f,0.1312689464539289474487f,0.5437363986857235431671f,\ +0.6896163979545235633850f,0.9956645886413753032684f,0.3840484581887722015381f,\ +0.3460536063648760318756f,0.1614690115675330162048f,0.25720636313781142235f,\ +0.5892038289457559585571f,0.3193828281946480274200f,0.5760813476517796516418f,\ +0.8309780987910926342010f,0.0873794183135032653809f,0.2206377261318266391754f,\ +0.5555423153564333915710f,0.6657536565326154232025f,0.5303691830486059188843f,\ +0.0926435221917927265167f,0.2510469639673829078674f,0.7339503909461200237274f,\ +0.1329477317631244659424f,0.1434094593860208988190f,0.5195322250947356224060f,\ +0.4021125487051904201508f,0.3289982546120882034302f,0.5687606376595795154572f,\ +0.3014845298603177070618f,0.6041290420107543468475f,0.3006873279809951782227f,\ +0.4120792248286306858063f,0.4186693010851740837097f,0.6609355970285832881927f,\ +0.3494365941733121871948f,0.0549050425179302692413f,0.5105323204770684242249f,\ +0.0904512773267924785614f,0.5774413160979747772217f,0.4321455270983278751373f,\ +0.3280229708179831504822f,0.2514993823133409023285f,0.8484858069568872451782f,\ +0.5656450656242668628693f,0.1035893531516194343567f,0.1654627206735312938690f,\ +0.4968057349324226379395f,0.5098637067712843418121f,0.2160952789708971977234f,\ +0.3594232588075101375580f,0.7527473028749227523804f,0.3034152467735111713409f,\ +0.8694091374054551124573f,0.0745361442677676677704f,0.3539733029901981353760f,\ +0.0202146903611719608307f,0.0034146374091506004333f,0.6833881041966378688812f,\ +0.3109660465270280838013f,0.5139850866980850696564f,0.1561934249475598335266f,\ +0.6600902187637984752655f,0.2955771684646606445312f,0.9498737403191626071930f,\ +0.4961295751854777336121f,0.9468550696037709712982f,0.6213743072003126144409f,\ +0.7169277970679104328156f,0.7426859596744179725647f,0.0608082632534205913544f,\ +0.2845346592366695404053f,0.8151792050339281558990f,0.1946024885401129722595f,\ +0.7847843295894563198090f,0.0340354088693857192993f,0.3110890504904091358185f,\ +0.5842662276700139045715f,0.7858569952659308910370f,0.9398910328745841979980f,\ +0.9551012688316404819489f,0.9770033909007906913757f,0.0053538321517407894135f,\ +0.4281874801963567733765f,0.5550557305105030536652f,0.4340432072058320045471f,\ +0.1641052807681262493134f,0.2516632266342639923096f,0.1992107019759714603424f,\ +0.65790366288274526596f,0.226678048726171255112f,0.3645872045308351516724f,\ +0.9226246816106140613556f,0.3389491187408566474915f,0.1683428841643035411835f,\ +0.1706836074590682983398f,0.9106476106680929660797f,0.4218698022887110710144f,\ +0.8885267241857945919037f,0.1128535699099302291870f,0.8332714592106640338898f,\ +0.0108331749215722084045f,0.6144992182962596416473f,0.0734437219798564910889f,\ +0.4040901870466768741608f,0.1320571741089224815369f,0.6390436268411576747894f,\ +0.5538116190582513809204f,0.7576190796680748462677f,0.0725553305819630622864f,\ +0.7358620944432914257050f,0.1019380465149879455566f,0.7387234591878950595856f,\ +0.5138037605211138725281f,0.0964652984403073787689f,0.9568361993879079818726f,\ +0.6979067702777683734894f,0.1790800327435135841370f,0.1322964723221957683563f,\ +0.3785077370703220367432f,0.8862080411054193973541f,0.2132239108905196189880f,\ +0.9858398041687905788422f,0.6321957129985094070435f,0.0434587192721664905548f,\ +0.0135699706152081489563f,0.0944632100872695446014f,0.0956843793392181396484f,\ +0.2736488827504217624664f,0.7308020917698740959167f,0.6507454826496541500092f,\ +0.4583958666771650314331f,0.8011528258211910724640f,0.1584798255935311317444f,\ +0.3030378143303096294403f,0.4810337387025356292725f} + +#define FRes {0.1744912529357576791433f,0.2823742864225169957315f,0.2451052593884412711400f,\ +0.5004402795138161996746f,0.0155952021804655512061f,0.6297831559001532131248f,\ +0.5409455090315361536213f,0.0480083569003692950394f,0.3806040803034145825201f,\ +0.0154295371430231906262f,0.257977685467529749275f,0.0828273707923430219102f,\ +0.9064233444099463188337f,0.1073744637443841548619f,0.0576003141096106049956f,\ +0.1511833966150217811730f,0.2008882664476865365089f,0.3234294236757639939839f,\ +0.2871542132181882922559f,0.0942175789112195266606f,0.231306476470241606513f,\ +0.0012133824877304738923f,0.3667293106274266967226f,0.3104817157264057603250f,\ +0.2319123920839998853616f,0.5660351495083181250223f,0.4384747572539204885089f,\ +0.2303496741346691967234f,0.3049852688101639119900f,0.0031861855904077316173f,\ +0.1915982014560227986166f,0.1090290665768997024898f,0.6414669751193333713246f,\ +0.2399699655172445322826f,0.0311180340698064966665f,0.0247913016148056282451f,\ +0.1667929958984009919387f,0.6389954278891879502211f,0.7931134653350897512070f,\ +0.0015547063882847961258f,0.1572904960949201291776f,0.0181022206184156195241f,\ +0.0845979165659015430734f,0.1012927010519100584629f,0.3446850215525631422331f,\ +0.1293219709178812792949f,0.3800438092639132903194f,0.8987814492511753128312f,\ +0.4324421943462926076762f,0.0273293937030998496107f,0.5383748770034290087594f,\ +0.7024833752242779505437f,0.1548962282848262428381f,0.5390835383288474780272f,\ +0.1390881426235499873645f,0.0006168707728651384725f,0.9156652296068464869094f,\ +0.1317584063853521059162f,0.3075374491015804290228f,0.0825710356322612165636f,\ +0.4750149353525452977642f,0.4849627047297689896865f,0.2277392026712919681497f,\ +0.2874713311779031332804f,0.0549878553904352973536f,0.3376097526832130268915f,\ +0.1299116217371263370950f,0.0328670347156327785632f,0.4559278322250933657145f,\ +0.5705347146251601442302f,0.7290276258356205296707f,0.1131344317595426168799f,\ +0.1006705540469166465511f,0.1137690080263093483914f,0.0783595969578743251072f,\ +0.4462079703492781712626f,0.2337267646996942227489f,0.3978062726778792690396f,\ +0.5185533104706666618355f,0.0363490080574402352198f,0.0620124272747637136916f,\ +0.0312328029897817466276f,0.3864060554321692708690f,0.0022524346871346696830f,\ +0.0632585868588908389887f,0.2237670569906841377961f,0.6824290171913035552009f,\ +0.0377571763724054293432f,0.0141766430709802434412f,0.2149257196483875254067f,\ +0.2578407933391972939319f,0.2128380478225575245244f,0.2674689404085963673197f,\ +0.1823436113853212359182f,0.4056056215333987968741f,0.2146748219054467332612f,\ +0.223046689026648065068f,0.1634988110612213274564f,0.0073293650010406562884f,\ +0.3150173837340161653309f,0.0076249132705958379275f,0.0434335216277395089191f,\ +0.0313505053258816626660f,0.2444812036986294678798f,0.3466410955044766373234f,\ +0.1042723904265626388987f,0.0453228084791582885860f,0.5912990853328871088124f,\ +0.2007031359569984296787f,0.0167049995422212521623f,0.1246635280743631640776f,\ +0.3089842628645015354394f,0.2626345091206789272853f,0.1465541876274137622627f,\ +0.2216450586144267098643f,0.5285192198927095574845f,0.0413300203540647725919f,\ +0.5292138833303512424067f,0.0141045991242647154873f,0.1685414827318337249729f,\ +0.0034690439934227570301f,0.0014126709050284813954f,0.1046801480137381917812f,\ +0.0711144568747612698667f,0.4926872994178387865638f,0.0616951426084962062379f,\ +0.0165076615799914921956f,0.1327941181924368052591f,0.868033438078243735347f,\ +0.0546360997224647759740f,0.7090011428942235571782f,0.0048974529292317055262f,\ +0.1686471396630155883400f,0.5949381503962772876903f,0.0398028687794790766996f,\ +0.1468791597298964024532f,0.5728412246724432499434f,0.0107325667316315806477f,\ +0.4909924875028962021339f,0.0286963197327067993936f,0.0537998717694305322867f,\ +0.2438185660472551308242f,0.6434233461520417751700f,0.2380516082128716348620f,\ +0.8222033973236569925902f,0.1681678001302578939757f,0.0041792515466696263798f,\ +0.0588148261782265452391f,0.0012143282530841621129f,0.0063615413133502824242f,\ +0.0500028365202378755061f,0.2021051162170970916243f,0.1973234385130417933851f,\ +0.5451384577040119250313f,0.1976862794373486775790f,0.1076667634679787238783f,\ +0.5376697382791472135111f,0.0985248319409957051818f,0.0033678233038544891365f,\ +0.1219272919799819776543f,0.2428156984917200222895f,0.2193419366816712900992f,\ +0.4280317866296952655780f,0.0001036289015210918596f,0.3201301548639712835076f,\ +0.0053154752388706117197f,0.271595185644301739813f,0.0482369297516522660407f,\ +0.0423107104325134431022f,0.0565034955330471419521f,0.4799554874706279394836f,\ +0.20470116123310294620f,0.6373039076500160993177f,0.0655714026521615894749f,\ +0.3251362821081638099230f,0.0011131668175105025043f,0.1505519749814473728922f,\ +0.4388826857083177879204f,0.0379370058772945314973f,0.9336139987593442546299f,\ +0.0587631539765752775040f,0.0418948859295049033657f,0.0640275938091060398127f,\ +0.1260139337205268827979f,0.8547818589992876026074f,0.1128395809574832958644f,\ +0.0788356698867948707532f,0.4771524794855955819983f,0.0019453644757141607628f,\ +0.0114845205520388293774f,0.0189004689269446496391f,0.0664507489315135924102f,\ +0.0771809917160177494377f,0.5813292520999571166840f,0.1319828101737011150085f,\ +0.3578958571232515595284f,0.7499293978433335672307f,0.140732697763512853983f,\ +0.1025732946126776817808f,0.4317832519759596809905f} + +#define DP1 {0.3874644362367689609528,0.3987790448591113090515,0.9963990836404263973236,\ +0.9320784267038106918335,0.0681476672179996967316,0.7187465364113450050354,\ +0.6592897172085940837860,0.437819693237543106079,0.9570061699487268924713,\ +0.3977778619155287742615,0.5414962074719369411469,0.1475485283881425857544,\ +0.9197258842177689075470,0.4185347454622387886047,0.9044831502251327037811,\ +0.3202747702598571777344,0.5748232551850378513336,0.7572625903412699699402,\ +0.3254728927277028560638,0.5012555103749036788940,0.2686208193190395832062,\ +0.1170668462291359901428,0.3667570571415126324,0.8753886483609676361084,\ +0.5248321653343737125397,0.7686112513765692710876,0.8289924389682710170746,\ +0.6499033216387033462524,0.5625062701292335987091,0.216987949796020984650,\ +0.932231280487030744553,0.9350972101092338562012,0.9760812097229063510895,\ +0.9135094834491610527039,0.2684359191916882991791,0.0918707158416509628296,\ +0.1712972451932728290558,0.7311726594343781471252,0.8692278112284839153290,\ +0.0148080177605152130127,0.6507192836143076419830,0.4225442921742796897888,\ +0.2326209298335015773773,0.3195550013333559036255,0.7426187139935791492462,\ +0.7788188206031918525696,0.6524895387701690196991,0.9032440632581710815430,\ +0.8669646182097494602203,0.7087978003546595573425,0.6945203407667577266693,\ +0.8467157911509275436401,0.9322743569500744342804,0.9565412709489464759827,\ +0.1623990009538829326630,0.1272875182330608367920,0.9570735306479036808014,\ +0.6764409979805350303650,0.3979810453020036220551,0.1108187530189752578735,\ +0.5097153154201805591583,0.5844655903056263923645,0.2591971340589225292206,\ +0.2918234840035438537598,0.0603091740049421787262,0.9043274922296404838562,\ +0.6194427101872861385345,0.2503793593496084213257,0.8385089416988193988800,\ +0.8273218506947159767151,0.7322020228020846843719,0.2945837415754795074463,\ +0.2909102872945368289948,0.7045872574672102928162,0.3046565256081521511078,\ +0.7573066372424364089966,0.7318075490184128284454,0.6905383663251996040344,\ +0.6240276503376662731171,0.415990501642227172852,0.2810599454678595066071,\ +0.0562203852459788322449,0.5804039551876485347748,0.0042469184845685958862,\ +0.6828171615488827228546,0.8913354435935616493225,0.9298026482574641704559,\ +0.2840001545846462249756,0.0988543094135820865631,0.4136908343061804771423,\ +0.6412154859863221645355,0.6469275895506143569946,0.4702662643976509571075,\ +0.6048191310837864875793,0.6713890465907752513885,0.7139470204710960388184,\ +0.5412713759578764438629,0.3905201805755496025085,0.0110893785022199153900,\ +0.9015008416026830673218,0.1388745536096394062042,0.0850749695673584938049,\ +0.3466010238043963909149,0.4233870990574359893799,0.8021397278644144535065,\ +0.3178813671693205833435,0.1802104166708886623383,0.6968874204903841018677,\ +0.3548216861672699451447,0.1612617420032620429993,0.7534236568026244640350,\ +0.6219418197870254516602,0.5151072838343679904938,0.6781924543902277946472,\ +0.6166686578653752803802,0.7021203767508268356323,0.1362160299904644489288,\ +0.6087052235379815101624,0.1892316709272563457489,0.4761417917907238006592,\ +0.1716100485064089298248,0.4137103697285056114197,0.1531781828962266445160,\ +0.2286888156086206436157,0.9585634139366447925568,0.3949919315055012702942,\ +0.0250081899575889110565,0.4492705538868904113770,0.91384086245670915,\ +0.1101246578618884086609,0.7487958460114896297455,0.0078816469758749008179,\ +0.2352358778007328510284,0.8010628754273056983948,0.6545634861104190349579,\ +0.5162083245813846588135,0.7027181521989405155182,0.0551512306556105613708,\ +0.6256400248967111110687,0.8431313354521989822388,0.1729404223151504993439,\ +0.4173073070123791694641,0.8187537300400435924530,0.2532757520675659179688,\ +0.8608546801842749118805,0.1721261171624064445496,0.7806093706749379634857,\ +0.1373576503247022628784,0.0021877591498196125031,0.0146564701572060585022,\ +0.3046997408382594585419,0.8030776642262935638428,0.9905262948013842105865,\ +0.8285992136225104331970,0.8721015579067170619965,0.2953114155679941177368,\ +0.5827610609121620655060,0.2906773509457707405090,0.020005736034363508224,\ +0.7143468186259269714355,0.2666406803764402866364,0.5199280334636569023132,\ +0.4817320345900952816010,0.0009182598441839218140,0.3841847111470997333527,\ +0.4906664276495575904846,0.4419780815951526165009,0.6567876525223255157471,\ +0.10470610717311501503,0.4278714573010802268982,0.7510527721606194972992,\ +0.3696223665028810501099,0.8411930543370544910431,0.9037434207275509834290,\ +0.441844041924923658371,0.0109200328588485717773,0.2038001813925802707672,\ +0.854183482937514781952,0.3932710154913365840912,0.9757302235811948776245,\ +0.0841991459019482135773,0.2339450428262352943420,0.483970529865473508835,\ +0.3329230062663555145264,0.9645385951735079288483,0.5292069753631949424744,\ +0.0799680328927934169769,0.754754373803734779358,0.0447635021992027759552,\ +0.8463187487795948982239,0.2000828566960990428925,0.6944785490632057189941,\ +0.2820438765920698642731,0.7954674167558550834656,0.2028178661130368709564,\ +0.7807571645826101303101,0.9360628505237400531769,0.8880164856091141700745,\ +0.3384834821335971355438,0.8976153172552585601807} + +#define DP2 {0.4503413387574255466461,0.7080971030518412590027,0.2459910525940358638763,\ +0.5369079094380140304565,0.2288442556746304035187,0.8762242654338479042053,\ +0.8204974154941737651825,0.1096532605588436126709,0.3977028490044176578522,\ +0.0387893309816718101501,0.4764164215885102748871,0.5613568071275949478149,\ +0.9855364081449806690216,0.2565485062077641487122,0.0636831256560981273651,\ +0.4720427915453910827637,0.3494783216156065464020,0.4271033955737948417664,\ +0.8822676776908338069916,0.18796317838132381439,0.8610891629941761493683,\ +0.0103648686781525611877,0.9999243463389575481415,0.3546787090599536895752,\ +0.4418791518546640872955,0.7364388024434447288513,0.5289249173365533351898,\ +0.3544368315488100051880,0.5421899897046387195587,0.0146836983039975166321,\ +0.2055264669470489025116,0.1165965050458908081055,0.6571860709227621555328,\ +0.2626901743933558464050,0.1159235103987157344818,0.2698498796671628952026,\ +0.9737050686962902545929,0.8739323327317833900452,0.9124345253221690654755,\ +0.1049908511340618133545,0.2417178959585726261139,0.0428410014137625694275,\ +0.3636728501878678798676,0.3169804904609918594360,0.4641480413265526294708,\ +0.1660488517954945564270,0.5824519577436149120331,0.9950593486428260803223,\ +0.4988002800382673740387,0.0385573906823992729187,0.7751751034520566463470,\ +0.8296566363424062728882,0.1661487598903477191925,0.5635758275166153907776,\ +0.8564593489281833171844,0.0048462785780429840088,0.9567344621755182743073,\ +0.1947818165645003318787,0.7727439603768289089203,0.7450998444110155105591,\ +0.9319220376200973987579,0.8297540741041302680969,0.8786331820301711559296,\ +0.9850863516330718994141,0.9117660173214972019196,0.3733268706128001213074,\ +0.2097233845852315425873,0.1312689464539289474487,0.5437363986857235431671,\ +0.6896163979545235633850,0.9956645886413753032684,0.3840484581887722015381,\ +0.3460536063648760318756,0.1614690115675330162048,0.25720636313781142235,\ +0.5892038289457559585571,0.3193828281946480274200,0.5760813476517796516418,\ +0.8309780987910926342010,0.0873794183135032653809,0.2206377261318266391754,\ +0.5555423153564333915710,0.6657536565326154232025,0.5303691830486059188843,\ +0.0926435221917927265167,0.2510469639673829078674,0.7339503909461200237274,\ +0.1329477317631244659424,0.1434094593860208988190,0.5195322250947356224060,\ +0.4021125487051904201508,0.3289982546120882034302,0.5687606376595795154572,\ +0.3014845298603177070618,0.6041290420107543468475,0.3006873279809951782227,\ +0.4120792248286306858063,0.4186693010851740837097,0.6609355970285832881927,\ +0.3494365941733121871948,0.0549050425179302692413,0.5105323204770684242249,\ +0.0904512773267924785614,0.5774413160979747772217,0.4321455270983278751373,\ +0.3280229708179831504822,0.2514993823133409023285,0.8484858069568872451782,\ +0.5656450656242668628693,0.1035893531516194343567,0.1654627206735312938690,\ +0.4968057349324226379395,0.5098637067712843418121,0.2160952789708971977234,\ +0.3594232588075101375580,0.7527473028749227523804,0.3034152467735111713409,\ +0.8694091374054551124573,0.0745361442677676677704,0.3539733029901981353760,\ +0.0202146903611719608307,0.0034146374091506004333,0.6833881041966378688812,\ +0.3109660465270280838013,0.5139850866980850696564,0.1561934249475598335266,\ +0.6600902187637984752655,0.2955771684646606445312,0.9498737403191626071930,\ +0.4961295751854777336121,0.9468550696037709712982,0.6213743072003126144409,\ +0.7169277970679104328156,0.7426859596744179725647,0.0608082632534205913544,\ +0.2845346592366695404053,0.8151792050339281558990,0.1946024885401129722595,\ +0.7847843295894563198090,0.0340354088693857192993,0.3110890504904091358185,\ +0.5842662276700139045715,0.7858569952659308910370,0.9398910328745841979980,\ +0.9551012688316404819489,0.9770033909007906913757,0.0053538321517407894135,\ +0.4281874801963567733765,0.5550557305105030536652,0.4340432072058320045471,\ +0.1641052807681262493134,0.2516632266342639923096,0.1992107019759714603424,\ +0.65790366288274526596,0.226678048726171255112,0.3645872045308351516724,\ +0.9226246816106140613556,0.3389491187408566474915,0.1683428841643035411835,\ +0.1706836074590682983398,0.9106476106680929660797,0.4218698022887110710144,\ +0.8885267241857945919037,0.1128535699099302291870,0.8332714592106640338898,\ +0.0108331749215722084045,0.6144992182962596416473,0.0734437219798564910889,\ +0.4040901870466768741608,0.1320571741089224815369,0.6390436268411576747894,\ +0.5538116190582513809204,0.7576190796680748462677,0.0725553305819630622864,\ +0.7358620944432914257050,0.1019380465149879455566,0.7387234591878950595856,\ +0.5138037605211138725281,0.0964652984403073787689,0.9568361993879079818726,\ +0.6979067702777683734894,0.1790800327435135841370,0.1322964723221957683563,\ +0.3785077370703220367432,0.8862080411054193973541,0.2132239108905196189880,\ +0.9858398041687905788422,0.6321957129985094070435,0.0434587192721664905548,\ +0.0135699706152081489563,0.0944632100872695446014,0.0956843793392181396484,\ +0.2736488827504217624664,0.7308020917698740959167,0.6507454826496541500092,\ +0.4583958666771650314331,0.8011528258211910724640,0.1584798255935311317444,\ +0.3030378143303096294403,0.4810337387025356292725} + +#define DRes {0.1744912529357576791433,0.2823742864225169957315,0.2451052593884412711400,\ +0.5004402795138161996746,0.0155952021804655512061,0.6297831559001532131248,\ +0.5409455090315361536213,0.0480083569003692950394,0.3806040803034145825201,\ +0.0154295371430231906262,0.257977685467529749275,0.0828273707923430219102,\ +0.9064233444099463188337,0.1073744637443841548619,0.0576003141096106049956,\ +0.1511833966150217811730,0.2008882664476865365089,0.3234294236757639939839,\ +0.2871542132181882922559,0.0942175789112195266606,0.231306476470241606513,\ +0.0012133824877304738923,0.3667293106274266967226,0.3104817157264057603250,\ +0.2319123920839998853616,0.5660351495083181250223,0.4384747572539204885089,\ +0.2303496741346691967234,0.3049852688101639119900,0.0031861855904077316173,\ +0.1915982014560227986166,0.1090290665768997024898,0.6414669751193333713246,\ +0.2399699655172445322826,0.0311180340698064966665,0.0247913016148056282451,\ +0.1667929958984009919387,0.6389954278891879502211,0.7931134653350897512070,\ +0.0015547063882847961258,0.1572904960949201291776,0.0181022206184156195241,\ +0.0845979165659015430734,0.1012927010519100584629,0.3446850215525631422331,\ +0.1293219709178812792949,0.3800438092639132903194,0.8987814492511753128312,\ +0.4324421943462926076762,0.0273293937030998496107,0.5383748770034290087594,\ +0.7024833752242779505437,0.1548962282848262428381,0.5390835383288474780272,\ +0.1390881426235499873645,0.0006168707728651384725,0.9156652296068464869094,\ +0.1317584063853521059162,0.3075374491015804290228,0.0825710356322612165636,\ +0.4750149353525452977642,0.4849627047297689896865,0.2277392026712919681497,\ +0.2874713311779031332804,0.0549878553904352973536,0.3376097526832130268915,\ +0.1299116217371263370950,0.0328670347156327785632,0.4559278322250933657145,\ +0.5705347146251601442302,0.7290276258356205296707,0.1131344317595426168799,\ +0.1006705540469166465511,0.1137690080263093483914,0.0783595969578743251072,\ +0.4462079703492781712626,0.2337267646996942227489,0.3978062726778792690396,\ +0.5185533104706666618355,0.0363490080574402352198,0.0620124272747637136916,\ +0.0312328029897817466276,0.3864060554321692708690,0.0022524346871346696830,\ +0.0632585868588908389887,0.2237670569906841377961,0.6824290171913035552009,\ +0.0377571763724054293432,0.0141766430709802434412,0.2149257196483875254067,\ +0.2578407933391972939319,0.2128380478225575245244,0.2674689404085963673197,\ +0.1823436113853212359182,0.4056056215333987968741,0.2146748219054467332612,\ +0.223046689026648065068,0.1634988110612213274564,0.0073293650010406562884,\ +0.3150173837340161653309,0.0076249132705958379275,0.0434335216277395089191,\ +0.0313505053258816626660,0.2444812036986294678798,0.3466410955044766373234,\ +0.1042723904265626388987,0.0453228084791582885860,0.5912990853328871088124,\ +0.2007031359569984296787,0.0167049995422212521623,0.1246635280743631640776,\ +0.3089842628645015354394,0.2626345091206789272853,0.1465541876274137622627,\ +0.2216450586144267098643,0.5285192198927095574845,0.0413300203540647725919,\ +0.5292138833303512424067,0.0141045991242647154873,0.1685414827318337249729,\ +0.0034690439934227570301,0.0014126709050284813954,0.1046801480137381917812,\ +0.0711144568747612698667,0.4926872994178387865638,0.0616951426084962062379,\ +0.0165076615799914921956,0.1327941181924368052591,0.868033438078243735347,\ +0.0546360997224647759740,0.7090011428942235571782,0.0048974529292317055262,\ +0.1686471396630155883400,0.5949381503962772876903,0.0398028687794790766996,\ +0.1468791597298964024532,0.5728412246724432499434,0.0107325667316315806477,\ +0.4909924875028962021339,0.0286963197327067993936,0.0537998717694305322867,\ +0.2438185660472551308242,0.6434233461520417751700,0.2380516082128716348620,\ +0.8222033973236569925902,0.1681678001302578939757,0.0041792515466696263798,\ +0.0588148261782265452391,0.0012143282530841621129,0.0063615413133502824242,\ +0.0500028365202378755061,0.2021051162170970916243,0.1973234385130417933851,\ +0.5451384577040119250313,0.1976862794373486775790,0.1076667634679787238783,\ +0.5376697382791472135111,0.0985248319409957051818,0.0033678233038544891365,\ +0.1219272919799819776543,0.2428156984917200222895,0.2193419366816712900992,\ +0.4280317866296952655780,0.0001036289015210918596,0.3201301548639712835076,\ +0.0053154752388706117197,0.271595185644301739813,0.0482369297516522660407,\ +0.0423107104325134431022,0.0565034955330471419521,0.4799554874706279394836,\ +0.20470116123310294620,0.6373039076500160993177,0.0655714026521615894749,\ +0.3251362821081638099230,0.0011131668175105025043,0.1505519749814473728922,\ +0.4388826857083177879204,0.0379370058772945314973,0.9336139987593442546299,\ +0.0587631539765752775040,0.0418948859295049033657,0.0640275938091060398127,\ +0.1260139337205268827979,0.8547818589992876026074,0.1128395809574832958644,\ +0.0788356698867948707532,0.4771524794855955819983,0.0019453644757141607628,\ +0.0114845205520388293774,0.0189004689269446496391,0.0664507489315135924102,\ +0.0771809917160177494377,0.5813292520999571166840,0.1319828101737011150085,\ +0.3578958571232515595284,0.7499293978433335672307,0.140732697763512853983,\ +0.1025732946126776817808,0.4317832519759596809905} + + + +#define CR1 {0.4167818673886358737946f,0.7754927603527903556824f,0.6147445752285420894623f,\ +0.2206868808716535568237f,0.4781269435770809650421f,0.1743857422843575477600f,\ +0.2262396733276546001434f,0.8763213120400905609131f,0.6657514632679522037506f,\ +0.9176845839247107505798f,0.5456351465545594692230f,0.9846978131681680679321f,\ +0.6502424892969429492950f,0.6890702964738011360168f,0.5013572606258094310760f,\ +0.7673201188445091247559f,0.5771855586208403110504f,0.3508661640807986259460f,\ +0.6027267514728009700775f,0.8505915608257055282593f,0.0968277682550251483917f,\ +0.1382516110315918922424f,0.3514578486792743206024f,0.0176461227238178253174f,\ +0.7433502362109720706940f,0.3358979439362883567810f,0.1121416739188134670258f,\ +0.3644763696938753128052f,0.2574999374337494373322f,0.1557759689167141914368f,\ +0.7854640143923461437225f,0.3291082531213760375977f,0.9463309147395193576813f,\ +0.0348854837939143180847f,0.1279074712656438350677f,0.5625727903097867965698f,\ +0.6738048647530376911163f,0.0716566452756524085999f,0.0616879831068217754364f,\ +0.1104246191680431365967f,0.5760010988451540470123f,0.8197732111439108848572f,\ +0.8186757243238389492035f,0.8735574278980493545532f,0.0946858790703117847443f,\ +0.1581676574423909187317f,0.2620503786019980907440f,0.8170662596821784973145f,\ +0.4229911291040480136871f,0.4559381706640124320984f,0.2294407873414456844330f,\ +0.8959066923707723617554f,0.9569525201804935932159f,0.7509375149384140968323f,\ +0.2412989730946719646454f,0.1661008931696414947510f,0.8466569320298731327057f,\ +0.1607837742194533348083f,0.4182585380040109157562f,0.0502405483275651931763f,\ +0.2407492888160049915314f,0.2450429694727063179016f,0.9512274372391402721405f,\ +0.2260366678237915039062f,0.318048770073801279068f,0.5373335508629679679871f,\ +0.9679651274345815181732f,0.1066662650555372238159f,0.7000243966467678546906f,\ +0.9661027649417519569397f,0.1398940901271998882294f,0.3816659115254878997803f,\ +0.3378799916245043277740f,0.3828248968347907066345f,0.8728957301937043666840f,\ +0.5871221665292978286743f,0.4679985162802040576935f,0.9163713874295353889465f,\ +0.4258406492881476879120f,0.1739088818430900573730f,0.7294957810081541538239f,\ +0.3723028255626559257507f,0.8006032942794263362885f,0.0427213814109563827515f,\ +0.0376335312612354755402f,0.3958328152075409889221f,0.7473109806887805461884f,\ +0.0146575160324573516846f,0.3068419084884226322174f,0.6172137176617980003357f,\ +0.7285772911272943019867f,0.206095593050122261047f,0.6171012860722839832306f,\ +0.4982942687347531318665f,0.1864698487333953380585f,0.7766191810369491577148f,\ +0.9174334802664816379547f,0.0989990709349513053894f,0.9559624656103551387787f,\ +0.0187387894839048385620f,0.8602523361332714557648f,0.4824799606576561927795f,\ +0.1686216662637889385223f,0.2581604234874248504639f,0.8603236884810030460358f,\ +0.9776892503723502159119f,0.4902775860391557216644f,0.5333510134369134902954f,\ +0.9720846978016197681427f,0.0181248458102345466614f,0.0364292445592582225800f,\ +0.5231507197022438049316f,0.6790725612081587314606f,0.7754972381517291069031f,\ +0.8091341941617429256439f,0.6911821123212575912476f,0.1892125983722507953644f,\ +0.3070683712139725685120f,0.9991325433366000652313f,0.1158062256872653961182f,\ +0.3297157124616205692291f,0.4354123836383223533630f,0.9969553551636636257172f,\ +0.9743754882365465164185f,0.6353352260775864124298f,0.0793482260778546333313f,\ +0.4567674207501113414764f,0.1505335271358489990234f,0.7237330921925604343414f,\ +0.2547941533848643302917f,0.2566944076679646968842f,0.9333118479698896408081f,\ +0.5517054800875484943390f,0.4642940917983651161194f,0.6993843833915889263153f,\ +0.2767733894288539886475f,0.6460177362896502017975f,0.6939658811315894126892f,\ +0.7965537137351930141449f,0.5889529529958963394165f,0.9025987205095589160919f,\ +0.7366213919594883918762f,0.9812673362903296947479f,0.5188445076346397399902f,\ +0.0478445165790617465973f,0.0598085178062319755554f,0.0917034088633954524994f,\ +0.7101853694766759872437f,0.3557815183885395526886f,0.9375250423327088356018f,\ +0.9701523329131305217743f,0.9907872565090656280518f,0.7148388908244669437408f,\ +0.0643543815240263938904f,0.5210001519881188869476f,0.9661642182618379592896f,\ +0.6379804057069122791290f,0.3707732008770108222961f,0.5714463251642882823944f,\ +0.4862074404954910278320f,0.3099456527270376682281f,0.2583809075877070426941f,\ +0.3787058754824101924896f,0.9536569248884916305542f,0.2653506253845989704132f,\ +0.9738010177388787269592f,0.1274459133855998516083f,0.9431200437247753143311f,\ +0.7913976819254457950592f,0.3400043984875082969666f,0.2612065351568162441254f,\ +0.0993869695812463760376f,0.6489448812790215015411f,0.5638043852522969245911f,\ +0.9915560963563621044159f,0.7837929800152778625488f,0.2056846939958631992340f,\ +0.3382737739011645317078f,0.8287308602593839168549f,0.4373776372522115707397f,\ +0.5751820881851017475128f,0.9588336879387497901917f,0.4775090212933719158173f,\ +0.1295908428728580474854f,0.8555219904519617557526f,0.6717643206939101219177f,\ +0.9420691034756600856781f,0.2612957675009965896606f,0.0613161218352615833282f,\ +0.9738875525072216987610f,0.1835827338509261608124f,0.8908186554908752441406f,\ +0.8428192087449133396149f,0.0821714429184794425964f,0.1742917909286916255951f,\ +0.6517955046147108078003f,0.5859045688994228839874f,0.2920065978541970252991f,\ +0.6918199281208217144012f,0.7315656207501888275146f} + +#define CI1 {0.9866490722633898258209f,0.4429044118151068687439f,0.6974684721790254116058f,\ +0.8788620475679636001587f,0.6942774769850075244904f,0.2103671850636601448059f,\ +0.6422466966323554515839f,0.9095488712191581726074f,0.1162161403335630893707f,\ +0.4426801158115267753601f,0.54438647022470831871f,0.6791554000228643417358f,\ +0.9790061046369373798370f,0.2613751674070954322815f,0.1820912803523242473602f,\ +0.9909572191536426544189f,0.7388255582191050052643f,0.1441168105229735374451f,\ +0.2452696315012872219086f,0.408354120329022407532f,0.4353716713376343250275f,\ +0.7087596403434872627258f,0.7900028186850249767303f,0.4402949064970016479492f,\ +0.0828518071211874485016f,0.4173278687521815299988f,0.8394970758818089962006f,\ +0.0684990715235471725464f,0.1918341075070202350616f,0.9186666915193200111389f,\ +0.4752700994722545146942f,0.0852253548800945281982f,0.5157074541784822940826f,\ +0.2485155304893851280212f,0.2623219466768205165863f,0.2103371713310480117798f,\ +0.6155008045025169849396f,0.6057531507685780525208f,0.3520403089933097362518f,\ +0.4564149156212806701660f,0.3368119024671614170074f,0.9235646529123187065125f,\ +0.1065901606343686580658f,0.7106651421636343002319f,0.7925953646190464496613f,\ +0.9542803401127457618713f,0.58853778196498751640f,0.0023766197264194488525f,\ +0.9455601410008966922760f,0.0866364603862166404724f,0.759459157940000295639f,\ +0.4246732611209154129028f,0.3839263510890305042267f,0.6142078237608075141907f,\ +0.7312827515415847301483f,0.1793139278888702392578f,0.3842914947308599948883f,\ +0.6737622944638133049011f,0.9141166522167623043060f,0.7132891099900007247925f,\ +0.8553560380823910236359f,0.5722871581092476844788f,0.4043100993148982524872f,\ +0.4159644804894924163818f,0.2562583745457231998444f,0.7214373638853430747986f,\ +0.4564993805252015590668f,0.8455213252454996109009f,0.0832691607065498828888f,\ +0.8981556417420506477356f,0.3833881053142249584198f,0.9534438475966453552246f,\ +0.0185950272716581821442f,0.0502144945785403251648f,0.7270118533633649349213f,\ +0.2758033480495214462280f,0.3350416650064289569855f,0.3654300654307007789612f,\ +0.0452371980063617229462f,0.5600892789661884307861f,0.6502862856723368167877f,\ +0.823297879658639431000f,0.1572451046667993068695f,0.7963371742516756057739f,\ +0.6245094579644501209259f,0.9478004621341824531555f,0.1917487042956054210663f,\ +0.1213034540414810180664f,0.6951363184489309787750f,0.9801368294283747673035f,\ +0.2816954418085515499115f,0.5644371043890714645386f,0.4424371575005352497101f,\ +0.1901238569989800453186f,0.2492035995237529277802f,0.1043982319533824920654f,\ +0.6797373802401125431061f,0.5450195213779807090759f,0.1244831955991685390472f,\ +0.0048734936863183975220f,0.8619868424721062183380f,0.4545180173590779304504f,\ +0.8424912574701011180878f,0.8984384015202522277832f,0.9064385616220533847809f,\ +0.8106667501851916313171f,0.9610714702866971492767f,0.5872165020555257797241f,\ +0.0191868026740849018097f,0.0414552027359604835510f,0.7443282003514468669891f,\ +0.0290854312479496002197f,0.6213145391084253787994f,0.3968256777152419090271f,\ +0.4549848935566842556000f,0.4781798440963029861450f,0.9684002888388931751251f,\ +0.1858559148386120796204f,0.1994768488220870494843f,0.2484412193298339843750f,\ +0.5571343251504004001617f,0.1838635830208659172058f,0.1695283665321767330170f,\ +0.0689645390957593917847f,0.9127942626364529132843f,0.9281826475635170936584f,\ +0.6239642719738185405731f,0.4998918436467647552490f,0.8513300181366503238678f,\ +0.1213616123422980308533f,0.4545058137737214565277f,0.3776026610285043716431f,\ +0.8098081466741859912872f,0.8605336369946599006653f,0.6793009373359382152557f,\ +0.7579513117671012878418f,0.3389655523933470249176f,0.9117085291072726249695f,\ +0.7079389332793653011322f,0.3263010885566473007202f,0.3516225744970142841339f,\ +0.7477366114035248756409f,0.7216994608752429485321f,0.7431053109467029571533f,\ +0.2207054481841623783112f,0.5686944639310240745544f,0.0127859464846551418304f,\ +0.893785255029797554016f,0.3206281405873596668243f,0.0234425412490963935852f,\ +0.626293356996029615402f,0.5116549581289291381836f,0.1057835617102682590485f,\ +0.8511046646162867546082f,0.1486603482626378536224f,0.1426428984850645065f,\ +0.3198941503651440143585f,0.1612193891778588294983f,0.9863557885400950908661f,\ +0.9205605499446392059326f,0.4299718351103365421295f,0.5713132461532950401306f,\ +0.9785496569238603115082f,0.1216678116470575332642f,0.8786373701877892017365f,\ +0.9206458600237965583801f,0.6875183167867362499237f,0.9672853127121925354004f,\ +0.2485490464605391025543f,0.7788769407197833061218f,0.2105341642163693904877f,\ +0.6432035919278860092163f,0.9326907773502171039581f,0.4684051508083939552307f,\ +0.8569896514527499675751f,0.0046391524374485015869f,0.4042695597745478153229f,\ +0.8191288476809859275818f,0.5345056853257119655609f,0.9354873914271593093872f,\ +0.6799723100848495960236f,0.3743787007406353950500f,0.1877744006924331188202f,\ +0.8306224048137664794922f,0.0703320750035345554352f,0.2667721835896372795105f,\ +0.1338863088749349117279f,0.1699936669319868087769f,0.8109536175616085529327f,\ +0.4827399412170052528381f,0.6378918210975825786591f,0.6532695852220058441162f,\ +0.6683483780361711978912f,0.7344740321859717369080f,0.5723471469245851039886f,\ +0.8637779299169778823853f,0.114128809887915849686f,0.6580480458214879035950f,\ +0.5045945676974952220917f,0.9304931387305259704590f} + +#define CR2 {0.4259712868370115756989f,0.7602704120799899101257f,0.0969742774032056331635f,\ +0.4801846649497747421265f,0.1877757241018116474152f,0.8814185047522187232971f,\ +0.0292700375430285930634f,0.8533888049423694610596f,0.6302552805282175540924f,\ +0.5044946586713194847107f,0.1639711013995110988617f,0.7960704732686281204224f,\ +0.7220622044987976551056f,0.8315819846466183662415f,0.0036919671110808849335f,\ +0.9424226135015487670898f,0.5196401872672140598297f,0.5065894601866602897644f,\ +0.4127033217810094356537f,0.6533151101320981979370f,0.501574948895722627640f,\ +0.520403296686708927155f,0.0206185649149119853973f,0.4165633432567119598389f,\ +0.1275541991926729679108f,0.9734601816162467002869f,0.9600647068582475185394f,\ +0.0264936182647943496704f,0.2156869736500084400177f,0.4144923957064747810364f,\ +0.2820876422338187694550f,0.0115554705262184143066f,0.2319323443807661533356f,\ +0.9741948051378130912781f,0.8930417983792722225189f,0.2787308450788259506226f,\ +0.0853875060565769672394f,0.0125637287274003028870f,0.3567141587845981121063f,\ +0.4434901513159275054932f,0.5231852368451654911041f,0.4986576801165938377380f,\ +0.4054326615296304225922f,0.8140451926738023757935f,0.7187507343478500843048f,\ +0.8415299849584698677063f,0.5039089727215468883514f,0.4986489713191986083984f,\ +0.1471678265370428562164f,0.3910832731053233146667f,0.3095656349323689937592f,\ +0.6046923678368330001831f,0.3414045576937496662140f,0.3275958457961678504944f,\ +0.3730975906364619731903f,0.9983476959168910980225f,0.6231481493450701236725f,\ +0.1586699178442358971f,0.9230180806480348110199f,0.5935091320425271987915f,\ +0.4019993362016975879669f,0.5423517348244786262512f,0.0779389175586402416229f,\ +0.6387800201773643493652f,0.1367760770954191684723f,0.6551735652610659599304f,\ +0.3303351341746747493744f,0.9712570514529943466187f,0.5526766409166157245636f,\ +0.8238675678148865699768f,0.6455440069548785686493f,0.7058613188564777374268f,\ +0.2080520675517618656158f,0.6395015334710478782654f,0.0197484544478356838226f,\ +0.3289662469178438186646f,0.0045380038209259510040f,0.2727865027263760566711f,\ +0.8406948107294738292694f,0.6650723963975906372070f,0.7342959144152700901031f,\ +0.2093062577769160270691f,0.8948949738405644893646f,0.6852791439741849899292f,\ +0.2581136678345501422882f,0.1234186897054314613342f,0.3650629292242228984833f,\ +0.6263032369315624237061f,0.4081154973246157169342f,0.1095790406689047813416f,\ +0.6615356481634080410004f,0.3887942228466272354126f,0.2088313368149101734161f,\ +0.9898350210860371589661f,0.4314283612184226512909f,0.6836967542767524719238f,\ +0.5103755318559706211090f,0.9162438018247485160828f,0.5892742066644132137299f,\ +0.8954097684472799301147f,0.6274849255569279193878f,0.9869608813896775245667f,\ +0.7128982539288699626923f,0.1304925419390201568604f,0.0781663195230066776276f,\ +0.0947508281096816062927f,0.6482759020291268825531f,0.4206676203757524490356f,\ +0.0157033097930252552032f,0.7266698973253369331360f,0.6671256530098617076874f,\ +0.5488706231117248535156f,0.4477724977768957614899f,0.9336705235764384269714f,\ +0.0209862603805959224701f,0.4670969229191541671753f,0.8364190761931240558624f,\ +0.1888776877894997596741f,0.2355282525531947612762f,0.7747952006757259368896f,\ +0.1726417900063097476959f,0.3532871594652533531189f,0.9888498312793672084808f,\ +0.2265578750520944595337f,0.1193372723646461963654f,0.467635613866150379181f,\ +0.9175071450881659984589f,0.7378584071993827819824f,0.3163537555374205112457f,\ +0.5891926242038607597351f,0.1940289377234876155853f,0.8575854804366827011108f,\ +0.441404156852513551712f,0.3922245288267731666565f,0.2196655715815722942352f,\ +0.1761240549385547637939f,0.1205885396338999271393f,0.7508801734074950218201f,\ +0.2761224261485040187836f,0.6377332974225282669067f,0.2822759491391479969025f,\ +0.0232485281303524971008f,0.4800276714377105236053f,0.2259713858366012573242f,\ +0.0480956234969198703766f,0.255338179878890514374f,0.8838844164274632930756f,\ +0.9909171890467405319214f,0.7547875796444714069366f,0.0237286994233727455139f,\ +0.0672572324983775615692f,0.8869388215243816375732f,0.2006625742651522159576f,\ +0.1356438836082816123962f,0.0619430518709123134613f,0.3897590730339288711548f,\ +0.7104214397259056568146f,0.9051968725398182868958f,0.9548764410428702831268f,\ +0.3615677133202552795410f,0.1120837950147688388824f,0.2245571417734026908875f,\ +0.0125192492268979549408f,0.1329306717962026596069f,0.2197761316783726215363f,\ +0.1487893695011734962463f,0.6704846317879855632782f,0.2702460922300815582275f,\ +0.916129274759441614151f,0.2131141787394881248474f,0.2321454486809670925140f,\ +0.9974972624331712722778f,0.4280352187342941761017f,0.2013407545164227485657f,\ +0.6199770378880202770233f,0.7410524189472198486328f,0.8895133384503424167633f,\ +0.5842213360592722892761f,0.0233843638561666011810f,0.7662614267319440841675f,\ +0.7854359750635921955109f,0.346477583982050418854f,0.7867635409347712993622f,\ +0.3745993338525295257568f,0.3698633969761431217194f,0.4212488224729895591736f,\ +0.3815477318130433559418f,0.630106801167130470276f,0.6527381357736885547638f,\ +0.4507121564820408821106f,0.8059874209575355052948f,0.0838774070143699645996f,\ +0.0486886971630156040192f,0.091624463908374309540f,0.2564150630496442317963f,\ +0.4653418269008398056030f,0.2816926469095051288605f,0.5845362627878785133362f,\ +0.4137441064231097698212f,0.8090988881886005401611f} + +#define CI2 {0.6393490717746317386627f,0.805427453480660915375f,0.1889523915015161037445f,\ +0.9860434997826814651489f,0.1705104154534637928009f,0.5185149358585476875305f,\ +0.2712999242357909679413f,0.1075414568185806274414f,0.9200236895121634006500f,\ +0.0489821014925837516785f,0.3230310245417058467865f,0.7714011203497648239136f,\ +0.7943310593254864215851f,0.0943802008405327796936f,0.1643108497373759746552f,\ +0.6183919720351696014404f,0.1516798050142824649811f,0.8934515854343771934509f,\ +0.7921462929807603359222f,0.1680600438266992568970f,0.7106916573829948902130f,\ +0.4711248250678181648254f,0.5770412567071616649628f,0.4025902226567268371582f,\ +0.8710415088571608066559f,0.1784316999837756156921f,0.481136301066726446152f,\ +0.0674654301255941390991f,0.0399954994209110736847f,0.2460960680618882179260f,\ +0.6415826673619449138641f,0.1576726771891117095947f,0.0585584775544703006744f,\ +0.5705446070060133934021f,0.1629006764851510524750f,0.5582059938460588455200f,\ +0.3209808361716568470001f,0.4510894315317273139954f,0.4620725023560225963593f,\ +0.3076162338256835937500f,0.6813747235573828220367f,0.4970325855538249015808f,\ +0.0101193203590810298920f,0.4533577542752027511597f,0.7411896293051540851593f,\ +0.4234424093738198280334f,0.8139128307811915874481f,0.9676819704473018646240f,\ +0.6112973452545702457428f,0.9543517818674445152283f,0.4819711572490632534027f,\ +0.6928277853876352310181f,0.7424363014288246631622f,0.5521282376721501350403f,\ +0.217989120166748762131f,0.7842588946223258972168f,0.9177652769722044467926f,\ +0.1917659593746066093445f,0.5858528851531445980072f,0.6206979658454656600952f,\ +0.0012764860875904560089f,0.8988496446982026100159f,0.3898889864794909954071f,\ +0.6497076936066150665283f,0.5358180389739573001862f,0.2699402486905455589294f,\ +0.514097725506871938705f,0.1375687289983034133911f,0.7844757777638733386993f,\ +0.6941326009109616279602f,0.0641209441237151622772f,0.2922044843435287475586f,\ +0.3090644874610006809235f,0.4945348976179957389832f,0.6556941731832921504974f,\ +0.7279028128832578659058f,0.6794784818775951862335f,0.7084200689569115638733f,\ +0.1933331559412181377411f,0.7405845634639263153076f,0.4076515645720064640045f,\ +0.7247990211471915245056f,0.9830047464929521083832f,0.3623690102249383926392f,\ +0.6998763647861778736115f,0.4981657536700367927551f,0.5225321832112967967987f,\ +0.6641861572861671447754f,0.1212330483831465244293f,0.5571643514558672904968f,\ +0.8134847371838986873627f,0.275185918435454368591f,0.7658774037845432758331f,\ +0.5269278520718216896057f,0.5383017356507480144501f,0.5876941718161106109619f,\ +0.0269383029080927371979f,0.3838389879092574119568f,0.9464009604416787624359f,\ +0.6164656896144151687622f,0.5597745371051132678986f,0.1614628033712506294250f,\ +0.7930214214138686656952f,0.9809839427471160888672f,0.5323410280980169773102f,\ +0.3264011470600962638855f,0.1745505048893392086029f,0.9795577805489301681519f,\ +0.7564144139178097248077f,0.5428190389648079872131f,0.6040854970924556255341f,\ +0.2239649854600429534912f,0.7934280098415911197662f,0.0443929126486182212830f,\ +0.1709794825874269008636f,0.8033927027136087417603f,0.6286661443300545215607f,\ +0.3324307324364781379700f,0.1281216177158057689667f,0.4464247450232505798340f,\ +0.0075678699649870395660f,0.4189139856025576591492f,0.7507017790339887142181f,\ +0.64982577227056026459f,0.0278900493867695331573f,0.3332115495577454566956f,\ +0.8102095867507159709930f,0.2428723461925983428955f,0.0814798162318766117096f,\ +0.1112154340371489524841f,0.5074178031645715236664f,0.3559808600693941116333f,\ +0.7394064110703766345978f,0.9856483982875943183899f,0.2081001061014831066132f,\ +0.2623823434114456176758f,0.6742023923434317111969f,0.9962934432551264762878f,\ +0.8252332373522222042084f,0.0615941416472196578979f,0.2129642223007977008820f,\ +0.7388951787725090980530f,0.1914335261099040508270f,0.6734384708106517791748f,\ +0.6150622279383242130280f,0.4714830657467246055603f,0.2653777874074876308441f,\ +0.1113578472286462783813f,0.6682099369354546070099f,0.2968665333464741706848f,\ +0.5159585955552756786346f,0.5037773922085762023926f,0.6966427885927259922028f,\ +0.6400519711896777153015f,0.3279239325784146785736f,0.8322640117257833480835f,\ +0.5751562197692692279816f,0.7393315965309739112854f,0.7727512116543948650360f,\ +0.8552324511110782623291f,0.8427531258203089237213f,0.3697941964492201805115f,\ +0.5885056755505502223969f,0.185948224738240242004f,0.5096506965346634387970f,\ +0.5180077450349926948547f,0.7124331700615584850311f,0.9935774207115173339844f,\ +0.6513966270722448825836f,0.2266238955780863761902f,0.2100372924469411373138f,\ +0.296033380553126335144f,0.3838447039015591144562f,0.3276543477550148963928f,\ +0.9443909148685634136200f,0.3133702538907527923584f,0.3127397657372057437897f,\ +0.2831690898165106773376f,0.8294320828281342983246f,0.8504734281450510025024f,\ +0.0516620394773781299591f,0.8521665157750248908997f,0.0109942886047065258026f,\ +0.1777968332171440124512f,0.9020808511413633823395f,0.8023654175922274589539f,\ +0.8193211196921765804291f,0.3788971211761236190796f,0.2892677118070423603058f,\ +0.3856688523665070533752f,0.8368152822367846965790f,0.6335147209465503692627f,\ +0.0478187785483896732330f,0.7960498845204710960388f,0.9247719994746148586273f,\ +0.4049517679959535598755f,0.1505366903729736804962f,0.3286092029884457588196f,\ +0.5528467851690948009491f,0.0004969090223312377930f} + +#define CResR {-0.4532760601370298680912f,0.2328568279348733338630f,-0.0721739248448070302988f,\ +-0.7606257532599224324699f,-0.0286009079979238634017f,0.0446282927443572285942f,\ +-0.1676194364050221097262f,0.6500285865688182340705f,0.3126717730334664935299f,\ +0.4412835685735998492163f,-0.0863853232804955989410f,0.2599876176861364296400f,\ +-0.3081394309018399835232f,0.5483498039081077246593f,-0.0280685784873250555871f,\ +0.1103398428388524532551f,0.1878638951594227557429f,0.0489837078099595035763f,\ +0.0544579030846000788912f,0.4870763078789703826033f,-0.2608486317663467612959f,\ +-0.2619676674188661236187f,-0.4486176628283578549095f,-0.1699076965638988134799f,\ +0.0226500810131932545088f,0.2525187524366853675239f,-0.2962492545486477002470f,\ +0.0050349784816676457222f,0.0478668812844439128806f,-0.161512306092542023972f,\ +-0.0833553662573387199597f,-0.0096347091494573405823f,0.1892857042353479901653f,\ +-0.1078039385912064745954f,0.0714942955946598623918f,0.0393949194957836229536f,\ +-0.1400294459234943666992f,-0.2723485697759917556482f,-0.1406631695056576036862f,\ +-0.0914284063414464026609f,0.0718601543879791859748f,-0.0502555196723774022516f,\ +0.3308392578597269539920f,0.3889296718119258922108f,-0.5194079193768161850642f,\ +-0.2709799400469976582428f,-0.3469689150581814485186f,0.4051294378302779941592f,\ +-0.5157677188576927918007f,0.0956281317726613566688f,-0.2950104262230037743819f,\ +0.2475225041547986504220f,0.0416670917625362458026f,-0.0931174729511790588710f,\ +-0.0693836181169946164538f,0.0251979011091364446528f,0.1749033102248601090345f,\ +-0.1036931245422025305025f,-0.1494776851046086263430f,-0.4129188753992821814265f,\ +0.0956892042125161157440f,-0.381500629131777346803f,-0.0834984180348100207825f,\ +-0.1258676160077962236095f,-0.0938063966240257895990f,0.1573017568314179215339f,\ +0.0850675970242064927174f,-0.0127169319676398440144f,0.3215644924894006106975f,\ +0.1725016235865347580258f,0.0657245842114690947966f,-0.0091973641655471172207f,\ +0.0645495682688117383696f,0.2199842886414065112888f,-0.4594590945201037501811f,\ +-0.0076146572424504455068f,-0.2255298228492429168934f,-0.0089042461759258062504f,\ +0.3492561737977078473172f,-0.2991314773617905764524f,0.2705755498034173589517f,\ +-0.5188001861108486600926f,0.5618831798406120903167f,-0.2592918419562091347785f,\ +-0.4273656804273420206641f,-0.4233085641525572428989f,0.1726206665681528085177f,\ +-0.0713880252688461475197f,0.0409534431553852107388f,-0.4784636138374023794917f,\ +0.2528249080775029078438f,-0.0751963670383180432522f,-0.2099825350036476079296f,\ +0.3930475624040330462350f,-0.0536983488983542034401f,0.4696177809171224182272f,\ +0.4499246289866181136574f,-0.1184924563459542473653f,0.4455130076495959490224f,\ +0.0137745535065977864342f,0.0572770873632376664730f,0.4028010939579977911507f,\ +-0.5479035230736655215367f,-0.8476656355498256578684f,-0.4152860994745538603112f,\ +-0.1719656910372130420583f,0.1500796339609139773419f,-0.3508489918077146718645f,\ +0.0007517730549635760762f,-0.0093318934652646470806f,-0.4253349873439855599599f,\ +0.2806279433177717441694f,-0.1888983413465122329633f,0.7064426647296654371289f,\ +-0.0608123808038953800326f,-0.0613171594896803062724f,-0.4505394490178394883984f,\ +-0.0037858539492685930328f,0.2097666454331615359941f,-0.0211842001217234093824f,\ +0.0527063906668108692055f,0.0768025778411403764467f,0.8585738883942192201104f,\ +0.1759375052405339756589f,0.0503612958523844411740f,-0.2721751218561426211018f,\ +-0.0864544627613991201187f,-0.0103374763464706836968f,0.1595894682913722162354f,\ +0.1366255514725323583214f,-0.1808181983112125135182f,0.6659753695010871554771f,\ +-0.3552522431189574225741f,-0.6660760695837163458677f,0.0122680731984931845613f,\ +-0.1501265897279337457881f,-0.1506290509488406037519f,-0.3872440085463784154030f,\ +-0.3642683937636469471144f,0.3554966732726081435345f,0.1798988824024553845327f,\ +-0.5353736140053680925277f,0.3328780019103673160075f,-0.3831916918313129638562f,\ +-0.1334464728224985796690f,-0.2528584112494918212377f,0.0776621078396230318797f,\ +0.6042048881391237635796f,0.0542925615451090859409f,0.0152869439779466861906f,\ +-0.2578916798676885169250f,0.6210074811527457327998f,0.0697480566005716229316f,\ +-0.5360219400392558508628f,-0.0164769465814076573884f,0.2578547191709110730784f,\ +0.2692458480889036165351f,0.2164281534628332004377f,-0.2165469974967820787626f,\ +-0.6114963430660671495076f,-0.3276202230479545729480f,-0.1532470446853400614096f,\ +-0.5711409136688807564042f,0.1041463421049710486033f,-0.3894804137321275505634f,\ +-0.3320104464777595687508f,-0.4043603275945338859643f,-0.7061983397762294778488f,\ +0.563118573862244065076f,-0.104052368330380548556f,0.0164178824827940009201f,\ +-0.0912715036235035442891f,-0.0802371510589425240845f,-0.0399581838468483496740f,\ +-0.1945912294495280026041f,0.5793779114170104493908f,0.0565281114058220068852f,\ +-0.0343252140979214692695f,-0.4239568198880452332133f,-0.4604615564320009846178f,\ +0.4166399479456509569175f,0.0131813866470892881999f,0.3736222424672819841796f,\ +-0.0991373897615358684599f,0.2529810514946274069281f,0.0689311545837876515908f,\ +0.2497484491434210918115f,0.1002341291998606193081f,-0.1945593262740688278445f,\ +0.2527651998409092271025f,-0.3858322501194685338888f,-0.3391363400421857909883f,\ +0.0090761661352664196878f,-0.5771490540989443474018f,-0.4845995748950238657393f,\ +-0.0464806889926007715808f,0.1478644355329177817460f,-0.0455521984464080931243f,\ +0.0072729334007000101536f,0.5914465599501286252604f} + +#define CResI {0.6867532750160018073515f,0.9613302788463532477792f,0.1837939587530955376504f,\ +0.6396229422193046021405f,0.2118940797572615719613f,0.2758431416829634774679f,\ +0.0801773911552379342504f,0.8704396947843597853733f,0.6857529536617394949616f,\ +0.2682798733548960590234f,0.265520729527220722410f,1.3002525570030343260441f,\ +1.22341111147360948053f,0.2823894734241773618599f,0.0830507125337052176661f,\ +1.4084050938175196598934f,0.4714708444194484759926f,0.3864899878199242189147f,\ +0.578671353512100639094f,0.4097343720866399863212f,0.2871862109036796839590f,\ +0.4339746194558397052177f,0.2190944030815045462379f,0.1905148747457021396468f,\ +0.6580570072675409054597f,0.4661869040666266617023f,0.8599269442495538484650f,\ +0.0264043433044500661100f,0.0516749566895557260748f,0.4191162112725183019890f,\ +0.6380079192550233146974f,0.0528761984310826271827f,0.1750249364921274419782f,\ +0.262006263440240305673f,0.2551006766112977608429f,0.3726589610422177956117f,\ +0.2688345275772468512265f,0.0399340736448891148180f,0.1540820834002836481336f,\ +0.2363839254618368690419f,0.5686876044589181944389f,0.8679966059615636941871f,\ +0.0514995744434985636140f,0.9745475763214328512873f,0.6398586919691986452108f,\ +0.87003041421366145158f,0.5098556345730298478003f,0.7918453871370533247998f,\ +0.3977293850986994838692f,0.4690074760926845609532f,0.3456862982279912954731f,\ +0.8775057294133996599328f,0.8415504958063240170674f,0.6158257382443957927975f,\ +0.3254403835162152369698f,0.3092837496266652719257f,1.016502867475419513710f,\ +0.1377386626241807465743f,1.0887841690471091737891f,0.4545278067154325807309f,\ +0.3441598726430060706249f,0.5306377190646557329146f,0.4023845929152815026342f,\ +0.4125675613624649740174f,0.2054662834722358610851f,0.6177146421590287150849f,\ +0.6484264545005361535246f,0.8358924918092586198171f,0.5951731030444011860681f,\ +1.4105647290575316077366f,0.2564640348596678998128f,0.7845236225889706815906f,\ +0.1082954403048045077806f,0.2214325174472631663214f,0.5867100045537700925280f,\ +0.5180978688180153390874f,0.3195153417190086386768f,0.7488602710128838824133f,\ +0.1203597942708250490007f,0.5012941523009060151850f,0.7748826592461299789250f,\ +0.4421661217651661757166f,0.9277146921619219277488f,0.5611941617833399176263f,\ +0.1875332458457515116823f,0.3141666438540002825874f,0.4604943819421867812203f,\ +0.0857080651661168146926f,0.3208952842499418478539f,0.4512919342037237102616f,\ +0.7790380828723415529424f,0.2761644904057471983094f,0.5650186739065693464212f,\ +0.4507563807256466659190f,0.2078905437719839599531f,0.5277912987547750400807f,\ +0.3716354279518757630640f,0.5373704615276944096536f,0.9780785319295863811107f,\ +0.0159155946349303842324f,1.0224311029322552535348f,0.5264940700384401761625f,\ +0.7343311398624580155214f,0.3704907408839669402667f,0.5288385630587791874646f,\ +0.3959302386908920556863f,0.7086176744936288907084f,0.7694711035408567934013f,\ +0.7356001732724122277318f,0.0399627592998382727418f,0.5185668150213963434325f,\ +0.1331315821040593705415f,0.8170027538591018156922f,0.4049310194334793111537f,\ +0.1478937773069877170684f,0.7786469990644202532337f,0.9289400296531356016061f,\ +0.1371829990074564797897f,0.1749929113926765866793f,0.2441898291613232296893f,\ +0.0986799128052451290927f,0.2473569799851849937422f,0.9160542553812340837993f,\ +0.6487987635563003951944f,0.1266499083655910351531f,0.4604910075393342516747f,\ +0.9425690210228523380209f,0.4054098304412955267040f,0.3282910877920472980662f,\ +0.0998424092123958162315f,0.2184385926591740634262f,0.656067713825576603881f,\ +0.7653872511944090906155f,0.7951531282252717325321f,0.2947609930653066756534f,\ +0.2061139089866899365422f,0.4764220642520822779353f,1.3759775156473299518f,\ +0.8528204157327108347886f,0.2443691207681686350384f,0.2914758305179087627401f,\ +0.5616697707438699227467f,0.5342831779243247813938f,0.5173303887471423223587f,\ +0.0400423211013342383868f,0.1734081126603988776136f,0.0356373465889542606622f,\ +0.9647518864037544217283f,0.4797428841650468456237f,0.2788760702578375605398f,\ +0.5426811930882043943924f,0.9529428659076060181832f,0.519214160106206801260f,\ +0.1566372908148228326741f,0.1800568943774761565546f,0.8597000721649141752323f,\ +0.5941980612955533036512f,0.4200596294318775236754f,1.3834337451293550191878f,\ +0.7486653540997223466036f,0.3094005426987578855069f,0.2238402297126847184661f,\ +0.2351212641216636478614f,0.1935041961305615509925f,0.3283396534211000528103f,\ +0.6414187863585038007486f,0.5517671615629442527506f,1.1984678562974182547407f,\ +0.7432168383550731283194f,0.2430428408595447509200f,0.1037376614284659104293f,\ +0.6710156827233160203861f,0.6483185566975374625187f,0.2790420045943993176962f,\ +1.4677304745898491766809f,0.2490552602808134563528f,0.4239289487649033905114f,\ +0.5743412264612666184860f,0.6998750389577383934636f,1.0888059617925907041069f,\ +0.5637897941342366880946f,0.9467997907854363015545f,0.1529839243771335122180f,\ +0.3341914410029577231498f,0.7977632654942472534287f,0.6513779279028111268701f,\ +0.8229411301591347260853f,0.2061183797708181497654f,0.5470771267862610809374f,\ +0.5931748546354166373717f,0.6677576209776094895432f,0.6191412908370578227490f,\ +0.0728435968768978286958f,0.1327083570997977524097f,0.3079385977540891605742f,\ +0.6658977419097338312781f,0.1203493812224817605117f,0.4806090008275944458482f,\ +0.5912434516954661045673f,0.7532244855713678965969f} + +#define ZR1 {0.4167818673886358737946,0.7754927603527903556824,0.6147445752285420894623,\ +0.2206868808716535568237,0.4781269435770809650421,0.1743857422843575477600,\ +0.2262396733276546001434,0.8763213120400905609131,0.6657514632679522037506,\ +0.9176845839247107505798,0.5456351465545594692230,0.9846978131681680679321,\ +0.6502424892969429492950,0.6890702964738011360168,0.5013572606258094310760,\ +0.7673201188445091247559,0.5771855586208403110504,0.3508661640807986259460,\ +0.6027267514728009700775,0.8505915608257055282593,0.0968277682550251483917,\ +0.1382516110315918922424,0.3514578486792743206024,0.0176461227238178253174,\ +0.7433502362109720706940,0.3358979439362883567810,0.1121416739188134670258,\ +0.3644763696938753128052,0.2574999374337494373322,0.1557759689167141914368,\ +0.7854640143923461437225,0.3291082531213760375977,0.9463309147395193576813,\ +0.0348854837939143180847,0.1279074712656438350677,0.5625727903097867965698,\ +0.6738048647530376911163,0.0716566452756524085999,0.0616879831068217754364,\ +0.1104246191680431365967,0.5760010988451540470123,0.8197732111439108848572,\ +0.8186757243238389492035,0.8735574278980493545532,0.0946858790703117847443,\ +0.1581676574423909187317,0.2620503786019980907440,0.8170662596821784973145,\ +0.4229911291040480136871,0.4559381706640124320984,0.2294407873414456844330,\ +0.8959066923707723617554,0.9569525201804935932159,0.7509375149384140968323,\ +0.2412989730946719646454,0.1661008931696414947510,0.8466569320298731327057,\ +0.1607837742194533348083,0.4182585380040109157562,0.0502405483275651931763,\ +0.2407492888160049915314,0.2450429694727063179016,0.9512274372391402721405,\ +0.2260366678237915039062,0.318048770073801279068,0.5373335508629679679871,\ +0.9679651274345815181732,0.1066662650555372238159,0.7000243966467678546906,\ +0.9661027649417519569397,0.1398940901271998882294,0.3816659115254878997803,\ +0.3378799916245043277740,0.3828248968347907066345,0.8728957301937043666840,\ +0.5871221665292978286743,0.4679985162802040576935,0.9163713874295353889465,\ +0.4258406492881476879120,0.1739088818430900573730,0.7294957810081541538239,\ +0.3723028255626559257507,0.8006032942794263362885,0.0427213814109563827515,\ +0.0376335312612354755402,0.3958328152075409889221,0.7473109806887805461884,\ +0.0146575160324573516846,0.3068419084884226322174,0.6172137176617980003357,\ +0.7285772911272943019867,0.206095593050122261047,0.6171012860722839832306,\ +0.4982942687347531318665,0.1864698487333953380585,0.7766191810369491577148,\ +0.9174334802664816379547,0.0989990709349513053894,0.9559624656103551387787,\ +0.0187387894839048385620,0.8602523361332714557648,0.4824799606576561927795,\ +0.1686216662637889385223,0.2581604234874248504639,0.8603236884810030460358,\ +0.9776892503723502159119,0.4902775860391557216644,0.5333510134369134902954,\ +0.9720846978016197681427,0.0181248458102345466614,0.0364292445592582225800,\ +0.5231507197022438049316,0.6790725612081587314606,0.7754972381517291069031,\ +0.8091341941617429256439,0.6911821123212575912476,0.1892125983722507953644,\ +0.3070683712139725685120,0.9991325433366000652313,0.1158062256872653961182,\ +0.3297157124616205692291,0.4354123836383223533630,0.9969553551636636257172,\ +0.9743754882365465164185,0.6353352260775864124298,0.0793482260778546333313,\ +0.4567674207501113414764,0.1505335271358489990234,0.7237330921925604343414,\ +0.2547941533848643302917,0.2566944076679646968842,0.9333118479698896408081,\ +0.5517054800875484943390,0.4642940917983651161194,0.6993843833915889263153,\ +0.2767733894288539886475,0.6460177362896502017975,0.6939658811315894126892,\ +0.7965537137351930141449,0.5889529529958963394165,0.9025987205095589160919,\ +0.7366213919594883918762,0.9812673362903296947479,0.5188445076346397399902,\ +0.0478445165790617465973,0.0598085178062319755554,0.0917034088633954524994,\ +0.7101853694766759872437,0.3557815183885395526886,0.9375250423327088356018,\ +0.9701523329131305217743,0.9907872565090656280518,0.7148388908244669437408,\ +0.0643543815240263938904,0.5210001519881188869476,0.9661642182618379592896,\ +0.6379804057069122791290,0.3707732008770108222961,0.5714463251642882823944,\ +0.4862074404954910278320,0.3099456527270376682281,0.2583809075877070426941,\ +0.3787058754824101924896,0.9536569248884916305542,0.2653506253845989704132,\ +0.9738010177388787269592,0.1274459133855998516083,0.9431200437247753143311,\ +0.7913976819254457950592,0.3400043984875082969666,0.2612065351568162441254,\ +0.0993869695812463760376,0.6489448812790215015411,0.5638043852522969245911,\ +0.9915560963563621044159,0.7837929800152778625488,0.2056846939958631992340,\ +0.3382737739011645317078,0.8287308602593839168549,0.4373776372522115707397,\ +0.5751820881851017475128,0.9588336879387497901917,0.4775090212933719158173,\ +0.1295908428728580474854,0.8555219904519617557526,0.6717643206939101219177,\ +0.9420691034756600856781,0.2612957675009965896606,0.0613161218352615833282,\ +0.9738875525072216987610,0.1835827338509261608124,0.8908186554908752441406,\ +0.8428192087449133396149,0.0821714429184794425964,0.1742917909286916255951,\ +0.6517955046147108078003,0.5859045688994228839874,0.2920065978541970252991,\ +0.6918199281208217144012,0.7315656207501888275146} + +#define ZI1 {0.9866490722633898258209,0.4429044118151068687439,0.6974684721790254116058,\ +0.8788620475679636001587,0.6942774769850075244904,0.2103671850636601448059,\ +0.6422466966323554515839,0.9095488712191581726074,0.1162161403335630893707,\ +0.4426801158115267753601,0.54438647022470831871,0.6791554000228643417358,\ +0.9790061046369373798370,0.2613751674070954322815,0.1820912803523242473602,\ +0.9909572191536426544189,0.7388255582191050052643,0.1441168105229735374451,\ +0.2452696315012872219086,0.408354120329022407532,0.4353716713376343250275,\ +0.7087596403434872627258,0.7900028186850249767303,0.4402949064970016479492,\ +0.0828518071211874485016,0.4173278687521815299988,0.8394970758818089962006,\ +0.0684990715235471725464,0.1918341075070202350616,0.9186666915193200111389,\ +0.4752700994722545146942,0.0852253548800945281982,0.5157074541784822940826,\ +0.2485155304893851280212,0.2623219466768205165863,0.2103371713310480117798,\ +0.6155008045025169849396,0.6057531507685780525208,0.3520403089933097362518,\ +0.4564149156212806701660,0.3368119024671614170074,0.9235646529123187065125,\ +0.1065901606343686580658,0.7106651421636343002319,0.7925953646190464496613,\ +0.9542803401127457618713,0.58853778196498751640,0.0023766197264194488525,\ +0.9455601410008966922760,0.0866364603862166404724,0.759459157940000295639,\ +0.4246732611209154129028,0.3839263510890305042267,0.6142078237608075141907,\ +0.7312827515415847301483,0.1793139278888702392578,0.3842914947308599948883,\ +0.6737622944638133049011,0.9141166522167623043060,0.7132891099900007247925,\ +0.8553560380823910236359,0.5722871581092476844788,0.4043100993148982524872,\ +0.4159644804894924163818,0.2562583745457231998444,0.7214373638853430747986,\ +0.4564993805252015590668,0.8455213252454996109009,0.0832691607065498828888,\ +0.8981556417420506477356,0.3833881053142249584198,0.9534438475966453552246,\ +0.0185950272716581821442,0.0502144945785403251648,0.7270118533633649349213,\ +0.2758033480495214462280,0.3350416650064289569855,0.3654300654307007789612,\ +0.0452371980063617229462,0.5600892789661884307861,0.6502862856723368167877,\ +0.823297879658639431000,0.1572451046667993068695,0.7963371742516756057739,\ +0.6245094579644501209259,0.9478004621341824531555,0.1917487042956054210663,\ +0.1213034540414810180664,0.6951363184489309787750,0.9801368294283747673035,\ +0.2816954418085515499115,0.5644371043890714645386,0.4424371575005352497101,\ +0.1901238569989800453186,0.2492035995237529277802,0.1043982319533824920654,\ +0.6797373802401125431061,0.5450195213779807090759,0.1244831955991685390472,\ +0.0048734936863183975220,0.8619868424721062183380,0.4545180173590779304504,\ +0.8424912574701011180878,0.8984384015202522277832,0.9064385616220533847809,\ +0.8106667501851916313171,0.9610714702866971492767,0.5872165020555257797241,\ +0.0191868026740849018097,0.0414552027359604835510,0.7443282003514468669891,\ +0.0290854312479496002197,0.6213145391084253787994,0.3968256777152419090271,\ +0.4549848935566842556000,0.4781798440963029861450,0.9684002888388931751251,\ +0.1858559148386120796204,0.1994768488220870494843,0.2484412193298339843750,\ +0.5571343251504004001617,0.1838635830208659172058,0.1695283665321767330170,\ +0.0689645390957593917847,0.9127942626364529132843,0.9281826475635170936584,\ +0.6239642719738185405731,0.4998918436467647552490,0.8513300181366503238678,\ +0.1213616123422980308533,0.4545058137737214565277,0.3776026610285043716431,\ +0.8098081466741859912872,0.8605336369946599006653,0.6793009373359382152557,\ +0.7579513117671012878418,0.3389655523933470249176,0.9117085291072726249695,\ +0.7079389332793653011322,0.3263010885566473007202,0.3516225744970142841339,\ +0.7477366114035248756409,0.7216994608752429485321,0.7431053109467029571533,\ +0.2207054481841623783112,0.5686944639310240745544,0.0127859464846551418304,\ +0.893785255029797554016,0.3206281405873596668243,0.0234425412490963935852,\ +0.626293356996029615402,0.5116549581289291381836,0.1057835617102682590485,\ +0.8511046646162867546082,0.1486603482626378536224,0.1426428984850645065,\ +0.3198941503651440143585,0.1612193891778588294983,0.9863557885400950908661,\ +0.9205605499446392059326,0.4299718351103365421295,0.5713132461532950401306,\ +0.9785496569238603115082,0.1216678116470575332642,0.8786373701877892017365,\ +0.9206458600237965583801,0.6875183167867362499237,0.9672853127121925354004,\ +0.2485490464605391025543,0.7788769407197833061218,0.2105341642163693904877,\ +0.6432035919278860092163,0.9326907773502171039581,0.4684051508083939552307,\ +0.8569896514527499675751,0.0046391524374485015869,0.4042695597745478153229,\ +0.8191288476809859275818,0.5345056853257119655609,0.9354873914271593093872,\ +0.6799723100848495960236,0.3743787007406353950500,0.1877744006924331188202,\ +0.8306224048137664794922,0.0703320750035345554352,0.2667721835896372795105,\ +0.1338863088749349117279,0.1699936669319868087769,0.8109536175616085529327,\ +0.4827399412170052528381,0.6378918210975825786591,0.6532695852220058441162,\ +0.6683483780361711978912,0.7344740321859717369080,0.5723471469245851039886,\ +0.8637779299169778823853,0.114128809887915849686,0.6580480458214879035950,\ +0.5045945676974952220917,0.9304931387305259704590} + +#define ZR2 {0.4259712868370115756989,0.7602704120799899101257,0.0969742774032056331635,\ +0.4801846649497747421265,0.1877757241018116474152,0.8814185047522187232971,\ +0.0292700375430285930634,0.8533888049423694610596,0.6302552805282175540924,\ +0.5044946586713194847107,0.1639711013995110988617,0.7960704732686281204224,\ +0.7220622044987976551056,0.8315819846466183662415,0.0036919671110808849335,\ +0.9424226135015487670898,0.5196401872672140598297,0.5065894601866602897644,\ +0.4127033217810094356537,0.6533151101320981979370,0.501574948895722627640,\ +0.520403296686708927155,0.0206185649149119853973,0.4165633432567119598389,\ +0.1275541991926729679108,0.9734601816162467002869,0.9600647068582475185394,\ +0.0264936182647943496704,0.2156869736500084400177,0.4144923957064747810364,\ +0.2820876422338187694550,0.0115554705262184143066,0.2319323443807661533356,\ +0.9741948051378130912781,0.8930417983792722225189,0.2787308450788259506226,\ +0.0853875060565769672394,0.0125637287274003028870,0.3567141587845981121063,\ +0.4434901513159275054932,0.5231852368451654911041,0.4986576801165938377380,\ +0.4054326615296304225922,0.8140451926738023757935,0.7187507343478500843048,\ +0.8415299849584698677063,0.5039089727215468883514,0.4986489713191986083984,\ +0.1471678265370428562164,0.3910832731053233146667,0.3095656349323689937592,\ +0.6046923678368330001831,0.3414045576937496662140,0.3275958457961678504944,\ +0.3730975906364619731903,0.9983476959168910980225,0.6231481493450701236725,\ +0.1586699178442358971,0.9230180806480348110199,0.5935091320425271987915,\ +0.4019993362016975879669,0.5423517348244786262512,0.0779389175586402416229,\ +0.6387800201773643493652,0.1367760770954191684723,0.6551735652610659599304,\ +0.3303351341746747493744,0.9712570514529943466187,0.5526766409166157245636,\ +0.8238675678148865699768,0.6455440069548785686493,0.7058613188564777374268,\ +0.2080520675517618656158,0.6395015334710478782654,0.0197484544478356838226,\ +0.3289662469178438186646,0.0045380038209259510040,0.2727865027263760566711,\ +0.8406948107294738292694,0.6650723963975906372070,0.7342959144152700901031,\ +0.2093062577769160270691,0.8948949738405644893646,0.6852791439741849899292,\ +0.2581136678345501422882,0.1234186897054314613342,0.3650629292242228984833,\ +0.6263032369315624237061,0.4081154973246157169342,0.1095790406689047813416,\ +0.6615356481634080410004,0.3887942228466272354126,0.2088313368149101734161,\ +0.9898350210860371589661,0.4314283612184226512909,0.6836967542767524719238,\ +0.5103755318559706211090,0.9162438018247485160828,0.5892742066644132137299,\ +0.8954097684472799301147,0.6274849255569279193878,0.9869608813896775245667,\ +0.7128982539288699626923,0.1304925419390201568604,0.0781663195230066776276,\ +0.0947508281096816062927,0.6482759020291268825531,0.4206676203757524490356,\ +0.0157033097930252552032,0.7266698973253369331360,0.6671256530098617076874,\ +0.5488706231117248535156,0.4477724977768957614899,0.9336705235764384269714,\ +0.0209862603805959224701,0.4670969229191541671753,0.8364190761931240558624,\ +0.1888776877894997596741,0.2355282525531947612762,0.7747952006757259368896,\ +0.1726417900063097476959,0.3532871594652533531189,0.9888498312793672084808,\ +0.2265578750520944595337,0.1193372723646461963654,0.467635613866150379181,\ +0.9175071450881659984589,0.7378584071993827819824,0.3163537555374205112457,\ +0.5891926242038607597351,0.1940289377234876155853,0.8575854804366827011108,\ +0.441404156852513551712,0.3922245288267731666565,0.2196655715815722942352,\ +0.1761240549385547637939,0.1205885396338999271393,0.7508801734074950218201,\ +0.2761224261485040187836,0.6377332974225282669067,0.2822759491391479969025,\ +0.0232485281303524971008,0.4800276714377105236053,0.2259713858366012573242,\ +0.0480956234969198703766,0.255338179878890514374,0.8838844164274632930756,\ +0.9909171890467405319214,0.7547875796444714069366,0.0237286994233727455139,\ +0.0672572324983775615692,0.8869388215243816375732,0.2006625742651522159576,\ +0.1356438836082816123962,0.0619430518709123134613,0.3897590730339288711548,\ +0.7104214397259056568146,0.9051968725398182868958,0.9548764410428702831268,\ +0.3615677133202552795410,0.1120837950147688388824,0.2245571417734026908875,\ +0.0125192492268979549408,0.1329306717962026596069,0.2197761316783726215363,\ +0.1487893695011734962463,0.6704846317879855632782,0.2702460922300815582275,\ +0.916129274759441614151,0.2131141787394881248474,0.2321454486809670925140,\ +0.9974972624331712722778,0.4280352187342941761017,0.2013407545164227485657,\ +0.6199770378880202770233,0.7410524189472198486328,0.8895133384503424167633,\ +0.5842213360592722892761,0.0233843638561666011810,0.7662614267319440841675,\ +0.7854359750635921955109,0.346477583982050418854,0.7867635409347712993622,\ +0.3745993338525295257568,0.3698633969761431217194,0.4212488224729895591736,\ +0.3815477318130433559418,0.630106801167130470276,0.6527381357736885547638,\ +0.4507121564820408821106,0.8059874209575355052948,0.0838774070143699645996,\ +0.0486886971630156040192,0.091624463908374309540,0.2564150630496442317963,\ +0.4653418269008398056030,0.2816926469095051288605,0.5845362627878785133362,\ +0.4137441064231097698212,0.8090988881886005401611} + +#define ZI2 {0.6393490717746317386627,0.805427453480660915375,0.1889523915015161037445,\ +0.9860434997826814651489,0.1705104154534637928009,0.5185149358585476875305,\ +0.2712999242357909679413,0.1075414568185806274414,0.9200236895121634006500,\ +0.0489821014925837516785,0.3230310245417058467865,0.7714011203497648239136,\ +0.7943310593254864215851,0.0943802008405327796936,0.1643108497373759746552,\ +0.6183919720351696014404,0.1516798050142824649811,0.8934515854343771934509,\ +0.7921462929807603359222,0.1680600438266992568970,0.7106916573829948902130,\ +0.4711248250678181648254,0.5770412567071616649628,0.4025902226567268371582,\ +0.8710415088571608066559,0.1784316999837756156921,0.481136301066726446152,\ +0.0674654301255941390991,0.0399954994209110736847,0.2460960680618882179260,\ +0.6415826673619449138641,0.1576726771891117095947,0.0585584775544703006744,\ +0.5705446070060133934021,0.1629006764851510524750,0.5582059938460588455200,\ +0.3209808361716568470001,0.4510894315317273139954,0.4620725023560225963593,\ +0.3076162338256835937500,0.6813747235573828220367,0.4970325855538249015808,\ +0.0101193203590810298920,0.4533577542752027511597,0.7411896293051540851593,\ +0.4234424093738198280334,0.8139128307811915874481,0.9676819704473018646240,\ +0.6112973452545702457428,0.9543517818674445152283,0.4819711572490632534027,\ +0.6928277853876352310181,0.7424363014288246631622,0.5521282376721501350403,\ +0.217989120166748762131,0.7842588946223258972168,0.9177652769722044467926,\ +0.1917659593746066093445,0.5858528851531445980072,0.6206979658454656600952,\ +0.0012764860875904560089,0.8988496446982026100159,0.3898889864794909954071,\ +0.6497076936066150665283,0.5358180389739573001862,0.2699402486905455589294,\ +0.514097725506871938705,0.1375687289983034133911,0.7844757777638733386993,\ +0.6941326009109616279602,0.0641209441237151622772,0.2922044843435287475586,\ +0.3090644874610006809235,0.4945348976179957389832,0.6556941731832921504974,\ +0.7279028128832578659058,0.6794784818775951862335,0.7084200689569115638733,\ +0.1933331559412181377411,0.7405845634639263153076,0.4076515645720064640045,\ +0.7247990211471915245056,0.9830047464929521083832,0.3623690102249383926392,\ +0.6998763647861778736115,0.4981657536700367927551,0.5225321832112967967987,\ +0.6641861572861671447754,0.1212330483831465244293,0.5571643514558672904968,\ +0.8134847371838986873627,0.275185918435454368591,0.7658774037845432758331,\ +0.5269278520718216896057,0.5383017356507480144501,0.5876941718161106109619,\ +0.0269383029080927371979,0.3838389879092574119568,0.9464009604416787624359,\ +0.6164656896144151687622,0.5597745371051132678986,0.1614628033712506294250,\ +0.7930214214138686656952,0.9809839427471160888672,0.5323410280980169773102,\ +0.3264011470600962638855,0.1745505048893392086029,0.9795577805489301681519,\ +0.7564144139178097248077,0.5428190389648079872131,0.6040854970924556255341,\ +0.2239649854600429534912,0.7934280098415911197662,0.0443929126486182212830,\ +0.1709794825874269008636,0.8033927027136087417603,0.6286661443300545215607,\ +0.3324307324364781379700,0.1281216177158057689667,0.4464247450232505798340,\ +0.0075678699649870395660,0.4189139856025576591492,0.7507017790339887142181,\ +0.64982577227056026459,0.0278900493867695331573,0.3332115495577454566956,\ +0.8102095867507159709930,0.2428723461925983428955,0.0814798162318766117096,\ +0.1112154340371489524841,0.5074178031645715236664,0.3559808600693941116333,\ +0.7394064110703766345978,0.9856483982875943183899,0.2081001061014831066132,\ +0.2623823434114456176758,0.6742023923434317111969,0.9962934432551264762878,\ +0.8252332373522222042084,0.0615941416472196578979,0.2129642223007977008820,\ +0.7388951787725090980530,0.1914335261099040508270,0.6734384708106517791748,\ +0.6150622279383242130280,0.4714830657467246055603,0.2653777874074876308441,\ +0.1113578472286462783813,0.6682099369354546070099,0.2968665333464741706848,\ +0.5159585955552756786346,0.5037773922085762023926,0.6966427885927259922028,\ +0.6400519711896777153015,0.3279239325784146785736,0.8322640117257833480835,\ +0.5751562197692692279816,0.7393315965309739112854,0.7727512116543948650360,\ +0.8552324511110782623291,0.8427531258203089237213,0.3697941964492201805115,\ +0.5885056755505502223969,0.185948224738240242004,0.5096506965346634387970,\ +0.5180077450349926948547,0.7124331700615584850311,0.9935774207115173339844,\ +0.6513966270722448825836,0.2266238955780863761902,0.2100372924469411373138,\ +0.296033380553126335144,0.3838447039015591144562,0.3276543477550148963928,\ +0.9443909148685634136200,0.3133702538907527923584,0.3127397657372057437897,\ +0.2831690898165106773376,0.8294320828281342983246,0.8504734281450510025024,\ +0.0516620394773781299591,0.8521665157750248908997,0.0109942886047065258026,\ +0.1777968332171440124512,0.9020808511413633823395,0.8023654175922274589539,\ +0.8193211196921765804291,0.3788971211761236190796,0.2892677118070423603058,\ +0.3856688523665070533752,0.8368152822367846965790,0.6335147209465503692627,\ +0.0478187785483896732330,0.7960498845204710960388,0.9247719994746148586273,\ +0.4049517679959535598755,0.1505366903729736804962,0.3286092029884457588196,\ +0.5528467851690948009491,0.0004969090223312377930} + +#define ZResR {-0.4532760601370298680912,0.2328568279348733338630,-0.0721739248448070302988,\ +-0.7606257532599224324699,-0.0286009079979238634017,0.0446282927443572285942,\ +-0.1676194364050221097262,0.6500285865688182340705,0.3126717730334664935299,\ +0.4412835685735998492163,-0.0863853232804955989410,0.2599876176861364296400,\ +-0.3081394309018399835232,0.5483498039081077246593,-0.0280685784873250555871,\ +0.1103398428388524532551,0.1878638951594227557429,0.0489837078099595035763,\ +0.0544579030846000788912,0.4870763078789703826033,-0.2608486317663467612959,\ +-0.2619676674188661236187,-0.4486176628283578549095,-0.1699076965638988134799,\ +0.0226500810131932545088,0.2525187524366853675239,-0.2962492545486477002470,\ +0.0050349784816676457222,0.0478668812844439128806,-0.161512306092542023972,\ +-0.0833553662573387199597,-0.0096347091494573405823,0.1892857042353479901653,\ +-0.1078039385912064745954,0.0714942955946598623918,0.0393949194957836229536,\ +-0.1400294459234943666992,-0.2723485697759917556482,-0.1406631695056576036862,\ +-0.0914284063414464026609,0.0718601543879791859748,-0.0502555196723774022516,\ +0.3308392578597269539920,0.3889296718119258922108,-0.5194079193768161850642,\ +-0.2709799400469976582428,-0.3469689150581814485186,0.4051294378302779941592,\ +-0.5157677188576927918007,0.0956281317726613566688,-0.2950104262230037743819,\ +0.2475225041547986504220,0.0416670917625362458026,-0.0931174729511790588710,\ +-0.0693836181169946164538,0.0251979011091364446528,0.1749033102248601090345,\ +-0.1036931245422025305025,-0.1494776851046086263430,-0.4129188753992821814265,\ +0.0956892042125161157440,-0.381500629131777346803,-0.0834984180348100207825,\ +-0.1258676160077962236095,-0.0938063966240257895990,0.1573017568314179215339,\ +0.0850675970242064927174,-0.0127169319676398440144,0.3215644924894006106975,\ +0.1725016235865347580258,0.0657245842114690947966,-0.0091973641655471172207,\ +0.0645495682688117383696,0.2199842886414065112888,-0.4594590945201037501811,\ +-0.0076146572424504455068,-0.2255298228492429168934,-0.0089042461759258062504,\ +0.3492561737977078473172,-0.2991314773617905764524,0.2705755498034173589517,\ +-0.5188001861108486600926,0.5618831798406120903167,-0.2592918419562091347785,\ +-0.4273656804273420206641,-0.4233085641525572428989,0.1726206665681528085177,\ +-0.0713880252688461475197,0.0409534431553852107388,-0.4784636138374023794917,\ +0.2528249080775029078438,-0.0751963670383180432522,-0.2099825350036476079296,\ +0.3930475624040330462350,-0.0536983488983542034401,0.4696177809171224182272,\ +0.4499246289866181136574,-0.1184924563459542473653,0.4455130076495959490224,\ +0.0137745535065977864342,0.0572770873632376664730,0.4028010939579977911507,\ +-0.5479035230736655215367,-0.8476656355498256578684,-0.4152860994745538603112,\ +-0.1719656910372130420583,0.1500796339609139773419,-0.3508489918077146718645,\ +0.0007517730549635760762,-0.0093318934652646470806,-0.4253349873439855599599,\ +0.2806279433177717441694,-0.1888983413465122329633,0.7064426647296654371289,\ +-0.0608123808038953800326,-0.0613171594896803062724,-0.4505394490178394883984,\ +-0.0037858539492685930328,0.2097666454331615359941,-0.0211842001217234093824,\ +0.0527063906668108692055,0.0768025778411403764467,0.8585738883942192201104,\ +0.1759375052405339756589,0.0503612958523844411740,-0.2721751218561426211018,\ +-0.0864544627613991201187,-0.0103374763464706836968,0.1595894682913722162354,\ +0.1366255514725323583214,-0.1808181983112125135182,0.6659753695010871554771,\ +-0.3552522431189574225741,-0.6660760695837163458677,0.0122680731984931845613,\ +-0.1501265897279337457881,-0.1506290509488406037519,-0.3872440085463784154030,\ +-0.3642683937636469471144,0.3554966732726081435345,0.1798988824024553845327,\ +-0.5353736140053680925277,0.3328780019103673160075,-0.3831916918313129638562,\ +-0.1334464728224985796690,-0.2528584112494918212377,0.0776621078396230318797,\ +0.6042048881391237635796,0.0542925615451090859409,0.0152869439779466861906,\ +-0.2578916798676885169250,0.6210074811527457327998,0.0697480566005716229316,\ +-0.5360219400392558508628,-0.0164769465814076573884,0.2578547191709110730784,\ +0.2692458480889036165351,0.2164281534628332004377,-0.2165469974967820787626,\ +-0.6114963430660671495076,-0.3276202230479545729480,-0.1532470446853400614096,\ +-0.5711409136688807564042,0.1041463421049710486033,-0.3894804137321275505634,\ +-0.3320104464777595687508,-0.4043603275945338859643,-0.7061983397762294778488,\ +0.563118573862244065076,-0.104052368330380548556,0.0164178824827940009201,\ +-0.0912715036235035442891,-0.0802371510589425240845,-0.0399581838468483496740,\ +-0.1945912294495280026041,0.5793779114170104493908,0.0565281114058220068852,\ +-0.0343252140979214692695,-0.4239568198880452332133,-0.4604615564320009846178,\ +0.4166399479456509569175,0.0131813866470892881999,0.3736222424672819841796,\ +-0.0991373897615358684599,0.2529810514946274069281,0.0689311545837876515908,\ +0.2497484491434210918115,0.1002341291998606193081,-0.1945593262740688278445,\ +0.2527651998409092271025,-0.3858322501194685338888,-0.3391363400421857909883,\ +0.0090761661352664196878,-0.5771490540989443474018,-0.4845995748950238657393,\ +-0.0464806889926007715808,0.1478644355329177817460,-0.0455521984464080931243,\ +0.0072729334007000101536,0.5914465599501286252604} + +#define ZResI {0.6867532750160018073515,0.9613302788463532477792,0.1837939587530955376504,\ +0.6396229422193046021405,0.2118940797572615719613,0.2758431416829634774679,\ +0.0801773911552379342504,0.8704396947843597853733,0.6857529536617394949616,\ +0.2682798733548960590234,0.265520729527220722410,1.3002525570030343260441,\ +1.22341111147360948053,0.2823894734241773618599,0.0830507125337052176661,\ +1.4084050938175196598934,0.4714708444194484759926,0.3864899878199242189147,\ +0.578671353512100639094,0.4097343720866399863212,0.2871862109036796839590,\ +0.4339746194558397052177,0.2190944030815045462379,0.1905148747457021396468,\ +0.6580570072675409054597,0.4661869040666266617023,0.8599269442495538484650,\ +0.0264043433044500661100,0.0516749566895557260748,0.4191162112725183019890,\ +0.6380079192550233146974,0.0528761984310826271827,0.1750249364921274419782,\ +0.262006263440240305673,0.2551006766112977608429,0.3726589610422177956117,\ +0.2688345275772468512265,0.0399340736448891148180,0.1540820834002836481336,\ +0.2363839254618368690419,0.5686876044589181944389,0.8679966059615636941871,\ +0.0514995744434985636140,0.9745475763214328512873,0.6398586919691986452108,\ +0.87003041421366145158,0.5098556345730298478003,0.7918453871370533247998,\ +0.3977293850986994838692,0.4690074760926845609532,0.3456862982279912954731,\ +0.8775057294133996599328,0.8415504958063240170674,0.6158257382443957927975,\ +0.3254403835162152369698,0.3092837496266652719257,1.016502867475419513710,\ +0.1377386626241807465743,1.0887841690471091737891,0.4545278067154325807309,\ +0.3441598726430060706249,0.5306377190646557329146,0.4023845929152815026342,\ +0.4125675613624649740174,0.2054662834722358610851,0.6177146421590287150849,\ +0.6484264545005361535246,0.8358924918092586198171,0.5951731030444011860681,\ +1.4105647290575316077366,0.2564640348596678998128,0.7845236225889706815906,\ +0.1082954403048045077806,0.2214325174472631663214,0.5867100045537700925280,\ +0.5180978688180153390874,0.3195153417190086386768,0.7488602710128838824133,\ +0.1203597942708250490007,0.5012941523009060151850,0.7748826592461299789250,\ +0.4421661217651661757166,0.9277146921619219277488,0.5611941617833399176263,\ +0.1875332458457515116823,0.3141666438540002825874,0.4604943819421867812203,\ +0.0857080651661168146926,0.3208952842499418478539,0.4512919342037237102616,\ +0.7790380828723415529424,0.2761644904057471983094,0.5650186739065693464212,\ +0.4507563807256466659190,0.2078905437719839599531,0.5277912987547750400807,\ +0.3716354279518757630640,0.5373704615276944096536,0.9780785319295863811107,\ +0.0159155946349303842324,1.0224311029322552535348,0.5264940700384401761625,\ +0.7343311398624580155214,0.3704907408839669402667,0.5288385630587791874646,\ +0.3959302386908920556863,0.7086176744936288907084,0.7694711035408567934013,\ +0.7356001732724122277318,0.0399627592998382727418,0.5185668150213963434325,\ +0.1331315821040593705415,0.8170027538591018156922,0.4049310194334793111537,\ +0.1478937773069877170684,0.7786469990644202532337,0.9289400296531356016061,\ +0.1371829990074564797897,0.1749929113926765866793,0.2441898291613232296893,\ +0.0986799128052451290927,0.2473569799851849937422,0.9160542553812340837993,\ +0.6487987635563003951944,0.1266499083655910351531,0.4604910075393342516747,\ +0.9425690210228523380209,0.4054098304412955267040,0.3282910877920472980662,\ +0.0998424092123958162315,0.2184385926591740634262,0.656067713825576603881,\ +0.7653872511944090906155,0.7951531282252717325321,0.2947609930653066756534,\ +0.2061139089866899365422,0.4764220642520822779353,1.3759775156473299518,\ +0.8528204157327108347886,0.2443691207681686350384,0.2914758305179087627401,\ +0.5616697707438699227467,0.5342831779243247813938,0.5173303887471423223587,\ +0.0400423211013342383868,0.1734081126603988776136,0.0356373465889542606622,\ +0.9647518864037544217283,0.4797428841650468456237,0.2788760702578375605398,\ +0.5426811930882043943924,0.9529428659076060181832,0.519214160106206801260,\ +0.1566372908148228326741,0.1800568943774761565546,0.8597000721649141752323,\ +0.5941980612955533036512,0.4200596294318775236754,1.3834337451293550191878,\ +0.7486653540997223466036,0.3094005426987578855069,0.2238402297126847184661,\ +0.2351212641216636478614,0.1935041961305615509925,0.3283396534211000528103,\ +0.6414187863585038007486,0.5517671615629442527506,1.1984678562974182547407,\ +0.7432168383550731283194,0.2430428408595447509200,0.1037376614284659104293,\ +0.6710156827233160203861,0.6483185566975374625187,0.2790420045943993176962,\ +1.4677304745898491766809,0.2490552602808134563528,0.4239289487649033905114,\ +0.5743412264612666184860,0.6998750389577383934636,1.0888059617925907041069,\ +0.5637897941342366880946,0.9467997907854363015545,0.1529839243771335122180,\ +0.3341914410029577231498,0.7977632654942472534287,0.6513779279028111268701,\ +0.8229411301591347260853,0.2061183797708181497654,0.5470771267862610809374,\ +0.5931748546354166373717,0.6677576209776094895432,0.6191412908370578227490,\ +0.0728435968768978286958,0.1327083570997977524097,0.3079385977540891605742,\ +0.6658977419097338312781,0.1203493812224817605117,0.4806090008275944458482,\ +0.5912434516954661045673,0.7532244855713678965969} + + + +static void smulsTest(void){ + float P1[]=FP1; + float P2[]=FP2; + float Res[]=FRes; + int i=0; + float out; + + for (i=0;i<200;i++){ + out = smuls(P1[i],P2[i]); + assert( ( fabs(out-Res[i]) / fabs(out) ) <1e-6); + } +} + + +static void dmulsTest(void){ + double P1[]=DP1; + double P2[]=DP2; + double Res[]=DRes; + int i=0; + double out; + + for (i=0;i<200;i++){ + out = dmuls(P1[i],P2[i]); + assert( ( fabs(out-Res[i]) / fabs(out) ) <3e-16); + } +} + + +static void cmulsTest(void){ + float P1_R[] = CR1; + float P1_I[] = CI1; + float P2_R[] = CR2; + float P2_I[] = CI2; + float Res_R[] = CResR; + float Res_I[] = CResI; + int i=0; + floatComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1=FloatComplex(P1_R[i],P1_I[i]); + in2=FloatComplex(P2_R[i],P2_I[i]); + out=cmuls(in1,in2); + assert( ( fabs(creals(out)-Res_R[i]) / fabs(creals(out)) ) <3e-6); + assert( ( fabs(cimags(out)-Res_I[i]) / fabs(cimags(out)) ) <1e-6); + } +} + + +static void zmulsTest(void){ + double P1_R[] = ZR1; + double P1_I[] = ZI1; + double P2_R[] = ZR2; + double P2_I[] = ZI2; + double Res_R[] = ZResR; + double Res_I[] = ZResI; + int i=0; + doubleComplex in1,in2,out; + + for (i=0;i<200;i++){ + in1=DoubleComplex(P1_R[i],P1_I[i]); + in2=DoubleComplex(P2_R[i],P2_I[i]); + out=zmuls(in1,in2); + assert( ( fabs(zreals(out)-Res_R[i]) / fabs(zreals(out)) ) <3e-15); + assert( ( fabs(zimags(out)-Res_I[i]) / fabs(zimags(out)) ) <3e-15); + } +} + + +static void smulaTest(void){ + float P1[]=FP1; + float P2[]=FP2; + float Res[]=FRes; + int i=0; + float out[200]; + + smula(P1,P2,200,out); + for(i=0;i<200;i++){ + assert( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <1e-6); + } +} + + +static void dmulaTest(void){ + double P1[]=DP1; + double P2[]=DP2; + double Res[]=DRes; + int i=0; + double out[200]; + + dmula(P1,P2,200,out); + for(i=0;i<200;i++){ + assert( ( fabs(out[i]-Res[i]) / fabs(out[i]) ) <1e-16); + } +} + + +static void cmulaTest(void){ + float P1_R[] = CR1; + float P1_I[] = CI1; + float P2_R[] = CR2; + float P2_I[] = CI2; + float Res_R[] = CResR; + float Res_I[] = CResI; + int i=0; + floatComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i]=FloatComplex(P1_R[i],P1_I[i]); + in2[i]=FloatComplex(P2_R[i],P2_I[i]); + } + + cmula(in1,in2,200,out); + for (i=0;i<200;i++){ + assert( ( fabs(creals(out[i])-Res_R[i]) / fabs(creals(out[i])) ) <3e-6); + assert( ( fabs(cimags(out[i])-Res_I[i]) / fabs(cimags(out[i])) ) <1e-6); + } +} + + +static void zmulaTest(void){ + double P1_R[] = ZR1; + double P1_I[] = ZI1; + double P2_R[] = ZR2; + double P2_I[] = ZI2; + double Res_R[] = ZResR; + double Res_I[] = ZResI; + int i=0; + doubleComplex in1[200],in2[200],out[200]; + + for (i=0;i<200;i++){ + in1[i]=DoubleComplex(P1_R[i],P1_I[i]); + in2[i]=DoubleComplex(P2_R[i],P2_I[i]); + } + + zmula(in1,in2,200,out); + for (i=0;i<200;i++){ + assert( ( fabs(zreals(out[i])-Res_R[i]) / fabs(zreals(out[i])) ) <3e-15); + assert( ( fabs(zimags(out[i])-Res_I[i]) / fabs(zimags(out[i])) ) <3e-15); + } +} + + + +static int testMult(void) { + smulsTest(); + dmulsTest(); + cmulsTest(); + zmulsTest(); + smulaTest(); + dmulaTest(); + cmulaTest(); + zmulaTest(); + return 0; +} + + + +int main(void) { + assert(testMult() == 0); + return 0; +} diff --git a/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj b/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj new file mode 100644 index 00000000..d79a4c5c --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {769E26C1-E337-4878-B604-8BE33323F5FF} + testMultiplication + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj.filters b/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj.filters new file mode 100644 index 00000000..1a9d783a --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/test_Multiplication/testMultiplication.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/multiplication/zmula.c b/2.3-1/src/c/operations/multiplication/zmula.c new file mode 100644 index 00000000..875e2592 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/zmula.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "multiplication.h" + +void zmula(doubleComplex* in1, doubleComplex* in2, int size, doubleComplex* out){ + int i=0; + for (i=0;i +#include "zeros.h" +#include "multiplication.h" + +doubleComplex zmuldzv (double* in1, doubleComplex* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zmulv(DoubleComplexMatrix(in1,ZEROS,size), in2 , size ); + } diff --git a/2.3-1/src/c/operations/multiplication/zmuls.c b/2.3-1/src/c/operations/multiplication/zmuls.c new file mode 100644 index 00000000..eacbc135 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/zmuls.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#include "doubleComplex.h" +#include "multiplication.h" + + +/* +** \function zmuls +** \brief Multiply 2 Complex numbers. +*/ +doubleComplex zmuls(doubleComplex z1, doubleComplex z2) { +#ifndef STDC99 + return DoubleComplex(z1.real*z2.real - z1.imag*z2.imag, + z1.real*z2.imag + z2.real*z1.imag); +#else + return z1 * z2; +#endif +} diff --git a/2.3-1/src/c/operations/multiplication/zmulv.c b/2.3-1/src/c/operations/multiplication/zmulv.c new file mode 100644 index 00000000..1ac27f53 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/zmulv.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "addition.h" +#include "multiplication.h" + +doubleComplex zmulv(doubleComplex* in1, doubleComplex* in2, int size) +{ + int i = 0; + doubleComplex out = DoubleComplex(0, 0); + + for (i = 0 ; i < size ; ++i) + { + out = zadds(out, zmuls(in1[i],in2[i])); + } + + return out; +} diff --git a/2.3-1/src/c/operations/multiplication/zmulzdv.c b/2.3-1/src/c/operations/multiplication/zmulzdv.c new file mode 100644 index 00000000..59beabe7 --- /dev/null +++ b/2.3-1/src/c/operations/multiplication/zmulzdv.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include "zeros.h" +#include "multiplication.h" + +doubleComplex zmulzdv (doubleComplex* in1, double* in2, int size) + { + double* ZEROS = (double *) malloc((unsigned int)(size*sizeof(double))); + dzerosa(ZEROS,size , 1); + + return zmulv(in1, DoubleComplexMatrix(in2,ZEROS,size), size ); + } diff --git a/2.3-1/src/c/operations/operations.vcxproj b/2.3-1/src/c/operations/operations.vcxproj new file mode 100644 index 00000000..5fdaecf2 --- /dev/null +++ b/2.3-1/src/c/operations/operations.vcxproj @@ -0,0 +1,495 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9B622A66-546A-4B33-B947-0A189D259D37} + operations + Win32Proj + + + + DynamicLibrary + Unicode + false + + + DynamicLibrary + Unicode + false + + + DynamicLibrary + Unicode + false + + + DynamicLibrary + Unicode + false + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)matrixOperations_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)matrixOperations.lib" 1>NUL 2>NUL + + + Disabled + includes;../type;../auxiliaryFunctions/includes;../matrixOperations/includes; + WIN32;_DEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + auxiliaryFunctions.lib;matrixOperations.lib + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)matrixOperations_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)matrixOperations.lib" 1>NUL 2>NUL + + + Disabled + includes;../type;../auxiliaryFunctions/includes;../matrixOperations/includes; + WIN32;_DEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + auxiliaryFunctions.lib;matrixOperations.lib + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)matrixOperations_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)matrixOperations.lib" 1>NUL 2>NUL + + + MaxSpeed + true + includes;../type;../auxiliaryFunctions/includes;../matrixOperations/includes; + WIN32;NDEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + Default + + + auxiliaryFunctions.lib;matrixOperations.lib + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + lib /DEF:"$(ProjectDir)auxiliaryFunctions_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)auxiliaryFunctions.lib" 1>NUL 2>NUL +lib /DEF:"$(ProjectDir)matrixOperations_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)matrixOperations.lib" 1>NUL 2>NUL + + + MaxSpeed + true + includes;../type;../auxiliaryFunctions/includes;../matrixOperations/includes; + WIN32;NDEBUG;_WINDOWS;_USRDLL;OPERATIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + auxiliaryFunctions.lib;matrixOperations.lib + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/operations.vcxproj.filters b/2.3-1/src/c/operations/operations.vcxproj.filters new file mode 100644 index 00000000..4b34b74b --- /dev/null +++ b/2.3-1/src/c/operations/operations.vcxproj.filters @@ -0,0 +1,203 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {5bf6d8f9-a891-4633-ab01-1917a8568b07} + + + {e2c901d3-8372-4f6e-995c-7f2b8575b714} + + + {de7eeee0-7229-49fd-8574-2a884714f7e1} + + + {4d5826f7-7eae-49c0-bd15-419c2c8a1cef} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\addition + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\division + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\multiplication + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + Source Files\subtraction + + + + + Source Files\addition + + + Source Files\division + + + Source Files\subtraction + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/subtraction/Makefile.am b/2.3-1/src/c/operations/subtraction/Makefile.am new file mode 100644 index 00000000..724bbe32 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/Makefile.am @@ -0,0 +1,45 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSubtraction_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSubtraction.la + +HEAD = ../includes/subtraction.h + +libSubtraction_la_SOURCES = $(HEAD) \ + sdiffs.c \ + ddiffs.c \ + cdiffs.c \ + zdiffs.c \ + sdiffa.c \ + ddiffa.c \ + cdiffa.c \ + zdiffa.c + +check_PROGRAMS = testSubtraction + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libSubtraction.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +testSubtraction_SOURCES = testSubtraction.c +testSubtraction_LDADD = $(check_LDADD) +testSubtraction_CFLAGS = $(check_INCLUDES) + +TESTS = testSubtraction \ No newline at end of file diff --git a/2.3-1/src/c/operations/subtraction/Makefile.in b/2.3-1/src/c/operations/subtraction/Makefile.in new file mode 100644 index 00000000..de5b5929 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/Makefile.in @@ -0,0 +1,750 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testSubtraction$(EXEEXT) +TESTS = testSubtraction$(EXEEXT) +subdir = src/c/operations/subtraction +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSubtraction_la_LIBADD = +am__objects_1 = +am_libSubtraction_la_OBJECTS = $(am__objects_1) \ + libSubtraction_la-sdiffs.lo libSubtraction_la-ddiffs.lo \ + libSubtraction_la-cdiffs.lo libSubtraction_la-zdiffs.lo \ + libSubtraction_la-sdiffa.lo libSubtraction_la-ddiffa.lo \ + libSubtraction_la-cdiffa.lo libSubtraction_la-zdiffa.lo +libSubtraction_la_OBJECTS = $(am_libSubtraction_la_OBJECTS) +libSubtraction_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libSubtraction_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testSubtraction_OBJECTS = \ + testSubtraction-testSubtraction.$(OBJEXT) +testSubtraction_OBJECTS = $(am_testSubtraction_OBJECTS) +testSubtraction_DEPENDENCIES = $(check_LDADD) +testSubtraction_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testSubtraction_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSubtraction_la_SOURCES) $(testSubtraction_SOURCES) +DIST_SOURCES = $(libSubtraction_la_SOURCES) $(testSubtraction_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSubtraction_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSubtraction.la +HEAD = ../includes/subtraction.h +libSubtraction_la_SOURCES = $(HEAD) \ + sdiffs.c \ + ddiffs.c \ + cdiffs.c \ + zdiffs.c \ + sdiffa.c \ + ddiffa.c \ + cdiffa.c \ + zdiffa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libSubtraction.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes + +testSubtraction_SOURCES = testSubtraction.c +testSubtraction_LDADD = $(check_LDADD) +testSubtraction_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/operations/subtraction/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/operations/subtraction/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSubtraction.la: $(libSubtraction_la_OBJECTS) $(libSubtraction_la_DEPENDENCIES) + $(libSubtraction_la_LINK) -rpath $(pkglibdir) $(libSubtraction_la_OBJECTS) $(libSubtraction_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testSubtraction$(EXEEXT): $(testSubtraction_OBJECTS) $(testSubtraction_DEPENDENCIES) + @rm -f testSubtraction$(EXEEXT) + $(testSubtraction_LINK) $(testSubtraction_OBJECTS) $(testSubtraction_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-cdiffa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-cdiffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-ddiffa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-ddiffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-sdiffa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-sdiffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-zdiffa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSubtraction_la-zdiffs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testSubtraction-testSubtraction.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSubtraction_la-sdiffs.lo: sdiffs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-sdiffs.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-sdiffs.Tpo -c -o libSubtraction_la-sdiffs.lo `test -f 'sdiffs.c' || echo '$(srcdir)/'`sdiffs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-sdiffs.Tpo $(DEPDIR)/libSubtraction_la-sdiffs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdiffs.c' object='libSubtraction_la-sdiffs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-sdiffs.lo `test -f 'sdiffs.c' || echo '$(srcdir)/'`sdiffs.c + +libSubtraction_la-ddiffs.lo: ddiffs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-ddiffs.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-ddiffs.Tpo -c -o libSubtraction_la-ddiffs.lo `test -f 'ddiffs.c' || echo '$(srcdir)/'`ddiffs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-ddiffs.Tpo $(DEPDIR)/libSubtraction_la-ddiffs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddiffs.c' object='libSubtraction_la-ddiffs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-ddiffs.lo `test -f 'ddiffs.c' || echo '$(srcdir)/'`ddiffs.c + +libSubtraction_la-cdiffs.lo: cdiffs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-cdiffs.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-cdiffs.Tpo -c -o libSubtraction_la-cdiffs.lo `test -f 'cdiffs.c' || echo '$(srcdir)/'`cdiffs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-cdiffs.Tpo $(DEPDIR)/libSubtraction_la-cdiffs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdiffs.c' object='libSubtraction_la-cdiffs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-cdiffs.lo `test -f 'cdiffs.c' || echo '$(srcdir)/'`cdiffs.c + +libSubtraction_la-zdiffs.lo: zdiffs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-zdiffs.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-zdiffs.Tpo -c -o libSubtraction_la-zdiffs.lo `test -f 'zdiffs.c' || echo '$(srcdir)/'`zdiffs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-zdiffs.Tpo $(DEPDIR)/libSubtraction_la-zdiffs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdiffs.c' object='libSubtraction_la-zdiffs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-zdiffs.lo `test -f 'zdiffs.c' || echo '$(srcdir)/'`zdiffs.c + +libSubtraction_la-sdiffa.lo: sdiffa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-sdiffa.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-sdiffa.Tpo -c -o libSubtraction_la-sdiffa.lo `test -f 'sdiffa.c' || echo '$(srcdir)/'`sdiffa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-sdiffa.Tpo $(DEPDIR)/libSubtraction_la-sdiffa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdiffa.c' object='libSubtraction_la-sdiffa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-sdiffa.lo `test -f 'sdiffa.c' || echo '$(srcdir)/'`sdiffa.c + +libSubtraction_la-ddiffa.lo: ddiffa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-ddiffa.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-ddiffa.Tpo -c -o libSubtraction_la-ddiffa.lo `test -f 'ddiffa.c' || echo '$(srcdir)/'`ddiffa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-ddiffa.Tpo $(DEPDIR)/libSubtraction_la-ddiffa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddiffa.c' object='libSubtraction_la-ddiffa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-ddiffa.lo `test -f 'ddiffa.c' || echo '$(srcdir)/'`ddiffa.c + +libSubtraction_la-cdiffa.lo: cdiffa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-cdiffa.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-cdiffa.Tpo -c -o libSubtraction_la-cdiffa.lo `test -f 'cdiffa.c' || echo '$(srcdir)/'`cdiffa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-cdiffa.Tpo $(DEPDIR)/libSubtraction_la-cdiffa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdiffa.c' object='libSubtraction_la-cdiffa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-cdiffa.lo `test -f 'cdiffa.c' || echo '$(srcdir)/'`cdiffa.c + +libSubtraction_la-zdiffa.lo: zdiffa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -MT libSubtraction_la-zdiffa.lo -MD -MP -MF $(DEPDIR)/libSubtraction_la-zdiffa.Tpo -c -o libSubtraction_la-zdiffa.lo `test -f 'zdiffa.c' || echo '$(srcdir)/'`zdiffa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSubtraction_la-zdiffa.Tpo $(DEPDIR)/libSubtraction_la-zdiffa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdiffa.c' object='libSubtraction_la-zdiffa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSubtraction_la_CFLAGS) $(CFLAGS) -c -o libSubtraction_la-zdiffa.lo `test -f 'zdiffa.c' || echo '$(srcdir)/'`zdiffa.c + +testSubtraction-testSubtraction.o: testSubtraction.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSubtraction_CFLAGS) $(CFLAGS) -MT testSubtraction-testSubtraction.o -MD -MP -MF $(DEPDIR)/testSubtraction-testSubtraction.Tpo -c -o testSubtraction-testSubtraction.o `test -f 'testSubtraction.c' || echo '$(srcdir)/'`testSubtraction.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSubtraction-testSubtraction.Tpo $(DEPDIR)/testSubtraction-testSubtraction.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSubtraction.c' object='testSubtraction-testSubtraction.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSubtraction_CFLAGS) $(CFLAGS) -c -o testSubtraction-testSubtraction.o `test -f 'testSubtraction.c' || echo '$(srcdir)/'`testSubtraction.c + +testSubtraction-testSubtraction.obj: testSubtraction.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSubtraction_CFLAGS) $(CFLAGS) -MT testSubtraction-testSubtraction.obj -MD -MP -MF $(DEPDIR)/testSubtraction-testSubtraction.Tpo -c -o testSubtraction-testSubtraction.obj `if test -f 'testSubtraction.c'; then $(CYGPATH_W) 'testSubtraction.c'; else $(CYGPATH_W) '$(srcdir)/testSubtraction.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testSubtraction-testSubtraction.Tpo $(DEPDIR)/testSubtraction-testSubtraction.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testSubtraction.c' object='testSubtraction-testSubtraction.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testSubtraction_CFLAGS) $(CFLAGS) -c -o testSubtraction-testSubtraction.obj `if test -f 'testSubtraction.c'; then $(CYGPATH_W) 'testSubtraction.c'; else $(CYGPATH_W) '$(srcdir)/testSubtraction.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/operations/subtraction/cdiffa.c b/2.3-1/src/c/operations/subtraction/cdiffa.c new file mode 100644 index 00000000..fe310430 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/cdiffa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +void cdiffa(floatComplex* in1, int size1, floatComplex* in2, int size2, floatComplex* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = cdiffs(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/subtraction/cdiffs.c b/2.3-1/src/c/operations/subtraction/cdiffs.c new file mode 100644 index 00000000..b5201b4d --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/cdiffs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +floatComplex cdiffs(floatComplex z1, floatComplex z2) { + return FloatComplex(creals(z1) - creals(z2), + cimags(z1) - cimags(z2)); +} diff --git a/2.3-1/src/c/operations/subtraction/ddiffa.c b/2.3-1/src/c/operations/subtraction/ddiffa.c new file mode 100644 index 00000000..3159f36a --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/ddiffa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +void ddiffa(double* in1, int size1, double* in2, int size2, double* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = ddiffs(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/subtraction/ddiffs.c b/2.3-1/src/c/operations/subtraction/ddiffs.c new file mode 100644 index 00000000..829feadf --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/ddiffs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +double ddiffs(double in1, double in2) +{ + return (in1 - in2); +} diff --git a/2.3-1/src/c/operations/subtraction/sdiffa.c b/2.3-1/src/c/operations/subtraction/sdiffa.c new file mode 100644 index 00000000..ea5ef1fa --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/sdiffa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +void sdiffa(float* in1, int size1, float* in2, int size2, float* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = sdiffs(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/subtraction/sdiffs.c b/2.3-1/src/c/operations/subtraction/sdiffs.c new file mode 100644 index 00000000..0d5f4c35 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/sdiffs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +float sdiffs(float in1, float in2) +{ + return (in1 - in2); +} diff --git a/2.3-1/src/c/operations/subtraction/testSubtraction.c b/2.3-1/src/c/operations/subtraction/testSubtraction.c new file mode 100644 index 00000000..ce29e2a3 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/testSubtraction.c @@ -0,0 +1,132 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "subtraction.h" + +#define SIZE 10000 + +/* #define LOCAL_DEBUG */ + +static void zdiffaTest(void) { + doubleComplex M1[SIZE]; + doubleComplex M2[SIZE]; + doubleComplex M1_but_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = DoubleComplex((double) rand(), (double) rand()); + M2[i] = DoubleComplex((double) rand(), (double) rand()); + } + zdiffa(M1, SIZE, M2, SIZE, M1_but_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_but_M2 = %e + %e i\n", zreals(M1_but_M2[i]), zimags(M1_but_M2[i])); +#endif + assert(zreals(M1_but_M2[i]) - (zreals(M1[i]) - zreals(M2[i])) == 0); + assert(zimags(M1_but_M2[i]) - (zimags(M1[i]) - zimags(M2[i])) == 0); + } +} + +static void cdiffaTest(void) { + floatComplex M1[SIZE]; + floatComplex M2[SIZE]; + floatComplex M1_but_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = FloatComplex((float) rand(), (float) rand()); + M2[i] = FloatComplex((float) rand(), (float) rand()); + } + cdiffa(M1, SIZE, M2, SIZE, M1_but_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_but_M2 = %e + %e i\n", creals(M1_but_M2[i]), cimags(M1_but_M2[i])); +#endif + assert(fabsf(creals(M1_but_M2[i]) - (creals(M1[i]) - creals(M2[i]))) / creals(M1_but_M2[i]) < 1e-07); + assert(fabsf(cimags(M1_but_M2[i]) - (cimags(M1[i]) - cimags(M2[i]))) / cimags(M1_but_M2[i]) < 1e-07); + } +} + +static void sdiffaTest(void) { + float M1[SIZE]; + float M2[SIZE]; + float M1_but_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = (float) rand(); + M2[i] = (float) rand(); + } + sdiffa(M1, SIZE, M2, SIZE, M1_but_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_but_M2 = %e\n", M1_but_M2[i]); + printf("M1[i] - M2[i] = %e\n", (M1[i] - M2[i])); + printf("Error = %e\n",(float) fabsf(M1_but_M2[i] - (M1[i] - M2[i])) / M1_but_M2[i]); +#endif + assert(fabsf(M1_but_M2[i] - (M1[i] - M2[i])) / M1_but_M2[i] < 1e-07); + } +} + +static void ddiffaTest(void) { + double M1[SIZE]; + double M2[SIZE]; + double M1_but_M2[SIZE]; + + int i = 0; + + srand(1); + for (i = 0; i < SIZE; ++i) { + M1[i] = (double) rand(); + M2[i] = (double) rand(); + } + ddiffa(M1, SIZE, M2, SIZE, M1_but_M2); + for (i = 0; i < SIZE; ++i) { +#ifdef LOCAL_DEBUG + printf("M1_but_M2 = %e\n", M1_but_M2[i]); + printf("M1[i] = %e\n", M1[i]); + printf("M2[i] = %e\n", M2[i]); + printf("M1[i] - M2[i] = %e\n", (M1[i] - M2[i])); + printf("Error = %e\n", fabs(M1_but_M2[i] - (M1[i] - M2[i]))); +#endif + assert(fabs(M1_but_M2[i] - (M1[i] - M2[i])) == 0); + } + +} + +static int testSubtraction(void) { + + printf("\n>>>> Subtraction Tests\n"); + sdiffaTest(); + ddiffaTest(); + cdiffaTest(); + zdiffaTest(); + + return 0; +} + + + +int main(void) { + assert(testSubtraction() == 0); + return 0; +} diff --git a/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj b/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj new file mode 100644 index 00000000..72e2dfd7 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F0DA7501-84CB-4641-9DDA-DA084736B7D4} + testSubtraction + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj.filters b/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj.filters new file mode 100644 index 00000000..bdff4681 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/test_Subtraction/testSubtraction.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/operations/subtraction/zdiffa.c b/2.3-1/src/c/operations/subtraction/zdiffa.c new file mode 100644 index 00000000..cd856d30 --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/zdiffa.c @@ -0,0 +1,20 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +void zdiffa(doubleComplex* in1, int size1, doubleComplex* in2, int size2, doubleComplex* out) { + int i = 0; + for (i = 0; i < size1 && i < size2; ++i) { + out[i] = zdiffs(in1[i], in2[i]); + } +} diff --git a/2.3-1/src/c/operations/subtraction/zdiffs.c b/2.3-1/src/c/operations/subtraction/zdiffs.c new file mode 100644 index 00000000..dc162e4a --- /dev/null +++ b/2.3-1/src/c/operations/subtraction/zdiffs.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "subtraction.h" + +doubleComplex zdiffs(doubleComplex z1, doubleComplex z2) { + return DoubleComplex(zreals(z1) - zreals(z2), + zimags(z1) - zimags(z2)); +} diff --git a/2.3-1/src/c/signalProcessing/Makefile.am b/2.3-1/src/c/signalProcessing/Makefile.am new file mode 100644 index 00000000..8148f2a4 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/Makefile.am @@ -0,0 +1,22 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS= fft \ + ifft \ + levin \ + conv \ + conv2d \ + hilbert \ + crossCorr \ + lpc2cep \ + lev\ + fftshift diff --git a/2.3-1/src/c/signalProcessing/Makefile.in b/2.3-1/src/c/signalProcessing/Makefile.in new file mode 100644 index 00000000..c9f22e02 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/Makefile.in @@ -0,0 +1,570 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/signalProcessing +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = fft \ + ifft \ + levin \ + conv \ + conv2d \ + hilbert \ + crossCorr \ + lpc2cep \ + lev\ + fftshift + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/signalProcessing/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/signalProcessing/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/signalProcessing/conv/Makefile.am b/2.3-1/src/c/signalProcessing/conv/Makefile.am new file mode 100644 index 00000000..1e61c4a6 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/Makefile.am @@ -0,0 +1,74 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + + +libConv_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + + +instdir = $(top_builddir)/lib + + +pkglib_LTLIBRARIES = libConv.la + +HEAD = ../includes/conv.h + + + +libConv_la_SOURCES = $(HEAD) \ + sconva.c \ + dconva.c \ + cconva.c \ + zconva.c + + +############### +#### Check #### +############### + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libConv.la + + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/fft \ + -I $(top_builddir)/src/c/signalProcessing/ifft \ + -I $(top_builddir)/src/c/signalProcessing/includes + +check_PROGRAMS = testFloatConv testDoubleConv + +TESTS = testFloatConv testDoubleConv + + +testDoubleConv_SOURCES = testDoubleConv.c +testDoubleConv_LDADD = $(check_LDADD) +testDoubleConv_CFLAGS = $(check_INCLUDES) + +testFloatConv_SOURCES = testFloatConv.c +testFloatConv_LDADD = $(check_LDADD) +testFloatConv_CFLAGS = $(check_INCLUDES) + + + diff --git a/2.3-1/src/c/signalProcessing/conv/Makefile.in b/2.3-1/src/c/signalProcessing/conv/Makefile.in new file mode 100644 index 00000000..1d56f43f --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/Makefile.in @@ -0,0 +1,754 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatConv$(EXEEXT) testDoubleConv$(EXEEXT) +TESTS = testFloatConv$(EXEEXT) testDoubleConv$(EXEEXT) +subdir = src/c/signalProcessing/conv +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libConv_la_LIBADD = +am__objects_1 = +am_libConv_la_OBJECTS = $(am__objects_1) libConv_la-sconva.lo \ + libConv_la-dconva.lo libConv_la-cconva.lo libConv_la-zconva.lo +libConv_la_OBJECTS = $(am_libConv_la_OBJECTS) +libConv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libConv_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleConv_OBJECTS = testDoubleConv-testDoubleConv.$(OBJEXT) +testDoubleConv_OBJECTS = $(am_testDoubleConv_OBJECTS) +testDoubleConv_DEPENDENCIES = $(check_LDADD) +testDoubleConv_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleConv_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatConv_OBJECTS = testFloatConv-testFloatConv.$(OBJEXT) +testFloatConv_OBJECTS = $(am_testFloatConv_OBJECTS) +testFloatConv_DEPENDENCIES = $(check_LDADD) +testFloatConv_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatConv_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libConv_la_SOURCES) $(testDoubleConv_SOURCES) \ + $(testFloatConv_SOURCES) +DIST_SOURCES = $(libConv_la_SOURCES) $(testDoubleConv_SOURCES) \ + $(testFloatConv_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libConv_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libConv.la +HEAD = ../includes/conv.h +libConv_la_SOURCES = $(HEAD) \ + sconva.c \ + dconva.c \ + cconva.c \ + zconva.c + + +############### +#### Check #### +############### +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + libConv.la + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/fft \ + -I $(top_builddir)/src/c/signalProcessing/ifft \ + -I $(top_builddir)/src/c/signalProcessing/includes + +testDoubleConv_SOURCES = testDoubleConv.c +testDoubleConv_LDADD = $(check_LDADD) +testDoubleConv_CFLAGS = $(check_INCLUDES) +testFloatConv_SOURCES = testFloatConv.c +testFloatConv_LDADD = $(check_LDADD) +testFloatConv_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/signalProcessing/conv/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/signalProcessing/conv/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libConv.la: $(libConv_la_OBJECTS) $(libConv_la_DEPENDENCIES) + $(libConv_la_LINK) -rpath $(pkglibdir) $(libConv_la_OBJECTS) $(libConv_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleConv$(EXEEXT): $(testDoubleConv_OBJECTS) $(testDoubleConv_DEPENDENCIES) + @rm -f testDoubleConv$(EXEEXT) + $(testDoubleConv_LINK) $(testDoubleConv_OBJECTS) $(testDoubleConv_LDADD) $(LIBS) +testFloatConv$(EXEEXT): $(testFloatConv_OBJECTS) $(testFloatConv_DEPENDENCIES) + @rm -f testFloatConv$(EXEEXT) + $(testFloatConv_LINK) $(testFloatConv_OBJECTS) $(testFloatConv_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConv_la-cconva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConv_la-dconva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConv_la-sconva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libConv_la-zconva.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleConv-testDoubleConv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatConv-testFloatConv.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libConv_la-sconva.lo: sconva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -MT libConv_la-sconva.lo -MD -MP -MF $(DEPDIR)/libConv_la-sconva.Tpo -c -o libConv_la-sconva.lo `test -f 'sconva.c' || echo '$(srcdir)/'`sconva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConv_la-sconva.Tpo $(DEPDIR)/libConv_la-sconva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sconva.c' object='libConv_la-sconva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -c -o libConv_la-sconva.lo `test -f 'sconva.c' || echo '$(srcdir)/'`sconva.c + +libConv_la-dconva.lo: dconva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -MT libConv_la-dconva.lo -MD -MP -MF $(DEPDIR)/libConv_la-dconva.Tpo -c -o libConv_la-dconva.lo `test -f 'dconva.c' || echo '$(srcdir)/'`dconva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConv_la-dconva.Tpo $(DEPDIR)/libConv_la-dconva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dconva.c' object='libConv_la-dconva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -c -o libConv_la-dconva.lo `test -f 'dconva.c' || echo '$(srcdir)/'`dconva.c + +libConv_la-cconva.lo: cconva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -MT libConv_la-cconva.lo -MD -MP -MF $(DEPDIR)/libConv_la-cconva.Tpo -c -o libConv_la-cconva.lo `test -f 'cconva.c' || echo '$(srcdir)/'`cconva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConv_la-cconva.Tpo $(DEPDIR)/libConv_la-cconva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cconva.c' object='libConv_la-cconva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -c -o libConv_la-cconva.lo `test -f 'cconva.c' || echo '$(srcdir)/'`cconva.c + +libConv_la-zconva.lo: zconva.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -MT libConv_la-zconva.lo -MD -MP -MF $(DEPDIR)/libConv_la-zconva.Tpo -c -o libConv_la-zconva.lo `test -f 'zconva.c' || echo '$(srcdir)/'`zconva.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libConv_la-zconva.Tpo $(DEPDIR)/libConv_la-zconva.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zconva.c' object='libConv_la-zconva.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libConv_la_CFLAGS) $(CFLAGS) -c -o libConv_la-zconva.lo `test -f 'zconva.c' || echo '$(srcdir)/'`zconva.c + +testDoubleConv-testDoubleConv.o: testDoubleConv.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleConv_CFLAGS) $(CFLAGS) -MT testDoubleConv-testDoubleConv.o -MD -MP -MF $(DEPDIR)/testDoubleConv-testDoubleConv.Tpo -c -o testDoubleConv-testDoubleConv.o `test -f 'testDoubleConv.c' || echo '$(srcdir)/'`testDoubleConv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleConv-testDoubleConv.Tpo $(DEPDIR)/testDoubleConv-testDoubleConv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleConv.c' object='testDoubleConv-testDoubleConv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleConv_CFLAGS) $(CFLAGS) -c -o testDoubleConv-testDoubleConv.o `test -f 'testDoubleConv.c' || echo '$(srcdir)/'`testDoubleConv.c + +testDoubleConv-testDoubleConv.obj: testDoubleConv.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleConv_CFLAGS) $(CFLAGS) -MT testDoubleConv-testDoubleConv.obj -MD -MP -MF $(DEPDIR)/testDoubleConv-testDoubleConv.Tpo -c -o testDoubleConv-testDoubleConv.obj `if test -f 'testDoubleConv.c'; then $(CYGPATH_W) 'testDoubleConv.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleConv.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleConv-testDoubleConv.Tpo $(DEPDIR)/testDoubleConv-testDoubleConv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleConv.c' object='testDoubleConv-testDoubleConv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleConv_CFLAGS) $(CFLAGS) -c -o testDoubleConv-testDoubleConv.obj `if test -f 'testDoubleConv.c'; then $(CYGPATH_W) 'testDoubleConv.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleConv.c'; fi` + +testFloatConv-testFloatConv.o: testFloatConv.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatConv_CFLAGS) $(CFLAGS) -MT testFloatConv-testFloatConv.o -MD -MP -MF $(DEPDIR)/testFloatConv-testFloatConv.Tpo -c -o testFloatConv-testFloatConv.o `test -f 'testFloatConv.c' || echo '$(srcdir)/'`testFloatConv.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatConv-testFloatConv.Tpo $(DEPDIR)/testFloatConv-testFloatConv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatConv.c' object='testFloatConv-testFloatConv.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatConv_CFLAGS) $(CFLAGS) -c -o testFloatConv-testFloatConv.o `test -f 'testFloatConv.c' || echo '$(srcdir)/'`testFloatConv.c + +testFloatConv-testFloatConv.obj: testFloatConv.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatConv_CFLAGS) $(CFLAGS) -MT testFloatConv-testFloatConv.obj -MD -MP -MF $(DEPDIR)/testFloatConv-testFloatConv.Tpo -c -o testFloatConv-testFloatConv.obj `if test -f 'testFloatConv.c'; then $(CYGPATH_W) 'testFloatConv.c'; else $(CYGPATH_W) '$(srcdir)/testFloatConv.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatConv-testFloatConv.Tpo $(DEPDIR)/testFloatConv-testFloatConv.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatConv.c' object='testFloatConv-testFloatConv.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatConv_CFLAGS) $(CFLAGS) -c -o testFloatConv-testFloatConv.obj `if test -f 'testFloatConv.c'; then $(CYGPATH_W) 'testFloatConv.c'; else $(CYGPATH_W) '$(srcdir)/testFloatConv.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/signalProcessing/conv/cconva.c b/2.3-1/src/c/signalProcessing/conv/cconva.c new file mode 100644 index 00000000..c523bbee --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/cconva.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conv.h" +#include +void cconva(floatComplex *in1, int size1, floatComplex *in2,int size2, floatComplex *out){ + int m1,i; + floatComplex *in1b, *in2b, *result; + + + m1=(int)floor( log(size1+size2-1.0) / log(2.0) + 1 ); + m1=(int)pow(2.0, m1); + + in1b=(floatComplex *)malloc((unsigned int)(2*m1)*sizeof(float)); + for(i=0;i + +void sconva(float *in1, int size1, float *in2,int size2, float *out){ + int i; + floatComplex *in1Cpx, *in2Cpx, *result; + + in1Cpx=(floatComplex *)malloc(2*(unsigned int)size1*sizeof(float)); + in2Cpx=(floatComplex *)malloc(2*(unsigned int)size2*sizeof(float)); + + for (i=0;i +#include + + + +static void dconvaTest(void){ + int i; + double x1[2]={0.5253563085570931434631,0.5376229803077876567841}; + double h1[1]={0.2256303490139544010162}; + double conv1[2]={0.1185363272564196462922,0.1213040606847684693692}; + double out1[2]; + + double x2[8]={0.5878720157779753208160,0.4829179299995303153992,0.2232865034602582454681,\ +0.8400885667651891708374,0.1205995907075703144074,0.2855364168062806129456,\ +0.8607514644972980022430,0.8494101651012897491455}; + double h2[5]={0.9931209897622466087341,0.6488562873564660549164,0.9923190940171480178833,\ +0.0500419777818024158478,0.7485506581142544746399}; + double conv2[12]={0.5838280381629499249385,0.8610403862135279640100,1.1184514745692031301161,\ +1.4878174016996970063786,1.3506563468112671166921,1.568122169583095804057,\ +1.3689566747706436444787,2.3202981934690010135114,1.5098489496125344633271,\ +1.099698103860223152850,0.6868222398318966082087,0.6358265380955081536030}; + double out2[12]; + + dconva(x1,2,h1,1,out1); + for (i=0;i<2;i++){ + assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <3e-16); + } + + dconva(h1,1,x1,2,out1); + for (i=0;i<2;i++){ + assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <3e-16); + } + + dconva(x2,8,h2,5,out2); + for (i=0;i<12;i++){ + assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <3e-15); + } + + dconva(h2,5,x2,8,out2); + for (i=0;i<12;i++){ + assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <3e-15); + } +} + + +static void zconvaTest(void){ + int i; + double rx1[2]={0.6274093082174658775330,0.7608432597480714321137}; + double ix1[2]={0.0485566202551126480103,0.6723949727602303028107}; + double rh1[1]={0.2017172696068882942200}; + double ih1[1]={0.3911573919467628002167}; + double rconv1[2]={0.1075660116388346271288,-0.1095370389478208250633}; + double iconv1[2]={0.2552104975446664592020,0.4332431431659207188289}; + doubleComplex *x1, *h1, out1[2]; + + double rx2[4]={0.9262343775480985641480,0.5667211269028484821320,0.5711638936772942543030,\ +0.8160110483877360820770}; + double ix2[4]={0.0568927936255931854248,0.5595936686731874942780,0.1249340316280722618103,\ +0.7279222286306321620941}; + double rh2[7]={0.6783956284634768962860,0.3320095278322696685791,0.0258709923364222049713,\ +0.5174468224868178367615,0.3916873238049447536469,0.2413538414984941482544,\ +0.5064434898085892200470}; + double ih2[7]={0.4236102001741528511047,0.2893727528862655162811,0.0887932181358337402344,\ +0.6212881752289831638336,0.3454984454438090324402,0.7064867629669606685638,\ +0.5211472492665052413940}; + double rconv2[10]={0.6042529849650153384033,0.4384669630868825995762,0.3796883200627478305300,\ +0.8076061278620030314812,0.3526828755641281398781,0.3863983221928849465243,\ +0.3314166433494881713884,0.113095069738258141578,-0.0931668091195109737690,\ +0.0339088159370524999670}; + double iconv2[10]={0.4309581525680090119401,0.9066106897516487128641,0.7602048387189073164194,\ +1.7159441161321140612017,1.5157099506355884432907,1.5938830446486993430710,\ +2.1768689123487110492761,1.5794692240126795290678,1.1131203493567218831828,\ +0.7939133870152889072003}; + doubleComplex *x2, *h2, out2[10]; + + x1=DoubleComplexMatrix(rx1,ix1,2); + h1=DoubleComplexMatrix(rh1,ih1,1); + x2=DoubleComplexMatrix(rx2,ix2,4); + h2=DoubleComplexMatrix(rh2,ih2,7); + + zconva(x1,2,h1,1,out1); + for (i=0;i<2;i++){ + assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <3e-16); + assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <3e-16); + } + + zconva(h1,1,x1,2,out1); + for (i=0;i<2;i++){ + assert( ( fabs(zreals(out1[i])-rconv1[i]) / fabs(zreals(out1[i])) ) <3e-16); + assert( ( fabs(zimags(out1[i])-iconv1[i]) / fabs(zimags(out1[i])) ) <3e-16); + } + + zconva(x2,4,h2,7,out2); + for (i=0;i<7;i++){ + assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <3e-15); + assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <3e-15); + } + + zconva(h2,7,x2,4,out2); + for (i=0;i<10;i++){ + assert( ( fabs(zreals(out2[i])-rconv2[i]) / fabs(zreals(out2[i])) ) <3e-14); + assert( ( fabs(zimags(out2[i])-iconv2[i]) / fabs(zimags(out2[i])) ) <3e-15); + } +} + + + +static int convTest(void){ + printf("\n>>>> Conv Double Tests\n"); + dconvaTest(); + zconvaTest(); + return 0; +} + +int main (void){ + assert(convTest()==0); + return 0; +} + + + diff --git a/2.3-1/src/c/signalProcessing/conv/testFloatConv.c b/2.3-1/src/c/signalProcessing/conv/testFloatConv.c new file mode 100644 index 00000000..932f3752 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/testFloatConv.c @@ -0,0 +1,134 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "conv.h" +#include +#include + +static void sconvaTest(void){ + int i; + float x1[2]={0.5253563085570931434631f,0.5376229803077876567841f}; + float h1[1]={0.2256303490139544010162f}; + float conv1[2]={0.1185363272564196462922f,0.1213040606847684693692f}; + float out1[2]; + + float x2[8]={0.5878720157779753208160f,0.4829179299995303153992f,0.2232865034602582454681f,\ +0.8400885667651891708374f,0.1205995907075703144074f,0.2855364168062806129456f,\ +0.8607514644972980022430f,0.8494101651012897491455f}; + float h2[5]={0.9931209897622466087341f,0.6488562873564660549164f,0.9923190940171480178833f,\ +0.0500419777818024158478f,0.7485506581142544746399f}; + float conv2[12]={0.5838280381629499249385f,0.8610403862135279640100f,1.1184514745692031301161f,\ +1.4878174016996970063786f,1.3506563468112671166921f,1.568122169583095804057f,\ +1.3689566747706436444787f,2.3202981934690010135114f,1.5098489496125344633271f,\ +1.099698103860223152850f,0.6868222398318966082087f,0.6358265380955081536030f}; + float out2[12]; + + sconva(x1,2,h1,1,out1); + for (i=0;i<2;i++){ + assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <1e-7); + } + + sconva(h1,1,x1,2,out1); + for (i=0;i<2;i++){ + assert( ( fabs(out1[i]-conv1[i]) / fabs(out1[i]) ) <1e-7); + } + + + sconva(x2,8,h2,5,out2); + for (i=0;i<12;i++){ + assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <1e-6); + } + + sconva(h2,5,x2,8,out2); + for (i=0;i<12;i++){ + assert( ( fabs(out2[i]-conv2[i]) / fabs(out2[i]) ) <1e-6); + } +} + + +static void cconvaTest(void){ + int i; + float rx1[2]={0.6274093082174658775330f,0.7608432597480714321137f}; + float ix1[2]={0.0485566202551126480103f,0.6723949727602303028107f}; + float rh1[1]={0.2017172696068882942200f}; + float ih1[1]={0.3911573919467628002167f}; + float rconv1[2]={0.1075660116388346271288f,-0.1095370389478208250633f}; + float iconv1[2]={0.2552104975446664592020f,0.4332431431659207188289f}; + floatComplex *x1, *h1, out1[2]; + + float rx2[4]={0.9262343775480985641480f,0.5667211269028484821320f,0.5711638936772942543030f,\ +0.8160110483877360820770f}; + float ix2[4]={0.0568927936255931854248f,0.5595936686731874942780f,0.1249340316280722618103f,\ +0.7279222286306321620941f}; + float rh2[7]={0.6783956284634768962860f,0.3320095278322696685791f,0.0258709923364222049713f,\ +0.5174468224868178367615f,0.3916873238049447536469f,0.2413538414984941482544f,\ +0.5064434898085892200470f}; + float ih2[7]={0.4236102001741528511047f,0.2893727528862655162811f,0.0887932181358337402344f,\ +0.6212881752289831638336f,0.3454984454438090324402f,0.7064867629669606685638f,\ +0.5211472492665052413940f}; + float rconv2[10]={0.6042529849650153384033f,0.4384669630868825995762f,0.3796883200627478305300f,\ +0.8076061278620030314812f,0.3526828755641281398781f,0.3863983221928849465243f,\ +0.3314166433494881713884f,0.113095069738258141578f,-0.0931668091195109737690f,\ +0.0339088159370524999670f}; + float iconv2[10]={0.4309581525680090119401f,0.9066106897516487128641f,0.7602048387189073164194f,\ +1.7159441161321140612017f,1.5157099506355884432907f,1.5938830446486993430710f,\ +2.1768689123487110492761f,1.5794692240126795290678f,1.1131203493567218831828f,\ +0.7939133870152889072003f}; + floatComplex *x2, *h2, out2[10]; + + + x1=FloatComplexMatrix(rx1,ix1,2); + h1=FloatComplexMatrix(rh1,ih1,1); + x2=FloatComplexMatrix(rx2,ix2,4); + h2=FloatComplexMatrix(rh2,ih2,7); + + + cconva(x1,2,h1,1,out1); + for (i=0;i<2;i++){ + assert( ( fabs(creals(out1[i])-rconv1[i]) / fabs(creals(out1[i])) ) <1e-6); + assert( ( fabs(cimags(out1[i])-iconv1[i]) / fabs(cimags(out1[i])) ) <1e-6); + } + + cconva(h1,1,x1,2,out1); + for (i=0;i<2;i++){ + assert( ( fabs(creals(out1[i])-rconv1[i]) / fabs(creals(out1[i])) ) <1e-6); + assert( ( fabs(cimags(out1[i])-iconv1[i]) / fabs(cimags(out1[i])) ) <1e-6); + } + + cconva(x2,4,h2,7,out2); + for (i=0;i<10;i++){ + assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <3e-6); + assert( ( fabs(cimags(out2[i])-iconv2[i]) / fabs(cimags(out2[i])) ) <1e-6); + } + + cconva(h2,7,x2,4,out2); + for (i=0;i<10;i++){ + assert( ( fabs(creals(out2[i])-rconv2[i]) / fabs(creals(out2[i])) ) <3e-6); + assert( ( fabs(cimags(out2[i])-iconv2[i]) / fabs(cimags(out2[i])) ) <1e-6); + } + +} + + + +static int convTest(void){ + printf("\n>>>> Conv Float Tests\n"); + sconvaTest(); + cconvaTest(); + return 0; +} + +int main (void){ + assert(convTest()==0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj b/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj new file mode 100644 index 00000000..49cacdfe --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0ED6E2D7-B50D-4A17-A34B-440A7307E747} + testDoubleConv + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj.filters b/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj.filters new file mode 100644 index 00000000..0b5ec663 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/test_DoubleConv/testDoubleConv.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj b/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj new file mode 100644 index 00000000..cd908e0b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5A0D9A72-FA85-41F8-A605-A2B31961B01C} + testFloatConv + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj.filters b/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj.filters new file mode 100644 index 00000000..4da2dd92 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/test_FloatConv/testFloatConv.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv/zconva.c b/2.3-1/src/c/signalProcessing/conv/zconva.c new file mode 100644 index 00000000..7f773fac --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv/zconva.c @@ -0,0 +1,51 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conv.h" + +void zconva(doubleComplex *in1, int size1, doubleComplex *in2,int size2, doubleComplex *out){ + int m1,i; + doubleComplex *in1b, *in2b, *result; + + + m1=(int) floor(log(size1+size2-1.0) / log(2.0) + 1.0); + m1=(int) pow(2.0, m1); + + in1b=(doubleComplex *)malloc(2*(unsigned int)m1*sizeof(double)); + for(i=0;i +#include +#include "conv2d.h" +#include +#define SOURCE1 {0.27602507699857836698,0.67970267685367480315,0.65509800397384065906,\ +0.16261173519463056891,0.11899768155837664452,0.49836405198214295265,\ +0.95974395851608107488,0.34038572666613320372,0.58526775097977734585} + +#define SOURCE2 {0.22381193949113697972,0.75126705930565285119,0.25509511545926910614,0.50595705166514237661,\ +0.69907672265668596712,0.89090325253579849551,0.95929142520544430361,0.54721552996380307121,\ +0.13862444282867913969,0.14929400555905747439,0.25750825412373645751,0.84071725598366253696,\ +0.25428217897153104765,0.81428482606881635864,0.24352496872498929914,0.92926362318722777189} + +#define RESULT {0.06177770783124224979,0.35949412227527688390,0.72766963495480452284,0.80519921797623728033,0.51101266335063399993,0.33145145464232411703,\ +0.22935715403715500882,0.86987390060810976244,1.57072190340944928266,1.87374187807601977340,1.18771170991100438741,0.61063060781955358358,\ +0.36674405818143579472,1.16069853832181757447,1.50530552987165244794,2.16413391928651943630,1.60484415693162763006,1.11958509084199531181,\ +0.76366488032771995265,1.53136700662003777396,2.54906722776044070145,2.57034999375695782931,1.76723864513866257830,1.34800960550190063181,\ +0.17439323785911495235,0.35314105985283195110,0.64231507683460742353,1.56780077060808920031,0.66882373773691206065,0.95515628223064197311,\ +0.24404578502623180958,0.86805896659833670093,0.65971570871717122309,1.45132222047376413521,0.45883538439608340109,0.54386803081010803851} + + +#define REAL1 {0.66538110421970486641,0.62839178834110498428, 0.84974523587152361870,0.68573101982474327087 } + +#define IMAG1 {-0.87821648130193352699,-0.06837403681129217148,\ +-0.56084860628470778465,-0.66235693730413913727} + +#define REAL2 {0.33217189135029911995,0.59350947011262178421,0.50153415976092219353,0.43685875833034515381,\ +0.26931248093023896217,0.63257448654621839523,0.40519540151581168175,0.91847078315913677216,\ +0.04373343335464596748,0.48185089323669672012,0.26395560009405016899,0.41481037065386772156,\ +0.28064980218186974525,0.12800584640353918076,0.77831285959109663963,0.21190304495394229889} + +#define IMAG2 {-0.11213546665385365486,-0.68568959552794694901,-0.15312166837975382805,-0.69708506017923355103,\ +-0.84155184263363480568,-0.40620247554033994675,-0.40948254754766821861,-0.87841258011758327484,\ +-0.11383596854284405708,-0.19983377400785684586,-0.56186607433483004570,-0.58961773291230201721,\ +-0.68539796629920601845,-0.89062247332185506821,-0.50422128057107329369,-0.34936154074966907501} + +#define REALRES {0.12254168490351219356,-0.00620698294409172124,0.52531049188577938480,-0.01682362473694332117,0.22685593683438345924,\ +-0.34049880015190781002,0.44913351267544954215,0.57284073382943700992,0.28907598257968836197,0.35494736024841355704,\ +-0.31400940398865162528,0.10179275637972534652,0.25069879068018435797,0.18008660250348096366,0.26835012662172041953,\ +-0.44187118264088443009,-0.31552872228703227053,0.20183362693927198173,0.11943448752613922137,0.00318181727621991151,\ +-0.14592366179695342998,-0.65225983747193394535,-0.12355655213817345883,0.18386347752483947482,-0.08609354902257074227} + +#define IMAGRES {-0.36633165023340091837,-1.07065163823997133719,-1.01380217936246941335,-0.97799610277246618040,-0.46791232441530977715,\ +-1.07805207455505658309,-2.58549659104333517945,-2.20153008389715321158,-2.95066686999604854691,-1.38215608568270642564,\ +-0.98029992300656176862,-2.08606516328413960082,-2.03693007812789206312,-2.93846237331332016396,-1.60958345050271689480,\ +-0.82378154448145179956,-1.70198901954439785200,-2.66911026836615317137,-2.08241271540499273129,-0.91309628593039071642,\ +-0.73981570694656195730,-1.48448309406143419409,-1.56048833083614346684,-1.27699492716519591440,-0.37992349748692871847} + +static void dconv2daTest(void){ + int i; + double in1[] = SOURCE1; + double in2[] = SOURCE2; + double res[] = RESULT; + double out[36],outTest[9],outTest2[12*16]; + double test1[] = {1,2,3}; + double resTest[] ={1,2,3,2,4,6,3,6,9}; + double inTest1[] = {1,2,3,4,5,6,7,8,9,10,11,12}; + double inTest2[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; + dconv2da(in1,3,3,in2,4,4,out); + for (i=0;i<36;i++){ + assert( ( fabs(out[i]-res[i]) / fabs(out[i]) ) <3e-16); + } + + dconv2da(test1,1,3,test1,3,1,outTest); + for (i=0;i<9;i++){ + assert( ( fabs(outTest[i]-resTest[i]) / fabs(outTest[i]) ) <3e-16); + } + + dconv2da(inTest1,12,1,inTest2,1,16,outTest2); + for (i=0;i<12*16;i++){ + printf("out[%d] : %f\n",i,outTest2[i]); + } + +} + + +static void zconv2daTest(void){ + int i; + double rin1[] = REAL1; + double iin1[] = IMAG1; + double rin2[] = REAL2; + double iin2[] = IMAG2; + double rres[] = REALRES; + double ires[] = IMAGRES; + doubleComplex *in1, *in2,out[25]; + + in1=DoubleComplexMatrix(rin1,iin1,4); + in2=DoubleComplexMatrix(rin2,iin2,16); + zconv2da(in1,2,2,in2,4,4,out); + for (i=0;i<25;i++){ + assert( ( fabs(zreals(out[i])-rres[i]) / fabs(zreals(out[i])) ) <3e-14); + assert( ( fabs(zimags(out[i])-ires[i]) / fabs(zimags(out[i])) ) <3e-14); + } +} + + +static int conv2dTest(void){ + dconv2daTest(); + zconv2daTest(); + return 0; +} + +int main (void){ + assert(conv2dTest()==0); + return 0; +} + diff --git a/2.3-1/src/c/signalProcessing/conv2d/testFloatConv2d.c b/2.3-1/src/c/signalProcessing/conv2d/testFloatConv2d.c new file mode 100644 index 00000000..0166804a --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/testFloatConv2d.c @@ -0,0 +1,106 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "conv2d.h" + +#define SOURCE1 {0.27602507699857836698f,0.67970267685367480315f,0.65509800397384065906f,\ +0.16261173519463056891f,0.11899768155837664452f,0.49836405198214295265f,\ +0.95974395851608107488f,0.34038572666613320372f,0.58526775097977734585f} + +#define SOURCE2 {0.22381193949113697972f,0.75126705930565285119f,0.25509511545926910614f,0.50595705166514237661f,\ +0.69907672265668596712f,0.89090325253579849551f,0.95929142520544430361f,0.54721552996380307121f,\ +0.13862444282867913969f,0.14929400555905747439f,0.25750825412373645751f,0.84071725598366253696f,\ +0.25428217897153104765f,0.81428482606881635864f,0.24352496872498929914f,0.92926362318722777189f} + +#define RESULT {0.06177770783124224979f,0.35949412227527688390f,0.72766963495480452284f,0.80519921797623728033f,0.51101266335063399993f,0.33145145464232411703f,\ +0.22935715403715500882f,0.86987390060810976244f,1.57072190340944928266f,1.87374187807601977340f,1.18771170991100438741f,0.61063060781955358358f,\ +0.36674405818143579472f,1.16069853832181757447f,1.50530552987165244794f,2.16413391928651943630f,1.60484415693162763006f,1.11958509084199531181f,\ +0.76366488032771995265f,1.53136700662003777396f,2.54906722776044070145f,2.57034999375695782931f,1.76723864513866257830f,1.34800960550190063181f,\ +0.17439323785911495235f,0.35314105985283195110f,0.64231507683460742353f,1.56780077060808920031f,0.66882373773691206065f,0.95515628223064197311f,\ +0.24404578502623180958f,0.86805896659833670093f,0.65971570871717122309f,1.45132222047376413521f,0.45883538439608340109f,0.54386803081010803851f} + + +#define REAL1 {0.66538110421970486641f,0.62839178834110498428f, 0.84974523587152361870f,0.68573101982474327087f } + +#define IMAG1 {-0.87821648130193352699f,-0.06837403681129217148f,\ +-0.56084860628470778465f,-0.66235693730413913727f} + +#define REAL2 {0.33217189135029911995f,0.59350947011262178421f,0.50153415976092219353f,0.43685875833034515381f,\ +0.26931248093023896217f,0.63257448654621839523f,0.40519540151581168175f,0.91847078315913677216f,\ +0.04373343335464596748f,0.48185089323669672012f,0.26395560009405016899f,0.41481037065386772156f,\ +0.28064980218186974525f,0.12800584640353918076f,0.77831285959109663963f,0.21190304495394229889f} + +#define IMAG2 {-0.11213546665385365486f,-0.68568959552794694901f,-0.15312166837975382805f,-0.69708506017923355103f,\ +-0.84155184263363480568f,-0.40620247554033994675f,-0.40948254754766821861f,-0.87841258011758327484f,\ +-0.11383596854284405708f,-0.19983377400785684586f,-0.56186607433483004570f,-0.58961773291230201721f,\ +-0.68539796629920601845f,-0.89062247332185506821f,-0.50422128057107329369f,-0.34936154074966907501f} + +#define REALRES {0.12254168490351219356f,-0.00620698294409172124f,0.52531049188577938480f,-0.01682362473694332117f,0.22685593683438345924f,\ +-0.34049880015190781002f,0.44913351267544954215f,0.57284073382943700992f,0.28907598257968836197f,0.35494736024841355704f,\ +-0.31400940398865162528f,0.10179275637972534652f,0.25069879068018435797f,0.18008660250348096366f,0.26835012662172041953f,\ +-0.44187118264088443009f,-0.31552872228703227053f,0.20183362693927198173f,0.11943448752613922137f,0.00318181727621991151f,\ +-0.14592366179695342998f,-0.65225983747193394535f,-0.12355655213817345883f,0.18386347752483947482f,-0.08609354902257074227f} + +#define IMAGRES {-0.36633165023340091837f,-1.07065163823997133719f,-1.01380217936246941335f,-0.97799610277246618040f,-0.46791232441530977715f,\ +-1.07805207455505658309f,-2.58549659104333517945f,-2.20153008389715321158f,-2.95066686999604854691f,-1.38215608568270642564f,\ +-0.98029992300656176862f,-2.08606516328413960082f,-2.03693007812789206312f,-2.93846237331332016396f,-1.60958345050271689480f,\ +-0.82378154448145179956f,-1.70198901954439785200f,-2.66911026836615317137f,-2.08241271540499273129f,-0.91309628593039071642f,\ +-0.73981570694656195730f,-1.48448309406143419409f,-1.56048833083614346684f,-1.27699492716519591440f,-0.37992349748692871847f} + + +static void sconv2daTest(void){ + int i; + float in1[] = SOURCE1; + float in2[] = SOURCE2; + float res[] = RESULT; + float out[36]; + + sconv2da(in1,3,3,in2,4,4,out); + for (i=0;i<36;i++){ + assert( ( fabs(out[i]-res[i]) / fabs(out[i]) ) <1e-6); + } +} + + +static void cconv2daTest(void){ + int i; + float rin1[] = REAL1; + float iin1[] = IMAG1; + float rin2[] = REAL2; + float iin2[] = IMAG2; + float rres[] = REALRES; + float ires[] = IMAGRES; + floatComplex *in1, *in2,out[25]; + + in1=FloatComplexMatrix(rin1,iin1,4); + in2=FloatComplexMatrix(rin2,iin2,16); + cconv2da(in1,2,2,in2,4,4,out); + for (i=0;i<25;i++){ + assert( ( fabs(creals(out[i])-rres[i]) / fabs(creals(out[i])) ) <3e-5); + assert( ( fabs(cimags(out[i])-ires[i]) / fabs(cimags(out[i])) ) <1e-5); + } +} + + +static int conv2dTest(void){ + sconv2daTest(); + cconv2daTest(); + return 0; +} + +int main (void){ + assert(conv2dTest()==0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj b/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj new file mode 100644 index 00000000..f9172238 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {C46C7CDE-9D38-42E5-9DBA-3E7306033450} + testDoubleConv2d + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj.filters b/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj.filters new file mode 100644 index 00000000..2e9c4cf3 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/test_DoubleConv2d/testDoubleConv2d.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj b/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj new file mode 100644 index 00000000..f6c8d3f5 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {26170083-8042-4E04-BFE3-B553A5A8D481} + testFloatConv2d + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj.filters b/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj.filters new file mode 100644 index 00000000..e0a0b996 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/test_FloatConv2d/testFloatConv2d.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/conv2d/zconv2da.c b/2.3-1/src/c/signalProcessing/conv2d/zconv2da.c new file mode 100644 index 00000000..9fe9b3f6 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/conv2d/zconv2da.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "conv2d.h" +#include "multiplication.h" +#include "addition.h" + +void zconv2da(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex *out){ + int i,j,k1,k2; + doubleComplex accu; + + for (i=0;i +#include "crossCorr.h" +#include "conv2d.h" +#include "conj.h" + +void ccrossCorra(floatComplex* in1, int rows1, int cols1, floatComplex* in2, int rows2, int cols2, floatComplex* out){ + floatComplex *in2Copy; + int i; + + in2Copy=(floatComplex *)malloc((unsigned int)rows2*sizeof(floatComplex)); + + /* We change in2 to be in appropriate form in in2Copy*/ + for (i=0;i<(rows2*cols2);i++) in2Copy[i]=cconjs(in2[rows2*cols2-1-i]); + + cconv2da(in1, rows1, cols1, in2Copy, rows2, cols2, out); + + free(in2Copy); +} + + diff --git a/2.3-1/src/c/signalProcessing/crossCorr/dcrossCorra.c b/2.3-1/src/c/signalProcessing/crossCorr/dcrossCorra.c new file mode 100644 index 00000000..b02298fd --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/dcrossCorra.c @@ -0,0 +1,37 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "crossCorr.h" +#include "conv2d.h" + +void dcrossCorra(double* in1, int rows1, int cols1, double* in2, int rows2, int cols2, double* out){ + double *in2Copy; + int i; + + in2Copy=(double*)malloc((unsigned int)(rows2*cols2)*sizeof(double)); + + /* We change in2 to be in appropriate form in in2Copy*/ + for (i=0;i<(rows2*cols2);i++) + { + in2Copy[i]=in2[rows2*cols2-1-i]; + } + + dconv2da(in1, rows1, cols1, in2Copy, rows2, cols2, out); + + free(in2Copy); +} + + + + diff --git a/2.3-1/src/c/signalProcessing/crossCorr/scrossCorra.c b/2.3-1/src/c/signalProcessing/crossCorr/scrossCorra.c new file mode 100644 index 00000000..ddc9df76 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/scrossCorra.c @@ -0,0 +1,31 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "crossCorr.h" +#include "conv2d.h" + +void scrossCorra(float* in1, int rows1, int cols1, float* in2, int rows2, int cols2, float* out){ + float *in2Copy; + int i; + + in2Copy=(float*)malloc((unsigned int)(rows2*cols2)*sizeof(float)); + + /* We change in2 to be in appropriate form in in2Copy*/ + for (i=0;i<(rows2*cols2);i++) in2Copy[i]=in2[rows2*cols2-1-i]; + + sconv2da(in1, rows1, cols1, in2Copy, rows2, cols2, out); + + free(in2Copy); + +} diff --git a/2.3-1/src/c/signalProcessing/crossCorr/testDoubleCrossCorr.c b/2.3-1/src/c/signalProcessing/crossCorr/testDoubleCrossCorr.c new file mode 100644 index 00000000..96f00530 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/testDoubleCrossCorr.c @@ -0,0 +1,62 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "crossCorr.h" +#include + + +static void dcrossCorraTest(void){ + int i; + double in1[] = {1,2,3,4,5,6,7,8,9,10,11,12}; + double in2[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; + double inV1[]={0.8812593049369752407074,0.459206754341721534729,0.4192749080248177051544,0.9930617930367588996887,0.1705299648456275463104,0.8114501461386680603027, 0.4106854074634611606598}; + double inV2[]={0.5211019767448306083679, 0.2967169224284589290619, 0.4054284896701574325562, 0.6229536165483295917511}; + double out[42],outV1[10],outV[12*16]; + + /* Test Matrice-Matrice */ + dcrossCorra(in1,4,3,in2,4,4,out); + for (i=0;i<42;i++){ + printf("out[%d] : %f\n",i,out[i]); + } + + /* Test VecteuLigne-VecteurColonne */ + dcrossCorra(in1,12,1,in2,1,16,outV); + for (i=0;i<12*16;i++){ + printf("out[%d] : %f\n",i,outV[i]); + } + + /* Test VecteurLigne-VecteurLigne */ + dcrossCorra(inV1,1,7,inV2,1,4,outV1); + for (i=0;i<10;i++){ + printf("out[%d] : %f\n",i,outV1[i]); + } +} + +/*FIXME : aucun test pour les complexes*/ +static void zcrossCorraTest(void){ + +} + + +static int crossCorraTest(void){ + dcrossCorraTest(); + zcrossCorraTest(); + return 0; +} + +int main (void){ + assert(crossCorraTest()==0); + return 0; +} + diff --git a/2.3-1/src/c/signalProcessing/crossCorr/testFloatCrossCorr.c b/2.3-1/src/c/signalProcessing/crossCorr/testFloatCrossCorr.c new file mode 100644 index 00000000..aace4b9e --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/testFloatCrossCorr.c @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "crossCorr.h" +#include + + +static void scrossCorraTest(void){ + int i; + float in1[] = {1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f,9.0f,10.0f,11.0f,12.0f}; + float in2[] = {1.0f,2.0f,3.0f,4.0f,5.0f,6.0f,7.0f,8.0f,9.0f,10.0f,11.0f,12.0f,13.0f,14.0f,15.0f,16.0f}; + + float out[42]; + + scrossCorra(in1,4,3,in2,4,4,out); + for (i=0;i<42;i++){ + printf("out[%d] : %f\n",i,out[i]); + } +} + +/*FIXME : aucun test pour les complexes*/ +static void ccrossCorraTest(void){ + +} + + +static int crossCorraTest(void){ + scrossCorraTest(); + ccrossCorraTest(); + return 0; +} + +int main (void){ + assert(crossCorraTest()==0); + return 0; +} + diff --git a/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj b/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj new file mode 100644 index 00000000..a3159a95 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9CF61EF1-2FF6-4DC2-A6EE-00C2288732BD} + testDoubleCrossCorr + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj.filters b/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj.filters new file mode 100644 index 00000000..1f2dabb6 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/test_DoubleCrossCorr/testDoubleCrossCorr.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj b/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj new file mode 100644 index 00000000..943d8aab --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0F19A6A2-2EE2-4E39-8A4C-2F898D4186CF} + testFloatCrossCorr + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj.filters b/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj.filters new file mode 100644 index 00000000..194ad9f5 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/test_FloatCrossCorr/testFloatCrossCorr.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/crossCorr/zcrossCorra.c b/2.3-1/src/c/signalProcessing/crossCorr/zcrossCorra.c new file mode 100644 index 00000000..f5659a36 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/crossCorr/zcrossCorra.c @@ -0,0 +1,34 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "crossCorr.h" +#include "conv2d.h" +#include "conj.h" + +void zcrossCorra(doubleComplex* in1, int rows1, int cols1, doubleComplex* in2, int rows2, int cols2, doubleComplex* out){ + doubleComplex *in2Copy; + int i; + + in2Copy=(doubleComplex *)malloc((unsigned int)(rows2*cols2)*sizeof(doubleComplex)); + + /* We change in2 to be in appropriate form in in2Copy*/ + for (i=0;i<(rows2*cols2);i++) in2Copy[i]=zconjs(in2[rows2*cols2-1-i]); + + zconv2da(in1, rows1, cols1, in2Copy, rows2, cols2, out); + + free(in2Copy); + +} + + diff --git a/2.3-1/src/c/signalProcessing/fft/Makefile.am b/2.3-1/src/c/signalProcessing/fft/Makefile.am new file mode 100644 index 00000000..07b10b4f --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/Makefile.am @@ -0,0 +1,83 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libFft_la_CFLAGS = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libFft.la + +libFft_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/fft.h \ + fft_internal.h + +SRC = zfftma.c \ + cfftma.c \ + dfft2.c \ + dfftbi.c \ + dfftmx.c \ + fft842.c \ + r2tx.c \ + r4tx.c \ + r8tx.c \ + dfftma.c \ + sfftma.c + +#### +# Checking Part +#### + +check_INCLUDES = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatFft testDoubleFft testMatFft + +TESTS = testFloatFft testDoubleFft testMatFft + +# +# -*- Fftine Tests -*- +# +testFloatFft_SOURCES = testFloatFft.c +testFloatFft_CFLAGS = $(check_INCLUDES) +testFloatFft_LDADD = $(check_LDADD) + +testDoubleFft_SOURCES = testDoubleFft.c +testDoubleFft_CFLAGS = $(check_INCLUDES) +testDoubleFft_LDADD = $(check_LDADD) + + +testMatFft_SOURCES = testMatFft.c +testMatFft_CFLAGS = $(check_INCLUDES) +testMatFft_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/signalProcessing/fft/Makefile.in b/2.3-1/src/c/signalProcessing/fft/Makefile.in new file mode 100644 index 00000000..117cae37 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/Makefile.in @@ -0,0 +1,865 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatFft$(EXEEXT) testDoubleFft$(EXEEXT) \ + testMatFft$(EXEEXT) +TESTS = testFloatFft$(EXEEXT) testDoubleFft$(EXEEXT) \ + testMatFft$(EXEEXT) +subdir = src/c/signalProcessing/fft +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libFft_la_LIBADD = +am__objects_1 = +am__objects_2 = libFft_la-zfftma.lo libFft_la-cfftma.lo \ + libFft_la-dfft2.lo libFft_la-dfftbi.lo libFft_la-dfftmx.lo \ + libFft_la-fft842.lo libFft_la-r2tx.lo libFft_la-r4tx.lo \ + libFft_la-r8tx.lo libFft_la-dfftma.lo libFft_la-sfftma.lo +am_libFft_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libFft_la_OBJECTS = $(am_libFft_la_OBJECTS) +libFft_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libFft_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleFft_OBJECTS = testDoubleFft-testDoubleFft.$(OBJEXT) +testDoubleFft_OBJECTS = $(am_testDoubleFft_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la +testDoubleFft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleFft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleFft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatFft_OBJECTS = testFloatFft-testFloatFft.$(OBJEXT) +testFloatFft_OBJECTS = $(am_testFloatFft_OBJECTS) +testFloatFft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatFft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatFft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatFft_OBJECTS = testMatFft-testMatFft.$(OBJEXT) +testMatFft_OBJECTS = $(am_testMatFft_OBJECTS) +testMatFft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testMatFft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatFft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libFft_la_SOURCES) $(testDoubleFft_SOURCES) \ + $(testFloatFft_SOURCES) $(testMatFft_SOURCES) +DIST_SOURCES = $(libFft_la_SOURCES) $(testDoubleFft_SOURCES) \ + $(testFloatFft_SOURCES) $(testMatFft_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libFft_la_CFLAGS = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libFft.la +libFft_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/fft.h \ + fft_internal.h + +SRC = zfftma.c \ + cfftma.c \ + dfft2.c \ + dfftbi.c \ + dfftmx.c \ + fft842.c \ + r2tx.c \ + r4tx.c \ + r8tx.c \ + dfftma.c \ + sfftma.c + + +#### +# Checking Part +#### +check_INCLUDES = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + @LIBMATH@ + + +# +# -*- Fftine Tests -*- +# +testFloatFft_SOURCES = testFloatFft.c +testFloatFft_CFLAGS = $(check_INCLUDES) +testFloatFft_LDADD = $(check_LDADD) +testDoubleFft_SOURCES = testDoubleFft.c +testDoubleFft_CFLAGS = $(check_INCLUDES) +testDoubleFft_LDADD = $(check_LDADD) +testMatFft_SOURCES = testMatFft.c +testMatFft_CFLAGS = $(check_INCLUDES) +testMatFft_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/signalProcessing/fft/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/signalProcessing/fft/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libFft.la: $(libFft_la_OBJECTS) $(libFft_la_DEPENDENCIES) + $(libFft_la_LINK) -rpath $(pkglibdir) $(libFft_la_OBJECTS) $(libFft_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleFft$(EXEEXT): $(testDoubleFft_OBJECTS) $(testDoubleFft_DEPENDENCIES) + @rm -f testDoubleFft$(EXEEXT) + $(testDoubleFft_LINK) $(testDoubleFft_OBJECTS) $(testDoubleFft_LDADD) $(LIBS) +testFloatFft$(EXEEXT): $(testFloatFft_OBJECTS) $(testFloatFft_DEPENDENCIES) + @rm -f testFloatFft$(EXEEXT) + $(testFloatFft_LINK) $(testFloatFft_OBJECTS) $(testFloatFft_LDADD) $(LIBS) +testMatFft$(EXEEXT): $(testMatFft_OBJECTS) $(testMatFft_DEPENDENCIES) + @rm -f testMatFft$(EXEEXT) + $(testMatFft_LINK) $(testMatFft_OBJECTS) $(testMatFft_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-cfftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-dfft2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-dfftbi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-dfftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-dfftmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-fft842.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-r2tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-r4tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-r8tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-sfftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libFft_la-zfftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleFft-testDoubleFft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatFft-testFloatFft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatFft-testMatFft.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libFft_la-zfftma.lo: zfftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-zfftma.lo -MD -MP -MF $(DEPDIR)/libFft_la-zfftma.Tpo -c -o libFft_la-zfftma.lo `test -f 'zfftma.c' || echo '$(srcdir)/'`zfftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-zfftma.Tpo $(DEPDIR)/libFft_la-zfftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zfftma.c' object='libFft_la-zfftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-zfftma.lo `test -f 'zfftma.c' || echo '$(srcdir)/'`zfftma.c + +libFft_la-cfftma.lo: cfftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-cfftma.lo -MD -MP -MF $(DEPDIR)/libFft_la-cfftma.Tpo -c -o libFft_la-cfftma.lo `test -f 'cfftma.c' || echo '$(srcdir)/'`cfftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-cfftma.Tpo $(DEPDIR)/libFft_la-cfftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cfftma.c' object='libFft_la-cfftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-cfftma.lo `test -f 'cfftma.c' || echo '$(srcdir)/'`cfftma.c + +libFft_la-dfft2.lo: dfft2.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-dfft2.lo -MD -MP -MF $(DEPDIR)/libFft_la-dfft2.Tpo -c -o libFft_la-dfft2.lo `test -f 'dfft2.c' || echo '$(srcdir)/'`dfft2.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-dfft2.Tpo $(DEPDIR)/libFft_la-dfft2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfft2.c' object='libFft_la-dfft2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-dfft2.lo `test -f 'dfft2.c' || echo '$(srcdir)/'`dfft2.c + +libFft_la-dfftbi.lo: dfftbi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-dfftbi.lo -MD -MP -MF $(DEPDIR)/libFft_la-dfftbi.Tpo -c -o libFft_la-dfftbi.lo `test -f 'dfftbi.c' || echo '$(srcdir)/'`dfftbi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-dfftbi.Tpo $(DEPDIR)/libFft_la-dfftbi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfftbi.c' object='libFft_la-dfftbi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-dfftbi.lo `test -f 'dfftbi.c' || echo '$(srcdir)/'`dfftbi.c + +libFft_la-dfftmx.lo: dfftmx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-dfftmx.lo -MD -MP -MF $(DEPDIR)/libFft_la-dfftmx.Tpo -c -o libFft_la-dfftmx.lo `test -f 'dfftmx.c' || echo '$(srcdir)/'`dfftmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-dfftmx.Tpo $(DEPDIR)/libFft_la-dfftmx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfftmx.c' object='libFft_la-dfftmx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-dfftmx.lo `test -f 'dfftmx.c' || echo '$(srcdir)/'`dfftmx.c + +libFft_la-fft842.lo: fft842.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-fft842.lo -MD -MP -MF $(DEPDIR)/libFft_la-fft842.Tpo -c -o libFft_la-fft842.lo `test -f 'fft842.c' || echo '$(srcdir)/'`fft842.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-fft842.Tpo $(DEPDIR)/libFft_la-fft842.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fft842.c' object='libFft_la-fft842.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-fft842.lo `test -f 'fft842.c' || echo '$(srcdir)/'`fft842.c + +libFft_la-r2tx.lo: r2tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-r2tx.lo -MD -MP -MF $(DEPDIR)/libFft_la-r2tx.Tpo -c -o libFft_la-r2tx.lo `test -f 'r2tx.c' || echo '$(srcdir)/'`r2tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-r2tx.Tpo $(DEPDIR)/libFft_la-r2tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r2tx.c' object='libFft_la-r2tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-r2tx.lo `test -f 'r2tx.c' || echo '$(srcdir)/'`r2tx.c + +libFft_la-r4tx.lo: r4tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-r4tx.lo -MD -MP -MF $(DEPDIR)/libFft_la-r4tx.Tpo -c -o libFft_la-r4tx.lo `test -f 'r4tx.c' || echo '$(srcdir)/'`r4tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-r4tx.Tpo $(DEPDIR)/libFft_la-r4tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r4tx.c' object='libFft_la-r4tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-r4tx.lo `test -f 'r4tx.c' || echo '$(srcdir)/'`r4tx.c + +libFft_la-r8tx.lo: r8tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-r8tx.lo -MD -MP -MF $(DEPDIR)/libFft_la-r8tx.Tpo -c -o libFft_la-r8tx.lo `test -f 'r8tx.c' || echo '$(srcdir)/'`r8tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-r8tx.Tpo $(DEPDIR)/libFft_la-r8tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8tx.c' object='libFft_la-r8tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-r8tx.lo `test -f 'r8tx.c' || echo '$(srcdir)/'`r8tx.c + +libFft_la-dfftma.lo: dfftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-dfftma.lo -MD -MP -MF $(DEPDIR)/libFft_la-dfftma.Tpo -c -o libFft_la-dfftma.lo `test -f 'dfftma.c' || echo '$(srcdir)/'`dfftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-dfftma.Tpo $(DEPDIR)/libFft_la-dfftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dfftma.c' object='libFft_la-dfftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-dfftma.lo `test -f 'dfftma.c' || echo '$(srcdir)/'`dfftma.c + +libFft_la-sfftma.lo: sfftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -MT libFft_la-sfftma.lo -MD -MP -MF $(DEPDIR)/libFft_la-sfftma.Tpo -c -o libFft_la-sfftma.lo `test -f 'sfftma.c' || echo '$(srcdir)/'`sfftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libFft_la-sfftma.Tpo $(DEPDIR)/libFft_la-sfftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sfftma.c' object='libFft_la-sfftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libFft_la_CFLAGS) $(CFLAGS) -c -o libFft_la-sfftma.lo `test -f 'sfftma.c' || echo '$(srcdir)/'`sfftma.c + +testDoubleFft-testDoubleFft.o: testDoubleFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFft_CFLAGS) $(CFLAGS) -MT testDoubleFft-testDoubleFft.o -MD -MP -MF $(DEPDIR)/testDoubleFft-testDoubleFft.Tpo -c -o testDoubleFft-testDoubleFft.o `test -f 'testDoubleFft.c' || echo '$(srcdir)/'`testDoubleFft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFft-testDoubleFft.Tpo $(DEPDIR)/testDoubleFft-testDoubleFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFft.c' object='testDoubleFft-testDoubleFft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFft_CFLAGS) $(CFLAGS) -c -o testDoubleFft-testDoubleFft.o `test -f 'testDoubleFft.c' || echo '$(srcdir)/'`testDoubleFft.c + +testDoubleFft-testDoubleFft.obj: testDoubleFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFft_CFLAGS) $(CFLAGS) -MT testDoubleFft-testDoubleFft.obj -MD -MP -MF $(DEPDIR)/testDoubleFft-testDoubleFft.Tpo -c -o testDoubleFft-testDoubleFft.obj `if test -f 'testDoubleFft.c'; then $(CYGPATH_W) 'testDoubleFft.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleFft-testDoubleFft.Tpo $(DEPDIR)/testDoubleFft-testDoubleFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleFft.c' object='testDoubleFft-testDoubleFft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleFft_CFLAGS) $(CFLAGS) -c -o testDoubleFft-testDoubleFft.obj `if test -f 'testDoubleFft.c'; then $(CYGPATH_W) 'testDoubleFft.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleFft.c'; fi` + +testFloatFft-testFloatFft.o: testFloatFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFft_CFLAGS) $(CFLAGS) -MT testFloatFft-testFloatFft.o -MD -MP -MF $(DEPDIR)/testFloatFft-testFloatFft.Tpo -c -o testFloatFft-testFloatFft.o `test -f 'testFloatFft.c' || echo '$(srcdir)/'`testFloatFft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFft-testFloatFft.Tpo $(DEPDIR)/testFloatFft-testFloatFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFft.c' object='testFloatFft-testFloatFft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFft_CFLAGS) $(CFLAGS) -c -o testFloatFft-testFloatFft.o `test -f 'testFloatFft.c' || echo '$(srcdir)/'`testFloatFft.c + +testFloatFft-testFloatFft.obj: testFloatFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFft_CFLAGS) $(CFLAGS) -MT testFloatFft-testFloatFft.obj -MD -MP -MF $(DEPDIR)/testFloatFft-testFloatFft.Tpo -c -o testFloatFft-testFloatFft.obj `if test -f 'testFloatFft.c'; then $(CYGPATH_W) 'testFloatFft.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatFft-testFloatFft.Tpo $(DEPDIR)/testFloatFft-testFloatFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatFft.c' object='testFloatFft-testFloatFft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatFft_CFLAGS) $(CFLAGS) -c -o testFloatFft-testFloatFft.obj `if test -f 'testFloatFft.c'; then $(CYGPATH_W) 'testFloatFft.c'; else $(CYGPATH_W) '$(srcdir)/testFloatFft.c'; fi` + +testMatFft-testMatFft.o: testMatFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatFft_CFLAGS) $(CFLAGS) -MT testMatFft-testMatFft.o -MD -MP -MF $(DEPDIR)/testMatFft-testMatFft.Tpo -c -o testMatFft-testMatFft.o `test -f 'testMatFft.c' || echo '$(srcdir)/'`testMatFft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatFft-testMatFft.Tpo $(DEPDIR)/testMatFft-testMatFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatFft.c' object='testMatFft-testMatFft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatFft_CFLAGS) $(CFLAGS) -c -o testMatFft-testMatFft.o `test -f 'testMatFft.c' || echo '$(srcdir)/'`testMatFft.c + +testMatFft-testMatFft.obj: testMatFft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatFft_CFLAGS) $(CFLAGS) -MT testMatFft-testMatFft.obj -MD -MP -MF $(DEPDIR)/testMatFft-testMatFft.Tpo -c -o testMatFft-testMatFft.obj `if test -f 'testMatFft.c'; then $(CYGPATH_W) 'testMatFft.c'; else $(CYGPATH_W) '$(srcdir)/testMatFft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatFft-testMatFft.Tpo $(DEPDIR)/testMatFft-testMatFft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatFft.c' object='testMatFft-testMatFft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatFft_CFLAGS) $(CFLAGS) -c -o testMatFft-testMatFft.obj `if test -f 'testMatFft.c'; then $(CYGPATH_W) 'testMatFft.c'; else $(CYGPATH_W) '$(srcdir)/testMatFft.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/signalProcessing/fft/cfftma.c b/2.3-1/src/c/signalProcessing/fft/cfftma.c new file mode 100644 index 00000000..6bd2f744 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/cfftma.c @@ -0,0 +1,52 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fft.h" + +void cfftma ( floatComplex* in , int rows, int cols, floatComplex* out) +{ + + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(rows * cols)); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(rows * cols)); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < (rows * cols) ; i ++ ) + { + dblin[i] = DoubleComplex ( (double) creals( in[i]) , (double) cimags ( in[i])) ; + } + + zfftma ( dblin, rows , cols , dblout ); + + + for ( i = 0 ; i < (rows * cols) ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/signalProcessing/fft/dfft2.c b/2.3-1/src/c/signalProcessing/fft/dfft2.c new file mode 100644 index 00000000..9aa0bd53 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/dfft2.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fft_internal.h" + +void dfft2 ( double* a , double* b , int nseg , int n , int nspn , int isn , int ierr ) +{ + + + dfftbi ( a , b , nseg , n , nspn , isn , ierr ); + + + + return ; +} diff --git a/2.3-1/src/c/signalProcessing/fft/dfftbi.c b/2.3-1/src/c/signalProcessing/fft/dfftbi.c new file mode 100644 index 00000000..8ddef44f --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/dfftbi.c @@ -0,0 +1,322 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "max.h" +#include "fft_internal.h" + +/* +c arrays a and b originally hold the real and imaginary +c components of the data, and return the real and +c imaginary components of the resulting fourier coefficients. +c multivariate data is indexed according to the fortran +c array element successor function, without limit +c on the number of implied multiple subscripts. +c the subroutine is called once for each variate. +c the calls for a multivariate transform may be in any order. +c +c n is the dimension of the current variable. +c nspn is the spacing of consecutive data values +c while indexing the current variable. +c nseg*n*nspn is the total number of complex data values. +c the sign of isn determines the sign of the complex +c exponential, and the magnitude of isn is normally one. +c the magnitude of isn determines the indexing increment for a&b. +c +c if fft is called twice, with opposite signs on isn, an +c identity transformation is done...calls can be in either order. +c the results are scaled by 1/n when the sign of isn is positive. +c +c a tri-variate transform with a(n1,n2,n3), b(n1,n2,n3) +c is computed by +c call fft(a,b,n2*n3,n1,1,-1) +c call fft(a,b,n3,n2,n1,-1) +c call fft(a,b,1,n3,n1*n2,-1) +c +c a single-variate transform of n complex data values is computed by +c call fft(a,b,1,n,1,-1) +c +c the data may alternatively be stored in a single complex +c array a, then the magnitude of isn changed to two to +c give the correct indexing increment and a(2) used to +c pass the initial address for the sequence of imaginary +c values, e.g. +c +c +c array nfac is working storage for factoring n. the smallest +c number exceeding the 15 locations provided is 12,754,584. +c! +*/ +void dfftbi ( double* a , double* b , int nseg , int n , int nspn , + int isn , int ierr) +{ + + double* rstak ; + int* istak ; + + int lout = 0 ; + int lnow = 10; + int lused= 10; + + int lbook = 10 ; + + + int nfac[15] ; + int i ; + int in ; + int j = 3 ; + int j2 = 3 ; + int j3 = 3 ; + int jj = 9; + int m = 0 ; + int k ; + int kt ; + int kkk ; + int nspan ; + int nitems ; + int ntot ; + int maxp = 0; + int maxf ; + int itype; + int istkgt ; + + + int nf = abs ( n ) ; + + ierr = 0 ; + + /*determine the factors of n */ + + + if ( nf == 1) + return ; + + k = nf ; + + nspan = abs ( nf*nspn ) ; + ntot = abs ( nspan*nseg) ; + + + if ( isn*ntot == 0 ) + { + ierr = 1 ; + return ; + } + + +/* we search as much 4 in the factor of vector's length as we can */ + + while ( (k- (int)(k/16)*16 ) == 0 ) + { + m++; + nfac[m-1] = 4 ; + k = k >> 4 ; + } + + +/* we search all square factor */ + + do + { + while ( k%jj == 0 ) + { + m++; + nfac[m-1] = j ; + k /= jj ; + + } + + j+=2; + jj= j*j ; + + }while ( jj <= k); + + + + +/* if the remaining size after all the previous division is less than 4 + then it's the last factor */ + if ( k <= 4) + { + + kt = m; + nfac[m] = k; + if ( k != 1 ) + m++; + } + else + { + if ( (k & 3) == 0 ) + { + m++; + nfac[m-1] = 2 ; + k = k >> 2 ; + } + + /*all square factor out now but k >= 5 still */ + kt = m ; + maxp = max ( (kt+1)*2 , k-1); + j=2; + + do + { + if ( k%j == 0 ) + { + + m++; + nfac[m-1] = j ; + k /= j ; + } + + j = (j+1) | 1 ; + + }while ( j <= k ); + + } + + + + if ( m <= ( kt+1) ) + maxp = m + kt + 1 ; + + + + if ( m + kt > 15) + { + ierr = 2 ; + + return ; + } + + + if ( kt != 0 ) + { + j = kt ; + + do{ + m++; + + nfac[m-1] = nfac[j-1]; + j--; + }while ( j != 0) ; + } + + + maxf = nfac[m-kt-1] ; + + if ( kt > 0 ) + maxf = max ( nfac[kt-1] , maxf ); + + + + + for ( kkk = 1 ; kkk <= m ; kkk++ ) + { + maxf = max ( maxf , nfac[kkk-1]); + + } + + + + + + + + nitems = maxf * 4 ; + itype = 4 ; + + + istkgt = 2 + ((lnow-1)/2) ;/*lnow = 10*/ + istkgt = 6; + + /*i = ( (istkgt - 1 + nitems) * isize[3] -1) + 3 ;*/ + i = 12 + nitems*2; + +/* this part is mainly to allocate size for workspace */ + + istak = (int*) malloc ( sizeof (int) * (unsigned int) i); + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + j = istkgt ; + jj = j + maxf ; + j2 = jj+ maxf ; + j3 = j2+ maxf ; + + nitems = maxp ; + itype = 2 ; + + /*istkgt = ( lnow*isize[1] -1)/isize[1] + 2;*/ + istkgt = lnow + 1 ; + /*i = ( (istkgt - 1 + nitems) * isize[1] -1) / isize[1] + 3 ;*/ + i = lnow + nitems + 2 ; + istak = (int*) realloc ( istak ,sizeof (int) * (unsigned int) i); + rstak = (double*) malloc ( sizeof (double) * (unsigned int) i); + + + + + + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + k = istkgt ; + +/* +c la carte suivante est a supprimer si simple precision +c next instruction commented by FD&MG (simulog residue?) +c ******************************************** +c k=2*k-1 +c ********************************************* +*/ + + + + dfftmx( a , b , ntot , nf , nspan , + isn , m , kt , &rstak[j-1] , &rstak[jj-1] , + &rstak[j2-1] , &rstak[j3-1] , &istak[k-1] , nfac); + + k =2 ; + + in = 2 ; +/* + if (!( lbook <= lnow && lnow <= lused )) + { + ierr = 3 ; + return ; + } +*/ + while ( in > 0) + { + if ( lbook > istak[lnow-1] || istak[lnow-1] >= lnow-1) + { + ierr = 4 ; + } + + lout-- ; + lnow = istak[lnow-1] ; + in-- ; + } + free(istak); + free(rstak); + + return ; +} diff --git a/2.3-1/src/c/signalProcessing/fft/dfftma.c b/2.3-1/src/c/signalProcessing/fft/dfftma.c new file mode 100644 index 00000000..cf584623 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/dfftma.c @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fft.h" +#include "zeros.h" + +void dfftma ( double* in , int rows, int cols, double* out){ + double* ZEROS; + doubleComplex* inCpx; + doubleComplex* outCpx; + + ZEROS = (double*) malloc((unsigned int)(rows*cols)*sizeof(double)); + outCpx = (doubleComplex*) malloc((unsigned int)(rows*cols)*sizeof(doubleComplex)); + + dzerosa(ZEROS,rows,cols); + inCpx=DoubleComplexMatrix(in,ZEROS,rows*cols); + + zfftma(inCpx,rows,cols,outCpx); + + zreala(outCpx, rows*cols, out); +} diff --git a/2.3-1/src/c/signalProcessing/fft/dfftmx.c b/2.3-1/src/c/signalProcessing/fft/dfftmx.c new file mode 100644 index 00000000..f7d6ce30 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/dfftmx.c @@ -0,0 +1,1211 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "max.h" +#include "min.h" +#include "fft_internal.h" + + +/*c'est moche je sais */ + +static double* a ; +static double* b ; +static int ntot ; +static int n ; +static int nspan ; +static int isn ; +static int m ; +static int kt ; +static double* wt ; +static double* ck ; +static double* bt ; +static double* sk ; +static int* np ; +static int* nfac ; +static int inc ; +static int nt ; +static int ks ; + +static double rad ; +static double c72 ; +static double s72 ; +static double s120 ; + +static double aa ; +static double ak ; +static double akm ; +static double akp ; +static double aj ; +static double ajp ; +static double ajm ; + +static double bb ; +static double bk ; +static double bkm ; +static double bkp ; +static double bj ; +static double bjp ; +static double bjm ; +static double dr ; + +static double cd ; +static double c1 ; +static double c2 ; +static double c3 ; + +static double sd ; +static double s1 ; +static double s2 ; +static double s3 ; + +static int kspan ; +static int nn ; +static int jc ; +static int klim ; +static int jf ; +static int maxf ; +static int kk ; +static int k ; +static int k1 ; +static int k2 ; +static int k3 ; +static int k4 ; +static int mm ; +static int kspnn ; +static int i ; +static int j ; +static int jj; + +/* Prototypes */ + +static void preliminaryWork (void); +static void permute_stage1 (void); +static void permute_stage2 (void); +static void f4t_150 (void); +static void factorOf3Transform (void) ; +static void factorOf5Transform (void) ; +static void preFOtherTransform (void); +static void factorOfOtherTransform (void); +static void pre_sqFactor2NormlOrder (void); +static void nonSqFactor2NormOrder (void) ; +static void detPermutCycles (void); +static void reorderMatrix (void ) ; + +static int f4t_170 (void); +static int factorTransform (void); +static int pre_fOf2Trans (void); +static int factorOf2Transform (void); +static int factorOf4Transform (void); +static int mulByRotationFactor (void ); +static int post_sqFactor2NormlOrder (void); +static void single_sqFactor2NormlOrder (void); +static int multi_sqFactor2NormlOrder (void); + +/* End Prototypes */ + +/*note on this code all numbers alone in comment is + a reference to the corresponding goto in the original fotran code */ + +int dfftmx ( double* _pdblA , double* _pdblB , int _iNtot, int _iN, int _iNspan, + int _iIsn, int _iM, int _iKt, double* _pdblWt, double* _pdblCk, + double* _pdblBt, double* _pdblSk, int* _piNp, int* _piNfac) +{ + int retVal = 0 ; + a = _pdblA ; + b = _pdblB ; + + ntot = _iNtot ; + n = _iN ; + nspan= _iNspan ; + isn = _iIsn; + m = _iM ; + kt = _iKt ; + wt = _pdblWt ; + ck = _pdblCk; + bt = _pdblBt; + sk = _pdblSk; + np = _piNp; + nfac = _piNfac; + + inc = abs ( isn ) ; + nt = inc*ntot ; + ks = inc*nspan; + rad = atan((double)1); + c72 = cos (rad/0.6250); + s72 = sin (rad/0.6250); + s120= sqrt(0.750); + + + + preliminaryWork() ; + + + while ( retVal == 0 ) retVal = factorTransform ( ) ; + + np[0] = ks ; + + if ( kt != 0) permute_stage1 ( ) ; + + + if ( 2*kt + 1 < m ) permute_stage2 ( ) ; + + _pdblA = a ; + _pdblB = b ; + + return 0 ; +} + +/** ************************************** +Sous-Fonctions +******************************************/ + + + +/* this function only set the value of variable */ +static void preliminaryWork (void) +{ + s72 = -s72 ; + s120= -s120; + rad = -rad ; + + kspan = ks ; + nn = nt -inc ; + jc = ks/n ; + + /* sin , cos values are re-initialized each lim steps */ + + klim = 32*jc ; + i = 0; + jf = 0 ; + + if ( kt > 0 ) maxf = max ( nfac[kt-1] , nfac[m-kt-1] ); + else maxf = nfac[m-kt-1] ; + +} + + + +/*40*/ +/* this function is call as many time as dfftbi has determined factor for the size of the input vector + each time we call a transform function for each kind of factor , we begin by the smallest + factor are stored in nfac + */ + +static int factorTransform (void) +{ + + int retVal = 42; + + dr = 8 * (double)jc/(double)kspan ; + cd = 2 * sin(0.5*dr*rad)*sin(0.5*dr*rad); + sd = sin(dr*rad) ; + kk = 1 ; + i++ ; + + + + +switch ( nfac[i-1] ) + { + case 2 : + /*transform for factor of 2 (including rotation factor)*/ + + retVal = pre_fOf2Trans() ; + if ( retVal == 0 ) factorOf2Transform () ; + + break ; + + case 4 : + + kspnn = kspan ; + kspan = kspan >> 2 ; /*kspan /= 4 */ + + retVal = factorOf4Transform () ; + break ; + + case 3 : + + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + factorOf3Transform ( ) ; + break ; + + case 5 : + + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + factorOf5Transform ( ) ; + break ; + + default : + + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + if ( nfac[i-1] != jf) preFOtherTransform ( ) ; + + factorOfOtherTransform ( ) ; + break ; + } + + + + if ( retVal == 42 ) + { + if ( i != m) retVal = mulByRotationFactor ( ) ; + else retVal = 1 ; + } + + if ( retVal == 1 ) return 1 ; /*goto permute */ + else return 0 ; /*goto factor_transform => once again*/ + +} + +/* permutation for square factor of n */ +static void permute_stage1 (void) +{ + + int retVal = 1 ; + + pre_sqFactor2NormlOrder () ; + + if ( n == ntot ) + /*permutation for single-variate transform (optional code)*/ + while ( retVal == 1) + { + single_sqFactor2NormlOrder () ; + retVal = post_sqFactor2NormlOrder () ; + } + else + /*permutation for multivariate transform*/ + while ( retVal == 1) retVal = multi_sqFactor2NormlOrder (); + +} + +static void permute_stage2 (void) +{ + kspnn = np[kt] ; + + /*permutation for square-free facotrs of n */ + nonSqFactor2NormOrder () ; + + /*determine the permutation cycles of length greater than 1*/ + detPermutCycles (); + + j = k3 + 1; + nt -= kspnn ; + i = nt - inc + 1 ; + while ( nt >= 0 ) + { + reorderMatrix ( ) ; + + j = k3 + 1 ; + nt -= kspnn ; + i = nt - inc + 1 ; + } +} + +/***************************************** +Sous-Sous-Fonctions +******************************************/ + + + + + +static int pre_fOf2Trans (void) +{ + kspan /= 2; + k1 = kspan + 2 ; + /*50*/ + do{ + do{ + k2 = kk + kspan ; + ak = a[k2-1] ; + bk = b[k2-1] ; + + a[k2-1] = a[kk-1] - ak; + b[k2-1] = b[kk-1] - bk; + + a[kk-1] = a[kk-1] + ak; + b[kk-1] = b[kk-1] + bk; + + kk = k2 + kspan ; + }while (kk <= nn); + + kk -= nn ; + }while (kk <= jc); + + + if ( kk > kspan ) return 1 ; /*goto350*/ + else return 0 ; /*goto60*/ + + +} + + + +static int factorOf2Transform (void) +{ + do /*60*/ {/*while ( kk <= jc*2 )*/ + c1 = 1 - cd ; + s1 = sd ; + mm = min( k1/2 , klim); + + do/* do 80 */ {/*while ( kk <= mm || ( kk > mm && kk < k2 ))*/ + do {/*while(kk > k2) */ + do { /*while ( kk < nt )*/ + k2 = kk + kspan; + + ak = a[kk-1] - a[k2-1]; + bk = b[kk-1] - b[k2-1]; + + a[kk-1] = a[kk-1] + a[k2-1]; + b[kk-1] = b[kk-1] + b[k2-1]; + + a[k2-1] = c1*ak - s1*bk; + b[k2-1] = s1*ak + c1*bk; + + kk = k2 + kspan; + }while ( kk < nt ); + + k2 = kk - nt; + c1 = -c1; + kk = k1 - k2; + + + }while (kk > k2); + + kk += jc; + + if ( kk <= mm ) /* 70 */ + { + ak = c1 - ( cd*c1+sd*s1) ; + s1 += (sd*c1-cd*s1) ; + /*c the following three statements compensate for truncation + c error. if rounded arithmetic is used, substitute + c c1=ak*/ + c1 = 0.5/(ak*ak+s1*s1) + 0.5 ; + s1 *= c1 ; + c1 *= ak ; + } + else { + if ( kk < k2 ) /*90*/ { + s1 = dr*rad*((double)(kk-1)/(double)jc); + c1 = cos(s1) ; + s1 = sin(s1) ; + mm = min(k1/2,mm+klim); + } + } + + } while ( kk <= mm || ( kk > mm && kk < k2 )); + + k1 += (inc+inc) ; + kk = (k1-kspan)/2 + jc; + + } while ( kk <= jc*2 ); + + + return 0 ; /*goto40*/ +} + + +/* this one is just an optimisation of the factor of 2 transform , we compute more things each turn */ + +static int factorOf4Transform (void) +{ + int return_value = 0 ; + + /*120*/ + do + { + c1 = 1 ; + s1 = 0 ; + + mm = min ( kspan , klim ) ; + + do + { + f4t_150 () ; + return_value = f4t_170 () ; + } while ( return_value == 0 ); + + kk += ( inc - kspan ) ; + } while ( kk <= jc ) ; + + + + if ( kspan == jc ) + return 1 ; /*goto350*/ + else + return 0 ;/*goto40*/ + + +} + +/*this function and the following are just here for conveniance , they just do fourier transformation for factor of 4 + but as the code was a bit long in factorof4transform , we've created two sub-functions */ + +static void f4t_150 (void) +{ + + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + k3 = k2 + kspan ; + + akp = a[kk-1] + a[k2-1] ; + akm = a[kk-1] - a[k2-1] ; + + ajp = a[k1-1] + a[k3-1] ; + ajm = a[k1-1] - a[k3-1] ; + + a[kk-1] = akp + ajp ; + ajp = akp - ajp ; + + bkp = b[kk-1] + b[k2-1] ; + bkm = b[kk-1] - b[k2-1] ; + + bjp = b[k1-1] + b[k3-1] ; + bjm = b[k1-1] - b[k3-1] ; + + b[kk-1] = bkp + bjp ; + bjp = bkp - bjp ; + + akp = akm + bjm ; + akm = akm - bjm ; + + bkp = bkm - ajm ; + bkm = bkm + ajm ; + + if ( s1 == 0 )/*190*/ + { + a[k1-1] = akp ; + a[k2-1] = ajp ; + a[k3-1] = akm ; + + b[k1-1] = bkp ; + b[k2-1] = bjp ; + b[k3-1] = bkm ; + + + } + else /*160*/ + { + + a[k1-1] = akp*c1 - bkp*s1 ; + a[k2-1] = ajp*c2 - bjp*s2 ; + a[k3-1] = akm*c3 - bkm*s3 ; + + a[k1-1] = bkp*c1 + akp*s1 ; + a[k2-1] = bjp*c2 + ajp*s2 ; + a[k3-1] = bkm*c3 + akm*s3 ; + } + kk=k3+kspan; + }while ( kk <= nt ) ; + + +} + +static int f4t_170 (void) +{ + kk += ( jc - nt ) ; + + if ( kk <= mm ) + { + c2 = c1 - (cd*c1 + sd*s1); + s1 = s1 + (sd*c1 - cd*s1); + + /* + the following three statements compensate for truncation + error. if rounded arithmetic is used, substitute + c1=c2 + */ + + c1 = 0.5/(c2*c2+s1*s1) + 0.5 ; + s1 *= c1 ; + c1 *= c2 ; + + /*140*/ + + c2 = c1*c1 - s1*s1 ; + s2 = c1*s1*2 ; + c3 = c2*c1 - s2*s1 ; + s3 = c2*s1 + s2*c1 ; + + + return 0 ; + + } + else + { + if ( kk <= kspan ) + { + s1 = dr*rad * (kk-1)/jc ; + c1 = cos (s1) ; + s1 = sin (s1) ; + mm = min ( kspan , mm + klim ); + + /*140*/ + + c2 = c1*c1 - s1*s1 ; + s2 = c1*s1*2 ; + c3 = c2*c1 - s2*s1 ; + s3 = c2*s1 + s2*c1 ; + + return 0 ; + } + } + + return 1 ; +} + + + + +static void factorOf3Transform (void) +{ + do{ + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + + ak = a[kk-1] ; + bk = b[kk-1] ; + + aj = a[k1-1] + a[k2-1] ; + bj = b[k1-1] + b[k2-1] ; + + a[kk-1] = ak + aj ; + b[kk-1] = bk + bj ; + + ak = -0.5*aj + ak ; + bk = -0.5*bj + bk ; + + aj = (a[k1-1] - a[k2-1])*s120 ; + bj = (b[k1-1] - b[k2-1])*s120 ; + + a[k1-1] = ak - bj ; + b[k1-1] = bk + aj ; + a[k2-1] = ak + bj ; + b[k2-1] = bk - aj ; + + kk = k2 + kspan ; + } while (kk < nn); + + kk -= nn ; + }while (kk <= kspan); + +} + +static void factorOf5Transform (void) +{ + c2 = c72*c72 - s72 *s72 ; + s2 = 2 * c72*s72; + + do{ + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + k3 = k2 + kspan ; + k4 = k3 + kspan ; + + + + akp = a[k1-1] + a[k4-1] ; + akm = a[k1-1] - a[k4-1] ; + + bkp = b[k1-1] + b[k4-1] ; + bkm = b[k1-1] - b[k4-1] ; + + ajp = a[k2-1] + a[k3-1] ; + ajm = a[k2-1] - a[k3-1] ; + + bjp = b[k2-1] + b[k3-1] ; + bjm = b[k2-1] - b[k3-1] ; + + aa = a[kk-1] ; + bb = b[kk-1] ; + + a[kk-1] = aa + akp + ajp; + b[kk-1] = bb + bkp + bjp; + + ak = akp*c72 + ajp*c2 + aa ; + bk = bkp*c72 + bjp*c2 + bb ; + + aj = akm*s72 + ajm*s2 ; + bj = bkm*s72 + bjm*s2 ; + + a[k1-1] = ak - bj ; + a[k4-1] = ak + bj ; + b[k1-1] = bk + aj ; + b[k4-1] = bk - aj ; + + ak = akp*c2 + ajp*c72 + aa ; + bk = bkp*c2 + bjp*c72 + bb ; + + aj = akm*s2 - ajm*s72 ; + + bj = bkm*s2 - bjm*s72 ; + + a[k2-1] = ak - bj ; + a[k3-1] = ak + bj ; + b[k2-1] = bk + aj ; + b[k3-1] = bk - aj ; + + kk = k4 + kspan; + }while (kk < nn); + + kk -= nn ; + }while (kk <= kspan); +} + +/* this function is the general case of non factor of 2 factor , the factorof3transform and factorof5trandform are just +special case of this one */ + + +static void preFOtherTransform (void) +{ + + jf = k ; + s1 = (rad*8)/k ; + c1 = cos (s1) ; + s1 = sin (s1) ; + ck[jf-1] = 1 ; + sk[jf-1] = 0 ; + j = 1 ; + + do + { + ck[j-1] = ck[k-1] * c1 + sk[k-1]*s1 ; + sk[j-1] = ck[k-1] * s1 - sk[k-1]*c1 ; + + k -- ; + + ck[k-1] = ck[j-1] ; + sk[k-1] = - sk[j-1] ; + + j++ ; + + }while ( j < k ); + +} + +static void factorOfOtherTransform (void) +{ +int ktemp = 0 ; + +do + { + k1 = kk ; + k2 = kk + kspnn ; + + aa = a[kk-1] ; + bb = b[kk-1] ; + + ak = aa ; + bk = bb ; + j = 1 ; + k1 += kspan ; + + do + { + k2 -= kspan ; + j++ ; + + wt[j-1] = a[k1-1] + a[k2-1] ; + ak = wt[j-1] + ak ; + + bt[j-1] = b[k1-1] + b[k2-1] ; + bk = bt[j-1] + bk ; + j++ ; + + wt[j-1] = a[k1-1] - a[k2-1] ; + bt[j-1] = b[k1-1] - b[k2-1] ; + + k1 += kspan; + }while ( k1 < k2 ) ; + + a[kk-1] = ak ; + b[kk-1] = bk ; + + k1 = kk ; + k2 = kk + kspnn ; + j = 1 ; + + do + { + k1 += kspan ; + k2 -= kspan ; + jj = j ; + ak = aa ; + bk = bb ; + aj = 0 ; + bj = 0 ; + k = 1 ; + + do + { + k++ ; + ak += ( wt[k-1] * ck[jj-1] ) ; + bk += ( bt[k-1] * ck[jj-1] ) ; + + k++ ; + aj += (wt[k-1] * sk[jj-1]) ; + bj += (bt[k-1] * sk[jj-1]) ; + jj += j ; + + if ( jj > jf ) + jj -= jf ; + } while ( k < jf ) ; + + k = jf - j ; + a[k1-1] = ak - bj ; + b[k1-1] = bk + aj ; + a[k2-1] = ak + bj ; + b[k2-1] = bk - aj ; + + j++ ; + + }while ( j < k ) ; + + + + + + kk += kspnn ; + ktemp = kk ; + + if ( kk > nn ) + { + kk -= nn; + } + +}while ( ktemp <= nn || (kk <= kspan && ( ktemp > nn)) ); +} + + + + +static int mulByRotationFactor (void ) +{ + int ktemp = 0 ; + + if ( i != m ) + { + kk = jc + 1 ; + + /*300*/ + do + { + c2 = 1 - cd ; + s1 = sd ; + + mm = min ( kspan , klim ) ; + + /*320 */ + do + { + + c1 = c2 ; + s2 = s1 ; + kk += kspan ; + + do + { + + ak = a[kk-1] ; + a[kk-1] = c2*ak - s2*b[kk-1] ; + b[kk-1] = s2*ak + c2*b[kk-1] ; + + kk += kspnn ; + ktemp = kk ; + + + if ( kk > nt ) + { + ak = s1*s2 ; + s2 = s1*c2 + s2*c1 ; + c2 = c1*c2 - ak ; + kk += (kspan - nt ) ; + + + + } + + }while (ktemp <= nt || ( kk <= kspnn && ktemp > nt )) ; + + kk += ( jc - kspnn ); + + + if ( kk <= mm ) + { + + /* 310*/ + c2 = c1 - ( cd*c1 + sd*s1 ) ; + s1 += (sd*c1 - cd*s1 ) ; + + /* + the following three statements compensate for truncation + error. if rounded arithmetic is used, substitute + c1=c2 + */ + + c1 = 0.5/(c2*c2+s1*s1) + 0.5 ; + s1 *= c1 ; + c2 *= c1 ; + } + else + { + if ( kk <= kspan ) + { + + s1 = dr*rad * (kk-1)/jc ; + c2 = cos (s1) ; + s1 = sin (s1) ; + mm = min ( kspan , mm + klim ); + } + } + + }while ( kk <= mm ||( kk <= kspan && kk > mm ) ) ; + + kk += (jc + inc -kspan ); + + + }while ( kk <= jc+jc); + + + return 0 ; /* goto40 */ + } + + return 1 ; /* goto350*/ +} + + + + +static void pre_sqFactor2NormlOrder (void) +{ + + k = kt + kt + 1 ; + + if ( m < k ) + k -- ; + + j = 1 ; + np[k] = jc ; + + do + { + np[j] = np[j-1]/nfac[j-1] ; + np[k-1] = np[k]*nfac[j-1] ; + + j++ ; + k-- ; + }while ( j < k ) ; + + k3 = np[k] ; + kspan = np[1] ; + kk = jc + 1 ; + k2 = kspan + 1 ; + j = 1; + + +} + +static int post_sqFactor2NormlOrder (void) +{ + + do + { + do + { + k2 -= np[j-1] ; + j++ ; + k2 += np[j] ; + + } while ( k2 > np[j-1]); + + j = 1 ; + +/* 390 */ + do + { + if ( kk < k2 ) + { + + + return 1 ; + } + else + { + kk += inc ; + k2 += kspan ; + } + }while( k2 < ks ); + + }while ( kk < ks ) ; + + jc = k3 ; + + return 0; +} + + +/* appeler cetter fonction dans un do while valeur_retour != 1)*/ +static void single_sqFactor2NormlOrder (void) +{ + + + do + { + + ak = a[kk-1] ; + a[kk-1] = a[k2-1] ; + a[k2-1] = ak ; + + bk = b[kk-1] ; + b[kk-1] = b[k2-1] ; + b[k2-1] = bk ; + + kk += inc ; + k2 += kspan ; + } while ( k2 < ks ); + + /*380*/ +} + +/*idem que single_ */ +static int multi_sqFactor2NormlOrder (void) +{ + + + + k = kk + jc ; + + do /*410*/ + { + ak = a[kk-1] ; + a[kk-1] = a[k2-1] ; + a[k2-1] = ak ; + bk = b[kk-1] ; + b[kk-1] = b[k2-1] ; + b[k2-1] = bk ; + kk += inc ; + k2 += kspan ; + } while ( kk < k ); + + kk += (ks - jc ) ; + k2 += (ks - jc ) ; + + if ( kk < nt ) + return 1 ; + + k2 += ( kspan - nt ); + kk += ( jc - nt ); + + if ( k2 < ks ) + { + + return 1 ; + } + if( post_sqFactor2NormlOrder ( ) == 1 ) + { + + return 1 ; + } + jc = k3 ; + + return 0; + +} + + + +static void nonSqFactor2NormOrder (void) +{ + + j = m - kt ; + nfac[j] = 1 ; + + + + do + { + nfac[j-1] *= nfac[j] ; + + j-- ; + + + }while ( j != kt ) ; + + kt ++ ; + nn = nfac[kt-1] - 1; + + jj = 0 ; + j = 0; + + /*480*/ + + k2 = nfac[kt-1] ; + k = kt + 1 ; + kk = nfac[k-1] ; + j ++ ; + + while ( j <= nn ) + { + jj += kk ; + + + while ( jj >= k2 ) + { + jj -= k2 ; + k2 = kk ; + k++ ; + kk = nfac[k-1] ; + + jj += kk ; + + + } + + np[j-1] = jj ; + k2 = nfac[kt-1] ; + k = kt + 1 ; + kk = nfac[k-1] ; + j ++ ; + + } + + j = 0 ; + + return ; +} + +/* here we determine how many permutation cycles we need to do */ +static void detPermutCycles (void) +{ + + do + { + do + { + j++ ; + + kk = np[j-1] ; + }while ( kk < 0 ) ; + + + if ( kk != j ) + { + do + { + + k = kk ; + kk = np[k-1] ; + np[k-1] = -kk ; + }while ( kk != j ) ; + k3 = kk ; + } + else + np[j-1] = -j ; + }while ( j != nn ); + + maxf *= inc ; + + return ; +} + +static void reorderMatrix (void) +{ +do + { + do + { + j-- ; + + }while (np[j-1] < 0 ) ; + + jj = jc ; + + /*520*/ + do + { + kspan = jj ; + + if ( jj > maxf ) + kspan = maxf ; + + jj -= kspan ; + k = np [j-1]; + kk = jc*k + i + jj ; + k1 = kk + kspan ; + k2 = 0 ; + + do /*530*/ + { + k2 ++ ; + wt[k2-1] = a[k1-1] ; + bt[k2-1] = b[k1-1] ; + k1 -= inc ; + + }while ( k1 != kk ); + + do + { + k1 = kk + kspan ; + k2 = k1 - jc * (k + np[k-1]); + k = -np[k-1]; + + + do + { + a[k1-1] = a[k2-1] ; + b[k1-1] = b[k2-1] ; + + k1 -= inc ; + k2 -= inc ; + + }while ( k1 != kk ) ; + + kk = k2 ; + + }while ( k != j ); + + k1 = kk +kspan ; + k2 = 0 ; + /*560*/ + + do + { + k2 ++ ; + a[k1-1] = wt[k2-1] ; + b[k1-1] = bt[k2-1] ; + k1 -= inc ; + + + }while ( k1 != kk ) ; + + } while ( jj != 0 ) ; +}while ( j != 1 ) ; + + return ; +} + + diff --git a/2.3-1/src/c/signalProcessing/fft/fft842.c b/2.3-1/src/c/signalProcessing/fft/fft842.c new file mode 100644 index 00000000..162490fe --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/fft842.c @@ -0,0 +1,173 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "fft_internal.h" + + + +/* get binary log of integer argument; exact if n a power of 2 */ +static int fastlog2( int n) +{ + int log = -1; + while(n) { + log++; + n >>= 1; + } + return(log); +} + + + +void fft842 (doubleComplex* b, int size , int in) +{ + double fn; + doubleComplex temp ; + + int L[16],L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15; + int j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14; + int i = 0, j, ij, ji, ij1, ji1; + int n2pow, n8pow, nthpo, ipass, nxtlt, lengt; + + n2pow = fastlog2( size ); + nthpo = size ; + fn = 1.0 / (double)nthpo; + + + if(in==FORWARD) + /* take conjugate */ + for(i=0;i< size ;i++) + { + b[i] = DoubleComplex ( zreals( b[i]) , - zimags (b[i])); + } + + + + n8pow = n2pow/3; + + if(n8pow) + { + /* if the size if a factor of a power of 8 we call r8tx */ + /* radix 8 iterations */ + for(ipass=1;ipass<=n8pow;ipass++) + { + nxtlt = 0x1 << (n2pow - 3*ipass); + lengt = 8*nxtlt; + + + + r8tx(nxtlt,nthpo,lengt, + b,b+nxtlt,b+2*nxtlt, + b+3*nxtlt,b+4*nxtlt,b+5*nxtlt, + b+6*nxtlt,b+7*nxtlt); + + + } + } + +/* if the size can be written this way 2^(3*n + 1) , then we call the radix 2 function + if can be written this way 2^(3*n + 1) the we call the radix 4 function */ + + if(n2pow%3 == 1) + { + /* radix 2 iteration needed */ + r2tx(nthpo,b,b+1); + } + + if(n2pow%3 == 2) + { + /* radix 4 iteration needed */ + + r4tx(nthpo,b,b+1,b+2,b+3); + } + + + + for(j=1;j<=15;j++) + { + L[j] = 1; + if(j-n2pow <= 0) L[j] = 0x1 << (n2pow + 1 - j); + } + /* this part can maybe be improved */ + + L15=L[1];L14=L[2];L13=L[3];L12=L[4];L11=L[5];L10=L[6];L9=L[7]; + L8=L[8];L7=L[9];L6=L[10];L5=L[11];L4=L[12];L3=L[13];L2=L[14];L1=L[15]; + + ij = 1; + +/* all the following instruction is to unscramble the output */ + for(j1=1;j1<=L1;j1++) + for(j2=j1;j2<=L2;j2+=L1) + for(j3=j2;j3<=L3;j3+=L2) + for(j4=j3;j4<=L4;j4+=L3) + for(j5=j4;j5<=L5;j5+=L4) + for(j6=j5;j6<=L6;j6+=L5) + for(j7=j6;j7<=L7;j7+=L6) + for(j8=j7;j8<=L8;j8+=L7) + for(j9=j8;j9<=L9;j9+=L8) + for(j10=j9;j10<=L10;j10+=L9) + for(j11=j10;j11<=L11;j11+=L10) + for(j12=j11;j12<=L12;j12+=L11) + for(j13=j12;j13<=L13;j13+=L12) + for(j14=j13;j14<=L14;j14+=L13) + for(ji=j14;ji<=L15;ji+=L14) + + { + ij1 = ij-1; + ji1 = ji-1; + + if(ij-ji<0) + { + temp = b[ij1]; + b[ij1] = b[ji1]; + b[ji1] = temp; + + /* + r = b[ij1].re; + b[ij1].re = b[ji1].re; + b[ji1].re = r; + fi = b[ij1].im; + b[ij1].im = b[ji1].im; + b[ji1].im = fi; + */ + } + ij++; + } + + if(in==FORWARD) /* take conjugates & unscramble outputs */ + for(i=0,j=size/2;j + + + +/* +** radix 8 iteration subroutine +*/ + +/* this function do in one turn the same computation that do radix 2 in three turns */ + +void r8tx ( int nxtlt,int nthpo,int lengt, + doubleComplex* cc0,doubleComplex* cc1,doubleComplex* cc2,doubleComplex* cc3, + doubleComplex* cc4,doubleComplex* cc5,doubleComplex* cc6,doubleComplex* cc7) + +{ + + + int j , kk; + double dblP7 = 1 / sqrt(2.0) ; + double dblPi2 = 8 * atan(1.0); + + double scale, arg; + double c1,c2,c3,c4,c5,c6,c7; + double s1,s2,s3,s4,s5,s6,s7; + + doubleComplex Atemp0,Atemp1,Atemp2,Atemp3,Atemp4,Atemp5,Atemp6,Atemp7; + doubleComplex Btemp0,Btemp1,Btemp2,Btemp3,Btemp4,Btemp5,Btemp6,Btemp7; + + doubleComplex temp ; + + + scale = dblPi2/lengt; + + + for(j=0;j0) + { + cc1[kk] = DoubleComplex ( (c4 * (zreals(Btemp0) - zreals(Btemp1))) - (s4 * (zimags(Btemp0) - zimags(Btemp1))), + c4 * (zimags(Btemp0) - zimags(Btemp1)) + s4 * (zreals(Btemp0) - zreals(Btemp1))); + + cc2[kk] = DoubleComplex ( c2 * (zreals(Btemp2) - zimags(Btemp3)) - s2 * (zimags(Btemp2) + zreals(Btemp3)) , + c2 * (zimags(Btemp2) + zreals(Btemp3)) + s2 * (zreals(Btemp2) - zimags(Btemp3))); + + cc3[kk] = DoubleComplex ( c6 * (zreals(Btemp2) + zimags(Btemp3)) - s6 * (zimags(Btemp2) - zreals(Btemp3)) , + c6 * (zimags(Btemp2) - zreals(Btemp3)) + s6 * (zreals(Btemp2) + zimags(Btemp3))); + + + temp = DoubleComplex ( dblP7*(zreals ( Btemp5 ) - zimags( Btemp5 )) , + dblP7*(zreals ( Btemp5 ) + zimags( Btemp5 )) ); + + cc4[kk] = DoubleComplex ( c1 * (zreals (Btemp4) + zreals(temp)) - s1 * (zimags (Btemp4) + zimags(temp)) , + c1 * (zimags (Btemp4) + zimags(temp)) + s1 * (zreals (Btemp4) + zreals(temp))); + cc5[kk] = DoubleComplex ( c5 * (zreals (Btemp4) - zreals(temp)) - s5 * (zimags (Btemp4) - zimags(temp)) , + c5 * (zimags (Btemp4) - zimags(temp)) + s5 * (zreals (Btemp4) - zreals(temp))); + + + temp = DoubleComplex ( - dblP7*(zreals ( Btemp7 ) + zimags( Btemp7 )) , + dblP7*(zreals ( Btemp7 ) - zimags( Btemp7 )) ); + + cc6[kk] = DoubleComplex ( c3 * (zreals (Btemp6) + zreals(temp)) - s3 * (zimags (Btemp6) + zimags(temp)) , + c3 * (zimags (Btemp6) + zimags(temp)) + s3 * (zreals (Btemp6) + zreals(temp))); + cc7[kk] = DoubleComplex ( c7 * (zreals (Btemp6) - zreals(temp)) - s7 * (zimags (Btemp6) - zimags(temp)) , + c7 * (zimags (Btemp6) - zimags(temp)) + s7 * (zreals (Btemp6) - zreals(temp))); + + + + + } + else + { + cc1[kk] = zdiffs ( Btemp0 , Btemp1 ); + + cc2[kk] = DoubleComplex ( zreals ( Btemp2 ) - zimags( Btemp3 ) , + zimags ( Btemp2 ) + zreals( Btemp3 ) ); + + + cc3[kk] = DoubleComplex ( zreals ( Btemp2 ) + zimags( Btemp3 ) , + zimags ( Btemp2 ) - zreals( Btemp3 ) ); + + + temp = DoubleComplex ( dblP7*(zreals ( Btemp5 ) - zimags( Btemp5 )) , + dblP7*(zreals ( Btemp5 ) + zimags( Btemp5 )) ); + + cc4[kk] = zadds ( Btemp4 , temp ); + cc5[kk] = zdiffs ( Btemp4 , temp ); + + temp = DoubleComplex ( - dblP7*(zreals ( Btemp7 ) + zimags( Btemp7 )) , + dblP7*(zreals ( Btemp7 ) - zimags( Btemp7 )) ); + + cc6[kk] = zadds ( Btemp6 , temp ); + cc7[kk] = zdiffs ( Btemp6 , temp ); + + + } + + } + } + + +} diff --git a/2.3-1/src/c/signalProcessing/fft/sfftma.c b/2.3-1/src/c/signalProcessing/fft/sfftma.c new file mode 100644 index 00000000..d4e145b5 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/sfftma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "fft.h" +#include "zeros.h" + +void sfftma ( float* in , int rows, int cols, float* out){ + float* ZEROS; + floatComplex* inCpx; + floatComplex* outCpx; + + ZEROS = (float*) malloc((unsigned int)(rows*cols)*sizeof(float)); + outCpx = (floatComplex*) malloc((unsigned int)(rows*cols)*sizeof(floatComplex)); + + szerosa(ZEROS,rows,cols); + inCpx=FloatComplexMatrix(in,ZEROS,rows*cols); + + cfftma(inCpx,rows,cols,outCpx); + + creala(outCpx, rows*cols, out); + + free(ZEROS); + free(outCpx); +} diff --git a/2.3-1/src/c/signalProcessing/fft/testDoubleFft.c b/2.3-1/src/c/signalProcessing/fft/testDoubleFft.c new file mode 100644 index 00000000..68bc431b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/testDoubleFft.c @@ -0,0 +1,470 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "fft.h" + + +#define ROW 1 +#define COLS2 2 +#define COLS3 3 +#define COLS4 4 +#define COLS5 5 +#define COLS6 6 +#define COLS7 7 +#define COLS8 8 +#define COLS9 9 +#define COLS10 10 +#define COLS11 11 +#define COLS12 12 +#define COLS13 13 +#define COLS14 14 +#define COLS15 15 +#define COLS16 16 +#define COLS32 32 + +#define ZREAL_IN2 { 0.00022113462910056 , 0.33032709173858166 } +#define ZIMAG_IN2 { 0.66538110421970487 , 0.62839178834110498 } + +#define ZREAL_IN3 { 2.48206677380949259, 0.43537130765616894, 0.97385666053742170} +#define ZIMAG_IN3 { 2.14807060454040766,- 0.78285905346274376, 0.42632796149700880} + + +#define ZREAL_IN4 { 0.84974523587152362, 0.68573101982474327, 0.87821648130193353, 0.06837403681129217} +#define ZIMAG_IN4 { 0.56084860628470778, 0.66235693730413914, 0.72635067673400044, 0.19851438421756029} + +#define ZREAL_IN5 { 0.84974523587152362, 0.68573101982474327, 0.87821648130193353, 0.06837403681129217,\ + 0.65251349471509457} +#define ZIMAG_IN5 { 0.56084860628470778, 0.66235693730413914, 0.72635067673400044, 0.19851438421756029,\ + 0.56642488157376647} + +#define ZREAL_IN6 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.65251349471509457, 0.30760907428339124 } +#define ZIMAG_IN6 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.56642488157376647, 0.59350947011262178 } + +#define ZREAL_IN7 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.65251349471509457, 0.88338878145441413, 0.30760907428339124 } +#define ZIMAG_IN7 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.40948254754766822, 0.56642488157376647, 0.59350947011262178 } + + + +#define ZREAL_IN8 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.88338878145441413, 0.65251349471509457, 0.30760907428339124, 0.93296162132173777 } +#define ZIMAG_IN8 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.56642488157376647, 0.48264719732105732, 0.33217189135029912, 0.59350947011262178} + + +#define ZREAL_IN9 { 0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.30760907428339124, 0.93296162132173777, 0.21460078610107303, 0.31264199689030647,\ + 0.43685875833034515} +#define ZIMAG_IN9 { 0.26931248093023896, 0.63257448654621840, 0.40519540151581168, 0.91847078315913677,\ + 0.28064980218186975, 0.12800584640353918, 0.77831285959109664, 0.21190304495394230,\ + 0.68568959552794695} + + +#define ZREAL_IN10 { 0.21646326314657927, 0.65251349471509457, 0.63257448654621840, 0.31264199689030647,\ + 0.93296162132173777, 0.31264199689030647, 0.48185089323669672, 0.48264719732105732,\ + 0.2922266637906432 , 0.48264719732105732 } +#define ZIMAG_IN10 { 0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.11383596854284406, 0.19983377400785685, 0.56186607433483005, 0.58961773291230202,\ + 0.23122371966019273, 0.21646326314657927} +/* +#define ZREAL_IN10 { 1,2,3,4,5,6,7,8,9,10 } + + +#define ZIMAG_IN10 { 1,2,3,4,5,6,7,8,9,10 } +*/ + + + + +#define ZREAL_IN11 {0.49934938363730907,0.26385784195736051,0.52535630855709314,0.53762298030778766,\ + 0.11999255046248436,0.2256303490139544 ,0.62740930821746588,0.76084325974807143,\ + 0.04855662025511265,0.67239497276023030,0.20171726960688829 } + +#define ZIMAG_IN11 {0.39115739194676280,0.83003165572881699,0.58787201577797532,0.48291792999953032,\ + 0.22328650346025825,0.84008856676518917,0.12059959070757031,0.28553641680628061,\ + 0.86075146449729800,0.84941016510128975,0.52570608118548989} + + +#define ZREAL_IN12 {0.75604385416954756,0.00022113462910056,0.33032709173858166,0.66538110421970487,\ + 0.62839178834110498,0.84974523587152362,0.68573101982474327,0.87821648130193353,\ + 0.06837403681129217,0.56084860628470778,0.66235693730413914,0.72635067673400044} + +#define ZIMAG_IN12 {0.19851438421756029,0.54425731627270579,0.23207478970289230,0.23122371966019273,\ + 0.21646326314657927,0.88338878145441413,0.65251349471509457,0.30760907428339124,\ + 0.93296162132173777,0.21460078610107303,0.31264199689030647,0.36163610080257058} + + +#define ZREAL_IN13 {0.2922266637906432 ,0.56642488157376647,0.48264719732105732,0.33217189135029912,\ + 0.59350947011262178,0.50153415976092219,0.43685875833034515,0.26931248093023896,\ + 0.63257448654621840,0.40519540151581168,0.91847078315913677,0.04373343335464597,\ + 0.48185089323669672} + + + +#define ZIMAG_IN13 {0.26395560009405017,0.41481037065386772,0.28064980218186975,0.12800584640353918,\ + 0.77831285959109664,0.21190304495394230,0.11213546665385365,0.68568959552794695,\ + 0.15312166837975383,0.69708506017923355,0.84155184263363481,0.40620247554033995,\ + 0.40948254754766822} + + + +#define ZREAL_IN14 {0.87841258011758327,0.11383596854284406,0.19983377400785685,0.56186607433483005,\ + 0.58961773291230202,0.68539796629920602,0.89062247332185507,0.50422128057107329,\ + 0.34936154074966908,0.38737787725403905,0.92228986788541079,0.94881842611357570,\ + 0.34353372454643250,0.37601187312975526} + +#define ZIMAG_IN14 {0.73409405630081892,0.26157614728435874,0.49934938363730907,0.26385784195736051,\ + 0.52535630855709314,0.53762298030778766,0.11999255046248436,0.2256303490139544 ,\ + 0.62740930821746588,0.76084325974807143,0.04855662025511265,0.67239497276023030,\ + 0.20171726960688829,0.39115739194676280} + +#define ZREAL_IN15 {0.83003165572881699,0.58787201577797532,0.48291792999953032,0.22328650346025825,\ + 0.84008856676518917,0.12059959070757031,0.28553641680628061,0.86075146449729800,\ + 0.84941016510128975,0.52570608118548989,0.99312098976224661,0.64885628735646605,\ + 0.99231909401714802,0.05004197778180242,0.74855065811425447} + +#define ZIMAG_IN15 {0.41040589986369014,0.60845263302326202,0.85442108893766999,0.06426467280834913,\ + 0.82790829380974174,0.92623437754809856,0.56672112690284848,0.57116389367729425,\ + 0.81601104838773608,0.05689279362559319,0.55959366867318749,0.12493403162807226,\ + 0.72792222863063216,0.26777664758265018,0.54653349192813039} + + + +#define ZREAL_IN16 {0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.30760907428339124, 0.93296162132173777, 0.21460078610107303, 0.31264199689030647,\ + 0.36163610080257058, 0.2922266637906432 , 0.56642488157376647, 0.48264719732105732,\ + 0.33217189135029912, 0.59350947011262178, 0.50153415976092219, 0.43685875833034515} +#define ZIMAG_IN16 {0.26931248093023896, 0.63257448654621840, 0.40519540151581168, 0.91847078315913677,\ + 0.04373343335464597, 0.48185089323669672, 0.26395560009405017, 0.41481037065386772,\ + 0.28064980218186975, 0.12800584640353918, 0.77831285959109664, 0.21190304495394230,\ + 0.11213546665385365, 0.68568959552794695, 0.15312166837975383, 0.69708506017923355} + + +#define ZREAL_IN32 {0.21132486546412110,0.75604385416954756,0.00022113462910056,0.33032709173858166,\ + 0.66538110421970487,0.62839178834110498,0.84974523587152362,0.68573101982474327,\ + 0.87821648130193353,0.06837403681129217,0.56084860628470778,0.66235693730413914,\ + 0.72635067673400044,0.19851438421756029,0.54425731627270579,0.23207478970289230,\ + 0.23122371966019273,0.21646326314657927,0.88338878145441413,0.65251349471509457,\ + 0.30760907428339124,0.93296162132173777,0.21460078610107303,0.31264199689030647,\ + 0.36163610080257058,0.2922266637906432 ,0.56642488157376647,0.48264719732105732,\ + 0.33217189135029912,0.59350947011262178,0.50153415976092219,0.43685875833034515} + +#define ZIMAG_IN32 {0.26931248093023896,0.63257448654621840,0.40519540151581168,0.91847078315913677,\ + 0.04373343335464597,0.48185089323669672,0.26395560009405017,0.41481037065386772,\ + 0.28064980218186975,0.12800584640353918,0.77831285959109664,0.21190304495394230,\ + 0.11213546665385365,0.68568959552794695,0.15312166837975383,0.69708506017923355,\ + 0.84155184263363481,0.40620247554033995,0.40948254754766822,0.87841258011758327,\ + 0.11383596854284406,0.19983377400785685,0.56186607433483005,0.58961773291230202,\ + 0.68539796629920602,0.89062247332185507,0.50422128057107329,0.34936154074966908,\ + 0.38737787725403905,0.92228986788541079,0.94881842611357570,0.34353372454643250} + + + + +#define ZREAL_RESULT2 { 0.33054822636768222,- 0.33010595710948110} +#define ZIMAG_RESULT2 { 1.29377289256080985, 0.03698931587859988} + +#define ZREAL_RESULT3 { 3.8912947420030832 , 0.73026611683127762, 2.82463946259411713} +#define ZIMAG_RESULT3 { 1.79153951257467270, 2.79267814568426775, 1.85999415536228230} + +#define ZREAL_RESULT4 { 2.48206677380949259, 0.43537130765616894, 0.97385666053742170, -0.49231379851698875} +#define ZIMAG_RESULT4 { 2.14807060454040766,- 0.78285905346274376, 0.42632796149700880, 0.45185491256415844} + +#define ZREAL_RESULT5 { 3.13458026852458715, 0.8989689127154592 ,-0.38601946016350575, 0.50520993574533923,\ + 0.09598652253573875} +#define ZIMAG_RESULT5 { 2.71449548611417413,-0.31527367037930898, 0.60322341639929178,-0.89813890885693670,\ + 0.69993670814631914} + +#define ZREAL_RESULT6 { 2.18414165778085589,-0.26482327553354379,-0.01687604011087318, 0.67184740351513028,\ + 0.11489612058787246, 0.57635803139679309 } +#define ZIMAG_RESULT6 { +2.34103989927098155,+0.34168162147929737,-0.70971181304669773,-0.05571636231616137,\ + -0.11084573654913504,-0.51884289223184654 } + + + + +#define ZREAL_RESULT7 { 3.06753043923527002,-0.62032167153569062,-0.13156333379499591, 0.48353341667797933,\ + 0.63567251139259018, 0.05503001802946385, 0.31991983390432432} +#define ZIMAG_RESULT7 { 2.75052244681864977, 0.82490994311348309,-0.93592353228518299,-0.23131444371235776,\ + -0.12732936894919694, 0.16455873200809046,-0.94321827428597393} + + + +#define ZREAL_RESULT8 { 4.00049206055700779,-0.43357241280891956, 0.79836636409163475,-0.91119240848798977,\ + -0.06753427721560001,-0.18576209864995416, 0.97926024347543716, 0.17400105922003017} +#define ZIMAG_RESULT8 { 3.15585898794233799, 0.62132445165622818, 0.35205427557229996, 0.28289917172258683,\ + -0.20619166828691959,-1.17220193335521805,-0.17761892452836037,-1.13931807191437073 } + +#define ZREAL_RESULT9 { 4.18826149590313435,-0.33012457237426968,-0.46815050871925312,-0.52782532864173848,\ + 0.14402327100125287, 0.48673726656350014,-0.36542216583231485,-0.05675799381585508,\ + -0.98972798714272159} +#define ZIMAG_RESULT9 { 4.31011430080980062,-0.43185186999958014,-0.61788469590268758, 2.02080753944191294,\ + -1.82700213292318292,-0.72130831941965079,-0.43263346921029644,-0.61611460931125561,\ + 0.73968558488709069 } + + +#define ZREAL_RESULT10 { 4.7991688111796975 , 0.13431735180709442, 0.69797375124916528,-0.96094309976899528,\ + -1.299412169815219 , 0.31298504490405327,-0.70524633213128674, 0.73186521665562432,\ + -0.84695776029792746,-0.69911818231641265} +#define ZIMAG_RESULT10 { +3.8964297915808856 ,-0.73143162523007543,-1.16550179795884423,-0.28088284236709465,\ + +0.91311790128897607,+0.14664673572406173,-0.38825389263472715,+0.70003588825710683,\ + -1.10050453393604197,+0.32258157187768072} + +#define ZREAL_RESULT11 { 4.48273084452375770,-0.38185469421558837,-0.20352646397260507, 0.93844897170676500,\ + -0.36107014581234886, 1.63127126429331426, 0.21051283071884830, 0.41375037345506283,\ + -1.51895083986003510, 0.07998126975880851, 0.20154980941442344} + +#define ZIMAG_RESULT11 {+5.99735778197646141,+0.89612320628808262,-1.19950115725534112,+0.16831729582097132,\ + -0.30180616479381106,-1.1576712540107854 ,+0.14605414615044232,+0.98186675096176135,\ + -1.81578488007792282,+0.11882005651954808,+0.46895552983498812} + +#define ZREAL_RESULT12 { 6.81198796723037958,-0.94341279444120363, 0.80833429094732012, 0.51617261953651883,\ + -0.2952048802069408 , 2.17160345678053313,-0.54953851085156202,-0.00060138915045171,\ + 1.48723066647267177,-0.96738335862755753, 0.38783971037387632,-0.35450152802901336} + +#define ZIMAG_RESULT12 {+5.08788532856851816,-0.92793626853655098,+1.98330386259771707,+1.00984227284789085,\ + -0.76701015963174557,-0.03923425866831987,+0.00245377141982317,-0.97965668697496155,\ + -0.43031801485501076,-0.70842429809272289,-0.77014751450337293,-1.07858542356054099} + + +#define ZREAL_RESULT13 { 5.95651050098240376,-1.05002118208049122,-0.62824400440218664, 0.73670329745244079,\ + 1.01270235903781081,-0.97652276217739442,-0.80139420917945892,-1.08927100387059594,\ + 1.10768757452252697,-0.90416530058905542, 0.19128270229571837,-0.36935459470156029,\ + 0.61303325198820890} + +#define ZIMAG_RESULT13 {+5.38290618034079671,-0.01795106539414900,-1.0736822056133133 ,-0.38375436766279453,\ + +0.45177555081294796,-0.42204321578379422,+1.167268002300917 ,-0.8654330910349184 ,\ + -1.80135467250416070,+0.73358402770681042,+0.92212767526074568,-0.53962030646712056,\ + -0.12239971073931022} + +#define ZREAL_RESULT14 { 7.75120115978643298,-0.78366539551591063,-0.20265674140819168, 0.04290246165533468,\ + 2.26072777524451896, 0.41764276367067404,-0.94725360360479638, 0.59614222729578614,\ + 1.2655897771348088 , 1.49954927048727082, 0.59161337187577756, 1.32712418977692859,\ + -1.04078471420795249,-0.48035642054451416} + + +#define ZIMAG_RESULT14 {+5.86955844005569816,+0.59116535878306964,+1.10949301280070478,-0.10194863149531888,\ + +0.33742089533324454,+1.27136622217475770,+0.66505772083419801,-0.35660744598135352,\ + +0.55272403261244618,+0.78239239747489764,-0.76097885152655409,+1.7013910918422144 ,\ + -1.05520441290632339,-0.32851304179021534} + +#define ZREAL_RESULT15 { 9.03908939706161618, 0.83695739793685675,-0.1247585940626968 , 0.73554494173292662,\ + 2.89255624599792061,-0.60942096648213817,-0.96289916352621108,-2.01148115975842146,\ + 1.08671310762523987, 1.10385593717105923, 0.14097082301450437, 0.77951939204949339,\ + -0.19682993144621974, 1.09445436001472118,-1.35379695139639411} + +#define ZIMAG_RESULT15 {+7.929235897026956 ,+0.93665405708769556,-0.58867096407810116,-0.08075001529554950,\ + +0.05154837779444588,-1.64233407065738146,+2.20857407200866884,+0.92685932199933529,\ + -1.71222943015973872,-0.79519673795720203,-0.80828166087623532,-0.07547063282874045,\ + +0.21930651464200918,+1.00880777239444086,-1.42196400314524918} + + + +#define ZREAL_RESULT16 { 7.31841186061501503, 0.57213963313411265,-0.54757095809921363,-0.48628670926159856,\ + -1.24745626002550125,-0.60260425121772254,-0.09566750389725764, 1.12013387649474438,\ + -0.52123307064175606,-0.4866536676629296 , 1.98659065302356819,-0.8626986211125984 ,\ + -0.61915938556194305,-0.27813937201980266,-1.53103677171080510,-0.01918993749322817} +#define ZIMAG_RESULT16 { 6.47680679336190224, 0.33111151130330035,-0.19343861330849654, 0.12474172265893407,\ + -1.0452539175748825 , 1.29632487527975693, 1.87557979276701658,-1.82623636350346352,\ + -1.86397336795926094,-1.03154071610913434,-0.48573205481665604, 0.44539904220706855,\ + -0.74425477534532547,-0.54299368721281471, 0.37996440777257234, 1.11249504536330601} + +#define ZREAL_RESULT32 { 15.3165711835026741,-1.79021577127059173,-1.66659611407065089, 0.17525916470909797,\ + -1.16958628014871602, 0.58684741669397522, 0.03947542161511042, 0.99740008842981942,\ + -0.46323241293430328, 2.122539701124051 ,-1.52963914564883940, 0.87990417229605744,\ + 0.58569127383151542,-0.18198535589432135, 0.26043384746900655,-1.11204765363415392,\ + 0.35329844802618027,-1.47568616310628631,-2.03487116744967844,-3.19495610958970166,\ + 0.81026376203844086,-0.46366666776372734,-1.63150209835186510, 0.77334707088593369,\ + -0.35098156332969666,-1.63498270669406387, 0.67411467120679691, 2.80538085483913147,\ + -1.62281507315555107,-0.5600265995962992 ,-0.48984739061140237, 1.75450689143393301} + + + +#define ZIMAG_RESULT32 { 15.509232945740223 ,-0.47962381296807621, 0.21213951866464975, 0.88442937061831350,\ + 1.52924554070524898,-0.6313403060045536 ,-2.25908603874729419,-1.3836292677373856 ,\ + -1.18231281638145447,-2.14767090006699668, 1.5452016553381984 ,-3.15355126536920993,\ + 2.10199273301496747, 0.67530605269461363,-2.03603600735261558, 1.2309547869577584 ,\ + -1.9912955537438393 ,-1.9668221895811833 , 0.29575245179739662, 1.34815224953105273,\ + 1.508921339902356 ,-0.40084285801706099, 2.96716476331614754, 1.08125713762201059,\ + -1.39964522421360016,-1.30777696073860294,-1.13169784714423916,-2.00872755010475013,\ + 0.53915777133569487,-2.45178696294021004 , 1.56509394479014063, 1.5558426888499468} + +static void zfftmaTest2 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN2; + double tImagIn [] = ZIMAG_IN2 ; + + + + double tRealResult [] = ZREAL_RESULT2 ; + double tImagResult [] = ZIMAG_RESULT2 ; + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS2)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS2 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS2) ; + + + + zfftma ( in , ROW , COLS2 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + for ( i = 0 ; i < (ROW*COLS2 ) ; i++ ) + { + printf ( "\t\t%d out: %e \t%e\t*i result: %e \t%e\t*i assert: %e \t%e\t*i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) + ); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ; + + } + + free(out); + free(in); + free(Result); + +} + + +static void zfftmaTest3 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN3; + double tImagIn [] = ZIMAG_IN3 ; + + + + double tRealResult [] = ZREAL_RESULT3 ; + double tImagResult [] = ZIMAG_RESULT3 ; + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS3)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS3 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS3) ; + + + + zfftma ( in , ROW , COLS3 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + for ( i = 0 ; i < (ROW*COLS3 ) ; i++ ) + { + printf ( "\t\t%d out: %e \t%e\t*i result: %e \t%e\t*i assert: %e \t%e\t*i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) + ); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ; + + } + + free(out); + free(in); + free(Result); + +} + + + +static int testFft(void) { + + printf("\n>>>> FFT Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + /*dfftmaTest();*/ + + printf("\n\n\n"); + + printf("\n\t>>>> Vector 2 Double Complex Tests\n"); + zfftmaTest2(); + printf("\n\t>>>> Vector 3 Double Complex Tests\n"); + zfftmaTest3(); + +/* + printf("\n\t>>>> Vector 4 Double Complex Tests\n"); + zfftmaTest4(); + printf("\n\t>>>> Vector 5 Double Complex Tests\n"); + zfftmaTest5(); + printf("\n\t>>>> Vector 6 Double Complex Tests\n"); + zfftmaTest6(); + printf("\n\t>>>> Vector 7 Double Complex Tests\n"); + zfftmaTest7(); + printf("\n\t>>>> Vector 8 Double Complex Tests\n"); + zfftmaTest8(); + printf("\n\t>>>> Vector 9 Double Complex Tests\n"); + zfftmaTest9(); + printf("\n\t>>>> Vector 10 Double Complex Tests\n"); + zfftmaTest10(); + printf("\n\t>>>> Vector 11 Double Complex Tests\n"); + zfftmaTest11(); + printf("\n\t>>>> Vector 12 Double Complex Tests\n"); + zfftmaTest12(); + printf("\n\t>>>> Vector 13 Double Complex Tests\n"); + zfftmaTest13(); + printf("\n\t>>>> Vector 14 Double Complex Tests\n"); + zfftmaTest14(); + printf("\n\t>>>> Vector 14 Double Complex Tests\n"); + zfftmaTest15(); + printf("\n\t>>>> Vector 16 Double Complex Tests\n"); + zfftmaTest16(); + printf("\n\t>>>> Vector 32 Double Complex Tests\n"); + zfftmaTest32(); +*/ + return 0; +} + + + +int main(void) { + assert(testFft() == 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/fft/testFloatFft.c b/2.3-1/src/c/signalProcessing/fft/testFloatFft.c new file mode 100644 index 00000000..5176c348 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/testFloatFft.c @@ -0,0 +1,1238 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "fft.h" + + +#define ROW 1 +#define COLS2 2 +#define COLS3 3 +#define COLS4 4 +#define COLS5 5 +#define COLS6 6 +#define COLS7 7 +#define COLS8 8 +#define COLS9 9 +#define COLS10 10 +#define COLS11 11 +#define COLS12 12 +#define COLS13 13 +#define COLS14 14 +#define COLS15 15 +#define COLS16 16 +#define COLS32 32 + + +#define CREAL_IN2 { 0.00022113462910056f , 0.33032709173858166f } +#define CIMAG_IN2 { 0.66538110421970487f , 0.62839178834110498f } + +#define CREAL_IN3 { 2.48206677380949259f, 0.43537130765616894f, 0.97385666053742170f} +#define CIMAG_IN3 { 2.14807060454040766f,- 0.78285905346274376f, 0.42632796149700880f} + + +#define CREAL_IN4 { 0.84974523587152362f, 0.68573101982474327f, 0.87821648130193353f, 0.06837403681129217f} +#define CIMAG_IN4 { 0.56084860628470778f, 0.66235693730413914f, 0.72635067673400044f, 0.19851438421756029f} + +#define CREAL_IN5 { 0.84974523587152362f, 0.68573101982474327f, 0.87821648130193353f, 0.06837403681129217f,\ + 0.65251349471509457f} +#define CIMAG_IN5 { 0.56084860628470778f, 0.66235693730413914f, 0.72635067673400044f, 0.19851438421756029f,\ + 0.56642488157376647f} + +#define CREAL_IN6 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.65251349471509457f, 0.30760907428339124f } +#define CIMAG_IN6 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.56642488157376647f, 0.59350947011262178f } + +#define CREAL_IN7 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.65251349471509457f, 0.88338878145441413f, 0.30760907428339124f } +#define CIMAG_IN7 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.40948254754766822f, 0.56642488157376647f, 0.59350947011262178f } + + + +#define CREAL_IN8 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.88338878145441413f, 0.65251349471509457f, 0.30760907428339124f, 0.93296162132173777f } +#define CIMAG_IN8 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.56642488157376647f, 0.48264719732105732f, 0.33217189135029912f, 0.59350947011262178f} + + +#define CREAL_IN9 { 0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.30760907428339124f, 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f,\ + 0.43685875833034515f} +#define CIMAG_IN9 { 0.26931248093023896f, 0.63257448654621840f, 0.40519540151581168f, 0.91847078315913677f,\ + 0.28064980218186975f, 0.12800584640353918f, 0.77831285959109664f, 0.21190304495394230f,\ + 0.68568959552794695f} + + +#define CREAL_IN10 { 0.21646326314657927f, 0.65251349471509457f, 0.63257448654621840f, 0.31264199689030647f,\ + 0.93296162132173777f, 0.31264199689030647f, 0.48185089323669672f, 0.48264719732105732f,\ + 0.2922266637906432f , 0.48264719732105732f } +#define CIMAG_IN10 { 0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.11383596854284406f, 0.19983377400785685f, 0.56186607433483005f, 0.58961773291230202f,\ + 0.23122371966019273f, 0.21646326314657927f} +/* +#define CREAL_IN10 { 1,2,3,4,5,6,7,8,9,10 } + + +#define CIMAG_IN10 { 1,2,3,4,5,6,7,8,9,10 } +*/ + + + + +#define CREAL_IN11 {0.49934938363730907f,0.26385784195736051f,0.52535630855709314f,0.53762298030778766f,\ + 0.11999255046248436f,0.2256303490139544f ,0.62740930821746588f,0.76084325974807143f,\ + 0.04855662025511265f,0.67239497276023030f,0.20171726960688829f } + +#define CIMAG_IN11 {0.39115739194676280f,0.83003165572881699f,0.58787201577797532f,0.48291792999953032f,\ + 0.22328650346025825f,0.84008856676518917f,0.12059959070757031f,0.28553641680628061f,\ + 0.86075146449729800f,0.84941016510128975f,0.52570608118548989f} + + +#define CREAL_IN12 {0.75604385416954756f,0.00022113462910056f,0.33032709173858166f,0.66538110421970487f,\ + 0.62839178834110498f,0.84974523587152362f,0.68573101982474327f,0.87821648130193353f,\ + 0.06837403681129217f,0.56084860628470778f,0.66235693730413914f,0.72635067673400044f} + +#define CIMAG_IN12 {0.19851438421756029f,0.54425731627270579f,0.23207478970289230f,0.23122371966019273f,\ + 0.21646326314657927f,0.88338878145441413f,0.65251349471509457f,0.30760907428339124f,\ + 0.93296162132173777f,0.21460078610107303f,0.31264199689030647f,0.36163610080257058f} + + +#define CREAL_IN13 {0.2922266637906432f ,0.56642488157376647f,0.48264719732105732f,0.33217189135029912f,\ + 0.59350947011262178f,0.50153415976092219f,0.43685875833034515f,0.26931248093023896f,\ + 0.63257448654621840f,0.40519540151581168f,0.91847078315913677f,0.04373343335464597f,\ + 0.48185089323669672f} + + + +#define CIMAG_IN13 {0.26395560009405017f,0.41481037065386772f,0.28064980218186975f,0.12800584640353918f,\ + 0.77831285959109664f,0.21190304495394230f,0.11213546665385365f,0.68568959552794695f,\ + 0.15312166837975383f,0.69708506017923355f,0.84155184263363481f,0.40620247554033995f,\ + 0.40948254754766822f} + + + +#define CREAL_IN14 {0.87841258011758327f,0.11383596854284406f,0.19983377400785685f,0.56186607433483005f,\ + 0.58961773291230202f,0.68539796629920602f,0.89062247332185507f,0.50422128057107329f,\ + 0.34936154074966908f,0.38737787725403905f,0.92228986788541079f,0.94881842611357570f,\ + 0.34353372454643250f,0.37601187312975526f} + +#define CIMAG_IN14 {0.73409405630081892f,0.26157614728435874f,0.49934938363730907f,0.26385784195736051f,\ + 0.52535630855709314f,0.53762298030778766f,0.11999255046248436f,0.2256303490139544f ,\ + 0.62740930821746588f,0.76084325974807143f,0.04855662025511265f,0.67239497276023030f,\ + 0.20171726960688829f,0.39115739194676280f} + +#define CREAL_IN15 {0.83003165572881699f,0.58787201577797532f,0.48291792999953032f,0.22328650346025825f,\ + 0.84008856676518917f,0.12059959070757031f,0.28553641680628061f,0.86075146449729800f,\ + 0.84941016510128975f,0.52570608118548989f,0.99312098976224661f,0.64885628735646605f,\ + 0.99231909401714802f,0.05004197778180242f,0.74855065811425447f} + +#define CIMAG_IN15 {0.41040589986369014f,0.60845263302326202f,0.85442108893766999f,0.06426467280834913f,\ + 0.82790829380974174f,0.92623437754809856f,0.56672112690284848f,0.57116389367729425f,\ + 0.81601104838773608f,0.05689279362559319f,0.55959366867318749f,0.12493403162807226f,\ + 0.72792222863063216f,0.26777664758265018f,0.54653349192813039f} + + + +#define CREAL_IN16 {0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.30760907428339124f, 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f,\ + 0.36163610080257058f, 0.2922266637906432f , 0.56642488157376647f, 0.48264719732105732f,\ + 0.33217189135029912f, 0.59350947011262178f, 0.50153415976092219f, 0.43685875833034515f} +#define CIMAG_IN16 {0.26931248093023896f, 0.63257448654621840f, 0.40519540151581168f, 0.91847078315913677f,\ + 0.04373343335464597f, 0.48185089323669672f, 0.26395560009405017f, 0.41481037065386772f,\ + 0.28064980218186975f, 0.12800584640353918f, 0.77831285959109664f, 0.21190304495394230f,\ + 0.11213546665385365f, 0.68568959552794695f, 0.15312166837975383f, 0.69708506017923355f} + + +#define CREAL_IN32 {0.21132486546412110f,0.75604385416954756f,0.00022113462910056f,0.33032709173858166f,\ + 0.66538110421970487f,0.62839178834110498f,0.84974523587152362f,0.68573101982474327f,\ + 0.87821648130193353f,0.06837403681129217f,0.56084860628470778f,0.66235693730413914f,\ + 0.72635067673400044f,0.19851438421756029f,0.54425731627270579f,0.23207478970289230f,\ + 0.23122371966019273f,0.21646326314657927f,0.88338878145441413f,0.65251349471509457f,\ + 0.30760907428339124f,0.93296162132173777f,0.21460078610107303f,0.31264199689030647f,\ + 0.36163610080257058f,0.2922266637906432f ,0.56642488157376647f,0.48264719732105732f,\ + 0.33217189135029912f,0.59350947011262178f,0.50153415976092219f,0.43685875833034515f} + +#define CIMAG_IN32 {0.26931248093023896f,0.63257448654621840f,0.40519540151581168f,0.91847078315913677f,\ + 0.04373343335464597f,0.48185089323669672f,0.26395560009405017f,0.41481037065386772f,\ + 0.28064980218186975f,0.12800584640353918f,0.77831285959109664f,0.21190304495394230f,\ + 0.11213546665385365f,0.68568959552794695f,0.15312166837975383f,0.69708506017923355f,\ + 0.84155184263363481f,0.40620247554033995f,0.40948254754766822f,0.87841258011758327f,\ + 0.11383596854284406f,0.19983377400785685f,0.56186607433483005f,0.58961773291230202f,\ + 0.68539796629920602f,0.89062247332185507f,0.50422128057107329f,0.34936154074966908f,\ + 0.38737787725403905f,0.92228986788541079f,0.94881842611357570f,0.34353372454643250f} + + + + +#define CREAL_RESULT2 { 0.33054822636768222f,- 0.33010595710948110f} +#define CIMAG_RESULT2 { 1.29377289256080985f, 0.03698931587859988f} + +#define CREAL_RESULT3 { 3.8912947420030832f , 0.73026611683127762f, 2.82463946259411713f} +#define CIMAG_RESULT3 { 1.79153951257467270f, 2.79267814568426775f, 1.85999415536228230f} + +#define CREAL_RESULT4 { 2.48206677380949259f, 0.43537130765616894f, 0.97385666053742170f, -0.49231379851698875f} +#define CIMAG_RESULT4 { 2.14807060454040766f,- 0.78285905346274376f, 0.42632796149700880f, 0.45185491256415844f} + +#define CREAL_RESULT5 { 3.13458026852458715f, 0.8989689127154592f ,-0.38601946016350575f, 0.50520993574533923f,\ + 0.09598652253573875f} +#define CIMAG_RESULT5 { 2.71449548611417413f,-0.31527367037930898f, 0.60322341639929178f,-0.89813890885693670f,\ + 0.69993670814631914f} + +#define CREAL_RESULT6 { 2.18414165778085589f,-0.26482327553354379f,-0.01687604011087318f, 0.67184740351513028f,\ + 0.11489612058787246f, 0.57635803139679309f } +#define CIMAG_RESULT6 { +2.34103989927098155f,+0.34168162147929737f,-0.70971181304669773f,-0.05571636231616137f,\ + -0.11084573654913504f,-0.51884289223184654f } + + + + +#define CREAL_RESULT7 { 3.06753043923527002f,-0.62032167153569062f,-0.13156333379499591f, 0.48353341667797933f,\ + 0.63567251139259018f, 0.05503001802946385f, 0.31991983390432432f} +#define CIMAG_RESULT7 { 2.75052244681864977f, 0.82490994311348309f,-0.93592353228518299f,-0.23131444371235776f,\ + -0.12732936894919694f, 0.16455873200809046f,-0.94321827428597393f} + + + +#define CREAL_RESULT8 { 4.00049206055700779f,-0.43357241280891956f, 0.79836636409163475f,-0.91119240848798977f,\ + -0.06753427721560001f,-0.18576209864995416f, 0.97926024347543716f, 0.17400105922003017f} +#define CIMAG_RESULT8 { 3.15585898794233799f, 0.62132445165622818f, 0.35205427557229996f, 0.28289917172258683f,\ + -0.20619166828691959f,-1.17220193335521805f,-0.17761892452836037f,-1.13931807191437073f } + +#define CREAL_RESULT9 { 4.18826149590313435f,-0.33012457237426968f,-0.46815050871925312f,-0.52782532864173848f,\ + 0.14402327100125287f, 0.48673726656350014f,-0.36542216583231485f,-0.05675799381585508f,\ + -0.98972798714272159f} +#define CIMAG_RESULT9 { 4.31011430080980062f,-0.43185186999958014f,-0.61788469590268758f, 2.02080753944191294f,\ + -1.82700213292318292f,-0.72130831941965079f,-0.43263346921029644f,-0.61611460931125561f,\ + 0.73968558488709069f } + + +#define CREAL_RESULT10 { 4.7991688111796975f , 0.13431735180709442f, 0.69797375124916528f,-0.96094309976899528f,\ + -1.299412169815219f , 0.31298504490405327f,-0.70524633213128674f, 0.73186521665562432f,\ + -0.84695776029792746f,-0.69911818231641265f} +#define CIMAG_RESULT10 { +3.8964297915808856f ,-0.73143162523007543f,-1.16550179795884423f,-0.28088284236709465f,\ + +0.91311790128897607f,+0.14664673572406173f,-0.38825389263472715f,+0.70003588825710683f,\ + -1.10050453393604197f,+0.32258157187768072f} + +#define CREAL_RESULT11 { 4.48273084452375770f,-0.38185469421558837f,-0.20352646397260507f, 0.93844897170676500f,\ + -0.36107014581234886f, 1.63127126429331426f, 0.21051283071884830f, 0.41375037345506283f,\ + -1.51895083986003510f, 0.07998126975880851f, 0.20154980941442344f} + +#define CIMAG_RESULT11 {+5.99735778197646141f,+0.89612320628808262f,-1.19950115725534112f,+0.16831729582097132f,\ + -0.30180616479381106f,-1.1576712540107854f ,+0.14605414615044232f,+0.98186675096176135f,\ + -1.81578488007792282f,+0.11882005651954808f,+0.46895552983498812f} + +#define CREAL_RESULT12 { 6.81198796723037958f,-0.94341279444120363f, 0.80833429094732012f, 0.51617261953651883f,\ + -0.2952048802069408f , 2.17160345678053313f,-0.54953851085156202f,-0.00060138915045171f,\ + 1.48723066647267177f,-0.96738335862755753f, 0.38783971037387632f,-0.35450152802901336f} + +#define CIMAG_RESULT12 {+5.08788532856851816f,-0.92793626853655098f,+1.98330386259771707f,+1.00984227284789085f,\ + -0.76701015963174557f,-0.03923425866831987f,+0.00245377141982317f,-0.97965668697496155f,\ + -0.43031801485501076f,-0.70842429809272289f,-0.77014751450337293f,-1.07858542356054099f} + + +#define CREAL_RESULT13 { 5.95651050098240376f,-1.05002118208049122f,-0.62824400440218664f, 0.73670329745244079f,\ + 1.01270235903781081f,-0.97652276217739442f,-0.80139420917945892f,-1.08927100387059594f,\ + 1.10768757452252697f,-0.90416530058905542f, 0.19128270229571837f,-0.36935459470156029f,\ + 0.61303325198820890f} + +#define CIMAG_RESULT13 {+5.38290618034079671f,-0.01795106539414900f,-1.0736822056133133f ,-0.38375436766279453f,\ + +0.45177555081294796f,-0.42204321578379422f,+1.167268002300917f ,-0.8654330910349184f ,\ + -1.80135467250416070f,+0.73358402770681042f,+0.92212767526074568f,-0.53962030646712056f,\ + -0.12239971073931022f} + +#define CREAL_RESULT14 { 7.75120115978643298f,-0.78366539551591063f,-0.20265674140819168f, 0.04290246165533468f,\ + 2.26072777524451896f, 0.41764276367067404f,-0.94725360360479638f, 0.59614222729578614f,\ + 1.2655897771348088f , 1.49954927048727082f, 0.59161337187577756f, 1.32712418977692859f,\ + -1.04078471420795249f,-0.48035642054451416f} + + +#define CIMAG_RESULT14 {+5.86955844005569816f,+0.59116535878306964f,+1.10949301280070478f,-0.10194863149531888f,\ + +0.33742089533324454f,+1.27136622217475770f,+0.66505772083419801f,-0.35660744598135352f,\ + +0.55272403261244618f,+0.78239239747489764f,-0.76097885152655409f,+1.7013910918422144f ,\ + -1.05520441290632339f,-0.32851304179021534f} + +#define CREAL_RESULT15 { 9.03908939706161618f, 0.83695739793685675f,-0.1247585940626968f , 0.73554494173292662f,\ + 2.89255624599792061f,-0.60942096648213817f,-0.96289916352621108f,-2.01148115975842146f,\ + 1.08671310762523987f, 1.10385593717105923f, 0.14097082301450437f, 0.77951939204949339f,\ + -0.19682993144621974f, 1.09445436001472118f,-1.35379695139639411f} + +#define CIMAG_RESULT15 {+7.929235897026956f ,+0.93665405708769556f,-0.58867096407810116f,-0.08075001529554950f,\ + +0.05154837779444588f,-1.64233407065738146f,+2.20857407200866884f,+0.92685932199933529f,\ + -1.71222943015973872f,-0.79519673795720203f,-0.80828166087623532f,-0.07547063282874045f,\ + +0.21930651464200918f,+1.00880777239444086f,-1.42196400314524918f} + + + +#define CREAL_RESULT16 { 7.31841186061501503f, 0.57213963313411265f,-0.54757095809921363f,-0.48628670926159856f,\ + -1.24745626002550125f,-0.60260425121772254f,-0.09566750389725764f, 1.12013387649474438f,\ + -0.52123307064175606f,-0.4866536676629296f , 1.98659065302356819f,-0.8626986211125984f ,\ + -0.61915938556194305f,-0.27813937201980266f,-1.53103677171080510f,-0.01918993749322817f} +#define CIMAG_RESULT16 { 6.47680679336190224f, 0.33111151130330035f,-0.19343861330849654f, 0.12474172265893407f,\ + -1.0452539175748825f , 1.29632487527975693f, 1.87557979276701658f,-1.82623636350346352f,\ + -1.86397336795926094f,-1.03154071610913434f,-0.48573205481665604f, 0.44539904220706855f,\ + -0.74425477534532547f,-0.54299368721281471f, 0.37996440777257234f, 1.11249504536330601f} + +#define CREAL_RESULT32 { 15.3165711835026741f,-1.79021577127059173f,-1.66659611407065089f, 0.17525916470909797f,\ + -1.16958628014871602f, 0.58684741669397522f, 0.03947542161511042f, 0.99740008842981942f,\ + -0.46323241293430328f, 2.122539701124051f ,-1.52963914564883940f, 0.87990417229605744f,\ + 0.58569127383151542f,-0.18198535589432135f, 0.26043384746900655f,-1.11204765363415392f,\ + 0.35329844802618027f,-1.47568616310628631f,-2.03487116744967844f,-3.19495610958970166f,\ + 0.81026376203844086f,-0.46366666776372734f,-1.63150209835186510f, 0.77334707088593369f,\ + -0.35098156332969666f,-1.63498270669406387f, 0.67411467120679691f, 2.80538085483913147f,\ + -1.62281507315555107f,-0.5600265995962992f ,-0.48984739061140237f, 1.75450689143393301f} + + + +#define CIMAG_RESULT32 { 15.509232945740223f ,-0.47962381296807621f, 0.21213951866464975f, 0.88442937061831350f,\ + 1.52924554070524898f,-0.6313403060045536f ,-2.25908603874729419f,-1.3836292677373856f ,\ + -1.18231281638145447f,-2.14767090006699668f, 1.5452016553381984f ,-3.15355126536920993f,\ + 2.10199273301496747f, 0.67530605269461363f,-2.03603600735261558f, 1.2309547869577584f ,\ + -1.9912955537438393f ,-1.9668221895811833f , 0.29575245179739662f, 1.34815224953105273f,\ + 1.508921339902356f ,-0.40084285801706099f, 2.96716476331614754f, 1.08125713762201059f,\ + -1.39964522421360016f,-1.30777696073860294f,-1.13169784714423916f,-2.00872755010475013f,\ + 0.53915777133569487f,-2.45178696294021004f , 1.56509394479014063f, 1.5558426888499468f} + +static void cfftmaTest2 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN2; + float tImagIn [] = CIMAG_IN2 ; + + + + float tRealResult [] = CREAL_RESULT2 ; + float tImagResult [] = CIMAG_RESULT2 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS2)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS2 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS2) ; + + + + cfftma ( in , ROW , COLS2 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); +} + +static void cfftmaTest3 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN3; + float tImagIn [] = CIMAG_IN3 ; + + + + float tRealResult [] = CREAL_RESULT3; + float tImagResult [] = CIMAG_RESULT3 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS3)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS3 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS3) ; + + + + cfftma ( in , ROW , COLS3 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS3 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + + free(out); + free(in); + free(Result); +} + + +static void cfftmaTest4 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN4; + float tImagIn [] = CIMAG_IN4 ; + + + + float tRealResult [] = CREAL_RESULT4 ; + float tImagResult [] = CIMAG_RESULT4 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS4)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS4 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS4) ; + + + cfftma ( in , ROW , COLS4 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS4 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + + +static void cfftmaTest5 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN5; + float tImagIn [] = CIMAG_IN5 ; + + + + float tRealResult [] = CREAL_RESULT5; + float tImagResult [] = CIMAG_RESULT5 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS5)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS5 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS5) ; + + + + cfftma ( in , ROW , COLS5 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS5 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + + +static void cfftmaTest6 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN6; + float tImagIn [] = CIMAG_IN6 ; + + + + float tRealResult [] = CREAL_RESULT6; + float tImagResult [] = CIMAG_RESULT6; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS6)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS6 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS6) ; + + + + cfftma ( in , ROW , COLS6 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS6 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + + free(out); + free(in); + free(Result); +} + + +static void cfftmaTest7 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN7; + float tImagIn [] = CIMAG_IN7 ; + + + + float tRealResult [] = CREAL_RESULT7; + float tImagResult [] = CIMAG_RESULT7; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS7)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS7 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS7) ; + + + + cfftma ( in , ROW , COLS7 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS7 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + +static void cfftmaTest8 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN8; + float tImagIn [] = CIMAG_IN8 ; + + + + float tRealResult [] = CREAL_RESULT8 ; + float tImagResult [] = CIMAG_RESULT8 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS8)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS8 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS8) ; + + + cfftma ( in , ROW , COLS8 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS8 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + + +static void cfftmaTest9 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN9; + float tImagIn [] = CIMAG_IN9 ; + + + + float tRealResult [] = CREAL_RESULT9 ; + float tImagResult [] = CIMAG_RESULT9 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS9)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS9 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS9) ; + + + cfftma ( in , ROW , COLS9 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS9 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + +static void cfftmaTest10 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN10; + float tImagIn [] = CIMAG_IN10 ; + + + + float tRealResult [] = CREAL_RESULT10 ; + float tImagResult [] = CIMAG_RESULT10 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS10)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS10 ); + + + + cfftma ( in , ROW , COLS10 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS10 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + +static void cfftmaTest11 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN11; + float tImagIn [] = CIMAG_IN11 ; + + + + float tRealResult [] = CREAL_RESULT11 ; + float tImagResult [] = CIMAG_RESULT11 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS11)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS11 ); + + + + cfftma ( in , ROW , COLS11 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS11 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + + +static void cfftmaTest12 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN12; + float tImagIn [] = CIMAG_IN12 ; + + + + float tRealResult [] = CREAL_RESULT12 ; + float tImagResult [] = CIMAG_RESULT12 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS12)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS12 ); + + + + cfftma ( in , ROW , COLS12 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS12 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-5 ) ; + + } + + free(out); + free(in); +} + + +static void cfftmaTest13 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN13; + float tImagIn [] = CIMAG_IN13 ; + + + + float tRealResult [] = CREAL_RESULT13 ; + float tImagResult [] = CIMAG_RESULT13 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS13)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS13 ); + + + + cfftma ( in , ROW , COLS13 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS13 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + + +static void cfftmaTest14 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN14; + float tImagIn [] = CIMAG_IN14 ; + + + + float tRealResult [] = CREAL_RESULT14 ; + float tImagResult [] = CIMAG_RESULT14 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS14)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS14 ); + + + + cfftma ( in , ROW , COLS14 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS14 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + + + +static void cfftmaTest15 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN15; + float tImagIn [] = CIMAG_IN15 ; + + + + float tRealResult [] = CREAL_RESULT15 ; + float tImagResult [] = CIMAG_RESULT15 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS15)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS15 ); + + + + cfftma ( in , ROW , COLS15 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS15 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + + + +static void cfftmaTest16 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN16; + float tImagIn [] = CIMAG_IN16 ; + + + + float tRealResult [] = CREAL_RESULT16 ; + float tImagResult [] = CIMAG_RESULT16 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS16)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS16 ); + + + + cfftma ( in , ROW , COLS16 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS16 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + + + +static void cfftmaTest32 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN32; + float tImagIn [] = CIMAG_IN32 ; + + + + float tRealResult [] = CREAL_RESULT32 ; + float tImagResult [] = CIMAG_RESULT32 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS32)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS32 ); + + + + cfftma ( in , ROW , COLS32 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS32 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-5 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); +} + +static int testFft(void) { + + printf("\n>>>> FFT Tests\n"); + printf("\t>>>> Matrix Float Realt Tests\n"); + /*dfftmaTest();*/ + + printf("\n\n\n"); + + printf("\n\t>>>> Vector 2 Float Complex Tests\n"); + cfftmaTest2(); + printf("\n\t>>>> Vector 3 Float Complex Tests\n"); + cfftmaTest3(); + printf("\n\t>>>> Vector 4 Float Complex Tests\n"); + cfftmaTest4(); + printf("\n\t>>>> Vector 5 Float Complex Tests\n"); + cfftmaTest5(); + printf("\n\t>>>> Vector 6 Float Complex Tests\n"); + cfftmaTest6(); + printf("\n\t>>>> Vector 7 Float Complex Tests\n"); + cfftmaTest7(); + printf("\n\t>>>> Vector 8 Float Complex Tests\n"); + cfftmaTest8(); + printf("\n\t>>>> Vector 9 Float Complex Tests\n"); + cfftmaTest9(); + printf("\n\t>>>> Vector 10 Float Complex Tests\n"); + cfftmaTest10(); + printf("\n\t>>>> Vector 11 Float Complex Tests\n"); + cfftmaTest11(); + printf("\n\t>>>> Vector 12 Float Complex Tests\n"); + cfftmaTest12(); + printf("\n\t>>>> Vector 13 Float Complex Tests\n"); + cfftmaTest13(); + printf("\n\t>>>> Vector 14 Float Complex Tests\n"); + cfftmaTest14(); + printf("\n\t>>>> Vector 14 Float Complex Tests\n"); + cfftmaTest15(); + printf("\n\t>>>> Vector 16 Float Complex Tests\n"); + cfftmaTest16(); + printf("\n\t>>>> Vector 32 Float Complex Tests\n"); + cfftmaTest32(); + return 0; +} + + + +int main(void) { + assert(testFft() == 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/fft/testMatFft.c b/2.3-1/src/c/signalProcessing/fft/testMatFft.c new file mode 100644 index 00000000..88631622 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/testMatFft.c @@ -0,0 +1,297 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include +#include +#include "fft.h" + +#define test1 {0.2113249000000000099586,0.3303270999999999846253,0.8497451999999999783242,0.0683740000000000042180,\ + 0.7560438999999999909463,0.6653810999999999475918,0.6857309999999999794440,0.5608486000000000304411,\ + 0.0002211000000000000075,0.6283917999999999448590,0.8782164999999999555058,0.6623569000000000261963} + +#define test2 {0.2113249000000000099586,0.6857309999999999794440,\ + 0.3303270999999999846253,0.5608486000000000304411,\ + 0.8497451999999999783242,0.0002211000000000000075,\ + 0.0683740000000000042180,0.6283917999999999448590,\ + 0.7560438999999999909463,0.8782164999999999555058,\ + 0.6653810999999999475918,0.6623569000000000261963} + +#define test3 {0.2113249000000000099586,0.7560438999999999909463,0.0002211000000000000075,\ + 0.3303270999999999846253,0.6653810999999999475918,0.6283917999999999448590,\ + 0.8497451999999999783242,0.6857309999999999794440,0.8782164999999999555058,\ + 0.0683740000000000042180,0.5608486000000000304411,0.6623569000000000261963} + +#define test4 {0.2113249000000000099586,0.0683740000000000042180,0.6857309999999999794440,0.6283917999999999448590,\ + 0.3303270999999999846253,0.7560438999999999909463,0.5608486000000000304411,0.8782164999999999555058,\ + 0.8497451999999999783242,0.6653810999999999475918,0.0002211000000000000075,0.6623569000000000261963} + +#define test6 {0.2113249000000000099586,0.8497451999999999783242,0.7560438999999999909463,0.6857309999999999794440,0.0002211000000000000075,0.8782164999999999555058,\ + 0.3303270999999999846253,0.0683740000000000042180,0.6653810999999999475918,0.5608486000000000304411,0.6283917999999999448590,0.6623569000000000261963} + +#define test9 {1,2,3,4,5,6,7,8,9} + +#define RRESULT1 {6.2969621000000000066166,-0.1908142591446193858662,0.0676336000000001824617,\ +-1.4461027999999997994962,-0.7577484999999999359943,0.2136987591446193046618,\ +0.4656031000000000474870,0.2136987591446193046618,-0.7577484999999999359943,\ +-1.4461027999999997994962,0.0676336000000001824617,-0.1908142591446193858662} + +#define IRESULT1 {0,-0.0438615735192828815059,-1.0572926567728160307524,0.3325204999999997745874,\ +0.3011445725036896448046,-1.3036713264807171519521,0,1.3036713264807171519521,\ +-0.3011445725036896448046,-0.3325204999999997745874,1.0572926567728160307524,\ +0.0438615735192828815059} + +#define RRESULT2 {6.2969621000000000066166,-0.5345696999999998144659,\ +0.0676336000000000714394,-0.3918127000000001247670,\ +-0.7577485000000003800835,-1.2843509999999995763176,\ +0.4656030999999999364647,1.0404605000000000103455,\ +-0.7577485000000003800835,-1.2843509999999995763176,\ +0.0676336000000000714394,-0.3918127000000001247670} + +#define IRESULT2 {0,0,\ +-1.05729265677281625280,0.6392575178288871784460,\ +0.3011445725036897003157,-1.043770536118125757952,\ +0,0,\ +-0.3011445725036897003157,1.043770536118125757952,\ +1.05729265677281625280,-0.6392575178288871784460} + +#define RRESULT3 {6.2969621000000000066166,-0.9588242499999999335358,-0.9588242499999999335358,\ +-1.4461027999999997994962,-0.3545214899631756733101,-0.1146366100368243767793,\ +0.4656031000000000474870,0.7607519500000001766438,0.7607519500000001766438,\ +-1.4461027999999997994962,-0.1146366100368243767793,-0.3545214899631756733101} + +#define IRESULT3 {0,0.4319893196725672623870,-0.4319893196725672623870,\ +0.3325204999999997745874,1.0479284784196345459151,-0.5945896784196345041806,\ +0,0.5437395057261036335206,-0.5437395057261036335206,\ +-0.3325204999999997745874,0.5945896784196345041806,-1.0479284784196345459151} + +#define RRESULT4 {6.2969621000000000066166,0.1445965000000000166835,-1.0205663000000000373291,\ + 0.1445965000000000166835,\ +-0.7577485000000003800835,-0.6754837907274804376101,0.8107183000000001138474,\ + -0.8923310092725194042629,\ +-0.7577485000000003800835,-0.8923310092725194042629,0.8107183000000001138474,\ + -0.6754837907274804376101} + +#define IRESULT4 {0,-0.6791661999999999421718,0,0.6791661999999999421718,\ +0.3011445725036897003157,-1.4357905268456061520510,-0.2297677979542606663266,\ + -0.4349033268456063971996,\ +-0.3011445725036897003157,0.4349033268456063971996,0.2297677979542606663266,\ + 1.4357905268456061520510} + +#define RRESULT6 {6.2969621000000000066166,-0.5006002499999999688640,-0.4661336499999999549715,\ + -1.113582300000000024909,-0.4661336499999999549715,-0.5006002499999999688640,\ +0.46560309999999915931,0.5234847499999999431708,-0.2239812499999997985611,\ + -1.7786232999999995740836,-0.2239812499999997985611,0.5234847499999999431708} + +#define IRESULT6 {0,0.1475342691353691004785,-1.2256565689200087376776,0,1.2256565689200087376776,\ + -0.1475342691353691004785,\ +0,1.112275483826065114457,-0.1327806603564972709464,0,0.1327806603564972709464,\ + -1.112275483826065114457} + +#define RRESULT9 {45,-4.5,-4.5,-13.5,0,0,-13.5,0,0} + +#define IRESULT9 {0,2.598076211353316011810,- 2.598076211353316011810,7.7942286340599471472501,0,0,- 7.7942286340599471472501,0,0} + +static void dfftmaTest(void){ + int i; + + double in1[]=test1; + double in2[]=test2; + double in3[]=test3; + double in4[]=test4; + double in6[]=test6; + double in9[]=test9; + + double resR1[]=RRESULT1; + double resR2[]=RRESULT2; + double resR3[]=RRESULT3; + double resR4[]=RRESULT4; + double resR6[]=RRESULT6; + double resR9[]=RRESULT9; + + double out1[12], out2[12], out3[12], out4[12], out6[12], out9[9]; + + + printf(" >>> Matrice 1*12 <<< \n"); + dfftma(in1, 1, 12, out1); + for (i=0;i<12;i++){ + printf("\t\n out : %e \t result : %e \t assert: %e",out1[i], resR1[i] ,(fabs(out1[i]-resR1[i]) / fabs(out1[i])) ); + if (out1[i]>1e-16) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 2*6 <<< \n"); + dfftma(in2, 2, 6, out2); + for (i=0;i<12;i++){ + printf("\n\t out : %e \t result : %e \t assert: %e\n",out2[i], resR2[i] ,(fabs(out2[i]-resR2[i]) / fabs(out2[i])) ); + if (out2[i]>1e-16) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 1e-13); + else assert(1); + } + + + printf(" >>> Matrice 3*4 <<< \n"); + dfftma(in3, 3, 4, out3); + for (i=0;i<12;i++){ + if (out3[i]>1e-16) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 4*3 <<< \n"); + dfftma(in4, 4, 3, out4); + for (i=0;i<12;i++){ + if (out4[i]>1e-16) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 6*2 <<< \n"); + dfftma(in6, 6, 2, out6); + for (i=0;i<12;i++){ + if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 3*3 <<< \n"); + dfftma(in9, 3, 3, out9); + for (i=0;i<9;i++){ + if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 1e-13); + else assert(1); + } + + +} + +static void zfftmaTest(void){ + int i; + + double inR1[]=test1; + double inR2[]=test2; + double inR3[]=test3; + double inR4[]=test4; + double inR6[]=test6; + double inR9[]=test9; + + double resR1[]=RRESULT1; + double resI1[]=IRESULT1; + double resR2[]=RRESULT2; + double resI2[]=IRESULT2; + double resR3[]=RRESULT3; + double resI3[]=IRESULT3; + double resR4[]=RRESULT4; + double resI4[]=IRESULT4; + double resR6[]=RRESULT6; + double resI6[]=IRESULT6; + double resR9[]=RRESULT9; + double resI9[]=IRESULT9; + + doubleComplex *in1, *in2, *in3, *in4, *in6, *in9, out1[12], out2[12], out3[12], out4[12], out6[12], out9[12]; + + in1=(doubleComplex*)malloc((unsigned int)12*sizeof(doubleComplex)); + in2=(doubleComplex*)malloc((unsigned int)12*sizeof(doubleComplex)); + in3=(doubleComplex*)malloc((unsigned int)12*sizeof(doubleComplex)); + in4=(doubleComplex*)malloc((unsigned int)12*sizeof(doubleComplex)); + in6=(doubleComplex*)malloc((unsigned int)12*sizeof(doubleComplex)); + in9=(doubleComplex*)malloc((unsigned int)9*sizeof(doubleComplex)); + + + + for (i=0;i<12;i++){ + in1[i]=DoubleComplex(inR1[i],0); + in2[i]=DoubleComplex(inR2[i],0); + in3[i]=DoubleComplex(inR3[i],0); + in4[i]=DoubleComplex(inR4[i],0); + in6[i]=DoubleComplex(inR6[i],0); + } + for (i=0;i<9;i++){ + in9[i]=DoubleComplex(inR9[i],0); + + } + + /* !!!!!!!!!!!!!!!!!!!!!!! + for the imaginary part, the assert is out + res instead of out - res + cause I export the transposate of the result matrix and the transposate change the sign + of the imaginary part. + And instead of change all the define, I only change the sign of the assert.*/ + printf(" >>> Matrice 1*12 <<< \n"); + zfftma(in1, 1, 12, out1); + for (i=0;i<12;i++){ + if (zreals(out1[i])>1e-16) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 1e-13); + else assert(1); + if (zimags(out1[i])>1e-16) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 2*6 <<< \n"); + zfftma(in2, 2, 6, out2); + for (i=0;i<12;i++){ + printf("\t\n outR : %e \t result : %e \t assert: %e",zreals(out2[i]), resR2[i] ,(fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) ); + printf("\t\n outI : %e \t result : %e \t assert: %e",zimags(out2[i]), resI2[i] ,(fabs(zimags(out2[i])-resI2[i]) / fabs(zimags(out2[i]))) ); + if (zreals(out2[i])>1e-16) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 1e-13); + else assert(1); + if (zimags(out2[i])>2e-16) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 1e-13 ); + else assert(1); + } + + + printf(" >>> Matrice 3*4 <<< \n"); + zfftma(in3, 3, 4, out3); + for (i=0;i<12;i++){ + if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 1e-13); + else assert(1); + if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 4*3 <<< \n"); + zfftma(in4, 4, 3, out4); + for (i=0;i<12;i++){ + if (zreals(out4[i])>1e-16) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 1e-13); + else assert(1); + if (zimags(out4[i])>1e-16) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 6*2 <<< \n"); + zfftma(in6, 6, 2, out6); + for (i=0;i<12;i++){ + if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 1e-13); + else assert(1); + if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 1e-13); + else assert(1); + } + + printf(" >>> Matrice 3*3 <<< \n"); + zfftma(in9, 3, 3, out9); + for (i=0;i<9;i++){ + if (zreals(out9[i])>1e-16) assert( (fabs(zreals(out9[i])-resR9[i]) / fabs(zreals(out9[i]))) < 1e-13); + else assert(1); + + if (zimags(out9[i])>1e-16) assert( (fabs(zimags(out9[i])-resI9[i]) / fabs(zimags(out9[i]))) < 1e-13); + else assert(1); + } +} + + + +static int testFft(void){ + dfftmaTest(); + zfftmaTest(); + return 0; +} + + +int main(void) { + printf(">>> Fft Matrices Double Tests <<<\n"); + assert(testFft() == 0); + return 0; +} + diff --git a/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj b/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj new file mode 100644 index 00000000..67ae054d --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DBD206E6-F7F2-4C00-83F0-2AAAB90A6C72} + testDoubleFft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj.filters b/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj.filters new file mode 100644 index 00000000..8824fe45 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_DoubleFft/testDoubleFft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj b/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj new file mode 100644 index 00000000..ee576dbc --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {EDE2F70A-E2A0-45B6-A9C7-E3E62409AF95} + testFloatFft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj.filters b/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj.filters new file mode 100644 index 00000000..0d9cec95 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_FloatFft/testFloatFft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj b/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj new file mode 100644 index 00000000..3f16af38 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {A7A46527-B5F9-4B92-9C46-2416E2432314} + testMatFft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj.filters b/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj.filters new file mode 100644 index 00000000..503e5a96 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/test_MatFft/testMatFft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fft/zfftma.c b/2.3-1/src/c/signalProcessing/fft/zfftma.c new file mode 100644 index 00000000..48616eaf --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fft/zfftma.c @@ -0,0 +1,156 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#define FFT842 1 +#define DFFT2 0 + +#include +#include +#include "fft.h" +#include "lapack.h" +#include "fft_internal.h" + +void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) +{ + + int choosenAlgo = DFFT2 ; + + int size = rows*cols ; + int sizeTemp = 0; + + int rowsTemp = 0 ; + int colsTemp = 0 ; + + int ierr = 0 ; + int isn = -1; + int i = 0; + + int increment=1; + + + double* realIn = (double*) malloc ( sizeof (double) * (unsigned int) size ); + double* imagIn = (double*) malloc ( sizeof (double) * (unsigned int) size ); + doubleComplex* inCopy = (doubleComplex*) malloc ( sizeof (doubleComplex) * (unsigned int) size); + + doubleComplex* inTemp = (doubleComplex*) malloc ( sizeof (doubleComplex) * (unsigned int) size ); + + zimaga ( in , size , imagIn) ; + zreala ( in , size , realIn) ; + for(i=0;i +#include "fftshift.h" + +void cfftshifta(floatComplex* in,int rows,int columns,floatComplex* out){ + floatComplex* temp; + + /*FIXME : malloc here*/ + temp= (floatComplex *) malloc((unsigned int)(rows*columns)*sizeof(floatComplex)); + + crowfftshifta(in,rows,columns,temp); + ccolumnfftshifta(temp,rows,columns,out); +} + + diff --git a/2.3-1/src/c/signalProcessing/fftshift/crowfftshifta.c b/2.3-1/src/c/signalProcessing/fftshift/crowfftshifta.c new file mode 100644 index 00000000..99b807ec --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/crowfftshifta.c @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" + +static void Pair(floatComplex* in,int rows,int columns,floatComplex* out){ + int i=0,j=0; + + for (i=0;i +#include "fftshift.h" + +void dfftshifta(double* in,int rows,int columns,double* out){ + double* temp; + + /*FIXME : malloc here*/ + temp= (double *) malloc((unsigned int)(rows*columns)*sizeof(double)); + + drowfftshifta(in,rows,columns,temp); + dcolumnfftshifta(temp,rows,columns,out); +} + + diff --git a/2.3-1/src/c/signalProcessing/fftshift/drowfftshifta.c b/2.3-1/src/c/signalProcessing/fftshift/drowfftshifta.c new file mode 100644 index 00000000..522c8281 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/drowfftshifta.c @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" + +static void Pair(double* in,int rows,int columns,double* out){ + int i=0,j=0; + + for (i=0;i +#include "fftshift.h" + +void sfftshifta(float* in,int rows,int columns,float* out){ + float* temp; + + /*FIXME : malloc here*/ + temp = (float *) malloc((unsigned int)(rows*columns)*sizeof(float)); + + srowfftshifta(in,rows,columns,temp); + scolumnfftshifta(temp,rows,columns,out); +} + + diff --git a/2.3-1/src/c/signalProcessing/fftshift/srowfftshifta.c b/2.3-1/src/c/signalProcessing/fftshift/srowfftshifta.c new file mode 100644 index 00000000..b68c29cf --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/srowfftshifta.c @@ -0,0 +1,48 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" + +static void Pair(float* in,int rows,int columns,float* out){ + int i=0,j=0; + + for (i=0;i +#include + +#define SOURCE {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,\ + 21,22,23,24,25,26,27,28,29,30} + + +static void drowfftshiftaTest(void){ + int i=0; + + double in[]=SOURCE; + double result5_6[30]={4,5,1,2,3,9,10,6,7,8,14,15,11,12,13,19,20,16,17,18,24,25,21,22,23,29,30,26,27,28}; + double result6_5[30]={4,5,6,1,2,3,10,11,12,7,8,9,16,17,18,13,14,15,22,23,24,19,20,21,28,29,30,25,26,27}; + double out[30]; + + drowfftshifta(in,5,6,out); + for (i=0;i<30;i++) assert( out[i]-result5_6[i]==0); + + drowfftshifta(in,6,5,out); + for (i=0;i<30;i++) assert( out[i]-result6_5[i]==0); + +} + +static void zrowfftshiftaTest(void){ + int i=0; + + double inR[]=SOURCE; + double result5_6[30]={4,5,1,2,3,9,10,6,7,8,14,15,11,12,13,19,20,16,17,18,24,25,21,22,23,29,30,26,27,28}; + double result6_5[30]={4,5,6,1,2,3,10,11,12,7,8,9,16,17,18,13,14,15,22,23,24,19,20,21,28,29,30,25,26,27}; + doubleComplex out[30]; + double ZEROS[30]={0}; + doubleComplex *in; + + in=DoubleComplexMatrix(inR,ZEROS,30); + + zrowfftshifta(in,5,6,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result5_6[i]==0); + assert( zimags(out[i])==0); + } + + zrowfftshifta(in,6,5,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result6_5[i]==0); + assert( zimags(out[i])==0); + } +} + + +static void dcolumnfftshiftaTest(void){ + int i=0; + + double in[]=SOURCE; + double result5_6[30]={16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; + double result6_5[30]={19,20,21,22,23,24,25,26,27,28,29,30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}; + double out[30]; + + dcolumnfftshifta(in,5,6,out); + for (i=0;i<30;i++) assert( out[i]-result5_6[i]==0); + + dcolumnfftshifta(in,6,5,out); + for (i=0;i<30;i++) assert( out[i]-result6_5[i]==0); + +} + +static void zcolumnfftshiftaTest(void){ + int i=0; + + double inR[]=SOURCE; + double result5_6[30]={16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; + double result6_5[30]={19,20,21,22,23,24,25,26,27,28,29,30,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}; + doubleComplex out[30]; + double ZEROS[30]={0}; + doubleComplex *in; + + in=DoubleComplexMatrix(inR,ZEROS,30); + + zcolumnfftshifta(in,5,6,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result5_6[i]==0); + assert( zimags(out[i])==0); + } + + zcolumnfftshifta(in,6,5,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result6_5[i]==0); + assert( zimags(out[i])==0); + } + +} + +static void dfttshiftaTest(void){ + int i=0; + + double in[]=SOURCE; + double result5_6[30]={19,20,16,17,18,24,25,21,22,23,29,30,26,27,28,4,5,1,2,3,9,10,6,7,8,14,15,11,12,13}; + double result6_5[30]={22,23,24,19,20,21,28,29,30,25,26,27,4,5,6,1,2,3,10,11,12,7,8,9,16,17,18,13,14,15}; + double out[30]; + + dfftshifta(in,5,6,out); + for (i=0;i<30;i++) assert( out[i]-result5_6[i]==0); + + dfftshifta(in,6,5,out); + for (i=0;i<30;i++) assert( out[i]-result6_5[i]==0); + +} + +static void zfftshiftaTest(void){ + int i=0; + + double inR[]=SOURCE; + double result5_6[30]={19,20,16,17,18,24,25,21,22,23,29,30,26,27,28,4,5,1,2,3,9,10,6,7,8,14,15,11,12,13}; + double result6_5[30]={22,23,24,19,20,21,28,29,30,25,26,27,4,5,6,1,2,3,10,11,12,7,8,9,16,17,18,13,14,15}; + doubleComplex out[30]; + double ZEROS[30]={0}; + doubleComplex *in; + + in=DoubleComplexMatrix(inR,ZEROS,30); + + zfftshifta(in,5,6,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result5_6[i]==0); + assert( zimags(out[i])==0); + } + + zfftshifta(in,6,5,out); + for (i=0;i<30;i++) { + assert( zreals(out[i])-result6_5[i]==0); + assert( zimags(out[i])==0); + } + +} + +static int FftShiftTest(void){ + drowfftshiftaTest(); + zrowfftshiftaTest(); + dcolumnfftshiftaTest(); + zcolumnfftshiftaTest(); + dfttshiftaTest(); + zfftshiftaTest(); + return 0; +} + + +int main(void){ + assert (FftShiftTest()==0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/fftshift/testFloatFftShift.c b/2.3-1/src/c/signalProcessing/fftshift/testFloatFftShift.c new file mode 100644 index 00000000..19b85738 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/testFloatFftShift.c @@ -0,0 +1,159 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" +#include +#define SOURCE {1,2,3,4,5,6,7,8,9,10,11,12} + + +static void srowfftshiftaTest(void){ + int i=0; + + float in[]=SOURCE; + float result3_4[12]={3,1,2,6,4,5,9,7,8,12,10,11}; + float result4_3[12]={3,4,1,2,7,8,5,6,11,12,9,10}; + float out[12]; + + srowfftshifta(in,3,4,out); + for (i=0;i<12;i++) assert( out[i]-result3_4[i]==0); + + srowfftshifta(in,4,3,out); + for (i=0;i<12;i++) assert( out[i]-result4_3[i]==0); + +} + +static void crowfftshiftaTest(void){ + int i=0; + + float inR[]=SOURCE; + float result3_4[12]={3,1,2,6,4,5,9,7,8,12,10,11}; + float result4_3[12]={3,4,1,2,7,8,5,6,11,12,9,10}; + floatComplex out[12]; + float ZEROS[12]={0}; + floatComplex *in; + + in=FloatComplexMatrix(inR,ZEROS,12); + + crowfftshifta(in,3,4,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result3_4[i]==0); + assert( cimags(out[i])==0); + } + + crowfftshifta(in,4,3,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result4_3[i]==0); + assert( cimags(out[i])==0); + } +} + + +static void scolumnfftshiftaTest(void){ + int i=0; + + float in[]=SOURCE; + float result3_4[12]={7,8,9,10,11,12,1,2,3,4,5,6}; + float result4_3[12]={9,10,11,12,1,2,3,4,5,6,7,8}; + float out[12]; + + scolumnfftshifta(in,3,4,out); + for (i=0;i<12;i++) assert( out[i]-result3_4[i]==0); + + scolumnfftshifta(in,4,3,out); + for (i=0;i<12;i++) assert( out[i]-result4_3[i]==0); + +} + +static void ccolumnfftshiftaTest(void){ + int i=0; + + float inR[]=SOURCE; + float result3_4[12]={7,8,9,10,11,12,1,2,3,4,5,6}; + float result4_3[12]={9,10,11,12,1,2,3,4,5,6,7,8}; + floatComplex out[12]; + float ZEROS[12]={0}; + floatComplex *in; + + in=FloatComplexMatrix(inR,ZEROS,12); + + ccolumnfftshifta(in,3,4,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result3_4[i]==0); + assert( cimags(out[i])==0); + } + + ccolumnfftshifta(in,4,3,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result4_3[i]==0); + assert( cimags(out[i])==0); + } + +} + +static void sfftshiftaTest(void){ + int i=0; + + float in[]=SOURCE; + float result3_4[12]={9,7,8,12,10,11,3,1,2,6,4,5}; + float result4_3[12]={11,12,9,10,3,4,1,2,7,8,5,6}; + float out[12]; + + sfftshifta(in,3,4,out); + for (i=0;i<12;i++) assert( out[i]-result3_4[i]==0); + + sfftshifta(in,4,3,out); + for (i=0;i<12;i++) assert( out[i]-result4_3[i]==0); + +} + +static void cfftshiftaTest(void){ + int i=0; + + float inR[]=SOURCE; + float result3_4[12]={9,7,8,12,10,11,3,1,2,6,4,5}; + float result4_3[12]={11,12,9,10,3,4,1,2,7,8,5,6}; + floatComplex out[12]; + float ZEROS[12]={0}; + floatComplex *in; + + in=FloatComplexMatrix(inR,ZEROS,12); + + cfftshifta(in,3,4,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result3_4[i]==0); + assert( cimags(out[i])==0); + } + + cfftshifta(in,4,3,out); + for (i=0;i<12;i++) { + assert( creals(out[i])-result4_3[i]==0); + assert( cimags(out[i])==0); + } + +} + +static int FftShiftTest(void){ + srowfftshiftaTest(); + crowfftshiftaTest(); + scolumnfftshiftaTest(); + ccolumnfftshiftaTest(); + sfftshiftaTest(); + cfftshiftaTest(); + return 0; +} + + +int main(void){ + assert (FftShiftTest()==0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj b/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj new file mode 100644 index 00000000..ea8aa7fd --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1EA7E165-A87C-49EA-90CB-2AECD5FED605} + testDoubleFftShift + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj.filters b/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj.filters new file mode 100644 index 00000000..d0da7186 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/test_DoubleFftShift/testDoubleFftShift.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj b/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj new file mode 100644 index 00000000..1b013a88 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CF3E80F1-A0B6-465B-9285-11753E84B7F4} + testFloatFftShift + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj.filters b/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj.filters new file mode 100644 index 00000000..f9761954 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/test_FloatFftShift/testFloatFftShift.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/fftshift/zcolumnfftshifta.c b/2.3-1/src/c/signalProcessing/fftshift/zcolumnfftshifta.c new file mode 100644 index 00000000..fc36acde --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/zcolumnfftshifta.c @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" + +static void Pair(doubleComplex* in,int rows,int columns,doubleComplex* out){ + int i=0,j=0; + + + for (i=0;i +#include "fftshift.h" + +void zfftshifta(doubleComplex* in,int rows,int columns,doubleComplex* out){ + doubleComplex* temp; + + /*FIXME : malloc here*/ + temp=(doubleComplex *) malloc((unsigned int)(rows*columns)*sizeof(doubleComplex)); + + zrowfftshifta(in,rows,columns,temp); + zcolumnfftshifta(temp,rows,columns,out); +} + + diff --git a/2.3-1/src/c/signalProcessing/fftshift/zrowfftshifta.c b/2.3-1/src/c/signalProcessing/fftshift/zrowfftshifta.c new file mode 100644 index 00000000..b5fbb699 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/fftshift/zrowfftshifta.c @@ -0,0 +1,45 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "fftshift.h" + +static void Pair(doubleComplex* in,int rows,int columns,doubleComplex* out){ + int i=0,j=0; + + for (i=0;i + +void dhilberta (double* in, int rows, int cols, doubleComplex *out){ + int i=0,size=rows*cols; + + + for (i=0;i0)&&(i<((size+1)/2))) out[i] = zmuls(out[i],DoubleComplex(2,0)); + if (i>(size/2)) out[i] = zmuls(out[i],DoubleComplex(0,0)); + } + + zifftma(out, rows, cols,out); +} + + diff --git a/2.3-1/src/c/signalProcessing/hilbert/dhilberts.c b/2.3-1/src/c/signalProcessing/hilbert/dhilberts.c new file mode 100644 index 00000000..87980311 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/dhilberts.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "hilbert.h" + +double dhilberts (double in){ + return in; +} diff --git a/2.3-1/src/c/signalProcessing/hilbert/shilberta.c b/2.3-1/src/c/signalProcessing/hilbert/shilberta.c new file mode 100644 index 00000000..c65bb564 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/shilberta.c @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "hilbert.h" +#include "fft.h" +#include "ifft.h" +#include "multiplication.h" + +void shilberta (float* in, int rows, int cols, floatComplex *out){ + int i; + int size=rows*cols; + + for (i=0;i0)&&(i<(size+1)/2)) out[i] = cmuls(out[i],FloatComplex(2,0)); + if (i>size/2) out[i] = cmuls(out[i],FloatComplex(0,0)); + } + + cifftma(out, rows, cols,out); +} diff --git a/2.3-1/src/c/signalProcessing/hilbert/shilberts.c b/2.3-1/src/c/signalProcessing/hilbert/shilberts.c new file mode 100644 index 00000000..92f2c7cc --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/shilberts.c @@ -0,0 +1,18 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "hilbert.h" + + +float shilberts (float in){ + return in; +} diff --git a/2.3-1/src/c/signalProcessing/hilbert/testHilbert.c b/2.3-1/src/c/signalProcessing/hilbert/testHilbert.c new file mode 100644 index 00000000..ad50e459 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/testHilbert.c @@ -0,0 +1,851 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include +#include "hilbert.h" + + +#define SOURCE2 {.7560438541695475578308,0.0002211346291005611420,\ +0.3303270917385816574097,0.6653811042197048664093} + +#define SOURCE3 {0.6283917883411049842835,0.8497452358715236186981,0.6857310198247432708740,\ +0.8782164813019335269928,0.0683740368112921714783,0.5608486062847077846527,\ +0.6623569373041391372681,0.7263506767340004444122,0.1985143842175602912903} + +#define SOURCE4 {0.5442573162727057933807,0.2320747897028923034668,0.2312237196601927280426,\ + 0.2164632631465792655945,\ +0.8833887814544141292572,0.6525134947150945663452,0.3076090742833912372589,\ + 0.9329616213217377662659,\ +0.2146007861010730266571,0.3126419968903064727783,0.3616361008025705814362,\ + 0.2922266637906432151794,\ +0.5664248815737664699554,0.4826471973210573196411,0.3321718913502991199493,\ + 0.5935094701126217842102} + +#define SOURCE5 {0.3572649653069674968720,0.7693399824202060699463,0.5477633909322321414948,\ + 0.0962288742884993553162,0.9561171731911599636078,\ +0.2207408566027879714966,0.0143259358592331409454,0.8191489772871136665344,\ + 0.1304992842487990856171,0.9682003557682037353516,\ +0.6561381467618048191071,0.2445538965985178947449,0.5283123566769063472748,\ + 0.8468925636261701583862,0.7876622085459530353546,\ +0.1262082615867257118225,0.7883860985748469829559,0.3453042469918727874756,\ + 0.2659857333637773990631,0.9709818651899695396423,\ +0.8875247663818299770355,0.2066752854734659194946,0.8525160965509712696075,\ + 0.6744697811082005500794,0.9152874383144080638886} + +#define SOURCE7 {0.0284859761595726013184,0.2367841475643217563629,0.7015343559905886650085,\ + 0.1202526628039777278900,0.8287412133067846298218,0.3161072959192097187042,\ + 0.5305190766230225563049,\ +0.5715174819342792034149,0.0478015430271625518799,0.8248619721271097660065,\ + 0.5798843121156096458435,0.2791808298788964748383,0.9545110929757356643677,\ + 0.9071154636330902576447,\ +0.3360149310901761054993,0.1175613063387572765350,0.9253723770380020141602,\ + 0.7263671257533133029938,0.9009497938677668571472,0.3948993249796330928803,\ + 0.5655179750174283981323,\ +0.7061489676125347614288,0.6787831196561455726624,0.413293636869639158249,\ + 0.1402290873229503631592,0.4952356130816042423248,0.4194877287372946739197,\ + 0.8626222289167344570160,\ +0.2857509646564722061157,0.2512136367149651050568,0.3389101596549153327942,\ + 0.3921975973062217235565,0.4681552127003669738770,0.3361602746881544589996,\ + 0.5336876614019274711609,\ +0.2039063959382474422455,0.1589989718049764633179,0.0181815107353031635284,\ + 0.4098370606079697608948,0.0105834598653018474579,0.1965309716761112213135,\ + 0.2725595370866358280182,\ +0.3437655037268996238709,0.2033702037297189235687,0.3011944610625505447388,\ + 0.2762595904059708118439,0.2944530742242932319641,0.5718073952011764049530,\ + 0.2141770124435424804688} + +#define SOURCE12 {0.5595936686731874942780,0.1249340316280722618103} + +#define SOURCE13 {0.7279222286306321620941,0.2677766475826501846314,0.5465334919281303882599} + +#define SOURCE14 {0.9885407658293843269348,0.7395656588487327098846,0.0037173107266426086426,\ +0.5900572859682142734528} + +#define SOURCE15 {0.3096467358991503715515,0.2552205710671842098236,0.6251879390329122543335,\ +0.1157417376525700092316,0.6117004090920090675354} + +#define SOURCE17 {0.6783956284634768962860,0.3320095278322696685791,0.0258709923364222049713,\ +0.5174468224868178367615,0.3916873238049447536469,0.2413538414984941482544,\ +0.5064434898085892200470} + +#define SOURCE31 {0.4236102001741528511047,0.2893727528862655162811,0.0887932181358337402344} + +#define SOURCE32 {0.6212881752289831638336,0.3454984454438090324402,0.7064867629669606685638,\ +0.5211472492665052413940,0.2870400850661098957062,0.6502795079723000526428} + +#define SOURCE34 {0.0881334762088954448700,0.4498763345181941986084,0.722725308034569025040,\ +0.8976796260103583335877,0.2427821881137788295746,0.4337721113115549087524,\ +0.9677053210325539112091,0.5068534435704350471497,0.523297640960663557053,\ +0.5596947595477104187012,0.5617307000793516635895,0.468176002614200115204} + +#define SOURCE35 {0.7794546722434461116791,0.7901071812957525253296,0.9808542062528431415558,\ +0.8187066102400422096252,0.4256872381083667278290,0.2461560554802417755127,\ +0.922953246627002954483,0.1000745808705687522888,0.4678218117915093898773,\ +0.3950497675687074661255,0.0366117102093994617462,0.5175368534401059150696,\ +0.8325451570563018321991,0.6104832142591476440430,0.1871111788786947727203} + +#define SOURCE37 {0.0189574835821986198425,0.8433564766310155391693,0.0748594831675291061401,\ +0.8532815133221447467804,0.0124590108171105384827,0.1867539356462657451630,\ +0.4920584075152873992920,0.7489608139730989933014,0.9414957007393240928650,\ +0.212405560072511434555,0.5795019958168268203735,0.2628147569485008716583,\ +0.4360986622050404548645,0.9110545101575553417206,0.8082667365670204162598,\ +0.8102653049863874912262,0.2590428395196795463562,0.4139087288640439510346,\ +0.3599927779287099838257,0.6912787933833897113800,0.7656858796253800392151} + + +#define RESULTR2 {0.5885168479289859533310,0.1677481408696621656418,\ +0.7082384515088051557541,0.2874697444494813680649} + +#define RESULTR3 {1.0529534542001781627363,0.7069182925236719983175,0.4039962973135212687126,\ +0.8377721576641001810515,0.3181039501602450081386,0.3515630165735879608668,\ +0.6943617464664080252135,0.5110746005860467011672,0.3817856512032448690341} + +#define RESULTR4 {0.6752608462702482938767,0.2057518342044204473496,-0.0427890990395098924637,\ + 0.3857955073472112417221,\ +0.9621772530954331159592,0.6242313084658235311508,0.3033984049689024686813,\ + 0.8866660052444785833359,\ +0.3456043160986155271530,0.2863190413918346166611,0.0876232821028679609299,\ + 0.4615589079912751913071,\ +0.6452133532147854566574,0.454365011071786284447,0.3279612220358103513718,\ + 0.5472138540353626012802} + +#define RESULTR5 {0.2962400295259193239161,0.3089018898394935153107,0.8970718315147718779912,\ + -0.1110250488619887454522,1.3355256841208691387379,\ +0.2186875433360468412580,0.0142399996764340786015,0.5494750142671456227816,\ + 0.1438244289733127678765,1.2266884235131985114720,\ +0.3243622761355875461220,0.146488853809641050852,0.8307917790741377039865,\ + 0.4672829933864904861096,1.294633269803495245753,\ +0.2689630731113705763846,0.3885024240640397863444,0.3410024486082647299234,\ + 0.3015788194209125805401,1.196819440502604692256,\ +0.5921953628411829040346,0.3931235221328068796254,0.7724433550837475070949,\ + 0.4311855720220420518096,1.3475255557490961599854} + +#define RESULTR7 {0.0221790934600933908882,0.1223243807506165237165,0.8078579279308952809657,\ + 0.0831055973421020999226,0.7234293187562024218806,0.3410300566625018015010,\ + 0.6624983534650656924470,\ +0.4173417573555355808423,-0.1702289447306715719499,0.8932521097561832990053,\ + 0.5795505696167876363845,0.4650900528477819317885,0.9531674534660129483044,\ + 1.0266996973802535730869,\ +0.3592502496807103984366,-0.0602177881600134204398,1.0040005062671357727311,\ + 0.5952560602897534192124,0.8458135965517576959627,0.4992619639538963260961,\ + 0.7233182455018367651434,\ +0.5575694746471103746544,0.5320442416692767739761,0.5114069770070045484189,\ + 0.2079572921340347990693,0.5832271371004160709362,0.3596406358527834412620,\ + 0.9639546237862767208426,\ +0.2693600210346490664293,0.0082908280086841923406,0.3916743713665618020769,\ + 0.2324071406142651508020,0.5392849148911003087648,0.4665026157423768915500,\ + 0.6985556154653854710190,\ +0.1211347285688481462129,0.0583534009281404877911,0.1331768173348806816314,\ + 0.4611817954035059563545,-0.0310306062323534859182,0.1483735266235425009906,\ + 0.3794082450879812107303,\ +0.2484192180646929426491,-0.0574661602186613551524,0.3494023378688325687236,\ + 0.1746705178068543862224,0.4728580805104006801187,0.6551060166287933084206,\ + 0.3620372301332393516482} + +#define RESULTR12 {0.5595936686731874942780,0.1249340316280722618103} + +#define RESULTR13 {0.727922228630632051072,0.2677766475826501846314,0.5465334919281302772376} + +#define RESULTR14 {0.9885407658293843269348,0.7395656588487327098846,0.0037173107266426086426,\ +0.5900572859682142734528} + +#define RESULTR15 {0.3096467358991503715515,0.2552205710671842098236,0.6251879390329122543335,\ +0.1157417376525700092316,0.6117004090920090675354} + +#define RESULTR17 {0.6783956284634768962860,0.3320095278322696685791,0.0258709923364222188491,\ +0.5174468224868178367615,0.3916873238049447536469,0.2413538414984941482544,\ +0.5064434898085892200470} + +#define RESULTR31 {0.4236102001741528511047,0.2893727528862655162811,0.0887932181358337541122} + +#define RESULTR32 {0.6562798103938499716392,0.1463829164082805778246,0.8706106568376222876182,\ +0.5846776299489041539559,0.0747807359633347046302,0.7990084763926764699349} + +#define RESULTR34 {0.2895147710417708131203,0.324826880668600381785,0.6463934670512875291237,\ +0.8825004372435311106315,0.1780484897705416069691,0.5136849984216192988029,\ +1.1690866158654293904817,0.3818039897208412303264,0.4469657999773820611367,\ +0.5445155707808831957451,0.4969970017361144409840,0.5480888897242645052543} + +#define RESULTR35 {1.0992448165164583340214,0.6267460169007069703540,0.8244252263748765852114,\ +0.9107979135927461999955,0.3598763258423408051279,0.219875664393563818866,\ +1.2103192873573502819085,-0.1660945217914423510663,0.4466248737231732213182,\ +0.5941534869981266453465,-0.0029212825965045929877,0.3579661268165908460937,\ +0.9791855748989433116947,0.4046034830239924606765,0.2463504922712086431247} + +#define RESULTR37 {0.0033434146069818981850,0.9554376522688345918510,-0.0216076234950733081508,\ +0.7336972769716557651876,0.0730809598165483853549,0.2457162229973169909059,\ +0.5179742532819129330335,0.7909655834196462897978,0.8735750855261512626271,\ +0.0801094846848779407189,0.7065129902723632504547,0.2680998378805983239914,\ +0.4433905356823317212012,0.9035067595439678633795,0.8085226137033167947976,\ +0.7242403070946337173552,0.4089553443197004867216,0.3500212219557769510736,\ +0.3025310230791596888267,0.6920164671332854622321,0.8224099607250346943843} + + +#define RESULTI2 {0,0,\ +0,0} + +#define RESULTI3 {0.0827980395095824772689,-0.1114116569690337538168,-0.0174490462390520933988,\ +-0.2070330189892598260482,-0.1130704082592781378747,-0.0128233225106435810847,\ +0.1242349794796773487793,0.2244820652283119055692,0.0302723687496956744836} + +#define RESULTI4 {0.1584819499403238296509,0.0849331486970186233521,-0.0122814085334539413452,\ + 0.1697260756045579910278,\ +-0.1648282650858163833618,0.0402836035937070846558,0.0652061905711889266968,\ + 0.0378817003220319747925,\ +-0.1584819499403238296509,-0.0849331486970186233521,0.0122814085334539413452,\ + -0.1697260756045579910278,\ +0.1648282650858163833618,-0.0402836035937070846558,-0.0652061905711889266968,\ + -0.0378817003220319747925} + +#define RESULTI5 {-0.2379577488223760806108,-0.1980500856853430191595,-0.2084157540378530903968,\ + -0.2009595577277856481846,-0.0885928718752091587385,\ +0.0642786760664435519175,-0.0992997005877370997329,0.0218942281271939376275,\ + 0.3748027917451171031615,-0.0032719016765754976861,\ +-0.0120583931462525106859,0.2181341408963820838185,-0.1102129389906743167638,\ + 0.0183158030378510194858,-0.0201291388704768203777,\ +0.1535920604590304550108,0.1089958127617958461020,-0.0864243708530107318522,\ + 0.0148125088838929608315,0.0167421638470533970522,\ +0.0321454054431545913073,-0.0297801673850977763336,0.3831588357543441736297,\ + -0.2069715459390754075386,0.0952517485752080866890} + +#define RESULTI7 {0.1409758334471349350281,0.0314029776230078383481,0.3019335556748578008879,\ + 0.2398099296761546650458,-0.0573140088334526676128,0.1432732614656592184943,\ + 0.4398940061473099460976,\ +0.2162564212505879712722,-0.1637770322583952942175,0.1579264489634253088024,\ + 0.2772819115997168237797,0.1711718089649424678900,0.1763527386616343117787,\ + 0.0538284803848837895002,\ +0.0479617156709556957672,0.4681440954755101135909,-0.2490982322246580449310,\ + -0.1915260827332628534858,-0.0036549673932591286718,-0.470893962786261499609,\ + -0.0386408325310867925562,\ +0.0046438722379344987701,-0.0050534006016343113732,-0.4130897490567612129198,\ + -0.2025604018656496918549,-0.2026110258293718491274,0.0911255775566176540181,\ + -0.0247913383142026599870,\ +-0.3363272079021759064510,-0.2442642889954655671669,-0.2069968083137898595680,\ + 0.0984957222872148985271,-0.3125265588587076148741,-0.2526097487856979739718,\ + -0.4062536135232318601496,\ +0.0341324589755990226436,-0.0326770186735925727284,-0.0666918900335931735812,\ + -0.0303613325286397894853,-0.1194235732677166039739,0.2006381933984195675702,\ + -0.1355401977319409256850,\ +-0.1076430936800362725414,-0.0537753325694302272697,0.4760166749905191396763,\ + -0.1911397464355340802822,0.5243583252175655351479,0.1121139404896287633529,\ + 0.1115034955682685374745} + +#define RESULTI12 {0,0} + +#define RESULTI13 {-0.1609403391213135858795,-0.104724835963155529783,0.2656651750844691295406} + +#define RESULTI14 {0.0747541864402592182159,-0.4924117275513708591461,-0.0747541864402592182159,\ +0.4924117275513708591461} + +#define RESULTI15 {-0.2934532919715012178052,0.2662942066238083160812,-0.1297453097398825194730,\ +-0.0162106544485858539151,0.1731150495361612751122} + +#define RESULTI17 {-0.0718252325460487783815,-0.3822405612852492473586,0.0883019157396930931547,\ +0.2043974836060600819288,-0.143817067391037223256,0.1155937622404165643353,\ +0.1895896996361655095775} + +#define RESULTI31 {0.1158046483820916738861,-0.1933066747090816384080,0.0775020263269899506442} + +#define RESULTI32 {0,0,0,\ +0,0,0} + +#define RESULTI34 {0.1689924332313239296877,-0.1594742559827864170075,-0.0172019456513225893479,\ +0.4397859224118292331696,0.0284885545261204103928,-0.0997138335369527201157,\ +-0.1689924332313239296877,0.1594742559827864170075,0.0172019456513225893479,\ +-0.4397859224118292331696,-0.0284885545261204103928,0.0997138335369527201157} + +#define RESULTI35 {-0.1316292475222873847862,-0.0038207475230211465633,-0.0291790984031743347304,\ +0.124318851362821516937,-0.4288056400198558271164,-0.2487686861965354157000,\ +-0.1774606387906726145953,-0.1910360457356966579212,0.1689989243063947654822,\ +-0.1696542221928825366906,0.3125071348259343961828,-0.2111224267558209632956,\ +0.3544252571430209775016,0.3111552984526392839904,0.3200712870491359551828} + +#define RESULTI37 {0.2189793220094558567901,-0.4489603496292741136031,-0.4937799046293088744974,\ +0.2870975885300787178167,-0.0153475020886480462146,0.6805622794419772247920,\ +-0.3638091467691619285141,0.3493297478826523638773,-0.1277224814869524771588,\ +0.0075644305010185153293,0.0001438303630438494962,0.103302919046026508987,\ +0.2871483917593231072196,-0.0213705070070041927566,0.0069067656750675318622,\ +-0.0442384488081716820140,-0.2780963082978277212121,-0.0838499868835354822405,\ +-0.392742137222542697650,0.4143010887770579020462,-0.0854195911632744664388} + +static void double2float (double* tabdouble, float* tabfloat,int size){ + int i; + + for(i=0;i>> Matrice 2*2 <<<\n"); + for (i=0;i<4;i++){ + if (zreals(out2[i])>1e-16) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i])) )<1e-16); + else assert(1); + if (zimags(out2[i])>1e-16) assert( (fabs(zimags(out2[i])-resI2[i]) / fabs(zimags(out2[i])) )<1e-16); + else assert(1); + } + + /* Matrice 3*3 */ + printf(">>> Matrice 3*3 <<<\n"); + for (i=0;i<9;i++){ + if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i])) )<3e-15); + else assert(1); + if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i])) )<3e-15); + else assert(1); + } + + /* Matrice 4*4 */ + printf(">>> Matrice 4*4 <<<\n"); + for (i=0;i<16;i++){ + if (zreals(out4[i])>1e-16) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i])) )<1e-16); + else assert(1); + if (zimags(out4[i])>1e-16) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i])) )<1e-16); + else assert(1); + } + + /* Matrice 5*5 */ + printf(">>> Matrice 5*5 <<<\n"); + for (i=0;i<25;i++){ + if (zreals(out5[i])>1e-16) assert( (fabs(zreals(out5[i])-resR5[i]) / fabs(zreals(out5[i])) )<3e-14); + else assert(1); + if (zimags(out5[i])>1e-16) assert( (fabs(zimags(out5[i])+resI5[i]) / fabs(zimags(out5[i])) )<3e-13); + else assert(1); + } + + /* Matrice 7*7 */ + printf(">>> Matrice 7*7 <<<\n"); + for (i=0;i<49;i++){ + if (zreals(out7[i])>1e-16) assert( (fabs(zreals(out7[i])-resR7[i]) / fabs(zreals(out7[i])) )<3e-14); + else assert(1); + if (zimags(out7[i])>1e-16) assert( (fabs(zimags(out7[i])+resI7[i]) / fabs(zimags(out7[i])) )<3e-14); + else assert(1); + } + + /* Vecteur 1*2 */ + printf(">>> Matrice 1*2 <<<\n"); + for (i=0;i<2;i++){ + if (zreals(out12[i])>1e-16) assert( (fabs(zreals(out12[i])-resR12[i]) / fabs(zreals(out12[i])) )<1e-16); + else assert(1); + if (zimags(out12[i])>1e-16) assert( (fabs(zimags(out12[i])+resI12[i]) / fabs(zimags(out12[i])) )<1e-16); + else assert(1); + } + + /* Vecteur 1*3 */ + printf(">>> Matrice 1*3 <<<\n"); + for (i=0;i<3;i++){ + if (zreals(out13[i])>1e-16) assert( (fabs(zreals(out13[i])-resR13[i]) / fabs(zreals(out13[i])) )<3e-16); + else assert(1); + if (zimags(out13[i])>1e-16) assert( (fabs(zimags(out13[i])+resI13[i]) / fabs(zimags(out13[i])) )<1e-16); + else assert(1); + } + + /* Vecteur 1*4 */ + printf(">>> Matrice 1*4 <<<\n"); + for (i=0;i<4;i++){ + if (zreals(out14[i])>1e-16) assert( (fabs(zreals(out14[i])-resR14[i]) / fabs(zreals(out14[i])) )<1e-16); + else assert(1); + if (zimags(out14[i])>1e-16) assert( (fabs(zimags(out14[i])+resI14[i]) / fabs(zimags(out14[i])) )<1e-16); + else assert(1); + } + + /* Vecteur 1*5 */ + printf(">>> Matrice 1*5 <<<\n"); + for (i=0;i<5;i++){ + if (zreals(out15[i])>1e-16) assert( (fabs(zreals(out15[i])-resR15[i]) / fabs(zreals(out15[i])) )<3e-15); + else assert(1); + if (zimags(out15[i])>1e-16) assert( (fabs(zimags(out15[i])+resI15[i]) / fabs(zimags(out15[i])) )<3e-15); + else assert(1); + } + + /* Vecteur 1*7 */ + printf(">>> Matrice 1*7 <<<\n"); + for (i=0;i<7;i++){ + if (zreals(out17[i])>1e-16) assert( (fabs(zreals(out17[i])-resR17[i]) / fabs(zreals(out17[i])) )<3e-16); + else assert(1); + if (zimags(out17[i])>1e-16) assert( (fabs(zimags(out17[i])+resI17[i]) / fabs(zimags(out17[i])) )<3e-15); + else assert(1); + } + + /* Matrices 3*1 */ + printf(">>> Matrice 3*1 <<<\n"); + for (i=0;i<3;i++){ + if (zreals(out31[i])>1e-16) assert( (fabs(zreals(out31[i])-resR31[i]) / fabs(zreals(out31[i])) )<3e-16); + else assert(1); + if (zimags(out31[i])>1e-16) assert( (fabs(zimags(out31[i])+resI31[i]) / fabs(zimags(out31[i])) )<1e-16); + else assert(1); + } + + /* Matrices 3*2 */ + printf(">>> Matrice 3*2 <<<\n"); + for (i=0;i<6;i++){ + if (zreals(out32[i])>1e-16) assert( (fabs(zreals(out32[i])-resR32[i]) / fabs(zreals(out32[i])) )<3e-15); + else assert(1); + if (zimags(out32[i])>1e-16) assert( (fabs(zimags(out32[i])+resI32[i]) / fabs(zimags(out32[i])) )<1e-16); + else assert(1); + } + + + /* Matrices 3*4 */ + printf(">>> Matrice 3*4 <<<\n"); + for (i=0;i<12;i++){ + if (zreals(out34[i])>1e-16) assert( (fabs(zreals(out34[i])-resR34[i]) / fabs(zreals(out34[i])) )<1e-16); + else assert(1); + if (zimags(out34[i])>1e-16) assert( (fabs(zimags(out34[i])+resI34[i]) / fabs(zimags(out34[i])) )<3e-15); + else assert(1); + } + + + /* Matrices 3*5 */ + printf(">>> Matrice 3*5 <<<\n"); + for (i=0;i<15;i++){ + if (zreals(out35[i])>1e-16) assert( (fabs(zreals(out35[i])-resR35[i]) / fabs(zreals(out35[i])) )<3e-15); + else assert(1); + if (zimags(out35[i])>1e-16) assert( (fabs(zimags(out35[i])+resI35[i]) / fabs(zimags(out35[i])) )<3e-14); + else assert(1); + } + + + /* Matrices 3*7 */ + printf(">>> Matrice 3*7 <<<\n"); + for (i=0;i<21;i++){ + if (zreals(out37[i])>1e-16) assert( (fabs(zreals(out37[i])-resR37[i]) / fabs(zreals(out37[i])) )<3e-13); + else assert(1); + if (zimags(out37[i])>1e-16) assert( (fabs(zimags(out37[i])+resI37[i]) / fabs(zimags(out37[i])) )<3e-14); + else assert(1); + } + + free(out2); + free(out3); + free(out4); + free(out5); + free(out7); + + free(out12); + free(out13); + free(out14); + free(out15); + free(out17); + + free(out31); + free(out32); + free(out34); + free(out35); + free(out37); +} + +static void shilbertaTest(void){ + int i; + double ind2[]=SOURCE2;float in2[4]; + double ind3[]=SOURCE3;float in3[9]; + double ind4[]=SOURCE4;float in4[16]; + double ind5[]=SOURCE5;float in5[25]; + double ind7[]=SOURCE7;float in7[49]; + double ind12[]=SOURCE12;float in12[2]; + double ind13[]=SOURCE13;float in13[3]; + double ind14[]=SOURCE14;float in14[4]; + double ind15[]=SOURCE15;float in15[5]; + double ind17[]=SOURCE17;float in17[7]; + double ind31[]=SOURCE31;float in31[3]; + double ind32[]=SOURCE32;float in32[6]; + double ind34[]=SOURCE34;float in34[12]; + double ind35[]=SOURCE35;float in35[15]; + double ind37[]=SOURCE37;float in37[21]; + + double resdR2[]=RESULTR2;float resR2[4]; + double resdR3[]=RESULTR3;float resR3[9]; + double resdR4[]=RESULTR4;float resR4[16]; + double resdR5[]=RESULTR5;float resR5[25]; + double resdR7[]=RESULTR7;float resR7[49]; + double resdR12[]=RESULTR12;float resR12[2]; + double resdR13[]=RESULTR13;float resR13[3]; + double resdR14[]=RESULTR14;float resR14[4]; + double resdR15[]=RESULTR15;float resR15[5]; + double resdR17[]=RESULTR17;float resR17[7]; + double resdR31[]=RESULTR31;float resR31[3]; + double resdR32[]=RESULTR32;float resR32[6]; + double resdR34[]=RESULTR34;float resR34[12]; + double resdR35[]=RESULTR35;float resR35[15]; + double resdR37[]=RESULTR37;float resR37[21]; + + double resdI2[]=RESULTI2;float resI2[4]; + double resdI3[]=RESULTI3;float resI3[9]; + double resdI4[]=RESULTI4;float resI4[16]; + double resdI5[]=RESULTI5;float resI5[25]; + double resdI7[]=RESULTI7;float resI7[49]; + double resdI12[]=RESULTI12;float resI12[2]; + double resdI13[]=RESULTI13;float resI13[3]; + double resdI14[]=RESULTI14;float resI14[4]; + double resdI15[]=RESULTI15;float resI15[5]; + double resdI17[]=RESULTI17;float resI17[7]; + double resdI31[]=RESULTI31;float resI31[3]; + double resdI32[]=RESULTI32;float resI32[6]; + double resdI34[]=RESULTI34;float resI34[12]; + double resdI35[]=RESULTI35;float resI35[15]; + double resdI37[]=RESULTI37;float resI37[21]; + + floatComplex *out2,*out3,*out4,*out5,*out7; + floatComplex *out12,*out13,*out14,*out15,*out17; + floatComplex *out31,*out32,*out34,*out35,*out37; + + out2=(floatComplex*)malloc((unsigned int)4*sizeof(floatComplex)); + out3=(floatComplex*)malloc((unsigned int)9*sizeof(floatComplex)); + out4=(floatComplex*)malloc((unsigned int)16*sizeof(floatComplex)); + out5=(floatComplex*)malloc((unsigned int)25*sizeof(floatComplex)); + out7=(floatComplex*)malloc((unsigned int)49*sizeof(floatComplex)); + + out12=(floatComplex*)malloc((unsigned int)2*sizeof(floatComplex)); + out13=(floatComplex*)malloc((unsigned int)3*sizeof(floatComplex)); + out14=(floatComplex*)malloc((unsigned int)4*sizeof(floatComplex)); + out15=(floatComplex*)malloc((unsigned int)5*sizeof(floatComplex)); + out17=(floatComplex*)malloc((unsigned int)7*sizeof(floatComplex)); + + out31=(floatComplex*)malloc((unsigned int)3*sizeof(floatComplex)); + out32=(floatComplex*)malloc((unsigned int)6*sizeof(floatComplex)); + out34=(floatComplex*)malloc((unsigned int)12*sizeof(floatComplex)); + out35=(floatComplex*)malloc((unsigned int)15*sizeof(floatComplex)); + out37=(floatComplex*)malloc((unsigned int)21*sizeof(floatComplex)); + + /* Mise en float */ + double2float(ind2,in2,4); + double2float(ind3,in3,9); + double2float(ind4,in4,16); + double2float(ind5,in5,25); + double2float(ind7,in7,49); + double2float(ind12,in12,2); + double2float(ind13,in13,3); + double2float(ind14,in14,4); + double2float(ind15,in15,5); + double2float(ind17,in17,7); + double2float(ind31,in31,3); + double2float(ind32,in32,6); + double2float(ind34,in34,12); + double2float(ind35,in35,15); + double2float(ind37,in37,21); + + double2float(resdR2,resR2,4); + double2float(resdR3,resR3,9); + double2float(resdR4,resR4,16); + double2float(resdR5,resR5,25); + double2float(resdR7,resR7,49); + double2float(resdR12,resR12,2); + double2float(resdR13,resR13,3); + double2float(resdR14,resR14,4); + double2float(resdR15,resR15,5); + double2float(resdR17,resR17,7); + double2float(resdR31,resR31,3); + double2float(resdR32,resR32,6); + double2float(resdR34,resR34,12); + double2float(resdR35,resR35,15); + double2float(resdR37,resR37,21); + + double2float(resdI2,resI2,4); + double2float(resdI3,resI3,9); + double2float(resdI4,resI4,16); + double2float(resdI5,resI5,25); + double2float(resdI7,resI7,49); + double2float(resdI12,resI12,2); + double2float(resdI13,resI13,3); + double2float(resdI14,resI14,4); + double2float(resdI15,resI15,5); + double2float(resdI17,resI17,7); + double2float(resdI31,resI31,3); + double2float(resdI32,resI32,6); + double2float(resdI34,resI34,12); + double2float(resdI35,resI35,15); + double2float(resdI37,resI37,21); + + /* Tests and assert */ + + /* Matrice 2*2 */ + printf(">>> Matrice 2*2 <<<\n"); + shilberta(in2, 2, 2, out2); + for (i=0;i<4;i++){ + if (creals(out2[i])>1e-16) assert( (fabs(creals(out2[i])-resR2[i]) / fabs(creals(out2[i])) )<1e-6); + else assert(1); + if (cimags(out2[i])>1e-16) assert( (fabs(cimags(out2[i])-resI2[i]) / fabs(cimags(out2[i])) )<1e-6); + else assert(1); + } + + /* Matrice 3*3 */ + printf(">>> Matrice 3*3 <<<\n"); + shilberta(in3, 3, 3, out3); + for (i=0;i<9;i++){ + if (creals(out3[i])>1e-16) assert( (fabs(creals(out3[i])-resR3[i]) / fabs(creals(out3[i])) )<1e-6); + else assert(1); + if (cimags(out3[i])>1e-16) assert( (fabs(cimags(out3[i])+resI3[i]) / fabs(cimags(out3[i])) )<3e-6); + else assert(1); + } + + /* Matrice 4*4 */ + printf(">>> Matrice 4*4 <<<\n"); + shilberta(in4, 4, 4, out4); + for (i=0;i<16;i++){ + if (creals(out4[i])>1e-16) assert( (fabs(creals(out4[i])-resR4[i]) / fabs(creals(out4[i])) )<1e-6); + else assert(1); + if (cimags(out4[i])>1e-16) assert( (fabs(cimags(out4[i])+resI4[i]) / fabs(cimags(out4[i])) )<1e-6); + else assert(1); + } + + /* Matrice 5*5 */ + printf(">>> Matrice 5*5 <<<\n"); + shilberta(in5, 5, 5, out5); + for (i=0;i<25;i++){ + if (creals(out5[i])>1e-16) assert( (fabs(creals(out5[i])-resR5[i]) / fabs(creals(out5[i])) )<3e-6); + else assert(1); + if (cimags(out5[i])>1e-16) assert( (fabs(cimags(out5[i])+resI5[i]) / fabs(cimags(out5[i])) )<3e-5); + else assert(1); + } + + /* Matrice 7*7 */ + printf(">>> Matrice 7*7 <<<\n"); + shilberta(in7, 7, 7, out7); + for (i=0;i<49;i++){ + if (creals(out7[i])>1e-16) assert( (fabs(creals(out7[i])-resR7[i]) / fabs(creals(out7[i])) )<1e-6); + else assert(1); + if (cimags(out7[i])>1e-16) assert( (fabs(cimags(out7[i])+resI7[i]) / fabs(cimags(out7[i])) )<3e-6); + else assert(1); + } + + /* Vecteur 1*2 */ + printf(">>> Matrice 1*2 <<<\n"); + shilberta(in12, 1, 2, out12); + for (i=0;i<2;i++){ + if (creals(out12[i])>1e-16) assert( (fabs(creals(out12[i])-resR12[i]) / fabs(creals(out12[i])) )<1e-6); + else assert(1); + if (cimags(out12[i])>1e-16) assert( (fabs(cimags(out12[i])+resI12[i]) / fabs(cimags(out12[i])) )<1e-6); + else assert(1); + } + + /* Vecteur 1*3 */ + printf(">>> Matrice 1*3 <<<\n"); + shilberta(in13, 1, 3, out13); + for (i=0;i<3;i++){ + if (creals(out13[i])>1e-16) assert( (fabs(creals(out13[i])-resR13[i]) / fabs(creals(out13[i])) )<1e-6); + else assert(1); + if (cimags(out13[i])>1e-16) assert( (fabs(cimags(out13[i])+resI13[i]) / fabs(cimags(out13[i])) )<1e-6); + else assert(1); + } + + /* Vecteur 1*4 */ + printf(">>> Matrice 1*4 <<<\n"); + shilberta(in14, 1, 4, out14); + for (i=0;i<4;i++){ + if (creals(out14[i])>1e-16) assert( (fabs(creals(out14[i])-resR14[i]) / fabs(creals(out14[i])) )<3e-6); + else assert(1); + if (cimags(out14[i])>1e-16) assert( (fabs(cimags(out14[i])+resI14[i]) / fabs(cimags(out14[i])) )<1e-6); + else assert(1); + } + + /* Vecteur 1*5 */ + printf(">>> Matrice 1*5 <<<\n"); + shilberta(in15, 1, 5, out15); + for (i=0;i<5;i++){ + if (creals(out15[i])>1e-16) assert( (fabs(creals(out15[i])-resR15[i]) / fabs(creals(out15[i])) )<1e-6); + else assert(1); + if (cimags(out15[i])>1e-16) assert( (fabs(cimags(out15[i])+resI15[i]) / fabs(cimags(out15[i])) )<1e-6); + else assert(1); + } + + /* Vecteur 1*7 */ + printf(">>> Matrice 1*7 <<<\n"); + shilberta(in17, 1, 7, out17); + for (i=0;i<7;i++){ + if (creals(out17[i])>1e-16) assert( (fabs(creals(out17[i])-resR17[i]) / fabs(creals(out17[i])) )<1e-6); + else assert(1); + if (cimags(out17[i])>1e-16) assert( (fabs(cimags(out17[i])+resI17[i]) / fabs(cimags(out17[i])) )<1e-6); + else assert(1); + } + + /* Matrices 3*1 */ + printf(">>> Matrice 3*1 <<<\n"); + shilberta(in31, 3, 1, out31); + for (i=0;i<3;i++){ + if (creals(out31[i])>1e-16) assert( (fabs(creals(out31[i])-resR31[i]) / fabs(creals(out31[i])) )<1e-6); + else assert(1); + if (cimags(out31[i])>1e-16) assert( (fabs(cimags(out31[i])+resI31[i]) / fabs(cimags(out31[i])) )<1e-6); + else assert(1); + } + + /* Matrices 3*2 */ + printf(">>> Matrice 3*2 <<<\n"); + shilberta(in32, 3, 2, out32); + for (i=0;i<6;i++){ + if (creals(out32[i])>1e-16) assert( (fabs(creals(out32[i])-resR32[i]) / fabs(creals(out32[i])) )<1e-6); + else assert(1); + if (cimags(out32[i])>1e-16) assert( (fabs(cimags(out32[i])+resI32[i]) / fabs(cimags(out32[i])) )<1e-6); + else assert(1); + } + + + /* Matrices 3*4 */ + printf(">>> Matrice 3*4 <<<\n"); + shilberta(in34, 3, 4, out34); + for (i=0;i<12;i++){ + if (creals(out34[i])>1e-16) assert( (fabs(creals(out34[i])-resR34[i]) / fabs(creals(out34[i])) )<1e-6); + else assert(1); + if (cimags(out34[i])>1e-16) assert( (fabs(cimags(out34[i])+resI34[i]) / fabs(cimags(out34[i])) )<1e-6); + else assert(1); + } + + + /* Matrices 3*5 */ + printf(">>> Matrice 3*5 <<<\n"); + shilberta(in35, 3, 5, out35); + for (i=0;i<15;i++){ + if (creals(out35[i])>1e-16) assert( (fabs(creals(out35[i])-resR35[i]) / fabs(creals(out35[i])) )<1e-6); + else assert(1); + if (cimags(out35[i])>1e-16) assert( (fabs(cimags(out35[i])+resI35[i]) / fabs(cimags(out35[i])) )<3e-6); + else assert(1); + } + + + /* Matrices 3*7 */ + printf(">>> Matrice 3*7 <<<\n"); + shilberta(in37, 3, 7, out37); + for (i=0;i<21;i++){ + if (creals(out37[i])>1e-16) assert( (fabs(creals(out37[i])-resR37[i]) / fabs(creals(out37[i])) )<3e-5); + else assert(1); + if (cimags(out37[i])>1e-16) assert( (fabs(cimags(out37[i])+resI37[i]) / fabs(cimags(out37[i])) )<3e-6); + else assert(1); + } + + free(out2); + free(out3); + free(out4); + free(out5); + free(out7); + + free(out12); + free(out13); + free(out14); + free(out15); + free(out17); + + free(out31); + free(out32); + free(out34); + free(out35); + free(out37); + +} + + +static int hilbertTest(void){ + printf("\n >>> Double Hilbert Tests <<<\n"); + dhilbertaTest(); + printf("\n >>> Float Hilbert Tests <<<\n"); + shilbertaTest(); + return 0; +} + + +int main (void){ + assert(hilbertTest()==0); + return 0; +} + + + + diff --git a/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj b/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj new file mode 100644 index 00000000..17dae405 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AE37524C-2EBB-4EAE-93B9-AE9C89323B1E} + testHilbert + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj.filters b/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj.filters new file mode 100644 index 00000000..0e5affae --- /dev/null +++ b/2.3-1/src/c/signalProcessing/hilbert/test_Hilbert/testHilbert.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/Makefile.am b/2.3-1/src/c/signalProcessing/ifft/Makefile.am new file mode 100644 index 00000000..2afc2287 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/Makefile.am @@ -0,0 +1,84 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + +libIfft_la_CFLAGS = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libIfft.la + +libIfft_la_SOURCES = $(HEAD) $(SRC) + +HEAD = ../includes/ifft.h \ + fft_internal.h + +SRC = zifftma.c \ + cifftma.c \ + difft2.c \ + difftbi.c \ + difftmx.c \ + ifft842.c \ + ir2tx.c \ + ir4tx.c \ + ir8tx.c\ + difftma.c \ + sifftma.c + + +#### +# Checking Part +#### + +check_INCLUDES = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatIfft testDoubleIfft testMatIfft + +TESTS = testFloatIfft testDoubleIfft testMatIfft + +# +# -*- Fftine Tests -*- +# +testFloatIfft_SOURCES = testFloatIfft.c +testFloatIfft_CFLAGS = $(check_INCLUDES) +testFloatIfft_LDADD = $(check_LDADD) + +testDoubleIfft_SOURCES = testDoubleIfft.c +testDoubleIfft_CFLAGS = $(check_INCLUDES) +testDoubleIfft_LDADD = $(check_LDADD) + + +testMatIfft_SOURCES = testMatIfft.c +testMatIfft_CFLAGS = $(check_INCLUDES) +testMatIfft_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/signalProcessing/ifft/Makefile.in b/2.3-1/src/c/signalProcessing/ifft/Makefile.in new file mode 100644 index 00000000..54721c8b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/Makefile.in @@ -0,0 +1,866 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatIfft$(EXEEXT) testDoubleIfft$(EXEEXT) \ + testMatIfft$(EXEEXT) +TESTS = testFloatIfft$(EXEEXT) testDoubleIfft$(EXEEXT) \ + testMatIfft$(EXEEXT) +subdir = src/c/signalProcessing/ifft +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libIfft_la_LIBADD = +am__objects_1 = +am__objects_2 = libIfft_la-zifftma.lo libIfft_la-cifftma.lo \ + libIfft_la-difft2.lo libIfft_la-difftbi.lo \ + libIfft_la-difftmx.lo libIfft_la-ifft842.lo \ + libIfft_la-ir2tx.lo libIfft_la-ir4tx.lo libIfft_la-ir8tx.lo \ + libIfft_la-difftma.lo libIfft_la-sifftma.lo +am_libIfft_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libIfft_la_OBJECTS = $(am_libIfft_la_OBJECTS) +libIfft_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libIfft_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleIfft_OBJECTS = testDoubleIfft-testDoubleIfft.$(OBJEXT) +testDoubleIfft_OBJECTS = $(am_testDoubleIfft_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la +testDoubleIfft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleIfft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleIfft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatIfft_OBJECTS = testFloatIfft-testFloatIfft.$(OBJEXT) +testFloatIfft_OBJECTS = $(am_testFloatIfft_OBJECTS) +testFloatIfft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatIfft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatIfft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testMatIfft_OBJECTS = testMatIfft-testMatIfft.$(OBJEXT) +testMatIfft_OBJECTS = $(am_testMatIfft_OBJECTS) +testMatIfft_DEPENDENCIES = $(am__DEPENDENCIES_1) +testMatIfft_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testMatIfft_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libIfft_la_SOURCES) $(testDoubleIfft_SOURCES) \ + $(testFloatIfft_SOURCES) $(testMatIfft_SOURCES) +DIST_SOURCES = $(libIfft_la_SOURCES) $(testDoubleIfft_SOURCES) \ + $(testFloatIfft_SOURCES) $(testMatIfft_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libIfft_la_CFLAGS = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libIfft.la +libIfft_la_SOURCES = $(HEAD) $(SRC) +HEAD = ../includes/ifft.h \ + fft_internal.h + +SRC = zifftma.c \ + cifftma.c \ + difft2.c \ + difftbi.c \ + difftmx.c \ + ifft842.c \ + ir2tx.c \ + ir4tx.c \ + ir8tx.c\ + difftma.c \ + sifftma.c + + +#### +# Checking Part +#### +check_INCLUDES = -I . \ + -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/signalProcessing/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + @LIBMATH@ + + +# +# -*- Fftine Tests -*- +# +testFloatIfft_SOURCES = testFloatIfft.c +testFloatIfft_CFLAGS = $(check_INCLUDES) +testFloatIfft_LDADD = $(check_LDADD) +testDoubleIfft_SOURCES = testDoubleIfft.c +testDoubleIfft_CFLAGS = $(check_INCLUDES) +testDoubleIfft_LDADD = $(check_LDADD) +testMatIfft_SOURCES = testMatIfft.c +testMatIfft_CFLAGS = $(check_INCLUDES) +testMatIfft_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/signalProcessing/ifft/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/signalProcessing/ifft/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libIfft.la: $(libIfft_la_OBJECTS) $(libIfft_la_DEPENDENCIES) + $(libIfft_la_LINK) -rpath $(pkglibdir) $(libIfft_la_OBJECTS) $(libIfft_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleIfft$(EXEEXT): $(testDoubleIfft_OBJECTS) $(testDoubleIfft_DEPENDENCIES) + @rm -f testDoubleIfft$(EXEEXT) + $(testDoubleIfft_LINK) $(testDoubleIfft_OBJECTS) $(testDoubleIfft_LDADD) $(LIBS) +testFloatIfft$(EXEEXT): $(testFloatIfft_OBJECTS) $(testFloatIfft_DEPENDENCIES) + @rm -f testFloatIfft$(EXEEXT) + $(testFloatIfft_LINK) $(testFloatIfft_OBJECTS) $(testFloatIfft_LDADD) $(LIBS) +testMatIfft$(EXEEXT): $(testMatIfft_OBJECTS) $(testMatIfft_DEPENDENCIES) + @rm -f testMatIfft$(EXEEXT) + $(testMatIfft_LINK) $(testMatIfft_OBJECTS) $(testMatIfft_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-cifftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-difft2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-difftbi.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-difftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-difftmx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-ifft842.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-ir2tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-ir4tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-ir8tx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-sifftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libIfft_la-zifftma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleIfft-testDoubleIfft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatIfft-testFloatIfft.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testMatIfft-testMatIfft.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libIfft_la-zifftma.lo: zifftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-zifftma.lo -MD -MP -MF $(DEPDIR)/libIfft_la-zifftma.Tpo -c -o libIfft_la-zifftma.lo `test -f 'zifftma.c' || echo '$(srcdir)/'`zifftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-zifftma.Tpo $(DEPDIR)/libIfft_la-zifftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zifftma.c' object='libIfft_la-zifftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-zifftma.lo `test -f 'zifftma.c' || echo '$(srcdir)/'`zifftma.c + +libIfft_la-cifftma.lo: cifftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-cifftma.lo -MD -MP -MF $(DEPDIR)/libIfft_la-cifftma.Tpo -c -o libIfft_la-cifftma.lo `test -f 'cifftma.c' || echo '$(srcdir)/'`cifftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-cifftma.Tpo $(DEPDIR)/libIfft_la-cifftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cifftma.c' object='libIfft_la-cifftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-cifftma.lo `test -f 'cifftma.c' || echo '$(srcdir)/'`cifftma.c + +libIfft_la-difft2.lo: difft2.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-difft2.lo -MD -MP -MF $(DEPDIR)/libIfft_la-difft2.Tpo -c -o libIfft_la-difft2.lo `test -f 'difft2.c' || echo '$(srcdir)/'`difft2.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-difft2.Tpo $(DEPDIR)/libIfft_la-difft2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='difft2.c' object='libIfft_la-difft2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-difft2.lo `test -f 'difft2.c' || echo '$(srcdir)/'`difft2.c + +libIfft_la-difftbi.lo: difftbi.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-difftbi.lo -MD -MP -MF $(DEPDIR)/libIfft_la-difftbi.Tpo -c -o libIfft_la-difftbi.lo `test -f 'difftbi.c' || echo '$(srcdir)/'`difftbi.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-difftbi.Tpo $(DEPDIR)/libIfft_la-difftbi.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='difftbi.c' object='libIfft_la-difftbi.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-difftbi.lo `test -f 'difftbi.c' || echo '$(srcdir)/'`difftbi.c + +libIfft_la-difftmx.lo: difftmx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-difftmx.lo -MD -MP -MF $(DEPDIR)/libIfft_la-difftmx.Tpo -c -o libIfft_la-difftmx.lo `test -f 'difftmx.c' || echo '$(srcdir)/'`difftmx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-difftmx.Tpo $(DEPDIR)/libIfft_la-difftmx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='difftmx.c' object='libIfft_la-difftmx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-difftmx.lo `test -f 'difftmx.c' || echo '$(srcdir)/'`difftmx.c + +libIfft_la-ifft842.lo: ifft842.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-ifft842.lo -MD -MP -MF $(DEPDIR)/libIfft_la-ifft842.Tpo -c -o libIfft_la-ifft842.lo `test -f 'ifft842.c' || echo '$(srcdir)/'`ifft842.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-ifft842.Tpo $(DEPDIR)/libIfft_la-ifft842.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ifft842.c' object='libIfft_la-ifft842.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-ifft842.lo `test -f 'ifft842.c' || echo '$(srcdir)/'`ifft842.c + +libIfft_la-ir2tx.lo: ir2tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-ir2tx.lo -MD -MP -MF $(DEPDIR)/libIfft_la-ir2tx.Tpo -c -o libIfft_la-ir2tx.lo `test -f 'ir2tx.c' || echo '$(srcdir)/'`ir2tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-ir2tx.Tpo $(DEPDIR)/libIfft_la-ir2tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ir2tx.c' object='libIfft_la-ir2tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-ir2tx.lo `test -f 'ir2tx.c' || echo '$(srcdir)/'`ir2tx.c + +libIfft_la-ir4tx.lo: ir4tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-ir4tx.lo -MD -MP -MF $(DEPDIR)/libIfft_la-ir4tx.Tpo -c -o libIfft_la-ir4tx.lo `test -f 'ir4tx.c' || echo '$(srcdir)/'`ir4tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-ir4tx.Tpo $(DEPDIR)/libIfft_la-ir4tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ir4tx.c' object='libIfft_la-ir4tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-ir4tx.lo `test -f 'ir4tx.c' || echo '$(srcdir)/'`ir4tx.c + +libIfft_la-ir8tx.lo: ir8tx.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-ir8tx.lo -MD -MP -MF $(DEPDIR)/libIfft_la-ir8tx.Tpo -c -o libIfft_la-ir8tx.lo `test -f 'ir8tx.c' || echo '$(srcdir)/'`ir8tx.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-ir8tx.Tpo $(DEPDIR)/libIfft_la-ir8tx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ir8tx.c' object='libIfft_la-ir8tx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-ir8tx.lo `test -f 'ir8tx.c' || echo '$(srcdir)/'`ir8tx.c + +libIfft_la-difftma.lo: difftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-difftma.lo -MD -MP -MF $(DEPDIR)/libIfft_la-difftma.Tpo -c -o libIfft_la-difftma.lo `test -f 'difftma.c' || echo '$(srcdir)/'`difftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-difftma.Tpo $(DEPDIR)/libIfft_la-difftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='difftma.c' object='libIfft_la-difftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-difftma.lo `test -f 'difftma.c' || echo '$(srcdir)/'`difftma.c + +libIfft_la-sifftma.lo: sifftma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -MT libIfft_la-sifftma.lo -MD -MP -MF $(DEPDIR)/libIfft_la-sifftma.Tpo -c -o libIfft_la-sifftma.lo `test -f 'sifftma.c' || echo '$(srcdir)/'`sifftma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libIfft_la-sifftma.Tpo $(DEPDIR)/libIfft_la-sifftma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sifftma.c' object='libIfft_la-sifftma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libIfft_la_CFLAGS) $(CFLAGS) -c -o libIfft_la-sifftma.lo `test -f 'sifftma.c' || echo '$(srcdir)/'`sifftma.c + +testDoubleIfft-testDoubleIfft.o: testDoubleIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleIfft_CFLAGS) $(CFLAGS) -MT testDoubleIfft-testDoubleIfft.o -MD -MP -MF $(DEPDIR)/testDoubleIfft-testDoubleIfft.Tpo -c -o testDoubleIfft-testDoubleIfft.o `test -f 'testDoubleIfft.c' || echo '$(srcdir)/'`testDoubleIfft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleIfft-testDoubleIfft.Tpo $(DEPDIR)/testDoubleIfft-testDoubleIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleIfft.c' object='testDoubleIfft-testDoubleIfft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleIfft_CFLAGS) $(CFLAGS) -c -o testDoubleIfft-testDoubleIfft.o `test -f 'testDoubleIfft.c' || echo '$(srcdir)/'`testDoubleIfft.c + +testDoubleIfft-testDoubleIfft.obj: testDoubleIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleIfft_CFLAGS) $(CFLAGS) -MT testDoubleIfft-testDoubleIfft.obj -MD -MP -MF $(DEPDIR)/testDoubleIfft-testDoubleIfft.Tpo -c -o testDoubleIfft-testDoubleIfft.obj `if test -f 'testDoubleIfft.c'; then $(CYGPATH_W) 'testDoubleIfft.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleIfft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleIfft-testDoubleIfft.Tpo $(DEPDIR)/testDoubleIfft-testDoubleIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleIfft.c' object='testDoubleIfft-testDoubleIfft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleIfft_CFLAGS) $(CFLAGS) -c -o testDoubleIfft-testDoubleIfft.obj `if test -f 'testDoubleIfft.c'; then $(CYGPATH_W) 'testDoubleIfft.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleIfft.c'; fi` + +testFloatIfft-testFloatIfft.o: testFloatIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatIfft_CFLAGS) $(CFLAGS) -MT testFloatIfft-testFloatIfft.o -MD -MP -MF $(DEPDIR)/testFloatIfft-testFloatIfft.Tpo -c -o testFloatIfft-testFloatIfft.o `test -f 'testFloatIfft.c' || echo '$(srcdir)/'`testFloatIfft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatIfft-testFloatIfft.Tpo $(DEPDIR)/testFloatIfft-testFloatIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatIfft.c' object='testFloatIfft-testFloatIfft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatIfft_CFLAGS) $(CFLAGS) -c -o testFloatIfft-testFloatIfft.o `test -f 'testFloatIfft.c' || echo '$(srcdir)/'`testFloatIfft.c + +testFloatIfft-testFloatIfft.obj: testFloatIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatIfft_CFLAGS) $(CFLAGS) -MT testFloatIfft-testFloatIfft.obj -MD -MP -MF $(DEPDIR)/testFloatIfft-testFloatIfft.Tpo -c -o testFloatIfft-testFloatIfft.obj `if test -f 'testFloatIfft.c'; then $(CYGPATH_W) 'testFloatIfft.c'; else $(CYGPATH_W) '$(srcdir)/testFloatIfft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatIfft-testFloatIfft.Tpo $(DEPDIR)/testFloatIfft-testFloatIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatIfft.c' object='testFloatIfft-testFloatIfft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatIfft_CFLAGS) $(CFLAGS) -c -o testFloatIfft-testFloatIfft.obj `if test -f 'testFloatIfft.c'; then $(CYGPATH_W) 'testFloatIfft.c'; else $(CYGPATH_W) '$(srcdir)/testFloatIfft.c'; fi` + +testMatIfft-testMatIfft.o: testMatIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatIfft_CFLAGS) $(CFLAGS) -MT testMatIfft-testMatIfft.o -MD -MP -MF $(DEPDIR)/testMatIfft-testMatIfft.Tpo -c -o testMatIfft-testMatIfft.o `test -f 'testMatIfft.c' || echo '$(srcdir)/'`testMatIfft.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatIfft-testMatIfft.Tpo $(DEPDIR)/testMatIfft-testMatIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatIfft.c' object='testMatIfft-testMatIfft.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatIfft_CFLAGS) $(CFLAGS) -c -o testMatIfft-testMatIfft.o `test -f 'testMatIfft.c' || echo '$(srcdir)/'`testMatIfft.c + +testMatIfft-testMatIfft.obj: testMatIfft.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatIfft_CFLAGS) $(CFLAGS) -MT testMatIfft-testMatIfft.obj -MD -MP -MF $(DEPDIR)/testMatIfft-testMatIfft.Tpo -c -o testMatIfft-testMatIfft.obj `if test -f 'testMatIfft.c'; then $(CYGPATH_W) 'testMatIfft.c'; else $(CYGPATH_W) '$(srcdir)/testMatIfft.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testMatIfft-testMatIfft.Tpo $(DEPDIR)/testMatIfft-testMatIfft.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testMatIfft.c' object='testMatIfft-testMatIfft.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testMatIfft_CFLAGS) $(CFLAGS) -c -o testMatIfft-testMatIfft.obj `if test -f 'testMatIfft.c'; then $(CYGPATH_W) 'testMatIfft.c'; else $(CYGPATH_W) '$(srcdir)/testMatIfft.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/signalProcessing/ifft/cifftma.c b/2.3-1/src/c/signalProcessing/ifft/cifftma.c new file mode 100644 index 00000000..209cdc92 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/cifftma.c @@ -0,0 +1,51 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ifft.h" + +void cifftma ( floatComplex* in , int rows, int cols, floatComplex* out) +{ + int i = 0 ; + /* these 3 variable are created to permit to use the value in the fortran functions + because they need doubleComplex matrix as arguments and we can't cast directly the pointers + without having problems , i know that's ugly */ + doubleComplex *dblin = NULL; + doubleComplex *dblout = NULL; + + + + /* Array allocations*/ + dblin = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(rows * cols)); + dblout = (doubleComplex*)malloc(sizeof(doubleComplex) * (unsigned int)(rows * cols)); + + + + /*copy and cast all the floatComplex value into doubleComplex value */ + for ( i = 0 ; i < (rows * cols) ; i ++ ) + { + dblin[i] = DoubleComplex ( (double) creals( in[i]) , (double) cimags ( in[i])) ; + } + + zifftma ( dblin, rows , cols , dblout ); + + + for ( i = 0 ; i < (rows * cols) ; i++ ) + { + out[i] = FloatComplex ((float) zreals ( dblout[i]) , (float) zimags ( dblout[i])) ; + + } + + free ( dblin); + free ( dblout); + +} diff --git a/2.3-1/src/c/signalProcessing/ifft/diffbi_lavraie.c b/2.3-1/src/c/signalProcessing/ifft/diffbi_lavraie.c new file mode 100644 index 00000000..d71dc8c7 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/diffbi_lavraie.c @@ -0,0 +1,243 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "max.h" +#include "ifft_internal.h" + +void difftbi ( double* a , double* b , int nseg , int n , int nspn , + int isn , int ierr , int lout , int lnow , int lused , + int lmax , int lbook , double* rstak , int* istak ) +{ + + int nfac[15] ; + int i ; + int in ; + int j = 3 ; + int j2 = 3 ; + int j3 = 3 ; + int jj = 9; + int m = 0 ; + int k ; + int kt ; + int kkk ; + int nspan ; + int nitems ; + int ntot ; + int maxp = 0; + int maxf ; + int itype; + int istkgt ; + int isize[] = {1,1,1,2,2} ; + + int nf = abs ( n ) ; + + ierr = 0 ; + printf ( "debut de dfftbi \n" ); + /*determine the factors of n */ + + + if ( nf == 1) + return ; + + k = nf ; + + nspan = abs ( nf*nspn ) ; + ntot = abs ( nspan*nseg) ; + + if ( isn*ntot == 0 ) + { + ierr = 1 ; + return ; + } + +printf ("un petit test kplop %d\n" , k - (int)(k/16)*16 ) ; + + while ( (k- (int)(k/16)*16 ) == 0 ) + { + m++; + printf ("m %d ,k %d ,k2 %d\n" , m , k ,(int) (k/16)*16 ); + nfac[m-1] = 4 ; + k = k >> 4 ; + } + +printf ("avant ploa k %d\n\n" , k ); + do + { + while ( k%jj == 0 ) + { + m++; + nfac[m-1] = j ; + k /= jj ; + printf ("\nm %d ,k %d j %f jj %d\n" , m , k ,j , jj); + } + + j+=2; + jj= j*j ; + + }while ( jj <= k); + + +printf ( "ploa\n" ); + + + if ( k <= 4) + { + kt = m; + nfac[m+1] = k; + if ( k != 1 ) + m++; + } + else + { + if ( (k & 7) != 0 ) + { + m++; + nfac[m-1] = 2 ; + k = k >> 2 ; + } + + /*all square factor out now but k >= 5 still */ + kt = m ; + maxp = max ( (kt+1)*2 , k-1); + j=2; + printf ( "plob\n" ); + do + { + if ( k%j == 0 ) + { + m++; + nfac[m-1] = j ; + k /= j ; + } + + j = (j+1) | 1 ; + + }while ( j <= k ); + + } + + if ( m <= ( kt+1) ) + maxp = m + kt + 1 ; + + if ( m + kt > 15) + { + ierr = 2 ; + printf ( "argh return 5 \n" ); + return ; + } + if ( kt != 0 ) + { + j = kt ; + + do{ + m++; + nfac[m-1] = nfac[j-1]; + j--; + }while ( j != 0) ; + } + + maxf = nfac[m-kt-1] ; + + if ( kt > 0 ) + maxf = max ( nfac[kt-1] , maxf ); + + for ( kkk = 1 ; kkk < m ; kkk++ ) + maxf = max ( maxf , nfac[kkk-1]); + + nitems = maxf * 4 ; + itype = 4 ; + + istkgt = ( lnow*isize[1] -1)/isize[itype-1] + 2; + + i = ( (istkgt - 1 + nitems) * isize[itype-1] -1) / isize[1] + 3 ; + printf ("i %d ,\n lmax %d\n istkgt %d\n lnow %d \n", i , lmax , istkgt , lnow ) ; + + + + if ( i > lmax ) + { + ierr = -i ; + printf ( "argh return 4 -i %d \n" , -i ); + return ; + } + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + j = istkgt ; + jj = j + maxf ; + j2 = jj+ maxf ; + j3 = j2+ maxf ; + + nitems = maxp ; + itype = 2 ; + + istkgt = ( lnow*isize[1] -1)/isize[itype-1] + 2; + + i = ( (istkgt - 1 + nitems) * isize[itype-1] -1) / isize[1] + 3 ; + + if ( i > lmax ) + { + ierr = -i ; + printf ( "argh return 4 -i %d \n" , -i ); + return ; + } + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + k = istkgt ; + +/* +c la carte suivante est a supprimer si simple precision +c next instruction commented by FD&MG (simulog residue?) +c ******************************************** +c k=2*k-1 +c ********************************************* +*/ + + printf ( "dfftmx me voilà tayoooooooo \n" ); + difftmx( a , b , ntot , nf , nspan , isn , m , kt , &rstak[j-1] , &rstak[jj-1] , &rstak[j2-1] , &rstak[j3-1] , &istak[k-1] , nfac); + + k =2 ; + + in = 2 ; + + if (!( lbook <= lnow && lnow <= lused && lused <= lmax )) + { + ierr = 3 ; + printf ( "argh return 6 \n" ); + return ; + } + + while ( in > 0) + { + if ( lbook > istak[lnow-1] || istak[lnow-1] >= lnow-1) + { + ierr = 4 ; + } + + lout-- ; + lnow = istak[lnow-1] ; + in-- ; + } + printf ( "fin de dfftbi \n" ); + return ; +} diff --git a/2.3-1/src/c/signalProcessing/ifft/difft2.c b/2.3-1/src/c/signalProcessing/ifft/difft2.c new file mode 100644 index 00000000..f8488d3b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/difft2.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ifft_internal.h" + +void difft2 ( double* a , double* b , int nseg , int n , int nspn , int isn , int ierr ) +{ + + + difftbi ( a , b , nseg , n , nspn , isn , ierr ); + + + + return ; +} diff --git a/2.3-1/src/c/signalProcessing/ifft/difftbi.c b/2.3-1/src/c/signalProcessing/ifft/difftbi.c new file mode 100644 index 00000000..2b60ef27 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/difftbi.c @@ -0,0 +1,321 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "max.h" +#include "ifft_internal.h" + + +/* +c arrays a and b originally hold the real and imaginary +c components of the data, and return the real and +c imaginary components of the resulting fourier coefficients. +c multivariate data is indexed according to the fortran +c array element successor function, without limit +c on the number of implied multiple subscripts. +c the subroutine is called once for each variate. +c the calls for a multivariate transform may be in any order. +c +c n is the dimension of the current variable. +c nspn is the spacing of consecutive data values +c while indexing the current variable. +c nseg*n*nspn is the total number of complex data values. +c the sign of isn determines the sign of the complex +c exponential, and the magnitude of isn is normally one. +c the magnitude of isn determines the indexing increment for a&b. +c +c if fft is called twice, with opposite signs on isn, an +c identity transformation is done...calls can be in either order. +c the results are scaled by 1/n when the sign of isn is positive. +c +c a tri-variate transform with a(n1,n2,n3), b(n1,n2,n3) +c is computed by +c call fft(a,b,n2*n3,n1,1,-1) +c call fft(a,b,n3,n2,n1,-1) +c call fft(a,b,1,n3,n1*n2,-1) +c +c a single-variate transform of n complex data values is computed by +c call fft(a,b,1,n,1,-1) +c +c the data may alternatively be stored in a single complex +c array a, then the magnitude of isn changed to two to +c give the correct indexing increment and a(2) used to +c pass the initial address for the sequence of imaginary +c values, e.g. +c +c +c array nfac is working storage for factoring n. the smallest +c number exceeding the 15 locations provided is 12,754,584. +c! +*/ + +void difftbi ( double* a , double* b , int nseg , int n , int nspn , + int isn , int ierr) +{ + + double* rstak ; + int* istak ; + + int lout = 0 ; + int lnow = 10; + int lused= 10; + + int lbook = 10 ; + + + int nfac[15] ; + int i ; + int in ; + int j = 3 ; + int j2 = 3 ; + int j3 = 3 ; + int jj = 9; + int m = 0 ; + int k ; + int kt ; + int kkk ; + int nspan ; + int nitems ; + int ntot ; + int maxp = 0; + int maxf ; + int itype; + int istkgt ; + int isize[] = {1,1,1,2,2} ; + + int nf = abs ( n ) ; + + ierr = 0 ; + + /*determine the factors of n */ + + + if ( nf == 1) + return ; + + k = nf ; + + nspan = abs ( nf*nspn ) ; + ntot = abs ( nspan*nseg) ; + + + if ( isn*ntot == 0 ) + { + ierr = 1 ; + return ; + } + + + + + while ( (k- (int)(k/16)*16 ) == 0 ) + { + m++; + nfac[m-1] = 4 ; + k = k >> 4 ; + } + + + + + do + { + while ( k%jj == 0 ) + { + m++; + nfac[m-1] = j ; + k /= jj ; + + } + + j+=2; + jj= j*j ; + + }while ( jj <= k); + + + + + + if ( k <= 4) + { + + kt = m; + nfac[m] = k; + if ( k != 1 ) + m++; + } + else + { + if ( (k & 3) == 0 ) + { + m++; + nfac[m-1] = 2 ; + k = k >> 2 ; + } + + /*all square factor out now but k >= 5 still */ + kt = m ; + maxp = max ( (kt+1)*2 , k-1); + j=2; + + do + { + if ( k%j == 0 ) + { + + m++; + nfac[m-1] = j ; + k /= j ; + } + + j = (j+1) | 1 ; + + }while ( j <= k ); + + } + + + + if ( m <= ( kt+1) ) + maxp = m + kt + 1 ; + + + + if ( m + kt > 15) + { + ierr = 2 ; + + return ; + } + + + if ( kt != 0 ) + { + j = kt ; + + do{ + m++; + + nfac[m-1] = nfac[j-1]; + j--; + }while ( j != 0) ; + } + + + maxf = nfac[m-kt-1] ; + + if ( kt > 0 ) + maxf = max ( nfac[kt-1] , maxf ); + + + + + for ( kkk = 1 ; kkk <= m ; kkk++ ) + { + maxf = max ( maxf , nfac[kkk-1]); + + } + + + + + + + + nitems = maxf * 4 ; + itype = 4 ; + + + istkgt = 2 + ((lnow-1)/2) ;/*lnow = 10*/ + istkgt = 6; + + /*i = ( (istkgt - 1 + nitems) * isize[3] -1) + 3 ;*/ + i = 12 + nitems*2; + + + + istak = (int*) malloc ( sizeof (int) * (unsigned int) i); + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + j = istkgt ; + jj = j + maxf ; + j2 = jj+ maxf ; + j3 = j2+ maxf ; + + nitems = maxp ; + itype = 2 ; + + /*istkgt = ( lnow*isize[1] -1)/isize[1] + 2;*/ + istkgt = lnow + 1 ; + /*i = ( (istkgt - 1 + nitems) * isize[1] -1) / isize[1] + 3 ;*/ + i = ( ( lnow + nitems) * isize[1] -1) / isize[1] + 3 ; + istak = (int*) realloc ( istak ,sizeof (int) * (unsigned int) i); + rstak = (double*) malloc ( sizeof (double) * (unsigned int) i); + + + + + + + istak[i-2] = itype ; + istak[i-1] = lnow ; + lout ++ ; + lnow = i ; + lused = max ( lused , lnow ); + + k = istkgt ; + +/* +c la carte suivante est a supprimer si simple precision +c next instruction commented by FD&MG (simulog residue?) +c ******************************************** +c k=2*k-1 +c ********************************************* +*/ + + + + difftmx( a , b , ntot , nf , nspan , isn , m , kt , &rstak[j-1] , &rstak[jj-1] , &rstak[j2-1] , &rstak[j3-1] , &istak[k-1] , nfac); + + k =2 ; + + in = 2 ; + + if (!( lbook <= lnow && lnow <= lused )) + { + ierr = 3 ; + return ; + } + + while ( in > 0) + { + if ( lbook > istak[lnow-1] || istak[lnow-1] >= lnow-1) + { + ierr = 4 ; + } + + lout-- ; + lnow = istak[lnow-1] ; + in-- ; + } + + free(istak); + free(rstak); + return ; +} diff --git a/2.3-1/src/c/signalProcessing/ifft/difftma.c b/2.3-1/src/c/signalProcessing/ifft/difftma.c new file mode 100644 index 00000000..9b4bc6e3 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/difftma.c @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ifft.h" +#include "zeros.h" + + +void difftma ( double* in , int rows, int cols, double* out){ + double* ZEROS; + doubleComplex* inCpx; + doubleComplex* outCpx; + + ZEROS = (double*)malloc((unsigned int)(rows*cols)*sizeof(double)); + outCpx = (doubleComplex*)malloc((unsigned int)(rows*cols)*sizeof(doubleComplex)); + + dzerosa(ZEROS,rows,cols); + inCpx=DoubleComplexMatrix(in,ZEROS,rows*cols); + + zifftma(inCpx,rows,cols,outCpx); + + zreala(outCpx, rows*cols, out); +} diff --git a/2.3-1/src/c/signalProcessing/ifft/difftmx.c b/2.3-1/src/c/signalProcessing/ifft/difftmx.c new file mode 100644 index 00000000..a2cce1b6 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/difftmx.c @@ -0,0 +1,1253 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include "max.h" +#include "min.h" +#include "ifft_internal.h" + + +/*c'est moche je sais */ + +static double* a ; +static double* b ; +static int ntot ; +static int n ; +static int nspan ; +static int isn ; +static int m ; +static int kt ; +static double* wt ; +static double* ck ; +static double* bt ; +static double* sk ; +static int* np ; +static int* nfac ; +static int inc ; +static int nt ; +static int ks ; + +static double rad ; +static double c72 ; +static double s72 ; +static double s120 ; + +static double aa ; +static double ak ; +static double akm ; +static double akp ; +static double aj ; +static double ajp ; +static double ajm ; + +static double bb ; +static double bk ; +static double bkm ; +static double bkp ; +static double bj ; +static double bjp ; +static double bjm ; +static double dr ; + +static double cd ; +static double c1 ; +static double c2 ; +static double c3 ; + +static double sd ; +static double s1 ; +static double s2 ; +static double s3 ; + +static int kspan ; +static int nn ; +static int jc ; +static int klim ; +static int jf ; +static int maxf ; +static int kk ; +static int k ; +static int k1 ; +static int k2 ; +static int k3 ; +static int k4 ; +static int mm ; +static int kspnn ; +static int i ; +static int j ; +static int jj; + +/* Prototypes */ + +static void preliminaryWork (void); +static void permute_stage1 (void); +static void permute_stage2 (void); +static void f4t_150 (void); +static void factorOf3Transform (void) ; +static void factorOf5Transform (void) ; +static void preFOtherTransform (void); +static void factorOfOtherTransform (void); +static void pre_sqFactor2NormlOrder (void); +static void nonSqFactor2NormOrder (void) ; +static void detPermutCycles (void); +static void reorderMatrix (void ) ; + +static int f4t_170 (void); +static int factorTransform (void); +static int pre_fOf2Trans (void); +static int factorOf2Transform (void); +static int factorOf4Transform (void); +static int mulByRotationFactor (void ); +static int post_sqFactor2NormlOrder (void); +static void single_sqFactor2NormlOrder (void); +static int multi_sqFactor2NormlOrder (void); + +/* End Prototypes */ + + + +int difftmx ( double* _pdblA , double* _pdblB , int _iNtot, int _iN, int _iNspan, + int _iIsn, int _iM, int _iKt, double* _pdblWt, double* _pdblCk, + double* _pdblBt, double* _pdblSk, int* _piNp, int* _piNfac) +{ + + int retVal = 0 ; + int iii = 0 ; + a = _pdblA ; + b = _pdblB ; + + ntot = _iNtot ; + n = _iN ; + nspan= _iNspan ; + isn = _iIsn; + m = _iM ; + kt = _iKt ; + wt = _pdblWt ; + ck = _pdblCk; + bt = _pdblBt; + sk = _pdblSk; + np = _piNp; + nfac = _piNfac; + + inc = abs ( isn ) ; + nt = inc*ntot ; + ks = inc*nspan; + rad = atan (1.0); + + c72 = cos (rad/0.6250); + s72 = sin (rad/0.6250); + s120= sqrt(0.750); + + + + + + + + preliminaryWork () ; + + + while ( retVal == 0 ) + { + + retVal = factorTransform ( ) ; + } + + + np[0] = ks ; + + if ( kt != 0) + { + + permute_stage1 ( ) ; + } + + if ( 2*kt + 1 < m ) + { + + permute_stage2 ( ) ; + } + + +/* lines under are just for my own conveniance */ + for ( iii = 0 ; iii < 3 ; iii++) + { + + + + } + + _pdblA = a ; + _pdblB = b ; + + return 0 ; +} + +/** ************************************** +Sous-Fonctions +******************************************/ + + + + +static void preliminaryWork (void) +{ + + int lim ; + + + + ak =(double) 1/n ; + + /*scale by 1/n for isn > 0 */ + for ( j = 1 ; j <= nt ; j += inc ) + { + a[j-1] *= ak ; + b[j-1] *= ak ; + + } + kspan = ks ; + nn = nt -inc ; + jc = ks/n ; + + /* sin , cos values are re-initialized each lim steps */ + + lim = 32 ; + klim = lim*jc ; + i = 0; + jf = 0 ; + + maxf = m -kt ; + maxf = nfac[maxf-1] ; + + + + if ( kt > 0 ) + maxf = max ( nfac[kt-1] , maxf ); + + +} + + +/*40*/ +/* this function is call as many time as dfftbi has determined factor for the size of the input vector + each time we call a transform function for each kind of factor , we begin by the smallest + factor are stored in nfac + */ + +static int factorTransform (void) +{ + + int retVal = 42; + + dr = 8 * (double)jc/(double)kspan ; + cd = 2 * sin(0.5*dr*rad)*sin(0.5*dr*rad); + sd = sin(dr*rad) ; + kk = 1 ; + i++ ; + + + + +switch ( nfac[i-1] ) + { + case 2 : + /*transform for factor of 2 (including rotation factor)*/ + + retVal = pre_fOf2Trans() ; + if ( retVal == 0 ) factorOf2Transform () ; + + break ; + + case 4 : + /*transform for factor of 4 */ + kspnn = kspan ; + kspan = kspan >> 2 ; /*kspan /= 4 */ + + retVal = factorOf4Transform () ; + break ; + + case 3 : + /*transform for factor of 3 */ + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + factorOf3Transform ( ) ; + break ; + + case 5 : + /*transform for factor of 5 */ + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + factorOf5Transform ( ) ; + break ; + + default : + + k = nfac[i-1] ; + kspnn = kspan ; + kspan = kspan / k ; + + if ( nfac[i-1] != jf) preFOtherTransform ( ) ; + + factorOfOtherTransform ( ) ; + break ; + } + + + + if ( retVal == 42 ) + { + if ( i != m) retVal = mulByRotationFactor ( ) ; + else retVal = 1 ; + } + + if ( retVal == 1 ) return 1 ; /*goto permute */ + else return 0 ; /*goto factor_transform => once again*/ + +} + +/* permutation for square factor of n */ +static void permute_stage1 (void) +{ + + int retVal = 1 ; + + pre_sqFactor2NormlOrder () ; + + if ( n == ntot ) + /*permutation for single-variate transform (optional code)*/ + while ( retVal == 1) + { + single_sqFactor2NormlOrder () ; + retVal = post_sqFactor2NormlOrder () ; + } + else + /*permutation for multivariate transform*/ + while ( retVal == 1) retVal = multi_sqFactor2NormlOrder (); + +} + +static void permute_stage2 (void) +{ + kspnn = np[kt] ; + + /*permutation for square-free facotrs of n */ + nonSqFactor2NormOrder () ; + + /*determine the permutation cycles of length greater than 1*/ + detPermutCycles (); + + j = k3 + 1; + nt -= kspnn ; + i = nt - inc + 1 ; + while ( nt >= 0 ) + { + reorderMatrix ( ) ; + + j = k3 + 1 ; + nt -= kspnn ; + i = nt - inc + 1 ; + } +} + +/***************************************** +Sous-Sous-Fonctions +******************************************/ + + + + + +static int pre_fOf2Trans (void) +{ + kspan /= 2; + k1 = kspan + 2 ; + /*50*/ + do{ + do{ + k2 = kk + kspan ; + ak = a[k2-1] ; + bk = b[k2-1] ; + + a[k2-1] = a[kk-1] - ak; + b[k2-1] = b[kk-1] - bk; + + a[kk-1] = a[kk-1] + ak; + b[kk-1] = b[kk-1] + bk; + + kk = k2 + kspan ; + }while (kk <= nn); + + kk -= nn ; + }while (kk <= jc); + + + if ( kk > kspan ) return 1 ; /*goto350*/ + else return 0 ; /*goto60*/ + + +} + + + +static int factorOf2Transform (void) +{ + do /*60*/ {/*while ( kk <= jc*2 )*/ + c1 = 1 - cd ; + s1 = sd ; + mm = min( k1/2 , klim); + + do/* do 80 */ {/*while ( kk <= mm || ( kk > mm && kk < k2 ))*/ + do {/*while(kk > k2) */ + do { /*while ( kk < nt )*/ + k2 = kk + kspan; + + ak = a[kk-1] - a[k2-1]; + bk = b[kk-1] - b[k2-1]; + + a[kk-1] = a[kk-1] + a[k2-1]; + b[kk-1] = b[kk-1] + b[k2-1]; + + a[k2-1] = c1*ak - s1*bk; + b[k2-1] = s1*ak + c1*bk; + + kk = k2 + kspan; + }while ( kk < nt ); + + k2 = kk - nt; + c1 = -c1; + kk = k1 - k2; + + + }while (kk > k2); + + kk += jc; + + if ( kk <= mm ) /* 70 */ + { + ak = c1 - ( cd*c1+sd*s1) ; + s1 += (sd*c1-cd*s1) ; + /*c the following three statements compensate for truncation + c error. if rounded arithmetic is used, substitute + c c1=ak*/ + c1 = 0.5/(ak*ak+s1*s1) + 0.5 ; + s1 *= c1 ; + c1 *= ak ; + } + else { + if ( kk < k2 ) /*90*/ { + s1 = dr*rad*((double)(kk-1)/(double)jc); + c1 = cos(s1) ; + s1 = sin(s1) ; + mm = min(k1/2,mm+klim); + } + } + + } while ( kk <= mm || ( kk > mm && kk < k2 )); + + k1 += (inc+inc) ; + kk = (k1-kspan)/2 + jc; + + } while ( kk <= jc*2 ); + + + return 0 ; /*goto40*/ +} + + +/* this one is just an optimisation of the factor of 2 transform , we compute more things each turn */ + +static int factorOf4Transform (void) +{ + int return_value = 0 ; + + /*120*/ + do + { + c1 = 1 ; + s1 = 0 ; + + mm = min ( kspan , klim ) ; + + do + { + f4t_150 () ; + return_value = f4t_170 () ; + } while ( return_value == 0 ); + + kk += ( inc - kspan ) ; + } while ( kk <= jc ) ; + + + + if ( kspan == jc ) + return 1 ; /*goto350*/ + else + return 0 ;/*goto40*/ + + +} + +/*this function and the following are just here for conveniance , they just do fourier transformation for factor of 4 + but as the code was a bit long in factorof4transform , we've created two sub-functions */ + +static void f4t_150 (void) +{ + + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + k3 = k2 + kspan ; + + akp = a[kk-1] + a[k2-1] ; + akm = a[kk-1] - a[k2-1] ; + + ajp = a[k1-1] + a[k3-1] ; + ajm = a[k1-1] - a[k3-1] ; + + a[kk-1] = akp + ajp ; + ajp = akp - ajp ; + + bkp = b[kk-1] + b[k2-1] ; + bkm = b[kk-1] - b[k2-1] ; + + bjp = b[k1-1] + b[k3-1] ; + bjm = b[k1-1] - b[k3-1] ; + + b[kk-1] = bkp + bjp ; + bjp = bkp - bjp ; + + akp = akm - bjm ; + akm = akm + bjm ; + + bkp = bkm + ajm ; + bkm = bkm - ajm ; + + if ( s1 == 0 )/*190*/ + { + a[k1-1] = akp ; + a[k2-1] = ajp ; + a[k3-1] = akm ; + + b[k1-1] = bkp ; + b[k2-1] = bjp ; + b[k3-1] = bkm ; + + + } + else /*160*/ + { + + a[k1-1] = akp*c1 - bkp*s1 ; + a[k2-1] = ajp*c2 - bjp*s2 ; + a[k3-1] = akm*c3 - bkm*s3 ; + + a[k1-1] = bkp*c1 + akp*s1 ; + a[k2-1] = bjp*c2 + ajp*s2 ; + a[k3-1] = bkm*c3 + akm*s3 ; + } + kk=k3+kspan; + }while ( kk <= nt ) ; + + +} + +static int f4t_170 (void) +{ + kk += ( jc - nt ) ; + + if ( kk <= mm ) + { + c2 = c1 - (cd*c1 + sd*s1); + s1 = s1 + (sd*c1 - cd*s1); + + /* + the following three statements compensate for truncation + error. if rounded arithmetic is used, substitute + c1=c2 + */ + + c1 = 0.5/(c2*c2+s1*s1) + 0.5 ; + s1 *= c1 ; + c1 *= c2 ; + + /*140*/ + + c2 = c1*c1 - s1*s1 ; + s2 = c1*s1*2 ; + c3 = c2*c1 - s2*s1 ; + s3 = c2*s1 + s2*c1 ; + + + return 0 ; + + } + else + { + if ( kk <= kspan ) + { + s1 = dr*rad * (kk-1)/jc ; + c1 = cos (s1) ; + s1 = sin (s1) ; + mm = min ( kspan , mm + klim ); + + /*140*/ + + c2 = c1*c1 - s1*s1 ; + s2 = c1*s1*2 ; + c3 = c2*c1 - s2*s1 ; + s3 = c2*s1 + s2*c1 ; + + return 0 ; + } + } + + return 1 ; +} + + + + +static void factorOf3Transform (void) +{ + do{ + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + + ak = a[kk-1] ; + bk = b[kk-1] ; + + aj = a[k1-1] + a[k2-1] ; + bj = b[k1-1] + b[k2-1] ; + + a[kk-1] = ak + aj ; + b[kk-1] = bk + bj ; + + ak = -0.5*aj + ak ; + bk = -0.5*bj + bk ; + + aj = (a[k1-1] - a[k2-1])*s120 ; + bj = (b[k1-1] - b[k2-1])*s120 ; + + a[k1-1] = ak - bj ; + b[k1-1] = bk + aj ; + a[k2-1] = ak + bj ; + b[k2-1] = bk - aj ; + + kk = k2 + kspan ; + } while (kk < nn); + + kk -= nn ; + }while (kk <= kspan); + +} + +static void factorOf5Transform (void) +{ + c2 = c72*c72 - s72 *s72 ; + s2 = 2 * c72*s72; + + do{ + do{ + k1 = kk + kspan ; + k2 = k1 + kspan ; + k3 = k2 + kspan ; + k4 = k3 + kspan ; + + + + akp = a[k1-1] + a[k4-1] ; + akm = a[k1-1] - a[k4-1] ; + + bkp = b[k1-1] + b[k4-1] ; + bkm = b[k1-1] - b[k4-1] ; + + ajp = a[k2-1] + a[k3-1] ; + ajm = a[k2-1] - a[k3-1] ; + + bjp = b[k2-1] + b[k3-1] ; + bjm = b[k2-1] - b[k3-1] ; + + aa = a[kk-1] ; + bb = b[kk-1] ; + + a[kk-1] = aa + akp + ajp; + b[kk-1] = bb + bkp + bjp; + + ak = akp*c72 + ajp*c2 + aa ; + bk = bkp*c72 + bjp*c2 + bb ; + + aj = akm*s72 + ajm*s2 ; + bj = bkm*s72 + bjm*s2 ; + + a[k1-1] = ak - bj ; + a[k4-1] = ak + bj ; + b[k1-1] = bk + aj ; + b[k4-1] = bk - aj ; + + ak = akp*c2 + ajp*c72 + aa ; + bk = bkp*c2 + bjp*c72 + bb ; + + aj = akm*s2 - ajm*s72 ; + + bj = bkm*s2 - bjm*s72 ; + + a[k2-1] = ak - bj ; + a[k3-1] = ak + bj ; + b[k2-1] = bk + aj ; + b[k3-1] = bk - aj ; + + kk = k4 + kspan; + }while (kk < nn); + + kk -= nn ; + }while (kk <= kspan); +} + +/* this function is the general case of non factor of 2 factor , the factorof3transform and factorof5trandform are just +special case of this one */ + + +static void preFOtherTransform (void) +{ + jf = k ; + s1 = (rad*8)/k ; + c1 = cos (s1) ; + s1 = sin (s1) ; + ck[jf-1] = 1 ; + sk[jf-1] = 0 ; + j = 1 ; + + do + { + ck[j-1] = ck[k-1] * c1 + sk[k-1]*s1 ; + sk[j-1] = ck[k-1] * s1 - sk[k-1]*c1 ; + + k -- ; + + ck[k-1] = ck[j-1] ; + sk[k-1] = - sk[j-1] ; + + j++ ; + + }while ( j < k ); + +} + +static void factorOfOtherTransform (void) +{ +int ktemp = 0 ; + +do + { + k1 = kk ; + k2 = kk + kspnn ; + + aa = a[kk-1] ; + bb = b[kk-1] ; + + ak = aa ; + bk = bb ; + j = 1 ; + k1 += kspan ; + + do + { + k2 -= kspan ; + j++ ; + + wt[j-1] = a[k1-1] + a[k2-1] ; + ak = wt[j-1] + ak ; + + bt[j-1] = b[k1-1] + b[k2-1] ; + bk = bt[j-1] + bk ; + j++ ; + + wt[j-1] = a[k1-1] - a[k2-1] ; + bt[j-1] = b[k1-1] - b[k2-1] ; + + k1 += kspan; + }while ( k1 < k2 ) ; + + a[kk-1] = ak ; + b[kk-1] = bk ; + + k1 = kk ; + k2 = kk + kspnn ; + j = 1 ; + + do + { + k1 += kspan ; + k2 -= kspan ; + jj = j ; + ak = aa ; + bk = bb ; + aj = 0 ; + bj = 0 ; + k = 1 ; + + do + { + k++ ; + ak += ( wt[k-1] * ck[jj-1] ) ; + bk += ( bt[k-1] * ck[jj-1] ) ; + + k++ ; + aj += (wt[k-1] * sk[jj-1]) ; + bj += (bt[k-1] * sk[jj-1]) ; + jj += j ; + + if ( jj > jf ) + jj -= jf ; + } while ( k < jf ) ; + + k = jf - j ; + a[k1-1] = ak - bj ; + b[k1-1] = bk + aj ; + a[k2-1] = ak + bj ; + b[k2-1] = bk - aj ; + + j++ ; + + }while ( j < k ) ; + + + + + + kk += kspnn ; + ktemp = kk ; + + if ( kk > nn ) + { + kk -= nn; + } + +}while ( ktemp <= nn || (kk <= kspan && ( ktemp > nn)) ); +} + + + + +static int mulByRotationFactor (void ) +{ + int ktemp = 0 ; + + if ( i != m ) + { + kk = jc + 1 ; + + /*300*/ + do + { + c2 = 1 - cd ; + s1 = sd ; + + mm = min ( kspan , klim ) ; + + /*320 */ + do + { + + c1 = c2 ; + s2 = s1 ; + kk += kspan ; + + do + { + + ak = a[kk-1] ; + a[kk-1] = c2*ak - s2*b[kk-1] ; + b[kk-1] = s2*ak + c2*b[kk-1] ; + + kk += kspnn ; + ktemp = kk ; + + + if ( kk > nt ) + { + ak = s1*s2 ; + s2 = s1*c2 + s2*c1 ; + c2 = c1*c2 - ak ; + kk += (kspan - nt ) ; + + + + } + + }while (ktemp <= nt || ( kk <= kspnn && ktemp > nt )) ; + + kk += ( jc - kspnn ); + + + if ( kk <= mm ) + { + + /* 310*/ + c2 = c1 - ( cd*c1 + sd*s1 ) ; + s1 += (sd*c1 - cd*s1 ) ; + + /* + the following three statements compensate for truncation + error. if rounded arithmetic is used, substitute + c1=c2 + */ + + c1 = 0.5/(c2*c2+s1*s1) + 0.5 ; + s1 *= c1 ; + c2 *= c1 ; + } + else + { + if ( kk <= kspan ) + { + + s1 = dr*rad * (kk-1)/jc ; + c2 = cos (s1) ; + s1 = sin (s1) ; + mm = min ( kspan , mm + klim ); + } + } + + }while ( kk <= mm ||( kk <= kspan && kk > mm ) ) ; + + kk += (jc + inc -kspan ); + + + }while ( kk <= jc+jc); + + + return 0 ; /* goto40 */ + } + + return 1 ; /* goto350*/ +} + + + + +static void pre_sqFactor2NormlOrder (void) +{ + + k = kt + kt + 1 ; + + if ( m < k ) + k -- ; + + j = 1 ; + np[k] = jc ; + + do + { + np[j] = np[j-1]/nfac[j-1] ; + np[k-1] = np[k]*nfac[j-1] ; + + j++ ; + k-- ; + }while ( j < k ) ; + + k3 = np[k] ; + kspan = np[1] ; + kk = jc + 1 ; + k2 = kspan + 1 ; + j = 1; + + +} + +static int post_sqFactor2NormlOrder (void) +{ + + do + { + do + { + k2 -= np[j-1] ; + j++ ; + k2 += np[j] ; + + } while ( k2 > np[j-1]); + + j = 1 ; + +/* 390 */ + do + { + if ( kk < k2 ) + { + + + return 1 ; + } + else + { + kk += inc ; + k2 += kspan ; + } + }while( k2 < ks ); + + }while ( kk < ks ) ; + + jc = k3 ; + + return 0; +} + + +/* appeler cetter fonction dans un do while valeur_retour != 1)*/ +static void single_sqFactor2NormlOrder (void) +{ + + + do + { + + ak = a[kk-1] ; + a[kk-1] = a[k2-1] ; + a[k2-1] = ak ; + + bk = b[kk-1] ; + b[kk-1] = b[k2-1] ; + b[k2-1] = bk ; + + kk += inc ; + k2 += kspan ; + } while ( k2 < ks ); + + /*380*/ +} + +/*idem que single_ */ +static int multi_sqFactor2NormlOrder (void) +{ + + + + k = kk + jc ; + + do /*410*/ + { + ak = a[kk-1] ; + a[kk-1] = a[k2-1] ; + a[k2-1] = ak ; + bk = b[kk-1] ; + b[kk-1] = b[k2-1] ; + b[k2-1] = bk ; + kk += inc ; + k2 += kspan ; + } while ( kk < k ); + + kk += (ks - jc ) ; + k2 += (ks - jc ) ; + + if ( kk < nt ) + return 1 ; + + k2 += ( kspan - nt ); + kk += ( jc - nt ); + + if ( k2 < ks ) + { + + return 1 ; + } + if( post_sqFactor2NormlOrder ( ) == 1 ) + { + + return 1 ; + } + jc = k3 ; + + return 0; + +} + + + +static void nonSqFactor2NormOrder (void) +{ + + j = m - kt ; + nfac[j] = 1 ; + + + + do + { + nfac[j-1] *= nfac[j] ; + + j-- ; + + + }while ( j != kt ) ; + + kt ++ ; + nn = nfac[kt-1] - 1; + + jj = 0 ; + j = 0; + + /*480*/ + + k2 = nfac[kt-1] ; + k = kt + 1 ; + kk = nfac[k-1] ; + j ++ ; + + while ( j <= nn ) + { + jj += kk ; + + + while ( jj >= k2 ) + { + jj -= k2 ; + k2 = kk ; + k++ ; + kk = nfac[k-1] ; + + jj += kk ; + + + } + + np[j-1] = jj ; + k2 = nfac[kt-1] ; + k = kt + 1 ; + kk = nfac[k-1] ; + j ++ ; + + } + + j = 0 ; + + return ; +} + +/* here we determine how many permutation cycles we need to do */ +static void detPermutCycles (void) +{ + + do + { + do + { + j++ ; + + kk = np[j-1] ; + }while ( kk < 0 ) ; + + + if ( kk != j ) + { + do + { + + k = kk ; + kk = np[k-1] ; + np[k-1] = -kk ; + }while ( kk != j ) ; + k3 = kk ; + } + else + np[j-1] = -j ; + }while ( j != nn ); + + maxf *= inc ; + + return ; +} + +static void reorderMatrix (void) +{ +do + { + do + { + j-- ; + + }while (np[j-1] < 0 ) ; + + jj = jc ; + + /*520*/ + do + { + kspan = jj ; + + if ( jj > maxf ) + kspan = maxf ; + + jj -= kspan ; + k = np [j-1]; + kk = jc*k + i + jj ; + k1 = kk + kspan ; + k2 = 0 ; + + do /*530*/ + { + k2 ++ ; + wt[k2-1] = a[k1-1] ; + bt[k2-1] = b[k1-1] ; + k1 -= inc ; + + }while ( k1 != kk ); + + do + { + k1 = kk + kspan ; + k2 = k1 - jc * (k + np[k-1]); + k = -np[k-1]; + + + do + { + a[k1-1] = a[k2-1] ; + b[k1-1] = b[k2-1] ; + + k1 -= inc ; + k2 -= inc ; + + }while ( k1 != kk ) ; + + kk = k2 ; + + }while ( k != j ); + + k1 = kk +kspan ; + k2 = 0 ; + /*560*/ + + do + { + k2 ++ ; + a[k1-1] = wt[k2-1] ; + b[k1-1] = bt[k2-1] ; + k1 -= inc ; + + + }while ( k1 != kk ) ; + + } while ( jj != 0 ) ; +}while ( j != 1 ) ; + + return ; +} + + diff --git a/2.3-1/src/c/signalProcessing/ifft/ifft842.c b/2.3-1/src/c/signalProcessing/ifft/ifft842.c new file mode 100644 index 00000000..75f6e1ca --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/ifft842.c @@ -0,0 +1,163 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "ifft_internal.h" + + + +/* get binary log of integer argument; exact if n a power of 2 */ +static int fastlog2( int n) +{ + int log = -1; + while(n) { + log++; + n >>= 1; + } + return(log); +} + +/* + int in; FORWARD or INVERSE + int n; length of vector + DPCOMPLEX *b; input vector +*/ +void ifft842 (doubleComplex* b, int size , int in) +{ + double fn; + doubleComplex temp ; + + int L[16],L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14,L15; + int j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14; + int i = 0, j, ij, ji, ij1, ji1; + int n2pow, n8pow, nthpo, ipass, nxtlt, lengt; + + n2pow = fastlog2( size ); + nthpo = size ; + fn = nthpo; + + + if(in==INVERSE) + /*scramble inputs*/ + + for(i=0,j=size/2;j + + + +/* +** radix 8 iteration subroutine +*/ + +/* this function do in one turn the same computation that do radix 2 in three turns */ + +void ir8tx ( int nxtlt,int nthpo,int lengt, + doubleComplex* cc0,doubleComplex* cc1,doubleComplex* cc2,doubleComplex* cc3, + doubleComplex* cc4,doubleComplex* cc5,doubleComplex* cc6,doubleComplex* cc7) + +{ + + + int j , kk; + double dblP7 = 1 / sqrt(2.0) ; + double dblPi2 = 8 * atan(1.0); + + double scale, arg; + double c1,c2,c3,c4,c5,c6,c7; + double s1,s2,s3,s4,s5,s6,s7; + + doubleComplex Atemp0,Atemp1,Atemp2,Atemp3,Atemp4,Atemp5,Atemp6,Atemp7; + doubleComplex Btemp0,Btemp1,Btemp2,Btemp3,Btemp4,Btemp5,Btemp6,Btemp7; + + doubleComplex temp ; + + + scale = dblPi2/lengt; + + + for(j=0;j0) + { + cc1[kk] = DoubleComplex ( (c4 * (zreals(Btemp0) - zreals(Btemp1))) - (s4 * (zimags(Btemp0) - zimags(Btemp1))), + c4 * (zimags(Btemp0) - zimags(Btemp1)) + s4 * (zreals(Btemp0) - zreals(Btemp1))); + + cc2[kk] = DoubleComplex ( c2 * (zreals(Btemp2) - zimags(Btemp3)) - s2 * (zimags(Btemp2) + zreals(Btemp3)) , + c2 * (zimags(Btemp2) + zreals(Btemp3)) + s2 * (zreals(Btemp2) - zimags(Btemp3))); + + cc3[kk] = DoubleComplex ( c6 * (zreals(Btemp2) + zimags(Btemp3)) - s6 * (zimags(Btemp2) - zreals(Btemp3)) , + c6 * (zimags(Btemp2) - zreals(Btemp3)) + s6 * (zreals(Btemp2) + zimags(Btemp3))); + + + temp = DoubleComplex ( dblP7*(zreals ( Btemp5 ) - zimags( Btemp5 )) , + dblP7*(zreals ( Btemp5 ) + zimags( Btemp5 )) ); + + cc4[kk] = DoubleComplex ( c1 * (zreals (Btemp4) + zreals(temp)) - s1 * (zimags (Btemp4) + zimags(temp)) , + c1 * (zimags (Btemp4) + zimags(temp)) + s1 * (zreals (Btemp4) + zreals(temp))); + cc5[kk] = DoubleComplex ( c5 * (zreals (Btemp4) - zreals(temp)) - s5 * (zimags (Btemp4) - zimags(temp)) , + c5 * (zimags (Btemp4) - zimags(temp)) + s5 * (zreals (Btemp4) - zreals(temp))); + + + temp = DoubleComplex ( - dblP7*(zreals ( Btemp7 ) + zimags( Btemp7 )) , + dblP7*(zreals ( Btemp7 ) - zimags( Btemp7 )) ); + + cc6[kk] = DoubleComplex ( c3 * (zreals (Btemp6) + zreals(temp)) - s3 * (zimags (Btemp6) + zimags(temp)) , + c3 * (zimags (Btemp6) + zimags(temp)) + s3 * (zreals (Btemp6) + zreals(temp))); + cc7[kk] = DoubleComplex ( c7 * (zreals (Btemp6) - zreals(temp)) - s7 * (zimags (Btemp6) - zimags(temp)) , + c7 * (zimags (Btemp6) - zimags(temp)) + s7 * (zreals (Btemp6) - zreals(temp))); + + + + + } + else + { + cc1[kk] = zdiffs ( Btemp0 , Btemp1 ); + + cc2[kk] = DoubleComplex ( zreals ( Btemp2 ) - zimags( Btemp3 ) , + zimags ( Btemp2 ) + zreals( Btemp3 ) ); + + + cc3[kk] = DoubleComplex ( zreals ( Btemp2 ) + zimags( Btemp3 ) , + zimags ( Btemp2 ) - zreals( Btemp3 ) ); + + + temp = DoubleComplex ( dblP7*(zreals ( Btemp5 ) - zimags( Btemp5 )) , + dblP7*(zreals ( Btemp5 ) + zimags( Btemp5 )) ); + + cc4[kk] = zadds ( Btemp4 , temp ); + cc5[kk] = zdiffs ( Btemp4 , temp ); + + temp = DoubleComplex ( - dblP7*(zreals ( Btemp7 ) + zimags( Btemp7 )) , + dblP7*(zreals ( Btemp7 ) - zimags( Btemp7 )) ); + + cc6[kk] = zadds ( Btemp6 , temp ); + cc7[kk] = zdiffs ( Btemp6 , temp ); + + + } + + } + } + + +} diff --git a/2.3-1/src/c/signalProcessing/ifft/sifftma.c b/2.3-1/src/c/signalProcessing/ifft/sifftma.c new file mode 100644 index 00000000..63661bae --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/sifftma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "ifft.h" +#include "zeros.h" + +void sifftma ( float* in , int rows, int cols, float* out){ + float* ZEROS; + floatComplex* inCpx; + floatComplex* outCpx; + + ZEROS = (float*)malloc((unsigned int)(rows*cols)*sizeof(float)); + outCpx = (floatComplex*)malloc((unsigned int)(rows*cols)*sizeof(floatComplex)); + + szerosa(ZEROS,rows,cols); + inCpx=FloatComplexMatrix(in,ZEROS,rows*cols); + + cifftma(inCpx,rows,cols,outCpx); + + creala(outCpx, rows*cols, out); + + free(ZEROS); + free(outCpx); +} diff --git a/2.3-1/src/c/signalProcessing/ifft/testDoubleIfft.c b/2.3-1/src/c/signalProcessing/ifft/testDoubleIfft.c new file mode 100644 index 00000000..9c09d1b9 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/testDoubleIfft.c @@ -0,0 +1,1301 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include +#include +#include "ifft.h" + + +#define ROW 1 +#define COLS2 2 +#define COLS3 3 +#define COLS4 4 +#define COLS5 5 +#define COLS6 6 +#define COLS7 7 +#define COLS8 8 +#define COLS9 9 +#define COLS10 10 +#define COLS11 11 +#define COLS12 12 +#define COLS13 13 +#define COLS14 14 +#define COLS15 15 +#define COLS16 16 +#define COLS32 32 + +#define ZREAL_IN2 { 0.00022113462910056 , 0.33032709173858166 } +#define ZIMAG_IN2 { 0.66538110421970487 , 0.62839178834110498 } + +#define ZREAL_IN3 { 2.48206677380949259, 0.43537130765616894, 0.97385666053742170} +#define ZIMAG_IN3 { 2.14807060454040766,- 0.78285905346274376, 0.42632796149700880} + + +#define ZREAL_IN4 { 0.84974523587152362, 0.68573101982474327, 0.87821648130193353, 0.06837403681129217} +#define ZIMAG_IN4 { 0.56084860628470778, 0.66235693730413914, 0.72635067673400044, 0.19851438421756029} + +#define ZREAL_IN5 { 0.84974523587152362, 0.68573101982474327, 0.87821648130193353, 0.06837403681129217,\ + 0.65251349471509457} +#define ZIMAG_IN5 { 0.56084860628470778, 0.66235693730413914, 0.72635067673400044, 0.19851438421756029,\ + 0.56642488157376647} + +#define ZREAL_IN6 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.65251349471509457, 0.30760907428339124 } +#define ZIMAG_IN6 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.56642488157376647, 0.59350947011262178 } + +#define ZREAL_IN7 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.65251349471509457, 0.88338878145441413, 0.30760907428339124 } +#define ZIMAG_IN7 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.40948254754766822, 0.56642488157376647, 0.59350947011262178 } + + + +#define ZREAL_IN8 { 0.54425731627270579, 0.23207478970289230, 0.23122371966019273, 0.21646326314657927,\ + 0.88338878145441413, 0.65251349471509457, 0.30760907428339124, 0.93296162132173777 } +#define ZIMAG_IN8 { 0.21460078610107303, 0.31264199689030647, 0.36163610080257058, 0.2922266637906432,\ + 0.56642488157376647, 0.48264719732105732, 0.33217189135029912, 0.59350947011262178} + + +#define ZREAL_IN9 { 0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.30760907428339124, 0.93296162132173777, 0.21460078610107303, 0.31264199689030647,\ + 0.43685875833034515} +#define ZIMAG_IN9 { 0.26931248093023896, 0.63257448654621840, 0.40519540151581168, 0.91847078315913677,\ + 0.28064980218186975, 0.12800584640353918, 0.77831285959109664, 0.21190304495394230,\ + 0.68568959552794695} + + +#define ZREAL_IN10 { 0.21646326314657927, 0.65251349471509457, 0.63257448654621840, 0.31264199689030647,\ + 0.93296162132173777, 0.31264199689030647, 0.48185089323669672, 0.48264719732105732,\ + 0.2922266637906432 , 0.48264719732105732 } +#define ZIMAG_IN10 { 0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.11383596854284406, 0.19983377400785685, 0.56186607433483005, 0.58961773291230202,\ + 0.23122371966019273, 0.21646326314657927} +/* +#define ZREAL_IN10 { 1,2,3,4,5,6,7,8,9,10 } + + +#define ZIMAG_IN10 { 1,2,3,4,5,6,7,8,9,10 } +*/ + + + + +#define ZREAL_IN11 {0.49934938363730907,0.26385784195736051,0.52535630855709314,0.53762298030778766,\ + 0.11999255046248436,0.2256303490139544 ,0.62740930821746588,0.76084325974807143,\ + 0.04855662025511265,0.67239497276023030,0.20171726960688829 } + +#define ZIMAG_IN11 {0.39115739194676280,0.83003165572881699,0.58787201577797532,0.48291792999953032,\ + 0.22328650346025825,0.84008856676518917,0.12059959070757031,0.28553641680628061,\ + 0.86075146449729800,0.84941016510128975,0.52570608118548989} + + +#define ZREAL_IN12 {0.75604385416954756,0.00022113462910056,0.33032709173858166,0.66538110421970487,\ + 0.62839178834110498,0.84974523587152362,0.68573101982474327,0.87821648130193353,\ + 0.06837403681129217,0.56084860628470778,0.66235693730413914,0.72635067673400044} + +#define ZIMAG_IN12 {0.19851438421756029,0.54425731627270579,0.23207478970289230,0.23122371966019273,\ + 0.21646326314657927,0.88338878145441413,0.65251349471509457,0.30760907428339124,\ + 0.93296162132173777,0.21460078610107303,0.31264199689030647,0.36163610080257058} + + +#define ZREAL_IN13 {0.2922266637906432 ,0.56642488157376647,0.48264719732105732,0.33217189135029912,\ + 0.59350947011262178,0.50153415976092219,0.43685875833034515,0.26931248093023896,\ + 0.63257448654621840,0.40519540151581168,0.91847078315913677,0.04373343335464597,\ + 0.48185089323669672} + + + +#define ZIMAG_IN13 {0.26395560009405017,0.41481037065386772,0.28064980218186975,0.12800584640353918,\ + 0.77831285959109664,0.21190304495394230,0.11213546665385365,0.68568959552794695,\ + 0.15312166837975383,0.69708506017923355,0.84155184263363481,0.40620247554033995,\ + 0.40948254754766822} + + + +#define ZREAL_IN14 {0.87841258011758327,0.11383596854284406,0.19983377400785685,0.56186607433483005,\ + 0.58961773291230202,0.68539796629920602,0.89062247332185507,0.50422128057107329,\ + 0.34936154074966908,0.38737787725403905,0.92228986788541079,0.94881842611357570,\ + 0.34353372454643250,0.37601187312975526} + +#define ZIMAG_IN14 {0.73409405630081892,0.26157614728435874,0.49934938363730907,0.26385784195736051,\ + 0.52535630855709314,0.53762298030778766,0.11999255046248436,0.2256303490139544 ,\ + 0.62740930821746588,0.76084325974807143,0.04855662025511265,0.67239497276023030,\ + 0.20171726960688829,0.39115739194676280} + +#define ZREAL_IN15 {0.83003165572881699,0.58787201577797532,0.48291792999953032,0.22328650346025825,\ + 0.84008856676518917,0.12059959070757031,0.28553641680628061,0.86075146449729800,\ + 0.84941016510128975,0.52570608118548989,0.99312098976224661,0.64885628735646605,\ + 0.99231909401714802,0.05004197778180242,0.74855065811425447} + +#define ZIMAG_IN15 {0.41040589986369014,0.60845263302326202,0.85442108893766999,0.06426467280834913,\ + 0.82790829380974174,0.92623437754809856,0.56672112690284848,0.57116389367729425,\ + 0.81601104838773608,0.05689279362559319,0.55959366867318749,0.12493403162807226,\ + 0.72792222863063216,0.26777664758265018,0.54653349192813039} + + + +#define ZREAL_IN16 {0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.30760907428339124, 0.93296162132173777, 0.21460078610107303, 0.31264199689030647,\ + 0.36163610080257058, 0.2922266637906432 , 0.56642488157376647, 0.48264719732105732,\ + 0.33217189135029912, 0.59350947011262178, 0.50153415976092219, 0.43685875833034515} +#define ZIMAG_IN16 {0.26931248093023896, 0.63257448654621840, 0.40519540151581168, 0.91847078315913677,\ + 0.04373343335464597, 0.48185089323669672, 0.26395560009405017, 0.41481037065386772,\ + 0.28064980218186975, 0.12800584640353918, 0.77831285959109664, 0.21190304495394230,\ + 0.11213546665385365, 0.68568959552794695, 0.15312166837975383, 0.69708506017923355} + + +#define ZREAL_IN32 { 0.21132486546412110, 0.75604385416954756, 0.00022113462910056, 0.33032709173858166,\ + 0.66538110421970487, 0.62839178834110498, 0.84974523587152362, 0.68573101982474327,\ + 0.87821648130193353, 0.06837403681129217, 0.56084860628470778, 0.66235693730413914,\ + 0.72635067673400044, 0.19851438421756029, 0.54425731627270579, 0.23207478970289230,\ + 0.23122371966019273, 0.21646326314657927, 0.88338878145441413, 0.65251349471509457,\ + 0.30760907428339124, 0.93296162132173777, 0.21460078610107303, 0.31264199689030647,\ + 0.36163610080257058, 0.2922266637906432 , 0.56642488157376647, 0.48264719732105732,\ + 0.33217189135029912, 0.59350947011262178, 0.50153415976092219, 0.43685875833034515} + +#define ZIMAG_IN32 { 0.26931248093023896, 0.63257448654621840, 0.40519540151581168, 0.91847078315913677,\ + 0.04373343335464597, 0.48185089323669672, 0.26395560009405017, 0.41481037065386772,\ + 0.28064980218186975, 0.12800584640353918, 0.77831285959109664, 0.21190304495394230,\ + 0.11213546665385365, 0.68568959552794695, 0.15312166837975383, 0.69708506017923355,\ + 0.84155184263363481, 0.40620247554033995, 0.40948254754766822, 0.87841258011758327,\ + 0.11383596854284406, 0.19983377400785685, 0.56186607433483005, 0.58961773291230202,\ + 0.68539796629920602, 0.89062247332185507, 0.50422128057107329, 0.34936154074966908,\ + 0.38737787725403905, 0.92228986788541079, 0.94881842611357570, 0.34353372454643250} + + + + +#define ZREAL_RESULT2 { 0.16527411318384111 , - 0.16505297855474055 } + + +#define ZIMAG_RESULT2 {+ 0.64688644628040493, + 0.01849465793929994} + + + +#define ZREAL_RESULT3 { 1.29709824733436108, 0.94154648753137238, 0.2434220389437592} + +#define ZIMAG_RESULT3 { +0.59717983752489090,+0.61999805178742728,+0.93089271522808925} + + + + + +#define ZREAL_RESULT4 { 0.62051669345237315,-0.12307844962924719, 0.24346416513435543, 0.10884282691404223} + +#define ZIMAG_RESULT4 { +0.53701765113510191,+0.11296372814103961,+0.10658199037425220,-0.19571476336568594} + + + +#define ZREAL_RESULT5 { 0.62691605370491743, 0.01919730450714778, 0.10104198714906780,-0.07720389203270116,\ + 0.17979378254309186} + +#define ZIMAG_RESULT5 { +0.54289909722283480,+0.13998734162926388,-0.17962778177138733,+0.12064468327985833,\ +-0.06305473407586182} + + + +#define ZREAL_RESULT6 { 0.36402360963014263, 0.09605967189946550, 0.01914935343131208, 0.11197456725252172,\ +-0.00281267335181221,-0.04413721258892397} + +#define ZIMAG_RESULT6 { +0.39017331654516357,-0.08647381537197443,-0.01847428942485585,-0.00928606038602692,\ +-0.11828530217444963,+0.05694693691321624} + + + + + +#define ZREAL_RESULT7 { 0.43821863417646711, 0.04570283341490348, 0.00786143114706625, 0.09081035877037001,\ + 0.06907620238256847,-0.01879476197071369,-0.08861738164795580} + +#define ZIMAG_RESULT7 { +0.39293177811694990,-0.13474546775513907,+0.02350839028687007,-0.01818990984988529,\ +-0.03304492053033681,-0.13370336175502612,+0.11784427758764042} + + + + +#define ZREAL_RESULT8 { 0.50006150756962597, 0.02175013240250377, 0.12240753043442965,-0.02322026233124427,\ +-0.00844178465195000,-0.11389905106099872, 0.09979579551145434,-0.05419655160111495} + +#define ZIMAG_RESULT8 { +0.39448237349279225,-0.14241475898929634,-0.02220236556604505,-0.14652524166940226,\ +-0.02577395853586495,+0.03536239646532335,+0.04400678444653749,+0.07766555645702852} + + + + +#define ZREAL_RESULT9 { 0.4653623884336816 ,-0.10996977634919125,-0.00630644375731721,-0.04060246287025721,\ + 0.05408191850705556, 0.01600258566680582,-0.05864725873797094,-0.05201672319102815,\ +-0.03668050804158550} + +#define ZIMAG_RESULT9 { +0.47890158897886670,+0.08218728720967677,-0.06845717881236174,-0.04807038546781070,\ +-0.08014536882440566,-0.2030002369914648,+0.22453417104910142,-0.06865385510029860, \ +-0.04798354111106445} + + + + +#define ZREAL_RESULT10 { 0.47991688111796976,-0.06991181823164128,-0.08469577602979275, 0.07318652166556244,\ +-0.07052463321312863, 0.03129850449040533,-0.12994121698152189,-0.09609430997689952,\ + 0.06979737512491652, 0.01343173518070941} + +#define ZIMAG_RESULT10 { +0.38964297915808854,+0.03225815718776807,-0.11005045339360417,+0.07000358882571070,\ +-0.03882538926347270,+0.01466467357240619,+0.09131179012889759,-0.02808828423670948,\ +-0.11655017979588442,-0.07314316252300754} + + + + + +#define ZREAL_RESULT11 { 0.40752098586579621, 0.01832270994676578, 0.00727102452352803,-0.13808643998727593,\ + 0.03761367031409660, 0.01913753006534984, 0.14829738766302858,-0.03282455871021355,\ + 0.08531354288243319,-0.01850240581569137,-0.03471406311050802} + +#define ZIMAG_RESULT11 { +0.54521434381604206,+0.04263232089408980,+0.01080182331995891,-0.16507135273435664,\ ++0.08926061372379648,+0.01327764965004020,-0.10524284127370778,-0.02743692407216465,\ ++0.01530157234736101,-0.10904555975048559,+0.08146574602618931} + + + +#define ZREAL_RESULT12 { 0.56766566393586493,-0.02954179400241778, 0.03231997586448970,-0.08061527988562983,\ + 0.12393588887272257,-0.00005011576253769,-0.04579487590429687, 0.18096695473171109,\ +-0.02460040668391173, 0.04301438496137660, 0.06736119091227670,-0.07861773287010031} + +#define ZIMAG_RESULT12 { +0.42399044404737651,-0.08988211863004507,-0.06417895954194777,-0.05903535817439356,\ +-0.03585983457125090,-0.08163805724791348,+0.00020448095165193,-0.00326952155569338,\ +-0.06391751330264545,+0.08415352273732421,+0.16527532188314309,-0.07732802237804590} + +#define ZREAL_RESULT13 { 0.45819311546018493, 0.04715640399909302,-0.02841189190012001, 0.01471405402274759,\ +-0.06955117696838889, 0.08520673650173283,-0.08379007722081511,-0.06164570839841994,\ +-0.07511713555210725, 0.07790018146444697, 0.05666948441941852,-0.04832646187709128,\ +-0.08077086016003779} + +#define ZIMAG_RESULT13 { +0.41406970618006128,-0.00941536236456233,-0.04150925434362464,+0.07093289809698045,\ ++0.05642954059283156,-0.13856574403878158,-0.06657177623345527,+0.08978984633083976,\ +-0.03246486275259956,+0.03475196544714984,-0.02951956674329188,-0.08259093889333179,\ +-0.00138085118416531} + + + + +#define ZREAL_RESULT14 { 0.55365722569903086,-0.03431117289603670,-0.07434176530056802, 0.09479458498406634,\ + 0.04225809799112697, 0.10711066217766220, 0.09039926979534348, 0.04258158766398475,\ +-0.06766097168605688, 0.02983162597647674, 0.16148055537460848, 0.00306446154680962,\ +-0.01447548152915653,-0.05597609967970790} + +#define ZIMAG_RESULT14 { +0.41925417428969269,-0.02346521727072965,-0.07537174377902310,+0.12152793513158673,\ +-0.05435563225189670,+0.05588517124820697,+0.03948028804374615,-0.02547196042723954,\ ++0.04750412291672844,+0.09081187301248270,+0.02410149252380316,-0.00728204510680848,\ ++0.07924950091433607,+0.04222609705593354} + + + + +#define ZREAL_RESULT15 { 0.60260595980410780,-0.09025313009309296, 0.07296362400098141,-0.01312199542974801,\ + 0.05196795946996628, 0.00939805486763355, 0.07359039581140392, 0.07244754050834930,\ +-0.13409874398389474,-0.06419327756841406,-0.04062806443214259, 0.19283708306652805,\ + 0.04903632944886174,-0.00831723960417976, 0.05579715986245712} + +#define ZIMAG_RESULT15 { +0.52861572646846366,-0.09479760020968324,+0.06725385149296267,+0.01462043430946725,\ +-0.00503137552191604,-0.05388544405841567,-0.05301311586381348,-0.11414862867731596,\ ++0.0617906214666224 ,+0.14723827146724461,-0.10948893804382542,+0.00343655851962967,\ +-0.00538333435303664,-0.03924473093854008,+0.06244360380584638} + + + + +#define ZREAL_RESULT16 { 0.45740074128843844,-0.00119937109332679,-0.09568979823192530,-0.01738371075123765,\ +-0.03869746159762144,-0.05391866381953740, 0.12416191581397301,-0.03041585422893309,\ +-0.03257706691510975, 0.07000836728092155,-0.00597921899357861,-0.03766276570110767,\ +-0.07796601625159383,-0.03039291932884991,-0.03422318488120085, 0.03575872707088203} + +#define ZIMAG_RESULT16 { +0.40480042458511889,+0.06953094033520663,+0.02374777548578576,-0.03393710545080092,\ +-0.04651592345908284,+0.02783744013794178,-0.03035825342604098,-0.06447129475682091,\ +-0.11649833549745381,-0.11413977271896644,+0.11722373704793855,+0.08102030470498481,\ +-0.06532836984843016,+0.00779635766618338,-0.01208991333178105,+0.02069446945645629} + + + + + +#define ZREAL_RESULT32 { 0.47864284948445857, 0.05482834035731039,-0.01530773095660632,-0.01750083123738436,\ + -0.05071297103611097, 0.08766815171372286, 0.02106608347521239,-0.05109320958418949,\ + -0.01096817385405302, 0.02416709596518544,-0.05098444057349576,-0.01448958336761648,\ + 0.02532074256370129,-0.09984237842467819,-0.06358972398280244,-0.04611519259707146,\ + 0.01104057650081813,-0.03475148917606731, 0.00813855773340646,-0.00568704237169753,\ + 0.01830285230723486, 0.02749700538425181,-0.04780122330152622, 0.06632936566012661,\ + -0.01447601290419698, 0.03116875276343186, 0.00123360692547217, 0.01833898177168673,\ + -0.03654957125464739, 0.00547684889715929,-0.05208112856470785,-0.05594424285220599} + + + +#define ZIMAG_RESULT32 {+0.48466352955438197,+0.04862008402656083,+0.04890918577469192,-0.07661834259188156,\ + +0.01684868035424048,-0.06277273594077343,-0.03536555772325747,-0.04086803002308132,\ + -0.04373891325667500,+0.03378928555068783,+0.09272389885362962,-0.01252633931303314,\ + +0.04715379187194862,+0.04212975779784539,+0.00924226411866865,-0.06146319342441199,\ + -0.06222798605449498,+0.03846733709242996,-0.06362612522976926,+0.02110331414670667,\ + +0.06568727290671772,-0.09854847704278780,+0.04828755172931871,-0.06711471562709365,\ + -0.03694727551192045,-0.04323841461679329,-0.07059643871085296,-0.01972938456264230,\ + +0.04778892314703904,+0.02763841783182228,+0.00662935995827029,-0.01498824415525237} + +static void zifftmaTest2 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN2; + double tImagIn [] = ZIMAG_IN2 ; + + + + double tRealResult [] = ZREAL_RESULT2 ; + double tImagResult [] = ZIMAG_RESULT2 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS2)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS2 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS2) ; + + + + zifftma ( in , ROW , COLS2 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ; + + } + + free(out); + free(in); + free(Result); + +} + +static void zifftmaTest3 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN3; + double tImagIn [] = ZIMAG_IN3 ; + + + + double tRealResult [] = ZREAL_RESULT3; + double tImagResult [] = ZIMAG_RESULT3 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS3)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS3 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS3) ; + + + + zifftma ( in , ROW , COLS3 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS3 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + + +static void zifftmaTest4 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN4; + double tImagIn [] = ZIMAG_IN4 ; + + + + double tRealResult [] = ZREAL_RESULT4 ; + double tImagResult [] = ZIMAG_RESULT4 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS4)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS4 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS4) ; + + + zifftma ( in , ROW , COLS4 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS4 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,zreals(out[i]) , zimags(out[i]), zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + + +static void zifftmaTest5 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN5; + double tImagIn [] = ZIMAG_IN5 ; + + + + double tRealResult [] = ZREAL_RESULT5; + double tImagResult [] = ZIMAG_RESULT5 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS5)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS5 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS5) ; + + + + zifftma ( in , ROW , COLS5 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS5 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + + +static void zifftmaTest6 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN6; + double tImagIn [] = ZIMAG_IN6 ; + + + + double tRealResult [] = ZREAL_RESULT6; + double tImagResult [] = ZIMAG_RESULT6; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS6)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS6 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS6) ; + + + + zifftma ( in , ROW , COLS6 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS6 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + + +static void zifftmaTest7 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN7; + double tImagIn [] = ZIMAG_IN7 ; + + + + double tRealResult [] = ZREAL_RESULT7; + double tImagResult [] = ZIMAG_RESULT7; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS7)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS7 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS7) ; + + + + zifftma ( in , ROW , COLS7 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS7 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + zreals (Result[i]) , + zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + +static void zifftmaTest8 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN8; + double tImagIn [] = ZIMAG_IN8 ; + + + + double tRealResult [] = ZREAL_RESULT8 ; + double tImagResult [] = ZIMAG_RESULT8 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS8)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS8 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS8) ; + + + zifftma ( in , ROW , COLS8 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS8 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,zreals(out[i]) , zimags(out[i]), zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); +/* + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-16 ) ; +*/ + } + + free(out); + free(in); + free(Result); + + +} + + +static void zifftmaTest9 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN9; + double tImagIn [] = ZIMAG_IN9 ; + + + + double tRealResult [] = ZREAL_RESULT9 ; + double tImagResult [] = ZIMAG_RESULT9 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS9)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS9 ); + doubleComplex* Result = DoubleComplexMatrix ( tRealResult , tImagResult ,ROW*COLS9) ; + + + zifftma ( in , ROW , COLS9 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS9 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,zreals(out[i]) , zimags(out[i]), zreals (Result[i]) , zimags (Result[i]), + fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i]))); + + if ( zreals(out[i]) < 1e-14 && zreals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && zimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - zimags (Result[i]) ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + free(Result); + + +} + +static void zifftmaTest10 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN10; + double tImagIn [] = ZIMAG_IN10 ; + + + + double tRealResult [] = ZREAL_RESULT10 ; + double tImagResult [] = ZIMAG_RESULT10 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS10)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS10 ); + + + + zifftma ( in , ROW , COLS10 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS10 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + +} + +static void zifftmaTest11 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN11; + double tImagIn [] = ZIMAG_IN11 ; + + + + double tRealResult [] = ZREAL_RESULT11 ; + double tImagResult [] = ZIMAG_RESULT11 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS11)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS11 ); + + + + zifftma ( in , ROW , COLS11 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS11 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + +} + + +static void zifftmaTest12 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN12; + double tImagIn [] = ZIMAG_IN12 ; + + + + double tRealResult [] = ZREAL_RESULT12 ; + double tImagResult [] = ZIMAG_RESULT12 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS12)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS12 ); + + + + zifftma ( in , ROW , COLS12 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS12 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-14 ) ; + + } + + free(out); + free(in); + +} + + +static void zifftmaTest13 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN13; + double tImagIn [] = ZIMAG_IN13 ; + + + + double tRealResult [] = ZREAL_RESULT13 ; + double tImagResult [] = ZIMAG_RESULT13 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS13)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS13 ); + + + + zifftma ( in , ROW , COLS13 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS13 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + +} + + +static void zifftmaTest14 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN14; + double tImagIn [] = ZIMAG_IN14 ; + + + + double tRealResult [] = ZREAL_RESULT14 ; + double tImagResult [] = ZIMAG_RESULT14 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS14)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS14 ); + + + + zifftma ( in , ROW , COLS14 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS14 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-14 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + +} + + + +static void zifftmaTest15 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN15; + double tImagIn [] = ZIMAG_IN15 ; + + + + double tRealResult [] = ZREAL_RESULT15 ; + double tImagResult [] = ZIMAG_RESULT15 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS15)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS15 ); + + + + zifftma ( in , ROW , COLS15 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS15 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-14 ) ; + + } + + free(out); + free(in); + +} + + + +static void zifftmaTest16 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN16; + double tImagIn [] = ZIMAG_IN16 ; + + + + double tRealResult [] = ZREAL_RESULT16 ; + double tImagResult [] = ZIMAG_RESULT16 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS16)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS16 ); + + + + zifftma ( in , ROW , COLS16 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS16 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-15); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + +} + + + +static void zifftmaTest32 (void ) +{ + int i = 0 ; + + double tRealIn [] = ZREAL_IN32; + double tImagIn [] = ZIMAG_IN32 ; + + + + double tRealResult [] = ZREAL_RESULT32 ; + double tImagResult [] = ZIMAG_RESULT32 ; + + + + doubleComplex* out = (doubleComplex*) malloc ( sizeof(doubleComplex) * (unsigned int) (ROW*COLS32)); + doubleComplex* in = DoubleComplexMatrix ( tRealIn , tImagIn , ROW*COLS32 ); + + + + zifftma ( in , ROW , COLS32 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS32 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + zreals(out[i]) , + zimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) , + fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i]))); + + + if ( zreals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zreals(out[i]) - tRealResult[i] ) / fabs (zreals (out[i])) < 3e-14 ); + + + if ( zimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( zimags(out[i]) - tImagResult[i] ) / fabs (zimags (out[i])) < 3e-15 ) ; + + } + + free(out); + free(in); + + +} + +static int testFft(void) { + + printf("\n>>>> FFT Tests\n"); + printf("\t>>>> Matrix Double Realt Tests\n"); + /*dfftmaTest();*/ + + printf("\n\n\n"); + + printf("\n\t>>>> Vector 2 Double Complex Tests\n"); + zifftmaTest2(); + printf("\n\t>>>> Vector 3 Double Complex Tests\n"); + zifftmaTest3(); + + printf("\n\t>>>> Vector 4 Double Complex Tests\n"); + zifftmaTest4(); + + + printf("\n\t>>>> Vector 5 Double Complex Tests\n"); + zifftmaTest5(); + printf("\n\t>>>> Vector 6 Double Complex Tests\n"); + zifftmaTest6(); + printf("\n\t>>>> Vector 7 Double Complex Tests\n"); + zifftmaTest7(); + + printf("\n\t>>>> Vector 8 Double Complex Tests\n"); + zifftmaTest8(); + + printf("\n\t>>>> Vector 9 Double Complex Tests\n"); + zifftmaTest9(); + printf("\n\t>>>> Vector 10 Double Complex Tests\n"); + zifftmaTest10(); + printf("\n\t>>>> Vector 11 Double Complex Tests\n"); + zifftmaTest11(); + printf("\n\t>>>> Vector 12 Double Complex Tests\n"); + zifftmaTest12(); + printf("\n\t>>>> Vector 13 Double Complex Tests\n"); + zifftmaTest13(); + printf("\n\t>>>> Vector 14 Double Complex Tests\n"); + zifftmaTest14(); + printf("\n\t>>>> Vector 14 Double Complex Tests\n"); + zifftmaTest15(); + printf("\n\t>>>> Vector 16 Double Complex Tests\n"); + zifftmaTest16(); + printf("\n\t>>>> Vector 32 Double Complex Tests\n"); + zifftmaTest32(); + + return 0; +} + + + +int main(void) { + assert(testFft() == 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/ifft/testFloatIfft.c b/2.3-1/src/c/signalProcessing/ifft/testFloatIfft.c new file mode 100644 index 00000000..5c2fec4b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/testFloatIfft.c @@ -0,0 +1,1269 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include "ifft.h" + +#define ROW 1 +#define COLS2 2 +#define COLS3 3 +#define COLS4 4 +#define COLS5 5 +#define COLS6 6 +#define COLS7 7 +#define COLS8 8 +#define COLS9 9 +#define COLS10 10 +#define COLS11 11 +#define COLS12 12 +#define COLS13 13 +#define COLS14 14 +#define COLS15 15 +#define COLS16 16 +#define COLS32 32 + +#define CREAL_IN2 { 0.00022113462910056f , 0.33032709173858166f } +#define CIMAG_IN2 { 0.66538110421970487f , 0.62839178834110498f } + +#define CREAL_IN3 { 2.48206677380949259f, 0.43537130765616894f, 0.97385666053742170f} +#define CIMAG_IN3 { 2.14807060454040766f,- 0.78285905346274376f, 0.42632796149700880f} + + +#define CREAL_IN4 { 0.84974523587152362f, 0.68573101982474327f, 0.87821648130193353f, 0.06837403681129217f} +#define CIMAG_IN4 { 0.56084860628470778f, 0.66235693730413914f, 0.72635067673400044f, 0.19851438421756029f} + +#define CREAL_IN5 { 0.84974523587152362f, 0.68573101982474327f, 0.87821648130193353f, 0.06837403681129217f,\ + 0.65251349471509457f} +#define CIMAG_IN5 { 0.56084860628470778f, 0.66235693730413914f, 0.72635067673400044f, 0.19851438421756029f,\ + 0.56642488157376647f} + +#define CREAL_IN6 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.65251349471509457f, 0.30760907428339124f } +#define CIMAG_IN6 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.56642488157376647f, 0.59350947011262178f } + +#define CREAL_IN7 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.65251349471509457f, 0.88338878145441413f, 0.30760907428339124f } +#define CIMAG_IN7 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.40948254754766822f, 0.56642488157376647f, 0.59350947011262178f } + + + +#define CREAL_IN8 { 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f, 0.21646326314657927f,\ + 0.88338878145441413f, 0.65251349471509457f, 0.30760907428339124f, 0.93296162132173777f } +#define CIMAG_IN8 { 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f, 0.2922266637906432f,\ + 0.56642488157376647f, 0.48264719732105732f, 0.33217189135029912f, 0.59350947011262178f} + + +#define CREAL_IN9 { 0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.30760907428339124f, 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f,\ + 0.43685875833034515f} +#define CIMAG_IN9 { 0.26931248093023896f, 0.63257448654621840f, 0.40519540151581168f, 0.91847078315913677f,\ + 0.28064980218186975f, 0.12800584640353918f, 0.77831285959109664f, 0.21190304495394230f,\ + 0.68568959552794695f} + + +#define CREAL_IN10 { 0.21646326314657927f, 0.65251349471509457f, 0.63257448654621840f, 0.31264199689030647f,\ + 0.93296162132173777f, 0.31264199689030647f, 0.48185089323669672f, 0.48264719732105732f,\ + 0.2922266637906432f , 0.48264719732105732f } +#define CIMAG_IN10 { 0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.11383596854284406f, 0.19983377400785685f, 0.56186607433483005f, 0.58961773291230202f,\ + 0.23122371966019273f, 0.21646326314657927f} +/* +#define CREAL_IN10 { 1,2,3,4,5,6,7,8,9,10 } + + +#define CIMAG_IN10 { 1,2,3,4,5,6,7,8,9,10 } +*/ + + + + +#define CREAL_IN11 {0.49934938363730907f, 0.26385784195736051f, 0.52535630855709314f ,0.53762298030778766f,\ + 0.11999255046248436f, 0.2256303490139544f , 0.62740930821746588f ,0.76084325974807143f,\ + 0.04855662025511265f, 0.67239497276023030f, 0.20171726960688829f } + +#define CIMAG_IN11 {0.39115739194676280f, 0.83003165572881699f,0.58787201577797532f ,0.48291792999953032f,\ + 0.22328650346025825f, 0.84008856676518917f,0.12059959070757031f ,0.28553641680628061f,\ + 0.86075146449729800f, 0.84941016510128975f,0.52570608118548989f } + + +#define CREAL_IN12 {0.75604385416954756f, 0.00022113462910056f,0.33032709173858166f ,0.66538110421970487f,\ + 0.62839178834110498f,0.84974523587152362f ,0.68573101982474327f ,0.87821648130193353f,\ + 0.06837403681129217f,0.56084860628470778f ,0.66235693730413914f ,0.72635067673400044f} + +#define CIMAG_IN12 {0.19851438421756029f, 0.54425731627270579f, 0.23207478970289230f, 0.23122371966019273f,\ + 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f, 0.30760907428339124f,\ + 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f, 0.36163610080257058f} + +#define CREAL_IN13 {0.2922266637906432f , 0.56642488157376647f,0.48264719732105732f,0.33217189135029912f,\ + 0.59350947011262178f, 0.50153415976092219f,0.43685875833034515f,0.26931248093023896f,\ + 0.63257448654621840f, 0.40519540151581168f,0.91847078315913677f,0.04373343335464597f,\ + 0.48185089323669672f} + + + +#define CIMAG_IN13 {0.26395560009405017f,0.41481037065386772f,0.28064980218186975f,0.12800584640353918f,\ + 0.77831285959109664f,0.21190304495394230f,0.11213546665385365f,0.68568959552794695f,\ + 0.15312166837975383f,0.69708506017923355f,0.84155184263363481f,0.40620247554033995f,\ + 0.40948254754766822f} + + + +#define CREAL_IN14 {0.87841258011758327f,0.11383596854284406f,0.19983377400785685f,0.56186607433483005f,\ + 0.58961773291230202f,0.68539796629920602f,0.89062247332185507f,0.50422128057107329f,\ + 0.34936154074966908f,0.38737787725403905f,0.92228986788541079f,0.94881842611357570f,\ + 0.34353372454643250f,0.37601187312975526f} + +#define CIMAG_IN14 {0.73409405630081892f,0.26157614728435874f,0.49934938363730907f,0.26385784195736051f,\ + 0.52535630855709314f,0.53762298030778766f,0.11999255046248436f,0.2256303490139544f ,\ + 0.62740930821746588f,0.76084325974807143f,0.04855662025511265f,0.67239497276023030f,\ + 0.20171726960688829f,0.39115739194676280f} + +#define CREAL_IN15 {0.83003165572881699f,0.58787201577797532f,0.48291792999953032f,0.22328650346025825f,\ + 0.84008856676518917f,0.12059959070757031f,0.28553641680628061f,0.86075146449729800f,\ + 0.84941016510128975f,0.52570608118548989f,0.99312098976224661f,0.64885628735646605f,\ + 0.99231909401714802f,0.05004197778180242f,0.74855065811425447f} + +#define CIMAG_IN15 {0.41040589986369014f,0.60845263302326202f,0.85442108893766999f,0.06426467280834913f,\ + 0.82790829380974174f,0.92623437754809856f,0.56672112690284848f,0.57116389367729425f,\ + 0.81601104838773608f,0.05689279362559319f,0.55959366867318749f,0.12493403162807226f,\ + 0.72792222863063216f,0.26777664758265018f,0.54653349192813039f} + + +#define CREAL_IN16 {0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.30760907428339124f, 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f,\ + 0.36163610080257058f, 0.2922266637906432f , 0.56642488157376647f, 0.48264719732105732f,\ + 0.33217189135029912f, 0.59350947011262178f, 0.50153415976092219f, 0.43685875833034515f} +#define CIMAG_IN16 {0.26931248093023896f, 0.63257448654621840f, 0.40519540151581168f, 0.91847078315913677f,\ + 0.04373343335464597f, 0.48185089323669672f, 0.26395560009405017f, 0.41481037065386772f,\ + 0.28064980218186975f, 0.12800584640353918f, 0.77831285959109664f, 0.21190304495394230f,\ + 0.11213546665385365f, 0.68568959552794695f, 0.15312166837975383f, 0.69708506017923355f} + + +#define CREAL_IN32 { 0.21132486546412110f, 0.75604385416954756f, 0.00022113462910056f, 0.33032709173858166f,\ + 0.66538110421970487f, 0.62839178834110498f, 0.84974523587152362f, 0.68573101982474327f,\ + 0.87821648130193353f, 0.06837403681129217f, 0.56084860628470778f, 0.66235693730413914f,\ + 0.72635067673400044f, 0.19851438421756029f, 0.54425731627270579f, 0.23207478970289230f,\ + 0.23122371966019273f, 0.21646326314657927f, 0.88338878145441413f, 0.65251349471509457f,\ + 0.30760907428339124f, 0.93296162132173777f, 0.21460078610107303f, 0.31264199689030647f,\ + 0.36163610080257058f, 0.2922266637906432f , 0.56642488157376647f, 0.48264719732105732f,\ + 0.33217189135029912f, 0.59350947011262178f, 0.50153415976092219f, 0.43685875833034515f} + +#define CIMAG_IN32 { 0.26931248093023896f, 0.63257448654621840f, 0.40519540151581168f, 0.91847078315913677f,\ + 0.04373343335464597f, 0.48185089323669672f, 0.26395560009405017f, 0.41481037065386772f,\ + 0.28064980218186975f, 0.12800584640353918f, 0.77831285959109664f, 0.21190304495394230f,\ + 0.11213546665385365f, 0.68568959552794695f, 0.15312166837975383f, 0.69708506017923355f,\ + 0.84155184263363481f, 0.40620247554033995f, 0.40948254754766822f, 0.87841258011758327f,\ + 0.11383596854284406f, 0.19983377400785685f, 0.56186607433483005f, 0.58961773291230202f,\ + 0.68539796629920602f, 0.89062247332185507f, 0.50422128057107329f, 0.34936154074966908f,\ + 0.38737787725403905f, 0.92228986788541079f, 0.94881842611357570f, 0.34353372454643250f} + + + + +#define CREAL_RESULT2 { 0.16527411318384111f , - 0.16505297855474055f } + + +#define CIMAG_RESULT2 {+ 0.64688644628040493f, + 0.01849465793929994f} + + + +#define CREAL_RESULT3 { 1.29709824733436108f, 0.94154648753137238f, 0.2434220389437592f} + +#define CIMAG_RESULT3 { +0.59717983752489090f,+0.61999805178742728f,+0.93089271522808925f} + + + + + +#define CREAL_RESULT4 { 0.62051669345237315f,-0.12307844962924719f, 0.24346416513435543f, 0.10884282691404223f} + +#define CIMAG_RESULT4 { +0.53701765113510191f,+0.11296372814103961f,+0.10658199037425220f,-0.19571476336568594f} + + + +#define CREAL_RESULT5 { 0.62691605370491743f, 0.01919730450714778f, 0.10104198714906780f,-0.07720389203270116f,\ + 0.17979378254309186f} + +#define CIMAG_RESULT5 { +0.54289909722283480f,+0.13998734162926388f,-0.17962778177138733f,+0.12064468327985833f,\ +-0.06305473407586182f} + + + +#define CREAL_RESULT6 { 0.36402360963014263f, 0.09605967189946550f, 0.01914935343131208f, 0.11197456725252172f,\ +-0.00281267335181221f,-0.04413721258892397f} + +#define CIMAG_RESULT6 { +0.39017331654516357f,-0.08647381537197443f,-0.01847428942485585f,-0.00928606038602692f,\ +-0.11828530217444963f,+0.05694693691321624f} + + + + + +#define CREAL_RESULT7 { 0.43821863417646711f, 0.04570283341490348f, 0.00786143114706625f, 0.09081035877037001f,\ + 0.06907620238256847f,-0.01879476197071369f,-0.08861738164795580f} + +#define CIMAG_RESULT7 { +0.39293177811694990f,-0.13474546775513907f,+0.02350839028687007f,-0.01818990984988529f,\ + -0.03304492053033681f,-0.13370336175502612f,+0.11784427758764042f} + + + + +#define CREAL_RESULT8 { 0.50006150756962597f, 0.02175013240250377f, 0.12240753043442965f,-0.02322026233124427f,\ +-0.00844178465195000f,-0.11389905106099872f, 0.09979579551145434f,-0.05419655160111495f} + +#define CIMAG_RESULT8 { +0.39448237349279225f,-0.14241475898929634f,-0.02220236556604505f,-0.14652524166940226f,\ +-0.02577395853586495f,+0.03536239646532335f,+0.04400678444653749f,+0.07766555645702852f} + + + + +#define CREAL_RESULT9 { 0.4653623884336816f ,-0.10996977634919125f,-0.00630644375731721f,-0.04060246287025721f,\ + 0.05408191850705556f, 0.01600258566680582f,-0.05864725873797094f,-0.05201672319102815f,\ +-0.03668050804158550f} + +#define CIMAG_RESULT9 { +0.47890158897886670f,+0.08218728720967677f,-0.06845717881236174f,-0.04807038546781070f,\ +-0.08014536882440566f,-0.2030002369914648f,+0.22453417104910142f,-0.06865385510029860f, \ +-0.04798354111106445f} + + + + +#define CREAL_RESULT10 { 0.47991688111796976f,-0.06991181823164128f,-0.08469577602979275f, 0.07318652166556244f,\ +-0.07052463321312863f, 0.03129850449040533f,-0.12994121698152189f,-0.09609430997689952f,\ + 0.06979737512491652f, 0.01343173518070941f} + +#define CIMAG_RESULT10 { +0.38964297915808854f,+0.03225815718776807f,-0.11005045339360417f,+0.07000358882571070f,\ +-0.03882538926347270f,+0.01466467357240619f,+0.09131179012889759f,-0.02808828423670948f,\ +-0.11655017979588442f,-0.07314316252300754f} + + + + + +#define CREAL_RESULT11 { 0.40752098586579621f, 0.01832270994676578f, 0.00727102452352803f,-0.13808643998727593f,\ + 0.03761367031409660f, 0.01913753006534984f, 0.14829738766302858f,-0.03282455871021355f,\ + 0.08531354288243319f,-0.01850240581569137f,-0.03471406311050802f} + +#define CIMAG_RESULT11 { +0.54521434381604206f,+0.04263232089408980f,+0.01080182331995891f,-0.16507135273435664f,\ ++0.08926061372379648f,+0.01327764965004020f,-0.10524284127370778f,-0.02743692407216465f,\ ++0.01530157234736101f,-0.10904555975048559f,+0.08146574602618931f} + + + +#define CREAL_RESULT12 { 0.56766566393586493f,-0.02954179400241778f, 0.03231997586448970f,-0.08061527988562983f,\ + 0.12393588887272257f,-0.00005011576253769f,-0.04579487590429687f, 0.18096695473171109f,\ +-0.02460040668391173f, 0.04301438496137660f, 0.06736119091227670f,-0.07861773287010031f} + +#define CIMAG_RESULT12 { +0.42399044404737651f,-0.08988211863004507f,-0.06417895954194777f,-0.05903535817439356f,\ +-0.03585983457125090f,-0.08163805724791348f,+0.00020448095165193f,-0.00326952155569338f,\ +-0.06391751330264545f,+0.08415352273732421f,+0.16527532188314309f,-0.07732802237804590f} + +#define CREAL_RESULT13 { 0.45819311546018493f, 0.04715640399909302f,-0.02841189190012001f, 0.01471405402274759f,\ +-0.06955117696838889f, 0.08520673650173283f,-0.08379007722081511f,-0.06164570839841994f,\ +-0.07511713555210725f, 0.07790018146444697f, 0.05666948441941852f,-0.04832646187709128f,\ +-0.08077086016003779f} + +#define CIMAG_RESULT13 { +0.41406970618006128f,-0.00941536236456233f,-0.04150925434362464f,+0.07093289809698045f,\ ++0.05642954059283156f,-0.13856574403878158f,-0.06657177623345527f,+0.08978984633083976f,\ +-0.03246486275259956f,+0.03475196544714984f,-0.02951956674329188f,-0.08259093889333179f,\ +-0.00138085118416531f} + + + + +#define CREAL_RESULT14 { 0.55365722569903086f,-0.03431117289603670f,-0.07434176530056802f, 0.09479458498406634f,\ + 0.04225809799112697f, 0.10711066217766220f, 0.09039926979534348f, 0.04258158766398475f,\ +-0.06766097168605688f, 0.02983162597647674f, 0.16148055537460848f, 0.00306446154680962f,\ +-0.01447548152915653f,-0.05597609967970790f} + +#define CIMAG_RESULT14 { +0.41925417428969269f,-0.02346521727072965f,-0.07537174377902310f,+0.12152793513158673f,\ +-0.05435563225189670f,+0.05588517124820697f,+0.03948028804374615f,-0.02547196042723954f,\ ++0.04750412291672844f,+0.09081187301248270f,+0.02410149252380316f,-0.00728204510680848f,\ ++0.07924950091433607f,+0.04222609705593354f} + + + + +#define CREAL_RESULT15 { 0.60260595980410780f,-0.09025313009309296f, 0.07296362400098141f,-0.01312199542974801f,\ + 0.05196795946996628f, 0.00939805486763355f, 0.07359039581140392f, 0.07244754050834930f,\ +-0.13409874398389474f,-0.06419327756841406f,-0.04062806443214259f, 0.19283708306652805f,\ + 0.04903632944886174f,-0.00831723960417976f, 0.05579715986245712f} + +#define CIMAG_RESULT15 { +0.52861572646846366f,-0.09479760020968324f,+0.06725385149296267f,+0.01462043430946725f,\ +-0.00503137552191604f,-0.05388544405841567f,-0.05301311586381348f,-0.11414862867731596f,\ ++0.0617906214666224f ,+0.14723827146724461f,-0.10948893804382542f,+0.00343655851962967f,\ +-0.00538333435303664f,-0.03924473093854008f,+0.06244360380584638f} + + + + +#define CREAL_RESULT16 { 0.45740074128843844f,-0.00119937109332679f,-0.09568979823192530f,-0.01738371075123765f,\ +-0.03869746159762144f,-0.05391866381953740f, 0.12416191581397301f,-0.03041585422893309f,\ +-0.03257706691510975f, 0.07000836728092155f,-0.00597921899357861f,-0.03766276570110767f,\ +-0.07796601625159383f,-0.03039291932884991f,-0.03422318488120085f, 0.03575872707088203f} + +#define CIMAG_RESULT16 { +0.40480042458511889f,+0.06953094033520663f,+0.02374777548578576f,-0.03393710545080092f,\ +-0.04651592345908284f,+0.02783744013794178f,-0.03035825342604098f,-0.06447129475682091f,\ +-0.11649833549745381f,-0.11413977271896644f,+0.11722373704793855f,+0.08102030470498481f,\ +-0.06532836984843016f,+0.00779635766618338f,-0.01208991333178105f,+0.02069446945645629f} + + + + + +#define CREAL_RESULT32 { 0.47864284948445857f, 0.05482834035731039f,-0.01530773095660632f,-0.01750083123738436f,\ + -0.05071297103611097f, 0.08766815171372286f, 0.02106608347521239f,-0.05109320958418949f,\ + -0.01096817385405302f, 0.02416709596518544f,-0.05098444057349576f,-0.01448958336761648f,\ + 0.02532074256370129f,-0.09984237842467819f,-0.06358972398280244f,-0.04611519259707146f,\ + 0.01104057650081813f,-0.03475148917606731f, 0.00813855773340646f,-0.00568704237169753f,\ + 0.01830285230723486f, 0.02749700538425181f,-0.04780122330152622f, 0.06632936566012661f,\ + -0.01447601290419698f, 0.03116875276343186f, 0.00123360692547217f, 0.01833898177168673f,\ + -0.03654957125464739f, 0.00547684889715929f,-0.05208112856470785f,-0.05594424285220599f} + + + +#define CIMAG_RESULT32 {+0.48466352955438197f,+0.04862008402656083f,+0.04890918577469192f,-0.07661834259188156f,\ + +0.01684868035424048f,-0.06277273594077343f,-0.03536555772325747f,-0.04086803002308132f,\ + -0.04373891325667500f,+0.03378928555068783f,+0.09272389885362962f,-0.01252633931303314f,\ + +0.04715379187194862f,+0.04212975779784539f,+0.00924226411866865f,-0.06146319342441199f,\ + -0.06222798605449498f,+0.03846733709242996f,-0.06362612522976926f,+0.02110331414670667f,\ + +0.06568727290671772f,-0.09854847704278780f,+0.04828755172931871f,-0.06711471562709365f,\ + -0.03694727551192045f,-0.04323841461679329f,-0.07059643871085296f,-0.01972938456264230f,\ + +0.04778892314703904f,+0.02763841783182228f,+0.00662935995827029f,-0.01498824415525237f} +static void cifftmaTest2 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN2; + float tImagIn [] = CIMAG_IN2 ; + + + + float tRealResult [] = CREAL_RESULT2 ; + float tImagResult [] = CIMAG_RESULT2 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS2)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS2 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS2) ; + + + + cifftma ( in , ROW , COLS2 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS2 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + + free(out); + free(in); + free(Result); + +} + +static void cifftmaTest3 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN3; + float tImagIn [] = CIMAG_IN3 ; + + + + float tRealResult [] = CREAL_RESULT3; + float tImagResult [] = CIMAG_RESULT3 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS3)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS3 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS3) ; + + + + cifftma ( in , ROW , COLS3 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS3 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) + ); +/* + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + + free(out); + free(in); + free(Result); + +} + + +static void cifftmaTest4 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN4; + float tImagIn [] = CIMAG_IN4 ; + + + + float tRealResult [] = CREAL_RESULT4 ; + float tImagResult [] = CIMAG_RESULT4 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS4)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS4 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS4) ; + + + cifftma ( in , ROW , COLS4 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS4 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + } + free(out); + free(in); + free(Result); + +} + + +static void cifftmaTest5 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN5; + float tImagIn [] = CIMAG_IN5 ; + + + + float tRealResult [] = CREAL_RESULT5; + float tImagResult [] = CIMAG_RESULT5 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS5)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS5 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS5) ; + + + + cifftma ( in , ROW , COLS5 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS5 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); +/* + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + free(out); + free(in); + free(Result); + +} + + +static void cifftmaTest6 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN6; + float tImagIn [] = CIMAG_IN6 ; + + + + float tRealResult [] = CREAL_RESULT6; + float tImagResult [] = CIMAG_RESULT6; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS6)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS6 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS6) ; + + + + cifftma ( in , ROW , COLS6 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS6 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); +/* + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + free(out); + free(in); + free(Result); + +} + + +static void cifftmaTest7 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN7; + float tImagIn [] = CIMAG_IN7 ; + + + + float tRealResult [] = CREAL_RESULT7; + float tImagResult [] = CIMAG_RESULT7; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS7)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS7 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS7) ; + + + + cifftma ( in , ROW , COLS7 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + + + for ( i = 0 ; i < (ROW*COLS7 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + creals (Result[i]) , + cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); +/* + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + free(out); + free(in); + free(Result); + +} + +static void cifftmaTest8 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN8; + float tImagIn [] = CIMAG_IN8 ; + + + + float tRealResult [] = CREAL_RESULT8 ; + float tImagResult [] = CIMAG_RESULT8 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS8)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS8 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS8) ; + + + cifftma ( in , ROW , COLS8 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS8 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); + + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + free(Result); + +} + + +static void cifftmaTest9 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN9; + float tImagIn [] = CIMAG_IN9 ; + + + + float tRealResult [] = CREAL_RESULT9 ; + float tImagResult [] = CIMAG_RESULT9 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS9)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS9 ); + floatComplex* Result = FloatComplexMatrix ( tRealResult , tImagResult ,ROW*COLS9) ; + + + cifftma ( in , ROW , COLS9 , out ) ; + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS9 ) ; i++ ) + { + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i ,creals(out[i]) , cimags(out[i]), creals (Result[i]) , cimags (Result[i]), + fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i]))); +/* + if ( creals(out[i]) < 1e-14 && creals (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && cimags (Result[i]) < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - cimags (Result[i]) ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + free(out); + free(in); + free(Result); + +} + +static void cifftmaTest10 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN10; + float tImagIn [] = CIMAG_IN10 ; + + + + float tRealResult [] = CREAL_RESULT10 ; + float tImagResult [] = CIMAG_RESULT10 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS10)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS10 ); + + + + cifftma ( in , ROW , COLS10 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS10 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + +/* + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; +*/ + } + free(out); + free(in); +} + +static void cifftmaTest11 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN11; + float tImagIn [] = CIMAG_IN11 ; + + + + float tRealResult [] = CREAL_RESULT11 ; + float tImagResult [] = CIMAG_RESULT11 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS11)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS11 ); + + + + cifftma ( in , ROW , COLS11 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS11 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + + +static void cifftmaTest12 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN12; + float tImagIn [] = CIMAG_IN12 ; + + + + float tRealResult [] = CREAL_RESULT12 ; + float tImagResult [] = CIMAG_RESULT12 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS12)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS12 ); + + + + cifftma ( in , ROW , COLS12 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS12 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-5 ) ; + + } + free(out); + free(in); + +} + + +static void cifftmaTest13 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN13; + float tImagIn [] = CIMAG_IN13 ; + + + + float tRealResult [] = CREAL_RESULT13 ; + float tImagResult [] = CIMAG_RESULT13 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS13)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS13 ); + + + + cifftma ( in , ROW , COLS13 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS13 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + + +static void cifftmaTest14 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN14; + float tImagIn [] = CIMAG_IN14 ; + + + + float tRealResult [] = CREAL_RESULT14 ; + float tImagResult [] = CIMAG_RESULT14 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS14)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS14 ); + + + + cifftma ( in , ROW , COLS14 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS14 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + + + +static void cifftmaTest15 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN15; + float tImagIn [] = CIMAG_IN15 ; + + + + float tRealResult [] = CREAL_RESULT15 ; + float tImagResult [] = CIMAG_RESULT15 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS15)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS15 ); + + + + cifftma ( in , ROW , COLS15 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS15 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + + + +static void cifftmaTest16 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN16; + float tImagIn [] = CIMAG_IN16 ; + + + + float tRealResult [] = CREAL_RESULT16 ; + float tImagResult [] = CIMAG_RESULT16 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS16)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS16 ); + + + + cifftma ( in , ROW , COLS16 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS16 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-6 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + + + +static void cifftmaTest32 (void ) +{ + int i = 0 ; + + float tRealIn [] = CREAL_IN32; + float tImagIn [] = CIMAG_IN32 ; + + + + float tRealResult [] = CREAL_RESULT32 ; + float tImagResult [] = CIMAG_RESULT32 ; + + + + floatComplex* out = (floatComplex*) malloc ( sizeof(floatComplex) * (unsigned int) (ROW*COLS32)); + floatComplex* in = FloatComplexMatrix ( tRealIn , tImagIn , ROW*COLS32 ); + + + + cifftma ( in , ROW , COLS32 , out ); + + + + + /* if we don't add that test assert failed if result = 0 'cause then we have |(out - 0)|/|out| = 1*/ + for ( i = 0 ; i < (ROW*COLS32 ) ; i++ ) + { + + + printf ( "\t\t %d out : %e\t %e\t * i result : %e\t %e\t * i assert : : %e\t %e\t * i \n" , + i , + creals(out[i]) , + cimags(out[i]), + tRealResult[i] , + tImagResult[i], + fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) , + fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i]))); + + + if ( creals(out[i]) < 1e-14 && tRealResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( creals(out[i]) - tRealResult[i] ) / fabs (creals (out[i])) < 3e-5 ); + + + if ( cimags(out[i]) < 1e-14 && tImagResult[i] < 1e-18 ) + assert ( 1 ) ; + else + assert ( fabs( cimags(out[i]) - tImagResult[i] ) / fabs (cimags (out[i])) < 3e-6 ) ; + + } + free(out); + free(in); + +} + +static int testFft(void) { + + printf("\n>>>> FFT Tests\n"); + printf("\t>>>> Matrix Float Realt Tests\n"); + /*dfftmaTest();*/ + + printf("\n\n\n"); + + printf("\n\t>>>> Vector 2 Float Complex Tests\n"); + cifftmaTest2(); + printf("\n\t>>>> Vector 3 Float Complex Tests\n"); + cifftmaTest3(); + printf("\n\t>>>> Vector 4 Float Complex Tests\n"); + cifftmaTest4(); + printf("\n\t>>>> Vector 5 Float Complex Tests\n"); + cifftmaTest5(); + printf("\n\t>>>> Vector 6 Float Complex Tests\n"); + cifftmaTest6(); + printf("\n\t>>>> Vector 7 Float Complex Tests\n"); + cifftmaTest7(); + printf("\n\t>>>> Vector 8 Float Complex Tests\n"); + cifftmaTest8(); + printf("\n\t>>>> Vector 9 Float Complex Tests\n"); + cifftmaTest9(); + printf("\n\t>>>> Vector 10 Float Complex Tests\n"); + cifftmaTest10(); + printf("\n\t>>>> Vector 11 Float Complex Tests\n"); + cifftmaTest11(); + printf("\n\t>>>> Vector 12 Float Complex Tests\n"); + cifftmaTest12(); + printf("\n\t>>>> Vector 13 Float Complex Tests\n"); + cifftmaTest13(); + printf("\n\t>>>> Vector 14 Float Complex Tests\n"); + cifftmaTest14(); + printf("\n\t>>>> Vector 14 Float Complex Tests\n"); + cifftmaTest15(); + printf("\n\t>>>> Vector 16 Float Complex Tests\n"); + cifftmaTest16(); + printf("\n\t>>>> Vector 32 Float Complex Tests\n"); + cifftmaTest32(); + return 0; +} + + + +int main(void) { + assert(testFft() == 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/ifft/testMatIfft.c b/2.3-1/src/c/signalProcessing/ifft/testMatIfft.c new file mode 100644 index 00000000..6acb749f --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/testMatIfft.c @@ -0,0 +1,289 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include +#include +#include +#include "ifft.h" + +#define test1 {0.2113249000000000099586,0.3303270999999999846253,0.8497451999999999783242,0.0683740000000000042180,\ + 0.7560438999999999909463,0.6653810999999999475918,0.6857309999999999794440,0.5608486000000000304411,\ + 0.0002211000000000000075,0.6283917999999999448590,0.8782164999999999555058,0.6623569000000000261963} + +#define test2 {0.2113249000000000099586,0.6857309999999999794440,\ + 0.3303270999999999846253,0.5608486000000000304411,\ + 0.8497451999999999783242,0.0002211000000000000075,\ + 0.0683740000000000042180,0.6283917999999999448590,\ + 0.7560438999999999909463,0.8782164999999999555058,\ + 0.6653810999999999475918,0.6623569000000000261963} + +#define test3 {0.2113249000000000099586,0.7560438999999999909463,0.0002211000000000000075,\ + 0.3303270999999999846253,0.6653810999999999475918,0.6283917999999999448590,\ + 0.8497451999999999783242,0.6857309999999999794440,0.8782164999999999555058,\ + 0.0683740000000000042180,0.5608486000000000304411,0.6623569000000000261963} + +#define test4 {0.2113249000000000099586,0.0683740000000000042180,0.6857309999999999794440,0.6283917999999999448590,\ + 0.3303270999999999846253,0.7560438999999999909463,0.5608486000000000304411,0.8782164999999999555058,\ + 0.8497451999999999783242,0.6653810999999999475918,0.0002211000000000000075,0.6623569000000000261963} + +#define test6 {0.2113249000000000099586,0.8497451999999999783242,0.7560438999999999909463,0.6857309999999999794440,0.0002211000000000000075,0.8782164999999999555058,\ + 0.3303270999999999846253,0.0683740000000000042180,0.6653810999999999475918,0.5608486000000000304411,0.6283917999999999448590,0.6623569000000000261963} + +#define test9 {1,2,3,4,5,6,7,8,9} + +#define RRESULT1 {0.5247468416666665191883,-0.0159011882620516131759,0.0056361333333333485385,\ +-0.1205085666666666222024,-0.0631457083333333279995,0.0178082299287182777014,\ +0.0388002583333332817794,0.0178082299287182777014,-0.0631457083333333279995,\ +-0.1205085666666666222024,0.0056361333333333485385,-0.0159011882620516131759} + +#define IRESULT1 {0,0.0036551311266069114181,0.0881077213977346646034,-0.0277100416666666432564,\ +-0.0250953810419741324411,0.1086392772067264061997,0,-0.1086392772067264061997,\ +0.0250953810419741324411,0.0277100416666666432564,-0.0881077213977346646034,\ +-0.0036551311266069114181} + +#define RRESULT2 {0.5247468416666666302106,-0.0445474749999999961037,\ +0.0056361333333333554774,-0.0326510583333333367917,\ +-0.0631457083333333279995,-0.1070292499999999646931,\ +0.0388002583333333234128,0.0867050416666666767807,\ +-0.0631457083333333279995,-0.1070292499999999646931,\ +0.0056361333333333554774,-0.0326510583333333367917} + +#define IRESULT2 {0,0,\ +0.0881077213977346646034,-0.0532714598190739199723,\ +-0.0250953810419741081550,0.0869808780098438039108,\ +0,0,\ +0.0250953810419741081550,-0.0869808780098438039108,\ +-0.0881077213977346646034,0.0532714598190739199723} + +#define RRESULT3 {0.5247468416666665191883,-0.0799020208333333092909,-0.0799020208333333092909,\ +-0.1205085666666666222024,-0.0295434574969313107351,-0.0095530508364020244594,\ +0.0388002583333332817794,0.0633959958333333295499,0.0633959958333333295499,\ +-0.1205085666666666222024,-0.0095530508364020244594,-0.0295434574969313107351} + +#define IRESULT3 {0,-0.0359991099727139385323,0.0359991099727139385323,\ +-0.0277100416666666432564,-0.0873273732016361936559,0.0495491398683028591576,\ +0,-0.0453116254771752935415,0.0453116254771752935415,\ +0.0277100416666666432564,-0.0495491398683028591576,0.0873273732016361936559} + +#define RRESULT4 {0.5247468416666666302106,0.0120497083333333254718,-0.0850471916666666466478,\ + 0.0120497083333333254718,\ +-0.0631457083333333279995,-0.0562903158939566938823,0.0675598583333333335688,\ + -0.0743609174393766170219,\ +-0.0631457083333333279995,-0.0743609174393766170219,0.0675598583333333335688,\ + -0.0562903158939566938823} + +#define IRESULT4 {0,0.0565971833333333285143,0,-0.0565971833333333285143,\ +-0.0250953810419741081550,0.1196492105704671793376,0.0191473164961883796087,\ + 0.0362419439038005331000,\ +0.0250953810419741081550,-0.0362419439038005331000,-0.0191473164961883796087,\ + -0.1196492105704671793376} + +#define RRESULT6 {0.5247468416666666302106,-0.0417166874999999950924,-0.0388444708333333249550,\ + -0.0927985249999999928239,-0.0388444708333333249550,-0.0417166874999999950924,\ +0.0388002583333333372906,0.0436237291666666596179,-0.0186651041666666545060,\ + -0.1482186083333333070922,-0.0186651041666666545060,0.0436237291666666596179} + +#define IRESULT6 {0,-0.0122945224279474088491,0.1021380474100006957583,0,-0.1021380474100006957583,\ + 0.0122945224279474088491,\ +0,-0.0926896236521720928714,0.0110650550297080874085,0,-0.0110650550297080874085,\ + 0.0926896236521720928714} + +#define RRESULT9 {5,-0.5000000000000002220446,-0.5000000000000002220446,\ + -1.4999999999999997779554,- 0.0000000000000000286185, 0.0000000000000001396408,\ + -1.4999999999999997779554,0.0000000000000001396408,- 0.0000000000000000286185} + +#define IRESULT9 {0,- 0.2886751345948128100183,0.2886751345948128100183,\ + - 0.8660254037844383745437,- 0.0000000000000000138778,0.0000000000000000138778,\ + + 0.8660254037844383745437,- 0.0000000000000000138778,+ 0.0000000000000000138778} + + +static void difftmaTest(void){ + int i; + + double in1[]=test1; + double in2[]=test2; + double in3[]=test3; + double in4[]=test4; + double in6[]=test6; + double in9[]=test9; + + double resR1[]=RRESULT1; + double resR2[]=RRESULT2; + double resR3[]=RRESULT3; + double resR4[]=RRESULT4; + double resR6[]=RRESULT6; + double resR9[]=RRESULT9; + + double out1[12], out2[12], out3[12], out4[12], out6[12], out9[9]; + + + printf(" >>> Matrice 1*12 <<< \n"); + difftma(in1, 1, 12, out1); + for (i=0;i<12;i++){ + if (out1[i]>1e-16) assert( (fabs(out1[i]-resR1[i]) / fabs(out1[i])) < 3e-14 ); + else assert(1); + } + + printf(" >>> Matrice 2*6 <<< \n"); + difftma(in2, 2, 6, out2); + for (i=0;i<12;i++){ + if (out2[i]>1e-16) assert( (fabs(out2[i]-resR2[i]) / fabs(out2[i])) < 3e-15 ); + else assert(1); + } + + + printf(" >>> Matrice 3*4 <<< \n"); + difftma(in3, 3, 4, out3); + for (i=0;i<12;i++){ + if (out3[i]>1e-16) assert( (fabs(out3[i]-resR3[i]) / fabs(out3[i])) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 4*3 <<< \n"); + difftma(in4, 4, 3, out4); + for (i=0;i<12;i++){ + if (out4[i]>1e-16) assert( (fabs(out4[i]-resR4[i]) / fabs(out4[i])) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 6*2 <<< \n"); + difftma(in6, 6, 2, out6); + for (i=0;i<12;i++){ + if (out6[i]>1e-16) assert( (fabs(out6[i]-resR6[i]) / fabs(out6[i])) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 3*3 <<< \n"); + difftma(in9, 3, 3, out9); + for (i=0;i<9;i++){ + if (out9[i]>1e-16) assert( (fabs(out9[i]-resR9[i]) / fabs(out9[i])) < 3e-15 ); + else assert(1); + } + + +} + +static void zifftmaTest(void){ + int i; + + double inR1[]=test1; + double inR2[]=test2; + double inR3[]=test3; + double inR4[]=test4; + double inR6[]=test6; + double inR9[]=test9; + + double resR1[]=RRESULT1; + double resI1[]=IRESULT1; + double resR2[]=RRESULT2; + double resI2[]=IRESULT2; + double resR3[]=RRESULT3; + double resI3[]=IRESULT3; + double resR4[]=RRESULT4; + double resI4[]=IRESULT4; + double resR6[]=RRESULT6; + double resI6[]=IRESULT6; + + + doubleComplex *in1, *in2, *in3, *in4, *in6, *in9, out1[12], out2[12], out3[12], out4[12], out6[12]; + + in1=(doubleComplex *)malloc((unsigned int)12*sizeof(doubleComplex)); + in2=(doubleComplex *)malloc((unsigned int)12*sizeof(doubleComplex)); + in3=(doubleComplex *)malloc((unsigned int)12*sizeof(doubleComplex)); + in4=(doubleComplex *)malloc((unsigned int)12*sizeof(doubleComplex)); + in6=(doubleComplex *)malloc((unsigned int)12*sizeof(doubleComplex)); + in9=(doubleComplex *)malloc((unsigned int)9*sizeof(doubleComplex)); + + + + for (i=0;i<12;i++){ + in1[i]=DoubleComplex(inR1[i],0); + in2[i]=DoubleComplex(inR2[i],0); + in3[i]=DoubleComplex(inR3[i],0); + in4[i]=DoubleComplex(inR4[i],0); + in6[i]=DoubleComplex(inR6[i],0); + } + for (i=0;i<9;i++){ + in9[i]=DoubleComplex(inR9[i],0); + + } + + /* !!!!!!!!!!!!!!!!!!!!!!! + for the imaginary part, the assert is out + res instead of out - res + cause I export the transposate of the result matrix and the transposate change the sign + of the imaginary part. + And instead of change all the define, I only change the sign of the assert.*/ + printf(" >>> Matrice 1*12 <<< \n"); + zifftma(in1, 1, 12, out1); + for (i=0;i<12;i++){ + if (zreals(out1[i])>1e-16) assert( (fabs(zreals(out1[i])-resR1[i]) / fabs(zreals(out1[i]))) < 3e-14 ); + else assert(1); + if (zimags(out1[i])>1e-16) assert( (fabs(zimags(out1[i])+resI1[i]) / fabs(zimags(out1[i]))) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 2*6 <<< \n"); + zifftma(in2, 2, 6, out2); + for (i=0;i<12;i++){ + if (zreals(out2[i])>1e-16) assert( (fabs(zreals(out2[i])-resR2[i]) / fabs(zreals(out2[i]))) < 3e-15 ); + else assert(1); + if (zimags(out2[i])>1e-16) assert( (fabs(zimags(out2[i])+resI2[i]) / fabs(zimags(out2[i]))) < 3e-13 ); + else assert(1); + } + + + printf(" >>> Matrice 3*4 <<< \n"); + zifftma(in3, 3, 4, out3); + for (i=0;i<12;i++){ + if (zreals(out3[i])>1e-16) assert( (fabs(zreals(out3[i])-resR3[i]) / fabs(zreals(out3[i]))) < 3e-15 ); + else assert(1); + if (zimags(out3[i])>1e-16) assert( (fabs(zimags(out3[i])+resI3[i]) / fabs(zimags(out3[i]))) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 4*3 <<< \n"); + zifftma(in4, 4, 3, out4); + for (i=0;i<12;i++){ + if (zreals(out4[i])>1e-16) assert( (fabs(zreals(out4[i])-resR4[i]) / fabs(zreals(out4[i]))) < 3e-15 ); + else assert(1); + if (zimags(out4[i])>1e-16) assert( (fabs(zimags(out4[i])+resI4[i]) / fabs(zimags(out4[i]))) < 3e-15 ); + else assert(1); + } + + printf(" >>> Matrice 6*2 <<< \n"); + zifftma(in6, 6, 2, out6); + for (i=0;i<12;i++){ + if (zreals(out6[i])>1e-16) assert( (fabs(zreals(out6[i])-resR6[i]) / fabs(zreals(out6[i]))) < 3e-15 ); + else assert(1); + if (zimags(out6[i])>1e-16) assert( (fabs(zimags(out6[i])+resI6[i]) / fabs(zimags(out6[i]))) < 3e-15 ); + else assert(1); + } + + +} + + + +static int testiFft(void){ + difftmaTest(); + zifftmaTest(); + return 0; +} + + +int main(void) { + printf(">>> Fft Matrices Double Tests <<<\n"); + assert(testiFft() == 0); + return 0; +} + diff --git a/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj b/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj new file mode 100644 index 00000000..29ba3894 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {633B36B2-AF28-4EF8-A236-021AA1ECF18A} + testDoubleIfft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj.filters b/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj.filters new file mode 100644 index 00000000..44b31416 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_DoubleIfft/testDoubleIfft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj b/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj new file mode 100644 index 00000000..26fee50c --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3545DD4A-7DE1-4DB8-A28F-BBCA0278BA57} + testFloatIfft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj.filters b/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj.filters new file mode 100644 index 00000000..c2fa6b73 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_FloatIfft/testFloatIfft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj b/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj new file mode 100644 index 00000000..2cf61855 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2F903F45-A053-47F8-BEA7-2490DEA6C9C5} + testMatIfft + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj.filters b/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj.filters new file mode 100644 index 00000000..8ea762e9 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/test_MatIfft/testMatIfft.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/ifft/zifftma.c b/2.3-1/src/c/signalProcessing/ifft/zifftma.c new file mode 100644 index 00000000..b5a00dd1 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/ifft/zifftma.c @@ -0,0 +1,160 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#define IFFT842 1 +#define DFFT2 0 + +#include +#include +#include "ifft.h" +#include "lapack.h" +#include "ifft_internal.h" + +void zifftma ( doubleComplex* in , int rows, int cols, doubleComplex* out) +{ + + int choosenAlgo = DFFT2 ; + + int size = rows*cols ; + int sizeTemp = 0; + + int rowsTemp = 0 ; + int colsTemp = 0 ; + + int ierr = 0 ; + int isn = 1; + int i = 0; + + int increment=1; + + double* realIn = (double*) malloc ( sizeof (double) * (unsigned int) size ); + double* imagIn = (double*) malloc ( sizeof (double) * (unsigned int) size ); + doubleComplex* inCopy = (doubleComplex*) malloc ( sizeof (doubleComplex) * (unsigned int) size*2 ); + + doubleComplex* inTemp = (doubleComplex*) malloc ( sizeof (doubleComplex) * (unsigned int) size*2 ); + + + + zimaga ( in , size , imagIn) ; + zreala ( in , size , realIn) ; + for (i=0;i +#include +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "multiplication.h" +#include "ifft.h" +#include "fft.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* Computes the convolution between VECTORS */ + +EXTERN_SIGPROC void sconva(float *in1, int size1, float *in2,int size2, float *out); + +EXTERN_SIGPROC void dconva(double *in1, int size1, double *in2,int size2, double *out); + +EXTERN_SIGPROC void cconva(floatComplex *in1, int size1, floatComplex *in2,int size2, floatComplex *out); + +EXTERN_SIGPROC void zconva(doubleComplex *in1, int size1, doubleComplex *in2,int size2, doubleComplex *out); +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__CONV_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/conv2d.h b/2.3-1/src/c/signalProcessing/includes/conv2d.h new file mode 100644 index 00000000..ed71d924 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/conv2d.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CONV2D_H__ +#define __CONV2D_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Computes the convolution between MATRICES */ + +EXTERN_SIGPROC void sconv2da(float *in1, int lines1, int columns1, float *in2, int lines2, int columns2, float *out); + +EXTERN_SIGPROC void dconv2da(double *in1, int lines1, int columns1, double *in2, int lines2, int columns2, double *out); + +EXTERN_SIGPROC void cconv2da(floatComplex *in1, int lines1, int columns1, floatComplex *in2, int lines2, int columns2, floatComplex *out); + +EXTERN_SIGPROC void zconv2da(doubleComplex *in1, int lines1, int columns1, doubleComplex *in2, int lines2, int columns2, doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__CONV2D_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/crossCorr.h b/2.3-1/src/c/signalProcessing/includes/crossCorr.h new file mode 100644 index 00000000..c44d6666 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/crossCorr.h @@ -0,0 +1,37 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __CROSSCORR_H__ +#define __CROSSCORR_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void scrossCorra(float* in1, int rows1, int cols1, float* in2, int rows2, int cols2, float* out); + +EXTERN_SIGPROC void dcrossCorra(double* in1, int rows1, int cols1, double* in2, int rows2, int cols2, double* out); + +EXTERN_SIGPROC void ccrossCorra(floatComplex* in1, int rows1, int cols1, floatComplex* in2, int rows2, int cols2, floatComplex* out); + +EXTERN_SIGPROC void zcrossCorra(doubleComplex* in1, int rows1, int cols1, doubleComplex* in2, int rows2, int cols2, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __CROSSCORR_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/dynlib_signalprocessing.h b/2.3-1/src/c/signalProcessing/includes/dynlib_signalprocessing.h new file mode 100644 index 00000000..fcbe5800 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/dynlib_signalprocessing.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_SIGNALPROCESSING_H__ +#define __DYNLIB_SIGNALPROCESSING_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if SIGNALPROCESSING_EXPORTS + #define EXTERN_SIGPROC __declspec (dllexport) + #else + #define EXTERN_SIGPROC __declspec (dllimport) + #endif +#else + #define EXTERN_SIGPROC +#endif + +#endif /* __DYNLIB_SIGNALPROCESSING_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/fft.h b/2.3-1/src/c/signalProcessing/includes/fft.h new file mode 100644 index 00000000..efc85c09 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/fft.h @@ -0,0 +1,57 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FFT_H__ +#define __FFT_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + + +#define sffts(in) in +#define dffts(in) in +#define cffts(in) in +#define zffts(in) in + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void sfftma(float* in,int rows,int columns,float* out); + +EXTERN_SIGPROC void dfftma(double* in,int rows,int columns,double* out); + +/* +** compute the fast fourier transform of a vector +** param in : the input matrix in complex float precision +** param rows: number of rows of the input matrix +** param cols: number of cols of the input matrix +** param out : the transformed matrix in complex float precision +*/ + +EXTERN_SIGPROC void cfftma ( floatComplex* in , int rows, int cols, floatComplex* out); +/* +** compute the fast fourier transform of a vector +** param in : the input matrix in complex double precision +** param rows: number of rows of the input matrix +** param cols: number of cols of the input matrix +** param out : the transformed matrix in complex double precision +*/ +EXTERN_SIGPROC void zfftma ( doubleComplex* in , int rows, int cols, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__FFT_H__ */ + diff --git a/2.3-1/src/c/signalProcessing/includes/fftshift.h b/2.3-1/src/c/signalProcessing/includes/fftshift.h new file mode 100644 index 00000000..242e7ff7 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/fftshift.h @@ -0,0 +1,76 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FFTSHIFT_H__ +#define __FFTSHIFT_H__ + + +#include "dynlib_signalprocessing.h" + +/* + fftshift rearrange the result of fft(x) + it's call like that : fftshift(y), y=ff(x) +*/ +#include "floatComplex.h" +#include "doubleComplex.h" + + +#define sfftshifts(in) in +#define dfftshifts(in) in +#define cfftshifts(in) in +#define zfftshifts(in) in + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void sfftshifta(float* in,int rows,int columns,float* out); + +EXTERN_SIGPROC void dfftshifta(double* in,int rows,int columns,double* out); + +EXTERN_SIGPROC void cfftshifta ( floatComplex* in , int rows, int cols, floatComplex* out); + +EXTERN_SIGPROC void zfftshifta ( doubleComplex* in , int rows, int cols, doubleComplex* out); + + +#define srowfftshifts(in) in +#define drowfftshifts(in) in +#define crowfftshifts(in) in +#define zrowfftshifts(in) in + +EXTERN_SIGPROC void srowfftshifta(float* in,int rows,int columns,float* out); + +EXTERN_SIGPROC void drowfftshifta(double* in,int rows,int columns,double* out); + +EXTERN_SIGPROC void crowfftshifta ( floatComplex* in , int rows, int cols, floatComplex* out); + +EXTERN_SIGPROC void zrowfftshifta ( doubleComplex* in , int rows, int cols, doubleComplex* out); + +#define scolumnfftshifts(in) in +#define dcolumnfftshifts(in) in +#define ccolumnfftshifts(in) in +#define zcolumnfftshifts(in) in + +EXTERN_SIGPROC void scolumnfftshifta(float* in,int rows,int columns,float* out); + +EXTERN_SIGPROC void dcolumnfftshifta(double* in,int rows,int columns,double* out); + +EXTERN_SIGPROC void ccolumnfftshifta ( floatComplex* in , int rows, int cols, floatComplex* out); + +EXTERN_SIGPROC void zcolumnfftshifta ( doubleComplex* in , int rows, int cols, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__FFTSHIFT_H__ */ + diff --git a/2.3-1/src/c/signalProcessing/includes/hilbert.h b/2.3-1/src/c/signalProcessing/includes/hilbert.h new file mode 100644 index 00000000..38264e3b --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/hilbert.h @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#ifndef __HILBERT_H__ +#define __HILBERT_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* FIXME : input : real + output : complex + Is this true all time? + Or must we do input : real, output :real? +*/ + +EXTERN_SIGPROC float shilberts(float in); + +EXTERN_SIGPROC void shilberta (float* in, int rows, int cols, floatComplex *out); + +EXTERN_SIGPROC double dhilberts(double in); + +EXTERN_SIGPROC void dhilberta (double* in, int rows, int cols, doubleComplex *out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __HILBERT_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/ifft.h b/2.3-1/src/c/signalProcessing/includes/ifft.h new file mode 100644 index 00000000..6954c7f9 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/ifft.h @@ -0,0 +1,59 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __IFFT_H__ +#define __IFFT_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#define siffts(in) in +#define diffts(in) in +#define ciffts(in) in +#define ziffts(in) in + + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void sifftma ( float* in , int rows, int cols, float* out); + +EXTERN_SIGPROC void difftma ( double* in , int rows, int cols, double* out); + +/* +** compute the inverse fast fourier transform of a vector +** param in : the input matrix in complex double precision +** param rows: number of rows of the input matrix +** param cols: number of cols of the input matrix +** param out : the transformed matrix in complex double precision +*/ + + +EXTERN_SIGPROC void zifftma ( doubleComplex* in , int rows, int cols, doubleComplex* out); +/* +** compute the inverse fast fourier transform of a vector +** param in : the input matrix in complex float precision +** param rows: number of rows of the input matrix +** param cols: number of cols of the input matrix +** param out : the transformed matrix in complex float precision +*/ + +EXTERN_SIGPROC void cifftma ( floatComplex* in , int rows, int cols, floatComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__IFFT_H__ */ + diff --git a/2.3-1/src/c/signalProcessing/includes/lev.h b/2.3-1/src/c/signalProcessing/includes/lev.h new file mode 100644 index 00000000..32a81782 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/lev.h @@ -0,0 +1,50 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LEV_H__ +#define __LEV_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + function Scilab : + [out1,y,out3]=lev(in) + y : result of the function +*/ +EXTERN_SIGPROC float sleva (float* in,int size, float* out1, float* out3); +EXTERN_SIGPROC double dleva (double* in, int size, double* out1, double* out3); +EXTERN_SIGPROC floatComplex cleva (floatComplex* in,int size, floatComplex* out1, floatComplex* out3); +EXTERN_SIGPROC doubleComplex zleva (doubleComplex* in,int size, doubleComplex* out1, doubleComplex* out3); + + +/* + function Scilab : + [out1,y]=lev(in) + y : result of the function +*/ +EXTERN_SIGPROC float sleva2 (float* in,int size, float* out1); +EXTERN_SIGPROC double dleva2 (double* in, int size, double* out1); +EXTERN_SIGPROC floatComplex cleva2 (floatComplex* in,int size, floatComplex* out1); +EXTERN_SIGPROC doubleComplex zleva2 (doubleComplex* in,int size, doubleComplex* out1); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__LEV_H__*/ + diff --git a/2.3-1/src/c/signalProcessing/includes/levin.h b/2.3-1/src/c/signalProcessing/includes/levin.h new file mode 100644 index 00000000..864fb076 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/levin.h @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LEVIN_H__ +#define __LEVIN_H__ + +#include "dynlib_signalprocessing.h" + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void dlevina (int n, double* cov, int lCov, int cCov, double* la, double* sig, double* lb); + +EXTERN_SIGPROC void slevina (int n, float* cov, int lCov, int cCov, float* la, float* sig, float* lb); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__LEVIN_H__*/ + diff --git a/2.3-1/src/c/signalProcessing/includes/lpc2cep.h b/2.3-1/src/c/signalProcessing/includes/lpc2cep.h new file mode 100644 index 00000000..bfb3a357 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/includes/lpc2cep.h @@ -0,0 +1,44 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LPC2CEP_H__ +#define __LPC2CEP_H__ + +#include "dynlib_signalprocessing.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +/* Matrices on input are squared because matricial logarithm + works only with squared matrices (and logm is used in lcp2cep) + So we just have to pass one parametre on input for the size of + the input matrix, this parametre is size and it's the numbers of + rows(or columns) +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_SIGPROC void slpc2cepa(float* in, int size, float* out); + +EXTERN_SIGPROC void dlpc2cepa(double* in, int size, double* out); + +EXTERN_SIGPROC void clpc2cepa(floatComplex* in, int size, floatComplex* out); + +EXTERN_SIGPROC void zlpc2cepa(doubleComplex* in, int size, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /*__LPC2CEP_H__*/ + diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_cepstrum.h b/2.3-1/src/c/signalProcessing/interfaces/int_cepstrum.h new file mode 100644 index 00000000..af1991ba --- /dev/null +++ b/2.3-1/src/c/signalProcessing/interfaces/int_cepstrum.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CEPSTRUM_H__ +#define __INT_CEPSTRUM_H__ + +#define s0cepstrums0(in) scepstrums(in) + +#define d0cepstrumd0(in) dcepstrums(in) + +#define c0cepstrumc0(in) ccepstrums(in) + +#define z0cepstrumz0(in) zcepstrums(in) + +#define s2cepstrums2(in,size,out) scepstruma(in, size[0]*size[1], out) + +#define d2cepstrumd2(in,size,out) dcepstruma(in, size[0]*size[1], out) + +#define c2cepstrumc2(in,size,out) ccepstruma(in, size[0]*size[1], out) + +#define z2cepstrumz2(in,size,out) zcepstruma(in, size[0]*size[1], out) + +#endif /* !__INT_CEPSTRUM_H__ */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_convol.h b/2.3-1/src/c/signalProcessing/interfaces/int_convol.h new file mode 100644 index 00000000..80ec65b1 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/interfaces/int_convol.h @@ -0,0 +1,153 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_CONVOL_H__ +#define __INT_CONVOL_H__ + + +/* Scalar - Scalar */ + +#define s0s0convols0(in1,in2) in1*in2 + +#define d0d0convold0(in1,in2) in1*in2 + +#define c0c0convolc0(in1,in2) cmuls(in1,in2) + +#define z0z0convolz0(in1,in2) zmuls(in1,in2) + +#define s0c0convolc0(in1,in2) cmuls(FloatComplex(in1,0),in2) + +#define d0z0convolz0(in1,in2) zmuls(DoubleComplex(in1,0),in2) + +#define c0s0convolc0(in1,in2) cmuls(in1,FloatComplex(in2,0)) + +#define z0d0convolz0(in1,in2) zmuls(in1,DoubleComplex(in2,0)) + +/* Scalar - Matrix */ + +#define s0s2convols2(in1,in2,size,out) {int i;\ + for (i=0;i +#include "lev.h" +#include "conj.h" +#include "multiplication.h" +#include "addition.h" +#include "division.h" +#include "subtraction.h" + + +floatComplex cleva(floatComplex* in,int size, floatComplex* ar, floatComplex* rc){ + int i=0, j=0; + floatComplex accu=FloatComplex(0,0); + floatComplex* ak1; + floatComplex temp; + floatComplex sigma2; + + /* FIXME : malloc here */ + ak1=(floatComplex*)malloc((unsigned int)size*sizeof(floatComplex)); + + /* initialize levinson's algorithm */ + temp=crdivs(in[1],in[0]); + ar[0]=FloatComplex(-creals(temp),-cimags(temp)); + + rc[0]=ar[0]; + + temp = cmuls(ar[0],cconjs(ar[0])); + sigma2=cmuls(cdiffs(FloatComplex(1,0), temp), in[0]); + + ak1[0]=FloatComplex(0,0); + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" +#include "conj.h" +#include "multiplication.h" +#include "addition.h" +#include "division.h" +#include "subtraction.h" + + +floatComplex cleva2(floatComplex* in,int size, floatComplex* ar){ + int i=0, j=0; + floatComplex accu=FloatComplex(0,0); + floatComplex* ak1; + floatComplex temp; + floatComplex sigma2; + + /* FIXME : malloc here */ + ak1=(floatComplex*)malloc((unsigned int)size*sizeof(floatComplex)); + + /* initialize levinson's algorithm */ + temp=crdivs(in[1],in[0]); + ar[0]=FloatComplex(-creals(temp),-cimags(temp)); + + temp = cmuls(ar[0],cconjs(ar[0])); + sigma2=cmuls(cdiffs(FloatComplex(1,0), temp), in[0]); + + ak1[0]=FloatComplex(0,0); + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" + +double dleva(double* in,int size, double* ar, double* rc){ + int i=0, j=0; + double accu=0; + double* ak1; + double sigma2; + + /* FIXME : malloc here */ + ak1=(double*)malloc((unsigned int)size*sizeof(double)); + + /* initialize levinson's algorithm */ + ar[0]=-in[1]/in[0]; + rc[0]=ar[0]; + sigma2=(1-ar[0]*ar[0])*in[0]; + ak1[0]=0; + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" + +double dleva2(double* in,int size, double* ar){ + int i=0, j=0; + double accu=0; + double* ak1; + double sigma2; + + /* FIXME : malloc here */ + ak1=(double*)malloc((unsigned int)size*sizeof(double)); + + /* initialize levinson's algorithm */ + ar[0]=-in[1]/in[0]; + sigma2=(1-ar[0]*ar[0])*in[0]; + ak1[0]=0; + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" + +float sleva(float* in,int size, float* ar, float* rc){ + int i=0, j=0; + float accu=0; + float* ak1; + float sigma2; + + /* FIXME : malloc here */ + ak1=(float*)malloc((unsigned int)size*sizeof(float)); + + /* initialize levinson's algorithm */ + ar[0]=-in[1]/in[0]; + rc[0]=ar[0]; + sigma2=(1-ar[0]*ar[0])*in[0]; + ak1[0]=0; + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" + +float sleva2(float* in,int size, float* ar){ + int i=0, j=0; + float accu=0; + float* ak1; + float sigma2; + + /* FIXME : malloc here */ + ak1=(float*)malloc((unsigned int)size*sizeof(float)); + + /* initialize levinson's algorithm */ + ar[0]=-in[1]/in[0]; + sigma2=(1-ar[0]*ar[0])*in[0]; + ak1[0]=0; + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include +#include "lev.h" +#include + + +static void dlevaTest(void) { + + printf(" \n -------Double Test------- \n"); + /* TEST 1 */ + { + double in[4]={1,2,3,4}; + double result1[3]={ - 1.25 , 0.0000000000000002220446 , - 0.2500000000000001110223 }; + double result2 = -2.5; + double result3[3]={- 2.,- 0.3333333333333333148296, - 0.2500000000000001110223 }; + double out1[3]={0}, out2=0, out3[3]={0}; + int i; + + out2 = dleva(in,4,out1,out3); + + ; + for (i=0;i<3;i++) { + printf ("assert : %e \n" , (fabs(out1[i]-result1[i]) )/ fabs (out1[i])) ; + if (out1[i]>1e-15) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<3e-15); + else assert(1); + } + + if (out2>1e-16) assert((fabs(out2-result2) / fabs (out2))<1e-16); + else assert (1); + + for (i=0;i<3;i++) { + if (out3[i]>1e-16) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<1e-14); + else assert(1); + } + + } + + /* TEST 2 */ + { + double in[8]= {0.9475104575976729393005,0.0563528141938149929047,0.8801407832652330398560,0.5110759926028549671173,0.8736385302618145942688, 0.9233113336376845836639,0.1977134644985198974609,0.0427226074971258640289}; + double result1[7]= { - 1.4145989907356759651691 , + - 0.1879185484276382211988 , + 1.9546862646288580833698 , + 0.0431855597974486471458 , + - 0.6934494907248942574540 , + 0.3355525090987989678126 , + - 0.7681883584831936673254}; + double result2 = 1.132375302303337161192; + double result3[7]= {- 0.0594746092161267045362 , + - 0.9286458300417500533186 , + - 3.5018950960448012033 , + 1.0467634735526456513099 , + 3.0600285663270052616269 , + - 1.8325211983274933835730 , + - 0.7681883584831936673254 }; + double out1[7]={0}, out2=0, out3[7]={0}; + int i; + + out2 = dleva(in,8,out1,out3); + /*FIXME : Assert à 10^-13*/ + for (i=0;i<7;i++) { + if (out1[i]>1e-16) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<1e-13); + else assert(1); + } + + if (out2>1e-16) assert((fabs(out2-result2) / fabs (out2))<3e-16); + + + for (i=0;i<7;i++) { + if (out3[i]>1e-15) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<3e-14); + else assert(1); + } + + } +} + + +static void zlevaTest(void) { + + /* TEST 1 */ + { + double inR[4]={1,2,3,4}; + double inI[4]={1,1,1,1}; + double result1R[3]={ 0.6666666666666662965923 ,- 4.6666666666666687390830 , 2.0000000000000004440892 }; + double result1I[3]={ - 1.1666666666666669627261 , - 2.1666666666666665186369 , 2.5 }; + double result2R = 6.1666666666666678509046; + double result2I = 6.1666666666666678509046; + double result3R[3]={- 1.5,0.3333333333333333148, 2.0000000000000004440 }; + double result3I[3]={ + 0.5000000000000000000000 , + 0.6666666666666666296592 , 2.5 }; + doubleComplex out1[3], out2=DoubleComplex(0,0), out3[3]; + doubleComplex *in; + int i; + + printf(" \n -------DoubleComplex Test------- \n"); + + in=DoubleComplexMatrix(inR,inI,4); + + out2 = zleva(in,4,out1,out3); + + for (i=0;i<3;i++){ + if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <3e-15); + else assert(1); + if (zimags(out1[i])>1e-16) assert((fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i]))) <1e-16); + else assert(1); + } + + if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <3e-15); + else assert(1); + if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <3e-15); + else assert(1); + + for (i=0;i<3;i++){ + if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <3e-15); + else assert(1); + if (zimags(out3[i])>1e-16) assert((fabs(zimags(out3[i])-result3I[i]) / fabs(zimags(out3[i]))) <1e-16); + else assert(1); + } + } + + + + /* TEST 2 */ + + { + double inR[6]={0.0143211213871836662292,0.7033217861317098140717,0.5212594550102949142456,0.0582674746401607990265, + 0.488313094712793827057,0.8035244266502559185028}; + double inI[6]={0.3819901309907436370850,0.4311556280590593814850,0.7573182275518774986267,0.0120028085075318813324, + 0.9994637314230203628540,0.9508706149645149707794}; + double result1R[5]={- 3.6095794839789050456602,- 22.476200430215509840082,- 8.9817944433992220609753, + 12.625498164379671095503, 3.5273512791323136106314}; + double result1I[5]={9.8938676519388195629290,- 11.160861495580743252276,- 12.396447957003889683847, + - 20.810995133509468502098,3.8571422461904862899473}; + double result2R = 1.2259658790319762911025; + double result2I = 32.700432742697543631039; + double result3R[5]={ - 1.1960559267342236733356,- 0.0224784059157190282963,- 2.232787465146694128038, + 0.4864901943454941202205,3.5273512791323136106314}; + double result3I[5]={1.7963629642455771762144,0.7825308030566066053169,1.4948702216638325435127, + - 1.0642505925602050442791,3.8571422461904862899473}; + doubleComplex out1[5], out2=DoubleComplex(0,0), out3[5]; + doubleComplex *in; + int i; + + printf(" \n -------DoubleComplex Test------- \n"); + + in=DoubleComplexMatrix(inR,inI,6); + + out2 = zleva(in,6,out1,out3); + + /*FIXME : Assert à 10^-14*/ + + for (i=0;i<5;i++) printf("out : %1.20f+%1.20f\n",zreals(out1[i]),zimags(out1[i])); + for (i=0;i<5;i++){ + if (zreals(out1[i])>1e-16) assert((fabs(zreals(out1[i])-result1R[i]) / fabs(zreals(out1[i]))) <3e-14); + else assert(1); + if (zimags(out1[i])>1e-16) assert((fabs(zimags(out1[i])-result1I[i]) / fabs(zimags(out1[i]))) <3e-15); + else assert(1); + } + + if (zreals(out2)>1e-16) assert((fabs(zreals(out2)-result2R) / fabs(zreals(out2))) <3e-15); + else assert(1); + if (zimags(out2)>1e-16) assert((fabs(zimags(out2)-result2I) / fabs(zimags(out2))) <3e-15); + else assert(1); + + for (i=0;i<5;i++){ + if (zreals(out3[i])>1e-16) assert((fabs(zreals(out3[i])-result3R[i]) / fabs(zreals(out3[i]))) <3e-15); + else assert(1); + if (zimags(out3[i])>1e-16) assert((fabs(zimags(out3[i])-result3I[i]) / fabs(zimags(out3[i]))) <3e-15); + else assert(1); + } + } +} + + + + +static int levTest(void) { + printf("\n>>>> Lev Tests\n"); + dlevaTest(); + zlevaTest(); + return 0; +} + +int main(void) { + assert( levTest()== 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/lev/testFloatLev.c b/2.3-1/src/c/signalProcessing/lev/testFloatLev.c new file mode 100644 index 00000000..2aa1808c --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/testFloatLev.c @@ -0,0 +1,198 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include "lev.h" +#include + + +static void slevaTest(void) { + + printf(" \n -------Float Test------- \n"); + /* TEST 1 */ + { + float in[4]={1.0f,2.0f,3.0f,4.0f}; + float result1[3]={ - 1.25f , 0.0000000000000002220446f , - 0.2500000000000001110223f }; + float result2 = -2.5; + float result3[3]={- 2.0f,- 0.3333333333333333148296f, - 0.2500000000000001110223f }; + float out1[3]={0.0f}, out2=0.0f, out3[3]={0.0f}; + int i; + + out2 = sleva(in,4,out1,out3); + + ; + for (i=0;i<3;i++) { + if (out1[i]>1e-6) assert( (fabs(out1[i]-result1[i]) / fabs (out1[i]) )<1e-8); + else assert(1); + } + + if (out2>1e-6) assert((fabs(out2-result2) / fabs (out2))<1e-8); + else assert (1); + + for (i=0;i<3;i++) { + if (out3[i]>1e-6) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<1e-8); + else assert(1); + } + + } + + /* TEST 2 */ + { + float in[8]= {0.9475104575976729393005f,0.0563528141938149929047f,0.8801407832652330398560f,0.5110759926028549671173f,0.8736385302618145942688f, 0.9233113336376845836639f,0.1977134644985198974609f,0.0427226074971258640289f}; + float result1[7]= { - 1.4145989907356759651691f , + - 0.1879185484276382211988f , + 1.9546862646288580833698f , + 0.0431855597974486471458f , + - 0.6934494907248942574540f , + 0.3355525090987989678126f , + - 0.7681883584831936673254f}; + float result2 = 1.132375302303337161192f; + float result3[7]= {- 0.0594746092161267045362f , + - 0.9286458300417500533186f , + - 3.5018950960448012033f , + 1.0467634735526456513099f , + 3.0600285663270052616269f , + - 1.8325211983274933835730f , + - 0.7681883584831936673254f }; + float out1[7]={0.0f}, out2=0.0f, out3[7]={0.0f}; + int i; + + out2 = sleva(in,8,out1,out3); + /*FIXME : Assert à 10^-4*/ + for (i=0;i<7;i++) { + if (out1[i]>1e-6) assert((fabs(out1[i]-result1[i]) / fabs (out1[i]))<3e-5); + else assert(1); + } + + if (out2>1e-6) assert((fabs(out2-result2) / fabs (out2))<1e-6); + + + for (i=0;i<7;i++) { + if (out3[i]>1e-6) assert((fabs(out3[i]-result3[i]) / fabs (out3[i]))<1e-6); + else assert(1); + } + + } +} + + +static void clevaTest(void) { + + /* TEST 1 */ + { + float inR[4]={1.0f,2.0f,3.0f,4.0f}; + float inI[4]={1.0f,1.0f,1.0f,1.0f}; + float result1R[3]={ 0.6666666666666662965923f ,- 4.6666666666666687390830f , 2.0000000000000004440892f }; + float result1I[3]={ - 1.1666666666666669627261f , - 2.1666666666666665186369f , 2.5f }; + float result2R = 6.1666666666666678509046f; + float result2I = 6.1666666666666678509046f; + float result3R[3]={- 1.5f,0.3333333333333333148f, 2.0000000000000004440f }; + float result3I[3]={ + 0.5000000000000000000000f , + 0.6666666666666666296592f , 2.5f }; + floatComplex out1[3], out2=FloatComplex(0,0), out3[3]; + floatComplex *in; + int i; + + printf(" \n -------FloatComplex Test------- \n"); + + in=FloatComplexMatrix(inR,inI,4); + + out2 = cleva(in,4,out1,out3); + + for (i=0;i<3;i++){ + if (creals(out1[i])>1e-6) assert((fabs(creals(out1[i])-result1R[i]) / fabs(creals(out1[i]))) <1e-6); + else assert(1); + if (cimags(out1[i])>1e-6) assert((fabs(cimags(out1[i])-result1I[i]) / fabs(cimags(out1[i]))) <1e-7); + else assert(1); + } + + if (creals(out2)>1e-6) assert((fabs(creals(out2)-result2R) / fabs(creals(out2))) <1e-6); + else assert(1); + if (cimags(out2)>1e-6) assert((fabs(cimags(out2)-result2I) / fabs(cimags(out2))) <1e-6); + else assert(1); + + for (i=0;i<3;i++){ + if (creals(out3[i])>1e-6) assert((fabs(creals(out3[i])-result3R[i]) / fabs(creals(out3[i]))) <1e-6); + else assert(1); + if (cimags(out3[i])>1e-6) assert((fabs(cimags(out3[i])-result3I[i]) / fabs(cimags(out3[i]))) <1e-8); + else assert(1); + } + } + + + + /* TEST 2 */ + + { + float inR[6]={0.0143211213871836662292f,0.7033217861317098140717f,0.5212594550102949142456f,0.0582674746401607990265f, + 0.488313094712793827057f,0.8035244266502559185028f}; + float inI[6]={0.3819901309907436370850f,0.4311556280590593814850f,0.7573182275518774986267f,0.0120028085075318813324f, + 0.9994637314230203628540f,0.9508706149645149707794f}; + float result1R[5]={- 3.6095794839789050456602f,- 22.476200430215509840082f,- 8.9817944433992220609753f, + 12.625498164379671095503f, 3.5273512791323136106314f}; + float result1I[5]={9.8938676519388195629290f,- 11.160861495580743252276f,- 12.396447957003889683847f, + - 20.810995133509468502098f,3.8571422461904862899473f}; + float result2R = 1.2259658790319762911025f; + float result2I = 32.700432742697543631039f; + float result3R[5]={ - 1.1960559267342236733356f,- 0.0224784059157190282963f,- 2.232787465146694128038f, + 0.4864901943454941202205f,3.5273512791323136106314f}; + float result3I[5]={1.7963629642455771762144f,0.7825308030566066053169f,1.4948702216638325435127f, + - 1.0642505925602050442791f,3.8571422461904862899473f}; + floatComplex out1[5], out2=FloatComplex(0,0), out3[5]; + floatComplex *in; + int i; + + printf(" \n -------FloatComplex Test------- \n"); + + in=FloatComplexMatrix(inR,inI,6); + + out2 = cleva(in,6,out1,out3); + + + + for (i=0;i<5;i++) printf("out : %1.20f+%1.20f\n",creals(out1[i]),cimags(out1[i])); + for (i=0;i<5;i++){ + if (creals(out1[i])>1e-6) assert((fabs(creals(out1[i])-result1R[i]) / fabs(creals(out1[i]))) <1e-6); + else assert(1); + if (cimags(out1[i])>1e-6) assert((fabs(cimags(out1[i])-result1I[i]) / fabs(cimags(out1[i]))) <1e-6); + else assert(1); + } + + if (creals(out2)>1e-6) assert((fabs(creals(out2)-result2R) / fabs(creals(out2))) <1e-8); + else assert(1); + if (cimags(out2)>1e-6) assert((fabs(cimags(out2)-result2I) / fabs(cimags(out2))) <1e-8); + else assert(1); + + for (i=0;i<5;i++){ + if (creals(out3[i])>1e-6) assert((fabs(creals(out3[i])-result3R[i]) / fabs(creals(out3[i]))) <1e-7); + else assert(1); + if (cimags(out3[i])>1e-6) assert((fabs(cimags(out3[i])-result3I[i]) / fabs(cimags(out3[i]))) <1e-6); + else assert(1); + } + } +} + + + + +static int levTest(void) { + printf("\n>>>> Lev Tests\n"); + slevaTest(); + clevaTest(); + return 0; +} + +int main(void) { + assert( levTest()== 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj b/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj new file mode 100644 index 00000000..4dbf3d95 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BD0B9C19-FDC9-46AB-BCDB-384B4967B7A2} + testDoubleLev + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj.filters b/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj.filters new file mode 100644 index 00000000..d8f474c6 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/test_DoubleLev/testDoubleLev.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj b/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj new file mode 100644 index 00000000..1acabea3 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {81145727-FB2B-4CD6-B5AC-3F2146F93D5F} + testFloatLev + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj.filters b/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj.filters new file mode 100644 index 00000000..915db23e --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/test_FloatLev/testFloatLev.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lev/zleva.c b/2.3-1/src/c/signalProcessing/lev/zleva.c new file mode 100644 index 00000000..c2b9b1b0 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lev/zleva.c @@ -0,0 +1,86 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +/*Resolve the Yule-Walker equations: + + |r(0) r(1) ... r(N-1)|| a(1) | |sigma2| + |r(1) r(0) ... r(n-1)|| a(2) | | 0 | + | : : ... : || : |=| 0 | + | : : ... : || : | | 0 | + |r(N-1) r(N-2) ... r(0) ||a(N-1)| | 0 | + + using Levinson's algorithm. + r :Correlation coefficients + ar :Auto-Regressive model parameters + sigma2 :Scale constant + rc :Reflection coefficients +*/ + +#include +#include "lev.h" +#include "conj.h" +#include "multiplication.h" +#include "addition.h" +#include "division.h" +#include "subtraction.h" + +doubleComplex zleva(doubleComplex* in,int size, doubleComplex* ar, doubleComplex* rc){ + int i=0, j=0; + doubleComplex accu=DoubleComplex(0,0); + doubleComplex* ak1; + doubleComplex temp; + doubleComplex sigma2; + + /* FIXME : malloc here */ + ak1=(doubleComplex*)malloc((unsigned int)size*sizeof(doubleComplex)); + + /* initialize levinson's algorithm */ + temp=zrdivs(in[1],in[0]); + ar[0]=DoubleComplex(-zreals(temp),-zimags(temp)); + + rc[0]=ar[0]; + + temp = zmuls(ar[0],zconjs(ar[0])); + sigma2=zmuls(zdiffs(DoubleComplex(1,0), temp), in[0]); + + ak1[0]=DoubleComplex(0,0); + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "lev.h" +#include "conj.h" +#include "multiplication.h" +#include "addition.h" +#include "division.h" +#include "subtraction.h" + +doubleComplex zleva2(doubleComplex* in,int size, doubleComplex* ar){ + int i=0, j=0; + doubleComplex accu=DoubleComplex(0,0); + doubleComplex* ak1; + doubleComplex temp; + doubleComplex sigma2; + + /* FIXME : malloc here */ + ak1=(doubleComplex*)malloc((unsigned int)size*sizeof(doubleComplex)); + + /* initialize levinson's algorithm */ + temp=zrdivs(in[1],in[0]); + ar[0]=DoubleComplex(-zreals(temp),-zimags(temp)); + + temp = zmuls(ar[0],zconjs(ar[0])); + sigma2=zmuls(zdiffs(DoubleComplex(1,0), temp), in[0]); + + ak1[0]=DoubleComplex(0,0); + + /* iterative solution to yule-walker equations */ + for (i=1;i +#include "levin.h" +#include "levinUtils.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" +#include "zeros.h" + +void dlevina (int n, double* cov, int lCov, int cCov, double* la, double* sig, double* lb){ +/* + [la and lb] + In Scilab, the return value la is a list of n elements. Each element is a matrix cCov*cCov, + and each element of the matrix is a polynome whose degree is n, so the polynome got n+1 elements. + The greatest size of a element of the list is : (n+1)*cCov*cCov. + + Here, la is a matrix which contain all elements of the list, its size is n*(n+1)*cCov*cCov. We take the + maximum size for all elements. + The first element of the list is the first (n+1)*cCov*cCov elements of la, namely la[0] to la[(n+1)*cCov*cCov-1]. + The second element of the list is the elements of la between (n+1)*cCov*cCov and 2*(n+1)*cCov*cCov,namely la[(n+1)*cCov*cCov] + to la[2*(n+1)*cCov*cCov-1],... + + Enter now in a element of the list. Take the first for example. + This is, like said before, a cCov*cCov matrix. In la, it contains (n+1)*cCov*cCov. Each element of the matrix contains (n+1) + elements. As it's stocked by columns, if we represent a matrix like [a c], for example, the elements 0 to n of la represent + [b d] + a, the elements (n+1) to 2(n+1)-1 represent b,... + + To finish, look at the elements of the matrix, the polynomes. The coefficients of the polynomes are stocked in increasing order. + + For example, if la in Scilab is : list( [3+2x 5-2x ]) + ( [-5+x -2+4x]) + ([3+x-x^2 -1+2x ]) + ([1+6x+3x^2 -2x-x^2 ]) + the result in dlevin will be : + -la is a table of 2*3*2*2 elements(n=2,cCov=2); + -la[]={3,2,0, -5,1,0, 5,-2,0, -2,4,0, 3,1,-1, 1,6,3 -1,2,0, 0,-2,-1}. + + It's the same for lb. + + [sig] + In Scilab, the return value sig is a list of n elements. Each element is a matrix cCov*cCov, + and each element of the matrix is a scalar, so 1 element. + The greatest size of a element of the list is : cCov*cCov. + + Let see an example so know how it's stocked. + In Scilab, if sig is : list( [1 3]) + ( [2 4]) + ( [5 7]) + ( [6 8]) + the result in dlevin will be : + -sig={1,2, 5,6, 3,4, 7,8}. + It's as if we put the matrix the ones under the others and we take the first column, the second,... + + >>>CAREFUL<<< + la/lb and sig are stored differently + + +*/ + + + int i=0; + + +/*version ISO C99 + double tmp1[n*cCov*cCov], tmp2[n*cCov*cCov]; + double sig1[cCov], gam[cCov]; + double R1[n*cCov],R2[n*cCov],R3[n*cCov],R4[n*cCov]; +*/ +/*version pas ISO C99 */ + double *tmp1, *tmp2; + double *sig1, *gam; + double *R1,*R2,*R3,*R4; + + /* FIXME : malloc here */ + + tmp1=(double *)malloc((unsigned int)((n+1)*cCov*cCov)*sizeof(double)); + tmp2=(double *)malloc((unsigned int)((n+1)*cCov*cCov)*sizeof(double)); + sig1=(double *)malloc((unsigned int)(cCov*cCov)*sizeof(double)); + gam=(double *)malloc((unsigned int)(cCov*cCov)*sizeof(double)); + R1=(double *)malloc((unsigned int)(n*cCov*cCov)*sizeof(double)); + R2=(double *)malloc((unsigned int)(n*cCov*cCov)*sizeof(double)); + R3=(double *)malloc((unsigned int)(n*cCov*cCov)*sizeof(double)); + R4=(double *)malloc((unsigned int)(n*cCov*cCov)*sizeof(double)); + + + + /* + * Initializations + * */ + dzerosa(sig,n*cCov*cCov,1); + dzerosa(la,n*(n+1)*cCov*cCov,1); + dzerosa(lb,n*(n+1)*cCov*cCov,1); + + /*equal to eye(la) and eye(lb) + but we can't use eye cause to the indexation*/ + for (i=0;i0;j--) {out[i*(n+1)+j]=in[i*(n+1)+deb_in+j-1];} + out[i*(n+1)]=0; + } + +} + + + + + +/* Float Functions */ + +void sr1(float *in,int lines, int columns, int n, float * out){ + int i,j; + for (i=0;i0;j--) {out[i*(n+1)+j]=in[i*(n+1)+deb_in+j-1];} + out[i*(n+1)]=0; + } + +} + diff --git a/2.3-1/src/c/signalProcessing/levin/levinUtils.h b/2.3-1/src/c/signalProcessing/levin/levinUtils.h new file mode 100644 index 00000000..62df88f2 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/levinUtils.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + + + +/* creation of arrays used in levin */ + +void dr1(double *in,int lines,int columns, int n, double * out); +void dr2(double *in,int lines,int columns, int n, double * out); +void dr3(double *in,int lines,int columns, int n, double * out); +void dr4(double *in,int lines,int columns, int n, double * out); +void sr1(float *in,int lines,int columns, int n, float * out); +void sr2(float *in,int lines,int columns, int n, float * out); +void sr3(float *in,int lines,int columns, int n, float * out); +void sr4(float *in,int lines,int columns, int n, float * out); + + + +/*multiplications used in levin program, differents from the classic multiplication*/ +/* + in1,in2 : matrices to multiply + n : + columns : number of columns of in2 + ind_boucle : indice of the loop + out : result matrix + lines : number of lines of the result + deb_out : 0 if the result start to the indice 0, 1 otherwise + choix : 'u' or 'd', depends of in2. We take either the k first elements of in2 ('u') or the k last ('d'), + k is a nomber which depends of the indice of loop, the columns ... + */ +void dlevinmul(double* in1, double* in2, int n, int columns, int ind_boucle, double* out, int lines, int deb_out,char choix); +void dlevinmul2(double* in1, double *in2,int ind_boucle,int n,int columns,double* out); +void slevinmul(float* in1, float* in2, int n, int columns, int ind_boucle, float* out, int lines, int deb_out,char choix); +void slevinmul2(float* in1, float *in2,int ind_boucle,int n,int columns,float* out); + + +/*take the values of sig wanted*/ +void dlevinsig(double *sig,int n, int columns, int lines, double *sig1); +void slevinsig(float *sig,int n, int columns, int lines, float *sig1); + +/*a subtraction used in levin program, is different from the classic subtraction cause of the indices*/ +/* + in1,in2 : matrices to subtract + n : + columns : number of columns of in2 + deb_in : place of the first element of in1 + ind_boucle : indice of the loop + out : result matrix + */ +void dlevinsub(double* in1, double* in2, int n, int columns, int deb_in, int ind_boucle, double* out); +void slevinsub(float* in1, float* in2, int n, int columns, int deb_in, int ind_boucle, float* out); + + +/*used for the multiplication by z which is equal to step forward*/ +void ddecalage(double* in, int deb_in,int n,int columns,double * out); +void sdecalage(float* in, int deb_in,int n,int columns,float * out); + + + + diff --git a/2.3-1/src/c/signalProcessing/levin/slevina.c b/2.3-1/src/c/signalProcessing/levin/slevina.c new file mode 100644 index 00000000..e0e30a84 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/slevina.c @@ -0,0 +1,185 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "levin.h" +#include "levinUtils.h" +#include "matrixInversion.h" +#include "matrixMultiplication.h" +#include "zeros.h" + +void slevina (int n, float* cov, int lCov, int cCov, float* la, float* sig, float* lb){ +/* + [la and lb] + In Scilab, the return value la is a list of n elements. Each element is a matrix cCov*cCov, + and each element of the matrix is a polynome whose degree is n, so the polynome got n+1 elements. + The greatest size of a element of the list is : (n+1)*cCov*cCov. + + Here, la is a matrix which contain all elements of the list, its size is n*(n+1)*cCov*cCov. We take the + maximum size for all elements. + The first element of the list is the first (n+1)*cCov*cCov elements of la, namely la[0] to la[(n+1)*cCov*cCov-1]. + The second element of the list is the elements of la between (n+1)*cCov*cCov and 2*(n+1)*cCov*cCov,namely la[(n+1)*cCov*cCov] + to la[2*(n+1)*cCov*cCov-1],... + + Enter now in a element of the list. Take the first for example. + This is, like said before, a cCov*cCov matrix. In la, it contains (n+1)*cCov*cCov. Each element of the matrix contains (n+1) + elements. As it's stocked by columns, if we represent a matrix like [a c], for example, the elements 0 to n of la represent + [b d] + a, the elements (n+1) to 2(n+1)-1 represent b,... + + To finish, look at the elements of the matrix, the polynomes. The coefficients of the polynomes are stocked in increasing order. + + For example, if la in Scilab is : list( [3+2x 5-2x ]) + ( [-5+x -2+4x]) + ([3+x-x^2 -1+2x ]) + ([1+6x+3x^2 -2x-x^2 ]) + the result in dlevin will be : + -la is a table of 2*3*2*2 elements(n=2,cCov=2); + -la[]={3,2,0, -5,1,0, 5,-2,0, -2,4,0, 3,1,-1, 1,6,3 -1,2,0, 0,-2,-1}. + + It's the same for lb. + + [sig] + In Scilab, the return value sig is a list of n elements. Each element is a matrix cCov*cCov, + and each element of the matrix is a scalar, so 1 element. + The greatest size of a element of the list is : cCov*cCov. + + Let see an example so know how it's stocked. + In Scilab, if sig is : list( [1 3]) + ( [2 4]) + ( [5 7]) + ( [6 8]) + the result in dlevin will be : + -sig={1,2, 5,6, 3,4, 7,8}. + It's as if we put the matrix the ones under the others and we take the first column, the second,... + + + >>>CAREFUL<<< + la/lb and sig are stored differently + +*/ + + + int i=0; + + +/*version ISO C99 + double tmp1[n*cCov*cCov], tmp2[n*cCov*cCov]; + double sig1[cCov], gam[cCov]; + double R1[n*cCov],R2[n*cCov],R3[n*cCov],R4[n*cCov]; +*/ +/*version pas ISO C99 */ + float *tmp1, *tmp2; + float *sig1, *gam; + float *R1,*R2,*R3,*R4; + + /* FIXME : malloc here */ + + tmp1=(float*)malloc((unsigned int)((n+1)*cCov*cCov)*sizeof(float)); + tmp2=(float*)malloc((unsigned int)((n+1)*cCov*cCov)*sizeof(float)); + sig1=(float*)malloc((unsigned int)(cCov*cCov)*sizeof(float)); + gam=(float*)malloc((unsigned int)(cCov*cCov)*sizeof(float)); + R1=(float*)malloc((unsigned int)(n*cCov*cCov)*sizeof(float)); + R2=(float*)malloc((unsigned int)(n*cCov*cCov)*sizeof(float)); + R3=(float*)malloc((unsigned int)(n*cCov*cCov)*sizeof(float)); + R4=(float*)malloc((unsigned int)(n*cCov*cCov)*sizeof(float)); + + + + /* + * Initializations + * */ + szerosa(sig,n*cCov*cCov,1); + szerosa(la,n*(n+1)*cCov*cCov,1); + szerosa(lb,n*(n+1)*cCov*cCov,1); + + /*equal to eye(la) and eye(lb) + but we can't use eye cause to the indexation*/ + for (i=0;i +#include +#include +#include "levin.h" + + + +static void dlevinaTest(void) { + + int i=0; + + double in[20]={0.9932627780362963676453,0.8074779896996915340424,0.8554796632379293441773, + 0.5031460602767765522003,0.0963323051109910011292,0.7058098311536014080048,0.8630577065050601959229, + 0.0076185003854334354401,0.8048951094970107078552,0.5963762304745614528656,0.1176836211234331130981, + 0.8010095250792801380158,0.5132340090349316596985,0.2010910022072494029999,0.7860820889472961425781, + 0.7865035482682287693024,0.6951530007645487785339,0.4248132123611867427826,0.3446625452488660812378, + 0.6497785751707851886749}; + + double result_la[48]={1,-0.3865652298877474413175,0,0, + 0,- 0.3434956227371184778185,0,0, + 0,- 0.5839401384584462784133,0,0, + 1, - 0.2005808775714553182645,0,0, + 1, - 0.9800896173744618744550, 1.690821697485581420750,0, + 0,- 0.0829753946826485844213, 0.1706850739778944525682,0, + 0,- 1.5024216979529190219012, - 0.2246231721723708774086,0, + 1, - 0.1137930279260921523354, - 0.9252347371003220022345,0, + 1, 0.9890664402902992202726, 0.5787159455904740124055,1.2930051366411721147642, + 0,- 0.8505434486601569643582,0.6053315910573954239382, - 0.5028225952598519565839, + 0,2.1236994816779066752588, - 2.0487578989503822946006, - 3.9701563399198689374714, + 1, - 1.4716550983021570164766, - 0.2144135496153387610008, 1.4891952441184541644503}; + + double result_sig[12]={0.9932627780362963676453, 0.8074779896996915340424,0.3628661470549920387008,0.4106795421050958294629, + - 0.6299693698364057237171,- 0.0327761932052800242232,0.1176836211234331130981,0.8010095250792801380158, + - 0.1942402590062223821654, 0.5878460460823274891240, 0.3391635613203383137204,0.1291488276492920306282}; + + double result_lb[48]={- 0.3981923483861428136876,1,0,0, + - 0.3550295998674473652024,0,0,0, + - 0.5696378489005990974903,0,0,0, + - 0.1988863157065166586968,1,0,0, + 1.62419596196504145702, - 0.9819754657045941526050,1,0, + 0.0329804805798983302623, - 0.0396945499933941681192,0,0, + - 0.1283118770193089619447, - 1.492334154918740996010,0,0, + - 0.9551334433810730883963, - 0.0265634378315470209841,1,0, + 1.1913835764722526810999,0.0301096362936850159286, 1.909619275538441574014,1, + 0.4767865147665533709365 ,- 0.2016469880890300325760,0.2878592385656049135179,0, + 5.1391578635011887499218, - 2.5030727471739586675881, - 6.5148738878935787965929,0, + - 2.8040366068494293472213 ,- 1.3523880325486907771904, 2.4607313355305917568217,1}; + + double la[48],lb[48],sig[12]; + + dlevina(3,in,10,2,la,sig,lb); + + /* FIXME : assert à 10^-13 */ + /* FIXME : sig est rangé différemment qu'à l'habitude */ + + for (i=0;i<48;i++){ + if (la[i]!=0) + assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <3e-15); + else + assert( fabs(la[i]-result_la[i]) == 0); + } + + for (i=0;i<12;i++){ + if (sig[i]!=0) + assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <3e-15); + else + assert( fabs(sig[i]-result_sig[i]) == 0); + } + + + for (i=0;i<48;i++){ + if (lb[i]!=0) + assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <3e-13); + else + assert( fabs(lb[i]-result_lb[i]) == 0); + } + +} + + + +static int levinTest(void) { + printf("\n>>>> Levin Tests\n"); + dlevinaTest(); + return 0; +} + +int main(void) { + assert( levinTest()== 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/levin/testFloatLevin.c b/2.3-1/src/c/signalProcessing/levin/testFloatLevin.c new file mode 100644 index 00000000..e692f3b7 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/testFloatLevin.c @@ -0,0 +1,103 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "levin.h" + + + +static void dlevinaTest(void) { + + int i=0; + + float in[20]={0.9932627780362963676453f,0.8074779896996915340424f,0.8554796632379293441773f, + 0.5031460602767765522003f,0.0963323051109910011292f,0.7058098311536014080048f,0.8630577065050601959229f, + 0.0076185003854334354401f,0.8048951094970107078552f,0.5963762304745614528656f,0.1176836211234331130981f, + 0.8010095250792801380158f,0.5132340090349316596985f,0.2010910022072494029999f,0.7860820889472961425781f, + 0.7865035482682287693024f,0.6951530007645487785339f,0.4248132123611867427826f,0.3446625452488660812378f, + 0.6497785751707851886749f}; + + float result_la[48]={1.0f,-0.3865652298877474413175f,0.0f,0.0f, + 0.0f,- 0.3434956227371184778185f,0.0f,0.0f, + 0.0f,- 0.5839401384584462784133f,0.0f,0.0f, + 1.0f, - 0.2005808775714553182645f,0.0f,0.0f, + 1.0f, - 0.9800896173744618744550f, 1.690821697485581420750f,0.0f, + 0.0f,- 0.0829753946826485844213f, 0.1706850739778944525682f,0.0f, + 0.0f,- 1.5024216979529190219012f, - 0.2246231721723708774086f,0.0f, + 1.0f, - 0.1137930279260921523354f, - 0.9252347371003220022345f,0.0f, + 1.0f, 0.9890664402902992202726f, 0.5787159455904740124055f,1.2930051366411721147642f, + 0.0f,- 0.8505434486601569643582f,0.6053315910573954239382f, - 0.5028225952598519565839f, + 0.0f,2.1236994816779066752588f, - 2.0487578989503822946006f, - 3.9701563399198689374714f, + 1.0f, - 1.4716550983021570164766f, - 0.2144135496153387610008f, 1.4891952441184541644503f}; + + float result_sig[12]={0.9932627780362963676453f, 0.8074779896996915340424f,0.3628661470549920387008f,0.4106795421050958294629f, + - 0.6299693698364057237171f,- 0.0327761932052800242232f,0.1176836211234331130981f,0.8010095250792801380158f, + - 0.1942402590062223821654f, 0.5878460460823274891240f, 0.3391635613203383137204f,0.1291488276492920306282f}; + + float result_lb[48]={- 0.3981923483861428136876f,1.0f,0.0f,0.0f, + - 0.3550295998674473652024f,0.0f,0.0f,0.0f, + - 0.5696378489005990974903f,0.0f,0.0f,0.0f, + - 0.1988863157065166586968f,1.0f,0.0f,0.0f, + 1.62419596196504145702f, - 0.9819754657045941526050f,1.0f,0.0f, + 0.0329804805798983302623f, - 0.0396945499933941681192f,0.0f,0.0f, + - 0.1283118770193089619447f, - 1.492334154918740996010f,0.0f,0.0f, + - 0.9551334433810730883963f, - 0.0265634378315470209841f,1.0f,0.0f, + 1.1913835764722526810999f,0.0301096362936850159286f, 1.909619275538441574014f,1.0f, + 0.4767865147665533709365f ,- 0.2016469880890300325760f,0.2878592385656049135179f,0.0f, + 5.1391578635011887499218f, - 2.5030727471739586675881f, - 6.5148738878935787965929f,0.0f, + - 2.8040366068494293472213f ,- 1.3523880325486907771904f, 2.4607313355305917568217f,1.0f}; + + float la[48],lb[48],sig[12]; + + slevina(3,in,10,2,la,sig,lb); + + /* FIXME : assert à 10^-5 */ + /* FIXME : sig est rangé différemment qu'à l'habitude */ + + for (i=0;i<48;i++){ + if (la[i]!=0) + assert( (fabs(la[i]-result_la[i]) / fabs(la[i]) ) <3e-6); + else + assert( fabs(la[i]-result_la[i]) == 0); + } + + for (i=0;i<12;i++){ + if (sig[i]!=0) + assert( (fabs(sig[i]-result_sig[i]) / fabs(sig[i]) ) <3e-6); + else + assert( fabs(sig[i]-result_sig[i]) == 0); + } + + + for (i=0;i<48;i++){ + if (lb[i]!=0) + assert( (fabs(lb[i]-result_lb[i]) / fabs(lb[i]) ) <3e-5); + else + assert( fabs(lb[i]-result_lb[i]) == 0); + } + +} + + + +static int levinTest(void) { + printf("\n>>>> Levin Tests\n"); + dlevinaTest(); + return 0; +} + +int main(void) { + assert( levinTest()== 0); + return 0; +} diff --git a/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj b/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj new file mode 100644 index 00000000..4c0136fd --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CAA51066-E3AC-4FE7-A330-D946A7AD6026} + testDoubleLevin + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj.filters b/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj.filters new file mode 100644 index 00000000..41c38c97 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/test_DoubleLevin/testDoubleLevin.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj b/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj new file mode 100644 index 00000000..ca18bbcd --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FCD4F6F6-B226-4CC8-A9BD-432C36DEF855} + testFloatLevin + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj.filters b/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj.filters new file mode 100644 index 00000000..15bf5e2a --- /dev/null +++ b/2.3-1/src/c/signalProcessing/levin/test_FloatLevin/testFloatLevin.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.am b/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.am new file mode 100644 index 00000000..c5c8dd1e --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.am @@ -0,0 +1,89 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008 - INRIA - Arnaud TORSET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + + + + +libLpc2cep_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + + +instdir = $(top_builddir)/lib + + +pkglib_LTLIBRARIES = libLpc2cep.la + +HEAD = ../includes/lpc2cep.h + + +libLpc2cep_la_SOURCES = $(HEAD) \ + slpc2cepa.c \ + dlpc2cepa.c \ + clpc2cepa.c \ + zlpc2cepa.c + + +############### +#### Check #### +############### +check_PROGRAMS = testDoubleLpc2cep testFloatLpc2cep + + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la\ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la\ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/signalProcessing/lpc2cep/libLpc2cep.la \ + @LIBMATH@ + + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + + +testDoubleLpc2cep_SOURCES = testDoubleLpc2cep.c +testDoubleLpc2cep_LDADD = $(check_LDADD) +testDoubleLpc2cep_CFLAGS = $(check_INCLUDES) + +testFloatLpc2cep_SOURCES = testFloatLpc2cep.c +testFloatLpc2cep_LDADD = $(check_LDADD) +testFloatLpc2cep_CFLAGS = $(check_INCLUDES) + + +TESTS = testDoubleLpc2cep testFloatLpc2cep diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.in b/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.in new file mode 100644 index 00000000..da5771eb --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/Makefile.in @@ -0,0 +1,796 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleLpc2cep$(EXEEXT) testFloatLpc2cep$(EXEEXT) +TESTS = testDoubleLpc2cep$(EXEEXT) testFloatLpc2cep$(EXEEXT) +subdir = src/c/signalProcessing/lpc2cep +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libLpc2cep_la_LIBADD = +am__objects_1 = +am_libLpc2cep_la_OBJECTS = $(am__objects_1) libLpc2cep_la-slpc2cepa.lo \ + libLpc2cep_la-dlpc2cepa.lo libLpc2cep_la-clpc2cepa.lo \ + libLpc2cep_la-zlpc2cepa.lo +libLpc2cep_la_OBJECTS = $(am_libLpc2cep_la_OBJECTS) +libLpc2cep_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libLpc2cep_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleLpc2cep_OBJECTS = \ + testDoubleLpc2cep-testDoubleLpc2cep.$(OBJEXT) +testDoubleLpc2cep_OBJECTS = $(am_testDoubleLpc2cep_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la \ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la \ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la \ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/signalProcessing/lpc2cep/libLpc2cep.la +testDoubleLpc2cep_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleLpc2cep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleLpc2cep_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am_testFloatLpc2cep_OBJECTS = \ + testFloatLpc2cep-testFloatLpc2cep.$(OBJEXT) +testFloatLpc2cep_OBJECTS = $(am_testFloatLpc2cep_OBJECTS) +testFloatLpc2cep_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatLpc2cep_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatLpc2cep_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libLpc2cep_la_SOURCES) $(testDoubleLpc2cep_SOURCES) \ + $(testFloatLpc2cep_SOURCES) +DIST_SOURCES = $(libLpc2cep_la_SOURCES) $(testDoubleLpc2cep_SOURCES) \ + $(testFloatLpc2cep_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libLpc2cep_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libLpc2cep.la +HEAD = ../includes/lpc2cep.h +libLpc2cep_la_SOURCES = $(HEAD) \ + slpc2cepa.c \ + dlpc2cepa.c \ + clpc2cepa.c \ + zlpc2cepa.c + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/sign/libSign.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/multiplication/libMatrixMultiplication.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/matrixOperations/inversion/libMatrixInversion.la \ + $(top_builddir)/src/c/matrixOperations/logm/libLogm.la\ + $(top_builddir)/src/c/matrixOperations/spec2/libSpec2.la\ + $(top_builddir)/src/c/matrixOperations/zeros/libMatrixZeros.la\ + $(top_builddir)/src/c/signalProcessing/fft/libFft.la \ + $(top_builddir)/src/c/signalProcessing/ifft/libIfft.la \ + $(top_builddir)/src/c/signalProcessing/lpc2cep/libLpc2cep.la \ + @LIBMATH@ + +check_INCLUDES = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/signalProcessing/includes + +testDoubleLpc2cep_SOURCES = testDoubleLpc2cep.c +testDoubleLpc2cep_LDADD = $(check_LDADD) +testDoubleLpc2cep_CFLAGS = $(check_INCLUDES) +testFloatLpc2cep_SOURCES = testFloatLpc2cep.c +testFloatLpc2cep_LDADD = $(check_LDADD) +testFloatLpc2cep_CFLAGS = $(check_INCLUDES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/signalProcessing/lpc2cep/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/signalProcessing/lpc2cep/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libLpc2cep.la: $(libLpc2cep_la_OBJECTS) $(libLpc2cep_la_DEPENDENCIES) + $(libLpc2cep_la_LINK) -rpath $(pkglibdir) $(libLpc2cep_la_OBJECTS) $(libLpc2cep_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleLpc2cep$(EXEEXT): $(testDoubleLpc2cep_OBJECTS) $(testDoubleLpc2cep_DEPENDENCIES) + @rm -f testDoubleLpc2cep$(EXEEXT) + $(testDoubleLpc2cep_LINK) $(testDoubleLpc2cep_OBJECTS) $(testDoubleLpc2cep_LDADD) $(LIBS) +testFloatLpc2cep$(EXEEXT): $(testFloatLpc2cep_OBJECTS) $(testFloatLpc2cep_DEPENDENCIES) + @rm -f testFloatLpc2cep$(EXEEXT) + $(testFloatLpc2cep_LINK) $(testFloatLpc2cep_OBJECTS) $(testFloatLpc2cep_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLpc2cep_la-clpc2cepa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLpc2cep_la-dlpc2cepa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLpc2cep_la-slpc2cepa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libLpc2cep_la-zlpc2cepa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libLpc2cep_la-slpc2cepa.lo: slpc2cepa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -MT libLpc2cep_la-slpc2cepa.lo -MD -MP -MF $(DEPDIR)/libLpc2cep_la-slpc2cepa.Tpo -c -o libLpc2cep_la-slpc2cepa.lo `test -f 'slpc2cepa.c' || echo '$(srcdir)/'`slpc2cepa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLpc2cep_la-slpc2cepa.Tpo $(DEPDIR)/libLpc2cep_la-slpc2cepa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='slpc2cepa.c' object='libLpc2cep_la-slpc2cepa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -c -o libLpc2cep_la-slpc2cepa.lo `test -f 'slpc2cepa.c' || echo '$(srcdir)/'`slpc2cepa.c + +libLpc2cep_la-dlpc2cepa.lo: dlpc2cepa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -MT libLpc2cep_la-dlpc2cepa.lo -MD -MP -MF $(DEPDIR)/libLpc2cep_la-dlpc2cepa.Tpo -c -o libLpc2cep_la-dlpc2cepa.lo `test -f 'dlpc2cepa.c' || echo '$(srcdir)/'`dlpc2cepa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLpc2cep_la-dlpc2cepa.Tpo $(DEPDIR)/libLpc2cep_la-dlpc2cepa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dlpc2cepa.c' object='libLpc2cep_la-dlpc2cepa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -c -o libLpc2cep_la-dlpc2cepa.lo `test -f 'dlpc2cepa.c' || echo '$(srcdir)/'`dlpc2cepa.c + +libLpc2cep_la-clpc2cepa.lo: clpc2cepa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -MT libLpc2cep_la-clpc2cepa.lo -MD -MP -MF $(DEPDIR)/libLpc2cep_la-clpc2cepa.Tpo -c -o libLpc2cep_la-clpc2cepa.lo `test -f 'clpc2cepa.c' || echo '$(srcdir)/'`clpc2cepa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLpc2cep_la-clpc2cepa.Tpo $(DEPDIR)/libLpc2cep_la-clpc2cepa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='clpc2cepa.c' object='libLpc2cep_la-clpc2cepa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -c -o libLpc2cep_la-clpc2cepa.lo `test -f 'clpc2cepa.c' || echo '$(srcdir)/'`clpc2cepa.c + +libLpc2cep_la-zlpc2cepa.lo: zlpc2cepa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -MT libLpc2cep_la-zlpc2cepa.lo -MD -MP -MF $(DEPDIR)/libLpc2cep_la-zlpc2cepa.Tpo -c -o libLpc2cep_la-zlpc2cepa.lo `test -f 'zlpc2cepa.c' || echo '$(srcdir)/'`zlpc2cepa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libLpc2cep_la-zlpc2cepa.Tpo $(DEPDIR)/libLpc2cep_la-zlpc2cepa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zlpc2cepa.c' object='libLpc2cep_la-zlpc2cepa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libLpc2cep_la_CFLAGS) $(CFLAGS) -c -o libLpc2cep_la-zlpc2cepa.lo `test -f 'zlpc2cepa.c' || echo '$(srcdir)/'`zlpc2cepa.c + +testDoubleLpc2cep-testDoubleLpc2cep.o: testDoubleLpc2cep.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLpc2cep_CFLAGS) $(CFLAGS) -MT testDoubleLpc2cep-testDoubleLpc2cep.o -MD -MP -MF $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Tpo -c -o testDoubleLpc2cep-testDoubleLpc2cep.o `test -f 'testDoubleLpc2cep.c' || echo '$(srcdir)/'`testDoubleLpc2cep.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Tpo $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLpc2cep.c' object='testDoubleLpc2cep-testDoubleLpc2cep.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLpc2cep_CFLAGS) $(CFLAGS) -c -o testDoubleLpc2cep-testDoubleLpc2cep.o `test -f 'testDoubleLpc2cep.c' || echo '$(srcdir)/'`testDoubleLpc2cep.c + +testDoubleLpc2cep-testDoubleLpc2cep.obj: testDoubleLpc2cep.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLpc2cep_CFLAGS) $(CFLAGS) -MT testDoubleLpc2cep-testDoubleLpc2cep.obj -MD -MP -MF $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Tpo -c -o testDoubleLpc2cep-testDoubleLpc2cep.obj `if test -f 'testDoubleLpc2cep.c'; then $(CYGPATH_W) 'testDoubleLpc2cep.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLpc2cep.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Tpo $(DEPDIR)/testDoubleLpc2cep-testDoubleLpc2cep.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleLpc2cep.c' object='testDoubleLpc2cep-testDoubleLpc2cep.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleLpc2cep_CFLAGS) $(CFLAGS) -c -o testDoubleLpc2cep-testDoubleLpc2cep.obj `if test -f 'testDoubleLpc2cep.c'; then $(CYGPATH_W) 'testDoubleLpc2cep.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleLpc2cep.c'; fi` + +testFloatLpc2cep-testFloatLpc2cep.o: testFloatLpc2cep.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLpc2cep_CFLAGS) $(CFLAGS) -MT testFloatLpc2cep-testFloatLpc2cep.o -MD -MP -MF $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Tpo -c -o testFloatLpc2cep-testFloatLpc2cep.o `test -f 'testFloatLpc2cep.c' || echo '$(srcdir)/'`testFloatLpc2cep.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Tpo $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLpc2cep.c' object='testFloatLpc2cep-testFloatLpc2cep.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLpc2cep_CFLAGS) $(CFLAGS) -c -o testFloatLpc2cep-testFloatLpc2cep.o `test -f 'testFloatLpc2cep.c' || echo '$(srcdir)/'`testFloatLpc2cep.c + +testFloatLpc2cep-testFloatLpc2cep.obj: testFloatLpc2cep.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLpc2cep_CFLAGS) $(CFLAGS) -MT testFloatLpc2cep-testFloatLpc2cep.obj -MD -MP -MF $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Tpo -c -o testFloatLpc2cep-testFloatLpc2cep.obj `if test -f 'testFloatLpc2cep.c'; then $(CYGPATH_W) 'testFloatLpc2cep.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLpc2cep.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Tpo $(DEPDIR)/testFloatLpc2cep-testFloatLpc2cep.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatLpc2cep.c' object='testFloatLpc2cep-testFloatLpc2cep.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatLpc2cep_CFLAGS) $(CFLAGS) -c -o testFloatLpc2cep-testFloatLpc2cep.obj `if test -f 'testFloatLpc2cep.c'; then $(CYGPATH_W) 'testFloatLpc2cep.c'; else $(CYGPATH_W) '$(srcdir)/testFloatLpc2cep.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/clpc2cepa.c b/2.3-1/src/c/signalProcessing/lpc2cep/clpc2cepa.c new file mode 100644 index 00000000..34b04c0c --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/clpc2cepa.c @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "lpc2cep.h" +#include "fft.h" +#include "ifft.h" +#include "logm.h" + +void clpc2cepa(floatComplex *in, int size, floatComplex*out){ + int i; + + for (i=0;i +#include "lpc2cep.h" +#include "fft.h" +#include "logm.h" +#include "ifft.h" + +void dlpc2cepa(double* in, int size, double* out){ + int i; + doubleComplex *inCpx; + + inCpx = (doubleComplex *) malloc ((unsigned int)(size*size)*sizeof(doubleComplex)); + + for (i=0;i +#include "lpc2cep.h" +#include "fft.h" +#include "ifft.h" +#include "logm.h" + +void slpc2cepa(float *in, int size, float*out){ + int i; + floatComplex* inCpx; + + /* Copy in in a FloatComplex*/ + inCpx=(floatComplex*)malloc((unsigned int)(size*size)*sizeof(floatComplex)); + for (i=0;i +#include +#include +#include "lpc2cep.h" + +static void dlpc2cepaTest(void){ + +} + +static void zlpc2cepaTest(void){ + +} + +static int lpc2cepTest(void){ + dlpc2cepaTest(); + zlpc2cepaTest(); + return 0; +} + + +int main(void){ + assert(lpc2cepTest()==0); + return 0; +} + + diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/testFloatLpc2cep.c b/2.3-1/src/c/signalProcessing/lpc2cep/testFloatLpc2cep.c new file mode 100644 index 00000000..72d07268 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/testFloatLpc2cep.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include +#include +#include +#include "lpc2cep.h" + +static void slpc2cepaTest(void){ + +} + +static void clpc2cepaTest(void){ + +} + +static int lpc2cepTest(void){ + slpc2cepaTest(); + clpc2cepaTest(); + return 0; +} + + +int main(void){ + assert(lpc2cepTest()==0); + return 0; +} + + + diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj b/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj new file mode 100644 index 00000000..a0e86cdd --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {EDF4F58C-2776-49A0-9F2D-CAE9A8979CE1} + testDoubleLpc2cep + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj.filters b/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj.filters new file mode 100644 index 00000000..24f567ed --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/test_DoubleLpc2cep/testDoubleLpc2cep.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj b/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj new file mode 100644 index 00000000..e02f20f2 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F37FAC6D-8C48-4F25-8E8D-AB0BF1A8641F} + testFloatLpc2cep + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../type;../../includes;../../../operations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {f7e8df1b-cc81-4b2a-b5f0-1a247be59cc4} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj.filters b/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj.filters new file mode 100644 index 00000000..a3e40f98 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/test_FloatLpc2cep/testFloatLpc2cep.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/lpc2cep/zlpc2cepa.c b/2.3-1/src/c/signalProcessing/lpc2cep/zlpc2cepa.c new file mode 100644 index 00000000..8c5640d8 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/lpc2cep/zlpc2cepa.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "lpc2cep.h" +#include "fft.h" +#include "ifft.h" +#include "logm.h" + +void zlpc2cepa(doubleComplex* in, int size, doubleComplex* out){ + int i; + + for (i=0;i + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F7E8DF1B-CC81-4B2A-B5F0-1A247BE59CC4} + signalProcessing + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../type;../operations/includes;../matrixOperations/includes;../auxiliaryFunctions/includes;../../../includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNALPROCESSING_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../type;../operations/includes;../matrixOperations/includes;../auxiliaryFunctions/includes;../../../includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNALPROCESSING_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../type;../operations/includes;../matrixOperations/includes;../auxiliaryFunctions/includes;../../../includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNALPROCESSING_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../type;../operations/includes;../matrixOperations/includes;../auxiliaryFunctions/includes;../../../includes;../elementaryFunctions/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNALPROCESSING_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + + + {72b46833-b150-432d-b231-3e0ecd91e190} + + + {fd335544-52bf-4736-a34e-77f591d158d5} + + + {9b622a66-546a-4b33-b947-0a189d259d37} + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/signalProcessing/signalProcessing.vcxproj.filters b/2.3-1/src/c/signalProcessing/signalProcessing.vcxproj.filters new file mode 100644 index 00000000..6ed93df8 --- /dev/null +++ b/2.3-1/src/c/signalProcessing/signalProcessing.vcxproj.filters @@ -0,0 +1,320 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {ebc6c365-0c2d-4024-b959-0b6fa64246cb} + + + {00836675-12ac-47b7-9ac6-0196bb33333c} + + + {4f72c2fb-c271-459e-8502-da2f7c962c68} + + + {1338e5a6-e007-4d3b-828b-b25eff140442} + + + {48ddaeb8-14d4-4c8e-868d-7e52f145304a} + + + {97133a42-f4a2-47de-a3bf-e764b23ec51d} + + + {116e0cb5-bcb1-4a9d-bd89-7b5098f5b149} + + + {1756fe63-6e90-4f05-88fa-f6fbb81d2ef1} + + + {3c3ce86a-8e15-4f1b-bc56-80a84d2d5c44} + + + {4c335f24-03ef-4a1f-b409-c18af44c5a53} + + + {f54c4b75-354f-422d-ab7c-57697189b855} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\conv + + + Source Files\conv + + + Source Files\conv + + + Source Files\conv + + + Source Files\conv2d + + + Source Files\conv2d + + + Source Files\conv2d + + + Source Files\conv2d + + + Source Files\crossCorr + + + Source Files\crossCorr + + + Source Files\crossCorr + + + Source Files\crossCorr + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fft + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\fftshift + + + Source Files\hilbert + + + Source Files\hilbert + + + Source Files\hilbert + + + Source Files\hilbert + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\ifft + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lev + + + Source Files\lpc2cep + + + Source Files\lpc2cep + + + Source Files\lpc2cep + + + Source Files\lpc2cep + + + Source Files\levin + + + Source Files\levin + + + Source Files\levin + + + + + Source Files\conv + + + Source Files\conv2d + + + Source Files\crossCorr + + + Source Files\fft + + + Source Files\fftshift + + + Source Files\hilbert + + + Source Files\ifft + + + Source Files\lev + + + Source Files\lpc2cep + + + Source Files\levin + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/Makefile.am b/2.3-1/src/c/statisticsFunctions/Makefile.am new file mode 100644 index 00000000..e87f3868 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/Makefile.am @@ -0,0 +1,21 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS= mean \ + sum\ + variance\ + prod\ + min\ + max\ + meanf\ + variancef\ + stdevf diff --git a/2.3-1/src/c/statisticsFunctions/Makefile.in b/2.3-1/src/c/statisticsFunctions/Makefile.in new file mode 100644 index 00000000..6df9918c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/Makefile.in @@ -0,0 +1,569 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/statisticsFunctions +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = mean \ + sum\ + variance\ + prod\ + min\ + max\ + meanf\ + variancef\ + stdevf + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/includes/dynlib_statisticsfunctions.h b/2.3-1/src/c/statisticsFunctions/includes/dynlib_statisticsfunctions.h new file mode 100644 index 00000000..b6dab50f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/dynlib_statisticsfunctions.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_STATISTICSFUNCTIONS_H__ +#define __DYNLIB_STATISTICSFUNCTIONS_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if STATISTICSFUNCTIONS_EXPORTS + #define EXTERN_STATFUNC __declspec (dllexport) + #else + #define EXTERN_STATFUNC __declspec (dllimport) + #endif +#else + #define EXTERN_STATFUNC +#endif + +#endif /* __DYNLIB_STATISTICSFUNCTIONS_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/mean.h b/2.3-1/src/c/statisticsFunctions/includes/mean.h new file mode 100644 index 00000000..d87c4ca5 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/mean.h @@ -0,0 +1,99 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MEAN_H__ +#define __MEAN_H__ + +#include "dynlib_statisticsfunctions.h" +#include "division.h" +#include "addition.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Mean of a scalar element, just returns it +*/ +#define smeans(in) in +#define srowmeans(in) in +#define scolumnmeans(in) in +#define smatlabmeans(in) in + +/* +** \brief Mean of a scalar element, just returns it +*/ +#define dmeans(in) in +#define drowmeans(in) in +#define dcolumnmeans(in) in +#define dmatlabmeans(in) in + +/* +** \brief Mean of a scalar element, just returns it +*/ +#define cmeans(in) in +#define crowmeans(in) in +#define ccolumnmeans(in) in +#define cmatlabmeans(in) in + +/* +** \brief Mean of a scalar element, just returns it +*/ +#define zmeans(in) in +#define zrowmeans(in) in +#define zcolumnmeans(in) in +#define zmatlabmeans(in) in + +/* +** \brief Mean of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the mean. +*/ +EXTERN_STATFUNC float smeana(float *in, int size); +EXTERN_STATFUNC void srowmeana(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnmeana(float *in, int lines, int columns, float* out); + +/* +** \brief Mean of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the mean. +*/ +EXTERN_STATFUNC double dmeana(double *in, int size); +EXTERN_STATFUNC void drowmeana(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnmeana(double *in, int lines, int columns, double* out); + +/* +** \brief Mean of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the mean. +*/ +EXTERN_STATFUNC floatComplex cmeana(floatComplex *in, int size); +EXTERN_STATFUNC void crowmeana(floatComplex *in, int lines, int columns, floatComplex* out); +EXTERN_STATFUNC void ccolumnmeana(floatComplex *in, int lines, int columns, floatComplex* out); + +/* +** \brief Mean of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the mean. +*/ +EXTERN_STATFUNC doubleComplex zmeana(doubleComplex *in, int size); +EXTERN_STATFUNC void zrowmeana(doubleComplex *in, int lines, int columns, doubleComplex* out); +EXTERN_STATFUNC void zcolumnmeana(doubleComplex *in, int lines, int columns, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MEAN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/meanf.h b/2.3-1/src/c/statisticsFunctions/includes/meanf.h new file mode 100644 index 00000000..c0d687c6 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/meanf.h @@ -0,0 +1,106 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2009 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __MEANF_H__ +#define __MEANF_H__ + +#include "dynlib_statisticsfunctions.h" +#include "division.h" +#include "addition.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Meanf of a scalar element, just returns it +*/ +#define smeanfs(in1,in2) in1 +#define srowmeanfs(in1,in2) in1 +#define scolumnmeanfs(in1,in2) in1 +#define smatlabmeanfs(in1,in2) in1 + +/* +** \brief Meanf of a scalar element, just returns it +*/ +#define dmeanfs(in1,in2) in1 +#define drowmeanfs(in1,in2) in1 +#define dcolumnmeanfs(in1,in2) in1 +#define dmatlabmeanfs(in1,in2) in1 + +/* +** \brief Meanf of a scalar element, just returns it +*/ +#define cmeanfs(in1,in2) in1 +#define crowmeanfs(in1,in2) in1 +#define ccolumnmeanfs(in1,in2) in1 +#define cmatlabmeanfs(in1,in2) in1 + +/* +** \brief Meanf of a scalar element, just returns it +*/ +#define zmeanfs(in1,in2) in1 +#define zrowmeanfs(in1,in2) in1 +#define zcolumnmeanfs(in1,in2) in1 +#define zmatlabmeanfs(in1,in2) in1 + +/* +** \brief Meanf of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the meanf. +*/ +EXTERN_STATFUNC float smeanfa(float *in1, int size, float *in2); +EXTERN_STATFUNC void srowmeanfa(float *in1, int lines, int columns, float *in2, float* out); +EXTERN_STATFUNC void scolumnmeanfa(float *in1, int lines, int columns, float *in2, float* out); + +/* +** \brief Meanf of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the meanf. +*/ +EXTERN_STATFUNC double dmeanfa(double *in1, int size, double *in2); +EXTERN_STATFUNC void drowmeanfa(double *in1, int lines, int columns, double *in2, double* out); +EXTERN_STATFUNC void dcolumnmeanfa(double *in1, int lines, int columns, double *in2, double* out); + +/* +** \brief Meanf of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the meanf. +*/ +EXTERN_STATFUNC floatComplex cmeanfa(floatComplex *in1, int size, floatComplex *in2); +EXTERN_STATFUNC void crowmeanfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); +EXTERN_STATFUNC void ccolumnmeanfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); + +/* +** \brief Meanf of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the meanf. +*/ +EXTERN_STATFUNC doubleComplex zmeanfa(doubleComplex *in1, int size, doubleComplex *in2); +EXTERN_STATFUNC void zrowmeanfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); +EXTERN_STATFUNC void zcolumnmeanfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); + +/* for convenience with interface */ +doubleComplex zmeanfzd (doubleComplex* in1 ,int lines , int columns , double* in2); +doubleComplex zmeanfdz (double* in1 ,int lines , int columns , doubleComplex* in2); + +floatComplex cmeanfcs (floatComplex* in1 ,int lines , int columns , float* in2); +floatComplex cmeanfsc (float* in1 ,int lines , int columns , floatComplex* in2); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__MEAN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/prod.h b/2.3-1/src/c/statisticsFunctions/includes/prod.h new file mode 100644 index 00000000..a5fde84c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/prod.h @@ -0,0 +1,100 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __PROD_H__ +#define __PROD_H__ + +#include "dynlib_statisticsfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief Sum of a scalar element, just returns it +*/ +#define sprods(in) in +#define srowprods(in) in +#define scolumnprods(in) in +#define smatlabprods(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define dprods(in) in +#define drowprods(in) in +#define dcolumnprods(in) in +#define dmatlabprods(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define cprods(in) in +#define crowprods(in) in +#define ccolumnprods(in) in +#define cmatlabprods(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define zprods(in) in +#define zrowprods(in) in +#define zcolumnprods(in) in +#define zmatlabprods(in) in + +/* +** \brief Sum of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the prod. +*/ +EXTERN_STATFUNC float sproda(float *in, int size); +EXTERN_STATFUNC void srowproda(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnproda(float *in, int lines, int columns, float* out); + +/* +** \brief Sum of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the prod. +*/ +EXTERN_STATFUNC double dproda(double *in, int size); +EXTERN_STATFUNC void drowproda(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnproda(double *in, int lines, int columns, double* out); + +/* +** \brief Sum of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the prod. +*/ +EXTERN_STATFUNC floatComplex cproda(floatComplex *in, int size); +EXTERN_STATFUNC void crowproda(floatComplex *in, int lines, int columns, floatComplex* out); +EXTERN_STATFUNC void ccolumnproda(floatComplex *in, int lines, int columns, floatComplex* out); + +/* +** \brief Sum of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the prod. +*/ +EXTERN_STATFUNC doubleComplex zproda(doubleComplex *in, int size); +EXTERN_STATFUNC void zrowproda(doubleComplex *in, int lines, int columns, doubleComplex* out); +EXTERN_STATFUNC void zcolumnproda(doubleComplex *in, int lines, int columns, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__PROD_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/statMax.h b/2.3-1/src/c/statisticsFunctions/includes/statMax.h new file mode 100644 index 00000000..3538bc1a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/statMax.h @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __STAT_MAX_H__ +#define __STAT_MAX_H__ + +#include "dynlib_statisticsfunctions.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define smaxs(in) in +#define srowmaxs(in) in +#define scolumnmaxs(in) in +#define smatlabmaxs(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define dmaxs(in) in +#define drowmaxs(in) in +#define dcolumnmaxs(in) in +#define dmatlabmaxs(in) in + +/* +** \brief Sum of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC float smaxa(float *in, int size); +EXTERN_STATFUNC void srowmaxa(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnmaxa(float *in, int lines, int columns, float* out); + +/* +** \brief Sum of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the max. +*/ +EXTERN_STATFUNC double dmaxa(double *in, int size); +EXTERN_STATFUNC void drowmaxa(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnmaxa(double *in, int lines, int columns, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__STAT_MAX_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/statMin.h b/2.3-1/src/c/statisticsFunctions/includes/statMin.h new file mode 100644 index 00000000..9528d9f4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/statMin.h @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __STAT_MIN_H__ +#define __STAT_MIN_H__ + +#include "dynlib_statisticsfunctions.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define smins(in) in +#define srowmins(in) in +#define scolumnmins(in) in +#define smatlabmins(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define dmins(in) in +#define drowmins(in) in +#define dcolumnmins(in) in +#define dmatlabmins(in) in + +/* +** \brief Sum of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC float smina(float *in, int size); +EXTERN_STATFUNC void srowmina(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnmina(float *in, int lines, int columns, float* out); + +/* +** \brief Sum of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the min. +*/ +EXTERN_STATFUNC double dmina(double *in, int size); +EXTERN_STATFUNC void drowmina(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnmina(double *in, int lines, int columns, double* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__STAT_MIN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/stdevf.h b/2.3-1/src/c/statisticsFunctions/includes/stdevf.h new file mode 100644 index 00000000..c9e48599 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/stdevf.h @@ -0,0 +1,129 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __STDEVF_H__ +#define __STDEVF_H__ + +#include +#include +#include + + +#include "dynlib_statisticsfunctions.h" +#include "subtraction.h" +#include "division.h" + + +#include "pow.h" +#include "sum.h" +#include "size.h" +#include "sqrt.h" +#include "meanf.h" + + + +#ifdef __cplusplus +extern "C" { +#endif + + + + + +/* +** \brief Standard deviation of a scalar element, just returns it +*/ +#define sstdevfs(in1,in2) 0.0f +#define srowstdevfs(in1,in2) 0.0f +#define scolumnstdevfs(in1,in2) 0.0f + + +/* +** \brief Standard deviation of a scalar element, just returns it +*/ +#define dstdevfs(in1,in2) 0.0 +#define drowstdevfs(in1,in2) 0.0 +#define dcolumnstdevfs(in1,in2) 0.0 + + +/* +** \brief Standard deviation of a scalar element, just returns it +*/ +#define cstdevfs(in1,in2) FloatComplex(0.0f , 0.0f) +#define crowstdevfs(in1,in2) FloatComplex(0.0f , 0.0f) +#define ccolumnstdevfs(in1,in2) FloatComplex(0.0f , 0.0f) + + +/* +** \brief Standard deviation of a scalar element, just returns it +*/ +#define zstdevfs(in1,in2) DoubleComplex(0.0 , 0.0) +#define zrowstdevfs(in1,in2) DoubleComplex(0.0 , 0.0) +#define zcolumnstdevfs(in1,in2) DoubleComplex(0.0 , 0.0) + + +/* +** \brief Standard deviation of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the stdevf. +*/ +EXTERN_STATFUNC float sstdevfa(float *in1, int lines, int columns, float *in2); +EXTERN_STATFUNC void srowstdevfa(float *in1, int lines, int columns, float *in2, float* out); +EXTERN_STATFUNC void scolumnstdevfa(float *in1, int lines, int columns, float *in2, float* out); + +/* +** \brief Standard deviation of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the stdevf. +*/ +EXTERN_STATFUNC double dstdevfa(double *in1, int lines, int columns, double *in2); +EXTERN_STATFUNC void drowstdevfa(double *in1, int lines, int columns, double *in2, double* out); +EXTERN_STATFUNC void dcolumnstdevfa(double *in1, int lines, int columns, double *in2, double* out); + +/* +** \brief Standard deviation of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the stdevf. +*/ +EXTERN_STATFUNC floatComplex cstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2); +EXTERN_STATFUNC void crowstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); +EXTERN_STATFUNC void ccolumnstdevfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); + +/* +** \brief Standard deviation of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the stdevf. +*/ +EXTERN_STATFUNC doubleComplex zstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2); +EXTERN_STATFUNC void zrowstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); +EXTERN_STATFUNC void zcolumnstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); + +/* +** convenience functions +*/ + +EXTERN_STATFUNC floatComplex cstdevfcs(floatComplex *in1, int lines, int columns, float *in2); +EXTERN_STATFUNC floatComplex cstdevfsc(float *in1, int lines, int columns, floatComplex *in2); + +EXTERN_STATFUNC doubleComplex zstdevfzd(doubleComplex *in1, int lines, int columns, double *in2); +EXTERN_STATFUNC doubleComplex zstdevfdz(double *in1, int lines, int columns, doubleComplex *in2); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__STDEVF_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/sum.h b/2.3-1/src/c/statisticsFunctions/includes/sum.h new file mode 100644 index 00000000..2910792e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/sum.h @@ -0,0 +1,102 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __SUM_H__ +#define __SUM_H__ + +#include "dynlib_statisticsfunctions.h" +#include "floatComplex.h" +#include "doubleComplex.h" +#include "addition.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define ssums(in) in +#define srowsums(in) in +#define scolumnsums(in) in +#define smatlabsums(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define dsums(in) in +#define drowsums(in) in +#define dcolumnsums(in) in +#define dmatlabsums(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define csums(in) in +#define crowsums(in) in +#define ccolumnsums(in) in +#define cmatlabsums(in) in + +/* +** \brief Sum of a scalar element, just returns it +*/ +#define zsums(in) in +#define zrowsums(in) in +#define zcolumnsums(in) in +#define zmatlabsums(in) in + +/* +** \brief Sum of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the sum. +*/ +EXTERN_STATFUNC float ssuma(float *in, int size); +EXTERN_STATFUNC void srowsuma(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnsuma(float *in, int lines, int columns, float* out); + +/* +** \brief Sum of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the sum. +*/ +EXTERN_STATFUNC double dsuma(double *in, int size); +EXTERN_STATFUNC void drowsuma(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnsuma(double *in, int lines, int columns, double* out); + +/* +** \brief Sum of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the sum. +*/ +EXTERN_STATFUNC floatComplex csuma(floatComplex *in, int size); +EXTERN_STATFUNC void crowsuma(floatComplex *in, int lines, int columns, floatComplex* out); +EXTERN_STATFUNC void ccolumnsuma(floatComplex *in, int lines, int columns, floatComplex* out); + +/* +** \brief Sum of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the sum. +*/ +EXTERN_STATFUNC doubleComplex zsuma(doubleComplex *in, int size); +EXTERN_STATFUNC void zrowsuma(doubleComplex *in, int lines, int columns, doubleComplex* out); +EXTERN_STATFUNC void zcolumnsuma(doubleComplex *in, int lines, int columns, doubleComplex* out); + + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__SUM_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/variance.h b/2.3-1/src/c/statisticsFunctions/includes/variance.h new file mode 100644 index 00000000..a058bb75 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/variance.h @@ -0,0 +1,117 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __VARIANCE_H__ +#define __VARIANCE_H__ + +#include +#include +#include + + +#include "dynlib_statisticsfunctions.h" +#include "subtraction.h" +#include "division.h" + +#include "pow.h" +#include "sum.h" + +#include "mean.h" +#include "matrixTranspose.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + + + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define svariances(in) in +#define srowvariances(in) in +#define scolumnvariances(in) in + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define dvariances(in) in +#define drowvariances(in) in +#define dcolumnvariances(in) in + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define cvariances(in) in +#define crowvariances(in) in +#define ccolumnvariances(in) in + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define zvariances(in) in +#define zrowvariances(in) in +#define zcolumnvariances(in) in + + +/* +** \brief Variance of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the variance. +*/ +EXTERN_STATFUNC float svariancea(float *in, int size); +EXTERN_STATFUNC void srowvariancea(float *in, int lines, int columns, float* out); +EXTERN_STATFUNC void scolumnvariancea(float *in, int lines, int columns, float* out); + +/* +** \brief Variance of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the variance. +*/ +EXTERN_STATFUNC double dvariancea(double *in, int size); +EXTERN_STATFUNC void drowvariancea(double *in, int lines, int columns, double* out); +EXTERN_STATFUNC void dcolumnvariancea(double *in, int lines, int columns, double* out); + +/* +** \brief Variance of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the variance. +*/ +EXTERN_STATFUNC floatComplex cvariancea(floatComplex *in, int size); +EXTERN_STATFUNC void crowvariancea(floatComplex *in, int lines, int columns, floatComplex* out); +EXTERN_STATFUNC void ccolumnvariancea(floatComplex *in, int lines, int columns, floatComplex* out); + +/* +** \brief Variance of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the variance. +*/ +EXTERN_STATFUNC doubleComplex zvariancea(doubleComplex *in, int size); +EXTERN_STATFUNC void zrowvariancea(doubleComplex *in, int lines, int columns, doubleComplex* out); +EXTERN_STATFUNC void zcolumnvariancea(doubleComplex *in, int lines, int columns, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__VARIANCE_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/includes/variancef.h b/2.3-1/src/c/statisticsFunctions/includes/variancef.h new file mode 100644 index 00000000..e682a187 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/includes/variancef.h @@ -0,0 +1,117 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __VARIANCEF_H__ +#define __VARIANCEF_H__ + +#include +#include +#include + + +#include "dynlib_statisticsfunctions.h" +#include "subtraction.h" +#include "division.h" + + +#include "pow.h" +#include "sum.h" + +#include "meanf.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + + + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define svariancefs(in1,in2) 0.0f +#define srowvariancefs(in1,in2) 0.0f +#define scolumnvariancefs(in1,in2) 0.0f + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define dvariancefs(in1,in2) 0.0 +#define drowvariancefs(in1,in2) 0.0 +#define dcolumnvariancefs(in1,in2) 0.0 + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define cvariancefs(in1,in2) FloatComplex(0.0f , 0.0f) +#define crowvariancefs(in1,in2) FloatComplex(0.0f , 0.0f) +#define ccolumnvariancefs(in1,in2) FloatComplex(0.0f , 0.0f) + + +/* +** \brief Variance of a scalar element, just returns it +*/ +#define zvariancefs(in1,in2) DoubleComplex(0.0 , 0.0) +#define zrowvariancefs(in1,in2) DoubleComplex(0.0 , 0.0) +#define zcolumnvariancefs(in1,in2) DoubleComplex(0.0 , 0.0) + + +/* +** \brief Variance of a float array +** \param in the float array to process +** \param size, the size of the array +** \returns the variancef. +*/ +EXTERN_STATFUNC float svariancefa(float *in1, int size, float *in2); +EXTERN_STATFUNC void srowvariancefa(float *in1, int lines, int columns, float *in2, float* out); +EXTERN_STATFUNC void scolumnvariancefa(float *in1, int lines, int columns, float *in2, float* out); + +/* +** \brief Variance of a double array +** \param in the double array to process +** \param size, the size of the array +** \returns the variancef. +*/ +EXTERN_STATFUNC double dvariancefa(double *in1, int size, double *in2); +EXTERN_STATFUNC void drowvariancefa(double *in1, int lines, int columns, double *in2, double* out); +EXTERN_STATFUNC void dcolumnvariancefa(double *in1, int lines, int columns, double *in2, double* out); + +/* +** \brief Variance of a float complex array +** \param in the float array to process +** \param size, the size of the array +** \returns the variancef. +*/ +EXTERN_STATFUNC floatComplex cvariancefa(floatComplex *in1, int size, floatComplex *in2); +EXTERN_STATFUNC void crowvariancefa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); +EXTERN_STATFUNC void ccolumnvariancefa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex* out); + +/* +** \brief Variance of a double complex array +** \param in the double array to process +** \param size, the size of the array +** \returns the variancef. +*/ +EXTERN_STATFUNC doubleComplex zvariancefa(doubleComplex *in1, int size, doubleComplex *in2); +EXTERN_STATFUNC void zrowvariancefa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); +EXTERN_STATFUNC void zcolumnvariancefa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex* out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__VARIANCEF_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_mean.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_mean.h new file mode 100644 index 00000000..d1d301cd --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_mean.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_MEAN_H__ +#define __INT_MEAN_H__ + +#define s0means0(in) smeans(in) + +#define d0meand0(in) dmeans(in) + +#define c0meanc0(in) cmeans(in) + +#define z0meanz0(in) zmeans(in) + +#define s2means0(in,size) smeana(in, size[0]*size[1]) + +#define d2meand0(in,size) dmeana(in, size[0]*size[1]) + +#define c2meanc0(in,size) cmeana(in, size[0]*size[1]) + +#define z2meanz0(in,size) zmeana(in, size[0]*size[1]) + + +#define s0s0means0(in1,in2) (in2==1) ? srowmeans(in1) : scolumnmeans(in1) + +#define d0d0meand0(in1,in2) (in2==1) ? drowmeans(in1) : dcolumnmeans(in1) + +#define c0s0meanc0(in1,in2) (in2==1) ? crowmeans(in1) : ccolumnmeans(in1) + +#define z0d0meanz0(in1,in2) (in2==1) ? zrowmeans(in1) : zcolumnmeans(in1) + +#define s2s0means2(in1,size,in2,out) (in2==1) ? srowmeana(in1,size[0],size[1],out) : scolumnmeana(in1,size[0],size[1],out) + +#define d2d0meand2(in1,size,in2,out) (in2==1) ? drowmeana(in1,size[0],size[1],out) : dcolumnmeana(in1,size[0],size[1],out) + +#define c2s0meanc2(in1,size,in2,out) (in2==1) ? crowmeana(in1,size[0],size[1],out) : ccolumnmeana(in1,size[0],size[1],out) + +#define z2d0meanz2(in1,size,in2,out) (in2==1) ? zrowmeana(in1,size[0],size[1],out) : zcolumnmeana(in1,size[0],size[1],out) + + /*'r' and 'c' case */ +#define s0g2means0(in1,in2,size2) (in2[0]=='r') ? srowmeans(in1) : scolumnmeans(in1) + +#define d0g2meand0(in1,in2,size2) (in2[0]=='r') ? drowmeans(in1) : dcolumnmeans(in1) + +#define c0g2meanc0(in1,in2,size2) (in2[0]=='r') ? crowmeans(in1) : ccolumnmeans(in1) + +#define z0g2meanz0(in1,in2,size2) (in2[0]=='r') ? zrowmeans(in1) : zcolumnmeans(in1) + +#define s2g2means2(in1,size,in2,size2,out) (in2[0]=='r') ? srowmeana(in1,size[0],size[1],out) : scolumnmeana(in1,size[0],size[1],out) + +#define d2g2meand2(in1,size,in2,size2,out) (in2[0]=='r') ? drowmeana(in1,size[0],size[1],out) : dcolumnmeana(in1,size[0],size[1],out) + +#define c2g2meanc2(in1,size,in2,size2,out) (in2[0]=='r') ? crowmeana(in1,size[0],size[1],out) : ccolumnmeana(in1,size[0],size[1],out) + +#define z2g2meanz2(in1,size,in2,size2,out) (in2[0]=='r') ? zrowmeana(in1,size[0],size[1],out) : zcolumnmeana(in1,size[0],size[1],out) + + + + +#endif /* !__INT_MEAN_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_meanf.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_meanf.h new file mode 100644 index 00000000..c7fb4da9 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_meanf.h @@ -0,0 +1,183 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_MEANF_H__ +#define __INT_MEANF_H__ + +#define s0s0meanfs0(in1,in2) smeanfs(in1,in2) + +#define d0d0meanfd0(in1,in2) dmeanfs(in1,in2) + +#define c0s0meanfc0(in1,in2) cmeanfs(in1,FloatComplex(in2 , 0.0f)) + +#define z0d0meanfz0(in1,in2) zmeanfs(in1,DoubleComplex(in2, 0.0)) + +#define s2s2meanfs0(in1, size1, in2, size2) smeanfa(in1, size1[0]*size1[1], in2) + +#define d2d2meanfd0(in1, size1, in2, size2) dmeanfa(in1, size1[0]*size1[1], in2) + +#define c2s2meanfc0(in1, size1, in2, size2) cmeanfcs(in1, size1[0], size1[1], in2) + +#define z2d2meanfz0(in1, size1, in2, size2) zmeanfzd(in1, size1[0], size1[1], in2) + + +/*by rows or columns */ + +#define s0s0s0meanfs0(in1,in2,in3) (in3==1) ? srowmeanfs(in1,in2) : scolumnmeanfs(in1,in2) + +#define d0d0d0meanfd0(in1,in2,in3) (in3==1) ? drowmeanfs(in1,in2) : dcolumnmeanfs(in1,in2) + +#define c0s0s0meanfc0(in1,in2,in3) (in3==1) ? crowmeanfs(in1,FloatComplex(in2 , 0.0f)) : ccolumnmeanfs(in1,FloatComplex(in2 , 0.0f)) + +#define z0d0d0meanfz0(in1,in2,in3) (in3==1) ? zrowmeanfs(in1,DoubleComplex(in2, 0.0)) : zcolumnmeanfs(in1,DoubleComplex(in2, 0.0)) + + +#define s2s2s0meanfs2(in1, size1, in2, size2,in3,out) (in3==1) ? srowmeanfa(in1,size1[0],size1[1],in2,out) : scolumnmeanfa(in1,size1[0],size1[1],in2,out) + +#define d2d2d0meanfd2(in1, size1, in2, size2,in3,out) (in3==1) ? drowmeanfa(in1,size1[0],size1[1],in2,out) : dcolumnmeanfa(in1,size1[0],size1[1],in2,out) + + + + + +#define c2s2s0meanfc2(in1, size1, in2, size2,in3,out) if (in3==1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowmeanfa(in1,size1[0],size1[1],FloatComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnmeanfa(in1,size1[0],size1[1],FloatComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + } + +#define z2d2d0meanfz2(in1, size1, in2, size2,in3,out) if (in3==1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowmeanfa(in1,size1[0],size1[1],DoubleComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnmeanfa(in1,size1[0],size1[1],DoubleComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + } + + +/**/ + + +#define s0c0meanfs0(in1,in2) creals (cmeanfs(FloatComplex(in1 , 0.0f),in2)) +#define s0c0meanfc0(in1,in2) cmeanfs(FloatComplex(in1 , 0.0f),in2) + +#define d0z0meanfd0(in1,in2) zreals(zmeanfs(DoubleComplex(in1, 0.0 ),in2)) +#define d0z0meanfz0(in1,in2) zmeanfs(DoubleComplex(in1, 0.0 ),in2) + +#define c0c0meanfc0(in1,in2) cmeanfs(in1,in2) + +#define z0z0meanfz0(in1,in2) zmeanfs(in1,in2) + + +#define s2c2meanfs0(in1, size1, in2, size2) creals (cmeanfsc(in1, size1[0],size1[1], in2)) +#define s2c2meanfc0(in1, size1, in2, size2) cmeanfsc(in1, size1[0],size1[1], in2) + +#define d2z2meanfd0(in1, size1, in2, size2) zreals(zmeanfdz(in1, size1[0],size1[1], in2)) +#define d2z2meanfz0(in1, size1, in2, size2) zmeanfdz(in1, size1[0],size1[1], in2) + +#define c2c2meanfc0(in1, size1, in2, size2) cmeanfa(in1, size1[0]* size1[1], in2) + +#define z2z2meanfz0(in1, size1, in2, size2) zmeanfa(in1, size1[0]* size1[1], in2) + + +/*by rows or columns */ + +#define s0c0s0meanfs0(in1,in2,in3) (in3==1) ? crowmeanfs(FloatComplex(in1, 0.0f),in2) : ccolumnmeanfs(FloatComplex(in1, 0.0f),in2) + +#define d0z0d0meanfd0(in1,in2,in3) (in3==1) ? zrowmeanfs(DoubleComplex(in1, 0.0),in2) : zcolumnmeanfs(DoubleComplex(in1, 0.0),in2) + +#define c0c0s0meanfc0(in1,in2,in3) (in3==1) ? crowmeanfs(in1,in2) : ccolumnmeanfs(in1,in2) + +#define z0z0d0meanfz0(in1,in2,in3) (in3==1) ? zrowmeanfs(in1,in2) : zcolumnmeanfs(in1,in2) + + +#define s2c2s0meanfs2(in1, size1, in2, size2,in3,out) if (in3==1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowmeanfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnmeanfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + +#define d2z2d0meanfd2(in1, size1, in2, size2,in3,out) if (in3==1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowmeanfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnmeanfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + +/*complex output*/ +#define s2c2s0meanfc2(in1, size1, in2, size2,in3,out) if (in3==1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowmeanfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnmeanfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + +#define d2z2d0meanfz2(in1, size1, in2, size2,in3,out) if (in3==1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowmeanfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnmeanfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + + + +#define c2c2s0meanfc2(in1, size1, in2, size2,in3,out) (in3==1) ? crowmeanfa(in1,size1[0],size1[1],in2,out) : ccolumnmeanfa(in1,size1[0],size1[1],in2,out) + +#define z2z2d0meanfz2(in1, size1, in2, size2,in3,out) (in3==1) ? zrowmeanfa(in1,size1[0],size1[1],in2,out) : zcolumnmeanfa(in1,size1[0],size1[1],in2,out) + + +#endif /* !__INT_MEANF_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_prod.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_prod.h new file mode 100644 index 00000000..dfec8548 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_prod.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_PROD_H__ +#define __INT_PROD_H__ + +#define s0prods0(in) sprods(in) + +#define d0prodd0(in) dprods(in) + +#define c0prodc0(in) cprods(in) + +#define z0prodz0(in) zprods(in) + +#define s2prods0(in,size) sproda(in, size[0]*size[1]) + +#define d2prodd0(in,size) dproda(in, size[0]*size[1]) + +#define c2prodc0(in,size) cproda(in, size[0]*size[1]) + +#define z2prodz0(in,size) zproda(in, size[0]*size[1]) + + +#define s0s0prods0(in1,in2) (in2==1) ? srowprods(in1) : scolumnprods(in1) + +#define d0d0prodd0(in1,in2) (in2==1) ? drowprods(in1) : dcolumnprods(in1) + +#define c0s0prodc0(in1,in2) (in2==1) ? crowprods(in1) : ccolumnprods(in1) + +#define z0d0prodz0(in1,in2) (in2==1) ? zrowprods(in1) : zcolumnprods(in1) + +#define s2s0prods2(in1,size,in2,out) (in2==1) ? srowproda(in1,size[0],size[1],out) : scolumnproda(in1,size[0],size[1],out) + +#define d2d0prodd2(in1,size,in2,out) (in2==1) ? drowproda(in1,size[0],size[1],out) : dcolumnproda(in1,size[0],size[1],out) + +#define c2s0prodc2(in1,size,in2,out) (in2==1) ? crowproda(in1,size[0],size[1],out) : ccolumnproda(in1,size[0],size[1],out) + +#define z2d0prodz2(in1,size,in2,out) (in2==1) ? zrowproda(in1,size[0],size[1],out) : zcolumnproda(in1,size[0],size[1],out) + + /*'r' and 'c' case */ +#define s0g2prods0(in1,in2,size2) (in2[0]=='r') ? srowprods(in1) : scolumnprods(in1) + +#define d0g2prodd0(in1,in2,size2) (in2[0]=='r') ? drowprods(in1) : dcolumnprods(in1) + +#define c0g2prodc0(in1,in2,size2) (in2[0]=='r') ? crowprods(in1) : ccolumnprods(in1) + +#define z0g2prodz0(in1,in2,size2) (in2[0]=='r') ? zrowprods(in1) : zcolumnprods(in1) + +#define s2g2prods2(in1,size,in2,size2,out) (in2[0]=='r') ? srowproda(in1,size[0],size[1],out) : scolumnproda(in1,size[0],size[1],out) + +#define d2g2prodd2(in1,size,in2,size2,out) (in2[0]=='r') ? drowproda(in1,size[0],size[1],out) : dcolumnproda(in1,size[0],size[1],out) + +#define c2g2prodc2(in1,size,in2,size2,out) (in2[0]=='r') ? crowproda(in1,size[0],size[1],out) : ccolumnproda(in1,size[0],size[1],out) + +#define z2g2prodz2(in1,size,in2,size2,out) (in2[0]=='r') ? zrowproda(in1,size[0],size[1],out) : zcolumnproda(in1,size[0],size[1],out) + + + + +#endif /* !__INT_PROD_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_stdevf.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_stdevf.h new file mode 100644 index 00000000..940b415d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_stdevf.h @@ -0,0 +1,188 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_STDEVF_H__ +#define __INT_STDEVF_H__ + +#define s0s0stdevfs0(in1,in2) sstdevfs(in1,in2) + +#define d0d0stdevfd0(in1,in2) dstdevfs(in1,in2) + +#define c0s0stdevfc0(in1,in2) cstdevfs(in1,FloatComplex(in2 , 0.0f)) + +#define z0d0stdevfz0(in1,in2) zstdevfs(in1,DoubleComplex(in2, 0.0)) + +#define s2s2stdevfs0(in1, size1, in2, size2) sstdevfa(in1, size1[0],size1[1], in2) + +#define d2d2stdevfd0(in1, size1, in2, size2) dstdevfa(in1, size1[0],size1[1], in2) + +#define c2s2stdevfc0(in1, size1, in2, size2) cstdevfcs(in1, size1[0], size1[1], in2) + +#define z2d2stdevfz0(in1, size1, in2, size2) zstdevfzd(in1, size1[0], size1[1], in2) + + +/*by rows or columns */ + +#define s0s0s0stdevfs0(in1,in2,in3) (in3==1) ? srowstdevfs(in1,in2) : scolumnstdevfs(in1,in2) + +#define d0d0d0stdevfd0(in1,in2,in3) (in3==1) ? drowstdevfs(in1,in2) : dcolumnstdevfs(in1,in2) + +#define c0s0s0stdevfc0(in1,in2,in3) (in3==1) ? crowstdevfs(in1,FloatComplex(in2 , 0.0f)) : ccolumnstdevfs(in1,FloatComplex(in2 , 0.0f)) + +#define z0d0d0stdevfz0(in1,in2,in3) (in3==1) ? zrowstdevfs(in1,DoubleComplex(in2, 0.0)) : zcolumnstdevfs(in1,DoubleComplex(in2, 0.0)) + + +#define s2s2s0stdevfs2(in1, size1, in2, size2,in3,out) (in3==1) ? srowstdevfa(in1,size1[0],size1[1],in2,out) : scolumnstdevfa(in1,size1[0],size1[1],in2,out) + +#define d2d2d0stdevfd2(in1, size1, in2, size2,in3,out) (in3==1) ? drowstdevfa(in1,size1[0],size1[1],in2,out) : dcolumnstdevfa(in1,size1[0],size1[1],in2,out) + + + + + +#define c2s2s0stdevfc2(in1, size1, in2, size2,in3,out) if (in3 == 1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowstdevfa(in1,size1[0],size1[1],FloatComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnstdevfa(in1,size1[0],size1[1],FloatComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + } + +#define z2d2d0stdevfz2(in1, size1, in2, size2,in3,out) if (in3 == 1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowstdevfa(in1,size1[0],size1[1],DoubleComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnstdevfa(in1,size1[0],size1[1],DoubleComplexMatrix(in2,temp,size1[0]*size1[1]),out);\ + free(temp);\ + } + + +/**/ + + +#define s0c0stdevfs0(in1,in2) creals (cstdevfs(FloatComplex(in1 , 0.0f),in2)) +#define s0c0stdevfc0(in1,in2) cstdevfs(FloatComplex(in1 , 0.0f),in2) + +#define d0z0stdevfd0(in1,in2) zreals(zstdevfs(DoubleComplex(in1, 0.0 ),in2) +#define d0z0stdevfz0(in1,in2) zstdevfs(DoubleComplex(in1, 0.0 ),in2) + + +#define c0c0stdevfc0(in1,in2) cstdevfs(in1,in2) + +#define z0z0stdevfz0(in1,in2) zstdevfs(in1,in2) + + +#define s2c2stdevfs0(in1, size1, in2, size2) creals(cstdevfsc(in1, size1[0],size1[1], in2)) +#define s2c2stdevfc0(in1, size1, in2, size2) cstdevfsc(in1, size1[0],size1[1], in2) + +#define d2z2stdevfd0(in1, size1, in2, size2) zreals(zstdevfdz(in1, size1[0],size1[1], in2)) +#define d2z2stdevfz0(in1, size1, in2, size2) zstdevfdz(in1, size1[0],size1[1], in2) + +#define c2c2stdevfc0(in1, size1, in2, size2) cstdevfa(in1, size1[0], size1[1], in2) + +#define z2z2stdevfz0(in1, size1, in2, size2) zstdevfa(in1, size1[0], size1[1], in2) + + +/*by rows or columns */ + +#define s0c0s0stdevfs0(in1,in2,in3) (in3==1) ? creals(crowstdevfs(FloatComplex(in1, 0.0f),in2)) : creals(ccolumnstdevfs(FloatComplex(in1, 0.0f),in2)) + +#define d0z0d0stdevfd0(in1,in2,in3) (in3==1) ? zreals(zrowstdevfs(DoubleComplex(in1, 0.0),in2)) : zreals(zcolumnstdevfs(DoubleComplex(in1, 0.0),in2)) + +#define c0c0s0stdevfc0(in1,in2,in3) (in3==1) ? crowstdevfs(in1,in2) : ccolumnstdevfs(in1,in2) + +#define z0z0d0stdevfz0(in1,in2,in3) (in3==1) ? zrowstdevfs(in1,in2) : zcolumnstdevfs(in1,in2) + + +#define s2c2s0stdevfs2(in1, size1, in2, size2,in3,out) if (in3 == 1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowstdevfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,FloatComplexMatrix(out,temp,size1[0]*size1[1]));\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnstdevfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,FloatComplexMatrix(out,temp,size1[0]*size1[1]));\ + free(temp);\ + } + +#define d2z2d0stdevfd2(in1, size1, in2, size2,in3,out) if (in3 == 1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowstdevfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,DoubleComplexMatrix(out,temp,size1[0]));\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnstdevfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,DoubleComplexMatrix(out,temp,size1[0]));\ + free(temp);\ + } + + +/*complex output*/ + +#define s2c2s0stdevfc2(in1, size1, in2, size2,in3,out) if (in3 == 1) {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + crowstdevfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {float* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(float));\ + sfilla(temp,size1[0],size1[1],0);\ + ccolumnstdevfa(FloatComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + +#define d2z2d0stdevfz2(in1, size1, in2, size2,in3,out) if (in3 == 1) {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zrowstdevfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + }\ + else\ + {double* temp;\ + temp=malloc((uint)(size1[0]*size1[1])*sizeof(double));\ + dfilla(temp,size1[0],size1[1],0);\ + zcolumnstdevfa(DoubleComplexMatrix(in1,temp,size1[0]*size1[1]),size1[0],size1[1],in2,out);\ + free(temp);\ + } + + + +#define c2c2s0stdevfc2(in1, size1, in2, size2,in3,out) (in3==1) ? crowstdevfa(in1,size1[0],size1[1],in2,out) : ccolumnstdevfa(in1,size1[0],size1[1],in2,out) + +#define z2z2d0stdevfz2(in1, size1, in2, size2,in3,out) (in3==1) ? zrowstdevfa(in1,size1[0],size1[1],in2,out) : zcolumnstdevfa(in1,size1[0],size1[1],in2,out) + + +/**/ + +#endif /* !__INT_STDEVF_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_sum.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_sum.h new file mode 100644 index 00000000..08f01fee --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_sum.h @@ -0,0 +1,70 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_SUM_H__ +#define __INT_SUM_H__ + +#define s0sums0(in) ssums(in) + +#define d0sumd0(in) dsums(in) + +#define c0sumc0(in) csums(in) + +#define z0sumz0(in) zsums(in) + +#define s2sums0(in,size) ssuma(in, size[0]*size[1]) + +#define d2sumd0(in,size) dsuma(in, size[0]*size[1]) + +#define c2sumc0(in,size) csuma(in, size[0]*size[1]) + +#define z2sumz0(in,size) zsuma(in, size[0]*size[1]) + + +#define s0s0sums0(in1,in2) (in2==1) ? srowsums(in1) : scolumnsums(in1) + +#define d0d0sumd0(in1,in2) (in2==1) ? drowsums(in1) : dcolumnsums(in1) + +#define c0s0sumc0(in1,in2) (in2==1) ? crowsums(in1) : ccolumnsums(in1) + +#define z0d0sumz0(in1,in2) (in2==1) ? zrowsums(in1) : zcolumnsums(in1) + +#define s2s0sums2(in1,size,in2,out) (in2==1) ? srowsuma(in1,size[0],size[1],out) : scolumnsuma(in1,size[0],size[1],out) + +#define d2d0sumd2(in1,size,in2,out) (in2==1) ? drowsuma(in1,size[0],size[1],out) : dcolumnsuma(in1,size[0],size[1],out) + +#define c2s0sumc2(in1,size,in2,out) (in2==1) ? crowsuma(in1,size[0],size[1],out) : ccolumnsuma(in1,size[0],size[1],out) + +#define z2d0sumz2(in1,size,in2,out) (in2==1) ? zrowsuma(in1,size[0],size[1],out) : zcolumnsuma(in1,size[0],size[1],out) + + +/*'r' and 'c' case */ +#define s0g2sums0(in1,in2,size2) (in2[0]=='r') ? srowsums(in1) : scolumnsums(in1) + +#define d0g2sumd0(in1,in2,size2) (in2[0]=='r') ? drowsums(in1) : dcolumnsums(in1) + +#define c0g2sumc0(in1,in2,size2) (in2[0]=='r') ? crowsums(in1) : ccolumnsums(in1) + +#define z0g2sumz0(in1,in2,size2) (in2[0]=='r') ? zrowsums(in1) : zcolumnsums(in1) + +#define s2g2sums2(in1,size,in2,size2,out) (in2[0]=='r') ? srowsuma(in1,size[0],size[1],out) : scolumnsuma(in1,size[0],size[1],out) + +#define d2g2sumd2(in1,size,in2,size2,out) (in2[0]=='r') ? drowsuma(in1,size[0],size[1],out) : dcolumnsuma(in1,size[0],size[1],out) + +#define c2g2sumc2(in1,size,in2,size2,out) (in2[0]=='r') ? crowsuma(in1,size[0],size[1],out) : ccolumnsuma(in1,size[0],size[1],out) + +#define z2g2sumz2(in1,size,in2,size2,out) (in2[0]=='r') ? zrowsuma(in1,size[0],size[1],out) : zcolumnsuma(in1,size[0],size[1],out) + + +#endif /* !__INT_SUM_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_variance.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_variance.h new file mode 100644 index 00000000..dfc191ca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_variance.h @@ -0,0 +1,71 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_VARIANCE_H__ +#define __INT_VARIANCE_H__ + +#define s0variances0(in) svariances(in) + +#define d0varianced0(in) dvariances(in) + +#define c0variancec0(in) cvariances(in) + +#define z0variancez0(in) zvariances(in) + +#define s2variances0(in,size) svariancea(in, size[0]*size[1]) + +#define d2varianced0(in,size) dvariancea(in, size[0]*size[1]) + +#define c2variancec0(in,size) cvariancea(in, size[0]*size[1]) + +#define z2variancez0(in,size) zvariancea(in, size[0]*size[1]) + + +#define s0s0variances0(in1,in2) (in2==1) ? srowvariances(in1) : scolumnvariances(in1) + +#define d0d0varianced0(in1,in2) (in2==1) ? drowvariances(in1) : dcolumnvariances(in1) + +#define c0s0variancec0(in1,in2) (in2==1) ? crowvariances(in1) : ccolumnvariances(in1) + +#define z0d0variancez0(in1,in2) (in2==1) ? zrowvariances(in1) : zcolumnvariances(in1) + +#define s2s0variances2(in1,size,in2,out) (in2==1) ? srowvariancea(in1,size[0],size[1],out) : scolumnvariancea(in1,size[0],size[1],out) + +#define d2d0varianced2(in1,size,in2,out) (in2==1) ? drowvariancea(in1,size[0],size[1],out) : dcolumnvariancea(in1,size[0],size[1],out) + +#define c2s0variancec2(in1,size,in2,out) (in2==1) ? crowvariancea(in1,size[0],size[1],out) : ccolumnvariancea(in1,size[0],size[1],out) + +#define z2d0variancez2(in1,size,in2,out) (in2==1) ? zrowvariancea(in1,size[0],size[1],out) : zcolumnvariancea(in1,size[0],size[1],out) + + + /*'r' and 'c' case */ +#define s0g2variances0(in1,in2,size2) (in2[0]=='r') ? srowvariances(in1) : scolumnvariances(in1) + +#define d0g2varianced0(in1,in2,size2) (in2[0]=='r') ? drowvariances(in1) : dcolumnvariances(in1) + +#define c0g2variancec0(in1,in2,size2) (in2[0]=='r') ? crowvariances(in1) : ccolumnvariances(in1) + +#define z0g2variancez0(in1,in2,size2) (in2[0]=='r') ? zrowvariances(in1) : zcolumnvariances(in1) + +#define s2g2variances2(in1,size,in2,size2,out) (in2[0]=='r') ? srowvariancea(in1,size[0],size[1],out) : scolumnvariancea(in1,size[0],size[1],out) + +#define d2g2varianced2(in1,size,in2,size2,out) (in2[0]=='r') ? drowvariancea(in1,size[0],size[1],out) : dcolumnvariancea(in1,size[0],size[1],out) + +#define c2g2variancec2(in1,size,in2,size2,out) (in2[0]=='r') ? crowvariancea(in1,size[0],size[1],out) : ccolumnvariancea(in1,size[0],size[1],out) + +#define z2g2variancez2(in1,size,in2,size2,out) (in2[0]=='r') ? zrowvariancea(in1,size[0],size[1],out) : zcolumnvariancea(in1,size[0],size[1],out) + + + +#endif /* !__INT_VARIANCE_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/interfaces/int_variancef.h b/2.3-1/src/c/statisticsFunctions/interfaces/int_variancef.h new file mode 100644 index 00000000..dfac1a35 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/interfaces/int_variancef.h @@ -0,0 +1,58 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_VARIANCEF_H__ +#define __INT_VARIANCEF_H__ + +#define s0s0variancefs0(in1,in2) svariancefs(in1,in2) + +#define d0d0variancefd0(in1,in2) dvariancefs(in1,in2) + +#define c0s0variancefc0(in1,in2) cvariancefs(in1,in2) + +#define z0d0variancefz0(in1,in2) zvariancefs(in1,in2) + +#define s2s2variancefs0(in1, size1, in2, size2) svariancefa(in1, size1[0]*size1[1], in2) + +#define d2d2variancefd0(in1, size1, in2, size2) dvariancefa(in1, size1[0]*size1[1], in2) + +#define c2s2variancefc0(in1, size1, in2, size2) cvariancefv(in1, size1[0], size1[1], in2) + +#define z2d2variancefz0(in1, size1, in2, size2) zvariancefv(in1, size1[0], size1[1], in2) + + +/*by rows or columns */ + +#define s0s0s0variancefs0(in1,in2,in3) (in3==1) ? srowvariancefs(in1,in2) : scolumnvariancefs(in1,in2) + +#define d0d0d0variancefd0(in1,in2,in3) (in3==1) ? drowvariancefs(in1,in2) : dcolumnvariancefs(in1,in2) + +#define c0s0s0variancefc0(in1,in2,in3) (in3==1) ? crowvariancefs(in1,in2) : ccolumnvariancefs(in1,in2) + +#define z0d0d0variancefz0(in1,in2,in3) (in3==1) ? zrowvariancefs(in1,in2) : zcolumnvariancefs(in1,in2) + +#define s2s2s0variancefs2(in1, size1, in2, size2,in3,out) (in3==1) ? srowvariancefa(in1,size1[0],size1[1],in2,out) : scolumnvariancefa(in1,size1[0],size1[1],in2,out) + +#define d2d2d0variancefd2(in1, size1, in2, size2,in3,out) (in3==1) ? drowvariancefa(in1,size1[0],size1[1],in2,out) : dcolumnvariancefa(in1,size1[0],size1[1],in2,out) + +#define c2s2s0variancefc2(in1, size1, in2, size2,in3,out) (in3==1) ? crowvariancefa(in1,size1[0],size1[1],in2,out) : ccolumnvariancefa(in1,size1[0],size1[1],in2,out) + +#define z2d2d0variancefz2(in1, size1, in2, size2,in3,out) (in3==1) ? zrowvariancefa(in1,size1[0],size1[1],in2,out) : zcolumnvariancefa(in1,size1[0],size1[1],in2,out) + +/* +#define d2d2d0variancefd2(in1,size1,in2,size2 ,in3 ,out) (in3==1) ? drowvariancefa(in1,size1[0],size1[1],in2 ,out) : dcolumnvariancefa(in1,size1[0],size1[1], in2,out) +*/ + + +#endif /* !__INT_VARIANCEF_H__ */ diff --git a/2.3-1/src/c/statisticsFunctions/max/Makefile.am b/2.3-1/src/c/statisticsFunctions/max/Makefile.am new file mode 100644 index 00000000..8c122565 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/Makefile.am @@ -0,0 +1,51 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMax_la_CFLAGS = -I $(top_builddir)/src/c/statisticsFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMax.la + +libMax_la_SOURCES = $(HEAD) $(SRC) + +SRC = smaxa.c \ + srowmaxa.c \ + scolumnmaxa.c \ + dmaxa.c \ + drowmaxa.c \ + dcolumnmaxa.c + +HEAD = ../includes/statMax.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes + +check_LDADD = $(top_builddir)/src/c/statisticsFunctions/max/libMax.la + +check_PROGRAMS = testFloatMax testDoubleMax + +TESTS = testFloatMax testDoubleMax + +# +# -*- Max Tests -*- +# +testFloatMax_SOURCES = testFloatMax.c +testFloatMax_CFLAGS = $(check_INCLUDES) +testFloatMax_LDADD = $(check_LDADD) + +testDoubleMax_SOURCES =testDoubleMax.c +testDoubleMax_CFLAGS = $(check_INCLUDES) +testDoubleMax_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/max/Makefile.in b/2.3-1/src/c/statisticsFunctions/max/Makefile.in new file mode 100644 index 00000000..5298c5a4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/Makefile.in @@ -0,0 +1,759 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMax$(EXEEXT) testDoubleMax$(EXEEXT) +TESTS = testFloatMax$(EXEEXT) testDoubleMax$(EXEEXT) +subdir = src/c/statisticsFunctions/max +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMax_la_LIBADD = +am__objects_1 = +am__objects_2 = libMax_la-smaxa.lo libMax_la-srowmaxa.lo \ + libMax_la-scolumnmaxa.lo libMax_la-dmaxa.lo \ + libMax_la-drowmaxa.lo libMax_la-dcolumnmaxa.lo +am_libMax_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libMax_la_OBJECTS = $(am_libMax_la_OBJECTS) +libMax_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMax_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMax_OBJECTS = testDoubleMax-testDoubleMax.$(OBJEXT) +testDoubleMax_OBJECTS = $(am_testDoubleMax_OBJECTS) +testDoubleMax_DEPENDENCIES = $(check_LDADD) +testDoubleMax_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleMax_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMax_OBJECTS = testFloatMax-testFloatMax.$(OBJEXT) +testFloatMax_OBJECTS = $(am_testFloatMax_OBJECTS) +testFloatMax_DEPENDENCIES = $(check_LDADD) +testFloatMax_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatMax_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMax_la_SOURCES) $(testDoubleMax_SOURCES) \ + $(testFloatMax_SOURCES) +DIST_SOURCES = $(libMax_la_SOURCES) $(testDoubleMax_SOURCES) \ + $(testFloatMax_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMax_la_CFLAGS = -I $(top_builddir)/src/c/statisticsFunctions/includes +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMax.la +libMax_la_SOURCES = $(HEAD) $(SRC) +SRC = smaxa.c \ + srowmaxa.c \ + scolumnmaxa.c \ + dmaxa.c \ + drowmaxa.c \ + dcolumnmaxa.c + +HEAD = ../includes/statMax.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes +check_LDADD = $(top_builddir)/src/c/statisticsFunctions/max/libMax.la + +# +# -*- Max Tests -*- +# +testFloatMax_SOURCES = testFloatMax.c +testFloatMax_CFLAGS = $(check_INCLUDES) +testFloatMax_LDADD = $(check_LDADD) +testDoubleMax_SOURCES = testDoubleMax.c +testDoubleMax_CFLAGS = $(check_INCLUDES) +testDoubleMax_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/max/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/max/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMax.la: $(libMax_la_OBJECTS) $(libMax_la_DEPENDENCIES) + $(libMax_la_LINK) -rpath $(pkglibdir) $(libMax_la_OBJECTS) $(libMax_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMax$(EXEEXT): $(testDoubleMax_OBJECTS) $(testDoubleMax_DEPENDENCIES) + @rm -f testDoubleMax$(EXEEXT) + $(testDoubleMax_LINK) $(testDoubleMax_OBJECTS) $(testDoubleMax_LDADD) $(LIBS) +testFloatMax$(EXEEXT): $(testFloatMax_OBJECTS) $(testFloatMax_DEPENDENCIES) + @rm -f testFloatMax$(EXEEXT) + $(testFloatMax_LINK) $(testFloatMax_OBJECTS) $(testFloatMax_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-dcolumnmaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-dmaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-drowmaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-scolumnmaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-smaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMax_la-srowmaxa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMax-testDoubleMax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMax-testFloatMax.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMax_la-smaxa.lo: smaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-smaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-smaxa.Tpo -c -o libMax_la-smaxa.lo `test -f 'smaxa.c' || echo '$(srcdir)/'`smaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-smaxa.Tpo $(DEPDIR)/libMax_la-smaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smaxa.c' object='libMax_la-smaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-smaxa.lo `test -f 'smaxa.c' || echo '$(srcdir)/'`smaxa.c + +libMax_la-srowmaxa.lo: srowmaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-srowmaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-srowmaxa.Tpo -c -o libMax_la-srowmaxa.lo `test -f 'srowmaxa.c' || echo '$(srcdir)/'`srowmaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-srowmaxa.Tpo $(DEPDIR)/libMax_la-srowmaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowmaxa.c' object='libMax_la-srowmaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-srowmaxa.lo `test -f 'srowmaxa.c' || echo '$(srcdir)/'`srowmaxa.c + +libMax_la-scolumnmaxa.lo: scolumnmaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-scolumnmaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-scolumnmaxa.Tpo -c -o libMax_la-scolumnmaxa.lo `test -f 'scolumnmaxa.c' || echo '$(srcdir)/'`scolumnmaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-scolumnmaxa.Tpo $(DEPDIR)/libMax_la-scolumnmaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnmaxa.c' object='libMax_la-scolumnmaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-scolumnmaxa.lo `test -f 'scolumnmaxa.c' || echo '$(srcdir)/'`scolumnmaxa.c + +libMax_la-dmaxa.lo: dmaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-dmaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-dmaxa.Tpo -c -o libMax_la-dmaxa.lo `test -f 'dmaxa.c' || echo '$(srcdir)/'`dmaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-dmaxa.Tpo $(DEPDIR)/libMax_la-dmaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmaxa.c' object='libMax_la-dmaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-dmaxa.lo `test -f 'dmaxa.c' || echo '$(srcdir)/'`dmaxa.c + +libMax_la-drowmaxa.lo: drowmaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-drowmaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-drowmaxa.Tpo -c -o libMax_la-drowmaxa.lo `test -f 'drowmaxa.c' || echo '$(srcdir)/'`drowmaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-drowmaxa.Tpo $(DEPDIR)/libMax_la-drowmaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowmaxa.c' object='libMax_la-drowmaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-drowmaxa.lo `test -f 'drowmaxa.c' || echo '$(srcdir)/'`drowmaxa.c + +libMax_la-dcolumnmaxa.lo: dcolumnmaxa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -MT libMax_la-dcolumnmaxa.lo -MD -MP -MF $(DEPDIR)/libMax_la-dcolumnmaxa.Tpo -c -o libMax_la-dcolumnmaxa.lo `test -f 'dcolumnmaxa.c' || echo '$(srcdir)/'`dcolumnmaxa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMax_la-dcolumnmaxa.Tpo $(DEPDIR)/libMax_la-dcolumnmaxa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnmaxa.c' object='libMax_la-dcolumnmaxa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMax_la_CFLAGS) $(CFLAGS) -c -o libMax_la-dcolumnmaxa.lo `test -f 'dcolumnmaxa.c' || echo '$(srcdir)/'`dcolumnmaxa.c + +testDoubleMax-testDoubleMax.o: testDoubleMax.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMax_CFLAGS) $(CFLAGS) -MT testDoubleMax-testDoubleMax.o -MD -MP -MF $(DEPDIR)/testDoubleMax-testDoubleMax.Tpo -c -o testDoubleMax-testDoubleMax.o `test -f 'testDoubleMax.c' || echo '$(srcdir)/'`testDoubleMax.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMax-testDoubleMax.Tpo $(DEPDIR)/testDoubleMax-testDoubleMax.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMax.c' object='testDoubleMax-testDoubleMax.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMax_CFLAGS) $(CFLAGS) -c -o testDoubleMax-testDoubleMax.o `test -f 'testDoubleMax.c' || echo '$(srcdir)/'`testDoubleMax.c + +testDoubleMax-testDoubleMax.obj: testDoubleMax.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMax_CFLAGS) $(CFLAGS) -MT testDoubleMax-testDoubleMax.obj -MD -MP -MF $(DEPDIR)/testDoubleMax-testDoubleMax.Tpo -c -o testDoubleMax-testDoubleMax.obj `if test -f 'testDoubleMax.c'; then $(CYGPATH_W) 'testDoubleMax.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMax.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMax-testDoubleMax.Tpo $(DEPDIR)/testDoubleMax-testDoubleMax.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMax.c' object='testDoubleMax-testDoubleMax.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMax_CFLAGS) $(CFLAGS) -c -o testDoubleMax-testDoubleMax.obj `if test -f 'testDoubleMax.c'; then $(CYGPATH_W) 'testDoubleMax.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMax.c'; fi` + +testFloatMax-testFloatMax.o: testFloatMax.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMax_CFLAGS) $(CFLAGS) -MT testFloatMax-testFloatMax.o -MD -MP -MF $(DEPDIR)/testFloatMax-testFloatMax.Tpo -c -o testFloatMax-testFloatMax.o `test -f 'testFloatMax.c' || echo '$(srcdir)/'`testFloatMax.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMax-testFloatMax.Tpo $(DEPDIR)/testFloatMax-testFloatMax.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMax.c' object='testFloatMax-testFloatMax.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMax_CFLAGS) $(CFLAGS) -c -o testFloatMax-testFloatMax.o `test -f 'testFloatMax.c' || echo '$(srcdir)/'`testFloatMax.c + +testFloatMax-testFloatMax.obj: testFloatMax.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMax_CFLAGS) $(CFLAGS) -MT testFloatMax-testFloatMax.obj -MD -MP -MF $(DEPDIR)/testFloatMax-testFloatMax.Tpo -c -o testFloatMax-testFloatMax.obj `if test -f 'testFloatMax.c'; then $(CYGPATH_W) 'testFloatMax.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMax.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMax-testFloatMax.Tpo $(DEPDIR)/testFloatMax-testFloatMax.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMax.c' object='testFloatMax-testFloatMax.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMax_CFLAGS) $(CFLAGS) -c -o testFloatMax-testFloatMax.obj `if test -f 'testFloatMax.c'; then $(CYGPATH_W) 'testFloatMax.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMax.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c new file mode 100644 index 00000000..ae0bbd47 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/dcolumnmaxa.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +void dcolumnmaxa(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i]; + for (j=0;jout[i]) out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/dmaxa.c b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c new file mode 100644 index 00000000..5e2145e3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/dmaxa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +double dmaxa(double *in, int size) { + double out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) out = in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c new file mode 100644 index 00000000..a3099231 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/drowmaxa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +void drowmaxa(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) out[i] = in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c new file mode 100644 index 00000000..71af8460 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/scolumnmaxa.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +void scolumnmaxa(float *in, int rows, int columns, float* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i]; + for (j=0;jout[i]) out[i] = in[i+j*rows]; + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/smaxa.c b/2.3-1/src/c/statisticsFunctions/max/smaxa.c new file mode 100644 index 00000000..f47fcffe --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/smaxa.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +float smaxa(float *in, int size) { + float out = in[0]; + int i = 0; + + for (i = 1; i < size; ++i) + { + if (in[i]>out) out = in[i]; + } + return out; + +} diff --git a/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c new file mode 100644 index 00000000..c87ccf7f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/srowmaxa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMax.h" + +void srowmaxa(float *in, int rows, int columns, float* out) { + int i = 0, j = 0; + + for (i = 0; i < columns; i++) { + out[i]=in[i*rows]; + for (j = 1 ; j < rows ; j++) + if (in[i*rows+j]>out[i]) out[i] = in[i*rows+j]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c new file mode 100644 index 00000000..81c50324 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/testDoubleMax.c @@ -0,0 +1,93 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "statMax.h" +#include "assert.h" +#include "stdio.h" + + +static void dmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double out; + + out = dmaxa(in,12); + assert(out-7==0); + +} + + +static void drowmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double result2[2]={7,5}; + double result3[3]={7,6,5}; + double result4[4]={7,6,4,5}; + double result6[6]={5,7,6,4,5,4}; + double out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + int i; + + + drowmaxa(in,12,1,out1); + drowmaxa(in,6,2,out2); + drowmaxa(in,4,3,out3); + drowmaxa(in,3,4,out4); + drowmaxa(in,2,6,out6); + drowmaxa(in,1,12,out12); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + + +static void dcolumnmaxaTest(void){ + double in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + double out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + double result2[2]={7,6}; + double result3[3]={5,5,7}; + double result4[4]={4,6,7,3}; + double result6[6]={4,5,7,5,4,6}; + int i; + + + + dcolumnmaxa(in,12,1,out12); + dcolumnmaxa(in,6,2,out6); + dcolumnmaxa(in,4,3,out4); + dcolumnmaxa(in,3,4,out3); + dcolumnmaxa(in,2,6,out2); + dcolumnmaxa(in,1,12,out1); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + +static int maxTest(void){ + dmaxaTest(); + drowmaxaTest(); + dcolumnmaxaTest(); + return 0; +} + + +int main(void){ + assert(maxTest()==0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c new file mode 100644 index 00000000..7741aef4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/testFloatMax.c @@ -0,0 +1,92 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#include "statMax.h" +#include "assert.h" +#include "stdio.h" + +static void smaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out; + + out = smaxa(in,12); + assert(out-7==0); + +} + + +static void srowmaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + float result2[2]={7,5}; + float result3[3]={7,6,5}; + float result4[4]={7,6,4,5}; + float result6[6]={5,7,6,4,5,4}; + int i; + + + srowmaxa(in,12,1,out1); + srowmaxa(in,6,2,out2); + srowmaxa(in,4,3,out3); + srowmaxa(in,3,4,out4); + srowmaxa(in,2,6,out6); + srowmaxa(in,1,12,out12); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + + +static void scolumnmaxaTest(void){ + float in[12]={4,5,7,1,2,6,4,1,2,5,4,3}; + float out1[1],out2[2],out3[3],out4[4],out6[6],out12[12]; + float result2[2]={7,6}; + float result3[3]={5,5,7}; + float result4[4]={4,6,7,3}; + float result6[6]={4,5,7,5,4,6}; + int i; + + + + scolumnmaxa(in,12,1,out12); + scolumnmaxa(in,6,2,out6); + scolumnmaxa(in,4,3,out4); + scolumnmaxa(in,3,4,out3); + scolumnmaxa(in,2,6,out2); + scolumnmaxa(in,1,12,out1); + + assert(out1[0]-7==0); + for (i=0;i<2;i++) assert(out2[i]-result2[i]==0); + for (i=0;i<3;i++) assert(out3[i]-result3[i]==0); + for (i=0;i<4;i++) assert(out4[i]-result4[i]==0); + for (i=0;i<6;i++) assert(out6[i]-result6[i]==0); + for (i=0;i<12;i++) assert(out12[i]-in[i]==0); +} + +static int maxTest(void){ + smaxaTest(); + srowmaxaTest(); + scolumnmaxaTest(); + return 0; +} + + +int main(void){ + assert(maxTest()==0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj b/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj new file mode 100644 index 00000000..e9414862 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {020991C0-9640-4097-B697-D514F08AA74C} + testDoubleMax + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj.filters new file mode 100644 index 00000000..73fb0a8e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/test_DoubleMax/testDoubleMax.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj b/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj new file mode 100644 index 00000000..da865fa2 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0E4EC2A2-BADC-48C8-AF56-D1437094887A} + testFloatMax + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj.filters new file mode 100644 index 00000000..c529a673 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/max/test_FloatMax/testFloatMax.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/Makefile.am b/2.3-1/src/c/statisticsFunctions/mean/Makefile.am new file mode 100644 index 00000000..2969a734 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/Makefile.am @@ -0,0 +1,69 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMean_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMean.la + +libMean_la_SOURCES = $(HEAD) $(SRC) + +SRC = smeana.c \ + srowmeana.c \ + scolumnmeana.c \ + dmeana.c \ + drowmeana.c \ + dcolumnmeana.c \ + cmeana.c \ + crowmeana.c \ + ccolumnmeana.c \ + zmeana.c \ + zrowmeana.c \ + zcolumnmeana.c + +HEAD = ../includes/mean.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatMean testDoubleMean + +TESTS = testFloatMean testDoubleMean + +# +# -*- Mean Tests -*- +# +testFloatMean_SOURCES = testFloatMean.c +testFloatMean_CFLAGS = $(check_INCLUDES) +testFloatMean_LDADD = $(check_LDADD) + +testDoubleMean_SOURCES =testDoubleMean.c +testDoubleMean_CFLAGS = $(check_INCLUDES) +testDoubleMean_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/mean/Makefile.in b/2.3-1/src/c/statisticsFunctions/mean/Makefile.in new file mode 100644 index 00000000..0a057450 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/Makefile.in @@ -0,0 +1,839 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMean$(EXEEXT) testDoubleMean$(EXEEXT) +TESTS = testFloatMean$(EXEEXT) testDoubleMean$(EXEEXT) +subdir = src/c/statisticsFunctions/mean +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMean_la_LIBADD = +am__objects_1 = +am__objects_2 = libMean_la-smeana.lo libMean_la-srowmeana.lo \ + libMean_la-scolumnmeana.lo libMean_la-dmeana.lo \ + libMean_la-drowmeana.lo libMean_la-dcolumnmeana.lo \ + libMean_la-cmeana.lo libMean_la-crowmeana.lo \ + libMean_la-ccolumnmeana.lo libMean_la-zmeana.lo \ + libMean_la-zrowmeana.lo libMean_la-zcolumnmeana.lo +am_libMean_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libMean_la_OBJECTS = $(am_libMean_la_OBJECTS) +libMean_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMean_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMean_OBJECTS = testDoubleMean-testDoubleMean.$(OBJEXT) +testDoubleMean_OBJECTS = $(am_testDoubleMean_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la +testDoubleMean_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleMean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleMean_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMean_OBJECTS = testFloatMean-testFloatMean.$(OBJEXT) +testFloatMean_OBJECTS = $(am_testFloatMean_OBJECTS) +testFloatMean_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatMean_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatMean_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMean_la_SOURCES) $(testDoubleMean_SOURCES) \ + $(testFloatMean_SOURCES) +DIST_SOURCES = $(libMean_la_SOURCES) $(testDoubleMean_SOURCES) \ + $(testFloatMean_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMean_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMean.la +libMean_la_SOURCES = $(HEAD) $(SRC) +SRC = smeana.c \ + srowmeana.c \ + scolumnmeana.c \ + dmeana.c \ + drowmeana.c \ + dcolumnmeana.c \ + cmeana.c \ + crowmeana.c \ + ccolumnmeana.c \ + zmeana.c \ + zrowmeana.c \ + zcolumnmeana.c + +HEAD = ../includes/mean.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + + +# +# -*- Mean Tests -*- +# +testFloatMean_SOURCES = testFloatMean.c +testFloatMean_CFLAGS = $(check_INCLUDES) +testFloatMean_LDADD = $(check_LDADD) +testDoubleMean_SOURCES = testDoubleMean.c +testDoubleMean_CFLAGS = $(check_INCLUDES) +testDoubleMean_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/mean/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/mean/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMean.la: $(libMean_la_OBJECTS) $(libMean_la_DEPENDENCIES) + $(libMean_la_LINK) -rpath $(pkglibdir) $(libMean_la_OBJECTS) $(libMean_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMean$(EXEEXT): $(testDoubleMean_OBJECTS) $(testDoubleMean_DEPENDENCIES) + @rm -f testDoubleMean$(EXEEXT) + $(testDoubleMean_LINK) $(testDoubleMean_OBJECTS) $(testDoubleMean_LDADD) $(LIBS) +testFloatMean$(EXEEXT): $(testFloatMean_OBJECTS) $(testFloatMean_DEPENDENCIES) + @rm -f testFloatMean$(EXEEXT) + $(testFloatMean_LINK) $(testFloatMean_OBJECTS) $(testFloatMean_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-ccolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-cmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-crowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-dcolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-dmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-drowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-scolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-smeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-srowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zcolumnmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMean_la-zrowmeana.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMean-testDoubleMean.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMean-testFloatMean.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMean_la-smeana.lo: smeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-smeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-smeana.Tpo -c -o libMean_la-smeana.lo `test -f 'smeana.c' || echo '$(srcdir)/'`smeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-smeana.Tpo $(DEPDIR)/libMean_la-smeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smeana.c' object='libMean_la-smeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-smeana.lo `test -f 'smeana.c' || echo '$(srcdir)/'`smeana.c + +libMean_la-srowmeana.lo: srowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-srowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-srowmeana.Tpo -c -o libMean_la-srowmeana.lo `test -f 'srowmeana.c' || echo '$(srcdir)/'`srowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-srowmeana.Tpo $(DEPDIR)/libMean_la-srowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowmeana.c' object='libMean_la-srowmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-srowmeana.lo `test -f 'srowmeana.c' || echo '$(srcdir)/'`srowmeana.c + +libMean_la-scolumnmeana.lo: scolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-scolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-scolumnmeana.Tpo -c -o libMean_la-scolumnmeana.lo `test -f 'scolumnmeana.c' || echo '$(srcdir)/'`scolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-scolumnmeana.Tpo $(DEPDIR)/libMean_la-scolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnmeana.c' object='libMean_la-scolumnmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-scolumnmeana.lo `test -f 'scolumnmeana.c' || echo '$(srcdir)/'`scolumnmeana.c + +libMean_la-dmeana.lo: dmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-dmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-dmeana.Tpo -c -o libMean_la-dmeana.lo `test -f 'dmeana.c' || echo '$(srcdir)/'`dmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-dmeana.Tpo $(DEPDIR)/libMean_la-dmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmeana.c' object='libMean_la-dmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-dmeana.lo `test -f 'dmeana.c' || echo '$(srcdir)/'`dmeana.c + +libMean_la-drowmeana.lo: drowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-drowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-drowmeana.Tpo -c -o libMean_la-drowmeana.lo `test -f 'drowmeana.c' || echo '$(srcdir)/'`drowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-drowmeana.Tpo $(DEPDIR)/libMean_la-drowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowmeana.c' object='libMean_la-drowmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-drowmeana.lo `test -f 'drowmeana.c' || echo '$(srcdir)/'`drowmeana.c + +libMean_la-dcolumnmeana.lo: dcolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-dcolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-dcolumnmeana.Tpo -c -o libMean_la-dcolumnmeana.lo `test -f 'dcolumnmeana.c' || echo '$(srcdir)/'`dcolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-dcolumnmeana.Tpo $(DEPDIR)/libMean_la-dcolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnmeana.c' object='libMean_la-dcolumnmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-dcolumnmeana.lo `test -f 'dcolumnmeana.c' || echo '$(srcdir)/'`dcolumnmeana.c + +libMean_la-cmeana.lo: cmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-cmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-cmeana.Tpo -c -o libMean_la-cmeana.lo `test -f 'cmeana.c' || echo '$(srcdir)/'`cmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-cmeana.Tpo $(DEPDIR)/libMean_la-cmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmeana.c' object='libMean_la-cmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-cmeana.lo `test -f 'cmeana.c' || echo '$(srcdir)/'`cmeana.c + +libMean_la-crowmeana.lo: crowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-crowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-crowmeana.Tpo -c -o libMean_la-crowmeana.lo `test -f 'crowmeana.c' || echo '$(srcdir)/'`crowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-crowmeana.Tpo $(DEPDIR)/libMean_la-crowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowmeana.c' object='libMean_la-crowmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-crowmeana.lo `test -f 'crowmeana.c' || echo '$(srcdir)/'`crowmeana.c + +libMean_la-ccolumnmeana.lo: ccolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-ccolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-ccolumnmeana.Tpo -c -o libMean_la-ccolumnmeana.lo `test -f 'ccolumnmeana.c' || echo '$(srcdir)/'`ccolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-ccolumnmeana.Tpo $(DEPDIR)/libMean_la-ccolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnmeana.c' object='libMean_la-ccolumnmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-ccolumnmeana.lo `test -f 'ccolumnmeana.c' || echo '$(srcdir)/'`ccolumnmeana.c + +libMean_la-zmeana.lo: zmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zmeana.Tpo -c -o libMean_la-zmeana.lo `test -f 'zmeana.c' || echo '$(srcdir)/'`zmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zmeana.Tpo $(DEPDIR)/libMean_la-zmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmeana.c' object='libMean_la-zmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zmeana.lo `test -f 'zmeana.c' || echo '$(srcdir)/'`zmeana.c + +libMean_la-zrowmeana.lo: zrowmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zrowmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zrowmeana.Tpo -c -o libMean_la-zrowmeana.lo `test -f 'zrowmeana.c' || echo '$(srcdir)/'`zrowmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zrowmeana.Tpo $(DEPDIR)/libMean_la-zrowmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowmeana.c' object='libMean_la-zrowmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zrowmeana.lo `test -f 'zrowmeana.c' || echo '$(srcdir)/'`zrowmeana.c + +libMean_la-zcolumnmeana.lo: zcolumnmeana.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -MT libMean_la-zcolumnmeana.lo -MD -MP -MF $(DEPDIR)/libMean_la-zcolumnmeana.Tpo -c -o libMean_la-zcolumnmeana.lo `test -f 'zcolumnmeana.c' || echo '$(srcdir)/'`zcolumnmeana.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMean_la-zcolumnmeana.Tpo $(DEPDIR)/libMean_la-zcolumnmeana.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnmeana.c' object='libMean_la-zcolumnmeana.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMean_la_CFLAGS) $(CFLAGS) -c -o libMean_la-zcolumnmeana.lo `test -f 'zcolumnmeana.c' || echo '$(srcdir)/'`zcolumnmeana.c + +testDoubleMean-testDoubleMean.o: testDoubleMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -MT testDoubleMean-testDoubleMean.o -MD -MP -MF $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo -c -o testDoubleMean-testDoubleMean.o `test -f 'testDoubleMean.c' || echo '$(srcdir)/'`testDoubleMean.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo $(DEPDIR)/testDoubleMean-testDoubleMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMean.c' object='testDoubleMean-testDoubleMean.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -c -o testDoubleMean-testDoubleMean.o `test -f 'testDoubleMean.c' || echo '$(srcdir)/'`testDoubleMean.c + +testDoubleMean-testDoubleMean.obj: testDoubleMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -MT testDoubleMean-testDoubleMean.obj -MD -MP -MF $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo -c -o testDoubleMean-testDoubleMean.obj `if test -f 'testDoubleMean.c'; then $(CYGPATH_W) 'testDoubleMean.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMean.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMean-testDoubleMean.Tpo $(DEPDIR)/testDoubleMean-testDoubleMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMean.c' object='testDoubleMean-testDoubleMean.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMean_CFLAGS) $(CFLAGS) -c -o testDoubleMean-testDoubleMean.obj `if test -f 'testDoubleMean.c'; then $(CYGPATH_W) 'testDoubleMean.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMean.c'; fi` + +testFloatMean-testFloatMean.o: testFloatMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -MT testFloatMean-testFloatMean.o -MD -MP -MF $(DEPDIR)/testFloatMean-testFloatMean.Tpo -c -o testFloatMean-testFloatMean.o `test -f 'testFloatMean.c' || echo '$(srcdir)/'`testFloatMean.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMean-testFloatMean.Tpo $(DEPDIR)/testFloatMean-testFloatMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMean.c' object='testFloatMean-testFloatMean.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -c -o testFloatMean-testFloatMean.o `test -f 'testFloatMean.c' || echo '$(srcdir)/'`testFloatMean.c + +testFloatMean-testFloatMean.obj: testFloatMean.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -MT testFloatMean-testFloatMean.obj -MD -MP -MF $(DEPDIR)/testFloatMean-testFloatMean.Tpo -c -o testFloatMean-testFloatMean.obj `if test -f 'testFloatMean.c'; then $(CYGPATH_W) 'testFloatMean.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMean.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMean-testFloatMean.Tpo $(DEPDIR)/testFloatMean-testFloatMean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMean.c' object='testFloatMean-testFloatMean.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMean_CFLAGS) $(CFLAGS) -c -o testFloatMean-testFloatMean.obj `if test -f 'testFloatMean.c'; then $(CYGPATH_W) 'testFloatMean.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMean.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c new file mode 100644 index 00000000..c0254c44 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/ccolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void ccolumnmeana(floatComplex *in, int lines, int columns, floatComplex *out) { + int i = 0; + + ccolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] = crdivs(out[i] , FloatComplex((float) columns, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/cmeana.c b/2.3-1/src/c/statisticsFunctions/mean/cmeana.c new file mode 100644 index 00000000..ad2a66fc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/cmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" + +floatComplex cmeana(floatComplex *in, int size) { + floatComplex accumulate = FloatComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = cadds(accumulate, in[i]); + } + return FloatComplex(creals(accumulate) / (float) size, cimags(accumulate) / (float) size); +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c new file mode 100644 index 00000000..0b073c41 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/crowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void crowmeana(floatComplex *in, int lines, int columns, floatComplex *out) { + int i = 0; + + crowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] = crdivs(out[i], FloatComplex((float)lines, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c new file mode 100644 index 00000000..90d7863b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/dcolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void dcolumnmeana(double *in, int lines, int columns, double *out) { + int i = 0; + + dcolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] /= (double) columns; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/dmeana.c b/2.3-1/src/c/statisticsFunctions/mean/dmeana.c new file mode 100644 index 00000000..db11766a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/dmeana.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" + +double dmeana(double *in, int size) { + double accumulate = 0.0; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate / (double) size; + +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c new file mode 100644 index 00000000..aec1b31a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/drowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void drowmeana(double *in, int lines, int columns, double *out) { + int i = 0; + + drowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] /= (double) lines; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c new file mode 100644 index 00000000..59985d5e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/scolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void scolumnmeana(float *in, int lines, int columns, float *out) { + int i = 0; + + scolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] /= (float) columns; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/smeana.c b/2.3-1/src/c/statisticsFunctions/mean/smeana.c new file mode 100644 index 00000000..f4b1cd10 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/smeana.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" + +float smeana(float *in, int size) { + float accumulate = 0.0f; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate / (float) size; + +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c new file mode 100644 index 00000000..3fb799f0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/srowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void srowmeana(float *in, int lines, int columns, float *out) { + int i = 0; + + srowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] /= (float) lines; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c b/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c new file mode 100644 index 00000000..b0eeffca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/testDoubleMean.c @@ -0,0 +1,498 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "mean.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dmeansTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + + printf("\n>>>> Mean Double Scalar Test\n"); + assert( ( fabs(dmeans(value1) ) - ( 3.0 ) ) / fabs ( dmeans(value1) ) < 3e-16 ); + assert( ( fabs(dmeans(value2) ) - ( 1.123456789 ) ) / fabs ( dmeans(value2) ) < 3e-16 ); + + return 0; +} + +static int dmeanaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double table2[5] = {9.186784563, + 9.186784563, + 9.186784563, + 9.186784563, + 9.186784563}; + + printf("\n>>>> Mean Double Array Test\n"); + assert( ( fabs(dmeana(table1, 3) ) - ( 9.0 / 3.0 ) ) / fabs ( dmeana(table1, 3) ) < 3e-16 ); + assert(( ( fabs(dmeana(table2, 5) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0) ) ) / fabs ( dmeana(table2, 5) ) < 3e-16 ); + return 0; +} + +static int dcolumnmeanaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double columnMeanmedTable1_3_3[3] = {0}; + double columnMeanmedTable1_1_9[1] = {0}; + double columnMeanmedTable1_9_1[9] = {0}; + double columnMeanmedTable2_2_5[2] = {0}; + double columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + dcolumnmeana(table1, 3, 3,columnMeanmedTable1_3_3); + assert( ( fabs(columnMeanmedTable1_3_3[0] ) - ( 6.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[1] ) - ( 15.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[2] ) - ( 24.0 / 3.0 ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + dcolumnmeana(table1, 1, 9,columnMeanmedTable1_1_9); + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 45.0 / 9.0 ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + dcolumnmeana(table1, 9, 1,columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + dcolumnmeana(table2, 2, 5,columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 25.0 / 5.0 ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 30.0 / 5.0 ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 3e-16 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + dcolumnmeana(table2, 5, 2,columnMeanmedTable2_5_2); + assert( ( fabs(columnMeanmedTable2_5_2[0] ) - ( 7.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[1] ) - ( 9.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[2] ) - ( 11.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[3] ) - ( 13.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[4] ) - ( 15.0 / 2.0 ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 3e-16 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int drowmeanaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double rowMeanmedTable1_3_3[3] = {0}; + double rowMeanmedTable1_1_9[9] = {0}; + double rowMeanmedTable1_9_1[1] = {0}; + double rowMeanmedTable2_2_5[5] = {0}; + double rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + drowmeana(table1, 3, 3,rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( ( fabs(rowMeanmedTable1_3_3[0] ) - ( 12.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[1] ) - ( 15.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[2] ) - ( 18.0 / 3.0 ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowmeana(table1, 1, 9,rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + drowmeana(table1, 9, 1,rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 45.0 / 9.0 ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 3e-16 ); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + drowmeana(table2, 2, 5,rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( ( fabs(rowMeanmedTable2_2_5[0] ) - ( 3.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[1] ) - ( 7.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[2] ) - ( 11.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[3] ) - ( 15.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[4] ) - ( 19.0 / 2.0 ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 3e-16 ); + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + drowmeana(table2, 5, 2,rowMeanmedTable2_5_2); + assert( ( fabs(rowMeanmedTable2_5_2[0] ) - ( 15.0 / 5.0 ) ) / fabs ( rowMeanmedTable2_5_2[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_5_2[1] ) - ( 40.0 / 5.0 ) ) / fabs ( rowMeanmedTable2_5_2[1] ) < 3e-16 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedTable2_5_2[%d] = %e\n", i, rowMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int zmeansTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + + printf("\n>>>> Mean Double Complex Scalar Test\n"); + assert( ( fabs(zreals(zmeans(value1)) ) - ( 3.0 ) ) / fabs ( zreals(zmeans(value1)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeans(value1)) ) - ( 3.0 ) ) / fabs ( zimags(zmeans(value1)) ) < 3e-16 ); + assert( ( fabs(zreals(zmeans(value2)) ) - ( 1.123456789 ) ) / fabs ( zreals(zmeans(value2)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeans(value2)) ) - ( 1.123456789 ) ) / fabs ( zimags(zmeans(value2)) ) < 3e-16 ); + return 0; +} + +static int zmeanaTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex table1[3]; + doubleComplex value2 = DoubleComplex(9.186784563,9.186784563); + doubleComplex table2[5]; + + printf("\n>>>> Mean Double Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", zimags(zmeana(table1, 3))); + printf("%e\n", zreals(zmeana(table2, 5))); + printf("%e\n", zimags(zmeana(table2, 5))); + printf("%e\n", zreals(zmeana(table2, 5))); + printf("%e\n", zimags(zmeana(table2, 5))); + printf("--------\n"); +#endif + assert( ( fabs(zreals(zmeana(table1, 3)) ) - ( 9.0 / 3.0 ) ) / fabs ( zreals(zmeana(table1, 3)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeana(table1, 3)) ) - ( 9.0 / 3.0 ) ) / fabs ( zimags(zmeana(table1, 3)) ) < 3e-16 ); + assert( ( fabs(zreals(zmeana(table2, 5)) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0 ) ) / fabs ( zreals(zmeana(table2, 5)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeana(table2, 5)) ) - ( (9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563) / 5.0 ) ) / fabs ( zimags(zmeana(table2, 5)) ) < 3e-16 ); + + return 0; +} + +static int zrowmeanaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex rowMeanmedIn_4_3[3]; + doubleComplex rowMeanmedIn_3_4[4]; + doubleComplex rowMeanmedIn_6_2[2]; + doubleComplex rowMeanmedIn_2_6[6]; + doubleComplex rowMeanmedIn_1_12[12]; + doubleComplex rowMeanmedIn_12_1[1]; + + printf("\n>>>> Row Mean Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zrowmeana(in, 4, 3, rowMeanmedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedIn_4_3[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_4_3[i]), zimags(rowMeanmedIn_4_3[i])); + } + assert(fabs(zreals(rowMeanmedIn_4_3[0]) - 0.6 / 4.0) < 1e-16); + assert( ( fabs(zimags(rowMeanmedIn_4_3[0]) ) - ( 3.8 / 4.0 ) ) / fabs ( zimags(rowMeanmedIn_4_3[0]) ) < 3e-16 ); + assert( ( fabs(zreals(rowMeanmedIn_4_3[1]) ) - ( 2.2 / 4.0 ) ) / fabs ( zreals(rowMeanmedIn_4_3[1]) ) < 3e-16 ); + assert(fabs(zimags(rowMeanmedIn_4_3[1]) - 2.2 / 4.0) < 3e-16); + assert(fabs(zreals(rowMeanmedIn_4_3[2]) - 3.8 / 4.0) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_4_3[2]) ) - ( 0.6 / 4.0 ) ) / fabs ( zimags(rowMeanmedIn_4_3[2]) ) < 3e-16 ); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zrowmeana(in, 3, 4, rowMeanmedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowMeanmedIn_3_4[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_3_4[i]), zimags(rowMeanmedIn_3_4[i])); + } + assert(fabs(zreals(rowMeanmedIn_3_4[0]) - 0.3 / 3.0) < 1e-16); + assert( ( fabs(zimags(rowMeanmedIn_3_4[0]) ) - ( 3.0 / 3.0 ) ) / fabs ( zimags(rowMeanmedIn_3_4[0]) ) < 3e-16 ); + assert(zreals(rowMeanmedIn_3_4[1]) == 1.2 / 3.0 && zimags(rowMeanmedIn_3_4[1]) == 2.1 / 3.0); + assert(fabs(zreals(rowMeanmedIn_3_4[2]) - 2.1 / 3.0) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_3_4[2]) ) - ( 1.2 / 3.0 ) ) / fabs ( zimags(rowMeanmedIn_3_4[2]) ) < 3e-16 ); + assert( ( fabs(zreals(rowMeanmedIn_3_4[3]) ) - ( 3.0 / 3.0 ) ) / fabs ( zreals(rowMeanmedIn_3_4[3]) ) < 3e-16 ); + assert(fabs(zimags(rowMeanmedIn_3_4[3]) - 0.3 / 3.0) < 1e-16); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zrowmeana(in, 6, 2, rowMeanmedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedIn_6_2[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_6_2[i]), zimags(rowMeanmedIn_6_2[i])); + } + assert(zreals(rowMeanmedIn_6_2[0]) == 1.5 / 6.0 && zimags(rowMeanmedIn_6_2[0]) == 5.1 / 6.0); + assert(zreals(rowMeanmedIn_6_2[1]) == 5.1 / 6.0 && zimags(rowMeanmedIn_6_2[1]) == 1.5 / 6.0); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + zrowmeana(in, 2, 6, rowMeanmedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowMeanmedIn_2_6[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_2_6[i]), zimags(rowMeanmedIn_2_6[i])); + } + assert(zreals(rowMeanmedIn_2_6[0]) == 0.1 / 2.0 && zimags(rowMeanmedIn_2_6[0]) == 2.1 / 2.0); + assert( ( fabs(zreals(rowMeanmedIn_2_6[1]) ) - ( 0.5 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[1])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[1]) ) - ( 1.7 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[1])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[2]) ) - ( 0.9 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[2])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[2]) ) - ( 1.3 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[2])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[3]) ) - ( 1.3 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[3])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[3]) ) - ( 0.9 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[3])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[4]) ) - ( 1.7 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[4])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[4]) ) - ( 0.5 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[4])) < 3e-16); + assert( ( fabs(zreals(rowMeanmedIn_2_6[5]) ) - ( 2.1 / 2.0 ) ) / fabs(zreals(rowMeanmedIn_2_6[5])) < 3e-16); + assert( ( fabs(zimags(rowMeanmedIn_2_6[5]) ) - ( 0.1 / 2.0 ) ) / fabs(zimags(rowMeanmedIn_2_6[5])) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + zrowmeana(in, 1, 12, rowMeanmedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowMeanmedIn_1_12[%d] = %e + %ei\n", i, zreals(rowMeanmedIn_1_12[i]), zimags(rowMeanmedIn_1_12[i])); + assert(zreals(rowMeanmedIn_1_12[i]) == zreals(in[i]) && zimags(rowMeanmedIn_1_12[i]) == zimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zrowmeana(in, 12, 1, rowMeanmedIn_12_1); + printf("rowMeanmedIn_12_1[%d] = %e + %ei\n", 0, zreals(rowMeanmedIn_12_1[0]), zimags(rowMeanmedIn_12_1[0])); + assert(zreals(rowMeanmedIn_12_1[0]) == 6.6 / 12.0 && zimags(rowMeanmedIn_12_1[0]) == 6.6 / 12.0); + + return 0; +} + +static int zcolumnmeanaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex columnMeanmedIn_4_3[4]; + doubleComplex columnMeanmedIn_3_4[3]; + doubleComplex columnMeanmedIn_6_2[6]; + doubleComplex columnMeanmedIn_2_6[2]; + doubleComplex columnMeanmedIn_1_12[1]; + doubleComplex columnMeanmedIn_12_1[12]; + + printf("\n>>>> ColumnMean Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zcolumnmeana(in, 4, 3, columnMeanmedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnMeanmedIn_4_3[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_4_3[i]), zimags(columnMeanmedIn_4_3[i])); + } + assert(fabs(zreals(columnMeanmedIn_4_3[0]) - 1.2 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[0]) - 2.1 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[1]) - 1.5 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[1]) - 1.8 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[2]) - 1.8 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[2]) - 1.5 / 3.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_4_3[3]) - 2.1 / 3.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_4_3[3]) - 1.2 / 3.0) < 3e-16); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zcolumnmeana(in, 3, 4, columnMeanmedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnMeanmedIn_3_4[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_3_4[i]), zimags(columnMeanmedIn_3_4[i])); + } + assert(fabs(zreals(columnMeanmedIn_3_4[0]) - 1.8 / 4.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_3_4[0]) - 2.6 / 4.0) < 3e-16); + assert(zreals(columnMeanmedIn_3_4[1]) == 2.2 / 4.0 && zimags(columnMeanmedIn_3_4[1]) == 2.2 / 4.0); + assert(zreals(columnMeanmedIn_3_4[2]) == 2.6 / 4.0 && zimags(columnMeanmedIn_3_4[2]) == 1.8 / 4.0); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zcolumnmeana(in, 6, 2, columnMeanmedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnMeanmedIn_6_2[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_6_2[i]), zimags(columnMeanmedIn_6_2[i])); + } + assert(zreals(columnMeanmedIn_6_2[0]) == 0.6 / 2.0 && zimags(columnMeanmedIn_6_2[0]) == 1.6 / 2.0); + assert(fabs(zreals(columnMeanmedIn_6_2[1]) - 0.8 / 2.0) < 3e-16); + assert(zimags(columnMeanmedIn_6_2[1]) == 1.4 / 2.0); + assert(zreals(columnMeanmedIn_6_2[2]) == 1.0 / 2.0 && zimags(columnMeanmedIn_6_2[2]) == 1.2 / 2.0); + assert(zreals(columnMeanmedIn_6_2[3]) == 1.2 / 2.0 && zimags(columnMeanmedIn_6_2[3]) == 1.0 / 2.0); + assert(zreals(columnMeanmedIn_6_2[4]) == 1.4 / 2.0); + assert(fabs(zimags(columnMeanmedIn_6_2[4]) - 0.8 / 2.0) < 3e-16); + assert(zreals(columnMeanmedIn_6_2[5]) == 1.6 / 2.0 && zimags(columnMeanmedIn_6_2[5]) == 0.6 / 2.0); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + zcolumnmeana(in, 2, 6, columnMeanmedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedIn_2_6[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_2_6[i]), zimags(columnMeanmedIn_2_6[i])); + } + assert(fabs(zreals(columnMeanmedIn_2_6[0]) - 3.0 / 6.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_2_6[0]) - 3.6 / 6.0) < 3e-16); + assert(fabs(zreals(columnMeanmedIn_2_6[1]) - 3.6 / 6.0) < 3e-16); + assert(fabs(zimags(columnMeanmedIn_2_6[1]) - 3.0 / 6.0) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + zcolumnmeana(in, 1, 12, columnMeanmedIn_1_12); + printf("columnMeanmedIn_1_12[%d] = %e + %ei\n", 0, zreals(columnMeanmedIn_1_12[0]), zimags(columnMeanmedIn_1_12[0])); + assert(zreals(columnMeanmedIn_1_12[0]) == 6.6 / 12.0 && zimags(columnMeanmedIn_1_12[0]) == 6.6 / 12.0); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zcolumnmeana(in, 12, 1, columnMeanmedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnMeanmedIn_12_1[%d] = %e + %ei\n", i, zreals(columnMeanmedIn_12_1[i]), zimags(columnMeanmedIn_12_1[i])); + assert(zreals(columnMeanmedIn_12_1[i]) == zreals(in[i]) && zimags(columnMeanmedIn_12_1[i]) == zimags(in[i])); + } + + return 0; +} + +static int testMean(void) { + + dmeansTest(); + dmeanaTest(); + drowmeanaTest(); + dcolumnmeanaTest(); + zmeansTest(); + zmeanaTest(); + zrowmeanaTest(); + zcolumnmeanaTest(); + + return 0; +} + +int main(void) { + assert(testMean() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c b/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c new file mode 100644 index 00000000..e5c6d9d8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/testFloatMean.c @@ -0,0 +1,481 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "mean.h" + +/* #define LOCAL_DEBUG */ + +static int smeansTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + + printf("\n>>>> Mean Float Scalar Test\n"); + assert(smeans(value1) == 3.0f); + assert(smeans(value2) == 1.123456789f); + + return 0; +} + +static int smeanaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float table2[5] = {9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f}; + + printf("\n>>>> Mean Float Array Test\n"); + assert(smeana(table1, 3) == 9.0f / 3.0f); + assert((smeana(table2, 5) - (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f) / smeana(table2, 5) < 1e-6); + return 0; +} + +static int scolumnmeanaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float columnMeanmedTable1_3_3[3] = {0}; + float columnMeanmedTable1_1_9[1] = {0}; + float columnMeanmedTable1_9_1[9] = {0}; + float columnMeanmedTable2_2_5[2] = {0}; + float columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + scolumnmeana(table1, 3, 3,columnMeanmedTable1_3_3); + assert(columnMeanmedTable1_3_3[0] == 6.0f / 3.0f); + assert(columnMeanmedTable1_3_3[1] == 15.0f / 3.0f); + assert(columnMeanmedTable1_3_3[2] == 24.0f / 3.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + scolumnmeana(table1, 1, 9,columnMeanmedTable1_1_9); + assert(columnMeanmedTable1_1_9[0] == 45.0f / 9.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + scolumnmeana(table1, 9, 1,columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + scolumnmeana(table2, 2, 5,columnMeanmedTable2_2_5); + assert(columnMeanmedTable2_2_5[0] == 25.0f / 5.0f); + assert(columnMeanmedTable2_2_5[1] == 30.0f / 5.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + scolumnmeana(table2, 5, 2,columnMeanmedTable2_5_2); + assert(columnMeanmedTable2_5_2[0] == 7.0f / 2.0f); + assert(columnMeanmedTable2_5_2[1] == 9.0f / 2.0f); + assert(columnMeanmedTable2_5_2[2] == 11.0f / 2.0f); + assert(columnMeanmedTable2_5_2[3] == 13.0f / 2.0f); + assert(columnMeanmedTable2_5_2[4] == 15.0f / 2.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int srowmeanaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float rowMeanmedTable1_3_3[3] = {0}; + float rowMeanmedTable1_1_9[9] = {0}; + float rowMeanmedTable1_9_1[1] = {0}; + float rowMeanmedTable2_2_5[5] = {0}; + float rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + srowmeana(table1, 3, 3,rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert(rowMeanmedTable1_3_3[0] == 12.0f / 3.0f); + assert(rowMeanmedTable1_3_3[1] == 15.0f / 3.0f); + assert(rowMeanmedTable1_3_3[2] == 18.0f / 3.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowmeana(table1, 1, 9,rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + srowmeana(table1, 9, 1,rowMeanmedTable1_9_1); + assert(rowMeanmedTable1_9_1[0] == 45.0f / 9.0f); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + srowmeana(table2, 2, 5,rowMeanmedTable2_2_5); + assert(rowMeanmedTable2_2_5[0] == 3.0f / 2.0f); + assert(rowMeanmedTable2_2_5[1] == 7.0f / 2.0f); + assert(rowMeanmedTable2_2_5[2] == 11.0f / 2.0f); + assert(rowMeanmedTable2_2_5[3] == 15.0f / 2.0f); + assert(rowMeanmedTable2_2_5[4] == 19.0f / 2.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + srowmeana(table2, 5, 2,rowMeanmedTable2_5_2); + assert(rowMeanmedTable2_5_2[0] == 15.0f / 5.0f); + assert(rowMeanmedTable2_5_2[1] == 40.0f / 5.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedTable2_5_2[%d] = %e\n", i, rowMeanmedTable2_5_2[i]); + } + + return 0; +} + +static int cmeansTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex value2 = FloatComplex(1.123456789f, 1.123456789f); + + printf("\n>>>> Mean Float Complex Scalar Test\n"); + assert(creals(cmeans(value1)) == 3.0f); + assert(cimags(cmeans(value1)) == 3.0f); + assert(creals(cmeans(value2)) == 1.123456789f); + assert(cimags(cmeans(value2)) == 1.123456789f); + return 0; +} + +static int cmeanaTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex table1[3]; + floatComplex value2 = FloatComplex(9.186784563f,9.186784563f); + floatComplex table2[5]; + + printf("\n>>>> Mean Float Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", cimags(cmeana(table1, 3))); + printf("%e\n", creals(cmeana(table2, 5))); + printf("%e\n", cimags(cmeana(table2, 5))); + printf("%e\n", creals(cmeana(table2, 5))); + printf("%e\n", cimags(cmeana(table2, 5))); + printf("--------\n"); +#endif + assert(creals(cmeana(table1, 3)) == 9.0f / 3.0f); + assert(cimags(cmeana(table1, 3)) == 9.0f / 3.0f); + assert(creals(cmeana(table2, 5)) == (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f); + assert(cimags(cmeana(table2, 5)) == (9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f) / 5.0f); + + return 0; +} + +static int crowmeanaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex rowMeanmedIn_4_3[3]; + floatComplex rowMeanmedIn_3_4[4]; + floatComplex rowMeanmedIn_6_2[2]; + floatComplex rowMeanmedIn_2_6[6]; + floatComplex rowMeanmedIn_1_12[12]; + floatComplex rowMeanmedIn_12_1[1]; + + printf("\n>>>> Row Mean Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + crowmeana(in, 4, 3, rowMeanmedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedIn_4_3[%d] = %e + %ei\n", i, creals(rowMeanmedIn_4_3[i]), cimags(rowMeanmedIn_4_3[i])); + } + assert(creals(rowMeanmedIn_4_3[0]) == 0.6f / 4.0f && cimags(rowMeanmedIn_4_3[0]) == 3.8f / 4.0f); + assert(creals(rowMeanmedIn_4_3[1]) == 2.2f / 4.0f && cimags(rowMeanmedIn_4_3[1]) == 2.2f / 4.0f); + assert(fabs(creals(rowMeanmedIn_4_3[2]) - 3.8f / 4.0f) < 1e-06); + assert(cimags(rowMeanmedIn_4_3[2]) == 0.6f / 4.0f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + crowmeana(in, 3, 4, rowMeanmedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowMeanmedIn_3_4[%d] = %e + %ei\n", i, creals(rowMeanmedIn_3_4[i]), cimags(rowMeanmedIn_3_4[i])); + } + assert(creals(rowMeanmedIn_3_4[0]) == 0.3f / 3.0f && cimags(rowMeanmedIn_3_4[0]) == 3.0f / 3.0f); + assert(creals(rowMeanmedIn_3_4[1]) == 1.2f / 3.0f && cimags(rowMeanmedIn_3_4[1]) == 2.1f / 3.0f); + assert(creals(rowMeanmedIn_3_4[2]) == 2.1f / 3.0f && cimags(rowMeanmedIn_3_4[2]) == 1.2f / 3.0f); + assert(creals(rowMeanmedIn_3_4[3]) == 3.0f / 3.0f && cimags(rowMeanmedIn_3_4[3]) == 0.3f / 3.0f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + crowmeana(in, 6, 2, rowMeanmedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowMeanmedIn_6_2[%d] = %e + %ei\n", i, creals(rowMeanmedIn_6_2[i]), cimags(rowMeanmedIn_6_2[i])); + } + assert(creals(rowMeanmedIn_6_2[0]) == 1.5f / 6.0f && cimags(rowMeanmedIn_6_2[0]) == 5.1f / 6.0f); + assert(creals(rowMeanmedIn_6_2[1]) == 5.1f / 6.0f); + assert(fabs(cimags(rowMeanmedIn_6_2[1]) - 1.5f / 6.0f) < 1e-06); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + crowmeana(in, 2, 6, rowMeanmedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowMeanmedIn_2_6[%d] = %e + %ei\n", i, creals(rowMeanmedIn_2_6[i]), cimags(rowMeanmedIn_2_6[i])); + } + assert(creals(rowMeanmedIn_2_6[0]) == 0.1f / 2.0f && cimags(rowMeanmedIn_2_6[0]) == 2.1f / 2.0f); + assert(creals(rowMeanmedIn_2_6[1]) == 0.5f / 2.0f && cimags(rowMeanmedIn_2_6[1]) == 1.7f / 2.0f); + assert(creals(rowMeanmedIn_2_6[2]) == 0.9f / 2.0f && cimags(rowMeanmedIn_2_6[2]) == 1.3f / 2.0f); + assert(creals(rowMeanmedIn_2_6[3]) == 1.3f / 2.0f && cimags(rowMeanmedIn_2_6[3]) == 0.9f / 2.0f); + assert(creals(rowMeanmedIn_2_6[4]) == 1.7f / 2.0f && cimags(rowMeanmedIn_2_6[4]) == 0.5f / 2.0f); + assert(creals(rowMeanmedIn_2_6[5]) == 2.1f / 2.0f && cimags(rowMeanmedIn_2_6[5]) == 0.1f / 2.0f); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + crowmeana(in, 1, 12, rowMeanmedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowMeanmedIn_1_12[%d] = %e + %ei\n", i, creals(rowMeanmedIn_1_12[i]), cimags(rowMeanmedIn_1_12[i])); + assert(creals(rowMeanmedIn_1_12[i]) == creals(in[i]) && cimags(rowMeanmedIn_1_12[i]) == cimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + crowmeana(in, 12, 1, rowMeanmedIn_12_1); + printf("rowMeanmedIn_12_1[%d] = %e + %ei\n", 0, creals(rowMeanmedIn_12_1[0]), cimags(rowMeanmedIn_12_1[0])); + assert(creals(rowMeanmedIn_12_1[0]) == 6.6f / 12.0f && cimags(rowMeanmedIn_12_1[0]) == 6.6f / 12.0f); + + return 0; +} + +static int ccolumnmeanaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex columnMeanmedIn_4_3[4]; + floatComplex columnMeanmedIn_3_4[3]; + floatComplex columnMeanmedIn_6_2[6]; + floatComplex columnMeanmedIn_2_6[2]; + floatComplex columnMeanmedIn_1_12[1]; + floatComplex columnMeanmedIn_12_1[12]; + + printf("\n>>>> ColumnMean Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + ccolumnmeana(in, 4, 3, columnMeanmedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnMeanmedIn_4_3[%d] = %e + %ei\n", i, creals(columnMeanmedIn_4_3[i]), cimags(columnMeanmedIn_4_3[i])); + } + assert(creals(columnMeanmedIn_4_3[0]) == 1.2f / 3.0f && cimags(columnMeanmedIn_4_3[0]) == 2.1f / 3.0f); + assert(creals(columnMeanmedIn_4_3[1]) == 1.5f / 3.0f); + assert(fabs(cimags(columnMeanmedIn_4_3[1]) - 1.8f / 3.0f) < 1e-06); + assert(creals(columnMeanmedIn_4_3[2]) == 1.8f / 3.0f && cimags(columnMeanmedIn_4_3[2]) == 1.5f / 3.0f); + assert(creals(columnMeanmedIn_4_3[3]) == 2.1f / 3.0f && cimags(columnMeanmedIn_4_3[3]) == 1.2f / 3.0f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + ccolumnmeana(in, 3, 4, columnMeanmedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnMeanmedIn_3_4[%d] = %e + %ei\n", i, creals(columnMeanmedIn_3_4[i]), cimags(columnMeanmedIn_3_4[i])); + } + assert(creals(columnMeanmedIn_3_4[0]) == 1.8f / 4.0f); + assert(fabs(cimags(columnMeanmedIn_3_4[0]) - 2.6f / 4.0f) < 1e-06); + assert(creals(columnMeanmedIn_3_4[1]) == 2.2f / 4.0f && cimags(columnMeanmedIn_3_4[1]) == 2.2f / 4.0f); + assert(creals(columnMeanmedIn_3_4[2]) == 2.6f / 4.0f && cimags(columnMeanmedIn_3_4[2]) == 1.8f / 4.0f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + ccolumnmeana(in, 6, 2, columnMeanmedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnMeanmedIn_6_2[%d] = %e + %ei\n", i, creals(columnMeanmedIn_6_2[i]), cimags(columnMeanmedIn_6_2[i])); + } + assert(creals(columnMeanmedIn_6_2[0]) == 0.6f / 2.0f && cimags(columnMeanmedIn_6_2[0]) == 1.6f / 2.0f); + assert(creals(columnMeanmedIn_6_2[1]) == 0.8f / 2.0f && cimags(columnMeanmedIn_6_2[1]) == 1.4f / 2.0f); + assert(creals(columnMeanmedIn_6_2[2]) == 1.0f / 2.0f && cimags(columnMeanmedIn_6_2[2]) == 1.2f / 2.0f); + assert(creals(columnMeanmedIn_6_2[3]) == 1.2f / 2.0f && cimags(columnMeanmedIn_6_2[3]) == 1.0f / 2.0f); + assert(creals(columnMeanmedIn_6_2[4]) == 1.4f / 2.0f && cimags(columnMeanmedIn_6_2[4]) == 0.8f / 2.0f); + assert(creals(columnMeanmedIn_6_2[5]) == 1.6f / 2.0f && cimags(columnMeanmedIn_6_2[5]) == 0.6f / 2.0f); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + ccolumnmeana(in, 2, 6, columnMeanmedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedIn_2_6[%d] = %e + %ei\n", i, creals(columnMeanmedIn_2_6[i]), cimags(columnMeanmedIn_2_6[i])); + } + assert(creals(columnMeanmedIn_2_6[0]) == 3.0f / 6.0f && cimags(columnMeanmedIn_2_6[0]) == 3.6f / 6.0f); + assert(creals(columnMeanmedIn_2_6[1]) == 3.6f / 6.0f); + assert(fabs(cimags(columnMeanmedIn_2_6[1]) -3.0f / 6.0f) < 1e-06); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + ccolumnmeana(in, 1, 12, columnMeanmedIn_1_12); + printf("columnMeanmedIn_1_12[%d] = %e + %ei\n", 0, creals(columnMeanmedIn_1_12[0]), cimags(columnMeanmedIn_1_12[0])); + assert(creals(columnMeanmedIn_1_12[0]) == 6.6f / 12.0f && cimags(columnMeanmedIn_1_12[0]) == 6.6f / 12.0f); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + ccolumnmeana(in, 12, 1, columnMeanmedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnMeanmedIn_12_1[%d] = %e + %ei\n", i, creals(columnMeanmedIn_12_1[i]), cimags(columnMeanmedIn_12_1[i])); + assert(creals(columnMeanmedIn_12_1[i]) == creals(in[i]) && cimags(columnMeanmedIn_12_1[i]) == cimags(in[i])); + } + + return 0; +} + +static int testMean(void) { + + smeansTest(); + smeanaTest(); + srowmeanaTest(); + scolumnmeanaTest(); + cmeansTest(); + cmeanaTest(); + crowmeanaTest(); + ccolumnmeanaTest(); + + return 0; +} + +int main(void) { + assert(testMean() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj new file mode 100644 index 00000000..161eef21 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3C4D1EB3-7D2A-4AAE-9B4C-3A0C18CBA156} + testDoubleMean + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters new file mode 100644 index 00000000..fba0c339 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_DoubleMean/testDoubleMean.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj new file mode 100644 index 00000000..b4c331c4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {ACF6BDB6-C931-400D-A1ED-0B053A19F7EE} + testFloatMean + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters new file mode 100644 index 00000000..91061adc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/test_FloatMean/testFloatMean.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c new file mode 100644 index 00000000..8cc38fc7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zcolumnmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void zcolumnmeana(doubleComplex *in, int lines, int columns, doubleComplex *out) { + int i = 0; + + zcolumnsuma(in, lines, columns, out); + for (i = 0; i < lines; ++i) + { + out[i] = zrdivs(out[i] , DoubleComplex((double) columns, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/zmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zmeana.c new file mode 100644 index 00000000..aae80ffc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" + +doubleComplex zmeana(doubleComplex *in, int size) { + doubleComplex accumulate = DoubleComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = zadds(accumulate, in[i]); + } + return DoubleComplex(zreals(accumulate) / (double) size, zimags(accumulate) / (double) size); +} diff --git a/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c b/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c new file mode 100644 index 00000000..8e19bf9e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/mean/zrowmeana.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "mean.h" +#include "sum.h" + +void zrowmeana(doubleComplex *in, int lines, int columns, doubleComplex *out) { + int i = 0; + + zrowsuma(in, lines, columns, out); + for (i = 0; i < columns; ++i) + { + out[i] = zrdivs(out[i], DoubleComplex((double)lines, 0.0f)); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/Makefile.am b/2.3-1/src/c/statisticsFunctions/meanf/Makefile.am new file mode 100644 index 00000000..789caac8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/Makefile.am @@ -0,0 +1,74 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMeanf_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMeanf.la + +libMeanf_la_SOURCES = $(HEAD) $(SRC) + +SRC = smeanfa.c \ + srowmeanfa.c \ + scolumnmeanfa.c \ + dmeanfa.c \ + drowmeanfa.c \ + dcolumnmeanfa.c \ + cmeanfa.c \ + crowmeanfa.c \ + ccolumnmeanfa.c \ + zmeanfa.c \ + zrowmeanfa.c \ + zcolumnmeanfa.c \ + cmeanfcs.c \ + cmeanfsc.c \ + zmeanfdz.c \ + zmeanfzd.c + +HEAD = ../includes/meanf.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatMeanf testDoubleMeanf + +TESTS = testFloatMeanf testDoubleMeanf + +# +# -*- Meanf Tests -*- +# +testFloatMeanf_SOURCES = testFloatMeanf.c +testFloatMeanf_CFLAGS = $(check_INCLUDES) +testFloatMeanf_LDADD = $(check_LDADD) + +testDoubleMeanf_SOURCES =testDoubleMeanf.c +testDoubleMeanf_CFLAGS = $(check_INCLUDES) +testDoubleMeanf_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/meanf/Makefile.in b/2.3-1/src/c/statisticsFunctions/meanf/Makefile.in new file mode 100644 index 00000000..97e65efc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/Makefile.in @@ -0,0 +1,879 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMeanf$(EXEEXT) testDoubleMeanf$(EXEEXT) +TESTS = testFloatMeanf$(EXEEXT) testDoubleMeanf$(EXEEXT) +subdir = src/c/statisticsFunctions/meanf +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMeanf_la_LIBADD = +am__objects_1 = +am__objects_2 = libMeanf_la-smeanfa.lo libMeanf_la-srowmeanfa.lo \ + libMeanf_la-scolumnmeanfa.lo libMeanf_la-dmeanfa.lo \ + libMeanf_la-drowmeanfa.lo libMeanf_la-dcolumnmeanfa.lo \ + libMeanf_la-cmeanfa.lo libMeanf_la-crowmeanfa.lo \ + libMeanf_la-ccolumnmeanfa.lo libMeanf_la-zmeanfa.lo \ + libMeanf_la-zrowmeanfa.lo libMeanf_la-zcolumnmeanfa.lo \ + libMeanf_la-cmeanfcs.lo libMeanf_la-cmeanfsc.lo \ + libMeanf_la-zmeanfdz.lo libMeanf_la-zmeanfzd.lo +am_libMeanf_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libMeanf_la_OBJECTS = $(am_libMeanf_la_OBJECTS) +libMeanf_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMeanf_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMeanf_OBJECTS = \ + testDoubleMeanf-testDoubleMeanf.$(OBJEXT) +testDoubleMeanf_OBJECTS = $(am_testDoubleMeanf_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la +testDoubleMeanf_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleMeanf_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleMeanf_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMeanf_OBJECTS = testFloatMeanf-testFloatMeanf.$(OBJEXT) +testFloatMeanf_OBJECTS = $(am_testFloatMeanf_OBJECTS) +testFloatMeanf_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatMeanf_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatMeanf_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMeanf_la_SOURCES) $(testDoubleMeanf_SOURCES) \ + $(testFloatMeanf_SOURCES) +DIST_SOURCES = $(libMeanf_la_SOURCES) $(testDoubleMeanf_SOURCES) \ + $(testFloatMeanf_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMeanf_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMeanf.la +libMeanf_la_SOURCES = $(HEAD) $(SRC) +SRC = smeanfa.c \ + srowmeanfa.c \ + scolumnmeanfa.c \ + dmeanfa.c \ + drowmeanfa.c \ + dcolumnmeanfa.c \ + cmeanfa.c \ + crowmeanfa.c \ + ccolumnmeanfa.c \ + zmeanfa.c \ + zrowmeanfa.c \ + zcolumnmeanfa.c \ + cmeanfcs.c \ + cmeanfsc.c \ + zmeanfdz.c \ + zmeanfzd.c + +HEAD = ../includes/meanf.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + + +# +# -*- Meanf Tests -*- +# +testFloatMeanf_SOURCES = testFloatMeanf.c +testFloatMeanf_CFLAGS = $(check_INCLUDES) +testFloatMeanf_LDADD = $(check_LDADD) +testDoubleMeanf_SOURCES = testDoubleMeanf.c +testDoubleMeanf_CFLAGS = $(check_INCLUDES) +testDoubleMeanf_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/meanf/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/meanf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMeanf.la: $(libMeanf_la_OBJECTS) $(libMeanf_la_DEPENDENCIES) + $(libMeanf_la_LINK) -rpath $(pkglibdir) $(libMeanf_la_OBJECTS) $(libMeanf_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMeanf$(EXEEXT): $(testDoubleMeanf_OBJECTS) $(testDoubleMeanf_DEPENDENCIES) + @rm -f testDoubleMeanf$(EXEEXT) + $(testDoubleMeanf_LINK) $(testDoubleMeanf_OBJECTS) $(testDoubleMeanf_LDADD) $(LIBS) +testFloatMeanf$(EXEEXT): $(testFloatMeanf_OBJECTS) $(testFloatMeanf_DEPENDENCIES) + @rm -f testFloatMeanf$(EXEEXT) + $(testFloatMeanf_LINK) $(testFloatMeanf_OBJECTS) $(testFloatMeanf_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-ccolumnmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-cmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-cmeanfcs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-cmeanfsc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-crowmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-dcolumnmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-dmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-drowmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-scolumnmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-smeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-srowmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-zcolumnmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-zmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-zmeanfdz.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-zmeanfzd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMeanf_la-zrowmeanfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMeanf-testFloatMeanf.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMeanf_la-smeanfa.lo: smeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-smeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-smeanfa.Tpo -c -o libMeanf_la-smeanfa.lo `test -f 'smeanfa.c' || echo '$(srcdir)/'`smeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-smeanfa.Tpo $(DEPDIR)/libMeanf_la-smeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smeanfa.c' object='libMeanf_la-smeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-smeanfa.lo `test -f 'smeanfa.c' || echo '$(srcdir)/'`smeanfa.c + +libMeanf_la-srowmeanfa.lo: srowmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-srowmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-srowmeanfa.Tpo -c -o libMeanf_la-srowmeanfa.lo `test -f 'srowmeanfa.c' || echo '$(srcdir)/'`srowmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-srowmeanfa.Tpo $(DEPDIR)/libMeanf_la-srowmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowmeanfa.c' object='libMeanf_la-srowmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-srowmeanfa.lo `test -f 'srowmeanfa.c' || echo '$(srcdir)/'`srowmeanfa.c + +libMeanf_la-scolumnmeanfa.lo: scolumnmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-scolumnmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-scolumnmeanfa.Tpo -c -o libMeanf_la-scolumnmeanfa.lo `test -f 'scolumnmeanfa.c' || echo '$(srcdir)/'`scolumnmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-scolumnmeanfa.Tpo $(DEPDIR)/libMeanf_la-scolumnmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnmeanfa.c' object='libMeanf_la-scolumnmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-scolumnmeanfa.lo `test -f 'scolumnmeanfa.c' || echo '$(srcdir)/'`scolumnmeanfa.c + +libMeanf_la-dmeanfa.lo: dmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-dmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-dmeanfa.Tpo -c -o libMeanf_la-dmeanfa.lo `test -f 'dmeanfa.c' || echo '$(srcdir)/'`dmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-dmeanfa.Tpo $(DEPDIR)/libMeanf_la-dmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmeanfa.c' object='libMeanf_la-dmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-dmeanfa.lo `test -f 'dmeanfa.c' || echo '$(srcdir)/'`dmeanfa.c + +libMeanf_la-drowmeanfa.lo: drowmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-drowmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-drowmeanfa.Tpo -c -o libMeanf_la-drowmeanfa.lo `test -f 'drowmeanfa.c' || echo '$(srcdir)/'`drowmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-drowmeanfa.Tpo $(DEPDIR)/libMeanf_la-drowmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowmeanfa.c' object='libMeanf_la-drowmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-drowmeanfa.lo `test -f 'drowmeanfa.c' || echo '$(srcdir)/'`drowmeanfa.c + +libMeanf_la-dcolumnmeanfa.lo: dcolumnmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-dcolumnmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-dcolumnmeanfa.Tpo -c -o libMeanf_la-dcolumnmeanfa.lo `test -f 'dcolumnmeanfa.c' || echo '$(srcdir)/'`dcolumnmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-dcolumnmeanfa.Tpo $(DEPDIR)/libMeanf_la-dcolumnmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnmeanfa.c' object='libMeanf_la-dcolumnmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-dcolumnmeanfa.lo `test -f 'dcolumnmeanfa.c' || echo '$(srcdir)/'`dcolumnmeanfa.c + +libMeanf_la-cmeanfa.lo: cmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-cmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-cmeanfa.Tpo -c -o libMeanf_la-cmeanfa.lo `test -f 'cmeanfa.c' || echo '$(srcdir)/'`cmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-cmeanfa.Tpo $(DEPDIR)/libMeanf_la-cmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmeanfa.c' object='libMeanf_la-cmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-cmeanfa.lo `test -f 'cmeanfa.c' || echo '$(srcdir)/'`cmeanfa.c + +libMeanf_la-crowmeanfa.lo: crowmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-crowmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-crowmeanfa.Tpo -c -o libMeanf_la-crowmeanfa.lo `test -f 'crowmeanfa.c' || echo '$(srcdir)/'`crowmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-crowmeanfa.Tpo $(DEPDIR)/libMeanf_la-crowmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowmeanfa.c' object='libMeanf_la-crowmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-crowmeanfa.lo `test -f 'crowmeanfa.c' || echo '$(srcdir)/'`crowmeanfa.c + +libMeanf_la-ccolumnmeanfa.lo: ccolumnmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-ccolumnmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-ccolumnmeanfa.Tpo -c -o libMeanf_la-ccolumnmeanfa.lo `test -f 'ccolumnmeanfa.c' || echo '$(srcdir)/'`ccolumnmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-ccolumnmeanfa.Tpo $(DEPDIR)/libMeanf_la-ccolumnmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnmeanfa.c' object='libMeanf_la-ccolumnmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-ccolumnmeanfa.lo `test -f 'ccolumnmeanfa.c' || echo '$(srcdir)/'`ccolumnmeanfa.c + +libMeanf_la-zmeanfa.lo: zmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-zmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-zmeanfa.Tpo -c -o libMeanf_la-zmeanfa.lo `test -f 'zmeanfa.c' || echo '$(srcdir)/'`zmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-zmeanfa.Tpo $(DEPDIR)/libMeanf_la-zmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmeanfa.c' object='libMeanf_la-zmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-zmeanfa.lo `test -f 'zmeanfa.c' || echo '$(srcdir)/'`zmeanfa.c + +libMeanf_la-zrowmeanfa.lo: zrowmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-zrowmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-zrowmeanfa.Tpo -c -o libMeanf_la-zrowmeanfa.lo `test -f 'zrowmeanfa.c' || echo '$(srcdir)/'`zrowmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-zrowmeanfa.Tpo $(DEPDIR)/libMeanf_la-zrowmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowmeanfa.c' object='libMeanf_la-zrowmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-zrowmeanfa.lo `test -f 'zrowmeanfa.c' || echo '$(srcdir)/'`zrowmeanfa.c + +libMeanf_la-zcolumnmeanfa.lo: zcolumnmeanfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-zcolumnmeanfa.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-zcolumnmeanfa.Tpo -c -o libMeanf_la-zcolumnmeanfa.lo `test -f 'zcolumnmeanfa.c' || echo '$(srcdir)/'`zcolumnmeanfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-zcolumnmeanfa.Tpo $(DEPDIR)/libMeanf_la-zcolumnmeanfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnmeanfa.c' object='libMeanf_la-zcolumnmeanfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-zcolumnmeanfa.lo `test -f 'zcolumnmeanfa.c' || echo '$(srcdir)/'`zcolumnmeanfa.c + +libMeanf_la-cmeanfcs.lo: cmeanfcs.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-cmeanfcs.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-cmeanfcs.Tpo -c -o libMeanf_la-cmeanfcs.lo `test -f 'cmeanfcs.c' || echo '$(srcdir)/'`cmeanfcs.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-cmeanfcs.Tpo $(DEPDIR)/libMeanf_la-cmeanfcs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmeanfcs.c' object='libMeanf_la-cmeanfcs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-cmeanfcs.lo `test -f 'cmeanfcs.c' || echo '$(srcdir)/'`cmeanfcs.c + +libMeanf_la-cmeanfsc.lo: cmeanfsc.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-cmeanfsc.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-cmeanfsc.Tpo -c -o libMeanf_la-cmeanfsc.lo `test -f 'cmeanfsc.c' || echo '$(srcdir)/'`cmeanfsc.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-cmeanfsc.Tpo $(DEPDIR)/libMeanf_la-cmeanfsc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cmeanfsc.c' object='libMeanf_la-cmeanfsc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-cmeanfsc.lo `test -f 'cmeanfsc.c' || echo '$(srcdir)/'`cmeanfsc.c + +libMeanf_la-zmeanfdz.lo: zmeanfdz.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-zmeanfdz.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-zmeanfdz.Tpo -c -o libMeanf_la-zmeanfdz.lo `test -f 'zmeanfdz.c' || echo '$(srcdir)/'`zmeanfdz.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-zmeanfdz.Tpo $(DEPDIR)/libMeanf_la-zmeanfdz.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmeanfdz.c' object='libMeanf_la-zmeanfdz.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-zmeanfdz.lo `test -f 'zmeanfdz.c' || echo '$(srcdir)/'`zmeanfdz.c + +libMeanf_la-zmeanfzd.lo: zmeanfzd.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -MT libMeanf_la-zmeanfzd.lo -MD -MP -MF $(DEPDIR)/libMeanf_la-zmeanfzd.Tpo -c -o libMeanf_la-zmeanfzd.lo `test -f 'zmeanfzd.c' || echo '$(srcdir)/'`zmeanfzd.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMeanf_la-zmeanfzd.Tpo $(DEPDIR)/libMeanf_la-zmeanfzd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zmeanfzd.c' object='libMeanf_la-zmeanfzd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMeanf_la_CFLAGS) $(CFLAGS) -c -o libMeanf_la-zmeanfzd.lo `test -f 'zmeanfzd.c' || echo '$(srcdir)/'`zmeanfzd.c + +testDoubleMeanf-testDoubleMeanf.o: testDoubleMeanf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMeanf_CFLAGS) $(CFLAGS) -MT testDoubleMeanf-testDoubleMeanf.o -MD -MP -MF $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Tpo -c -o testDoubleMeanf-testDoubleMeanf.o `test -f 'testDoubleMeanf.c' || echo '$(srcdir)/'`testDoubleMeanf.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Tpo $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMeanf.c' object='testDoubleMeanf-testDoubleMeanf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMeanf_CFLAGS) $(CFLAGS) -c -o testDoubleMeanf-testDoubleMeanf.o `test -f 'testDoubleMeanf.c' || echo '$(srcdir)/'`testDoubleMeanf.c + +testDoubleMeanf-testDoubleMeanf.obj: testDoubleMeanf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMeanf_CFLAGS) $(CFLAGS) -MT testDoubleMeanf-testDoubleMeanf.obj -MD -MP -MF $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Tpo -c -o testDoubleMeanf-testDoubleMeanf.obj `if test -f 'testDoubleMeanf.c'; then $(CYGPATH_W) 'testDoubleMeanf.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMeanf.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Tpo $(DEPDIR)/testDoubleMeanf-testDoubleMeanf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMeanf.c' object='testDoubleMeanf-testDoubleMeanf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMeanf_CFLAGS) $(CFLAGS) -c -o testDoubleMeanf-testDoubleMeanf.obj `if test -f 'testDoubleMeanf.c'; then $(CYGPATH_W) 'testDoubleMeanf.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMeanf.c'; fi` + +testFloatMeanf-testFloatMeanf.o: testFloatMeanf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMeanf_CFLAGS) $(CFLAGS) -MT testFloatMeanf-testFloatMeanf.o -MD -MP -MF $(DEPDIR)/testFloatMeanf-testFloatMeanf.Tpo -c -o testFloatMeanf-testFloatMeanf.o `test -f 'testFloatMeanf.c' || echo '$(srcdir)/'`testFloatMeanf.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMeanf-testFloatMeanf.Tpo $(DEPDIR)/testFloatMeanf-testFloatMeanf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMeanf.c' object='testFloatMeanf-testFloatMeanf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMeanf_CFLAGS) $(CFLAGS) -c -o testFloatMeanf-testFloatMeanf.o `test -f 'testFloatMeanf.c' || echo '$(srcdir)/'`testFloatMeanf.c + +testFloatMeanf-testFloatMeanf.obj: testFloatMeanf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMeanf_CFLAGS) $(CFLAGS) -MT testFloatMeanf-testFloatMeanf.obj -MD -MP -MF $(DEPDIR)/testFloatMeanf-testFloatMeanf.Tpo -c -o testFloatMeanf-testFloatMeanf.obj `if test -f 'testFloatMeanf.c'; then $(CYGPATH_W) 'testFloatMeanf.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMeanf.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMeanf-testFloatMeanf.Tpo $(DEPDIR)/testFloatMeanf-testFloatMeanf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMeanf.c' object='testFloatMeanf-testFloatMeanf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMeanf_CFLAGS) $(CFLAGS) -c -o testFloatMeanf-testFloatMeanf.obj `if test -f 'testFloatMeanf.c'; then $(CYGPATH_W) 'testFloatMeanf.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMeanf.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/meanf/ccolumnmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/ccolumnmeanfa.c new file mode 100644 index 00000000..90dbb8b7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/ccolumnmeanfa.c @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" +#include "multiplication.h" + +void ccolumnmeanfa(floatComplex *in1, int lines, int columns,floatComplex *in2, floatComplex *out) { + int i = 0; + int j = 0; + floatComplex tempCoefSum = FloatComplex(0.0f,0.0f); + floatComplex tempMul = FloatComplex(0.0f,0.0f); + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines ; ++j) + { + tempCoefSum = FloatComplex(0.0f,0.0f); + out[j]= FloatComplex(0.0f,0.0f); + for ( i = 0 ; i < columns; ++i ) + { + + tempMul = cmuls ( in1[lines*i + j] , in2[lines*i + j]); /* we times by the coefficient*/ + tempCoefSum = cadds ( in2[lines*i + j] ,tempCoefSum ) ; + out[j] = cadds (tempMul, out[j]) ; + } + + out[j] = crdivs(out[j] ,tempCoefSum); + } +} + + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/cmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfa.c new file mode 100644 index 00000000..1aeef53d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfa.c @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "multiplication.h" +#include "division.h" + +floatComplex cmeanfa(floatComplex *in1, int size, floatComplex *in2 ) { + floatComplex accumulate = FloatComplex(0.0f, 0.0f); + floatComplex freAccumulate = FloatComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = cadds(accumulate, cmuls (in1[i] , in2[i])); + freAccumulate = cadds(in2[i],freAccumulate); + } + return crdivs(accumulate ,freAccumulate) ; +} + + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/cmeanfcs.c b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfcs.c new file mode 100644 index 00000000..e0c769a3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfcs.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "meanf.h" +#include "zeros.h" + +floatComplex cmeanfcs (floatComplex* in1 ,int lines , int columns , float* in2) + { + float* ZEROS = (float *) malloc((unsigned int)(lines*columns*sizeof(float))); + szerosa(ZEROS,lines,columns); + + return cmeanfa(in1, lines*columns , FloatComplexMatrix(in2,ZEROS,lines*columns)); + } diff --git a/2.3-1/src/c/statisticsFunctions/meanf/cmeanfsc.c b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfsc.c new file mode 100644 index 00000000..03c7d421 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/cmeanfsc.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "meanf.h" +#include "zeros.h" + +floatComplex cmeanfsc (float* in1 ,int lines , int columns , floatComplex* in2) + { + float* ZEROS = (float*) malloc((unsigned int)(lines*columns*sizeof(float))); + szerosa(ZEROS,lines,columns); + + return cmeanfa(FloatComplexMatrix(in1,ZEROS,lines*columns), lines*columns , in2); + } diff --git a/2.3-1/src/c/statisticsFunctions/meanf/crowmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/crowmeanfa.c new file mode 100644 index 00000000..14dc3271 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/crowmeanfa.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" +#include "multiplication.h" +void crowmeanfa(floatComplex *in1, int lines, int columns, floatComplex *in2, floatComplex *out) { + int i = 0; + int j = 0; + floatComplex tempCoefSum = FloatComplex(0.0f,0.0f); + floatComplex tempMul = FloatComplex(0.0f,0.0f); + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + tempCoefSum = FloatComplex(0.0f,0.0f); + out[j]= FloatComplex(0.0f,0.0f); + for ( i = 0 ; i < lines; ++i ) + { + + tempMul = cmuls ( in1[lines*j + i] , in2[lines*j + i]); /* we times by the coefficient*/ + tempCoefSum = cadds ( in2[lines*j + i] ,tempCoefSum ) ; + out[j] = cadds (tempMul, out[j]) ; + } + + out[j] = crdivs(out[j] ,tempCoefSum); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/dcolumnmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/dcolumnmeanfa.c new file mode 100644 index 00000000..e8d25a33 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/dcolumnmeanfa.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" + +void dcolumnmeanfa(double *in1, int lines , int columns, double *in2, double *out) { + int i = 0; + int j = 0; + double tempCoefSum = 0.0; + double tempMul = 0.0 ; + + + + /*we first multiply each cell of the input matrix by its coefficient*/ +for (j = 0; j < lines; ++j) + { + tempCoefSum = 0.0; + out[j]= 0.0; + for ( i = 0 ; i < columns; ++i ) + { + + tempMul = in1[lines*i + j] * in2[lines*i + j]; /* we times by the coefficient*/ + tempCoefSum +=in2[lines*i + j]; + out[j] +=tempMul ; + } + + out[j] /= tempCoefSum ; + } + +} + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/dmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/dmeanfa.c new file mode 100644 index 00000000..be3bb375 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/dmeanfa.c @@ -0,0 +1,28 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" + +double dmeanfa(double *in1, int size, double *in2) { + double accumulate = 0.0; + double freAccumulate = 0.0; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += (in1[i] * in2[i]) ; + freAccumulate += in2[i] ; + } + return accumulate / freAccumulate; + +} + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/drowmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/drowmeanfa.c new file mode 100644 index 00000000..ce3523cb --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/drowmeanfa.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" + +void drowmeanfa(double *in1, int lines, int columns, double *in2, double *out) { + int i = 0; + int j = 0; + double tempCoefSum = 0.0; + double tempMul = 0.0; + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + tempCoefSum = 0.0; + out[j]= 0.0; + for ( i = 0 ; i < lines; ++i ) + { + + tempMul = in1[lines*j + i] * in2[lines*j + i]; /* we times by the coefficient*/ + tempCoefSum +=in2[lines*j + i]; + out[j] +=tempMul ; + } + + out[j] /= tempCoefSum ; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/scolumnmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/scolumnmeanfa.c new file mode 100644 index 00000000..bb3ffca8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/scolumnmeanfa.c @@ -0,0 +1,40 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" + +void scolumnmeanfa(float *in1, int lines, int columns, float *in2, float *out) { + int i = 0; + int j = 0; + float tempCoefSum = 0.0f; + float tempMul = 0.0f ; + + + + /*we first multiply each cell of the input matrix by its coefficient*/ +for (j = 0; j < lines; ++j) + { + tempCoefSum = 0.0f; + out[j]= 0.0f; + for ( i = 0 ; i < columns; ++i ) + { + + tempMul = in1[lines*i + j] * in2[lines*i + j]; /* we times by the coefficient*/ + tempCoefSum +=in2[lines*i + j]; + out[j] +=tempMul ; + } + + out[j] /= tempCoefSum ; + } + +} + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/smeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/smeanfa.c new file mode 100644 index 00000000..64985e78 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/smeanfa.c @@ -0,0 +1,27 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" + +float smeanfa(float *in1, int size, float *in2) { + float accumulate = 0.0f; + float freAccumulate = 0.0f; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += (in1[i] * in2[i]) ; + freAccumulate += in2[i] ; + } + return accumulate / freAccumulate; + +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/srowmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/srowmeanfa.c new file mode 100644 index 00000000..3cdacb82 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/srowmeanfa.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" + + +void srowmeanfa(float *in1, int lines, int columns, float *in2, float *out) { + int i = 0; + int j = 0; + float tempCoefSum = 0.0f; + float tempMul = 0.0f; + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + tempCoefSum = 0.0f; + out[j]= 0.0f; + for ( i = 0 ; i < lines; ++i ) + { + + tempMul = in1[lines*j + i] * in2[lines*j + i]; /* we times by the coefficient*/ + tempCoefSum +=in2[lines*j + i]; + out[j] +=tempMul ; + } + + out[j] /= tempCoefSum ; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/testDoubleMeanf.c b/2.3-1/src/c/statisticsFunctions/meanf/testDoubleMeanf.c new file mode 100644 index 00000000..f528f1df --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/testDoubleMeanf.c @@ -0,0 +1,409 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "meanf.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dmeanfsTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + double coef1 = 56 ; + double coef2 = 2 ; + + coef1 = 56 ; + coef2 = 2 ; + + printf("\n>>>> Meanf Double Scalar Test\n"); + assert( ( fabs(dmeanfs(value1,coef1) ) - ( 3.0 ) ) / fabs ( dmeanfs(value1,coef1) ) < 3e-16 ); + assert( ( fabs(dmeanfs(value2,coef2) ) - ( 1.123456789 ) ) / fabs ( dmeanfs(value2,coef2) ) < 3e-16 ); + + return 0; +} + +static int dmeanfaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double coef1[3] = {10.0, 2.0, 6.0}; + + double table2[5] = {3.186784563, + 4.186784563, + 5.186784563, + 6.186784563, + 7.186784563}; + + double coef2[5] = {3.0, + 4.0, + 5.0, + 6.0, + 7.0}; + + printf("\n>>>> Meanf Float Array Test\n"); + assert(dmeanfa(table1, 3, coef1) == 54.0 / 18.0); + assert((dmeanfa(table2, 5, coef2) - (3.186784563*3.0 + 4.186784563*4.0 + 5.186784563*5.0 + 6.186784563*6.0 + 7.186784563*7.0) / 25.0) / dmeanfa(table2, 5 ,coef2) < 3e-16); + return 0; +} + + +static int dcolumnmeanfaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double coef2[10] = {11.0, 12.0, 13.0, 14.0 , 15.0, 16.0, 17.0, 18.0, 19.0, 20.0}; + double columnMeanmedTable1_3_3[3] = {0}; + double columnMeanmedTable1_1_9[1] = {0}; + double columnMeanmedTable1_9_1[9] = {0}; + double columnMeanmedTable2_2_5[2] = {0}; + double columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Double Array Test\n"); + /* + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 68 32 146 ] + [ 7 8 9 ] [ 5 6 7 ] + */ + dcolumnmeanfa(table1, 3, 3, coef1 ,columnMeanmedTable1_3_3); + assert( ( fabs(columnMeanmedTable1_3_3[0] ) - ( 68.0 / 33.0 ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[1] ) - ( 32.0 / 6.0 ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable1_3_3[2] ) - ( 146.0 / 18.0 ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + dcolumnmeanfa(table1, 1, 9, coef1 ,columnMeanmedTable1_1_9); + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 246.0 / 57.0 ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + dcolumnmeanfa(table1, 9, 1, coef1, columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ]=> [ 415 520 ] + */ + dcolumnmeanfa(table2, 2, 5, coef2 , columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 415.0 / 75.0 ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 520.0 / 80.0 ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 3e-16 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] [ 11 16 ] + [ 2 7 ] [ 12 17 ] => [ 107 143 183 227 275 ] + [ 3 8 ].*[ 13 18 ] + [ 4 9 ] [ 14 19 ] + [ 5 10 ] [ 15 20 ] + */ + dcolumnmeanfa(table2, 5, 2, coef2 ,columnMeanmedTable2_5_2); + assert( ( fabs(columnMeanmedTable2_5_2[0] ) - ( 107.0 / 27.0 ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[1] ) - ( 143.0 / 29.0 ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[2] ) - ( 183.0 / 31.0 ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[3] ) - ( 227.0 / 33.0 ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 3e-16 ); + assert( ( fabs(columnMeanmedTable2_5_2[4] ) - ( 275.0 / 35.0 ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 3e-16 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + + +static int drowmeanfaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double coef2[10] = {11.0, 12.0, 13.0, 14.0 , 15.0, 16.0, 17.0, 18.0, 19.0, 20.0}; + double rowMeanmedTable1_3_3[3] = {0}; + double rowMeanmedTable1_1_9[9] = {0}; + double rowMeanmedTable1_9_1[1] = {0}; + double rowMeanmedTable2_2_5[5] = {0}; + + + printf("\n>>>> Row Mean Double Array Test\n"); + /* + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 49 80 117 ] + [ 7 8 9 ] [ 5 6 7 ] + */ + drowmeanfa(table1, 3, 3, coef1 , rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( ( fabs(rowMeanmedTable1_3_3[0] ) - ( 49.0 / 16.0 ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[1] ) - ( 80.0 / 19.0 ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable1_3_3[2] ) - ( 117.0 / 22.0 ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 3e-16 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowmeanfa(table1, 1, 9, coef1, rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 246 ] + */ + drowmeanfa(table1, 9, 1, coef1, rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 246.0 / 57.0 ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 3e-16 ); + + /* + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ] => [ 3 7 11 15 19 ] + */ + drowmeanfa(table2, 2, 5, coef2, rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( ( fabs(rowMeanmedTable2_2_5[0] ) - ( 35.0 / 23.0 ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[1] ) - ( 95.0 / 27.0 ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[2] ) - ( 171.0 / 31.0 ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[3] ) - ( 263.0 / 35.0 ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 3e-16 ); + assert( ( fabs(rowMeanmedTable2_2_5[4] ) - ( 371.0 / 39.0 ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 3e-16 ); + + + return 0; +} + +static int zmeanfsTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex coef1 = DoubleComplex(3.0, 0.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + doubleComplex coef2 = DoubleComplex(9.0, 0.0); + + coef1 = DoubleComplex(3.0, 0.0); + coef2 = DoubleComplex(9.0, 0.0); + + printf("\n>>>> Mean Double Complex Scalar Test\n"); + assert( ( fabs(zreals(zmeanfs(value1,coef1)) ) - ( 3.0 ) ) / fabs ( zreals(zmeanfs(value1,coef1)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeanfs(value1,coef1)) ) - ( 3.0 ) ) / fabs ( zimags(zmeanfs(value1,coef1)) ) < 3e-16 ); + assert( ( fabs(zreals(zmeanfs(value2,coef1)) ) - ( 1.123456789 ) ) / fabs ( zreals(zmeanfs(value2,coef1)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeanfs(value2,coef1)) ) - ( 1.123456789 ) ) / fabs ( zimags(zmeanfs(value2,coef1)) ) < 3e-16 ); + return 0; +} + + + +static int zmeanfaTest(void) { + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + + printf("\n>>>> Mean Double Complex Array Test\n"); + + + assert( ( fabs(zreals(zmeanfa(table1, 3, coef1)) ) - ( 246.0 / 57.0 ) ) / fabs ( zreals(zmeanfa(table1, 3, coef1)) ) < 3e-16 ); + assert( ( fabs(zimags(zmeanfa(table1, 3, coef1)) ) - ( 288.0 / 57.0 ) ) / fabs ( zimags(zmeanfa(table1, 3, coef1)) ) < 3e-16 );/* +*/ + return 0; +} + +static int zrowmeanfaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0 , 0.0}; + double coefR2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0 , 0.0}; + double coefI2[10] ={10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 10); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 10); + + doubleComplex rowMeanmedTable1_3_3[3]; + doubleComplex rowMeanmedTable2_2_5[5]; + + rowMeanmedTable1_3_3[0] = DoubleComplex(0.0, 0.0); + rowMeanmedTable1_3_3[1] = DoubleComplex(0.0, 0.0); + rowMeanmedTable1_3_3[2] = DoubleComplex(0.0, 0.0); + + rowMeanmedTable2_2_5[0] = DoubleComplex(0.0, 0.0); + rowMeanmedTable2_2_5[1] = DoubleComplex(0.0, 0.0); + rowMeanmedTable2_2_5[2] = DoubleComplex(0.0, 0.0); + rowMeanmedTable2_2_5[3] = DoubleComplex(0.0, 0.0); + rowMeanmedTable2_2_5[4] = DoubleComplex(0.0, 0.0); + + /* + doubleComplex rowMeanmedTable1_1_9[9] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable1_9_1[1] = {DoubleComplex(0.0, 0.0)}; + + doubleComplex rowMeanmedTable2_5_2[2] = {DoubleComplex(0.0, 0.0)}; +*/ + + printf("\n>>>> Row Meanf Double Complex Array Test\n"); + + /**/ + + zrowmeanfa(table1 , 3 , 3 , coef1 , rowMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + + printf("rowMeanmedTable_3_3[%d] = %e + %ei\n", i, zreals(rowMeanmedTable1_3_3[i]), zimags(rowMeanmedTable1_3_3[i])); + } + assert( fabs(zimags(rowMeanmedTable1_3_3[0]) - ( 27.0 / 16.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[0]) ) < 3e-16 ); + assert( fabs(zreals(rowMeanmedTable1_3_3[0]) - ( 49.0 / 16.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[0]) ) < 3e-16 ); + + assert( fabs(zimags(rowMeanmedTable1_3_3[1]) - ( 90.0 / 19.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[1]) ) < 3e-16 ); + assert( fabs(zreals(rowMeanmedTable1_3_3[1]) - ( 80.0 / 19.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[1]) ) < 3e-16 ); + + assert( fabs(zimags(rowMeanmedTable1_3_3[2]) - (171.0 / 22.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[2]) ) < 3e-16 ); + assert( fabs(zreals(rowMeanmedTable1_3_3[2]) - (117.0 / 22.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[2]) ) < 3e-16 ); +/**/ + + printf("\n\n"); + zrowmeanfa(table2 , 2 , 5 , coef2 , rowMeanmedTable2_2_5); + + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowMeanmedTable_2_5[%d] = %e + %ei\n", i, zreals(rowMeanmedTable2_2_5[i]), zimags(rowMeanmedTable2_2_5[i])); + } + assert( fabs(zreals(rowMeanmedTable2_2_5[0]) - 1.2727273 ) / fabs ( zreals(rowMeanmedTable2_2_5[0]) ) < 1e-6 ); + assert( zimags(rowMeanmedTable2_2_5[0]) == 0); + + assert( fabs(zreals(rowMeanmedTable2_2_5[1]) - 3.5625000 ) / fabs ( zreals(rowMeanmedTable2_2_5[1]) ) < 1e-6 ); + assert( zimags(rowMeanmedTable2_2_5[1]) == 0); + + assert( fabs(zreals(rowMeanmedTable2_2_5[2]) - 7.2500000 ) / fabs ( zreals(rowMeanmedTable2_2_5[2]) ) < 1e-6 ); + assert( zimags(rowMeanmedTable2_2_5[2]) == 0); + + assert( fabs(zreals(rowMeanmedTable2_2_5[3]) - 3.6000000 ) / fabs ( zreals(rowMeanmedTable2_2_5[3]) ) < 1e-6 ); + assert( zimags(rowMeanmedTable2_2_5[3]) == 0); + + assert( fabs(zreals(rowMeanmedTable2_2_5[4]) - 9.7307692 ) / fabs ( zreals(rowMeanmedTable2_2_5[4]) ) < 1e-6 ); + assert( zimags(rowMeanmedTable2_2_5[4]) == 0); + + + return 0; +} + + +static int zcolumnmeanfaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; +/* + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; +*/ + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); +/* + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 9); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 9); +*/ + doubleComplex columnMeanmedTable1_3_3[3] ; + /* + doubleComplex rowMeanmedTable1_1_9[9] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable1_9_1[1] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_2_5[5] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_5_2[2] = {DoubleComplex(0.0, 0.0)}; +*/ + + columnMeanmedTable1_3_3[0] = DoubleComplex(0.0, 0.0); + columnMeanmedTable1_3_3[1] = DoubleComplex(0.0, 0.0); + columnMeanmedTable1_3_3[2] = DoubleComplex(0.0, 0.0); + + printf("\n>>>> Column Meanf Double Complex Array Test\n"); + + /**/ + + zcolumnmeanfa(table1 , 3 , 3 , coef1 , columnMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnMeanmedTable_3_3[%d] = %e + %ei\n", i, zreals(columnMeanmedTable1_3_3[i]), zimags(columnMeanmedTable1_3_3[i])); + } + assert( ( fabs(zimags(columnMeanmedTable1_3_3[0]) ) - (138.0 / 33.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[0]) ) < 3e-16 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[0]) ) - ( 68.0 / 33.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[0]) ) < 3e-16 ); + + assert( ( fabs(zimags(columnMeanmedTable1_3_3[1]) ) - ( 36.0 / 6.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[1]) ) < 3e-16 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[1]) ) - ( 32.0 / 6.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[1]) ) < 3e-16 ); + + assert( ( fabs(zimags(columnMeanmedTable1_3_3[2]) ) - (114.0 / 18.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[2]) ) < 3e-16 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[2]) ) - (146.0 / 18.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[2]) ) < 3e-16 ); + + + + + return 0; +} + + + +static int testMeanf(void) { + + dmeanfsTest(); + dmeanfaTest(); + dcolumnmeanfaTest(); + drowmeanfaTest(); + zmeanfsTest(); + zmeanfaTest(); + zrowmeanfaTest(); + zcolumnmeanfaTest(); + + return 0; +} + +int main(void) { + assert(testMeanf() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/meanf/testFloatMeanf.c b/2.3-1/src/c/statisticsFunctions/meanf/testFloatMeanf.c new file mode 100644 index 00000000..ead8a86b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/testFloatMeanf.c @@ -0,0 +1,383 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "meanf.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int smeanfsTest(void) { + float value1 ; + float value2 ; + float coef1 ; + float coef2 ; + + value1 = 3.0f; + value2 = 1.123456789f; + coef1 = 56.0f ; + coef2 = 2.0f ; + + printf("\n>>>> Meanf Float Scalar Test\n"); + assert( ( fabs(smeanfs(value1,coef1) ) - ( 3.0f ) ) / fabs ( smeanfs(value1,coef1) ) < 1e-6 ); + assert( ( fabs(smeanfs(value2,coef2) ) - ( 1.123456789f ) ) / fabs ( smeanfs(value2,coef2) ) < 1e-6 ); + + return 0; +} + +static int smeanfaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float coef1[3] = {10.0f, 2.0f, 6.0f}; + + float table2[5] = {3.186784563f, + 4.186784563f, + 5.186784563f, + 6.186784563f, + 7.186784563f}; + + float coef2[5] = {3.0f, + 4.0f, + 5.0f, + 6.0f, + 7.0f}; + + printf("\n>>>> Meanf Float Array Test\n"); + assert(smeanfa(table1, 3, coef1) == 54.0f / 18.0f); + assert((smeanfa(table2, 5, coef2) - (3.186784563f*3.0f + 4.186784563f*4.0f + 5.186784563f*5.0f + 6.186784563f*6.0f + 7.186784563f*7.0f) / 25.0f) / smeanfa(table2, 5 ,coef2) < 1e-6); + return 0; +} + + +static int scolumnmeanfaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float coef2[10] = {11.0f, 12.0f, 13.0f, 14.0f , 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f}; + float columnMeanmedTable1_3_3[3] = {0}; + float columnMeanmedTable1_1_9[1] = {0}; + float columnMeanmedTable1_9_1[9] = {0}; + float columnMeanmedTable2_2_5[2] = {0}; + float columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Mean Float Array Test\n"); + /* + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 68 32 146 ] + [ 7 8 9 ] [ 5 6 7 ] + */ + scolumnmeanfa(table1, 3, 3, coef1 ,columnMeanmedTable1_3_3); + assert( fabs(columnMeanmedTable1_3_3[0] - ( 68.0f / 33.0f ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(columnMeanmedTable1_3_3[1] - ( 32.0f / 6.0f ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(columnMeanmedTable1_3_3[2] - ( 146.0f / 18.0f ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 1e-6 ); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + scolumnmeanfa(table1, 1, 9, coef1 ,columnMeanmedTable1_1_9); + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 246.0f / 57.0f ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 1e-6 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + scolumnmeanfa(table1, 9, 1, coef1, columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ]=> [ 415 520 ] + */ + scolumnmeanfa(table2, 2, 5, coef2 , columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 415.0f / 75.0f ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 520.0f / 80.0f ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 1e-6 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + /* + [ 1 6 ] [ 11 16 ] + [ 2 7 ] [ 12 17 ] => [ 107 143 183 227 275 ] + [ 3 8 ].*[ 13 18 ] + [ 4 9 ] [ 14 19 ] + [ 5 10 ] [ 15 20 ] + */ + scolumnmeanfa(table2, 5, 2, coef2 ,columnMeanmedTable2_5_2); + assert( fabs(columnMeanmedTable2_5_2[0] - ( 107.0f / 27.0f ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 1e-6 ); + assert( fabs(columnMeanmedTable2_5_2[1] - ( 143.0f / 29.0f ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 1e-6 ); + assert( fabs(columnMeanmedTable2_5_2[2] - ( 183.0f / 31.0f ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 1e-6 ); + assert( fabs(columnMeanmedTable2_5_2[3] - ( 227.0f / 33.0f ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 1e-6 ); + assert( fabs(columnMeanmedTable2_5_2[4] - ( 275.0f / 35.0f ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 1e-6 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} + + +static int srowmeanfaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float coef2[10] = {11.0f, 12.0f, 13.0f, 14.0f , 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f}; + float rowMeanmedTable1_3_3[3] = {0}; + float rowMeanmedTable1_1_9[9] = {0}; + float rowMeanmedTable1_9_1[1] = {0}; + float rowMeanmedTable2_2_5[5] = {0}; + /*float rowMeanmedTable2_5_2[2] = {0};*/ + + printf("\n>>>> Row Mean Float Array Test\n"); + /* + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 49 80 117 ] + [ 7 8 9 ] [ 5 6 7 ] + */ + srowmeanfa(table1, 3, 3, coef1 , rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( fabs(rowMeanmedTable1_3_3[0] - ( 49.0f / 16.0f ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(rowMeanmedTable1_3_3[1] - ( 80.0f / 19.0f ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(rowMeanmedTable1_3_3[2] - ( 117.0f / 22.0f ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 1e-6 ); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowmeanfa(table1, 1, 9, coef1, rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 246 ] + */ + srowmeanfa(table1, 9, 1, coef1, rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 246.0f / 57.0f ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 1e-6 ); + + /* + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ] => [ 3 7 11 15 19 ] + */ + srowmeanfa(table2, 2, 5, coef2, rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( fabs(rowMeanmedTable2_2_5[0] - ( 35.0f / 23.0f ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( fabs(rowMeanmedTable2_2_5[1] - ( 95.0f / 27.0f ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 1e-6 ); + assert( fabs(rowMeanmedTable2_2_5[2] - ( 171.0f / 31.0f ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 1e-6 ); + assert( fabs(rowMeanmedTable2_2_5[3] - ( 263.0f / 35.0f ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 1e-6 ); + assert( fabs(rowMeanmedTable2_2_5[4] - ( 371.0f / 39.0f ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 1e-6 ); + + + return 0; +} + +static int cmeanfsTest(void) { + floatComplex value1 ; + floatComplex coef1 ; + floatComplex value2 ; + floatComplex coef2 ; + + value1 = FloatComplex(3.0f, 3.0f); + coef1 = FloatComplex(3.0f, 0.0f); + value2 = FloatComplex(1.123456789f, 1.123456789f); + coef2 = FloatComplex(9.0f, 0.0f); + + printf("\n>>>> Mean Float Complex Scalar Test\n"); + assert( fabs(creals(cmeanfs(value1,coef1)) - ( 3.0f ) ) / fabs ( creals(cmeanfs(value1,coef1)) ) < 1e-6 ); + assert( fabs(cimags(cmeanfs(value1,coef1)) - ( 3.0f ) ) / fabs ( cimags(cmeanfs(value1,coef1)) ) < 1e-6 ); + assert( fabs(creals(cmeanfs(value2,coef1)) - ( 1.123456789f ) ) / fabs ( creals(cmeanfs(value2,coef1)) ) < 1e-6 ); + assert( fabs(cimags(cmeanfs(value2,coef1)) - ( 1.123456789f ) ) / fabs ( cimags(cmeanfs(value2,coef1)) ) < 1e-6 ); + return 0; +} + + + +static int cmeanfaTest(void) { + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + + printf("\n>>>> Mean Float Complex Array Test\n"); + printf("\tMeanmedTable_1_1[0] = %e + %ei\n", creals(cmeanfa(table1, 9, coef1)), cimags(cmeanfa(table1, 9, coef1))); + + assert( fabs( creals(cmeanfa(table1, 9, coef1)) - ( 246.0f / 57.0f ) ) / fabs ( creals(cmeanfa(table1, 9, coef1)) ) < 1e-6 ); + assert( fabs( cimags(cmeanfa(table1, 9, coef1)) - ( 288.0f / 57.0f ) ) / fabs ( cimags(cmeanfa(table1, 9, coef1)) ) < 1e-6 );/* +*/ + return 0; +} + +static int crowmeanfaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +/* + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +*/ + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); +/* + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 9); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 9); +*/ + floatComplex rowMeanmedTable1_3_3[3] ; + rowMeanmedTable1_3_3[0] = FloatComplex(0.0f, 0.0f); + rowMeanmedTable1_3_3[1] = FloatComplex(0.0f, 0.0f); + rowMeanmedTable1_3_3[2] = FloatComplex(0.0f, 0.0f); + /* + floatComplex rowMeanmedTable1_1_9[9] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable1_9_1[1] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_2_5[5] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_5_2[2] = {FloatComplex(0.0f, 0.0f)}; +*/ + + printf("\n>>>> Row Meanf Float Complex Array Test\n"); + + /**/ + + crowmeanfa(table1 , 3 , 3 , coef1 , rowMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + + printf("rowMeanmedTable_3_3[%d] = %e + %ei\n", i, creals(rowMeanmedTable1_3_3[i]), cimags(rowMeanmedTable1_3_3[i])); + } + assert( fabs(cimags(rowMeanmedTable1_3_3[0]) - ( 27.0f / 16.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(creals(rowMeanmedTable1_3_3[0]) - ( 49.0f / 16.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(cimags(rowMeanmedTable1_3_3[1]) - ( 90.0f / 19.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(creals(rowMeanmedTable1_3_3[1]) - ( 80.0f / 19.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(cimags(rowMeanmedTable1_3_3[2]) - (171.0f / 22.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(creals(rowMeanmedTable1_3_3[2]) - (117.0f / 22.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} + + +static int ccolumnmeanfaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +/* + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; +*/ + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); +/* + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 9); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 9); +*/ + floatComplex columnMeanmedTable1_3_3[3] ; + columnMeanmedTable1_3_3[0] = FloatComplex(0.0f, 0.0f); + columnMeanmedTable1_3_3[1] = FloatComplex(0.0f, 0.0f); + columnMeanmedTable1_3_3[2] = FloatComplex(0.0f, 0.0f); + /* + floatComplex rowMeanmedTable1_1_9[9] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable1_9_1[1] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_2_5[5] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_5_2[2] = {FloatComplex(0.0f, 0.0f)}; +*/ + + printf("\n>>>> Column Meanf Float Complex Array Test\n"); + + /**/ + + ccolumnmeanfa(table1 , 3 , 3 , coef1 , columnMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnMeanmedTable_3_3[%d] = %e + %ei\n", i, creals(columnMeanmedTable1_3_3[i]), cimags(columnMeanmedTable1_3_3[i])); + } + assert( fabs(cimags(columnMeanmedTable1_3_3[0]) - (138.0f / 33.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(creals(columnMeanmedTable1_3_3[0]) - ( 68.0f / 33.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(cimags(columnMeanmedTable1_3_3[1]) - ( 36.0f / 6.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(creals(columnMeanmedTable1_3_3[1]) - ( 32.0f / 6.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(cimags(columnMeanmedTable1_3_3[2]) - (114.0f / 18.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(creals(columnMeanmedTable1_3_3[2]) - (146.0f / 18.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} + + + +static int testMeanf(void) { + + smeanfsTest(); + smeanfaTest(); + scolumnmeanfaTest(); + srowmeanfaTest(); + cmeanfsTest(); + cmeanfaTest(); + crowmeanfaTest(); + ccolumnmeanfaTest(); + + return 0; +} + +int main(void) { + assert(testMeanf() == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/zcolumnmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/zcolumnmeanfa.c new file mode 100644 index 00000000..efbfa89a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/zcolumnmeanfa.c @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" +#include "multiplication.h" + +void zcolumnmeanfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex *out) { + int i = 0; + int j = 0; + doubleComplex tempCoefSum = DoubleComplex(0.0,0.0); + doubleComplex tempMul = DoubleComplex(0.0,0.0); + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines ; ++j) + { + tempCoefSum = DoubleComplex(0.0,0.0); + out[j]= DoubleComplex(0.0,0.0); + for ( i = 0 ; i < columns; ++i ) + { + + tempMul = zmuls ( in1[lines*i + j] , in2[lines*i + j]); /* we times by the coefficient*/ + tempCoefSum = zadds ( in2[lines*i + j] ,tempCoefSum ) ; + out[j] = zadds (tempMul, out[j]) ; + } + + out[j] = zrdivs(out[j] ,tempCoefSum) ; + } +} + + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/zmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfa.c new file mode 100644 index 00000000..f6691d91 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfa.c @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "multiplication.h" +#include "division.h" + +doubleComplex zmeanfa(doubleComplex *in1, int size, doubleComplex *in2 ) { + doubleComplex accumulate = DoubleComplex(0.0, 0.0); + doubleComplex freAccumulate = DoubleComplex(0.0, 0.0); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = zadds(accumulate , zmuls( in1[i] ,in2[i])); + freAccumulate = zadds(in2[i],freAccumulate); + } + return zrdivs(accumulate ,freAccumulate); +} + diff --git a/2.3-1/src/c/statisticsFunctions/meanf/zmeanfdz.c b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfdz.c new file mode 100644 index 00000000..a53902bc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfdz.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "meanf.h" +#include "zeros.h" + +doubleComplex zmeanfdz (double* in1 ,int lines , int columns , doubleComplex* in2) + { + double* ZEROS = (double *) malloc((unsigned int)(lines*columns*sizeof(double))); + dzerosa(ZEROS,lines,columns); + + return zmeanfa(DoubleComplexMatrix(in1,ZEROS,lines*columns), lines*columns , in2); + } diff --git a/2.3-1/src/c/statisticsFunctions/meanf/zmeanfzd.c b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfzd.c new file mode 100644 index 00000000..f31910b4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/zmeanfzd.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "meanf.h" +#include "zeros.h" + +doubleComplex zmeanfzd (doubleComplex* in1 ,int lines , int columns , double* in2) + { + double* ZEROS = (double *) malloc((unsigned int)(lines*columns*sizeof(double))); + dzerosa(ZEROS,lines,columns); + + return zmeanfa(in1, lines*columns , DoubleComplexMatrix(in2,ZEROS,lines*columns)); + } diff --git a/2.3-1/src/c/statisticsFunctions/meanf/zrowmeanfa.c b/2.3-1/src/c/statisticsFunctions/meanf/zrowmeanfa.c new file mode 100644 index 00000000..79114137 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/meanf/zrowmeanfa.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "meanf.h" +#include "sum.h" +#include "multiplication.h" +void zrowmeanfa(doubleComplex *in1, int lines, int columns, doubleComplex *in2, doubleComplex *out) { + int i = 0; + int j = 0; + doubleComplex tempCoefSum = DoubleComplex(0.0,0.0); + doubleComplex tempMul = DoubleComplex(0.0,0.0); + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + tempCoefSum = DoubleComplex(0.0,0.0); + out[j]= DoubleComplex(0.0,0.0); + for ( i = 0 ; i < lines; ++i ) + { + + tempMul = zmuls ( in1[lines*j + i] , in2[lines*j + i]); /* we times by the coefficient*/ + tempCoefSum = zadds ( in2[lines*j + i] ,tempCoefSum ) ; + out[j] = zadds (tempMul, out[j]) ; + } + + out[j] = zrdivs(out[j] ,tempCoefSum) ; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/min/Makefile.am b/2.3-1/src/c/statisticsFunctions/min/Makefile.am new file mode 100644 index 00000000..5b8a3570 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/Makefile.am @@ -0,0 +1,51 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libMin_la_CFLAGS = -I $(top_builddir)/src/c/statisticsFunctions/includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libMin.la + +libMin_la_SOURCES = $(HEAD) $(SRC) + +SRC = smina.c \ + srowmina.c \ + scolumnmina.c \ + dmina.c \ + drowmina.c \ + dcolumnmina.c + +HEAD = ../includes/statMin.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes + +check_LDADD = $(top_builddir)/src/c/statisticsFunctions/min/libMin.la + +check_PROGRAMS = testFloatMin testDoubleMin + +TESTS = testFloatMin testDoubleMin + +# +# -*- Min Tests -*- +# +testFloatMin_SOURCES = testFloatMin.c +testFloatMin_CFLAGS = $(check_INCLUDES) +testFloatMin_LDADD = $(check_LDADD) + +testDoubleMin_SOURCES =testDoubleMin.c +testDoubleMin_CFLAGS = $(check_INCLUDES) +testDoubleMin_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/min/Makefile.in b/2.3-1/src/c/statisticsFunctions/min/Makefile.in new file mode 100644 index 00000000..fe6ddb38 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/Makefile.in @@ -0,0 +1,759 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatMin$(EXEEXT) testDoubleMin$(EXEEXT) +TESTS = testFloatMin$(EXEEXT) testDoubleMin$(EXEEXT) +subdir = src/c/statisticsFunctions/min +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libMin_la_LIBADD = +am__objects_1 = +am__objects_2 = libMin_la-smina.lo libMin_la-srowmina.lo \ + libMin_la-scolumnmina.lo libMin_la-dmina.lo \ + libMin_la-drowmina.lo libMin_la-dcolumnmina.lo +am_libMin_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libMin_la_OBJECTS = $(am_libMin_la_OBJECTS) +libMin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libMin_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleMin_OBJECTS = testDoubleMin-testDoubleMin.$(OBJEXT) +testDoubleMin_OBJECTS = $(am_testDoubleMin_OBJECTS) +testDoubleMin_DEPENDENCIES = $(check_LDADD) +testDoubleMin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleMin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatMin_OBJECTS = testFloatMin-testFloatMin.$(OBJEXT) +testFloatMin_OBJECTS = $(am_testFloatMin_OBJECTS) +testFloatMin_DEPENDENCIES = $(check_LDADD) +testFloatMin_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatMin_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libMin_la_SOURCES) $(testDoubleMin_SOURCES) \ + $(testFloatMin_SOURCES) +DIST_SOURCES = $(libMin_la_SOURCES) $(testDoubleMin_SOURCES) \ + $(testFloatMin_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libMin_la_CFLAGS = -I $(top_builddir)/src/c/statisticsFunctions/includes +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libMin.la +libMin_la_SOURCES = $(HEAD) $(SRC) +SRC = smina.c \ + srowmina.c \ + scolumnmina.c \ + dmina.c \ + drowmina.c \ + dcolumnmina.c + +HEAD = ../includes/statMin.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes +check_LDADD = $(top_builddir)/src/c/statisticsFunctions/min/libMin.la + +# +# -*- Min Tests -*- +# +testFloatMin_SOURCES = testFloatMin.c +testFloatMin_CFLAGS = $(check_INCLUDES) +testFloatMin_LDADD = $(check_LDADD) +testDoubleMin_SOURCES = testDoubleMin.c +testDoubleMin_CFLAGS = $(check_INCLUDES) +testDoubleMin_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/min/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/min/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libMin.la: $(libMin_la_OBJECTS) $(libMin_la_DEPENDENCIES) + $(libMin_la_LINK) -rpath $(pkglibdir) $(libMin_la_OBJECTS) $(libMin_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleMin$(EXEEXT): $(testDoubleMin_OBJECTS) $(testDoubleMin_DEPENDENCIES) + @rm -f testDoubleMin$(EXEEXT) + $(testDoubleMin_LINK) $(testDoubleMin_OBJECTS) $(testDoubleMin_LDADD) $(LIBS) +testFloatMin$(EXEEXT): $(testFloatMin_OBJECTS) $(testFloatMin_DEPENDENCIES) + @rm -f testFloatMin$(EXEEXT) + $(testFloatMin_LINK) $(testFloatMin_OBJECTS) $(testFloatMin_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-dcolumnmina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-dmina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-drowmina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-scolumnmina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-smina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libMin_la-srowmina.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleMin-testDoubleMin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatMin-testFloatMin.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libMin_la-smina.lo: smina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-smina.lo -MD -MP -MF $(DEPDIR)/libMin_la-smina.Tpo -c -o libMin_la-smina.lo `test -f 'smina.c' || echo '$(srcdir)/'`smina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-smina.Tpo $(DEPDIR)/libMin_la-smina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smina.c' object='libMin_la-smina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-smina.lo `test -f 'smina.c' || echo '$(srcdir)/'`smina.c + +libMin_la-srowmina.lo: srowmina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-srowmina.lo -MD -MP -MF $(DEPDIR)/libMin_la-srowmina.Tpo -c -o libMin_la-srowmina.lo `test -f 'srowmina.c' || echo '$(srcdir)/'`srowmina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-srowmina.Tpo $(DEPDIR)/libMin_la-srowmina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowmina.c' object='libMin_la-srowmina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-srowmina.lo `test -f 'srowmina.c' || echo '$(srcdir)/'`srowmina.c + +libMin_la-scolumnmina.lo: scolumnmina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-scolumnmina.lo -MD -MP -MF $(DEPDIR)/libMin_la-scolumnmina.Tpo -c -o libMin_la-scolumnmina.lo `test -f 'scolumnmina.c' || echo '$(srcdir)/'`scolumnmina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-scolumnmina.Tpo $(DEPDIR)/libMin_la-scolumnmina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnmina.c' object='libMin_la-scolumnmina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-scolumnmina.lo `test -f 'scolumnmina.c' || echo '$(srcdir)/'`scolumnmina.c + +libMin_la-dmina.lo: dmina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-dmina.lo -MD -MP -MF $(DEPDIR)/libMin_la-dmina.Tpo -c -o libMin_la-dmina.lo `test -f 'dmina.c' || echo '$(srcdir)/'`dmina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-dmina.Tpo $(DEPDIR)/libMin_la-dmina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dmina.c' object='libMin_la-dmina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-dmina.lo `test -f 'dmina.c' || echo '$(srcdir)/'`dmina.c + +libMin_la-drowmina.lo: drowmina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-drowmina.lo -MD -MP -MF $(DEPDIR)/libMin_la-drowmina.Tpo -c -o libMin_la-drowmina.lo `test -f 'drowmina.c' || echo '$(srcdir)/'`drowmina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-drowmina.Tpo $(DEPDIR)/libMin_la-drowmina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowmina.c' object='libMin_la-drowmina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-drowmina.lo `test -f 'drowmina.c' || echo '$(srcdir)/'`drowmina.c + +libMin_la-dcolumnmina.lo: dcolumnmina.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -MT libMin_la-dcolumnmina.lo -MD -MP -MF $(DEPDIR)/libMin_la-dcolumnmina.Tpo -c -o libMin_la-dcolumnmina.lo `test -f 'dcolumnmina.c' || echo '$(srcdir)/'`dcolumnmina.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libMin_la-dcolumnmina.Tpo $(DEPDIR)/libMin_la-dcolumnmina.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnmina.c' object='libMin_la-dcolumnmina.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libMin_la_CFLAGS) $(CFLAGS) -c -o libMin_la-dcolumnmina.lo `test -f 'dcolumnmina.c' || echo '$(srcdir)/'`dcolumnmina.c + +testDoubleMin-testDoubleMin.o: testDoubleMin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMin_CFLAGS) $(CFLAGS) -MT testDoubleMin-testDoubleMin.o -MD -MP -MF $(DEPDIR)/testDoubleMin-testDoubleMin.Tpo -c -o testDoubleMin-testDoubleMin.o `test -f 'testDoubleMin.c' || echo '$(srcdir)/'`testDoubleMin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMin-testDoubleMin.Tpo $(DEPDIR)/testDoubleMin-testDoubleMin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMin.c' object='testDoubleMin-testDoubleMin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMin_CFLAGS) $(CFLAGS) -c -o testDoubleMin-testDoubleMin.o `test -f 'testDoubleMin.c' || echo '$(srcdir)/'`testDoubleMin.c + +testDoubleMin-testDoubleMin.obj: testDoubleMin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMin_CFLAGS) $(CFLAGS) -MT testDoubleMin-testDoubleMin.obj -MD -MP -MF $(DEPDIR)/testDoubleMin-testDoubleMin.Tpo -c -o testDoubleMin-testDoubleMin.obj `if test -f 'testDoubleMin.c'; then $(CYGPATH_W) 'testDoubleMin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleMin-testDoubleMin.Tpo $(DEPDIR)/testDoubleMin-testDoubleMin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleMin.c' object='testDoubleMin-testDoubleMin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleMin_CFLAGS) $(CFLAGS) -c -o testDoubleMin-testDoubleMin.obj `if test -f 'testDoubleMin.c'; then $(CYGPATH_W) 'testDoubleMin.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleMin.c'; fi` + +testFloatMin-testFloatMin.o: testFloatMin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMin_CFLAGS) $(CFLAGS) -MT testFloatMin-testFloatMin.o -MD -MP -MF $(DEPDIR)/testFloatMin-testFloatMin.Tpo -c -o testFloatMin-testFloatMin.o `test -f 'testFloatMin.c' || echo '$(srcdir)/'`testFloatMin.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMin-testFloatMin.Tpo $(DEPDIR)/testFloatMin-testFloatMin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMin.c' object='testFloatMin-testFloatMin.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMin_CFLAGS) $(CFLAGS) -c -o testFloatMin-testFloatMin.o `test -f 'testFloatMin.c' || echo '$(srcdir)/'`testFloatMin.c + +testFloatMin-testFloatMin.obj: testFloatMin.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMin_CFLAGS) $(CFLAGS) -MT testFloatMin-testFloatMin.obj -MD -MP -MF $(DEPDIR)/testFloatMin-testFloatMin.Tpo -c -o testFloatMin-testFloatMin.obj `if test -f 'testFloatMin.c'; then $(CYGPATH_W) 'testFloatMin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMin.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatMin-testFloatMin.Tpo $(DEPDIR)/testFloatMin-testFloatMin.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatMin.c' object='testFloatMin-testFloatMin.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatMin_CFLAGS) $(CFLAGS) -c -o testFloatMin-testFloatMin.obj `if test -f 'testFloatMin.c'; then $(CYGPATH_W) 'testFloatMin.c'; else $(CYGPATH_W) '$(srcdir)/testFloatMin.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c new file mode 100644 index 00000000..e12cb8ff --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/dcolumnmina.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "statMin.h" + +void dcolumnmina(double *in, int rows, int columns, double* out) { + int i = 0, j = 0; + + for (i = 0; i < rows; i++) { + out[i]=in[i]; + for (j=0;j + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9678E693-3459-4D6F-9017-EA3E28A58AC7} + testDoubleMin + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcxproj.filters new file mode 100644 index 00000000..257addf5 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/test_DoubleMin/testDoubleMin.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj b/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj new file mode 100644 index 00000000..409d4ad8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0A156C36-89D5-485E-BB8E-C7536A1DA566} + testFloatMin + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj.filters new file mode 100644 index 00000000..ab525fab --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/min/test_FloatMin/testFloatMin.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/prod/Makefile.am b/2.3-1/src/c/statisticsFunctions/prod/Makefile.am new file mode 100644 index 00000000..4c217f57 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/Makefile.am @@ -0,0 +1,66 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libProd_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libProd.la + +libProd_la_SOURCES = $(HEAD) $(SRC) + +SRC = sproda.c \ + srowproda.c \ + scolumnproda.c \ + dproda.c \ + drowproda.c \ + dcolumnproda.c \ + cproda.c \ + crowproda.c \ + ccolumnproda.c \ + zproda.c \ + zrowproda.c \ + zcolumnproda.c + +HEAD = ../includes/prod.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/statisticsFunctions/prod/libProd.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatProd testDoubleProd + +TESTS = testFloatProd testDoubleProd + +# +# -*- Prod Tests -*- +# +testFloatProd_SOURCES = testFloatProd.c +testFloatProd_CFLAGS = $(check_INCLUDES) +testFloatProd_LDADD = $(check_LDADD) + +testDoubleProd_SOURCES =testDoubleProd.c +testDoubleProd_CFLAGS = $(check_INCLUDES) +testDoubleProd_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/prod/Makefile.in b/2.3-1/src/c/statisticsFunctions/prod/Makefile.in new file mode 100644 index 00000000..67fb6234 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/Makefile.in @@ -0,0 +1,833 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatProd$(EXEEXT) testDoubleProd$(EXEEXT) +TESTS = testFloatProd$(EXEEXT) testDoubleProd$(EXEEXT) +subdir = src/c/statisticsFunctions/prod +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libProd_la_LIBADD = +am__objects_1 = +am__objects_2 = libProd_la-sproda.lo libProd_la-srowproda.lo \ + libProd_la-scolumnproda.lo libProd_la-dproda.lo \ + libProd_la-drowproda.lo libProd_la-dcolumnproda.lo \ + libProd_la-cproda.lo libProd_la-crowproda.lo \ + libProd_la-ccolumnproda.lo libProd_la-zproda.lo \ + libProd_la-zrowproda.lo libProd_la-zcolumnproda.lo +am_libProd_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libProd_la_OBJECTS = $(am_libProd_la_OBJECTS) +libProd_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libProd_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleProd_OBJECTS = testDoubleProd-testDoubleProd.$(OBJEXT) +testDoubleProd_OBJECTS = $(am_testDoubleProd_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/statisticsFunctions/prod/libProd.la +testDoubleProd_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleProd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleProd_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatProd_OBJECTS = testFloatProd-testFloatProd.$(OBJEXT) +testFloatProd_OBJECTS = $(am_testFloatProd_OBJECTS) +testFloatProd_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatProd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatProd_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libProd_la_SOURCES) $(testDoubleProd_SOURCES) \ + $(testFloatProd_SOURCES) +DIST_SOURCES = $(libProd_la_SOURCES) $(testDoubleProd_SOURCES) \ + $(testFloatProd_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libProd_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libProd.la +libProd_la_SOURCES = $(HEAD) $(SRC) +SRC = sproda.c \ + srowproda.c \ + scolumnproda.c \ + dproda.c \ + drowproda.c \ + dcolumnproda.c \ + cproda.c \ + crowproda.c \ + ccolumnproda.c \ + zproda.c \ + zrowproda.c \ + zcolumnproda.c + +HEAD = ../includes/prod.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/statisticsFunctions/prod/libProd.la \ + @LIBMATH@ + + +# +# -*- Prod Tests -*- +# +testFloatProd_SOURCES = testFloatProd.c +testFloatProd_CFLAGS = $(check_INCLUDES) +testFloatProd_LDADD = $(check_LDADD) +testDoubleProd_SOURCES = testDoubleProd.c +testDoubleProd_CFLAGS = $(check_INCLUDES) +testDoubleProd_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/prod/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/prod/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libProd.la: $(libProd_la_OBJECTS) $(libProd_la_DEPENDENCIES) + $(libProd_la_LINK) -rpath $(pkglibdir) $(libProd_la_OBJECTS) $(libProd_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleProd$(EXEEXT): $(testDoubleProd_OBJECTS) $(testDoubleProd_DEPENDENCIES) + @rm -f testDoubleProd$(EXEEXT) + $(testDoubleProd_LINK) $(testDoubleProd_OBJECTS) $(testDoubleProd_LDADD) $(LIBS) +testFloatProd$(EXEEXT): $(testFloatProd_OBJECTS) $(testFloatProd_DEPENDENCIES) + @rm -f testFloatProd$(EXEEXT) + $(testFloatProd_LINK) $(testFloatProd_OBJECTS) $(testFloatProd_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-ccolumnproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-cproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-crowproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-dcolumnproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-dproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-drowproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-scolumnproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-sproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-srowproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-zcolumnproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-zproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libProd_la-zrowproda.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleProd-testDoubleProd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatProd-testFloatProd.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libProd_la-sproda.lo: sproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-sproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-sproda.Tpo -c -o libProd_la-sproda.lo `test -f 'sproda.c' || echo '$(srcdir)/'`sproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-sproda.Tpo $(DEPDIR)/libProd_la-sproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sproda.c' object='libProd_la-sproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-sproda.lo `test -f 'sproda.c' || echo '$(srcdir)/'`sproda.c + +libProd_la-srowproda.lo: srowproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-srowproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-srowproda.Tpo -c -o libProd_la-srowproda.lo `test -f 'srowproda.c' || echo '$(srcdir)/'`srowproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-srowproda.Tpo $(DEPDIR)/libProd_la-srowproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowproda.c' object='libProd_la-srowproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-srowproda.lo `test -f 'srowproda.c' || echo '$(srcdir)/'`srowproda.c + +libProd_la-scolumnproda.lo: scolumnproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-scolumnproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-scolumnproda.Tpo -c -o libProd_la-scolumnproda.lo `test -f 'scolumnproda.c' || echo '$(srcdir)/'`scolumnproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-scolumnproda.Tpo $(DEPDIR)/libProd_la-scolumnproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnproda.c' object='libProd_la-scolumnproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-scolumnproda.lo `test -f 'scolumnproda.c' || echo '$(srcdir)/'`scolumnproda.c + +libProd_la-dproda.lo: dproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-dproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-dproda.Tpo -c -o libProd_la-dproda.lo `test -f 'dproda.c' || echo '$(srcdir)/'`dproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-dproda.Tpo $(DEPDIR)/libProd_la-dproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dproda.c' object='libProd_la-dproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-dproda.lo `test -f 'dproda.c' || echo '$(srcdir)/'`dproda.c + +libProd_la-drowproda.lo: drowproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-drowproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-drowproda.Tpo -c -o libProd_la-drowproda.lo `test -f 'drowproda.c' || echo '$(srcdir)/'`drowproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-drowproda.Tpo $(DEPDIR)/libProd_la-drowproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowproda.c' object='libProd_la-drowproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-drowproda.lo `test -f 'drowproda.c' || echo '$(srcdir)/'`drowproda.c + +libProd_la-dcolumnproda.lo: dcolumnproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-dcolumnproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-dcolumnproda.Tpo -c -o libProd_la-dcolumnproda.lo `test -f 'dcolumnproda.c' || echo '$(srcdir)/'`dcolumnproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-dcolumnproda.Tpo $(DEPDIR)/libProd_la-dcolumnproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnproda.c' object='libProd_la-dcolumnproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-dcolumnproda.lo `test -f 'dcolumnproda.c' || echo '$(srcdir)/'`dcolumnproda.c + +libProd_la-cproda.lo: cproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-cproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-cproda.Tpo -c -o libProd_la-cproda.lo `test -f 'cproda.c' || echo '$(srcdir)/'`cproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-cproda.Tpo $(DEPDIR)/libProd_la-cproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cproda.c' object='libProd_la-cproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-cproda.lo `test -f 'cproda.c' || echo '$(srcdir)/'`cproda.c + +libProd_la-crowproda.lo: crowproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-crowproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-crowproda.Tpo -c -o libProd_la-crowproda.lo `test -f 'crowproda.c' || echo '$(srcdir)/'`crowproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-crowproda.Tpo $(DEPDIR)/libProd_la-crowproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowproda.c' object='libProd_la-crowproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-crowproda.lo `test -f 'crowproda.c' || echo '$(srcdir)/'`crowproda.c + +libProd_la-ccolumnproda.lo: ccolumnproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-ccolumnproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-ccolumnproda.Tpo -c -o libProd_la-ccolumnproda.lo `test -f 'ccolumnproda.c' || echo '$(srcdir)/'`ccolumnproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-ccolumnproda.Tpo $(DEPDIR)/libProd_la-ccolumnproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnproda.c' object='libProd_la-ccolumnproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-ccolumnproda.lo `test -f 'ccolumnproda.c' || echo '$(srcdir)/'`ccolumnproda.c + +libProd_la-zproda.lo: zproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-zproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-zproda.Tpo -c -o libProd_la-zproda.lo `test -f 'zproda.c' || echo '$(srcdir)/'`zproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-zproda.Tpo $(DEPDIR)/libProd_la-zproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zproda.c' object='libProd_la-zproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-zproda.lo `test -f 'zproda.c' || echo '$(srcdir)/'`zproda.c + +libProd_la-zrowproda.lo: zrowproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-zrowproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-zrowproda.Tpo -c -o libProd_la-zrowproda.lo `test -f 'zrowproda.c' || echo '$(srcdir)/'`zrowproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-zrowproda.Tpo $(DEPDIR)/libProd_la-zrowproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowproda.c' object='libProd_la-zrowproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-zrowproda.lo `test -f 'zrowproda.c' || echo '$(srcdir)/'`zrowproda.c + +libProd_la-zcolumnproda.lo: zcolumnproda.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -MT libProd_la-zcolumnproda.lo -MD -MP -MF $(DEPDIR)/libProd_la-zcolumnproda.Tpo -c -o libProd_la-zcolumnproda.lo `test -f 'zcolumnproda.c' || echo '$(srcdir)/'`zcolumnproda.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libProd_la-zcolumnproda.Tpo $(DEPDIR)/libProd_la-zcolumnproda.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnproda.c' object='libProd_la-zcolumnproda.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libProd_la_CFLAGS) $(CFLAGS) -c -o libProd_la-zcolumnproda.lo `test -f 'zcolumnproda.c' || echo '$(srcdir)/'`zcolumnproda.c + +testDoubleProd-testDoubleProd.o: testDoubleProd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleProd_CFLAGS) $(CFLAGS) -MT testDoubleProd-testDoubleProd.o -MD -MP -MF $(DEPDIR)/testDoubleProd-testDoubleProd.Tpo -c -o testDoubleProd-testDoubleProd.o `test -f 'testDoubleProd.c' || echo '$(srcdir)/'`testDoubleProd.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleProd-testDoubleProd.Tpo $(DEPDIR)/testDoubleProd-testDoubleProd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleProd.c' object='testDoubleProd-testDoubleProd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleProd_CFLAGS) $(CFLAGS) -c -o testDoubleProd-testDoubleProd.o `test -f 'testDoubleProd.c' || echo '$(srcdir)/'`testDoubleProd.c + +testDoubleProd-testDoubleProd.obj: testDoubleProd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleProd_CFLAGS) $(CFLAGS) -MT testDoubleProd-testDoubleProd.obj -MD -MP -MF $(DEPDIR)/testDoubleProd-testDoubleProd.Tpo -c -o testDoubleProd-testDoubleProd.obj `if test -f 'testDoubleProd.c'; then $(CYGPATH_W) 'testDoubleProd.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleProd.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleProd-testDoubleProd.Tpo $(DEPDIR)/testDoubleProd-testDoubleProd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleProd.c' object='testDoubleProd-testDoubleProd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleProd_CFLAGS) $(CFLAGS) -c -o testDoubleProd-testDoubleProd.obj `if test -f 'testDoubleProd.c'; then $(CYGPATH_W) 'testDoubleProd.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleProd.c'; fi` + +testFloatProd-testFloatProd.o: testFloatProd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatProd_CFLAGS) $(CFLAGS) -MT testFloatProd-testFloatProd.o -MD -MP -MF $(DEPDIR)/testFloatProd-testFloatProd.Tpo -c -o testFloatProd-testFloatProd.o `test -f 'testFloatProd.c' || echo '$(srcdir)/'`testFloatProd.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatProd-testFloatProd.Tpo $(DEPDIR)/testFloatProd-testFloatProd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatProd.c' object='testFloatProd-testFloatProd.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatProd_CFLAGS) $(CFLAGS) -c -o testFloatProd-testFloatProd.o `test -f 'testFloatProd.c' || echo '$(srcdir)/'`testFloatProd.c + +testFloatProd-testFloatProd.obj: testFloatProd.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatProd_CFLAGS) $(CFLAGS) -MT testFloatProd-testFloatProd.obj -MD -MP -MF $(DEPDIR)/testFloatProd-testFloatProd.Tpo -c -o testFloatProd-testFloatProd.obj `if test -f 'testFloatProd.c'; then $(CYGPATH_W) 'testFloatProd.c'; else $(CYGPATH_W) '$(srcdir)/testFloatProd.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatProd-testFloatProd.Tpo $(DEPDIR)/testFloatProd-testFloatProd.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatProd.c' object='testFloatProd-testFloatProd.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatProd_CFLAGS) $(CFLAGS) -c -o testFloatProd-testFloatProd.obj `if test -f 'testFloatProd.c'; then $(CYGPATH_W) 'testFloatProd.c'; else $(CYGPATH_W) '$(srcdir)/testFloatProd.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/prod/ccolumnproda.c b/2.3-1/src/c/statisticsFunctions/prod/ccolumnproda.c new file mode 100644 index 00000000..8ea35e21 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/ccolumnproda.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" +#include "multiplication.h" + +void ccolumnproda(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = cmuls(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/cproda.c b/2.3-1/src/c/statisticsFunctions/prod/cproda.c new file mode 100644 index 00000000..fe0c65db --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/cproda.c @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "prod.h" +#include "multiplication.h" + + +floatComplex cproda(floatComplex *in, int size) { + floatComplex accumulate = in[0]; + int i = 0; + + + for (i = 1; i < size; ++i) + { + accumulate = cmuls(accumulate,in[i]); + } + return accumulate; + +} + + diff --git a/2.3-1/src/c/statisticsFunctions/prod/crowproda.c b/2.3-1/src/c/statisticsFunctions/prod/crowproda.c new file mode 100644 index 00000000..463895da --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/crowproda.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" +#include "multiplication.h" + +void crowproda(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = cmuls( out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/dcolumnproda.c b/2.3-1/src/c/statisticsFunctions/prod/dcolumnproda.c new file mode 100644 index 00000000..6ecdcdcb --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/dcolumnproda.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" + +void dcolumnproda(double *in, int lines, int columns, double * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] *= in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/dproda.c b/2.3-1/src/c/statisticsFunctions/prod/dproda.c new file mode 100644 index 00000000..cc05890d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/dproda.c @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "prod.h" + + +double dproda(double *in, int size) { + double accumulate = in[0]; + int i = 0; + + + for (i = 1; i < size; ++i) + { + accumulate *= in[i]; + } + return accumulate; + +} + + diff --git a/2.3-1/src/c/statisticsFunctions/prod/drowproda.c b/2.3-1/src/c/statisticsFunctions/prod/drowproda.c new file mode 100644 index 00000000..14f713c7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/drowproda.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" + +void drowproda(double *in, int lines, int columns, double * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] *= in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/scolumnproda.c b/2.3-1/src/c/statisticsFunctions/prod/scolumnproda.c new file mode 100644 index 00000000..842d3d18 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/scolumnproda.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" + +void scolumnproda(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] *= in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/sproda.c b/2.3-1/src/c/statisticsFunctions/prod/sproda.c new file mode 100644 index 00000000..9c5bfc24 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/sproda.c @@ -0,0 +1,29 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "prod.h" + + +float sproda(float *in, int size) { + float accumulate = in[0]; + int i = 0; + + + for (i = 1; i < size; ++i) + { + accumulate *= in[i]; + } + return accumulate; + +} + + diff --git a/2.3-1/src/c/statisticsFunctions/prod/srowproda.c b/2.3-1/src/c/statisticsFunctions/prod/srowproda.c new file mode 100644 index 00000000..197072ad --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/srowproda.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" + +void srowproda(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] *= in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/testDoubleProd.c b/2.3-1/src/c/statisticsFunctions/prod/testDoubleProd.c new file mode 100644 index 00000000..6b5972a6 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/testDoubleProd.c @@ -0,0 +1,519 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "prod.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dprodsTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + + printf("\n>>>> prod Double Scalar Test\n"); + assert(dprods(value1) == 3.0); + assert(dprods(value2) == 1.123456789); + + return 0; +} + +static int dprodaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double table2[5] = {9.186784563, + 9.186784563, + 9.186784563, + 9.186784563, + 9.186784563}; + + printf("\n>>>> prod Double Array Test\n"); + printf("%f\n", dproda(table1, 3)); + assert(dproda(table1, 3) == 27.0); + assert((dproda(table2, 5) - (9.186784563 * 9.186784563 * 9.186784563 * 9.186784563 * 9.186784563)) / dproda(table2, 5) < 3e-15); + return 0; +} + +static int dcolumnprodaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double columnProductedTable1_3_3[3] = {0}; + double columnProductedTable1_1_9[1] = {0}; + double columnProductedTable1_9_1[9] = {0}; + double columnProductedTable2_2_5[2] = {0}; + double columnProductedTable2_5_2[5] = {0}; + + printf("\n>>>> Column prod Double Array Test\n"); + /* + [ 1 2 3 ] [ 1*2*3=6 ] + [ 4 5 6 ] => [ 4*5*6=120 ] + [ 7 8 9 ] [ 7*8*9=504 ] + */ + dcolumnproda(table1, 3, 3,columnProductedTable1_3_3); + assert(columnProductedTable1_3_3[0] == 6.0); + assert(columnProductedTable1_3_3[1] == 120.0); + assert(columnProductedTable1_3_3[2] == 504.0); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 362880 ] + */ + dcolumnproda(table1, 1, 9,columnProductedTable1_1_9); + assert(columnProductedTable1_1_9[0] == 362880.0); + + /* + [ 1 ] [ 1 ] + [ 2 ] [ 2 ] + [ 3 ] [ 3 ] + [ 4 ] [ 4 ] + [ 5 ] => [ 5 ] + [ 6 ] [ 6 ] + [ 7 ] [ 7 ] + [ 8 ] [ 8 ] + [ 9 ] [ 9 ] + */ + dcolumnproda(table1, 9, 1,columnProductedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnProductedTable1_9_1[%d] = %e\n", i, columnProductedTable1_9_1[i]); + assert(columnProductedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] [ 945 ] + [ 2 4 6 8 10 ] => [ 3840 ] + */ + dcolumnproda(table2, 2, 5,columnProductedTable2_2_5); + assert(columnProductedTable2_2_5[0] == 945.0); + assert(columnProductedTable2_2_5[1] == 3840.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnProductedTable2_2_5[%d] = %e\n", i, columnProductedTable2_2_5[i]); + } + + /* + [ 1 6 ] [ 6 ] + [ 2 7 ] => [ 14 ] + [ 3 8 ] [ 24 ] + [ 4 9 ] [ 36 ] + [ 5 10 ] [ 50 ] + */ + dcolumnproda(table2, 5, 2,columnProductedTable2_5_2); + assert(columnProductedTable2_5_2[0] == 6.0); + assert(columnProductedTable2_5_2[1] == 14.0); + assert(columnProductedTable2_5_2[2] == 24.0); + assert(columnProductedTable2_5_2[3] == 36.0); + assert(columnProductedTable2_5_2[4] == 50.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnProductedTable2_5_2[%d] = %e\n", i, columnProductedTable2_5_2[i]); + } + + return 0; +} + +static int drowprodaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double rowProductedTable1_3_3[3] = {0}; + double rowProductedTable1_1_9[9] = {0}; + double rowProductedTable1_9_1[1] = {0}; + double rowProductedTable2_2_5[5] = {0}; + double rowProductedTable2_5_2[2] = {0}; + + printf("\n>>>> Row prod Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 28 80 162 ] + [ 7 8 9 ] + */ + drowproda(table1, 3, 3,rowProductedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowProductedTable1_3_3[%d] = %e\n", i, rowProductedTable1_3_3[i]); + } + assert(rowProductedTable1_3_3[0] == 28.0); + assert(rowProductedTable1_3_3[1] == 80.0); + assert(rowProductedTable1_3_3[2] == 162.0); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 1 2 3 4 5 6 7 8 9 ] + */ + drowproda(table1, 1, 9,rowProductedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowProductedTable1_1_9[%d] = %e\n", i, rowProductedTable1_1_9[i]); + assert(rowProductedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 362880 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowproda(table1, 9, 1,rowProductedTable1_9_1); + assert(rowProductedTable1_9_1[0] == 362880.0); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 2 12 30 56 90 ] + */ + drowproda(table2, 2, 5,rowProductedTable2_2_5); + assert(rowProductedTable2_2_5[0] == 2.0); + assert(rowProductedTable2_2_5[1] == 12.0); + assert(rowProductedTable2_2_5[2] == 30.0); + assert(rowProductedTable2_2_5[3] == 56.0); + assert(rowProductedTable2_2_5[4] == 90.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowProductedTable2_2_5[%d] = %e\n", i, rowProductedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 120 30240 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + drowproda(table2, 5, 2,rowProductedTable2_5_2); + assert(rowProductedTable2_5_2[0] == 120.0); + assert(rowProductedTable2_5_2[1] == 30240.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowProductedTable2_5_2[%d] = %e\n", i, rowProductedTable2_5_2[i]); + } + + return 0; +} + +static int zprodsTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + + printf("\n>>>> prod Double Complex Scalar Test\n"); + assert(zreals(zprods(value1)) == 3.0); + assert(zimags(zprods(value1)) == 3.0); + assert(zreals(zprods(value2)) == 1.123456789); + assert(zimags(zprods(value2)) == 1.123456789); + return 0; +} + +static int zprodaTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex table1[3]; + doubleComplex value2 = DoubleComplex(9.186784563,9.186784563); + doubleComplex table2[5]; + + printf("\n>>>> prod Double Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", zreals(zproda(table1, 3))); + printf("%e\n", zimags(zproda(table1, 3))); + printf("%1.20f\n", zreals(zproda(table2, 5))); + printf("%1.20f\n", zimags(zproda(table2, 5))); + printf("%1.20f\n", zreals(zproda(table2, 5)) + 261744.55211053110542707); + printf("--------\n"); +#endif + assert(zreals(zproda(table1, 3)) == -54.0); + assert(zimags(zproda(table1, 3)) == 54.0); + assert(fabs(zreals(zproda(table2, 5)) + 261744.55211053110542707) < 3e-16); + assert(fabs(zimags(zproda(table2, 5)) + 261744.55211053110542707) < 3e-16); + + return 0; +} + +static int zrowprodaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex rowProductedIn_4_3[3]; + doubleComplex rowProductedIn_3_4[4]; + doubleComplex rowProductedIn_6_2[2]; + doubleComplex rowProductedIn_2_6[6]; + doubleComplex rowProductedIn_1_12[12]; + doubleComplex rowProductedIn_12_1[1]; + + printf("\n>>>> Row prod Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6787000000000000810019 - 0.5456i + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] - 0.3964999999999999635847, + [ 0.3+0.8i 0.7+0.4i 1.1 ] 0.678700000000000192024 + 0.5456i] + */ + zrowproda(in, 4, 3, rowProductedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowProductedIn_4_3[%d] = %e + %ei\n", i, zreals(rowProductedIn_4_3[i]), zimags(rowProductedIn_4_3[i])); + } + assert(fabs(zreals(rowProductedIn_4_3[0]) - 0.6787000000000000810019) < 3e-16); + assert(fabs(zimags(rowProductedIn_4_3[0]) + 0.5456) < 3e-16); + assert(fabs(zreals(rowProductedIn_4_3[1]) + 0.3964999999999999635847) < 3e-16); + assert(fabs(zimags(rowProductedIn_4_3[1]) - 0.0) < 3e-16); + assert(fabs(zreals(rowProductedIn_4_3[2]) - 0.6787000000000000810019) < 3e-16); + assert(fabs(zimags(rowProductedIn_4_3[2]) - 0.5456) < 3e-16); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ - 0.3190000000000000612843 - 0.9680000000000000826006i, + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] - 0.5380000000000000337508 + 0.0010000000000000563993i, + - 0.0010000000000000008882 + 0.5379999999999999227285i, + 0.9680000000000000826006 + 0.3190000000000000612843i ] + */ + zrowproda(in, 3, 4, rowProductedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowProductedIn_3_4[%d] = %e + %ei\n", i, zreals(rowProductedIn_3_4[i]), zimags(rowProductedIn_3_4[i])); + } + assert(fabs(zreals(rowProductedIn_3_4[0]) + 0.3190000000000000612843) < 3e-16); + assert(fabs(zimags(rowProductedIn_3_4[0]) + 0.9680000000000000826006) < 3e-16); + assert(fabs(zreals(rowProductedIn_3_4[1]) + 0.5380000000000000337508) < 3e-16); + assert(fabs(zimags(rowProductedIn_3_4[1]) - 0.0010000000000000563993 ) < 3e-16); + assert(fabs(zreals(rowProductedIn_3_4[2]) + 0.0010000000000000008882) < 3e-16); + assert(fabs(zimags(rowProductedIn_3_4[2]) - 0.5379999999999999227285) < 3e-16); + assert(fabs(zreals(rowProductedIn_3_4[3]) - 0.9680000000000000826006) < 3e-16); + assert(fabs(zimags(rowProductedIn_3_4[3]) - 0.3190000000000000612843) < 3e-16); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.1725900000000000766853 + 0.5204650000000000664713i, + [ 0.3+0.8i 0.9+0.2i ] - 0.1725899999999999934186 + 0.5204649999999999554490i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zrowproda(in, 6, 2, rowProductedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowProductedIn_6_2[%d] = %e + %ei\n", i, zreals(rowProductedIn_6_2[i]), zimags(rowProductedIn_6_2[i])); + } + assert(fabs(zreals(rowProductedIn_6_2[0]) - 0.1725900000000000766853) < 3e-16); + assert(fabs(zimags(rowProductedIn_6_2[0]) - 0.5204650000000000664713) < 3e-16); + assert(fabs(zreals(rowProductedIn_6_2[1]) + 0.1725899999999999934186) < 3e-16); + assert(fabs(zimags(rowProductedIn_6_2[1]) - 0.5204649999999999554490 ) < 3e-16); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ - 1.1000000000000000888178 + 0.11i, + - 0.6600000000000001421086 + 0.4300000000000000488498i, + - 0.2199999999999999733547 + 0.5899999999999999689138i, + 0.2199999999999999733547 + 0.5899999999999999689138i, + 0.6600000000000001421086 + 0.4300000000000000488498i, + 1.1000000000000000888178 + 0.11i ] + */ + zrowproda(in, 2, 6, rowProductedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowProductedIn_2_6[%d] = %e + %ei\n", i, zreals(rowProductedIn_2_6[i]), zimags(rowProductedIn_2_6[i])); + } + assert(fabs(zreals(rowProductedIn_2_6[0]) + 1.1000000000000000888178) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[0]) - 0.11) < 3e-16); + assert(fabs(zreals(rowProductedIn_2_6[1]) + 0.6600000000000001421086) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[1]) - 0.4300000000000000488498 ) < 3e-16); + assert(fabs(zreals(rowProductedIn_2_6[2]) + 0.2199999999999999733547) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[2]) - 0.5899999999999999689138) < 3e-16); + assert(fabs(zreals(rowProductedIn_2_6[3]) - 0.2199999999999999733547) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[3]) - 0.5899999999999999689138 ) < 3e-16); + assert(fabs(zreals(rowProductedIn_2_6[4]) - 0.6600000000000001421086) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[4]) - 0.4300000000000000488498) < 3e-16); + assert(fabs(zreals(rowProductedIn_2_6[5]) - 1.1000000000000000888178) < 3e-16); + assert(fabs(zimags(rowProductedIn_2_6[5]) - 0.11 ) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + zrowproda(in, 1, 12, rowProductedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowProductedIn_1_12[%d] = %e + %ei\n", i, zreals(rowProductedIn_1_12[i]), zimags(rowProductedIn_1_12[i])); + assert(zreals(rowProductedIn_1_12[i]) == zreals(in[i]) && zimags(rowProductedIn_1_12[i]) == zimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [- 0.3006711243250001497351 + 0.0000000000000000038164i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + + */ + zrowproda(in, 12, 1, rowProductedIn_12_1); + printf("rowProductedIn_12_1[%d] = %e + %ei\n", 0, zreals(rowProductedIn_12_1[0]), zimags(rowProductedIn_12_1[0])); + assert(fabs(zreals(rowProductedIn_12_1[0]) + 0.3006711243250001497351) < 3e-16); + assert(fabs(zimags(rowProductedIn_12_1[0]) - 0.0000000000000000038164) < 3e-16); + + return 0; +} + +static int zcolumnprodaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex columnProductedIn_4_3[4]; + doubleComplex columnProductedIn_3_4[3]; + doubleComplex columnProductedIn_6_2[6]; + doubleComplex columnProductedIn_2_6[2]; + doubleComplex columnProductedIn_1_12[1]; + doubleComplex columnProductedIn_12_1[12]; + + printf("\n>>>> Columnprod Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] [ - 0.7480000000000001092460 + 0.1210000000000001074696i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ - 0.6069999999999999840128 + 0.3940000000000001278977i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] [ - 0.3940000000000000168754 + 0.6069999999999999840128i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] [ - 0.1210000000000000935918 + 0.7479999999999999982236i ] + */ + zcolumnproda(in, 4, 3, columnProductedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnProductedIn_4_3[%d] = %e + %ei\n", i, zreals(columnProductedIn_4_3[i]), zimags(columnProductedIn_4_3[i])); + } + assert(fabs(zreals(columnProductedIn_4_3[0]) + 0.7480000000000001092460) < 3e-16); + assert(fabs(zimags(columnProductedIn_4_3[0]) - 0.1210000000000001074696) < 3e-16); + assert(fabs(zreals(columnProductedIn_4_3[1]) + 0.6069999999999999840128) < 3e-16); + assert(fabs(zimags(columnProductedIn_4_3[1]) - 0.394000000000000127897) < 3e-16); + assert(fabs(zreals(columnProductedIn_4_3[2]) + 0.3940000000000000168754) < 3e-16); + assert(fabs(zimags(columnProductedIn_4_3[2]) - 0.606999999999999984012) < 3e-16); + assert(fabs(zreals(columnProductedIn_4_3[3]) + 0.1210000000000000935918) < 3e-16); + assert(fabs(zimags(columnProductedIn_4_3[3]) - 0.7479999999999999982236) < 3e-16); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] [ - 0.5753000000000000335731 - 0.3564000000000000500933i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ - 0.6564999999999998614442 + 0.0000000000000000693889i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] [ - 0.5753000000000001445955 + 0.3564000000000001056044i ] + */ + zcolumnproda(in, 3, 4, columnProductedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnProductedIn_3_4[%d] = %e + %ei\n", i, zreals(columnProductedIn_3_4[i]), zimags(columnProductedIn_3_4[i])); + } + assert(fabs(zreals(columnProductedIn_3_4[0]) + 0.5753000000000000335731) < 3e-16); + assert(fabs(zimags(columnProductedIn_3_4[0]) + 0.3564000000000000500933) < 3e-16); + assert(fabs(zreals(columnProductedIn_3_4[1]) + 0.6564999999999998614442) < 3e-16); + assert(fabs(zimags(columnProductedIn_3_4[1]) - 0.0000000000000000693889) < 3e-16); + assert(fabs(zreals(columnProductedIn_3_4[2]) + 0.5753000000000001445955) < 3e-16); + assert(fabs(zimags(columnProductedIn_3_4[2]) - 0.3564000000000001056044) < 3e-16); + + /* + [ 1.1i 0.6+0.5i ] [ - 0.5500000000000000444089 + 0.6600000000000000310862i ] + [ 0.1+i 0.7+0.4i ] [ - 0.3300000000000000155431 + 0.7399999999999999911182i ] + [ 0.2+0.9i 0.8+0.3i ] => [ - 0.1099999999999999866773 + 0.7800000000000000266454i ] + [ 0.3+0.8i 0.9+0.2i ] [ 0.1099999999999999866773 + 0.7800000000000000266454i ] + [ 0.4+0.7i 1+0.1i ] [ 0.3300000000000000155431 + 0.7399999999999999911182i ] + [ 0.5+0.6i 1.1 ] [ 0.5500000000000000444089 + 0.6600000000000000310862i ] + */ + zcolumnproda(in, 6, 2, columnProductedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnProductedIn_6_2[%d] = %e + %ei\n", i, zreals(columnProductedIn_6_2[i]), zimags(columnProductedIn_6_2[i])); + } + assert(fabs(zreals(columnProductedIn_6_2[0]) + 0.5500000000000000444089) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[0]) - 0.6600000000000000310862) < 3e-16); + assert(fabs(zreals(columnProductedIn_6_2[1]) + 0.3300000000000000155431) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[1]) - 0.7399999999999999911182) < 3e-16); + assert(fabs(zreals(columnProductedIn_6_2[2]) + 0.1099999999999999866773) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[2]) - 0.7800000000000000266454) < 3e-16); + assert(fabs(zreals(columnProductedIn_6_2[3]) - 0.1099999999999999866773) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[3]) - 0.7800000000000000266454) < 3e-16); + assert(fabs(zreals(columnProductedIn_6_2[4]) - 0.3300000000000000155431) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[4]) - 0.7399999999999999911182) < 3e-16); + assert(fabs(zreals(columnProductedIn_6_2[5]) - 0.5500000000000000444089) < 3e-16); + assert(fabs(zimags(columnProductedIn_6_2[5]) - 0.6600000000000000310862) < 3e-16); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] [ 0.2212649999999999894662 - 0.5017100000000001003286i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ - 0.2212649999999999894662 - 0.5017100000000001003286i ] + */ + zcolumnproda(in, 2, 6, columnProductedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnProductedIn_2_6[%d] = %e + %ei\n", i, zreals(columnProductedIn_2_6[i]), zimags(columnProductedIn_2_6[i])); + } + assert(fabs(zreals(columnProductedIn_2_6[0]) - 0.2212649999999999894662) < 3e-16); + assert(fabs(zimags(columnProductedIn_2_6[0]) + 0.5017100000000001003286) < 3e-16); + assert(fabs(zreals(columnProductedIn_2_6[1]) + 0.2212649999999999894662) < 3e-16); + assert(fabs(zimags(columnProductedIn_2_6[1]) + 0.5017100000000001003286) < 3e-16); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ - 0.3006711243250001497351 + 0.0000000000000000038164i ] + */ + zcolumnproda(in, 1, 12, columnProductedIn_1_12); + printf("columnProductedIn_1_12[%d] = %e + %ei\n", 0, zreals(columnProductedIn_1_12[0]), zimags(columnProductedIn_1_12[0])); + assert(fabs(zreals(columnProductedIn_1_12[0]) + 0.3006711243250001497351) < 3e-16); + assert(fabs(zimags(columnProductedIn_1_12[0]) - 0.0000000000000000038164) < 3e-16); + + + /* + [ 1.1i ] => [ 1.1i ] + [ 0.1+i ] => [ 0.1+i ] + [ 0.2+0.9i ] => [ 0.2+0.9i ] + [ 0.3+0.8i ] => [ 0.3+0.8i ] + [ 0.4+0.7i ] => [ 0.4+0.7i ] + [ 0.5+0.6i ] => [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 0.6+0.5i ] + [ 0.7+0.4i ] => [ 0.7+0.4i ] + [ 0.8+0.3i ] => [ 0.8+0.3i ] + [ 0.9+0.2i ] => [ 0.9+0.2i ] + [ 1+0.1i ] => [ 1+0.1i ] + [ 1.1 ] => [ 1.1 ] + */ + zcolumnproda(in, 12, 1, columnProductedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnProductedIn_12_1[%d] = %e + %ei\n", i, zreals(columnProductedIn_12_1[i]), zimags(columnProductedIn_12_1[i])); + assert(zreals(columnProductedIn_12_1[i]) == zreals(in[i]) && zimags(columnProductedIn_12_1[i]) == zimags(in[i])); + } + + return 0; +} + +static int testprod(void) { + + dprodsTest(); + dprodaTest(); + drowprodaTest(); + dcolumnprodaTest(); + zprodsTest(); + zprodaTest(); + zrowprodaTest(); + zcolumnprodaTest(); + + return 0; +} + +int main(void) { + assert(testprod() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/testFloatProd.c b/2.3-1/src/c/statisticsFunctions/prod/testFloatProd.c new file mode 100644 index 00000000..b5fe20c4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/testFloatProd.c @@ -0,0 +1,527 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "prod.h" + + #define LOCAL_DEBUG + +static int sprodsTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + + printf("\n>>>> Prod Float Scalar Test\n"); + assert(sprods(value1) == 3.0f); + assert(sprods(value2) == 1.123456789f); + + return 0; +} + +static int sprodaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float table2[5] = {9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f}; + + printf("\n>>>> Prod Float Array Test\n"); + printf("%f\n", sproda(table1, 3)); + assert(sproda(table1, 3) == 27.0f); + assert((sproda(table2, 5) - (9.186784f * 9.186784f * 9.186784f * 9.186784f * 9.186784f)) / sproda(table2, 5) < 1e-6); + return 0; +} + +static int scolumnprodaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float columnProductedTable1_3_3[3] = {0}; + float columnProductedTable1_1_9[1] = {0}; + float columnProductedTable1_9_1[9] = {0}; + float columnProductedTable2_2_5[2] = {0}; + float columnProductedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Prod Float Array Test\n"); + /* + [ 1 2 3 ] [ 1*2*3=6 ] + [ 4 5 6 ] => [ 4*5*6=120 ] + [ 7 8 9 ] [ 7*8*9=504 ] + */ + scolumnproda(table1, 3, 3,columnProductedTable1_3_3); + assert(columnProductedTable1_3_3[0] == 6.0f); + assert(columnProductedTable1_3_3[1] == 120.0f); + assert(columnProductedTable1_3_3[2] == 504.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 362880 ] + */ + scolumnproda(table1, 1, 9,columnProductedTable1_1_9); + assert(columnProductedTable1_1_9[0] == 362880.0f); + + /* + [ 1 ] [ 1 ] + [ 2 ] [ 2 ] + [ 3 ] [ 3 ] + [ 4 ] [ 4 ] + [ 5 ] => [ 5 ] + [ 6 ] [ 6 ] + [ 7 ] [ 7 ] + [ 8 ] [ 8 ] + [ 9 ] [ 9 ] + */ + scolumnproda(table1, 9, 1,columnProductedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnProductedTable1_9_1[%d] = %e\n", i, columnProductedTable1_9_1[i]); + assert(columnProductedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] [ 945 ] + [ 2 4 6 8 10 ] => [ 3840 ] + */ + scolumnproda(table2, 2, 5,columnProductedTable2_2_5); + assert(columnProductedTable2_2_5[0] == 945.0f); + assert(columnProductedTable2_2_5[1] == 3840.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnProductedTable2_2_5[%d] = %e\n", i, columnProductedTable2_2_5[i]); + } + + /* + [ 1 6 ] [ 6 ] + [ 2 7 ] => [ 14 ] + [ 3 8 ] [ 24 ] + [ 4 9 ] [ 36 ] + [ 5 10 ] [ 50 ] + */ + scolumnproda(table2, 5, 2,columnProductedTable2_5_2); + assert(columnProductedTable2_5_2[0] == 6.0f); + assert(columnProductedTable2_5_2[1] == 14.0f); + assert(columnProductedTable2_5_2[2] == 24.0f); + assert(columnProductedTable2_5_2[3] == 36.0f); + assert(columnProductedTable2_5_2[4] == 50.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnProductedTable2_5_2[%d] = %e\n", i, columnProductedTable2_5_2[i]); + } + + return 0; +} + +static int srowprodaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float rowProductedTable1_3_3[3] = {0}; + float rowProductedTable1_1_9[9] = {0}; + float rowProductedTable1_9_1[1] = {0}; + float rowProductedTable2_2_5[5] = {0}; + float rowProductedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Prod Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 28 80 162 ] + [ 7 8 9 ] + */ + srowproda(table1, 3, 3,rowProductedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowProductedTable1_3_3[%d] = %e\n", i, rowProductedTable1_3_3[i]); + } + assert(rowProductedTable1_3_3[0] == 28.0f); + assert(rowProductedTable1_3_3[1] == 80.0f); + assert(rowProductedTable1_3_3[2] == 162.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 1 2 3 4 5 6 7 8 9 ] + */ + srowproda(table1, 1, 9,rowProductedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowProductedTable1_1_9[%d] = %e\n", i, rowProductedTable1_1_9[i]); + assert(rowProductedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 362880 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowproda(table1, 9, 1,rowProductedTable1_9_1); + assert(rowProductedTable1_9_1[0] == 362880.0f); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 2 12 30 56 90 ] + */ + srowproda(table2, 2, 5,rowProductedTable2_2_5); + assert(rowProductedTable2_2_5[0] == 2.0f); + assert(rowProductedTable2_2_5[1] == 12.0f); + assert(rowProductedTable2_2_5[2] == 30.0f); + assert(rowProductedTable2_2_5[3] == 56.0f); + assert(rowProductedTable2_2_5[4] == 90.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowProductedTable2_2_5[%d] = %e\n", i, rowProductedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 120 30240 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + srowproda(table2, 5, 2,rowProductedTable2_5_2); + assert(rowProductedTable2_5_2[0] == 120.0f); + assert(rowProductedTable2_5_2[1] == 30240.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowProductedTable2_5_2[%d] = %e\n", i, rowProductedTable2_5_2[i]); + } + + return 0; +} + +static int cprodsTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex value2 = FloatComplex(1.123456789f, 1.123456789f); + + printf("\n>>>> Prod Float Complex Scalar Test\n"); + assert(creals(cprods(value1)) == 3.0f); + assert(cimags(cprods(value1)) == 3.0f); + assert(creals(cprods(value2)) == 1.123456789f); + assert(cimags(cprods(value2)) == 1.123456789f); + return 0; +} + +static int cprodaTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex table1[3]; + floatComplex value2 = FloatComplex(9.186784563f,9.186784563f); + floatComplex table2[5]; + + printf("\n>>>> Prod Float Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", creals(cproda(table1, 3))); + printf("%e\n", cimags(cproda(table1, 3))); + printf("%1.20f\n", creals(cproda(table2, 5))); + printf("%1.20f\n", cimags(cproda(table2, 5))); + printf("%1.20f\n", creals(cproda(table2, 5)) + 261744.55211053110542707f); + printf("--------\n"); +#endif + + assert(creals(cproda(table1, 3)) == -54.0f); + assert(cimags(cproda(table1, 3)) == 54.0f); + assert(fabs(creals(cproda(table2, 5)) + 261744.55211053110542707f)/creals(cproda(table2, 5)) < 1e-06); + assert(fabs(cimags(cproda(table2, 5)) + 261744.55211053110542707f)/cimags(cproda(table2, 5)) < 1e-06); + + return 0; +} + +static int crowprodaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex rowProductedIn_4_3[3]; + floatComplex rowProductedIn_3_4[4]; + floatComplex rowProductedIn_6_2[2]; + floatComplex rowProductedIn_2_6[6]; + floatComplex rowProductedIn_1_12[12]; + floatComplex rowProductedIn_12_1[1]; + + printf("\n>>>> Row Prod Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6787000000000000810019 - 0.5456i + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] - 0.3964999999999999635847, + [ 0.3+0.8i 0.7+0.4i 1.1 ] 0.678700000000000192024 + 0.5456i] + */ + crowproda(in, 4, 3, rowProductedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowProductedIn_4_3[%d] = %e + %ei\n", i, creals(rowProductedIn_4_3[i]), cimags(rowProductedIn_4_3[i])); + } + assert(fabs(creals(rowProductedIn_4_3[0]) - 0.6787000000000000810019f) < 1e-06); + assert(fabs(cimags(rowProductedIn_4_3[0]) + 0.5456f) < 1e-06); + assert(fabs(creals(rowProductedIn_4_3[1]) + 0.3964999999999999635847f) < 1e-06); + assert(fabs(cimags(rowProductedIn_4_3[1]) - 0.0f) < 1e-06); + assert(fabs(creals(rowProductedIn_4_3[2]) - 0.6787000000000000810019f) < 1e-06); + assert(fabs(cimags(rowProductedIn_4_3[2]) - 0.5456f) < 1e-06); + + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ - 0.3190000000000000612843 - 0.9680000000000000826006i, + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] - 0.5380000000000000337508 + 0.0010000000000000563993i, + - 0.0010000000000000008882 + 0.5379999999999999227285i, + 0.9680000000000000826006 + 0.3190000000000000612843i ] + */ + crowproda(in, 3, 4, rowProductedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowProductedIn_3_4[%d] = %e + %ei\n", i, creals(rowProductedIn_3_4[i]), cimags(rowProductedIn_3_4[i])); + } + assert(fabs(creals(rowProductedIn_3_4[0]) + 0.3190000000000000612843f) < 1e-06); + assert(fabs(cimags(rowProductedIn_3_4[0]) + 0.9680000000000000826006f) < 1e-06); + assert(fabs(creals(rowProductedIn_3_4[1]) + 0.5380000000000000337508f) < 1e-06); + assert(fabs(cimags(rowProductedIn_3_4[1]) - 0.0010000000000000563993 ) < 1e-06); + assert(fabs(creals(rowProductedIn_3_4[2]) + 0.0010000000000000008882f) < 1e-06); + assert(fabs(cimags(rowProductedIn_3_4[2]) - 0.5379999999999999227285f) < 1e-06); + assert(fabs(creals(rowProductedIn_3_4[3]) - 0.9680000000000000826006f) < 1e-06); + assert(fabs(cimags(rowProductedIn_3_4[3]) - 0.3190000000000000612843f) < 1e-06); + + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.1725900000000000766853 + 0.5204650000000000664713i, + [ 0.3+0.8i 0.9+0.2i ] - 0.1725899999999999934186 + 0.5204649999999999554490i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + crowproda(in, 6, 2, rowProductedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowProductedIn_6_2[%d] = %e + %ei\n", i, creals(rowProductedIn_6_2[i]), cimags(rowProductedIn_6_2[i])); + } + + assert(fabs(creals(rowProductedIn_6_2[0]) - 0.1725900000000000766853f) < 1e-06); + assert(fabs(cimags(rowProductedIn_6_2[0]) - 0.5204650000000000664713f) < 1e-06); + assert(fabs(creals(rowProductedIn_6_2[1]) + 0.1725899999999999934186f) < 1e-06); + assert(fabs(cimags(rowProductedIn_6_2[1]) - 0.5204649999999999554490 ) < 1e-06); + + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ - 1.1000000000000000888178 + 0.11i, + - 0.6600000000000001421086 + 0.4300000000000000488498i, + - 0.2199999999999999733547 + 0.5899999999999999689138i, + 0.2199999999999999733547 + 0.5899999999999999689138i, + 0.6600000000000001421086 + 0.4300000000000000488498i, + 1.1000000000000000888178 + 0.11i ] + + */ + crowproda(in, 2, 6, rowProductedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowProductedIn_2_6[%d] = %e + %ei\n", i, creals(rowProductedIn_2_6[i]), cimags(rowProductedIn_2_6[i])); + } + + assert(fabs(creals(rowProductedIn_2_6[0]) + 1.1000000000000000888178f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[0]) - 0.11f) < 1e-06); + assert(fabs(creals(rowProductedIn_2_6[1]) + 0.6600000000000001421086f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[1]) - 0.4300000000000000488498 ) < 1e-06); + assert(fabs(creals(rowProductedIn_2_6[2]) + 0.2199999999999999733547f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[2]) - 0.5899999999999999689138f) < 1e-06); + assert(fabs(creals(rowProductedIn_2_6[3]) - 0.2199999999999999733547f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[3]) - 0.5899999999999999689138 ) < 1e-06); + assert(fabs(creals(rowProductedIn_2_6[4]) - 0.6600000000000001421086f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[4]) - 0.4300000000000000488498f) < 1e-06); + assert(fabs(creals(rowProductedIn_2_6[5]) - 1.1000000000000000888178f) < 1e-06); + assert(fabs(cimags(rowProductedIn_2_6[5]) - 0.11 ) < 1e-06); + + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + crowproda(in, 1, 12, rowProductedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowProductedIn_1_12[%d] = %e + %ei\n", i, creals(rowProductedIn_1_12[i]), cimags(rowProductedIn_1_12[i])); + assert(creals(rowProductedIn_1_12[i]) == creals(in[i]) && cimags(rowProductedIn_1_12[i]) == cimags(in[i])); + } + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [- 0.3006711243250001497351 + 0.0000000000000000038164i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + + + */ + crowproda(in, 12, 1, rowProductedIn_12_1); + printf("rowProductedIn_12_1[%d] = %e + %ei\n", 0, creals(rowProductedIn_12_1[0]), cimags(rowProductedIn_12_1[0])); + assert(fabs(creals(rowProductedIn_12_1[0]) + 0.3006711243250001497351f) < 1e-06); + assert(fabs(cimags(rowProductedIn_12_1[0]) - 0.0000000000000000038164f) < 1e-06); + + return 0; +} + +static int ccolumnprodaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex columnProductedIn_4_3[4]; + floatComplex columnProductedIn_3_4[3]; + floatComplex columnProductedIn_6_2[6]; + floatComplex columnProductedIn_2_6[2]; + floatComplex columnProductedIn_1_12[1]; + floatComplex columnProductedIn_12_1[12]; + + printf("\n>>>> ColumnProd Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] [ - 0.7480000000000001092460 + 0.1210000000000001074696i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ - 0.6069999999999999840128 + 0.3940000000000001278977i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] [ - 0.3940000000000000168754 + 0.6069999999999999840128i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] [ - 0.1210000000000000935918 + 0.7479999999999999982236i ] + */ + ccolumnproda(in, 4, 3, columnProductedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnProductedIn_4_3[%d] = %e + %ei\n", i, creals(columnProductedIn_4_3[i]), cimags(columnProductedIn_4_3[i])); + } + assert(fabs(creals(columnProductedIn_4_3[0]) + 0.7480000000000001092460f) < 1e-06); + assert(fabs(cimags(columnProductedIn_4_3[0]) - 0.1210000000000001074696f) < 1e-06); + assert(fabs(creals(columnProductedIn_4_3[1]) + 0.6069999999999999840128f) < 1e-06); + assert(fabs(cimags(columnProductedIn_4_3[1]) - 0.394000000000000127897f) < 1e-06); + assert(fabs(creals(columnProductedIn_4_3[2]) + 0.3940000000000000168754f) < 1e-06); + assert(fabs(cimags(columnProductedIn_4_3[2]) - 0.606999999999999984012f) < 1e-06); + assert(fabs(creals(columnProductedIn_4_3[3]) + 0.1210000000000000935918f) < 1e-06); + assert(fabs(cimags(columnProductedIn_4_3[3]) - 0.7479999999999999982236f) < 1e-06); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] [ - 0.5753000000000000335731 - 0.3564000000000000500933i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ - 0.6564999999999998614442 + 0.0000000000000000693889i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] [ - 0.5753000000000001445955 + 0.3564000000000001056044i ] + */ + ccolumnproda(in, 3, 4, columnProductedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnProductedIn_3_4[%d] = %e + %ei\n", i, creals(columnProductedIn_3_4[i]), cimags(columnProductedIn_3_4[i])); + } + assert(fabs(creals(columnProductedIn_3_4[0]) + 0.5753000000000000335731f) < 1e-06); + assert(fabs(cimags(columnProductedIn_3_4[0]) + 0.3564000000000000500933f) < 1e-06); + assert(fabs(creals(columnProductedIn_3_4[1]) + 0.6564999999999998614442f) < 1e-06); + assert(fabs(cimags(columnProductedIn_3_4[1]) - 0.0000000000000000693889f) < 1e-06); + assert(fabs(creals(columnProductedIn_3_4[2]) + 0.5753000000000001445955f) < 1e-06); + assert(fabs(cimags(columnProductedIn_3_4[2]) - 0.3564000000000001056044f) < 1e-06); + + /* + [ 1.1i 0.6+0.5i ] [ - 0.5500000000000000444089 + 0.6600000000000000310862i ] + [ 0.1+i 0.7+0.4i ] [ - 0.3300000000000000155431 + 0.7399999999999999911182i ] + [ 0.2+0.9i 0.8+0.3i ] => [ - 0.1099999999999999866773 + 0.7800000000000000266454i ] + [ 0.3+0.8i 0.9+0.2i ] [ 0.1099999999999999866773 + 0.7800000000000000266454i ] + [ 0.4+0.7i 1+0.1i ] [ 0.3300000000000000155431 + 0.7399999999999999911182i ] + [ 0.5+0.6i 1.1 ] [ 0.5500000000000000444089 + 0.6600000000000000310862i ] + */ + ccolumnproda(in, 6, 2, columnProductedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnProductedIn_6_2[%d] = %e + %ei\n", i, creals(columnProductedIn_6_2[i]), cimags(columnProductedIn_6_2[i])); + } + assert(fabs(creals(columnProductedIn_6_2[0]) + 0.5500000000000000444089f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[0]) - 0.6600000000000000310862f) < 1e-06); + assert(fabs(creals(columnProductedIn_6_2[1]) + 0.3300000000000000155431f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[1]) - 0.7399999999999999911182f) < 1e-06); + assert(fabs(creals(columnProductedIn_6_2[2]) + 0.1099999999999999866773f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[2]) - 0.7800000000000000266454f) < 1e-06); + assert(fabs(creals(columnProductedIn_6_2[3]) - 0.1099999999999999866773f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[3]) - 0.7800000000000000266454f) < 1e-06); + assert(fabs(creals(columnProductedIn_6_2[4]) - 0.3300000000000000155431f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[4]) - 0.7399999999999999911182f) < 1e-06); + assert(fabs(creals(columnProductedIn_6_2[5]) - 0.5500000000000000444089f) < 1e-06); + assert(fabs(cimags(columnProductedIn_6_2[5]) - 0.6600000000000000310862f) < 1e-06); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] [ 0.2212649999999999894662 - 0.5017100000000001003286i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ - 0.2212649999999999894662 - 0.5017100000000001003286i ] + */ + ccolumnproda(in, 2, 6, columnProductedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnProductedIn_2_6[%d] = %e + %ei\n", i, creals(columnProductedIn_2_6[i]), cimags(columnProductedIn_2_6[i])); + } + assert(fabs(creals(columnProductedIn_2_6[0]) - 0.2212649999999999894662f) < 1e-06); + assert(fabs(cimags(columnProductedIn_2_6[0]) + 0.5017100000000001003286f) < 1e-06); + assert(fabs(creals(columnProductedIn_2_6[1]) + 0.2212649999999999894662f) < 1e-06); + assert(fabs(cimags(columnProductedIn_2_6[1]) + 0.5017100000000001003286f) < 1e-06); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ - 0.3006711243250001497351 + 0.0000000000000000038164i ] + + */ + ccolumnproda(in, 1, 12, columnProductedIn_1_12); + printf("columnProductedIn_1_12[%d] = %e + %ei\n", 0, creals(columnProductedIn_1_12[0]), cimags(columnProductedIn_1_12[0])); + assert(fabs(creals(columnProductedIn_1_12[0]) + 0.3006711243250001497351f) < 1e-06); + assert(fabs(cimags(columnProductedIn_1_12[0]) - 0.0000000000000000038164f) < 1e-06); + + + /* + [ 1.1i ] => [ 1.1i ] + [ 0.1+i ] => [ 0.1+i ] + [ 0.2+0.9i ] => [ 0.2+0.9i ] + [ 0.3+0.8i ] => [ 0.3+0.8i ] + [ 0.4+0.7i ] => [ 0.4+0.7i ] + [ 0.5+0.6i ] => [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 0.6+0.5i ] + [ 0.7+0.4i ] => [ 0.7+0.4i ] + [ 0.8+0.3i ] => [ 0.8+0.3i ] + [ 0.9+0.2i ] => [ 0.9+0.2i ] + [ 1+0.1i ] => [ 1+0.1i ] + [ 1.1 ] => [ 1.1 ] + */ + ccolumnproda(in, 12, 1, columnProductedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnProductedIn_12_1[%d] = %e + %ei\n", i, creals(columnProductedIn_12_1[i]), cimags(columnProductedIn_12_1[i])); + assert(creals(columnProductedIn_12_1[i]) == creals(in[i]) && cimags(columnProductedIn_12_1[i]) == cimags(in[i])); + } + + return 0; +} + +static int testProd(void) { + + sprodsTest(); + sprodaTest(); + srowprodaTest(); + scolumnprodaTest(); + cprodsTest(); + cprodaTest(); + crowprodaTest(); + ccolumnprodaTest(); + + return 0; +} + +int main(void) { + assert(testProd() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj b/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj new file mode 100644 index 00000000..0c31766a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {322F871E-3349-4993-BC87-CAFAA6B6F72C} + testDoubleProd + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj.filters new file mode 100644 index 00000000..82f3501c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/test_DoubleProd/testDoubleProd.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj b/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj new file mode 100644 index 00000000..4faff605 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B80645FE-03D0-4BC8-8DAE-032A58CF4E57} + testFloatProd + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj.filters new file mode 100644 index 00000000..f42beb90 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/test_FloatProd/testFloatProd.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/prod/zcolumnproda.c b/2.3-1/src/c/statisticsFunctions/prod/zcolumnproda.c new file mode 100644 index 00000000..277afd5a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/zcolumnproda.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" +#include "multiplication.h" + +void zcolumnproda(doubleComplex *in, int lines, int columns, doubleComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = zmuls(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/prod/zproda.c b/2.3-1/src/c/statisticsFunctions/prod/zproda.c new file mode 100644 index 00000000..a017d979 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/zproda.c @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "prod.h" +#include "multiplication.h" + + +doubleComplex zproda(doubleComplex *in, int size) { + doubleComplex accumulate = in[0]; + int i = 0; + + + for (i = 1; i < size; ++i) + { + accumulate = zmuls(accumulate,in[i]); + } + return accumulate; + +} + + diff --git a/2.3-1/src/c/statisticsFunctions/prod/zrowproda.c b/2.3-1/src/c/statisticsFunctions/prod/zrowproda.c new file mode 100644 index 00000000..84a16903 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/prod/zrowproda.c @@ -0,0 +1,37 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud TORSET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* This is a copy/paste with adaptation from sum */ + +#include "prod.h" +#include "multiplication.h" + +void zrowproda(doubleComplex *in, int lines, int columns, doubleComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = zmuls( out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj b/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj new file mode 100644 index 00000000..48a8b0cf --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj @@ -0,0 +1,661 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {E11ED064-3BF2-4F70-B66E-3223C737EC60} + statisticsFunctions + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../type;../operations/includes;../elementaryFunctions/includes;../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;STATISTICSFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../type;../operations/includes;../elementaryFunctions/includes;../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;STATISTICSFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../type;../operations/includes;../elementaryFunctions/includes;../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;STATISTICSFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../type;../operations/includes;../elementaryFunctions/includes;../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;STATISTICSFUNCTIONS_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + + + + + + + + + {af4a8af2-cc9f-4991-be6e-8aaf9cb5bfc9} + false + + + {72b46833-b150-432d-b231-3e0ecd91e190} + false + + + {fd335544-52bf-4736-a34e-77f591d158d5} + false + + + {9b622a66-546a-4b33-b947-0a189d259d37} + false + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj.filters new file mode 100644 index 00000000..fe6dc17c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/statisticsFunctions.vcxproj.filters @@ -0,0 +1,311 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {97915945-ecc0-4347-9836-9b85df72c2bb} + + + {ea434b72-a4a9-430e-adc3-b8596209f07a} + + + {5cf34c99-e4b3-4905-8380-36c5db366c34} + + + {2cb4b69b-5118-4f1c-b1a0-30efd61cac2f} + + + {fedd49a4-6978-4994-94cd-2d6735b650f4} + + + {8748e141-260a-4ec0-9659-0cd159a4b76d} + + + {a93cd659-6a20-4db5-ac4d-0e66fb3bfa8f} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\max + + + Source Files\max + + + Source Files\max + + + Source Files\max + + + Source Files\max + + + Source Files\max + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\mean + + + Source Files\min + + + Source Files\min + + + Source Files\min + + + Source Files\min + + + Source Files\min + + + Source Files\min + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\prod + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\sum + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\variance + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + Source Files\meanf + + + + + Source Files\max + + + Source Files\mean + + + Source Files\min + + + Source Files\prod + + + Source Files\sum + + + Source Files\variance + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.am b/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.am new file mode 100644 index 00000000..cebe3c93 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.am @@ -0,0 +1,88 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libStdevf_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libStdevf.la + +libStdevf_la_SOURCES = $(HEAD) $(SRC) + +SRC = sstdevfa.c \ + srowstdevfa.c \ + scolumnstdevfa.c \ + dstdevfa.c \ + drowstdevfa.c \ + dcolumnstdevfa.c \ + cstdevfa.c \ + crowstdevfa.c \ + ccolumnstdevfa.c \ + zstdevfa.c \ + zrowstdevfa.c \ + zcolumnstdevfa.c + +HEAD = ../includes/stdevf.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/statisticsFunctions/stdevf/libStdevf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatStdevf testDoubleStdevf + +TESTS = testFloatStdevf testDoubleStdevf + +# +# -*- Stdevf Tests -*- +# +testFloatStdevf_SOURCES = testFloatStdevf.c +testFloatStdevf_CFLAGS = $(check_INCLUDES) +testFloatStdevf_LDADD = $(check_LDADD) + +testDoubleStdevf_SOURCES =testDoubleStdevf.c +testDoubleStdevf_CFLAGS = $(check_INCLUDES) +testDoubleStdevf_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.in b/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.in new file mode 100644 index 00000000..c71bfa74 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/Makefile.in @@ -0,0 +1,875 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatStdevf$(EXEEXT) testDoubleStdevf$(EXEEXT) +TESTS = testFloatStdevf$(EXEEXT) testDoubleStdevf$(EXEEXT) +subdir = src/c/statisticsFunctions/stdevf +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libStdevf_la_LIBADD = +am__objects_1 = +am__objects_2 = libStdevf_la-sstdevfa.lo libStdevf_la-srowstdevfa.lo \ + libStdevf_la-scolumnstdevfa.lo libStdevf_la-dstdevfa.lo \ + libStdevf_la-drowstdevfa.lo libStdevf_la-dcolumnstdevfa.lo \ + libStdevf_la-cstdevfa.lo libStdevf_la-crowstdevfa.lo \ + libStdevf_la-ccolumnstdevfa.lo libStdevf_la-zstdevfa.lo \ + libStdevf_la-zrowstdevfa.lo libStdevf_la-zcolumnstdevfa.lo +am_libStdevf_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libStdevf_la_OBJECTS = $(am_libStdevf_la_OBJECTS) +libStdevf_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libStdevf_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleStdevf_OBJECTS = \ + testDoubleStdevf-testDoubleStdevf.$(OBJEXT) +testDoubleStdevf_OBJECTS = $(am_testDoubleStdevf_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/statisticsFunctions/stdevf/libStdevf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la +testDoubleStdevf_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleStdevf_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleStdevf_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatStdevf_OBJECTS = \ + testFloatStdevf-testFloatStdevf.$(OBJEXT) +testFloatStdevf_OBJECTS = $(am_testFloatStdevf_OBJECTS) +testFloatStdevf_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatStdevf_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatStdevf_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libStdevf_la_SOURCES) $(testDoubleStdevf_SOURCES) \ + $(testFloatStdevf_SOURCES) +DIST_SOURCES = $(libStdevf_la_SOURCES) $(testDoubleStdevf_SOURCES) \ + $(testFloatStdevf_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libStdevf_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libStdevf.la +libStdevf_la_SOURCES = $(HEAD) $(SRC) +SRC = sstdevfa.c \ + srowstdevfa.c \ + scolumnstdevfa.c \ + dstdevfa.c \ + drowstdevfa.c \ + dcolumnstdevfa.c \ + cstdevfa.c \ + crowstdevfa.c \ + ccolumnstdevfa.c \ + zstdevfa.c \ + zrowstdevfa.c \ + zcolumnstdevfa.c + +HEAD = ../includes/stdevf.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/auxiliaryFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/c/statisticsFunctions/stdevf/libStdevf.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + @LIBMATH@ + + +# +# -*- Stdevf Tests -*- +# +testFloatStdevf_SOURCES = testFloatStdevf.c +testFloatStdevf_CFLAGS = $(check_INCLUDES) +testFloatStdevf_LDADD = $(check_LDADD) +testDoubleStdevf_SOURCES = testDoubleStdevf.c +testDoubleStdevf_CFLAGS = $(check_INCLUDES) +testDoubleStdevf_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/stdevf/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/stdevf/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libStdevf.la: $(libStdevf_la_OBJECTS) $(libStdevf_la_DEPENDENCIES) + $(libStdevf_la_LINK) -rpath $(pkglibdir) $(libStdevf_la_OBJECTS) $(libStdevf_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleStdevf$(EXEEXT): $(testDoubleStdevf_OBJECTS) $(testDoubleStdevf_DEPENDENCIES) + @rm -f testDoubleStdevf$(EXEEXT) + $(testDoubleStdevf_LINK) $(testDoubleStdevf_OBJECTS) $(testDoubleStdevf_LDADD) $(LIBS) +testFloatStdevf$(EXEEXT): $(testFloatStdevf_OBJECTS) $(testFloatStdevf_DEPENDENCIES) + @rm -f testFloatStdevf$(EXEEXT) + $(testFloatStdevf_LINK) $(testFloatStdevf_OBJECTS) $(testFloatStdevf_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-ccolumnstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-crowstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-cstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-dcolumnstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-drowstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-dstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-scolumnstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-srowstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-sstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-zcolumnstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-zrowstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libStdevf_la-zstdevfa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatStdevf-testFloatStdevf.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libStdevf_la-sstdevfa.lo: sstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-sstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-sstdevfa.Tpo -c -o libStdevf_la-sstdevfa.lo `test -f 'sstdevfa.c' || echo '$(srcdir)/'`sstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-sstdevfa.Tpo $(DEPDIR)/libStdevf_la-sstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sstdevfa.c' object='libStdevf_la-sstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-sstdevfa.lo `test -f 'sstdevfa.c' || echo '$(srcdir)/'`sstdevfa.c + +libStdevf_la-srowstdevfa.lo: srowstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-srowstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-srowstdevfa.Tpo -c -o libStdevf_la-srowstdevfa.lo `test -f 'srowstdevfa.c' || echo '$(srcdir)/'`srowstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-srowstdevfa.Tpo $(DEPDIR)/libStdevf_la-srowstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowstdevfa.c' object='libStdevf_la-srowstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-srowstdevfa.lo `test -f 'srowstdevfa.c' || echo '$(srcdir)/'`srowstdevfa.c + +libStdevf_la-scolumnstdevfa.lo: scolumnstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-scolumnstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-scolumnstdevfa.Tpo -c -o libStdevf_la-scolumnstdevfa.lo `test -f 'scolumnstdevfa.c' || echo '$(srcdir)/'`scolumnstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-scolumnstdevfa.Tpo $(DEPDIR)/libStdevf_la-scolumnstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnstdevfa.c' object='libStdevf_la-scolumnstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-scolumnstdevfa.lo `test -f 'scolumnstdevfa.c' || echo '$(srcdir)/'`scolumnstdevfa.c + +libStdevf_la-dstdevfa.lo: dstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-dstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-dstdevfa.Tpo -c -o libStdevf_la-dstdevfa.lo `test -f 'dstdevfa.c' || echo '$(srcdir)/'`dstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-dstdevfa.Tpo $(DEPDIR)/libStdevf_la-dstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dstdevfa.c' object='libStdevf_la-dstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-dstdevfa.lo `test -f 'dstdevfa.c' || echo '$(srcdir)/'`dstdevfa.c + +libStdevf_la-drowstdevfa.lo: drowstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-drowstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-drowstdevfa.Tpo -c -o libStdevf_la-drowstdevfa.lo `test -f 'drowstdevfa.c' || echo '$(srcdir)/'`drowstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-drowstdevfa.Tpo $(DEPDIR)/libStdevf_la-drowstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowstdevfa.c' object='libStdevf_la-drowstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-drowstdevfa.lo `test -f 'drowstdevfa.c' || echo '$(srcdir)/'`drowstdevfa.c + +libStdevf_la-dcolumnstdevfa.lo: dcolumnstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-dcolumnstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-dcolumnstdevfa.Tpo -c -o libStdevf_la-dcolumnstdevfa.lo `test -f 'dcolumnstdevfa.c' || echo '$(srcdir)/'`dcolumnstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-dcolumnstdevfa.Tpo $(DEPDIR)/libStdevf_la-dcolumnstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnstdevfa.c' object='libStdevf_la-dcolumnstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-dcolumnstdevfa.lo `test -f 'dcolumnstdevfa.c' || echo '$(srcdir)/'`dcolumnstdevfa.c + +libStdevf_la-cstdevfa.lo: cstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-cstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-cstdevfa.Tpo -c -o libStdevf_la-cstdevfa.lo `test -f 'cstdevfa.c' || echo '$(srcdir)/'`cstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-cstdevfa.Tpo $(DEPDIR)/libStdevf_la-cstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cstdevfa.c' object='libStdevf_la-cstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-cstdevfa.lo `test -f 'cstdevfa.c' || echo '$(srcdir)/'`cstdevfa.c + +libStdevf_la-crowstdevfa.lo: crowstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-crowstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-crowstdevfa.Tpo -c -o libStdevf_la-crowstdevfa.lo `test -f 'crowstdevfa.c' || echo '$(srcdir)/'`crowstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-crowstdevfa.Tpo $(DEPDIR)/libStdevf_la-crowstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowstdevfa.c' object='libStdevf_la-crowstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-crowstdevfa.lo `test -f 'crowstdevfa.c' || echo '$(srcdir)/'`crowstdevfa.c + +libStdevf_la-ccolumnstdevfa.lo: ccolumnstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-ccolumnstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-ccolumnstdevfa.Tpo -c -o libStdevf_la-ccolumnstdevfa.lo `test -f 'ccolumnstdevfa.c' || echo '$(srcdir)/'`ccolumnstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-ccolumnstdevfa.Tpo $(DEPDIR)/libStdevf_la-ccolumnstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnstdevfa.c' object='libStdevf_la-ccolumnstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-ccolumnstdevfa.lo `test -f 'ccolumnstdevfa.c' || echo '$(srcdir)/'`ccolumnstdevfa.c + +libStdevf_la-zstdevfa.lo: zstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-zstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-zstdevfa.Tpo -c -o libStdevf_la-zstdevfa.lo `test -f 'zstdevfa.c' || echo '$(srcdir)/'`zstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-zstdevfa.Tpo $(DEPDIR)/libStdevf_la-zstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zstdevfa.c' object='libStdevf_la-zstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-zstdevfa.lo `test -f 'zstdevfa.c' || echo '$(srcdir)/'`zstdevfa.c + +libStdevf_la-zrowstdevfa.lo: zrowstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-zrowstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-zrowstdevfa.Tpo -c -o libStdevf_la-zrowstdevfa.lo `test -f 'zrowstdevfa.c' || echo '$(srcdir)/'`zrowstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-zrowstdevfa.Tpo $(DEPDIR)/libStdevf_la-zrowstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowstdevfa.c' object='libStdevf_la-zrowstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-zrowstdevfa.lo `test -f 'zrowstdevfa.c' || echo '$(srcdir)/'`zrowstdevfa.c + +libStdevf_la-zcolumnstdevfa.lo: zcolumnstdevfa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -MT libStdevf_la-zcolumnstdevfa.lo -MD -MP -MF $(DEPDIR)/libStdevf_la-zcolumnstdevfa.Tpo -c -o libStdevf_la-zcolumnstdevfa.lo `test -f 'zcolumnstdevfa.c' || echo '$(srcdir)/'`zcolumnstdevfa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libStdevf_la-zcolumnstdevfa.Tpo $(DEPDIR)/libStdevf_la-zcolumnstdevfa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnstdevfa.c' object='libStdevf_la-zcolumnstdevfa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libStdevf_la_CFLAGS) $(CFLAGS) -c -o libStdevf_la-zcolumnstdevfa.lo `test -f 'zcolumnstdevfa.c' || echo '$(srcdir)/'`zcolumnstdevfa.c + +testDoubleStdevf-testDoubleStdevf.o: testDoubleStdevf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleStdevf_CFLAGS) $(CFLAGS) -MT testDoubleStdevf-testDoubleStdevf.o -MD -MP -MF $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Tpo -c -o testDoubleStdevf-testDoubleStdevf.o `test -f 'testDoubleStdevf.c' || echo '$(srcdir)/'`testDoubleStdevf.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Tpo $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleStdevf.c' object='testDoubleStdevf-testDoubleStdevf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleStdevf_CFLAGS) $(CFLAGS) -c -o testDoubleStdevf-testDoubleStdevf.o `test -f 'testDoubleStdevf.c' || echo '$(srcdir)/'`testDoubleStdevf.c + +testDoubleStdevf-testDoubleStdevf.obj: testDoubleStdevf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleStdevf_CFLAGS) $(CFLAGS) -MT testDoubleStdevf-testDoubleStdevf.obj -MD -MP -MF $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Tpo -c -o testDoubleStdevf-testDoubleStdevf.obj `if test -f 'testDoubleStdevf.c'; then $(CYGPATH_W) 'testDoubleStdevf.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleStdevf.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Tpo $(DEPDIR)/testDoubleStdevf-testDoubleStdevf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleStdevf.c' object='testDoubleStdevf-testDoubleStdevf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleStdevf_CFLAGS) $(CFLAGS) -c -o testDoubleStdevf-testDoubleStdevf.obj `if test -f 'testDoubleStdevf.c'; then $(CYGPATH_W) 'testDoubleStdevf.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleStdevf.c'; fi` + +testFloatStdevf-testFloatStdevf.o: testFloatStdevf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatStdevf_CFLAGS) $(CFLAGS) -MT testFloatStdevf-testFloatStdevf.o -MD -MP -MF $(DEPDIR)/testFloatStdevf-testFloatStdevf.Tpo -c -o testFloatStdevf-testFloatStdevf.o `test -f 'testFloatStdevf.c' || echo '$(srcdir)/'`testFloatStdevf.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatStdevf-testFloatStdevf.Tpo $(DEPDIR)/testFloatStdevf-testFloatStdevf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatStdevf.c' object='testFloatStdevf-testFloatStdevf.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatStdevf_CFLAGS) $(CFLAGS) -c -o testFloatStdevf-testFloatStdevf.o `test -f 'testFloatStdevf.c' || echo '$(srcdir)/'`testFloatStdevf.c + +testFloatStdevf-testFloatStdevf.obj: testFloatStdevf.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatStdevf_CFLAGS) $(CFLAGS) -MT testFloatStdevf-testFloatStdevf.obj -MD -MP -MF $(DEPDIR)/testFloatStdevf-testFloatStdevf.Tpo -c -o testFloatStdevf-testFloatStdevf.obj `if test -f 'testFloatStdevf.c'; then $(CYGPATH_W) 'testFloatStdevf.c'; else $(CYGPATH_W) '$(srcdir)/testFloatStdevf.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatStdevf-testFloatStdevf.Tpo $(DEPDIR)/testFloatStdevf-testFloatStdevf.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatStdevf.c' object='testFloatStdevf-testFloatStdevf.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatStdevf_CFLAGS) $(CFLAGS) -c -o testFloatStdevf-testFloatStdevf.obj `if test -f 'testFloatStdevf.c'; then $(CYGPATH_W) 'testFloatStdevf.c'; else $(CYGPATH_W) '$(srcdir)/testFloatStdevf.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/ccolumnstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/ccolumnstdevfa.c new file mode 100644 index 00000000..14d30301 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/ccolumnstdevfa.c @@ -0,0 +1,58 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "abs.h" + +void ccolumnstdevfa(floatComplex *in1, int lines, int columns, floatComplex*in2, floatComplex* out){ + int i = 0; + int j = 0; + floatComplex temp = FloatComplex(0.0f,0.0f); + floatComplex accumulate = FloatComplex(0.0f,0.0f); + floatComplex accumulateFre = FloatComplex(0.0f,0.0f); + + ccolumnmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines; ++j) + { + accumulate = FloatComplex(0.0f,0.0f); + accumulateFre = FloatComplex(0.0f,0.0f); + temp = FloatComplex(0.0f,0.0f); + + for ( i = 0 ; i < columns; ++i ) + { + + temp = cpows ( cdiffs (in1[lines*i + j] ,out[j] ) ,FloatComplex (2.0f, 0.0f ) ); + temp = cmuls( in2[lines*i + j] , temp); + + accumulate = cadds( temp , accumulate); + accumulateFre = cadds (in2[lines*i + j] ,accumulateFre ); + + } + + if (lines <= 1) + { + out[j] = cmuls (FloatComplex(0.0f,0.0f) , accumulate ) ; + } + else + { + if( sabss (creals(accumulate)) <= 3e-6 ) accumulate = FloatComplex(sabss(creals(accumulate)) ,cimags(accumulate)); + if( sabss (cimags(accumulate)) <= 3e-6 ) accumulate = FloatComplex(creals(accumulate) ,sabss(cimags(accumulate))); + accumulate = crdivs (accumulate , cdiffs (accumulateFre ,FloatComplex(1.0f,0.0f)) ); + out[j] =csqrts(accumulate); + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/crowstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/crowstdevfa.c new file mode 100644 index 00000000..38d8cb23 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/crowstdevfa.c @@ -0,0 +1,59 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "meanf.h" +#include "abs.h" + + +void crowstdevfa(floatComplex *in1, int lines, int columns, floatComplex*in2, floatComplex* out){ + int i = 0; + int j = 0; + floatComplex temp = FloatComplex(0.0f,0.0f); + floatComplex accumulate = FloatComplex(0.0f,0.0f); + floatComplex accumulateFre = FloatComplex(0.0f,0.0f); + + crowmeanfa(in1, lines, columns, in2, out ); + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + accumulate = FloatComplex(0.0f,0.0f); + accumulateFre =FloatComplex(0.0f,0.0f); + temp = FloatComplex(0.0f,0.0f); + + for ( i = 0 ; i < lines; ++i ) + { + + temp = cpows ( cdiffs (in1[lines*j + i] ,out[j] ) ,FloatComplex (2.0f, 0.0f ) ); + temp = cmuls( in2[lines*j + i] , temp); + + accumulate = cadds( temp , accumulate); + accumulateFre = cadds (in2[lines*j + i] ,accumulateFre ); + + } + + if (lines <= 1) + { + out[j] = cmuls (FloatComplex(0.0f,0.0f) , accumulate ) ; + } + else + { + if( sabss (creals(accumulate)) <= 3e-6 ) accumulate = FloatComplex(sabss(creals(accumulate)) ,cimags(accumulate)); + if( sabss (cimags(accumulate)) <= 3e-6 ) accumulate = FloatComplex(creals(accumulate) ,sabss(cimags(accumulate))); + accumulate = crdivs (accumulate , cdiffs (accumulateFre ,FloatComplex(1.0f,0.0f)) ); + out[j] =csqrts(accumulate); + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfa.c new file mode 100644 index 00000000..5b1631f1 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfa.c @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + +floatComplex cstdevfa(floatComplex *in1, int lines, int columns, floatComplex* in2) +{ + int i = 0 ; + + floatComplex temp = FloatComplex(0.0f,0.0f); + floatComplex accumulate = FloatComplex(0.0f,0.0f); + floatComplex accumulateFre = FloatComplex(0.0f,0.0f); + floatComplex meanf = cmeanfa (in1 , lines*columns , in2); +/*equivalent to (in1 - meanf(x , in2 )).^2 .*in2 */ + for(i = 0 ; i < lines*columns ; ++i) + { + temp = cpows ( cdiffs (in1[i] , meanf ) ,FloatComplex (2.0f, 0.0f ) ); + temp = cmuls( in2[i] , temp); + + accumulate = cadds( temp , accumulate); + accumulateFre = cadds (in2[i] ,accumulateFre ); + + } + + if (lines <= 1) + { + return cmuls (FloatComplex(0.0f,0.0f) , accumulate ) ; + } + else + { + accumulate = crdivs (accumulate , cdiffs (accumulateFre ,FloatComplex(1.0f,0.0f)) ); + return csqrts(accumulate); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfcs.c b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfcs.c new file mode 100644 index 00000000..a3b7239f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfcs.c @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + +floatComplex cstdevfcs(floatComplex *in1, int lines, int columns, float* in2) +{ + int i = 0 ; + floatComplex temp = FloatComplex(0.0f,0.0f); + floatComplex accumulate = FloatComplex(0.0f,0.0f); + float accumulateFre = 0.0f ; + floatComplex meanf = cmeanfcs (in1 , lines ,columns , in2); +/*equivalent to (in1 - meanf(x , in2 )).^2 .*in2 */ + for(i = 0 ; i < lines*columns ; ++i) + { + temp = cpows ( cdiffs (in1[i] , meanf ) ,FloatComplex (2.0f, 0.0f ) ); + temp = cmuls( FloatComplex (in2[i],0.0f) , temp); + + accumulate = cadds( temp , accumulate); + accumulateFre += in2[i]; + } + + if (lines <= 1) + { + return cmuls (FloatComplex(0.0f,0.0f) , accumulate ) ; + } + else + { + accumulate = FloatComplex( creals(accumulate ) / (accumulateFre - 1) , cimags(accumulate) / (accumulateFre - 1)); + return csqrts(accumulate); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfsc.c b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfsc.c new file mode 100644 index 00000000..01a6e079 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/cstdevfsc.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "stdevf.h" +#include "zeros.h" + +floatComplex cstdevfsc(float *in1, int lines, int columns, floatComplex* in2) +{ + float* ZEROS = (float *) malloc((unsigned int)(lines*columns*sizeof(float))); + szerosa(ZEROS,lines,columns); + + return cstdevfa(FloatComplexMatrix(in1,ZEROS,lines*columns), lines , columns , in2); +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/dcolumnstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/dcolumnstdevfa.c new file mode 100644 index 00000000..a6220d57 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/dcolumnstdevfa.c @@ -0,0 +1,69 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "meanf.h" + + +void dcolumnstdevfa(double *in1, int lines, int columns, double *in2, double* out){ + int i = 0; + int j = 0; + double temp = 0.0; + double accumulate = 0.0; + double accumulateFre = 0.0 ; + + dcolumnmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines; ++j) + { + accumulate = 0.0; + accumulateFre= 0.0; + temp = 0.0; + + for ( i = 0 ; i < columns; ++i ) + { + temp = dpows ( (in1[lines*i + j] - out[j] ) ,2 ); + temp *= in2[lines*i + j]; + + accumulate += temp ; + accumulateFre += in2[lines*i + j]; + } + + if (lines <= 1) + { + out[j] = 0.0 * accumulate ; + } + else + { + out[j] = dsqrts(accumulate / (accumulateFre - 1)); + } + } + +} +/* + + ! +! elseif o == 'c' | o == 2 then ! +! // here ones is used becaue we work on matrix , but in C we work on element so we only need iteratation ! +! y = x - meanf(x, fre, o) * ones(1, size(x, o)) ! +! ! + +! if size(x, 1) == 1 then ! ! +! s = 0 * sum(y.^2 .* fre, o) ! +! else ! ! +! s = sqrt(sum(y.^2 .* fre, o) ./ (sum(fre, o) - 1)); ! + ! +*/ + diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/drowstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/drowstdevfa.c new file mode 100644 index 00000000..c861f06b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/drowstdevfa.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" + + +void drowstdevfa(double *in1, int lines, int columns, double *in2, double* out){ + int i = 0; + int j = 0; + double temp = 0.0f; + double accumulate = 0.0f; + double accumulateFre = 0.0f ; + + drowmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + accumulate = 0.0f; + accumulateFre= 0.0f; + temp = 0.0f; + + for ( i = 0 ; i < lines; ++i ) + { + temp = dpows ( (in1[lines*j + i] - out[j] ) ,2 ); + temp *= in2[lines*j + i]; + + accumulate += temp ; + accumulateFre += in2[lines*j + i]; + } + + if (lines <= 1) + { + out[j] = 0.0 * accumulate ; + } + else + { + out[j] = dsqrts(accumulate / (accumulateFre - 1)); + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/dstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/dstdevfa.c new file mode 100644 index 00000000..4194435c --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/dstdevfa.c @@ -0,0 +1,43 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + +double dstdevfa(double *in1, int lines, int columns, double* in2) +{ + int i = 0 ; + double meanf = dmeanfa (in1 , lines*columns , in2); + double temp = 0.0; + double accumulate = 0.0 ; + double accumulateFre = 0.0 ; + /*printf ("\nmeanf %lf \n" ,meanf);*/ + + /*equivalent to (in1 - meanf(x , in2 )).^2 .*in2 */ + for(i = 0 ; i < lines*columns; ++i) + { + + temp = dpows ( (in1[i] - meanf ) ,2 ); + temp *= in2[i]; + + accumulate += temp ; + accumulateFre += in2[i]; + } + + if (lines <= 1) + { + return 0.0 * accumulate ; + } + else + { + return dsqrts(accumulate) / (accumulateFre - 1); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/scolumnstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/scolumnstdevfa.c new file mode 100644 index 00000000..f3552ea7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/scolumnstdevfa.c @@ -0,0 +1,69 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "meanf.h" + + +void scolumnstdevfa(float *in1, int lines, int columns, float *in2, float* out){ + int i = 0; + int j = 0; + float temp = 0.0f; + float accumulate = 0.0f; + float accumulateFre = 0.0f ; + + scolumnmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines; ++j) + { + accumulate = 0.0f; + accumulateFre= 0.0f; + temp = 0.0f; + + for ( i = 0 ; i < columns; ++i ) + { + temp = spows ( (in1[lines*i + j] - out[j] ) ,2 ); + temp *= in2[lines*i + j]; + + accumulate += temp ; + accumulateFre += in2[lines*i + j]; + } + + if (lines <= 1) + { + out[j] = 0.0f * accumulate ; + } + else + { + out[j] = ssqrts(accumulate / (accumulateFre - 1)); + } + } + +} +/* + + ! +! elseif o == 'c' | o == 2 then ! +! // here ones is used becaue we work on matrix , but in C we work on element so we only need iteratation ! +! y = x - meanf(x, fre, o) * ones(1, size(x, o)) ! +! ! + +! if size(x, 1) == 1 then ! ! +! s = 0 * sum(y.^2 .* fre, o) ! +! else ! ! +! s = sqrt(sum(y.^2 .* fre, o) ./ (sum(fre, o) - 1)); ! + ! +*/ + diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/srowstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/srowstdevfa.c new file mode 100644 index 00000000..337b80e3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/srowstdevfa.c @@ -0,0 +1,53 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "meanf.h" + + +void srowstdevfa(float *in1, int lines, int columns, float *in2, float* out){ + int i = 0; + int j = 0; + float temp = 0.0f; + float accumulate = 0.0f; + float accumulateFre = 0.0f ; + + srowmeanfa(in1, lines, columns, in2, out ); + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + accumulate = 0.0f; + accumulateFre= 0.0f; + temp = 0.0f; + + for ( i = 0 ; i < lines; ++i ) + { + temp = spows ( (in1[lines*j + i] - out[j] ) ,2 ); + temp *= in2[lines*j + i]; + + accumulate += temp ; + accumulateFre += in2[lines*j + i]; + } + + if (lines <= 1) + { + out[j] = 0.0f * accumulate ; + } + else + { + out[j] = ssqrts(accumulate/ (accumulateFre - 1)); + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/sstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/sstdevfa.c new file mode 100644 index 00000000..5ccdab84 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/sstdevfa.c @@ -0,0 +1,68 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + +float sstdevfa(float *in1, int lines, int columns, float* in2) +{ + int i = 0 ; + float meanf = smeanfa (in1 , lines*columns , in2); + float temp = 0.0f; + float accumulate = 0.0f ; + float accumulateFre = 0.0f ; + + + /*equivalent to (in1 - meanf(x , in2 )).^2 .*in2 */ + for(i = 0 ; i < lines*columns; ++i) + { + + temp = spows ( (in1[i] - meanf ) ,2 ); + temp *= in2[i]; + + accumulate += temp ; + accumulateFre += in2[i]; + } + + if (lines <= 1) + { + return 0.0f * accumulate ; + } + else + { + return ssqrts( accumulate/(accumulateFre - 1) ); + } +} +/* + +! o = '*' ! + +! //remove the median ! +! ! +! if o == '*' then ! +! ! +! y = x - meanf(x, fre) ! +! ! +! elseif o == 'r' | o == 1 then ! +! ! +! y = x - ones(size(x, o), 1) * meanf(x, fre, o) ! +! ! +! elseif o == 'c' | o == 2 then ! +! ! +! y = x - meanf(x, fre, o) * ones(1, size(x, o)) ! +! ! + +! if size(x, 1) == 1 then ! ! +! s = 0 * sum(y.^2 .* fre, o) ! +! else ! ! +! s = sqrt( sum(y.^2 .* fre, o) ./ (sum(fre, o) - 1) ); ! + ! +*/ diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/testDoubleStdevf.c b/2.3-1/src/c/statisticsFunctions/stdevf/testDoubleStdevf.c new file mode 100644 index 00000000..3b0b61ae --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/testDoubleStdevf.c @@ -0,0 +1,509 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "stdevf.h" + + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dstdevfsTest(void) { + double value1 = 3.0; + double value2 = 1.123456789f; + double coef1 = 56.0 ; + double coef2 = 2.0 ; + + printf("\n>>>> stdevf Double Scalar Test\n"); + printf("result : %e " ,dstdevfs(value1,coef1)) ; + printf("result : %e " ,dstdevfs(value2,coef)) ; + assert( ( dstdevfs(value1,coef1) ) == 0.0 ); + assert( ( dstdevfs(value2,coef2) ) == 0.0 ); + + value1 = 3.0; + value2 = 1.123456789f; + coef1 = 56.0 ; + coef2 = 2.0 ; + + + return 0; +} + +static int dstdevfaTest(void) { + double table1[3] = {3.0, 6.0, 9.0}; + double coef1[3] = {10.0, 2.0, 6.0}; + + double table2[5] = {3.186784563, + 4.186784563, + 5.186784563, + 6.186784563, + 7.186784563}; + + double coef2[5] = {3.0, + 4.0, + 5.0, + 6.0, + 7.0}; + + double table3[10] = {3.0, 6.0, 9.0,10.0, 5.0, + 6.0,18.0, 7.0,14.0, 2.0}; + double coef3 [10] = {3.0, 8.0,14.0,13.0, 2.0, + 5.0, 8.0, 2.0, 6.0, 8.0}; + + double result_2_5 = dstdevfa(table3,2, 5, coef3); + + printf("\n>>>> stdevf Double Array Test\n"); + printf("\nresult : %e " ,dstdevfa(table1,1, 3, coef1)) ; + printf("\nresult : %e " ,dstdevfa(table2,1, 5, coef2)) ; + printf("\nresult : %e " ,result_2_5) ; + + assert(dstdevfa(table1,1, 3, coef1) == 0.0); + assert(dstdevfa(table1,1, 3, coef1) == 0.0); + assert( ( fabs(result_2_5 ) - ( 4.6440201 ) ) / fabs ( result_2_5 ) < 1e-6 ); + return 0; +} + + +static int dcolumnstdevfaTest(void) { + + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + + double columnStdevfedTable1_3_3[3] = {0}; + double columnStdevfedTable1_1_9[1] = {0}; + + + printf("\n>>>> Column stdevf Double Array Test\n"); + +/**/ + + dcolumnstdevfa(table1, 3, 3, coef1 ,columnStdevfedTable1_3_3); + + printf("\nresult1 : %e " ,columnStdevfedTable1_3_3[0]) ; + printf("\nresult2 : %e " ,columnStdevfedTable1_3_3[1]) ; + printf("\nresult3 : %e " ,columnStdevfedTable1_3_3[2]) ; + + assert( fabs(columnStdevfedTable1_3_3[0] - 0.8268689) / fabs ( columnStdevfedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(columnStdevfedTable1_3_3[1] - 0.8164966) / fabs ( columnStdevfedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(columnStdevfedTable1_3_3[2] - 0.8323524 ) / fabs ( columnStdevfedTable1_3_3[2] ) < 1e-6 ); + + + + dcolumnstdevfa(table1, 1, 9, coef1 ,columnStdevfedTable1_1_9); + printf("\nresult_1_9: %e\n " ,columnStdevfedTable1_1_9[0]) ; + assert( columnStdevfedTable1_1_9[0] == 0.0); + + + return 0; +} + + +static int drowstdevfaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + + double table2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double coef2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + + + + double rowStdevfedTable1_3_3[3] = {0}; + double rowStdevfedTable1_1_9[9] = {0}; + double rowStdevfedTable2_2_5[5] = {0}; + printf("\n>>>> Row Mean Double Array Test\n"); + + + drowstdevfa(table1, 3, 3, coef1 , rowStdevfedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowStdevfedTable1_3_3[%d] = %e\n", i, rowStdevfedTable1_3_3[i]); + } + assert( fabs(rowStdevfedTable1_3_3[0] - 2.8394542 ) / fabs ( rowStdevfedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(rowStdevfedTable1_3_3[1] - 2.8003759) / fabs ( rowStdevfedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(rowStdevfedTable1_3_3[2] - 2.7669196) / fabs ( rowStdevfedTable1_3_3[2] ) < 1e-6 ); + +/**/ + drowstdevfa(table1, 1, 9, coef1, rowStdevfedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowStdevfedTable1_1_9[%d] = %e\n", i, rowStdevfedTable1_1_9[i]); + assert(rowStdevfedTable1_1_9[i] == 0.0); + } + + +/**/ + /**/ + drowstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable_2_5[%d] = %e \n", i, rowStdevfedTable2_2_5[i]); + } + assert( fabs(rowStdevfedTable2_2_5[0] - 0.9045340 ) / fabs ( rowStdevfedTable2_2_5[0] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[1] - 2.3935678 ) / fabs ( rowStdevfedTable2_2_5[1] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[2] - 1.3887301 ) / fabs ( rowStdevfedTable2_2_5[2] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[3] - 1.2421180 ) / fabs ( rowStdevfedTable2_2_5[3] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[4] - 0.4523443 ) / fabs ( rowStdevfedTable2_2_5[4] ) < 1e-6 ); + return 0; +} + + +static int zstdevfsTest(void) { + doubleComplex value1; + doubleComplex coef1 ; + doubleComplex value2; + doubleComplex coef2 ; + + value1 = DoubleComplex(3.0, 3.0); + coef1 = DoubleComplex(3.0, 0.0); + value2 = DoubleComplex(1.123456789f, 1.123456789f); + coef2 = DoubleComplex(9.0, 0.0); + + printf("\n>>>> Mean Double Complex Scalar Test\n"); + assert( zreals(zstdevfs(value1,coef1)) == 0.0 ); + assert( zimags(zstdevfs(value1,coef1)) == 0.0 ); + assert( zreals(zstdevfs(value2,coef2)) == 0.0 ); + assert( zimags(zstdevfs(value2,coef2)) == 0.0 ); + + return 0; +} + + + +static int zstdevfaTest(void) { + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + + double tableR2[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI2[9] = {0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + double coefR2[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + double coefI2[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + + + double tableR3[10] = {3.0, 6.0, 9.0,10.0, 5.0, + 6.0,18.0, 7.0,14.0, 2.0}; + double tableI3[10] = {3.0,12.0,25.0, 1.0, 2.0, + 5.0,18.0, 7.0, 4.0, 1.0}; + + + double coefR3 [10] = {3.0, 8.0,14.0,13.0, 2.0, + 5.0, 8.0, 2.0, 6.0, 8.0}; + double coefI3 [10] = {0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0}; + + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 9); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 9); + + doubleComplex* table3 = DoubleComplexMatrix (tableR3, tableI3, 10); + doubleComplex* coef3 = DoubleComplexMatrix (coefR3, coefI3, 10); + + doubleComplex result =DoubleComplex(0.0 , 0.0); + + printf("\n>>>> Mean Double Complex Array Test\n"); + result = zstdevfa(table1,1, 9, coef1); + printf("\nresult_1_9 : %e \t+ %e i " ,zreals(result) ,zimags(result)) ; + assert( zreals(result) == 0.0 ); + assert( zimags(result) == 0.0 ); + + result = zstdevfa(table2,1, 9, coef2); + printf("\nresult2_1_9 : %e \t+ %e i " ,zreals(result) ,zimags(result)) ; + assert( zreals(result) == 0.0 ); + assert( zimags(result) == 0.0 ); + + + result = zstdevfa(table3,2, 5, coef3); + printf("\nresult_2_5 : %e \t+ %e i " ,zreals(result) ,zimags(result)) ; + assert( fabs(zreals(result) - 1.7749350 ) / fabs ( zimags(result) ) < 1e-6 ); + assert( fabs(zimags(result) - 8.3811287) / fabs ( zreals(result) ) < 1e-6 ); + + return 0; +} + + +static int zrowstdevfaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 10); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 10); + + doubleComplex rowStdevfedTable1_3_3[3]; + doubleComplex rowStdevfedTable2_2_5[5]; + /*test when the matrix is only imaginary*/ + double tableR3[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + double tableI3[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR3[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI3[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + + doubleComplex* table3 = DoubleComplexMatrix (tableR3, tableI3, 10); + doubleComplex* coef3 = DoubleComplexMatrix (coefR3, coefI3, 10); + + doubleComplex rowStdevfedTable3_2_5[5]; + /**/ + /*test when the matrix is only real and the coef matrix is only imaginary*/ + double tableR4[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI4[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0 , 0.0}; + double coefR4[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0 , 0.0}; + double coefI4[10] ={10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + + + + + doubleComplex* table4 = DoubleComplexMatrix (tableR4, tableI4, 10); + doubleComplex* coef4 = DoubleComplexMatrix (coefR4, coefI4, 10); + + doubleComplex rowStdevfedTable4_2_5[5]; + /**/ + + + printf("\n>>>> Row stdevf Double Complex Array Test\n"); + + rowStdevfedTable1_3_3[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable1_3_3[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable1_3_3[2] = DoubleComplex(0.0, 0.0); + + rowStdevfedTable2_2_5[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable2_2_5[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable2_2_5[2] = DoubleComplex(0.0, 0.0); + rowStdevfedTable2_2_5[3] = DoubleComplex(0.0, 0.0); + rowStdevfedTable2_2_5[4] = DoubleComplex(0.0, 0.0); + + rowStdevfedTable3_2_5[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_2_5[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_2_5[2] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_2_5[3] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_2_5[4] = DoubleComplex(0.0, 0.0); + + + rowStdevfedTable4_2_5[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable4_2_5[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable4_2_5[2] = DoubleComplex(0.0, 0.0); + rowStdevfedTable4_2_5[3] = DoubleComplex(0.0, 0.0); + rowStdevfedTable4_2_5[4] = DoubleComplex(0.0, 0.0); + + + zrowstdevfa(table1 , 3 , 3 , coef1 , rowStdevfedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("rowStdevfedTable_3_3[%d] = %e + %ei\n", i, zreals(rowStdevfedTable1_3_3[i]), zimags(rowStdevfedTable1_3_3[i])); + } + assert( fabs(zreals(rowStdevfedTable1_3_3[0]) - 2.8394542 ) / fabs ( zreals(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[0]) - 0.9464847) / fabs ( zimags(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable1_3_3[1]) - 2.8003759) / fabs ( zreals(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[1]) - 0.9334586) / fabs ( zimags(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable1_3_3[2]) - 2.7669196) / fabs ( zreals(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[2]) - 0.9223065) / fabs ( zimags(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); +/**/ + zrowstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable_2_5[%d] = %e + %ei\n", i, zreals(rowStdevfedTable2_2_5[i]), zimags(rowStdevfedTable2_2_5[i])); + } + assert( fabs(zreals(rowStdevfedTable2_2_5[0]) - 0.9045340 ) / fabs ( zreals(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[0]) - 0.3015113 ) / fabs ( zimags(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable2_2_5[1]) - 2.3935678 ) / fabs ( zreals(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[1]) + 0.4787136) / fabs ( zimags(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable2_2_5[2]) - 1.3887301 ) / fabs ( zreals(rowStdevfedTable2_2_5[2]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[2]) - 0.4629100 ) / fabs ( zimags(rowStdevfedTable2_2_5[2]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable2_2_5[3]) - 1.2421180 ) / fabs ( zreals(rowStdevfedTable2_2_5[3]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[3]) - 0.4140393 ) / fabs ( zimags(rowStdevfedTable2_2_5[3]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable2_2_5[4]) - 0.4523443 ) / fabs ( zreals(rowStdevfedTable2_2_5[4]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[4]) - 2.7140659) / fabs ( zimags(rowStdevfedTable2_2_5[4]) ) < 1e-6 ); +/**/ + zrowstdevfa(table3, 2 , 5 , coef3 , rowStdevfedTable3_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable3_2_5[%d] = %e + %ei\n", i, zreals(rowStdevfedTable3_2_5[i]), zimags(rowStdevfedTable3_2_5[i])); + } + + assert( fabs(zimags(rowStdevfedTable3_2_5[0]) - 0.3015113 ) / fabs (zimags(rowStdevfedTable3_2_5[0]) ) < 1e-6 ); + + + assert( fabs(zimags(rowStdevfedTable3_2_5[1]) - 0.4787136) / fabs ( zimags(rowStdevfedTable3_2_5[1]) ) < 1e-6 ); + + + assert( fabs(zimags(rowStdevfedTable3_2_5[2]) - 0.4629100 ) / fabs (zimags(rowStdevfedTable3_2_5[2]) ) < 1e-6 ); + + + assert( fabs(zimags(rowStdevfedTable3_2_5[3]) - 0.4140393 ) / fabs ( zimags(rowStdevfedTable3_2_5[3]) ) < 1e-6 ); + + + assert( fabs(zimags(rowStdevfedTable3_2_5[4]) - 2.7140659) / fabs ( zimags(rowStdevfedTable3_2_5[4]) ) < 1e-6 ); + +/**/ + zrowstdevfa(table4 , 2 , 5 , coef4 , rowStdevfedTable4_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable4_2_5[%d] = %e + %ei\n", i, zreals(rowStdevfedTable4_2_5[i]), zimags(rowStdevfedTable4_2_5[i])); + } + assert( fabs(zreals(rowStdevfedTable4_2_5[0]) - 0.8597825 ) / fabs ( zreals(rowStdevfedTable4_2_5[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable4_2_5[0]) + 0.0390006 ) / fabs ( zimags(rowStdevfedTable4_2_5[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable4_2_5[1]) - 2.3141768 ) / fabs ( zreals(rowStdevfedTable4_2_5[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable4_2_5[1]) + 0.0722475) / fabs ( zimags(rowStdevfedTable4_2_5[1]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable4_2_5[2]) - 1.2915122 ) / fabs ( zreals(rowStdevfedTable4_2_5[2]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable4_2_5[2]) + 0.0804066 ) / fabs ( zimags(rowStdevfedTable4_2_5[2]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable4_2_5[3]) - 1.1980065 ) / fabs ( zreals(rowStdevfedTable4_2_5[3]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable4_2_5[3]) + 0.0398893 ) / fabs ( zimags(rowStdevfedTable4_2_5[3]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable4_2_5[4]) - 0.4433143 ) / fabs ( zreals(rowStdevfedTable4_2_5[4]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable4_2_5[4]) + 0.00852212) / fabs ( zimags(rowStdevfedTable4_2_5[4]) ) < 1e-6 ); + + return 0; +} + + + + +static int zcolumnstdevfaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR3[6] = {4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }; + double tableI3[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + + double coefR3[6] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + double coefI3[6] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 10); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 10); + + doubleComplex* table3 = DoubleComplexMatrix (tableR3, tableI3, 10); + doubleComplex* coef3 = DoubleComplexMatrix (coefR3, coefI3, 10); + + doubleComplex rowStdevfedTable1_3_3[3]; + doubleComplex rowStdevfedTable2_2_5[2]; + doubleComplex rowStdevfedTable3_3_2[3]; + + rowStdevfedTable1_3_3[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable1_3_3[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable1_3_3[2] = DoubleComplex(0.0, 0.0); + + rowStdevfedTable2_2_5[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable2_2_5[1] = DoubleComplex(0.0, 0.0); + + rowStdevfedTable3_3_2[0] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_3_2[1] = DoubleComplex(0.0, 0.0); + rowStdevfedTable3_3_2[2] = DoubleComplex(0.0, 0.0); + + + printf("\n>>>> Column stdevf Double Complex Array Test\n"); + + + + zcolumnstdevfa(table1 , 3 , 3 , coef1 , rowStdevfedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnStdevfedTable_3_3[%d] = %e + %ei\n", i, zreals(rowStdevfedTable1_3_3[i]), zimags(rowStdevfedTable1_3_3[i])); + } + assert( fabs(zreals(rowStdevfedTable1_3_3[0]) - 0.8268689) / fabs ( zimags(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[0]) - 2.4806066) / fabs ( zreals(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable1_3_3[1]) - 0.8164966) / fabs ( zimags(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[1]) - 2.4494897) / fabs ( zreals(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable1_3_3[2]) - 0.8323524 ) / fabs ( zimags(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable1_3_3[2]) - 2.4970571 ) / fabs ( zreals(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); +/**/ + zcolumnstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 2 ; ++i ) + { + printf("columnStdevfedTable_2_5[%d] = %e + %ei\n", i, zreals(rowStdevfedTable2_2_5[i]), zimags(rowStdevfedTable2_2_5[i])); + } + assert( fabs(zreals(rowStdevfedTable2_2_5[0]) - 2.3683811 ) / fabs ( zimags(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[0]) - 2.4784193 ) / fabs ( zreals(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable2_2_5[1]) - 3.1890422 ) / fabs ( zimags(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable2_2_5[1]) - 4.9966774 ) / fabs ( zreals(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + + zcolumnstdevfa(table3 , 3 , 2 , coef3 , rowStdevfedTable3_3_2); + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnStdevfedTable3_3_2[%d] = %e + %ei\n", i, zreals(rowStdevfedTable3_3_2[i]), zimags(rowStdevfedTable3_3_2[i])); + } + assert( fabs(zreals(rowStdevfedTable3_3_2[0]) - 1.1825083) / fabs ( zimags(rowStdevfedTable3_3_2[0]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable3_3_2[0]) + 0.1170914) / fabs ( zreals(rowStdevfedTable3_3_2[0]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable3_3_2[1]) - 1.3450417) / fabs ( zimags(rowStdevfedTable3_3_2[1]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable3_3_2[1]) + 0.0955892) / fabs ( zreals(rowStdevfedTable3_3_2[1]) ) < 1e-6 ); + + assert( fabs(zreals(rowStdevfedTable3_3_2[2]) - 1.4077246 ) / fabs ( zimags(rowStdevfedTable3_3_2[2]) ) < 1e-6 ); + assert( fabs(zimags(rowStdevfedTable3_3_2[2]) + 0.0779670 ) / fabs ( zreals(rowStdevfedTable3_3_2[2]) ) < 1e-6 ); + return 0; +} + + +static int teststdevf(void) { + + dstdevfsTest(); + dstdevfaTest(); + dcolumnstdevfaTest(); + drowstdevfaTest(); + zstdevfsTest(); + zstdevfaTest(); + zrowstdevfaTest(); + zcolumnstdevfaTest(); + + return 0; +} + +int main(void) { + assert(teststdevf() == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/testFloatStdevf.c b/2.3-1/src/c/statisticsFunctions/stdevf/testFloatStdevf.c new file mode 100644 index 00000000..bdf61a63 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/testFloatStdevf.c @@ -0,0 +1,389 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "stdevf.h" + + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int sstdevfsTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + float coef1 = 56.0f ; + float coef2 = 2.0f ; + + printf("\n>>>> stdevf Float Scalar Test\n"); + printf("result : %f " ,sstdevfs(value1,coef1)) ; + printf("result : %f " ,sstdevfs(value2,coef)) ; + assert( ( sstdevfs(value1,coef1) ) == 0.0f ); + assert( ( sstdevfs(value2,coef2) ) == 0.0f ); + + value1 = 3.0f; + value2 = 1.123456789f; + coef1 = 56.0f ; + coef2 = 2.0f ; + + + return 0; +} + +static int sstdevfaTest(void) { + float table1[3] = {3.0f, 6.0f, 9.0f}; + float coef1[3] = {10.0f, 2.0f, 6.0f}; + + float table2[5] = {3.186784563f, + 4.186784563f, + 5.186784563f, + 6.186784563f, + 7.186784563f}; + + float coef2[5] = {3.0f, + 4.0f, + 5.0f, + 6.0f, + 7.0f}; + + float table3[10] = {3.0f, 6.0f, 9.0f,10.0f, 5.0f, + 6.0f,18.0f, 7.0f,14.0f, 2.0f}; + float coef3 [10] = {3.0f, 8.0f,14.0f,13.0f, 2.0f, + 5.0f, 8.0f, 2.0f, 6.0f, 8.0f}; + + float result_2_5 = sstdevfa(table3,2, 5, coef3); + + printf("\n>>>> stdevf Float Array Test\n"); + printf("\nresult : %f " ,sstdevfa(table1,1, 3, coef1)) ; + printf("\nresult : %f " ,sstdevfa(table2,1, 5, coef2)) ; + printf("\nresult : %f " ,result_2_5) ; + + assert(sstdevfa(table1,1, 3, coef1) == 0.0f); + assert(sstdevfa(table1,1, 3, coef1) == 0.0f); + assert( ( fabs(result_2_5 ) - ( 4.6440201f ) ) / fabs ( result_2_5 ) < 1e-6 ); + return 0; +} + + +static int scolumnstdevfaTest(void) { + + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + + float columnStdevfedTable1_3_3[3] = {0}; + float columnStdevfedTable1_1_9[1] = {0}; + + + printf("\n>>>> Column stdevf Float Array Test\n"); + +/**/ + + scolumnstdevfa(table1, 3, 3, coef1 ,columnStdevfedTable1_3_3); + + printf("\nresult1 : %f " ,columnStdevfedTable1_3_3[0]) ; + printf("\nresult2 : %f " ,columnStdevfedTable1_3_3[1]) ; + printf("\nresult3 : %f " ,columnStdevfedTable1_3_3[2]) ; + + assert( fabs(columnStdevfedTable1_3_3[0] - 0.8268689f ) / fabs ( columnStdevfedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(columnStdevfedTable1_3_3[1] - 0.8164966f ) / fabs ( columnStdevfedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(columnStdevfedTable1_3_3[2] - 0.8323524f ) / fabs ( columnStdevfedTable1_3_3[2] ) < 1e-6 ); + + + + scolumnstdevfa(table1, 1, 9, coef1 ,columnStdevfedTable1_1_9); + printf("\nresult_1_9: %f\n " ,columnStdevfedTable1_1_9[0]) ; + assert( columnStdevfedTable1_1_9[0] == 0.0f); + + + return 0; +} + + +static int srowstdevfaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + + float table2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float coef2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + + + + float rowStdevfedTable1_3_3[3] = {0}; + float rowStdevfedTable1_1_9[9] = {0}; + float rowStdevfedTable2_2_5[5] = {0}; + printf("\n>>>> Row Mean Float Array Test\n"); + + + srowstdevfa(table1, 3, 3, coef1 , rowStdevfedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowStdevfedTable1_3_3[%d] = %e\n", i, rowStdevfedTable1_3_3[i]); + } + assert( fabs(rowStdevfedTable1_3_3[0] - 2.8394542f ) / fabs ( rowStdevfedTable1_3_3[0] ) < 1e-6 ); + assert( fabs(rowStdevfedTable1_3_3[1] - 2.8003759f ) / fabs ( rowStdevfedTable1_3_3[1] ) < 1e-6 ); + assert( fabs(rowStdevfedTable1_3_3[2] - 2.7669196f ) / fabs ( rowStdevfedTable1_3_3[2] ) < 1e-6 ); + +/**/ + srowstdevfa(table1, 1, 9, coef1, rowStdevfedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowStdevfedTable1_1_9[%d] = %e\n", i, rowStdevfedTable1_1_9[i]); + assert(rowStdevfedTable1_1_9[i] == 0.0f); + } + + +/**/ + /**/ + srowstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable_2_5[%d] = %e \n", i, rowStdevfedTable2_2_5[i]); + } + assert( fabs(rowStdevfedTable2_2_5[0] - 0.9045340f ) / fabs ( rowStdevfedTable2_2_5[0] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[1] - 2.3935678f ) / fabs ( rowStdevfedTable2_2_5[1] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[2] - 1.3887301f ) / fabs ( rowStdevfedTable2_2_5[2] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[3] - 1.2421180f ) / fabs ( rowStdevfedTable2_2_5[3] ) < 1e-6 ); + assert( fabs(rowStdevfedTable2_2_5[4] - 0.4523443f ) / fabs ( rowStdevfedTable2_2_5[4] ) < 1e-6 ); + return 0; +} + + +static int cstdevfsTest(void) { + floatComplex value1; + floatComplex coef1 ; + floatComplex value2; + floatComplex coef2 ; + + value1 = FloatComplex(3.0f, 3.0f); + coef1 = FloatComplex(3.0f, 0.0f); + value2 = FloatComplex(1.123456789f, 1.123456789f); + coef2 = FloatComplex(9.0f, 0.0f); + + printf("\n>>>> Mean Float Complex Scalar Test\n"); + assert( creals(cstdevfs(value1,coef1)) == 0.0f ); + assert( cimags(cstdevfs(value1,coef1)) == 0.0f ); + assert( creals(cstdevfs(value2,coef2)) == 0.0f ); + assert( cimags(cstdevfs(value2,coef2)) == 0.0f ); + + return 0; +} + + + +static int cstdevfaTest(void) { + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + + float tableR3[10] = {3.0f, 6.0f, 9.0f,10.0f, 5.0f, + 6.0f,18.0f, 7.0f,14.0f, 2.0f}; + float tableI3[10] = {3.0f,12.0f,25.0f, 1.0f, 2.0f, + 5.0f,18.0f, 7.0f, 4.0f, 1.0f}; + + + float coefR3 [10] = {3.0f, 8.0f,14.0f,13.0f, 2.0f, + 5.0f, 8.0f, 2.0f, 6.0f, 8.0f}; + float coefI3 [10] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + floatComplex* table3 = FloatComplexMatrix (tableR3, tableI3, 10); + floatComplex* coef3 = FloatComplexMatrix (coefR3, coefI3, 10); + + floatComplex result =FloatComplex(0.0f , 0.0f); + + printf("\n>>>> Mean Float Complex Array Test\n"); + result = cstdevfa(table1,1, 9, coef1); + printf("\nresult_1_9 : %f \t+ %f i " ,creals(result) ,cimags(result)) ; + assert( creals(result) == 0.0f ); + assert( cimags(result) == 0.0f ); + + + result = cstdevfa(table3,2, 5, coef3); + printf("\nresult_2_5 : %f \t+ %f i " ,creals(result) ,cimags(result)) ; + assert( fabs(creals(result) - 1.7749350f ) / fabs ( cimags(result) ) < 1e-6 ); + assert( fabs(cimags(result) - 8.3811287f ) / fabs ( creals(result) ) < 1e-6 ); + + return 0; +} + + +static int crowstdevfaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 10); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 10); + + floatComplex rowStdevfedTable1_3_3[3]; + floatComplex rowStdevfedTable2_2_5[5]; + + printf("\n>>>> Row stdevf Float Complex Array Test\n"); + + rowStdevfedTable1_3_3[0] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable1_3_3[1] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable1_3_3[2] = FloatComplex(0.0f, 0.0f); + + rowStdevfedTable2_2_5[0] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable2_2_5[1] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable2_2_5[2] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable2_2_5[3] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable2_2_5[4] = FloatComplex(0.0f, 0.0f); + + + crowstdevfa(table1 , 3 , 3 , coef1 , rowStdevfedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("rowStdevfedTable_3_3[%d] = %e + %ei\n", i, creals(rowStdevfedTable1_3_3[i]), cimags(rowStdevfedTable1_3_3[i])); + } + assert( fabs(creals(rowStdevfedTable1_3_3[0]) - 2.8394542f ) / fabs ( cimags(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[0]) - 0.9464847f ) / fabs ( creals(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable1_3_3[1]) - 2.8003759f ) / fabs ( cimags(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[1]) - 0.9334586f ) / fabs ( creals(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable1_3_3[2]) - 2.7669196f ) / fabs ( cimags(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[2]) - 0.9223065f ) / fabs ( creals(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); +/**/ + crowstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 5 ; ++i ) + { + printf("rowStdevfedTable_2_5[%d] = %e + %ei\n", i, creals(rowStdevfedTable2_2_5[i]), cimags(rowStdevfedTable2_2_5[i])); + } + assert( fabs(creals(rowStdevfedTable2_2_5[0]) - 0.9045340f ) / fabs ( cimags(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[0]) - 0.3015113f ) / fabs ( creals(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable2_2_5[1]) - 2.3935678f ) / fabs ( cimags(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[1]) + 0.4787136f ) / fabs ( creals(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable2_2_5[2]) - 1.3887301f ) / fabs ( cimags(rowStdevfedTable2_2_5[2]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[2]) - 0.4629100f ) / fabs ( creals(rowStdevfedTable2_2_5[2]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable2_2_5[3]) - 1.2421180f ) / fabs ( cimags(rowStdevfedTable2_2_5[3]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[3]) - 0.4140393f ) / fabs ( creals(rowStdevfedTable2_2_5[3]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable2_2_5[4]) - 0.4523443f ) / fabs ( cimags(rowStdevfedTable2_2_5[4]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[4]) - 2.7140659f ) / fabs ( creals(rowStdevfedTable2_2_5[4]) ) < 1e-6 ); + + return 0; +} + + + + +static int ccolumnstdevfaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 10); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 10); + + floatComplex rowStdevfedTable1_3_3[3]; + floatComplex rowStdevfedTable2_2_5[2]; + + rowStdevfedTable1_3_3[0] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable1_3_3[1] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable1_3_3[2] = FloatComplex(0.0f, 0.0f); + + rowStdevfedTable2_2_5[0] = FloatComplex(0.0f, 0.0f); + rowStdevfedTable2_2_5[1] = FloatComplex(0.0f, 0.0f); + + + + printf("\n>>>> Column stdevf Float Complex Array Test\n"); + + + + ccolumnstdevfa(table1 , 3 , 3 , coef1 , rowStdevfedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnStdevfedTable_3_3[%d] = %e + %ei\n", i, creals(rowStdevfedTable1_3_3[i]), cimags(rowStdevfedTable1_3_3[i])); + } + assert( fabs(creals(rowStdevfedTable1_3_3[0]) - 0.8268689f ) / fabs ( cimags(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[0]) - 2.4806066f ) / fabs ( creals(rowStdevfedTable1_3_3[0]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable1_3_3[1]) - 0.8164966f ) / fabs ( cimags(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[1]) - 2.4494897f ) / fabs ( creals(rowStdevfedTable1_3_3[1]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable1_3_3[2]) - 0.8323524f ) / fabs ( cimags(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable1_3_3[2]) - 2.4970571f ) / fabs ( creals(rowStdevfedTable1_3_3[2]) ) < 1e-6 ); +/**/ + ccolumnstdevfa(table2 , 2 , 5 , coef2 , rowStdevfedTable2_2_5); + for (i = 0 ; i < 2 ; ++i ) + { + printf("columnStdevfedTable_2_5[%d] = %e + %ei\n", i, creals(rowStdevfedTable2_2_5[i]), cimags(rowStdevfedTable2_2_5[i])); + } + assert( fabs(creals(rowStdevfedTable2_2_5[0]) - 2.3683811f ) / fabs ( cimags(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[0]) - 2.4784193f ) / fabs ( creals(rowStdevfedTable2_2_5[0]) ) < 1e-6 ); + + assert( fabs(creals(rowStdevfedTable2_2_5[1]) - 3.1890422f ) / fabs ( cimags(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + assert( fabs(cimags(rowStdevfedTable2_2_5[1]) - 4.9966774f ) / fabs ( creals(rowStdevfedTable2_2_5[1]) ) < 1e-6 ); + + + return 0; +} + + +static int teststdevf(void) { + + sstdevfsTest(); + sstdevfaTest(); + scolumnstdevfaTest(); + srowstdevfaTest(); + cstdevfsTest(); + cstdevfaTest(); + crowstdevfaTest(); + ccolumnstdevfaTest(); + + return 0; +} + +int main(void) { + assert(teststdevf() == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/zcolumnstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/zcolumnstdevfa.c new file mode 100644 index 00000000..7dadda70 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/zcolumnstdevfa.c @@ -0,0 +1,59 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "stdevf.h" +#include "meanf.h" +#include "abs.h" + +void zcolumnstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex*in2, doubleComplex* out){ + int i = 0; + int j = 0; + doubleComplex temp = DoubleComplex(0.0,0.0); + doubleComplex accumulate = DoubleComplex(0.0,0.0); + doubleComplex accumulateFre = DoubleComplex(0.0,0.0); + + zcolumnmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each zell of the input matrix by its zoefficient*/ + for (j = 0; j < lines; ++j) + { + accumulate = DoubleComplex(0.0,0.0); + accumulateFre = DoubleComplex(0.0,0.0); + temp = DoubleComplex(0.0,0.0); + + for ( i = 0 ; i < columns; ++i ) + { + + temp = zpows ( zdiffs (in1[lines*i + j] ,out[j] ) ,DoubleComplex (2.0, 0.0 ) ); + temp = zmuls( in2[lines*i + j] , temp); + + accumulate = zadds( temp , accumulate); + accumulateFre = zadds(in2[lines*i + j] ,accumulateFre ); + + } + + if (lines <= 1) + { + out[j] = zmuls (DoubleComplex(0.0,0.0) , accumulate ) ; + } + else + { + if( dabss (zreals(accumulate)) <= 3e-14 ) accumulate = DoubleComplex(dabss(zreals(accumulate)) ,zimags(accumulate)); + if( dabss (zimags(accumulate)) <= 3e-14 ) accumulate = DoubleComplex(zreals(accumulate) ,dabss(zimags(accumulate))); + accumulate = zrdivs(accumulate, zdiffs(accumulateFre ,DoubleComplex(1.0,0.0))); + out[j] = zsqrts(accumulate); + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/zrowstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/zrowstdevfa.c new file mode 100644 index 00000000..bfa77aa5 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/zrowstdevfa.c @@ -0,0 +1,63 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" +#include "meanf.h" +#include "abs.h" + + + +void zrowstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex*in2, doubleComplex* out){ + int i = 0; + int j = 0; + doubleComplex temp = DoubleComplex(0.0,0.0); + doubleComplex accumulate = DoubleComplex(0.0,0.0); + doubleComplex accumulateFre = DoubleComplex(0.0,0.0); + + zrowmeanfa(in1, lines, columns, in2, out ); + + /*we first multiply each zell of the input matrix by its coefficient*/ + for (j = 0; j < columns; ++j) + { + + accumulate = DoubleComplex(0.0,0.0); + accumulateFre =DoubleComplex(0.0,0.0); + temp = DoubleComplex(0.0,0.0); + + for ( i = 0 ; i < lines; ++i ) + { + + temp = zpows ( zdiffs (in1[lines*j + i] ,out[j] ) ,DoubleComplex (2.0, 0.0 ) ); + temp = zmuls( in2[lines*j + i] , temp); + + accumulate = zadds( temp , accumulate); + accumulateFre = zadds(in2[lines*j + i] ,accumulateFre ); + + } + + if (lines <= 1) + { + out[j] = zmuls (DoubleComplex(0.0,0.0) , accumulate ) ; + } + else + { + if( dabss (zreals(accumulate)) <= 3e-14 ) accumulate = DoubleComplex(dabss(zreals(accumulate)) ,zimags(accumulate)); + if( dabss (zimags(accumulate)) <= 3e-14 ) accumulate = DoubleComplex(zreals(accumulate) ,dabss(zimags(accumulate))); + + + accumulate = zrdivs(accumulate, zdiffs(accumulateFre ,DoubleComplex(1.0,0.0))); + out[j] = zsqrts(accumulate); + + } + } + +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfa.c b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfa.c new file mode 100644 index 00000000..2a4f52b7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfa.c @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + + +doubleComplex zstdevfa(doubleComplex *in1, int lines, int columns, doubleComplex* in2) +{ + int i = 0 ; + + doubleComplex temp = DoubleComplex(0.0,0.0); + doubleComplex accumulate = DoubleComplex(0.0,0.0); + doubleComplex accumulateFre = DoubleComplex(0.0,0.0); + doubleComplex meanf = zmeanfa (in1 , lines*columns , in2); + + for(i = 0 ; i < lines*columns ; ++i) + { + temp = zpows ( zdiffs (in1[i] , meanf ) ,DoubleComplex (2.0, 0.0 ) ); + temp = zmuls( in2[i] , temp); + + accumulate = zadds( temp , accumulate); + accumulateFre = zadds(in2[i ] ,accumulateFre ); + + } + + if (lines <= 1) + { + + return zmuls (DoubleComplex(0.0,0.0) , accumulate ) ; + } + else + { + + accumulate = zrdivs(accumulate, zdiffs(accumulateFre ,DoubleComplex(1.0,0.0) )); + return zsqrts(accumulate); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfdz.c b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfdz.c new file mode 100644 index 00000000..90feb217 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfdz.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "stdevf.h" +#include "zeros.h" + +doubleComplex zstdevfdz(double *in1, int lines, int columns, doubleComplex* in2) +{ + double* ZEROS = (double *) malloc((unsigned int)(lines*columns*sizeof(double))); + dzerosa(ZEROS,lines,columns); + + return zstdevfa(DoubleComplexMatrix(in1,ZEROS,lines*columns), lines,columns , in2); +} diff --git a/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfzd.c b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfzd.c new file mode 100644 index 00000000..f7a28e30 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/stdevf/zstdevfzd.c @@ -0,0 +1,41 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "stdevf.h" + +doubleComplex zstdevfzd(doubleComplex *in1, int lines, int columns, double* in2) +{ + int i = 0 ; + doubleComplex temp = DoubleComplex(0.0,0.0); + doubleComplex accumulate = DoubleComplex(0.0,0.0); + double accumulateFre = 0.0 ; + doubleComplex meanf = zmeanfzd (in1 , lines , columns , in2); +/*equivalent to (in1 - meanf(x , in2 )).^2 .*in2 */ + for(i = 0 ; i < lines*columns ; ++i) + { + temp = zpows ( zdiffs (in1[i] , meanf ) ,DoubleComplex (2.0, 0.0 ) ); + temp = zmuls( DoubleComplex(in2[i],0.0f) , temp); + + accumulate = zadds( temp , accumulate); + accumulateFre += in2[i]; + } + + if (lines <= 1) + { + return zmuls (DoubleComplex(0.0,0.0) , accumulate ) ; + } + else + { + accumulate = DoubleComplex( zreals(accumulate ) / (accumulateFre - 1) , zimags(accumulate) / (accumulateFre - 1)); + return zsqrts(accumulate); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/Makefile.am b/2.3-1/src/c/statisticsFunctions/sum/Makefile.am new file mode 100644 index 00000000..0fd79658 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/Makefile.am @@ -0,0 +1,65 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libSum_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libSum.la + +libSum_la_SOURCES = $(HEAD) $(SRC) + +SRC = ssuma.c \ + srowsuma.c \ + scolumnsuma.c \ + dsuma.c \ + drowsuma.c \ + dcolumnsuma.c \ + csuma.c \ + crowsuma.c \ + ccolumnsuma.c \ + zsuma.c \ + zrowsuma.c \ + zcolumnsuma.c + +HEAD = ../includes/sum.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatSum testDoubleSum + +TESTS = testFloatSum testDoubleSum + +# +# -*- Sum Tests -*- +# +testFloatSum_SOURCES = testFloatSum.c +testFloatSum_CFLAGS = $(check_INCLUDES) +testFloatSum_LDADD = $(check_LDADD) + +testDoubleSum_SOURCES =testDoubleSum.c +testDoubleSum_CFLAGS = $(check_INCLUDES) +testDoubleSum_LDADD = $(check_LDADD) \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/Makefile.in b/2.3-1/src/c/statisticsFunctions/sum/Makefile.in new file mode 100644 index 00000000..f3d5a853 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/Makefile.in @@ -0,0 +1,831 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatSum$(EXEEXT) testDoubleSum$(EXEEXT) +TESTS = testFloatSum$(EXEEXT) testDoubleSum$(EXEEXT) +subdir = src/c/statisticsFunctions/sum +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libSum_la_LIBADD = +am__objects_1 = +am__objects_2 = libSum_la-ssuma.lo libSum_la-srowsuma.lo \ + libSum_la-scolumnsuma.lo libSum_la-dsuma.lo \ + libSum_la-drowsuma.lo libSum_la-dcolumnsuma.lo \ + libSum_la-csuma.lo libSum_la-crowsuma.lo \ + libSum_la-ccolumnsuma.lo libSum_la-zsuma.lo \ + libSum_la-zrowsuma.lo libSum_la-zcolumnsuma.lo +am_libSum_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libSum_la_OBJECTS = $(am_libSum_la_OBJECTS) +libSum_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libSum_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleSum_OBJECTS = testDoubleSum-testDoubleSum.$(OBJEXT) +testDoubleSum_OBJECTS = $(am_testDoubleSum_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la +testDoubleSum_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleSum_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testDoubleSum_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testFloatSum_OBJECTS = testFloatSum-testFloatSum.$(OBJEXT) +testFloatSum_OBJECTS = $(am_testFloatSum_OBJECTS) +testFloatSum_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatSum_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testFloatSum_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libSum_la_SOURCES) $(testDoubleSum_SOURCES) \ + $(testFloatSum_SOURCES) +DIST_SOURCES = $(libSum_la_SOURCES) $(testDoubleSum_SOURCES) \ + $(testFloatSum_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libSum_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libSum.la +libSum_la_SOURCES = $(HEAD) $(SRC) +SRC = ssuma.c \ + srowsuma.c \ + scolumnsuma.c \ + dsuma.c \ + drowsuma.c \ + dcolumnsuma.c \ + csuma.c \ + crowsuma.c \ + ccolumnsuma.c \ + zsuma.c \ + zrowsuma.c \ + zcolumnsuma.c + +HEAD = ../includes/sum.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + @LIBMATH@ + + +# +# -*- Sum Tests -*- +# +testFloatSum_SOURCES = testFloatSum.c +testFloatSum_CFLAGS = $(check_INCLUDES) +testFloatSum_LDADD = $(check_LDADD) +testDoubleSum_SOURCES = testDoubleSum.c +testDoubleSum_CFLAGS = $(check_INCLUDES) +testDoubleSum_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/sum/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/sum/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libSum.la: $(libSum_la_OBJECTS) $(libSum_la_DEPENDENCIES) + $(libSum_la_LINK) -rpath $(pkglibdir) $(libSum_la_OBJECTS) $(libSum_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleSum$(EXEEXT): $(testDoubleSum_OBJECTS) $(testDoubleSum_DEPENDENCIES) + @rm -f testDoubleSum$(EXEEXT) + $(testDoubleSum_LINK) $(testDoubleSum_OBJECTS) $(testDoubleSum_LDADD) $(LIBS) +testFloatSum$(EXEEXT): $(testFloatSum_OBJECTS) $(testFloatSum_DEPENDENCIES) + @rm -f testFloatSum$(EXEEXT) + $(testFloatSum_LINK) $(testFloatSum_OBJECTS) $(testFloatSum_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-ccolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-crowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-csuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-dcolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-drowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-dsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-scolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-srowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-ssuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zcolumnsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zrowsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libSum_la-zsuma.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleSum-testDoubleSum.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatSum-testFloatSum.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libSum_la-ssuma.lo: ssuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-ssuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-ssuma.Tpo -c -o libSum_la-ssuma.lo `test -f 'ssuma.c' || echo '$(srcdir)/'`ssuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-ssuma.Tpo $(DEPDIR)/libSum_la-ssuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ssuma.c' object='libSum_la-ssuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-ssuma.lo `test -f 'ssuma.c' || echo '$(srcdir)/'`ssuma.c + +libSum_la-srowsuma.lo: srowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-srowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-srowsuma.Tpo -c -o libSum_la-srowsuma.lo `test -f 'srowsuma.c' || echo '$(srcdir)/'`srowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-srowsuma.Tpo $(DEPDIR)/libSum_la-srowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowsuma.c' object='libSum_la-srowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-srowsuma.lo `test -f 'srowsuma.c' || echo '$(srcdir)/'`srowsuma.c + +libSum_la-scolumnsuma.lo: scolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-scolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-scolumnsuma.Tpo -c -o libSum_la-scolumnsuma.lo `test -f 'scolumnsuma.c' || echo '$(srcdir)/'`scolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-scolumnsuma.Tpo $(DEPDIR)/libSum_la-scolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnsuma.c' object='libSum_la-scolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-scolumnsuma.lo `test -f 'scolumnsuma.c' || echo '$(srcdir)/'`scolumnsuma.c + +libSum_la-dsuma.lo: dsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-dsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-dsuma.Tpo -c -o libSum_la-dsuma.lo `test -f 'dsuma.c' || echo '$(srcdir)/'`dsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-dsuma.Tpo $(DEPDIR)/libSum_la-dsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dsuma.c' object='libSum_la-dsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-dsuma.lo `test -f 'dsuma.c' || echo '$(srcdir)/'`dsuma.c + +libSum_la-drowsuma.lo: drowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-drowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-drowsuma.Tpo -c -o libSum_la-drowsuma.lo `test -f 'drowsuma.c' || echo '$(srcdir)/'`drowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-drowsuma.Tpo $(DEPDIR)/libSum_la-drowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowsuma.c' object='libSum_la-drowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-drowsuma.lo `test -f 'drowsuma.c' || echo '$(srcdir)/'`drowsuma.c + +libSum_la-dcolumnsuma.lo: dcolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-dcolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-dcolumnsuma.Tpo -c -o libSum_la-dcolumnsuma.lo `test -f 'dcolumnsuma.c' || echo '$(srcdir)/'`dcolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-dcolumnsuma.Tpo $(DEPDIR)/libSum_la-dcolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnsuma.c' object='libSum_la-dcolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-dcolumnsuma.lo `test -f 'dcolumnsuma.c' || echo '$(srcdir)/'`dcolumnsuma.c + +libSum_la-csuma.lo: csuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-csuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-csuma.Tpo -c -o libSum_la-csuma.lo `test -f 'csuma.c' || echo '$(srcdir)/'`csuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-csuma.Tpo $(DEPDIR)/libSum_la-csuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='csuma.c' object='libSum_la-csuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-csuma.lo `test -f 'csuma.c' || echo '$(srcdir)/'`csuma.c + +libSum_la-crowsuma.lo: crowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-crowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-crowsuma.Tpo -c -o libSum_la-crowsuma.lo `test -f 'crowsuma.c' || echo '$(srcdir)/'`crowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-crowsuma.Tpo $(DEPDIR)/libSum_la-crowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowsuma.c' object='libSum_la-crowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-crowsuma.lo `test -f 'crowsuma.c' || echo '$(srcdir)/'`crowsuma.c + +libSum_la-ccolumnsuma.lo: ccolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-ccolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-ccolumnsuma.Tpo -c -o libSum_la-ccolumnsuma.lo `test -f 'ccolumnsuma.c' || echo '$(srcdir)/'`ccolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-ccolumnsuma.Tpo $(DEPDIR)/libSum_la-ccolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnsuma.c' object='libSum_la-ccolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-ccolumnsuma.lo `test -f 'ccolumnsuma.c' || echo '$(srcdir)/'`ccolumnsuma.c + +libSum_la-zsuma.lo: zsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zsuma.Tpo -c -o libSum_la-zsuma.lo `test -f 'zsuma.c' || echo '$(srcdir)/'`zsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zsuma.Tpo $(DEPDIR)/libSum_la-zsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zsuma.c' object='libSum_la-zsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zsuma.lo `test -f 'zsuma.c' || echo '$(srcdir)/'`zsuma.c + +libSum_la-zrowsuma.lo: zrowsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zrowsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zrowsuma.Tpo -c -o libSum_la-zrowsuma.lo `test -f 'zrowsuma.c' || echo '$(srcdir)/'`zrowsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zrowsuma.Tpo $(DEPDIR)/libSum_la-zrowsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowsuma.c' object='libSum_la-zrowsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zrowsuma.lo `test -f 'zrowsuma.c' || echo '$(srcdir)/'`zrowsuma.c + +libSum_la-zcolumnsuma.lo: zcolumnsuma.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -MT libSum_la-zcolumnsuma.lo -MD -MP -MF $(DEPDIR)/libSum_la-zcolumnsuma.Tpo -c -o libSum_la-zcolumnsuma.lo `test -f 'zcolumnsuma.c' || echo '$(srcdir)/'`zcolumnsuma.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libSum_la-zcolumnsuma.Tpo $(DEPDIR)/libSum_la-zcolumnsuma.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnsuma.c' object='libSum_la-zcolumnsuma.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libSum_la_CFLAGS) $(CFLAGS) -c -o libSum_la-zcolumnsuma.lo `test -f 'zcolumnsuma.c' || echo '$(srcdir)/'`zcolumnsuma.c + +testDoubleSum-testDoubleSum.o: testDoubleSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -MT testDoubleSum-testDoubleSum.o -MD -MP -MF $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo -c -o testDoubleSum-testDoubleSum.o `test -f 'testDoubleSum.c' || echo '$(srcdir)/'`testDoubleSum.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo $(DEPDIR)/testDoubleSum-testDoubleSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSum.c' object='testDoubleSum-testDoubleSum.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -c -o testDoubleSum-testDoubleSum.o `test -f 'testDoubleSum.c' || echo '$(srcdir)/'`testDoubleSum.c + +testDoubleSum-testDoubleSum.obj: testDoubleSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -MT testDoubleSum-testDoubleSum.obj -MD -MP -MF $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo -c -o testDoubleSum-testDoubleSum.obj `if test -f 'testDoubleSum.c'; then $(CYGPATH_W) 'testDoubleSum.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSum.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleSum-testDoubleSum.Tpo $(DEPDIR)/testDoubleSum-testDoubleSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleSum.c' object='testDoubleSum-testDoubleSum.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleSum_CFLAGS) $(CFLAGS) -c -o testDoubleSum-testDoubleSum.obj `if test -f 'testDoubleSum.c'; then $(CYGPATH_W) 'testDoubleSum.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleSum.c'; fi` + +testFloatSum-testFloatSum.o: testFloatSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -MT testFloatSum-testFloatSum.o -MD -MP -MF $(DEPDIR)/testFloatSum-testFloatSum.Tpo -c -o testFloatSum-testFloatSum.o `test -f 'testFloatSum.c' || echo '$(srcdir)/'`testFloatSum.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSum-testFloatSum.Tpo $(DEPDIR)/testFloatSum-testFloatSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSum.c' object='testFloatSum-testFloatSum.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -c -o testFloatSum-testFloatSum.o `test -f 'testFloatSum.c' || echo '$(srcdir)/'`testFloatSum.c + +testFloatSum-testFloatSum.obj: testFloatSum.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -MT testFloatSum-testFloatSum.obj -MD -MP -MF $(DEPDIR)/testFloatSum-testFloatSum.Tpo -c -o testFloatSum-testFloatSum.obj `if test -f 'testFloatSum.c'; then $(CYGPATH_W) 'testFloatSum.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSum.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatSum-testFloatSum.Tpo $(DEPDIR)/testFloatSum-testFloatSum.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatSum.c' object='testFloatSum-testFloatSum.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatSum_CFLAGS) $(CFLAGS) -c -o testFloatSum-testFloatSum.obj `if test -f 'testFloatSum.c'; then $(CYGPATH_W) 'testFloatSum.c'; else $(CYGPATH_W) '$(srcdir)/testFloatSum.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c new file mode 100644 index 00000000..64018cdc --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/ccolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void ccolumnsuma(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = cadds(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c new file mode 100644 index 00000000..aaf3c592 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/crowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void crowsuma(floatComplex *in, int lines, int columns, floatComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = cadds( out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/csuma.c b/2.3-1/src/c/statisticsFunctions/sum/csuma.c new file mode 100644 index 00000000..68ebb291 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/csuma.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +floatComplex csuma(floatComplex *in, int size) { + floatComplex accumulate = FloatComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = cadds(accumulate, in[i]); + } + return accumulate; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c new file mode 100644 index 00000000..1f9b479d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/dcolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void dcolumnsuma(double *in, int lines, int columns, double * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] += in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c new file mode 100644 index 00000000..f5e2ed34 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/drowsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void drowsuma(double *in, int lines, int columns, double *out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] += in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/dsuma.c b/2.3-1/src/c/statisticsFunctions/sum/dsuma.c new file mode 100644 index 00000000..eddceb6f --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/dsuma.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +double dsuma(double *in, int size) { + double accumulate = 0.0; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate; + +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c new file mode 100644 index 00000000..4d2415f2 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/scolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void scolumnsuma(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] += in[i]; + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c new file mode 100644 index 00000000..3f20661a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/srowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void srowsuma(float *in, int lines, int columns, float * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] += in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]; + } +} + diff --git a/2.3-1/src/c/statisticsFunctions/sum/ssuma.c b/2.3-1/src/c/statisticsFunctions/sum/ssuma.c new file mode 100644 index 00000000..aabc7fe0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/ssuma.c @@ -0,0 +1,25 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +float ssuma(float *in, int size) { + float accumulate = 0.0f; + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate += in[i]; + } + return accumulate; + +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c b/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c new file mode 100644 index 00000000..b411a7de --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/testDoubleSum.c @@ -0,0 +1,493 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "sum.h" + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dsumsTest(void) { + double value1 = 3.0; + double value2 = 1.123456789; + + printf("\n>>>> Sum Double Scalar Test\n"); + assert(dsums(value1) == 3.0); + assert(dsums(value2) == 1.123456789); + + return 0; +} + +static int dsumaTest(void) { + double table1[3] = {3.0, 3.0, 3.0}; + double table2[5] = {9.186784563, + 9.186784563, + 9.186784563, + 9.186784563, + 9.186784563}; + + printf("\n>>>> Sum Double Array Test\n"); + assert(dsuma(table1, 3) == 9.0); + assert((dsuma(table2, 5) - (9.186784653 + 9.186785634 + 9.186784563 + 9.186784563 + 9.186784563)) < 3e-16); + return 0; +} + +static int dcolumnsumaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double columnSummedTable1_3_3[3] = {0}; + double columnSummedTable1_1_9[1] = {0}; + double columnSummedTable1_9_1[9] = {0}; + double columnSummedTable2_2_5[2] = {0}; + double columnSummedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Sum Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + dcolumnsuma(table1, 3, 3,columnSummedTable1_3_3); + assert(columnSummedTable1_3_3[0] == 6.0); + assert(columnSummedTable1_3_3[1] == 15.0); + assert(columnSummedTable1_3_3[2] == 24.0); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + dcolumnsuma(table1, 1, 9,columnSummedTable1_1_9); + assert(columnSummedTable1_1_9[0] == 45.0); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + dcolumnsuma(table1, 9, 1,columnSummedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnSummedTable1_9_1[%d] = %e\n", i, columnSummedTable1_9_1[i]); + assert(columnSummedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + dcolumnsuma(table2, 2, 5,columnSummedTable2_2_5); + assert(columnSummedTable2_2_5[0] == 25.0); + assert(columnSummedTable2_2_5[1] == 30.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnSummedTable2_2_5[%d] = %e\n", i, columnSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + dcolumnsuma(table2, 5, 2,columnSummedTable2_5_2); + assert(columnSummedTable2_5_2[0] == 7.0); + assert(columnSummedTable2_5_2[1] == 9.0); + assert(columnSummedTable2_5_2[2] == 11.0); + assert(columnSummedTable2_5_2[3] == 13.0); + assert(columnSummedTable2_5_2[4] == 15.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnSummedTable2_5_2[%d] = %e\n", i, columnSummedTable2_5_2[i]); + } + + return 0; +} + +static int drowsumaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double rowSummedTable1_3_3[3] = {0}; + double rowSummedTable1_1_9[9] = {0}; + double rowSummedTable1_9_1[1] = {0}; + double rowSummedTable2_2_5[5] = {0}; + double rowSummedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Sum Double Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + drowsuma(table1, 3, 3,rowSummedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowSummedTable1_3_3[%d] = %e\n", i, rowSummedTable1_3_3[i]); + } + assert(rowSummedTable1_3_3[0] == 12.0); + assert(rowSummedTable1_3_3[1] == 15.0); + assert(rowSummedTable1_3_3[2] == 18.0); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + drowsuma(table1, 1, 9,rowSummedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowSummedTable1_1_9[%d] = %e\n", i, rowSummedTable1_1_9[i]); + assert(rowSummedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + drowsuma(table1, 9, 1,rowSummedTable1_9_1); + assert(rowSummedTable1_9_1[0] == 45.0); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + drowsuma(table2, 2, 5,rowSummedTable2_2_5); + assert(rowSummedTable2_2_5[0] == 3.0); + assert(rowSummedTable2_2_5[1] == 7.0); + assert(rowSummedTable2_2_5[2] == 11.0); + assert(rowSummedTable2_2_5[3] == 15.0); + assert(rowSummedTable2_2_5[4] == 19.0); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowSummedTable2_2_5[%d] = %e\n", i, rowSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + drowsuma(table2, 5, 2,rowSummedTable2_5_2); + assert(rowSummedTable2_5_2[0] == 15.0); + assert(rowSummedTable2_5_2[1] == 40.0); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowSummedTable2_5_2[%d] = %e\n", i, rowSummedTable2_5_2[i]); + } + + return 0; +} + +static int zsumsTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex value2 = DoubleComplex(1.123456789, 1.123456789); + + printf("\n>>>> Sum Double Complex Scalar Test\n"); + assert(zreals(zsums(value1)) == 3.0); + assert(zimags(zsums(value1)) == 3.0); + assert(zreals(zsums(value2)) == 1.123456789); + assert(zimags(zsums(value2)) == 1.123456789); + return 0; +} + +static int zsumaTest(void) { + doubleComplex value1 = DoubleComplex(3.0, 3.0); + doubleComplex table1[3]; + doubleComplex value2 = DoubleComplex(9.186784563,9.186784563); + doubleComplex table2[5]; + + printf("\n>>>> Sum Double Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", zimags(zsuma(table1, 3))); + printf("%e\n", zreals(zsuma(table2, 5))); + printf("%e\n", zimags(zsuma(table2, 5))); + printf("%e\n", zreals(zsuma(table2, 5))); + printf("%e\n", zimags(zsuma(table2, 5))); + printf("--------\n"); +#endif + assert(zreals(zsuma(table1, 3)) == 9.0); + assert(zimags(zsuma(table1, 3)) == 9.0); + assert(zreals(zsuma(table2, 5)) == 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563); + assert(zimags(zsuma(table2, 5)) == 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563 + 9.186784563); + + return 0; +} + +static int zrowsumaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex rowSummedIn_4_3[3]; + doubleComplex rowSummedIn_3_4[4]; + doubleComplex rowSummedIn_6_2[2]; + doubleComplex rowSummedIn_2_6[6]; + doubleComplex rowSummedIn_1_12[12]; + doubleComplex rowSummedIn_12_1[1]; + + printf("\n>>>> Row Sum Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zrowsuma(in, 4, 3, rowSummedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowSummedIn_4_3[%d] = %e + %ei\n", i, zreals(rowSummedIn_4_3[i]), zimags(rowSummedIn_4_3[i])); + } + assert(fabs(zreals(rowSummedIn_4_3[0]) -0.6) < 2e-16); + assert(zimags(rowSummedIn_4_3[0]) == 3.8); + assert(zreals(rowSummedIn_4_3[1]) == 2.2); + assert(fabs(zimags(rowSummedIn_4_3[1]) - 2.2) < 1e-15); + assert(fabs(zreals(rowSummedIn_4_3[2]) - 3.8) < 1e-15); + assert(zimags(rowSummedIn_4_3[2]) == 0.6); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zrowsuma(in, 3, 4, rowSummedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowSummedIn_3_4[%d] = %e + %ei\n", i, zreals(rowSummedIn_3_4[i]), zimags(rowSummedIn_3_4[i])); + } + assert(fabs(zreals(rowSummedIn_3_4[0]) - 0.3) < 1e-16); + assert(zimags(rowSummedIn_3_4[0]) == 3.0); + assert(zreals(rowSummedIn_3_4[1]) == 1.2 && zimags(rowSummedIn_3_4[1]) == 2.1); + assert(fabs(zreals(rowSummedIn_3_4[2]) - 2.1) < 1e-15); + assert(zimags(rowSummedIn_3_4[2]) == 1.2); + assert(zreals(rowSummedIn_3_4[3]) == 3.0); + assert(fabs(zimags(rowSummedIn_3_4[3]) - 0.3) < 1e-16); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zrowsuma(in, 6, 2, rowSummedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowSummedIn_6_2[%d] = %e + %ei\n", i, zreals(rowSummedIn_6_2[i]), zimags(rowSummedIn_6_2[i])); + } + assert(zreals(rowSummedIn_6_2[0]) == 1.5 && zimags(rowSummedIn_6_2[0]) == 5.1); + assert(zreals(rowSummedIn_6_2[1]) == 5.1 && zimags(rowSummedIn_6_2[1]) == 1.5); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + zrowsuma(in, 2, 6, rowSummedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowSummedIn_2_6[%d] = %e + %ei\n", i, zreals(rowSummedIn_2_6[i]), zimags(rowSummedIn_2_6[i])); + } + assert(zreals(rowSummedIn_2_6[0]) == 0.1 && zimags(rowSummedIn_2_6[0]) == 2.1); + assert(zreals(rowSummedIn_2_6[1]) == 0.5); + assert(fabs(zimags(rowSummedIn_2_6[1]) - 1.7) < 3e-16); + assert(zreals(rowSummedIn_2_6[2]) == 0.9); + assert(fabs(zimags(rowSummedIn_2_6[2]) - 1.3) < 3e-16); + assert(fabs(zreals(rowSummedIn_2_6[3]) - 1.3) < 3e-16); + assert(zimags(rowSummedIn_2_6[3]) == 0.9); + assert(fabs(zreals(rowSummedIn_2_6[4]) - 1.7) < 3e-16); + assert(zimags(rowSummedIn_2_6[4]) == 0.5); + assert(zreals(rowSummedIn_2_6[5]) == 2.1 && zimags(rowSummedIn_2_6[5]) == 0.1); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + zrowsuma(in, 1, 12, rowSummedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowSummedIn_1_12[%d] = %e + %ei\n", i, zreals(rowSummedIn_1_12[i]), zimags(rowSummedIn_1_12[i])); + assert(zreals(rowSummedIn_1_12[i]) == zreals(in[i]) && zimags(rowSummedIn_1_12[i]) == zimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zrowsuma(in, 12, 1, rowSummedIn_12_1); + printf("rowSummedIn_12_1[%d] = %e + %ei\n", 0, zreals(rowSummedIn_12_1[0]), zimags(rowSummedIn_12_1[0])); + assert(zreals(rowSummedIn_12_1[0]) == 6.6 && zimags(rowSummedIn_12_1[0]) == 6.6); + + return 0; +} + +static int zcolumnsumaTest(void) { + int i = 0; + doubleComplex in[12]; + doubleComplex columnSummedIn_4_3[4]; + doubleComplex columnSummedIn_3_4[3]; + doubleComplex columnSummedIn_6_2[6]; + doubleComplex columnSummedIn_2_6[2]; + doubleComplex columnSummedIn_1_12[1]; + doubleComplex columnSummedIn_12_1[12]; + + printf("\n>>>> ColumnSum Double Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = DoubleComplex((double) i / 10.0, (11.0 - (double) i) / 10.0); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + zcolumnsuma(in, 4, 3, columnSummedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnSummedIn_4_3[%d] = %e + %ei\n", i, zreals(columnSummedIn_4_3[i]), zimags(columnSummedIn_4_3[i])); + } + assert(fabs(zreals(columnSummedIn_4_3[0]) - 1.2) < 1e-15); + assert(zimags(columnSummedIn_4_3[0]) == 2.1); + assert(zreals(columnSummedIn_4_3[1]) == 1.5 && zimags(columnSummedIn_4_3[1]) == 1.8); + assert(zreals(columnSummedIn_4_3[2]) == 1.8 && zimags(columnSummedIn_4_3[2]) == 1.5); + assert(zreals(columnSummedIn_4_3[3]) == 2.1); + assert(fabs(zimags(columnSummedIn_4_3[3]) - 1.2) < 1e-15); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + zcolumnsuma(in, 3, 4, columnSummedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnSummedIn_3_4[%d] = %e + %ei\n", i, zreals(columnSummedIn_3_4[i]), zimags(columnSummedIn_3_4[i])); + } + assert(fabs(zreals(columnSummedIn_3_4[0]) - 1.8) < 1e-15); + assert(fabs(zimags(columnSummedIn_3_4[0]) - 2.6) < 1e-15); + assert(zreals(columnSummedIn_3_4[1]) == 2.2 && zimags(columnSummedIn_3_4[1]) == 2.2); + assert(zreals(columnSummedIn_3_4[2]) == 2.6 && zimags(columnSummedIn_3_4[2]) == 1.8); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + zcolumnsuma(in, 6, 2, columnSummedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnSummedIn_6_2[%d] = %e + %ei\n", i, zreals(columnSummedIn_6_2[i]), zimags(columnSummedIn_6_2[i])); + } + assert(zreals(columnSummedIn_6_2[0]) == 0.6 && zimags(columnSummedIn_6_2[0]) == 1.6); + assert(fabs(zreals(columnSummedIn_6_2[1]) - 0.8) < 1e-15); + assert(zimags(columnSummedIn_6_2[1]) == 1.4); + assert(zreals(columnSummedIn_6_2[2]) == 1.0 && zimags(columnSummedIn_6_2[2]) == 1.2); + assert(zreals(columnSummedIn_6_2[3]) == 1.2 && zimags(columnSummedIn_6_2[3]) == 1.0); + assert(zreals(columnSummedIn_6_2[4]) == 1.4); + assert(fabs(zimags(columnSummedIn_6_2[4]) - 0.8) < 1e-15); + assert(zreals(columnSummedIn_6_2[5]) == 1.6 && zimags(columnSummedIn_6_2[5]) == 0.6); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + zcolumnsuma(in, 2, 6, columnSummedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnSummedIn_2_6[%d] = %e + %ei\n", i, zreals(columnSummedIn_2_6[i]), zimags(columnSummedIn_2_6[i])); + } + assert(zreals(columnSummedIn_2_6[0]) == 3.0 && zimags(columnSummedIn_2_6[0]) == 3.6); + assert(zreals(columnSummedIn_2_6[1]) == 3.6 && zimags(columnSummedIn_2_6[1]) == 3.0); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + zcolumnsuma(in, 1, 12, columnSummedIn_1_12); + printf("columnSummedIn_1_12[%d] = %e + %ei\n", 0, zreals(columnSummedIn_1_12[0]), zimags(columnSummedIn_1_12[0])); + assert(zreals(columnSummedIn_1_12[0]) == 6.6 && zimags(columnSummedIn_1_12[0]) == 6.6); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + zcolumnsuma(in, 12, 1, columnSummedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnSummedIn_12_1[%d] = %e + %ei\n", i, zreals(columnSummedIn_12_1[i]), zimags(columnSummedIn_12_1[i])); + assert(zreals(columnSummedIn_12_1[i]) == zreals(in[i]) && zimags(columnSummedIn_12_1[i]) == zimags(in[i])); + } + + return 0; +} + +static int testSum(void) { + + dsumsTest(); + dsumaTest(); + drowsumaTest(); + dcolumnsumaTest(); + zsumsTest(); + zsumaTest(); + zrowsumaTest(); + zcolumnsumaTest(); + + return 0; +} + +int main(void) { + assert(testSum() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c b/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c new file mode 100644 index 00000000..090075c7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/testFloatSum.c @@ -0,0 +1,481 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "sum.h" + +/* #define LOCAL_DEBUG */ + +static int ssumsTest(void) { + float value1 = 3.0f; + float value2 = 1.123456789f; + + printf("\n>>>> Sum Float Scalar Test\n"); + assert(ssums(value1) == 3.0f); + assert(ssums(value2) == 1.123456789f); + + return 0; +} + +static int ssumaTest(void) { + float table1[3] = {3.0f, 3.0f, 3.0f}; + float table2[5] = {9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f, + 9.186784563f}; + + printf("\n>>>> Sum Float Array Test\n"); + assert(ssuma(table1, 3) == 9.0f); + assert((ssuma(table2, 5) - (9.186784f + 9.186784f + 9.186784f + 9.186784f + 9.186784f)) / ssuma(table2, 5) < 1e-6); + return 0; +} + +static int scolumnsumaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float columnSummedTable1_3_3[3] = {0}; + float columnSummedTable1_1_9[1] = {0}; + float columnSummedTable1_9_1[9] = {0}; + float columnSummedTable2_2_5[2] = {0}; + float columnSummedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Sum Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 6 15 24 ] + [ 7 8 9 ] + */ + scolumnsuma(table1, 3, 3,columnSummedTable1_3_3); + assert(columnSummedTable1_3_3[0] == 6.0f); + assert(columnSummedTable1_3_3[1] == 15.0f); + assert(columnSummedTable1_3_3[2] == 24.0f); + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + scolumnsuma(table1, 1, 9,columnSummedTable1_1_9); + assert(columnSummedTable1_1_9[0] == 45.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + scolumnsuma(table1, 9, 1,columnSummedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnSummedTable1_9_1[%d] = %e\n", i, columnSummedTable1_9_1[i]); + assert(columnSummedTable1_9_1[i] == table1[i]); + } + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 25 30 ] + */ + scolumnsuma(table2, 2, 5,columnSummedTable2_2_5); + assert(columnSummedTable2_2_5[0] == 25.0f); + assert(columnSummedTable2_2_5[1] == 30.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnSummedTable2_2_5[%d] = %e\n", i, columnSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 7 9 11 13 15 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + scolumnsuma(table2, 5, 2,columnSummedTable2_5_2); + assert(columnSummedTable2_5_2[0] == 7.0f); + assert(columnSummedTable2_5_2[1] == 9.0f); + assert(columnSummedTable2_5_2[2] == 11.0f); + assert(columnSummedTable2_5_2[3] == 13.0f); + assert(columnSummedTable2_5_2[4] == 15.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnSummedTable2_5_2[%d] = %e\n", i, columnSummedTable2_5_2[i]); + } + + return 0; +} + +static int srowsumaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float rowSummedTable1_3_3[3] = {0}; + float rowSummedTable1_1_9[9] = {0}; + float rowSummedTable1_9_1[1] = {0}; + float rowSummedTable2_2_5[5] = {0}; + float rowSummedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Sum Float Array Test\n"); + /* + [ 1 2 3 ] + [ 4 5 6 ] => [ 12 15 18 ] + [ 7 8 9 ] + */ + srowsuma(table1, 3, 3,rowSummedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowSummedTable1_3_3[%d] = %e\n", i, rowSummedTable1_3_3[i]); + } + assert(rowSummedTable1_3_3[0] == 12.0f); + assert(rowSummedTable1_3_3[1] == 15.0f); + assert(rowSummedTable1_3_3[2] == 18.0f); + + /* + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + */ + srowsuma(table1, 1, 9,rowSummedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowSummedTable1_1_9[%d] = %e\n", i, rowSummedTable1_1_9[i]); + assert(rowSummedTable1_1_9[i] == table1[i]); + } + + /* + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + */ + srowsuma(table1, 9, 1,rowSummedTable1_9_1); + assert(rowSummedTable1_9_1[0] == 45.0f); + + /* + [ 1 3 5 7 9 ] + [ 2 4 6 8 10 ] => [ 3 7 11 15 19 ] + */ + srowsuma(table2, 2, 5,rowSummedTable2_2_5); + assert(rowSummedTable2_2_5[0] == 3.0f); + assert(rowSummedTable2_2_5[1] == 7.0f); + assert(rowSummedTable2_2_5[2] == 11.0f); + assert(rowSummedTable2_2_5[3] == 15.0f); + assert(rowSummedTable2_2_5[4] == 19.0f); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowSummedTable2_2_5[%d] = %e\n", i, rowSummedTable2_2_5[i]); + } + + /* + [ 1 6 ] + [ 2 7 ] => [ 15 40 ] + [ 3 8 ] + [ 4 9 ] + [ 5 10 ] + */ + srowsuma(table2, 5, 2,rowSummedTable2_5_2); + assert(rowSummedTable2_5_2[0] == 15.0f); + assert(rowSummedTable2_5_2[1] == 40.0f); + for ( i = 0 ; i < 2 ; ++i) { + printf("rowSummedTable2_5_2[%d] = %e\n", i, rowSummedTable2_5_2[i]); + } + + return 0; +} + +static int csumsTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex value2 = FloatComplex(1.123456789f, 1.123456789f); + + printf("\n>>>> Sum Float Complex Scalar Test\n"); + assert(creals(csums(value1)) == 3.0f); + assert(cimags(csums(value1)) == 3.0f); + assert(creals(csums(value2)) == 1.123456789f); + assert(cimags(csums(value2)) == 1.123456789f); + return 0; +} + +static int csumaTest(void) { + floatComplex value1 = FloatComplex(3.0f, 3.0f); + floatComplex table1[3]; + floatComplex value2 = FloatComplex(9.186784563f,9.186784563f); + floatComplex table2[5]; + + printf("\n>>>> Sum Float Complex Array Test\n"); + table1[0] = value1; + table1[1] = value1; + table1[2] = value1; + + table2[0] = value2; + table2[1] = value2; + table2[2] = value2; + table2[3] = value2; + table2[4] = value2; + +#ifdef LOCAL_DEBUG + printf("--------\n"); + printf("%e\n", cimags(csuma(table1, 3))); + printf("%e\n", creals(csuma(table2, 5))); + printf("%e\n", cimags(csuma(table2, 5))); + printf("%e\n", creals(csuma(table2, 5))); + printf("%e\n", cimags(csuma(table2, 5))); + printf("--------\n"); +#endif + assert(creals(csuma(table1, 3)) == 9.0f); + assert(cimags(csuma(table1, 3)) == 9.0f); + assert(creals(csuma(table2, 5)) == 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f); + assert(cimags(csuma(table2, 5)) == 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f + 9.186784563f); + + return 0; +} + +static int crowsumaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex rowSummedIn_4_3[3]; + floatComplex rowSummedIn_3_4[4]; + floatComplex rowSummedIn_6_2[2]; + floatComplex rowSummedIn_2_6[6]; + floatComplex rowSummedIn_1_12[12]; + floatComplex rowSummedIn_12_1[1]; + + printf("\n>>>> Row Sum Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 0.6+3.8i 2.2+2.2i 3.8+0.6i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + crowsuma(in, 4, 3, rowSummedIn_4_3); + for (i = 0 ; i < 3 ; ++i) { + printf("rowSummedIn_4_3[%d] = %e + %ei\n", i, creals(rowSummedIn_4_3[i]), cimags(rowSummedIn_4_3[i])); + } + assert(creals(rowSummedIn_4_3[0]) == 0.6f && cimags(rowSummedIn_4_3[0]) == 3.8f); + assert(creals(rowSummedIn_4_3[1]) == 2.2f && cimags(rowSummedIn_4_3[1]) == 2.2f); + assert(fabs(creals(rowSummedIn_4_3[2]) - 3.8f) < 1e-06); + assert(cimags(rowSummedIn_4_3[2]) == 0.6f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 0.3+3.i 1.2+2.1i 2.1+1.2i 3.+0.3i] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + crowsuma(in, 3, 4, rowSummedIn_3_4); + for (i = 0 ; i < 4 ; ++i) { + printf("rowSummedIn_3_4[%d] = %e + %ei\n", i, creals(rowSummedIn_3_4[i]), cimags(rowSummedIn_3_4[i])); + } + assert(creals(rowSummedIn_3_4[0]) == 0.3f && cimags(rowSummedIn_3_4[0]) == 3.0f); + assert(creals(rowSummedIn_3_4[1]) == 1.2f && cimags(rowSummedIn_3_4[1]) == 2.1f); + assert(creals(rowSummedIn_3_4[2]) == 2.1f && cimags(rowSummedIn_3_4[2]) == 1.2f); + assert(creals(rowSummedIn_3_4[3]) == 3.0f && cimags(rowSummedIn_3_4[3]) == 0.3f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 1.5+5.1i 5.1+1.5i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + crowsuma(in, 6, 2, rowSummedIn_6_2); + for (i = 0 ; i < 2 ; ++i) { + printf("rowSummedIn_6_2[%d] = %e + %ei\n", i, creals(rowSummedIn_6_2[i]), cimags(rowSummedIn_6_2[i])); + } + assert(creals(rowSummedIn_6_2[0]) == 1.5f && cimags(rowSummedIn_6_2[0]) == 5.1f); + assert(creals(rowSummedIn_6_2[1]) == 5.1f); + assert(fabs(cimags(rowSummedIn_6_2[1]) - 1.5f) < 1e-06); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 0.1+2.1i 0.5+1.7i 0.9+1.3i 1.3+0.9i 1.7+0.5i 2.1+0.1i ] + */ + crowsuma(in, 2, 6, rowSummedIn_2_6); + for (i = 0 ; i < 6 ; ++i) { + printf("rowSummedIn_2_6[%d] = %e + %ei\n", i, creals(rowSummedIn_2_6[i]), cimags(rowSummedIn_2_6[i])); + } + assert(creals(rowSummedIn_2_6[0]) == 0.1f && cimags(rowSummedIn_2_6[0]) == 2.1f); + assert(creals(rowSummedIn_2_6[1]) == 0.5f && cimags(rowSummedIn_2_6[1]) == 1.7f); + assert(creals(rowSummedIn_2_6[2]) == 0.9f && cimags(rowSummedIn_2_6[2]) == 1.3f); + assert(creals(rowSummedIn_2_6[3]) == 1.3f && cimags(rowSummedIn_2_6[3]) == 0.9f); + assert(creals(rowSummedIn_2_6[4]) == 1.7f && cimags(rowSummedIn_2_6[4]) == 0.5f); + assert(creals(rowSummedIn_2_6[5]) == 2.1f && cimags(rowSummedIn_2_6[5]) == 0.1f); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + */ + crowsuma(in, 1, 12, rowSummedIn_1_12); + for (i = 0 ; i < 12 ; ++i) { + printf("rowSummedIn_1_12[%d] = %e + %ei\n", i, creals(rowSummedIn_1_12[i]), cimags(rowSummedIn_1_12[i])); + assert(creals(rowSummedIn_1_12[i]) == creals(in[i]) && cimags(rowSummedIn_1_12[i]) == cimags(in[i])); + } + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 6.6+6.6i ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + crowsuma(in, 12, 1, rowSummedIn_12_1); + printf("rowSummedIn_12_1[%d] = %e + %ei\n", 0, creals(rowSummedIn_12_1[0]), cimags(rowSummedIn_12_1[0])); + assert(creals(rowSummedIn_12_1[0]) == 6.6f && cimags(rowSummedIn_12_1[0]) == 6.6f); + + return 0; +} + +static int ccolumnsumaTest(void) { + int i = 0; + floatComplex in[12]; + floatComplex columnSummedIn_4_3[4]; + floatComplex columnSummedIn_3_4[3]; + floatComplex columnSummedIn_6_2[6]; + floatComplex columnSummedIn_2_6[2]; + floatComplex columnSummedIn_1_12[1]; + floatComplex columnSummedIn_12_1[12]; + + printf("\n>>>> ColumnSum Float Complex Array Test\n"); + /* Init input var */ + for (i = 0 ; i < 12 ; ++i) + { + in[i] = FloatComplex((float) i / 10.0f, (11.0f - (float) i) / 10.0f); + } + + /* + [ 1.1i 0.4+0.7i 0.8+0.3i ] + [ 0.1+i 0.5+0.6i 0.9+0.2i ] => [ 1.2+2.1i 1.5+1.8i 1.8+1.5i 2.1+1.2i ] + [ 0.2+0.9i 0.6+0.5i 1+0.1i ] + [ 0.3+0.8i 0.7+0.4i 1.1 ] + */ + ccolumnsuma(in, 4, 3, columnSummedIn_4_3); + for (i = 0 ; i < 4 ; ++i) { + printf("columnSummedIn_4_3[%d] = %e + %ei\n", i, creals(columnSummedIn_4_3[i]), cimags(columnSummedIn_4_3[i])); + } + assert(creals(columnSummedIn_4_3[0]) == 1.2f && cimags(columnSummedIn_4_3[0]) == 2.1f); + assert(creals(columnSummedIn_4_3[1]) == 1.5f); + assert(fabs(cimags(columnSummedIn_4_3[1]) - 1.8f) < 1e-06); + assert(creals(columnSummedIn_4_3[2]) == 1.8f && cimags(columnSummedIn_4_3[2]) == 1.5f); + assert(creals(columnSummedIn_4_3[3]) == 2.1f && cimags(columnSummedIn_4_3[3]) == 1.2f); + + /* + [ 1.1i 0.3+0.8i 0.6+0.5i 0.9+0.2i ] + [ 0.1+i 0.4+0.7i 0.7+0.4i 1+0.1i ] => [ 1.8+2.6i 2.2+2.2i 2.6+1.8i ] + [ 0.2+0.9i 0.5+0.6i 0.8+0.3i 1.1 ] + */ + ccolumnsuma(in, 3, 4, columnSummedIn_3_4); + for (i = 0 ; i < 3 ; ++i) { + printf("columnSummedIn_3_4[%d] = %e + %ei\n", i, creals(columnSummedIn_3_4[i]), cimags(columnSummedIn_3_4[i])); + } + assert(creals(columnSummedIn_3_4[0]) == 1.8f); + assert(fabs(cimags(columnSummedIn_3_4[0]) - 2.6f) < 1e-06); + assert(creals(columnSummedIn_3_4[1]) == 2.2f && cimags(columnSummedIn_3_4[1]) == 2.2f); + assert(creals(columnSummedIn_3_4[2]) == 2.6f && cimags(columnSummedIn_3_4[2]) == 1.8f); + + /* + [ 1.1i 0.6+0.5i ] + [ 0.1+i 0.7+0.4i ] + [ 0.2+0.9i 0.8+0.3i ] => [ 0.6+1.6i 0.8+1.4i 1+1.2i 1.2+i 1.4+0.8i 1.6+0.6i ] + [ 0.3+0.8i 0.9+0.2i ] + [ 0.4+0.7i 1+0.1i ] + [ 0.5+0.6i 1.1 ] + */ + ccolumnsuma(in, 6, 2, columnSummedIn_6_2); + for (i = 0 ; i < 6 ; ++i) { + printf("columnSummedIn_6_2[%d] = %e + %ei\n", i, creals(columnSummedIn_6_2[i]), cimags(columnSummedIn_6_2[i])); + } + assert(creals(columnSummedIn_6_2[0]) == 0.6f && cimags(columnSummedIn_6_2[0]) == 1.6f); + assert(creals(columnSummedIn_6_2[1]) == 0.8f && cimags(columnSummedIn_6_2[1]) == 1.4f); + assert(creals(columnSummedIn_6_2[2]) == 1.0f && cimags(columnSummedIn_6_2[2]) == 1.2f); + assert(creals(columnSummedIn_6_2[3]) == 1.2f && cimags(columnSummedIn_6_2[3]) == 1.0f); + assert(creals(columnSummedIn_6_2[4]) == 1.4f && cimags(columnSummedIn_6_2[4]) == 0.8f); + assert(creals(columnSummedIn_6_2[5]) == 1.6f && cimags(columnSummedIn_6_2[5]) == 0.6f); + + /* + [ 1.1i 0.2+0.9i 0.4+0.7i 0.6+0.5i 0.8+0.3i 1+0.1i ] + [ 0.1+i 0.3+0.8i 0.5+0.6i 0.7+0.4i 0.9+0.2i 1.1 ] => [ 3+3.6i 3.6+3i ] + */ + ccolumnsuma(in, 2, 6, columnSummedIn_2_6); + for (i = 0 ; i < 2 ; ++i) { + printf("columnSummedIn_2_6[%d] = %e + %ei\n", i, creals(columnSummedIn_2_6[i]), cimags(columnSummedIn_2_6[i])); + } + assert(creals(columnSummedIn_2_6[0]) == 3.0f && cimags(columnSummedIn_2_6[0]) == 3.6f); + assert(creals(columnSummedIn_2_6[1]) == 3.6f); + assert(fabs(cimags(columnSummedIn_2_6[1]) -3.0f) < 1e-06); + + /* + [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + => + [ 6.6+6.6i ] + */ + ccolumnsuma(in, 1, 12, columnSummedIn_1_12); + printf("columnSummedIn_1_12[%d] = %e + %ei\n", 0, creals(columnSummedIn_1_12[0]), cimags(columnSummedIn_1_12[0])); + assert(creals(columnSummedIn_1_12[0]) == 6.6f && cimags(columnSummedIn_1_12[0]) == 6.6f); + + + /* + [ 1.1i ] + [ 0.1+i ] + [ 0.2+0.9i ] + [ 0.3+0.8i ] + [ 0.4+0.7i ] + [ 0.5+0.6i ] + [ 0.6+0.5i ] => [ 1.1i 0.1+i 0.2+0.9i 0.3+0.8i 0.4+0.7i 0.5+0.6i 0.6+0.5i 0.7+0.4i 0.8+0.3i 0.9+0.2i 1+0.1i 1.1 ] + [ 0.7+0.4i ] + [ 0.8+0.3i ] + [ 0.9+0.2i ] + [ 1+0.1i ] + [ 1.1 ] + */ + ccolumnsuma(in, 12, 1, columnSummedIn_12_1); + for (i = 0 ; i < 12 ; ++i) { + printf("columnSummedIn_12_1[%d] = %e + %ei\n", i, creals(columnSummedIn_12_1[i]), cimags(columnSummedIn_12_1[i])); + assert(creals(columnSummedIn_12_1[i]) == creals(in[i]) && cimags(columnSummedIn_12_1[i]) == cimags(in[i])); + } + + return 0; +} + +static int testSum(void) { + + ssumsTest(); + ssumaTest(); + srowsumaTest(); + scolumnsumaTest(); + csumsTest(); + csumaTest(); + crowsumaTest(); + ccolumnsumaTest(); + + return 0; +} + +int main(void) { + assert(testSum() == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj new file mode 100644 index 00000000..d82ed7c0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F2A81CDC-2581-481F-B63D-3D2079B264C2} + testDoubleSum + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters new file mode 100644 index 00000000..0bb90bbf --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_DoubleSum/testDoubleSum.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj new file mode 100644 index 00000000..a8acdf08 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {450C8334-BA46-43DB-81BA-7BEDBB346126} + testFloatSum + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters new file mode 100644 index 00000000..56ce3b30 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/test_FloatSum/testFloatSum.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c new file mode 100644 index 00000000..93e97536 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zcolumnsuma.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void zcolumnsuma(doubleComplex *in, int lines, int columns, doubleComplex * out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < lines; ++i) + { + out[i] = in[i]; + } + /* + ** Then accumulate in each row. + */ + for (i = lines ; i < lines * columns ; ++i) + { + out[i % lines] = zadds(out[i % lines] , in[i]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c new file mode 100644 index 00000000..abb62b57 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zrowsuma.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +void zrowsuma(doubleComplex *in, int lines, int columns, doubleComplex* out) { + int i = 0; + + /* + ** First assign first row, just in case + ** out contains non-zero's elements. + */ + for (i = 0 ; i < columns; ++i) + { + out[i] = in[i * lines]; + } + /* + ** Then accumulate in each column. + */ + for (i = 1 ; i <= (lines - 1) * columns ; ++i) + { + out[(i - 1) % columns] = zadds(out[(i - 1) % columns] , + in[((i - 1) % columns) * lines + 1 + (i - 1) / columns]); + } +} diff --git a/2.3-1/src/c/statisticsFunctions/sum/zsuma.c b/2.3-1/src/c/statisticsFunctions/sum/zsuma.c new file mode 100644 index 00000000..e566c95a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/sum/zsuma.c @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "sum.h" + +doubleComplex zsuma(doubleComplex *in, int size) { + doubleComplex accumulate = DoubleComplex(0.0f, 0.0f); + int i = 0; + + for (i = 0; i < size; ++i) + { + accumulate = zadds(accumulate, in[i]); + } + return accumulate; +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/Makefile.am b/2.3-1/src/c/statisticsFunctions/variance/Makefile.am new file mode 100644 index 00000000..d6fa70e8 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/Makefile.am @@ -0,0 +1,89 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libVariance_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libVariance.la + +libVariance_la_SOURCES = $(HEAD) $(SRC) + +SRC = svariancea.c \ + scolumnvariancea.c \ + dvariancea.c \ + srowvariancea.c \ + drowvariancea.c \ + dcolumnvariancea.c \ + cvariancea.c \ + crowvariancea.c \ + ccolumnvariancea.c \ + zvariancea.c \ + zrowvariancea.c \ + zcolumnvariancea.c + +HEAD = ../includes/variance.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variance/libVariance.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatVarianceNono testDoubleVarianceNono + +TESTS = testFloatVarianceNono testDoubleVarianceNono + +# +# -*- Variance Tests -*- +# +testFloatVarianceNono_SOURCES = testFloatVarianceNono.c +testFloatVarianceNono_CFLAGS = $(check_INCLUDES) +testFloatVarianceNono_LDADD = $(check_LDADD) + +testDoubleVarianceNono_SOURCES =testDoubleVarianceNono.c +testDoubleVarianceNono_CFLAGS = $(check_INCLUDES) +testDoubleVarianceNono_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/variance/Makefile.in b/2.3-1/src/c/statisticsFunctions/variance/Makefile.in new file mode 100644 index 00000000..93202866 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/Makefile.in @@ -0,0 +1,884 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatVarianceNono$(EXEEXT) \ + testDoubleVarianceNono$(EXEEXT) +TESTS = testFloatVarianceNono$(EXEEXT) testDoubleVarianceNono$(EXEEXT) +subdir = src/c/statisticsFunctions/variance +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libVariance_la_LIBADD = +am__objects_1 = +am__objects_2 = libVariance_la-svariancea.lo \ + libVariance_la-scolumnvariancea.lo \ + libVariance_la-dvariancea.lo libVariance_la-srowvariancea.lo \ + libVariance_la-drowvariancea.lo \ + libVariance_la-dcolumnvariancea.lo \ + libVariance_la-cvariancea.lo libVariance_la-crowvariancea.lo \ + libVariance_la-ccolumnvariancea.lo \ + libVariance_la-zvariancea.lo libVariance_la-zrowvariancea.lo \ + libVariance_la-zcolumnvariancea.lo +am_libVariance_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libVariance_la_OBJECTS = $(am_libVariance_la_OBJECTS) +libVariance_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libVariance_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleVarianceNono_OBJECTS = \ + testDoubleVarianceNono-testDoubleVarianceNono.$(OBJEXT) +testDoubleVarianceNono_OBJECTS = $(am_testDoubleVarianceNono_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variance/libVariance.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la +testDoubleVarianceNono_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleVarianceNono_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleVarianceNono_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testFloatVarianceNono_OBJECTS = \ + testFloatVarianceNono-testFloatVarianceNono.$(OBJEXT) +testFloatVarianceNono_OBJECTS = $(am_testFloatVarianceNono_OBJECTS) +testFloatVarianceNono_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatVarianceNono_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatVarianceNono_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libVariance_la_SOURCES) $(testDoubleVarianceNono_SOURCES) \ + $(testFloatVarianceNono_SOURCES) +DIST_SOURCES = $(libVariance_la_SOURCES) \ + $(testDoubleVarianceNono_SOURCES) \ + $(testFloatVarianceNono_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libVariance_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libVariance.la +libVariance_la_SOURCES = $(HEAD) $(SRC) +SRC = svariancea.c \ + scolumnvariancea.c \ + dvariancea.c \ + srowvariancea.c \ + drowvariancea.c \ + dcolumnvariancea.c \ + cvariancea.c \ + crowvariancea.c \ + ccolumnvariancea.c \ + zvariancea.c \ + zrowvariancea.c \ + zcolumnvariancea.c + +HEAD = ../includes/variance.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variance/libVariance.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/mean/libMean.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + + +# +# -*- Variance Tests -*- +# +testFloatVarianceNono_SOURCES = testFloatVarianceNono.c +testFloatVarianceNono_CFLAGS = $(check_INCLUDES) +testFloatVarianceNono_LDADD = $(check_LDADD) +testDoubleVarianceNono_SOURCES = testDoubleVarianceNono.c +testDoubleVarianceNono_CFLAGS = $(check_INCLUDES) +testDoubleVarianceNono_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/variance/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/variance/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libVariance.la: $(libVariance_la_OBJECTS) $(libVariance_la_DEPENDENCIES) + $(libVariance_la_LINK) -rpath $(pkglibdir) $(libVariance_la_OBJECTS) $(libVariance_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleVarianceNono$(EXEEXT): $(testDoubleVarianceNono_OBJECTS) $(testDoubleVarianceNono_DEPENDENCIES) + @rm -f testDoubleVarianceNono$(EXEEXT) + $(testDoubleVarianceNono_LINK) $(testDoubleVarianceNono_OBJECTS) $(testDoubleVarianceNono_LDADD) $(LIBS) +testFloatVarianceNono$(EXEEXT): $(testFloatVarianceNono_OBJECTS) $(testFloatVarianceNono_DEPENDENCIES) + @rm -f testFloatVarianceNono$(EXEEXT) + $(testFloatVarianceNono_LINK) $(testFloatVarianceNono_OBJECTS) $(testFloatVarianceNono_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-ccolumnvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-crowvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-cvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-dcolumnvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-drowvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-dvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-scolumnvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-srowvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-svariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-zcolumnvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-zrowvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libVariance_la-zvariancea.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libVariance_la-svariancea.lo: svariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-svariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-svariancea.Tpo -c -o libVariance_la-svariancea.lo `test -f 'svariancea.c' || echo '$(srcdir)/'`svariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-svariancea.Tpo $(DEPDIR)/libVariance_la-svariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svariancea.c' object='libVariance_la-svariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-svariancea.lo `test -f 'svariancea.c' || echo '$(srcdir)/'`svariancea.c + +libVariance_la-scolumnvariancea.lo: scolumnvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-scolumnvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-scolumnvariancea.Tpo -c -o libVariance_la-scolumnvariancea.lo `test -f 'scolumnvariancea.c' || echo '$(srcdir)/'`scolumnvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-scolumnvariancea.Tpo $(DEPDIR)/libVariance_la-scolumnvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnvariancea.c' object='libVariance_la-scolumnvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-scolumnvariancea.lo `test -f 'scolumnvariancea.c' || echo '$(srcdir)/'`scolumnvariancea.c + +libVariance_la-dvariancea.lo: dvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-dvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-dvariancea.Tpo -c -o libVariance_la-dvariancea.lo `test -f 'dvariancea.c' || echo '$(srcdir)/'`dvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-dvariancea.Tpo $(DEPDIR)/libVariance_la-dvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dvariancea.c' object='libVariance_la-dvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-dvariancea.lo `test -f 'dvariancea.c' || echo '$(srcdir)/'`dvariancea.c + +libVariance_la-srowvariancea.lo: srowvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-srowvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-srowvariancea.Tpo -c -o libVariance_la-srowvariancea.lo `test -f 'srowvariancea.c' || echo '$(srcdir)/'`srowvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-srowvariancea.Tpo $(DEPDIR)/libVariance_la-srowvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowvariancea.c' object='libVariance_la-srowvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-srowvariancea.lo `test -f 'srowvariancea.c' || echo '$(srcdir)/'`srowvariancea.c + +libVariance_la-drowvariancea.lo: drowvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-drowvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-drowvariancea.Tpo -c -o libVariance_la-drowvariancea.lo `test -f 'drowvariancea.c' || echo '$(srcdir)/'`drowvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-drowvariancea.Tpo $(DEPDIR)/libVariance_la-drowvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowvariancea.c' object='libVariance_la-drowvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-drowvariancea.lo `test -f 'drowvariancea.c' || echo '$(srcdir)/'`drowvariancea.c + +libVariance_la-dcolumnvariancea.lo: dcolumnvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-dcolumnvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-dcolumnvariancea.Tpo -c -o libVariance_la-dcolumnvariancea.lo `test -f 'dcolumnvariancea.c' || echo '$(srcdir)/'`dcolumnvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-dcolumnvariancea.Tpo $(DEPDIR)/libVariance_la-dcolumnvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnvariancea.c' object='libVariance_la-dcolumnvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-dcolumnvariancea.lo `test -f 'dcolumnvariancea.c' || echo '$(srcdir)/'`dcolumnvariancea.c + +libVariance_la-cvariancea.lo: cvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-cvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-cvariancea.Tpo -c -o libVariance_la-cvariancea.lo `test -f 'cvariancea.c' || echo '$(srcdir)/'`cvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-cvariancea.Tpo $(DEPDIR)/libVariance_la-cvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cvariancea.c' object='libVariance_la-cvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-cvariancea.lo `test -f 'cvariancea.c' || echo '$(srcdir)/'`cvariancea.c + +libVariance_la-crowvariancea.lo: crowvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-crowvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-crowvariancea.Tpo -c -o libVariance_la-crowvariancea.lo `test -f 'crowvariancea.c' || echo '$(srcdir)/'`crowvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-crowvariancea.Tpo $(DEPDIR)/libVariance_la-crowvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowvariancea.c' object='libVariance_la-crowvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-crowvariancea.lo `test -f 'crowvariancea.c' || echo '$(srcdir)/'`crowvariancea.c + +libVariance_la-ccolumnvariancea.lo: ccolumnvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-ccolumnvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-ccolumnvariancea.Tpo -c -o libVariance_la-ccolumnvariancea.lo `test -f 'ccolumnvariancea.c' || echo '$(srcdir)/'`ccolumnvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-ccolumnvariancea.Tpo $(DEPDIR)/libVariance_la-ccolumnvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnvariancea.c' object='libVariance_la-ccolumnvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-ccolumnvariancea.lo `test -f 'ccolumnvariancea.c' || echo '$(srcdir)/'`ccolumnvariancea.c + +libVariance_la-zvariancea.lo: zvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-zvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-zvariancea.Tpo -c -o libVariance_la-zvariancea.lo `test -f 'zvariancea.c' || echo '$(srcdir)/'`zvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-zvariancea.Tpo $(DEPDIR)/libVariance_la-zvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zvariancea.c' object='libVariance_la-zvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-zvariancea.lo `test -f 'zvariancea.c' || echo '$(srcdir)/'`zvariancea.c + +libVariance_la-zrowvariancea.lo: zrowvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-zrowvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-zrowvariancea.Tpo -c -o libVariance_la-zrowvariancea.lo `test -f 'zrowvariancea.c' || echo '$(srcdir)/'`zrowvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-zrowvariancea.Tpo $(DEPDIR)/libVariance_la-zrowvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowvariancea.c' object='libVariance_la-zrowvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-zrowvariancea.lo `test -f 'zrowvariancea.c' || echo '$(srcdir)/'`zrowvariancea.c + +libVariance_la-zcolumnvariancea.lo: zcolumnvariancea.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -MT libVariance_la-zcolumnvariancea.lo -MD -MP -MF $(DEPDIR)/libVariance_la-zcolumnvariancea.Tpo -c -o libVariance_la-zcolumnvariancea.lo `test -f 'zcolumnvariancea.c' || echo '$(srcdir)/'`zcolumnvariancea.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libVariance_la-zcolumnvariancea.Tpo $(DEPDIR)/libVariance_la-zcolumnvariancea.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnvariancea.c' object='libVariance_la-zcolumnvariancea.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libVariance_la_CFLAGS) $(CFLAGS) -c -o libVariance_la-zcolumnvariancea.lo `test -f 'zcolumnvariancea.c' || echo '$(srcdir)/'`zcolumnvariancea.c + +testDoubleVarianceNono-testDoubleVarianceNono.o: testDoubleVarianceNono.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVarianceNono_CFLAGS) $(CFLAGS) -MT testDoubleVarianceNono-testDoubleVarianceNono.o -MD -MP -MF $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Tpo -c -o testDoubleVarianceNono-testDoubleVarianceNono.o `test -f 'testDoubleVarianceNono.c' || echo '$(srcdir)/'`testDoubleVarianceNono.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Tpo $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleVarianceNono.c' object='testDoubleVarianceNono-testDoubleVarianceNono.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVarianceNono_CFLAGS) $(CFLAGS) -c -o testDoubleVarianceNono-testDoubleVarianceNono.o `test -f 'testDoubleVarianceNono.c' || echo '$(srcdir)/'`testDoubleVarianceNono.c + +testDoubleVarianceNono-testDoubleVarianceNono.obj: testDoubleVarianceNono.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVarianceNono_CFLAGS) $(CFLAGS) -MT testDoubleVarianceNono-testDoubleVarianceNono.obj -MD -MP -MF $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Tpo -c -o testDoubleVarianceNono-testDoubleVarianceNono.obj `if test -f 'testDoubleVarianceNono.c'; then $(CYGPATH_W) 'testDoubleVarianceNono.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleVarianceNono.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Tpo $(DEPDIR)/testDoubleVarianceNono-testDoubleVarianceNono.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleVarianceNono.c' object='testDoubleVarianceNono-testDoubleVarianceNono.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVarianceNono_CFLAGS) $(CFLAGS) -c -o testDoubleVarianceNono-testDoubleVarianceNono.obj `if test -f 'testDoubleVarianceNono.c'; then $(CYGPATH_W) 'testDoubleVarianceNono.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleVarianceNono.c'; fi` + +testFloatVarianceNono-testFloatVarianceNono.o: testFloatVarianceNono.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVarianceNono_CFLAGS) $(CFLAGS) -MT testFloatVarianceNono-testFloatVarianceNono.o -MD -MP -MF $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Tpo -c -o testFloatVarianceNono-testFloatVarianceNono.o `test -f 'testFloatVarianceNono.c' || echo '$(srcdir)/'`testFloatVarianceNono.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Tpo $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatVarianceNono.c' object='testFloatVarianceNono-testFloatVarianceNono.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVarianceNono_CFLAGS) $(CFLAGS) -c -o testFloatVarianceNono-testFloatVarianceNono.o `test -f 'testFloatVarianceNono.c' || echo '$(srcdir)/'`testFloatVarianceNono.c + +testFloatVarianceNono-testFloatVarianceNono.obj: testFloatVarianceNono.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVarianceNono_CFLAGS) $(CFLAGS) -MT testFloatVarianceNono-testFloatVarianceNono.obj -MD -MP -MF $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Tpo -c -o testFloatVarianceNono-testFloatVarianceNono.obj `if test -f 'testFloatVarianceNono.c'; then $(CYGPATH_W) 'testFloatVarianceNono.c'; else $(CYGPATH_W) '$(srcdir)/testFloatVarianceNono.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Tpo $(DEPDIR)/testFloatVarianceNono-testFloatVarianceNono.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatVarianceNono.c' object='testFloatVarianceNono-testFloatVarianceNono.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVarianceNono_CFLAGS) $(CFLAGS) -c -o testFloatVarianceNono-testFloatVarianceNono.obj `if test -f 'testFloatVarianceNono.c'; then $(CYGPATH_W) 'testFloatVarianceNono.c'; else $(CYGPATH_W) '$(srcdir)/testFloatVarianceNono.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/variance/ccolumnvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/ccolumnvariancea.c new file mode 100644 index 00000000..8bf55260 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/ccolumnvariancea.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variance.h" + +void ccolumnvariancea(floatComplex *in, int lines, int columns, floatComplex* out){ + + int i = 0 ; + + floatComplex* transp = (floatComplex*) malloc ( sizeof (double) *(unsigned int) (lines*columns)); + + + + ctransposea ( in , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = cvariancea ( transp + i*columns , columns ) ; + + + free (transp); + + +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/crowvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/crowvariancea.c new file mode 100644 index 00000000..586b942e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/crowvariancea.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +void crowvariancea(floatComplex *in, int lines, int columns, floatComplex* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = cvariancea ( in + i*lines , lines) ; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/cvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/cvariancea.c new file mode 100644 index 00000000..9d43928d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/cvariancea.c @@ -0,0 +1,36 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +floatComplex cvariancea(floatComplex *in, int size) +{ + int i = 0 ; + + floatComplex sum = FloatComplex ( 0 , 0 ) ; + floatComplex temp = FloatComplex ( 0 , 0 ) ; + floatComplex variance = FloatComplex ( 0 , 0 ); + floatComplex mean = cmeana ( in , size ) ; + + for ( i = 0 ; i < size ; i++) + { + temp = cdiffs( in[i] , mean ) ; + sum = cadds ( sum , cpows ( temp , FloatComplex ( 2, 0) ) ); + } + + variance = crdivs (sum , FloatComplex ( (float)(size - 1),0 )); + + return variance ; + + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/dcolumnvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/dcolumnvariancea.c new file mode 100644 index 00000000..2a8e89b0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/dcolumnvariancea.c @@ -0,0 +1,32 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +void dcolumnvariancea(double *in, int lines, int columns, double* out){ + + int i = 0 ; + + double* transp = (double*) malloc ( sizeof (double) *(unsigned int) (lines*columns)); + + + + dtransposea ( in , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = dvariancea ( transp + i*columns , columns ) ; + + + free (transp); +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/drowvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/drowvariancea.c new file mode 100644 index 00000000..15123363 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/drowvariancea.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variance.h" + +void drowvariancea(double *in, int lines, int columns, double* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = dvariancea ( in + i*lines , lines ) ; + +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/dvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/dvariancea.c new file mode 100644 index 00000000..05ed4ff3 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/dvariancea.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +double dvariancea(double *in, int size) +{ + int i = 0 ; + + double temp = 0 ; + double variance = 0; + + double mean = dmeana ( in, size ); + + for ( i = 0 ; i < size ; i++) + { + temp += dpows ( (in[i] - mean ) ,2 ) ; + } + + + variance = ( temp )/ ( size -1); + + + return variance ; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/scolumnvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/scolumnvariancea.c new file mode 100644 index 00000000..2c0ec08d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/scolumnvariancea.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variance.h" + + +void scolumnvariancea(float *in, int lines, int columns, float* out){ + int i = 0 ; + + float* transp = (float*) malloc ( sizeof (floatComplex) *(unsigned int) (lines*columns)); + + + + stransposea ( in , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = svariancea ( transp + i*columns , columns ) ; + + + free (transp); + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/srowvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/srowvariancea.c new file mode 100644 index 00000000..5f6ae304 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/srowvariancea.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +void srowvariancea(float *in, int lines, int columns, float* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = svariancea ( in + i*lines , lines ) ; +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/svariancea.c b/2.3-1/src/c/statisticsFunctions/variance/svariancea.c new file mode 100644 index 00000000..426fc454 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/svariancea.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +float svariancea(float *in, int size) +{ + int i = 0 ; + + float temp = 0 ; + float variance = 0; + + float mean = smeana ( in , size ); + + for ( i = 0 ; i < size ; i++) + { + temp += spows ( (in[i] - mean ) ,2 ) ; + } + + + variance = ( temp )/ (float)( size -1); + + + return variance ; +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/svn-prop.tmp b/2.3-1/src/c/statisticsFunctions/variance/svn-prop.tmp new file mode 100644 index 00000000..4c36708a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/svn-prop.tmp @@ -0,0 +1,12 @@ + +.libs +.deps +Makefile +testMatrixAddition +testMatrixSubtraction +testMatrixMultiplication +testMatrixDivision +*.o +*.lo +*.la + diff --git a/2.3-1/src/c/statisticsFunctions/variance/testDoubleVariance.c b/2.3-1/src/c/statisticsFunctions/variance/testDoubleVariance.c new file mode 100644 index 00000000..dd3481b4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/testDoubleVariance.c @@ -0,0 +1,335 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include + +#include "variance.h" + +#define SINGLE 1.323312455 +#define LINES 7 +#define COLUMNS 10 +#define MATRIX {0.102326436434,0.939044147730,0.638607255649,0.059883427806,0.311199211050,\ + 0.377510951832,0.909709410276,0.928138985299,0.855155082885,0.308869514614,\ +0.729239261709,0.127006734256,0.242402311414,0.807912770193,0.621117659844,\ + 0.081452373881,0.088844371960,0.587072817143,0.068080495112,0.995457543526,\ +0.835322400089,0.656235548668,0.767905956600,0.706818781793,0.187699332368,\ + 0.568810169585,0.401039466728,0.397196868435,0.483212330844,0.161224133335,\ +0.932864250615,0.719208867755,0.262409000657,0.931377100293,0.596724558622,\ + 0.310327019077,0.350161732174,0.104841318447,0.830732351169,0.804621329065,\ +0.050784428138,0.551920620725,0.125952405389,0.083156193607,0.420623748098,\ + 0.168616071343,0.707545555662,0.104633864947,0.465604968835,0.489758284763,\ +0.167727907188,0.760689914692,0.454900974408,0.063926273491,0.87152507063,0.978668818716,\ + 0.135898929089,0.484713065904,0.785042577423,0.049412418623,\ +0.947593610268,0.884073690511,0.212796610314,0.654832502827,0.007690255996,\ + 0.031808692031,0.706323316786,0.008731670678,0.270014822017,0.153652121313} + + +#define MATRIXROW {0.1688249423502767021521 , 0.0729081225272336097554 , 0.0579879770921138057438 , 0.1499989757031960635469 , 0.0850863194040760717485 , 0.1085086384507867873772 , 0.0969379859569881041637 , 0.1072816602642319844252 , 0.0913638718167188862429 , 0.1285778184208021535095 } +#define MATRIXCOL { 0.1233078274276283442523, \ + 0.1232135941992091865416 , \ + 0.0540377259589001762707 , \ + 0.0925512303008872161403 , \ + 0.0555055644879708723338 , \ + 0.1276299219577190779962 , \ + 0.1385167433745558840386 } + + +#define IMATRIX {0.05826747464016080,0.99946373142302036,0.85600351681932807,0.62329693790525198,\ + 0.49792320514097810,0.44210509583353996,0.55833499459549785,0.09633230511099100,\ + 0.80100952507928014,0.34466254524886608,\ +0.48831309471279383,0.95087061496451497,0.01332767866551876,0.76261807000264525,\ + 0.74346329551190138,0.65157829830422997,0.57006288319826126,0.70580983115360141,\ + 0.51323400903493166,0.64977857517078519,\ +0.80352442665025592,0.69910932797938585,0.69258948462083936,0.91169391758739948,\ + 0.92454590043053031,0.27637310232967138,0.31692579621449113,0.86305770650506020,\ + 0.20109100220724940,0.01225362811237574,\ +0.38199013099074364,0.96006405679509044,0.16440964583307505,0.59608811559155583,\ + 0.72101737372577190,0.58661046391353011,0.99326277803629637,0.00761850038543344,\ + 0.78608208894729614,0.89965870184823871,\ +0.43115562805905938,0.81857266277074814,0.83410377753898501,0.55516970623284578,\ + 0.51345925079658628,0.04770902730524540,0.80747798969969153,0.80489510949701071,\ + 0.78650354826822877,0.30791273340582848,\ +0.75731822755187750,0.53423820668831468,0.42618893459439278,0.85448804078623652,\ + 0.92601215932518244,0.94169309409335256,0.85547966323792934,0.59637623047456145,\ + 0.69515300076454878,0.18359116325154901,\ +0.01200280850753188,0.2255702270194888,0.34853330114856362,0.55313225090503693,\ + 0.63695094687864184,0.96132039744406939,0.50314606027677655,0.11768362112343311,\ + 0.42481321236118674,0.52963322307914495} + +#define RMATRIX {0.53868199465796351,0.65326874051243067,0.37497402401641011,0.60422550700604916,\ + 0.33622304117307067,0.03531436901539564,0.33213760564103723,0.39493087679147720,\ + 0.04170337272807956,0.87363853026181459,\ +0.65950810909271240,0.31221040291711688,0.15333442110568285,0.66478573577478528,\ + 0.44319023378193378,0.40884594758972526,0.94536898937076330,0.67733758920803666,\ + 0.18673646822571754,0.92331133363768458,\ +0.55921846115961671,0.75012728199362755,0.23257926432415843,0.57102064136415720,\ + 0.60969385923817754,0.67336730472743511,0.07624059682711959,0.10437540244311094,\ + 0.95672677317634225,0.19771346449851990,\ +0.05278092902153730,0.75808868417516351,0.17633479088544846,0.01146994484588504,\ + 0.36732212174683809,0.19948644982650876,0.52714426256716251,0.21445603063330054,\ + 0.94751045759767294,0.04272260749712586,\ +0.03257346292957664,0.53217577841132879,0.87635089689865708,0.15471007302403450,\ + 0.25448470888659358,0.91815057490020990,0.72509902389720082,0.87545845471322536,\ + 0.05635281419381499,0.01432112138718367,\ +0.57406943850219250,0.80984140699729323,0.01664119493216276,0.93888836959376931,\ + 0.11264799535274506,0.66036546928808093,0.76042845565825701,0.25908330874517560,\ + 0.88014078326523304,0.70332178613170981,\ +0.94614937948063016,0.78529163636267185,0.20241560926660895,0.10981105919927359,\ + 0.75415370846167207,0.15320260450243950,0.59521253732964396,0.71318271104246378,\ + 0.51107599260285497,0.52125945501029491} + + + + + + +#define IMATRIXROW {-0.0419293790250184,-0.05416405376783551,+0.11775191182077104,+0.08015791690354153,+0.00011032748454003,\ +-0.10124210045965254,0.06720614014223115,+0.02470873836336094,-0.07082037296251543,-0.00621987869853545} + +#define RMATRIXROW {0.01439621349781126,-0.04697393442028135,-0.03018604392150223,0.09765990436118642,0.01606884471097247,\ +-0.00604250542333471,0.02870576510687836,-0.04985742926427023,0.12356001472881707,0.05909180726174274} + +#define IMATRIXCOL {-0.01904810719805961,+0.04121453132770223,+0.00378553967089328,\ ++0.10307670507342410,+0.03497427750676810,+0.01761849804019567,-0.10182321471060848} + +#define RMATRIXCOL {-0.02739893277693160,0.01792852626358409,-0.02205084134302381,\ +-0.01012610864032573,0.07317682977907164,0.04762062457313784,0.00849011627117621} + + +static void dvariancesTest (void ) { + + double toTest = dvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + + +static void drowvariancesTest (void ) { + + double toTest = drowvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + +static void dcolumnvariancesTest (void) { + + double toTest = dcolumnvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + + +static void zvariancesTest (void ) { + + doubleComplex toTest = zvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + +static void zrowvariancesTest (void ) { + + doubleComplex toTest = zrowvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + +static void zcolumnvariancesTest (void ) { + + doubleComplex toTest = zrowvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + + + + + + +static void dvarianceaTest ( void){ + + double mtoTest[] = MATRIX ; + double result = 0.1007532974338590653352; + double out = dvariancea ( mtoTest , LINES*COLUMNS ); ; + + + + printf ( "out : %1.20f\t result : %1.20f\t\n" , out , result ) ; + + + + assert ( fabs ( out - result ) / fabs( out ) < 3e-15 ) ; + +} + + +static void drowvarianceaTest ( void ) +{ + int i = 0 ; + + double mtoTest[] = MATRIX ; + double result[LINES] = MATRIXCOL ; + double out[LINES] ; + + drowvariancea ( mtoTest , COLUMNS , LINES , out ) ; + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "ROWout : %1.20f\t result : %1.20f\t\n" , out[i] , result [i] ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 3e-16 ) ; + } + +} + +static void dcolumnvarianceaTest ( void ) +{ + int i = 0 ; + + double mtoTest[] = MATRIX ; + double result[COLUMNS] = MATRIXROW ; + double out[ COLUMNS] ; + + + + dcolumnvariancea ( mtoTest , COLUMNS, LINES , out ) ; + + for ( i = 0 ; i < COLUMNS; i++) + { + printf ( "%dCOLout : %1.20f\t result : %1.20f\t\n" ,i, out[i] , result [i] ) ; } + for ( i = 0 ; i < COLUMNS; i++) + { + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 3e-16 ) ; + } + +} + + + + +static void zvarianceaTest ( void){ + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + doubleComplex Result = DoubleComplex ( 0.01225832057910708 , 0.01071188208687752 ); + + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex out = zvariancea ( mtoTest , LINES*COLUMNS ); ; + + assert ( fabs( zreals(out) - zreals (Result) ) / fabs (zreals (out)) < 3e-16 ); + assert( fabs( zimags(out) - zimags (Result )) / fabs (zimags (out)) < 3e-15 ); + + +} + +static void zrowvarianceaTest (void ) { + + int i = 0 ; + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + double rResult [] = RMATRIXROW; + double iResult [] = IMATRIXROW ; + + doubleComplex out[COLUMNS]; + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex* Result = DoubleComplexMatrix ( rResult , iResult , COLUMNS ); + + zrowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + /*FIXME test failed under 1-e04 precision */ + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , zreals(out[i]) , zimags(out[i]), zreals(Result[i]) ,zimags( Result[i])); + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-8 ); + assert( fabs( zimags(out[i]) - zimags (Result[i])) / fabs (zimags (out[i])) < 3e-15); + + } +} + + + +static void zcolumnvarianceaTest ( void) { + int i = 0 ; + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + double rResult [] = RMATRIXCOL; + double iResult [] = IMATRIXCOL ; + + doubleComplex out[LINES]; + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex* Result = DoubleComplexMatrix ( rResult , iResult , LINES ); + + zcolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , zreals(out[i]) , zimags(out[i]), zreals(Result[i]) ,zimags( Result[i])); + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + assert( fabs( zimags(out[i]) - zimags (Result[i])) / fabs (zimags (out[i])) < 3e-16); + + } + + + +} + + + + + +static int testDoubleVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Double Tests ****\n"); + printf("*********************\n"); + + printf("\n\t>>>>singleton real Tests\n"); + dcolumnvariancesTest () ; + dvariancesTest () ; + drowvariancesTest () ; + + + printf("\n\t>>>>singleton complex Tests\n"); + + zrowvariancesTest () ; + zcolumnvariancesTest () ; + zvariancesTest () ; + + + + printf("\n\t>>>>array real Tests\n"); + + dvarianceaTest () ; + + dcolumnvarianceaTest () ; + drowvarianceaTest ( ); + + + printf("\n\t>>>>array complex Tests\n"); + + zvarianceaTest () ; + zrowvarianceaTest ( ); + zcolumnvarianceaTest () ; + + + return 0; +} + +int main(void) { + assert(testDoubleVariance () == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/testDoubleVarianceNono.c b/2.3-1/src/c/statisticsFunctions/variance/testDoubleVarianceNono.c new file mode 100644 index 00000000..39302d76 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/testDoubleVarianceNono.c @@ -0,0 +1,363 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" +#include "assert.h" + +static int doubleVariance(void){ + + int i; + + + /*test 1 */ + { + double matrice[20]={1,5,9,4,8,2,6,1,5,9,3,7,2,6,1,4,8,3,7,2}; + double out, *outColumns, *outRows; + double result= 7.5026315789473692063893; + double resultColumns[5]= {1.6666666666666667406815 ,1.6666666666666667406815 ,12.916666666666666074548 ,1.6666666666666667406815 ,16.666666666666667850905}; + double resultRows[4]={10.300000000000000710543 , 10.300000000000000710543 , 6.7000000000000001776357 , 6.7000000000000001776357}; + + + + outColumns= (double*)malloc((unsigned int)5*sizeof(double)); + outRows= (double*)malloc((unsigned int)4*sizeof(double)); + + out = dvariancea(matrice,20); + drowvariancea(matrice,5,4,outRows); + dcolumnvariancea(matrice,5,4,outColumns); + + + printf("Variance \n"); + printf("%f\n",out); + printf("Row Variance \n"); + for (i=0;i<4;i++) printf("%f\n",outRows[i]); + printf("Column Variance \n"); + for (i=0;i<5;i++) printf("%f\n",outColumns[i]); + + + assert(fabs(out-result)/fabs(out) <1e-16); + for (i=0;i<4;i++)assert(fabs(outRows[i]-resultRows[i])/fabs(outRows[i]) <1e-16); + + for (i=0;i<5;i++)assert(fabs(outColumns[i]-resultColumns[i])/fabs(outColumns[i]) <1e-16); + + free(outColumns); + free(outRows); + + } + + + /* test 2 */ + + { + double mtovar[70]={0.2113248654641211032867,0.7560438541695475578308,0.0002211346291005611420, + 0.3303270917385816574097,0.6653811042197048664093,0.6283917883411049842835, + 0.8497452358715236186981, + 0.6857310198247432708740,0.8782164813019335269928,0.0683740368112921714783, + 0.5608486062847077846527,0.6623569373041391372681,0.7263506767340004444122, + 0.1985143842175602912903, + 0.5442573162727057933807,0.2320747897028923034668,0.2312237196601927280426, + 0.2164632631465792655945,0.8833887814544141292572,0.6525134947150945663452, + 0.3076090742833912372589, + 0.9329616213217377662659,0.2146007861010730266571,0.3126419968903064727783, + 0.3616361008025705814362,0.2922266637906432151794,0.5664248815737664699554, + 0.4826471973210573196411, + 0.3321718913502991199493,0.5935094701126217842102,0.5015341597609221935272, + 0.4368587583303451538086,0.2693124809302389621735,0.6325744865462183952332, + 0.4051954015158116817474, + 0.9184707831591367721558,0.0437334333546459674835,0.4818508932366967201233, + 0.2639556000940501689911,0.4148103706538677215576,0.2806498021818697452545, + 0.1280058464035391807556, + 0.7783128595910966396332,0.2119030449539422988892,0.1121354666538536548615, + 0.6856895955279469490051,0.1531216683797538280487,0.6970850601792335510254, + 0.8415518426336348056793, + 0.4062024755403399467468,0.4094825475476682186127,0.8784125801175832748413, + 0.1138359685428440570831,0.1998337740078568458557,0.5618660743348300457001, + 0.5896177329123020172119, + 0.6853979662992060184479,0.8906224733218550682068,0.5042212805710732936859, + 0.3493615407496690750122,0.3873778772540390491486,0.9222898678854107856751, + 0.9488184261135756969452, + 0.3435337245464324951172,0.3760118731297552585602,0.7340940563008189201355, + 0.2615761472843587398529,0.4993493836373090744019,0.2638578419573605060577, + 0.5253563085570931434631}; + double out2, *outColumns2, *outRows2; + double result2= 0.0651863337585355667736 ; + double resultColumns2[7]= {0.0650391675869589902526 , + 0.0913789208052724344356 , + 0.0837863718398224738282 , + 0.0281545517812518443501 , + 0.0549594706400152802073 , + 0.0389978730537587012228 , + 0.0796657637071630925218 , + }; + double resultRows2[10]={0.0988544518240001696130 , 0.0874673050908554156058 , 0.0678199050579095519264, 0.0591380787668954188696 , 0.0175386373980947855855 ,0.0831815708684833926556 , 0.1035239817400336881370 , 0.0657802543744439444096 , 0.0667446022405332184402 , 0.0287884625084994134891}; + + + outColumns2= (double*)malloc((unsigned int)7*sizeof(double)); + outRows2= (double*)malloc((unsigned int)10*sizeof(double)); + + + + out2 = dvariancea(mtovar,70); + drowvariancea(mtovar,7,10,outRows2); + dcolumnvariancea(mtovar,7,10,outColumns2); + + + printf("Variance 2 \n"); + printf("%f\n",out2); + printf("Row Variance 2 \n"); + for (i=0;i<10;i++) printf("%f\n",outRows2[i]); + printf("Column Variance 2 \n"); + for (i=0;i<7;i++) printf("%f\n",outColumns2[i]); + + assert(fabs(out2-result2)/fabs(out2) <1e-16); + for (i=0;i<10;i++)assert(fabs(outRows2[i]-resultRows2[i])/fabs(outRows2[i]) <1e-16); + + for (i=0;i<7;i++)assert(fabs(outColumns2[i]-resultColumns2[i])/fabs(outColumns2[i]) <1e-16); + + free(outColumns2); + free(outRows2); + } + + + return 0; +} + + +static int doubleComplexVariance(void){ + int i; + + /* test 1 */ + { + double inR[6]={0.9677053210325539112091,0.5068534435704350471497,0.523297640960663557053,0.5596947595477104187012, + 0.5617307000793516635895,0.468176002614200115204}; + double inI[6]={0.7794546722434461116791,0.7901071812957525253296,0.9808542062528431415558,0.8187066102400422096252, + 0.4256872381083667278290,0.2461560554802417755127}; + double varianceR=- 0.0428404140538702279950; + double varianceI=0.0257955584577409802183; + double rowVarianceR[3]={0.106135488505625180666,- 0.0124835463256454722719,- 0.01173948205902856229}; + double rowVarianceI[3]={- 0.0049092287964376275095,- 0.0059017052806824826100,0.0167959854763351026929}; + double colVarianceR[2]={- 0.0183554755457089394111,- 0.1019751767306446843531}; + double colVarianceI[2]={0.0109267784648201249365,0.0249829946888768111846}; + doubleComplex *in, *rowVariance, *colVariance; + doubleComplex out, *outRow, *outCol; + + in= (doubleComplex*)malloc ((unsigned int)6*sizeof(doubleComplex)); + outRow= (doubleComplex*)malloc ((unsigned int)3*sizeof(doubleComplex)); + outCol= (doubleComplex*)malloc ((unsigned int)2*sizeof(doubleComplex)); + + in=DoubleComplexMatrix(inR,inI,6); + rowVariance=DoubleComplexMatrix(rowVarianceR,rowVarianceI,3); + colVariance=DoubleComplexMatrix(colVarianceR,colVarianceI,2); + + + out=zvariancea(in,6); + printf("Variance \n"); + printf("%f + %f *i\texpecting result : %f + %f *i\n",zreals(out),zimags(out) , varianceR , varianceI); + + assert(fabs(zreals(out)-varianceR)/fabs(zreals(out)) <3e-16); + assert(fabs(zimags(out)-varianceI)/fabs(zimags(out)) <3e-15); + + + + + + zrowvariancea(in,2,3,outRow); + printf("Row Variance \n"); + for (i=0;i<3;i++) printf("%1.20f + %1.20f *i\n",zreals(outRow[i]),zimags(outRow[i])); + + + for (i=0;i<3;i++){ + assert(fabs(zreals(outRow[i])-rowVarianceR[i])/fabs(zreals(outRow[i])) <3e-15); + assert(fabs(zimags(outRow[i])-rowVarianceI[i])/fabs(zimags(outRow[i])) <3e-14); + } + + + + zcolumnvariancea(in,2,3,outCol); + printf("Column Variance \n"); + for (i=0;i<2;i++) printf("%f + %f *i\n",zreals(outCol[i]),zimags(outCol[i])); + + + for (i=0;i<2;i++){ + assert(fabs(zreals(outCol[i])-colVarianceR[i])/fabs(zreals(outCol[i])) <3e-15); + assert(fabs(zimags(outCol[i])-colVarianceI[i])/fabs(zimags(outCol[i])) <3e-15); + } + + free(in); + free(outCol); + free(outRow); + + } + + + printf("\n"); + printf("\n"); + printf("\n"); + printf("\n"); + + + /* test 2 */ + { + double inR[70]={0.0453502028249204158783,0.2029444333165884017944,0.7844273825176060199738, + 0.2637536162510514259338,0.4383276398293673992157,0.866485897451639175415, + 0.3792142109014093875885,0.7668716078624129295349,0.6006621322594583034515, + 0.7856735605746507644653, +0.7387115550227463245392,0.5544260339811444282532,0.9929149555973708629608, + 0.9757428467273712158203,0.3709622272290289402008,0.3032238213345408439636, + 0.9519520117901265621185,0.7127858083695173263550,0.119237006176263093948, + 0.5009163180366158485413, +0.3290053526870906352997,0.4808946810662746429443,0.3303695977665483951569, + 0.6304475357756018638611,0.2117190784774720668793,0.4486023131757974624634, + 0.5914509710855782032013,0.6806742670014500617981,0.0739296111278235912323, + 0.9433694705367088317871, +0.1286330693401396274567,0.2019080771133303642273,0.1969303428195416927338, + 0.8928690161556005477905,0.4617918957956135272980,0.6251291716471314430237, + 0.7059706593863666057587,0.7018169648945331573486,0.4087999747134745121002, + 0.0636221384629607200623, +0.0657393387518823146820,0.5331004131585359573364,0.0331581872887909412384, + 0.3157835649326443672180,0.3785823243670165538788,0.4619523435831069946289, + 0.6287369825877249240875,0.2878515301272273063660,0.3292048736475408077240, + 0.4719233047217130661011, +0.3353769634850323200226,0.5553069720044732093811,0.1196080814115703105927, + 0.7613999657332897186279,0.4790988476015627384186,0.2816969295963644981384, + 0.2380097783170640468597,0.3294205460697412490845,0.2306728032417595386505, + 0.2136296601966023445129, +0.4054998042993247509003,0.3095371201634407043457,0.6762971603311598300934, + 0.970691631548106670380,0.5441796570084989070892,0.0204747971147298812866, + 0.8941364963538944721222,0.3490363890305161476135,0.1105365152470767498016, + 0.2023377753794193267822}; + double inI[70]={1.0377217042259871959686,1.9830380710773169994354,-0.6786614381708204746246, + -1.7368789152242243289948,0.6849579229019582271576,-1.9756898251362144947052, 0.9018773441202938556671,0.4113956945948302745819,0.0771432374604046344757, + -2.6145569621585309505463, +-0.8694803346879780292511,1.1954508102498948574066,1.0175080369226634502411, + -1.86952689336612820625,1.6495719677768647670746,-1.1282413271255791187286, + 1.7159116868861019611359,1.3512618443928658962250,1.6467350018210709095001, + -4.3247690196149051189423, +-1.1214177873916923999786,0.3549467395059764385223,1.5090364827774465084076, + 0.0271988785825669765472,-0.3927204073406755924225,-2.2866433826275169849396, + 2.4531399612314999103546,1.2140426929108798503876,0.1123848785646259784699, + -1.2278760573826730251312, +0.5748759503476321697235,0.1001535071991384029388,0.7154782521538436412811, + -0.3598340046592056751251,0.1114491275511682033539,-1.0214430955238640308380, + 1.8411546354182064533234,1.3313704966567456722260,0.107393887359648942947, + -2.1405860441736876964569, +-0.1921784919686615467072,-0.0941377175040543079376,-0.3007089742459356784821, + -1.6332105011679232120514,-0.9827875629998743534088,-4.0793808070011436939240, + 1.6021160488016903400421,0.5996482106857001781464,-1.0103867049328982830048, + -1.9795853956602513790131, +-0.7019297261722385883331,0.1910370937548577785492,0.5148729826323688030243, + -1.2210475285537540912628,1.4409833527170121669769,-2.0624672439880669116974, + 2.2999203805811703205109,1.6434787488542497158051,-0.0813916879706084728241, + -4.3653216282837092876434, +0.0896512451581656932831,1.4530082489363849163055,-0.1911182911135256290436, + -1.5278804996050894260406,-0.8655951828695833683014,-2.6959278550930321216583, + 1.089711368549615144730,0.2611377011053264141083,-0.0787748913280665874481, + -1.675187868531793355942}; + double varianceR=- 2.3201230329620456949158; + double varianceI=0.0135359053960125846894; + double rowVarianceR[7]={- 2.1748250359163439071608,- 4.0055927597555047725564,- 1.9380991813636070375537,- 1.211164632384367667584, + - 2.3819157100812309302285,- 3.865411523472068289209,- 1.5488286339908912125907}; + double rowVarianceI[7]={- 0.5161401892195496277083,- 0.0302397956223948334575,0.0072526988331105511632,0.2035074619460965072992, + - 0.0227578793067023492369,0.0176453877563822227048,0.2048099414748655033858}; + double colVarianceR[10]={ - 0.5673920596394929072304, + - 0.6095831761740567733554, + - 0.4837275005370789138226, + - 0.4518709923747168399899, + - 1.1155710732654480210613, + - 0.9922425930742954092168, + - 0.2615272073355465187738, + - 0.2448899237808548345896, + - 0.5783271525148965253038, + - 1.4662540245146995498970 }; + double colVarianceI[10]={ - 0.2519451287679840834066, + - 0.1132720366896080160801, + - 0.0393753052279357945720 , + 0.0678956480014177715665 , + 0.0165011281984272333012 , + 0.1043646242921155153915 , + - 0.0697520473529744805541 , + 0.0395755738577838397929 , + - 0.0906906077772287183558 , + 0.2030521845859689644698 }; + doubleComplex *in, *rowVariance, *colVariance; + doubleComplex out, *outRow, *outCol; + + in= (doubleComplex*)malloc ((unsigned int)70*sizeof(doubleComplex)); + outRow= (doubleComplex*)malloc ((unsigned int)7*sizeof(doubleComplex)); + outCol= (doubleComplex*)malloc ((unsigned int)10*sizeof(doubleComplex)); + + in=DoubleComplexMatrix(inR,inI,70); + rowVariance=DoubleComplexMatrix(rowVarianceR,rowVarianceI,7); + colVariance=DoubleComplexMatrix(colVarianceR,colVarianceI,10); + + + out=zvariancea(in,70); + printf("Variance 2 \n"); + printf("%f + %f *i\n",zreals(out),zimags(out)); + + assert(fabs(zreals(out)-varianceR)/fabs(zreals(out)) <3e-16); + assert(fabs(zimags(out)-varianceI)/fabs(zimags(out)) <3e-16); + + + + + + zrowvariancea(in,10,7,outRow); + printf("Row Variance 2 \n"); + for (i=0;i<7;i++) printf("%1.20f + %1.20f *i\n",zreals(outRow[i]),zimags(outRow[i])); + + + for (i=0;i<7;i++){ + assert(fabs(zreals(outRow[i])-rowVarianceR[i])/fabs(zreals(outRow[i])) <3e-15); + assert(fabs(zimags(outRow[i])-rowVarianceI[i])/fabs(zimags(outRow[i])) <3e-14); + } + + + + zcolumnvariancea(in,10,7,outCol); + printf("Column Variance 2 \n"); + for (i=0;i<10;i++) printf("%f + %f *i\n",zreals(outCol[i]),zimags(outCol[i])); + + + for (i=0;i<10;i++){ + assert(fabs(zreals(outCol[i])-colVarianceR[i])/fabs(zreals(outCol[i])) <3e-15); + assert(fabs(zimags(outCol[i])-colVarianceI[i])/fabs(zimags(outCol[i])) <3e-14); + } + free(in); + free(outCol); + free(outRow); + + } + + return 0; +} + + + + + +static int testDoubleVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Double Tests Nono****\n"); + printf("*********************\n"); + assert(doubleVariance()==0); + assert(doubleComplexVariance()==0); + + + return 0; +} + +int main(void) { + assert(testDoubleVariance () == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/testFloatVariance.c b/2.3-1/src/c/statisticsFunctions/variance/testFloatVariance.c new file mode 100644 index 00000000..5a22a9c0 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/testFloatVariance.c @@ -0,0 +1,329 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include + +#include "variance.h" + +#define SINGLE 1.323312455f +#define LINES 7 +#define COLUMNS 10 +#define MATRIX {0.102326436434f,0.939044147730f,0.638607255649f,0.059883427806f,0.311199211050f,\ + 0.377510951832f,0.909709410276f,0.928138985299f,0.855155082885f,0.308869514614f,\ +0.729239261709f,0.127006734256f,0.242402311414f,0.807912770193f,0.621117659844f,\ + 0.081452373881f,0.088844371960f,0.587072817143f,0.068080495112f,0.995457543526f,\ +0.835322400089f,0.656235548668f,0.767905956600f,0.706818781793f,0.187699332368f,\ + 0.568810169585f,0.401039466728f,0.397196868435f,0.483212330844f,0.161224133335f,\ +0.932864250615f,0.719208867755f,0.262409000657f,0.931377100293f,0.596724558622f,\ + 0.310327019077f,0.350161732174f,0.104841318447f,0.830732351169f,0.804621329065f,\ +0.050784428138f,0.551920620725f,0.125952405389f,0.083156193607f,0.420623748098f,\ + 0.168616071343f,0.707545555662f,0.104633864947f,0.465604968835f,0.489758284763f,\ +0.167727907188f,0.760689914692f,0.454900974408f,0.063926273491f,0.87152507063f,0.978668818716f,\ + 0.135898929089f,0.484713065904f,0.785042577423f,0.049412418623f,\ +0.947593610268f,0.884073690511f,0.212796610314f,0.654832502827f,0.007690255996f,\ + 0.031808692031f,0.706323316786f,0.008731670678f,0.270014822017f,0.153652121313f} + + +#define MATRIXROW {0.168824942350f,0.072908122527f,0.057987977092f,0.149998975703f,0.085086319404f,\ +0.108508638451f,0.096937985957f,0.107281660264f,0.091363871817f,0.128577818421f} + +#define MATRIXCOL { 0.123307827428f,0.123213594199f,0.054037725959f,0.092551230301f,0.055505564488f,\ +0.127629921958f,0.138516743375f } + + +#define IMATRIX {0.05826747464016080f,0.99946373142302036f,0.85600351681932807f,0.62329693790525198f,\ + 0.49792320514097810f,0.44210509583353996f,0.55833499459549785f,0.09633230511099100f,\ + 0.80100952507928014f,0.34466254524886608f,\ +0.48831309471279383f,0.95087061496451497f,0.01332767866551876f,0.76261807000264525f,\ + 0.74346329551190138f,0.65157829830422997f,0.57006288319826126f,0.70580983115360141f,\ + 0.51323400903493166f,0.64977857517078519f,\ +0.80352442665025592f,0.69910932797938585f,0.69258948462083936f,0.91169391758739948f,\ + 0.92454590043053031f,0.27637310232967138f,0.31692579621449113f,0.86305770650506020f,\ + 0.20109100220724940f,0.01225362811237574f,\ +0.38199013099074364f,0.96006405679509044f,0.16440964583307505f,0.59608811559155583f,\ + 0.72101737372577190f,0.58661046391353011f,0.99326277803629637f,0.00761850038543344f,\ + 0.78608208894729614f,0.89965870184823871f,\ +0.43115562805905938f,0.81857266277074814f,0.83410377753898501f,0.55516970623284578f,\ + 0.51345925079658628f,0.04770902730524540f,0.80747798969969153f,0.80489510949701071f,\ + 0.78650354826822877f,0.30791273340582848f,\ +0.75731822755187750f,0.53423820668831468f,0.42618893459439278f,0.85448804078623652f,\ + 0.92601215932518244f,0.94169309409335256f,0.85547966323792934f,0.59637623047456145f,\ + 0.69515300076454878f,0.18359116325154901f,\ +0.01200280850753188f,0.2255702270194888f,0.34853330114856362f,0.55313225090503693f,\ + 0.63695094687864184f,0.96132039744406939f,0.50314606027677655f,0.11768362112343311f,\ + 0.42481321236118674f,0.52963322307914495f} + +#define RMATRIX {0.53868199465796351f,0.65326874051243067f,0.37497402401641011f,0.60422550700604916f,\ + 0.33622304117307067f,0.03531436901539564f,0.33213760564103723f,0.39493087679147720f,\ + 0.04170337272807956f,0.87363853026181459f,\ +0.65950810909271240f,0.31221040291711688f,0.15333442110568285f,0.66478573577478528f,\ + 0.44319023378193378f,0.40884594758972526f,0.94536898937076330f,0.67733758920803666f,\ + 0.18673646822571754f,0.92331133363768458f,\ +0.55921846115961671f,0.75012728199362755f,0.23257926432415843f,0.57102064136415720f,\ + 0.60969385923817754f,0.67336730472743511f,0.07624059682711959f,0.10437540244311094f,\ + 0.95672677317634225f,0.19771346449851990f,\ +0.05278092902153730f,0.75808868417516351f,0.17633479088544846f,0.01146994484588504f,\ + 0.36732212174683809f,0.19948644982650876f,0.52714426256716251f,0.21445603063330054f,\ + 0.94751045759767294f,0.04272260749712586f,\ +0.03257346292957664f,0.53217577841132879f,0.87635089689865708f,0.15471007302403450f,\ + 0.25448470888659358f,0.91815057490020990f,0.72509902389720082f,0.87545845471322536f,\ + 0.05635281419381499f,0.01432112138718367f,\ +0.57406943850219250f,0.80984140699729323f,0.01664119493216276f,0.93888836959376931f,\ + 0.11264799535274506f,0.66036546928808093f,0.76042845565825701f,0.25908330874517560f,\ + 0.88014078326523304f,0.70332178613170981f,\ +0.94614937948063016f,0.78529163636267185f,0.20241560926660895f,0.10981105919927359f,\ + 0.75415370846167207f,0.15320260450243950f,0.59521253732964396f,0.71318271104246378f,\ + 0.51107599260285497f,0.52125945501029491f} + + + + + + +#define IMATRIXROW {-0.0419293790250184f,-0.05416405376783551f,+0.11775191182077104f,+0.08015791690354153f,+0.00011032748454003f,\ +-0.10124210045965254f,0.06720614014223115f,+0.02470873836336094f,-0.07082037296251543f,-0.00621987869853545f} + +#define RMATRIXROW {0.01439621349781126f,-0.04697393442028135f,-0.03018604392150223f,0.09765990436118642f,0.01606884471097247f,\ +-0.00604250542333471f,0.02870576510687836f,-0.04985742926427023f,0.12356001472881707f,0.05909180726174274f} + +#define IMATRIXCOL {-0.01904810719805961f,+0.04121453132770223f,+0.00378553967089328f,\ ++0.10307670507342410f,+0.03497427750676810f,+0.01761849804019567f,-0.10182321471060848f} + +#define RMATRIXCOL {-0.02739893277693160f,0.01792852626358409f,-0.02205084134302381f,\ +-0.01012610864032573f,0.07317682977907164f,0.04762062457313784f,0.00849011627117621f} + + +static void svariancesTest (void ) { + + float toTest = svariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + + +static void srowvariancesTest (void ) { + + float toTest = srowvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + +static void scolumnvariancesTest (void) { + + float toTest = scolumnvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + + +static void cvariancesTest (void ) { + + floatComplex toTest = cvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + +static void crowvariancesTest (void ) { + + floatComplex toTest = crowvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + +static void ccolumnvariancesTest (void ) { + + floatComplex toTest = crowvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + + + + + + +static void svarianceaTest ( void){ + + float mtoTest[] = MATRIX ; + float result = 0.100753297434f; + float out = svariancea ( mtoTest , LINES*COLUMNS ); ; + + + + printf ( "out : %e\t result : %e\t\n" , out , result ) ; + + + + assert ( fabs ( out - result ) / fabs( out ) < 1e-06 ) ; + +} + + +static void srowvarianceaTest ( void ) +{ + int i = 0 ; + + float mtoTest[] = MATRIX ; + float result[COLUMNS] = MATRIXROW ; + float out[COLUMNS] ; + + srowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "ROWout : %e\t result : %e\t\n" , out[i] , result [i] ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 1e-06 ) ; + } + +} + +static void scolumnvarianceaTest ( void ) +{ + int i = 0 ; + + float mtoTest[] = MATRIX ; + float result[LINES] = MATRIXCOL ; + float out[ LINES] ; + + + + scolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%dCOLout : %e\t result : %e\t\n" ,i, out[i] , result [i] ) ; + /* assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 1e-05 ) ;*/ + } + +} + + + + +static void cvarianceaTest ( void){ + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + floatComplex Result = FloatComplex ( 0.01225832057910708f , 0.01071188208687752f ); + + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex out = cvariancea ( mtoTest , LINES*COLUMNS ); ; + + assert ( fabs( creals(out) - creals (Result) ) / fabs (creals (out)) < 1e-06 ); + assert( fabs( cimags(out) - cimags (Result )) / fabs (cimags (out)) < 1e-06 ); + + +} + +static void crowvarianceaTest (void ) { + + int i = 0 ; + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + float rResult [] = RMATRIXROW; + float iResult [] = IMATRIXROW ; + + floatComplex out[COLUMNS]; + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex* Result = FloatComplexMatrix ( rResult , iResult , COLUMNS ); + + crowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + /*FIXME test failed under 1-e04 precision */ + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , creals(out[i]) , cimags(out[i]), creals(Result[i]) ,cimags( Result[i])); + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + assert( fabs( cimags(out[i]) - cimags (Result[i])) / fabs (cimags (out[i])) < 3e-6); + + } +} + + + +static void ccolumnvarianceaTest ( void) { + int i = 0 ; + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + float rResult [] = RMATRIXCOL; + float iResult [] = IMATRIXCOL ; + + floatComplex out[LINES]; + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex* Result = FloatComplexMatrix ( rResult , iResult , LINES ); + + ccolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , creals(out[i]) , cimags(out[i]), creals(Result[i]) ,cimags( Result[i])); + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-06 ); + assert( fabs( cimags(out[i]) - cimags (Result[i])) / fabs (cimags (out[i])) < 1e-06); + + } + + + +} + + + + + +static int testFloatVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Float Tests ****\n"); + printf("*********************\n"); + + printf("\n\t>>>>singleton real Tests\n"); + scolumnvariancesTest () ; + svariancesTest () ; + srowvariancesTest () ; + + + printf("\n\t>>>>singleton complex Tests\n"); + + crowvariancesTest () ; + ccolumnvariancesTest () ; + cvariancesTest () ; + + + + printf("\n\t>>>>array real Tests\n"); + + svarianceaTest () ; + + scolumnvarianceaTest () ; + srowvarianceaTest ( ); + + + printf("\n\t>>>>array complex Tests\n"); + + cvarianceaTest () ; + crowvarianceaTest ( ); + ccolumnvarianceaTest () ; + + + return 0; +} + +int main(void) { + assert(testFloatVariance () == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/testFloatVarianceNono.c b/2.3-1/src/c/statisticsFunctions/variance/testFloatVarianceNono.c new file mode 100644 index 00000000..a8d25456 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/testFloatVarianceNono.c @@ -0,0 +1,364 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" +#include "assert.h" + +static int floatVariance(void){ + + int i; + + + /*test 1 */ + { + float matrice[20]={1.0f,5.0f,9.0f,4.0f,8.0f,2.0f,6.0f,1.0f,5.0f,9.0f,3.0f,7.0f,2.0f,6.0f,1.0f,4.0f,8.0f,3.0f,7.0f,2.0f}; + float out, *outColumns, *outRows; + float result= 7.5026315789473692063893f; + float resultColumns[5]= {1.6666666666666667406815f ,1.6666666666666667406815f ,12.916666666666666074548f ,1.6666666666666667406815f ,16.666666666666667850905f}; + float resultRows[4]={10.300000000000000710543f , 10.300000000000000710543f , 6.7000000000000001776357f , 6.7000000000000001776357f}; + + + + outColumns= (float*)malloc((unsigned int)5*sizeof(float)); + outRows= (float*)malloc((unsigned int)4*sizeof(float)); + + out = svariancea(matrice,20); + srowvariancea(matrice,5,4,outRows); + scolumnvariancea(matrice,5,4,outColumns); + + + printf("Variance \n"); + printf("%f\n",out); + printf("Row Variance \n"); + for (i=0;i<4;i++) printf("%f\n",outRows[i]); + printf("Column Variance \n"); + for (i=0;i<5;i++) printf("%f\n",outColumns[i]); + + + assert(fabs(out-result)/fabs(out) <1e-06); + for (i=0;i<4;i++)assert(fabs(outRows[i]-resultRows[i])/fabs(outRows[i]) <1e-06); + + for (i=0;i<5;i++)assert(fabs(outColumns[i]-resultColumns[i])/fabs(outColumns[i]) <1e-06); + + free(outColumns); + free(outRows); + } + + + /* test 2 */ + + { + float mtovar[70]={0.2113248654641211032867f,0.7560438541695475578308f,0.0002211346291005611420f, + 0.3303270917385816574097f,0.6653811042197048664093f,0.6283917883411049842835f, + 0.8497452358715236186981f, + 0.6857310198247432708740f,0.8782164813019335269928f,0.0683740368112921714783f, + 0.5608486062847077846527f,0.6623569373041391372681f,0.7263506767340004444122f, + 0.1985143842175602912903f, + 0.5442573162727057933807f,0.2320747897028923034668f,0.2312237196601927280426f, + 0.2164632631465792655945f,0.8833887814544141292572f,0.6525134947150945663452f, + 0.3076090742833912372589f, + 0.9329616213217377662659f,0.2146007861010730266571f,0.3126419968903064727783f, + 0.3616361008025705814362f,0.2922266637906432151794f,0.5664248815737664699554f, + 0.4826471973210573196411f, + 0.3321718913502991199493f,0.5935094701126217842102f,0.5015341597609221935272f, + 0.4368587583303451538086f,0.2693124809302389621735f,0.6325744865462183952332f, + 0.4051954015158116817474f, + 0.9184707831591367721558f,0.0437334333546459674835f,0.4818508932366967201233f, + 0.2639556000940501689911f,0.4148103706538677215576f,0.2806498021818697452545f, + 0.1280058464035391807556f, + 0.7783128595910966396332f,0.2119030449539422988892f,0.1121354666538536548615f, + 0.6856895955279469490051f,0.1531216683797538280487f,0.6970850601792335510254f, + 0.8415518426336348056793f, + 0.4062024755403399467468f,0.4094825475476682186127f,0.8784125801175832748413f, + 0.1138359685428440570831f,0.1998337740078568458557f,0.5618660743348300457001f, + 0.5896177329123020172119f, + 0.6853979662992060184479f,0.8906224733218550682068f,0.5042212805710732936859f, + 0.3493615407496690750122f,0.3873778772540390491486f,0.9222898678854107856751f, + 0.9488184261135756969452f, + 0.3435337245464324951172f,0.3760118731297552585602f,0.7340940563008189201355f, + 0.2615761472843587398529f,0.4993493836373090744019f,0.2638578419573605060577f, + 0.5253563085570931434631f}; + float out2, *outColumns2, *outRows2; + float result2= 0.0651863337585355667736f ; + float resultColumns2[7]= {0.0650391675869589902526f , + 0.0913789208052724344356f , + 0.0837863718398224738282f , + 0.0281545517812518443501f , + 0.0549594706400152802073f , + 0.0389978730537587012228f , + 0.0796657637071630925218f , + }; + float resultRows2[10]={0.0988544518240001696130f , 0.0874673050908554156058f , 0.0678199050579095519264f, 0.0591380787668954188696f , 0.0175386373980947855855f ,0.0831815708684833926556f , 0.1035239817400336881370f, 0.0657802543744439444096f , 0.0667446022405332184402f , 0.0287884625084994134891f}; + + + outColumns2= (float*)malloc((unsigned int)7*sizeof(float)); + outRows2= (float*)malloc((unsigned int)10*sizeof(float)); + + + + out2 = svariancea(mtovar,70); + srowvariancea(mtovar,7,10,outRows2); + scolumnvariancea(mtovar,7,10,outColumns2); + + + printf("Variance 2 \n"); + printf("%f\n",out2); + printf("Row Variance 2 \n"); + for (i=0;i<10;i++) printf("%f\n",outRows2[i]); + printf("Column Variance 2 \n"); + for (i=0;i<7;i++) printf("%f\n",outColumns2[i]); + + assert(fabs(out2-result2)/fabs(out2) <1e-06); + for (i=0;i<10;i++)assert(fabs(outRows2[i]-resultRows2[i])/fabs(outRows2[i]) <1e-06); + + for (i=0;i<7;i++)assert(fabs(outColumns2[i]-resultColumns2[i])/fabs(outColumns2[i]) <1e-06); + + free(outColumns2); + free(outRows2); + + } + + + return 0; +} + + +static int floatComplexVariance(void){ + int i; + + /* test 1 */ + { + float inR[6]={0.9677053210325539112091f,0.5068534435704350471497f,0.523297640960663557053f,0.5596947595477104187012f, + 0.5617307000793516635895f,0.468176002614200115204f}; + float inI[6]={0.7794546722434461116791f,0.7901071812957525253296f,0.9808542062528431415558f,0.8187066102400422096252f, + 0.4256872381083667278290f,0.2461560554802417755127f}; + float varianceR=- 0.0428404140538702279950f; + float varianceI=0.0257955584577409802183f; + float rowVarianceR[3]={0.106135488505625180666f,- 0.0124835463256454722719f,- 0.01173948205902856229f}; + float rowVarianceI[3]={- 0.0049092287964376275095f,- 0.0059017052806824826100f,0.0167959854763351026929f}; + float colVarianceR[2]={- 0.0183554755457089394111f,- 0.1019751767306446843531f}; + float colVarianceI[2]={0.0109267784648201249365f,0.0249829946888768111846f}; + floatComplex *in, *rowVariance, *colVariance; + floatComplex out, *outRow, *outCol; + + in= (floatComplex*)malloc ((unsigned int)6*sizeof(floatComplex)); + outRow= (floatComplex*)malloc ((unsigned int)3*sizeof(floatComplex)); + outCol= (floatComplex*)malloc ((unsigned int)2*sizeof(floatComplex)); + + in=FloatComplexMatrix(inR,inI,6); + rowVariance=FloatComplexMatrix(rowVarianceR,rowVarianceI,3); + colVariance=FloatComplexMatrix(colVarianceR,colVarianceI,2); + + + out=cvariancea(in,6); + printf("Variance \n"); + printf("%f + %f *i\n",creals(out),cimags(out)); + + assert(fabs(creals(out)-varianceR)/fabs(creals(out)) <1e-6); + assert(fabs(cimags(out)-varianceI)/fabs(cimags(out)) <1e-6); + + + + + + crowvariancea(in,2,3,outRow); + printf("Row Variance \n"); + for (i=0;i<3;i++) printf("%1.20f + %1.20f *i\n",creals(outRow[i]),cimags(outRow[i])); + + + for (i=0;i<3;i++){ + assert(fabs(creals(outRow[i])-rowVarianceR[i])/fabs(creals(outRow[i])) <1e-6); + assert(fabs(cimags(outRow[i])-rowVarianceI[i])/fabs(cimags(outRow[i])) <3e-5); + } + + + + ccolumnvariancea(in,2,3,outCol); + printf("Column Variance \n"); + for (i=0;i<2;i++) printf("%f + %f *i\n",creals(outCol[i]),cimags(outCol[i])); + + + for (i=0;i<2;i++){ + assert(fabs(creals(outCol[i])-colVarianceR[i])/fabs(creals(outCol[i])) <1e-6); + assert(fabs(cimags(outCol[i])-colVarianceI[i])/fabs(cimags(outCol[i])) <3e-6); + } + + free(in); + free(outCol); + free(outRow); + + + } + + + printf("\n"); + printf("\n"); + printf("\n"); + printf("\n"); + + + /* test 2 */ + { + float inR[70]={0.0453502028249204158783f,0.2029444333165884017944f,0.7844273825176060199738f, + 0.2637536162510514259338f,0.4383276398293673992157f,0.866485897451639175415f, + 0.3792142109014093875885f,0.7668716078624129295349f,0.6006621322594583034515f, + 0.7856735605746507644653f, +0.7387115550227463245392f,0.5544260339811444282532f,0.9929149555973708629608f, + 0.9757428467273712158203f,0.3709622272290289402008f,0.3032238213345408439636f, + 0.9519520117901265621185f,0.7127858083695173263550f,0.119237006176263093948f, + 0.5009163180366158485413f, +0.3290053526870906352997f,0.4808946810662746429443f,0.3303695977665483951569f, + 0.6304475357756018638611f,0.2117190784774720668793f,0.4486023131757974624634f, + 0.5914509710855782032013f,0.6806742670014500617981f,0.0739296111278235912323f, + 0.9433694705367088317871f, +0.1286330693401396274567f,0.2019080771133303642273f,0.1969303428195416927338f, + 0.8928690161556005477905f,0.4617918957956135272980f,0.6251291716471314430237f, + 0.7059706593863666057587f,0.7018169648945331573486f,0.4087999747134745121002f, + 0.0636221384629607200623f, +0.0657393387518823146820f,0.5331004131585359573364f,0.0331581872887909412384f, + 0.3157835649326443672180f,0.3785823243670165538788f,0.4619523435831069946289f, + 0.6287369825877249240875f,0.2878515301272273063660f,0.3292048736475408077240f, + 0.4719233047217130661011f, +0.3353769634850323200226f,0.5553069720044732093811f,0.1196080814115703105927f, + 0.7613999657332897186279f,0.4790988476015627384186f,0.2816969295963644981384f, + 0.2380097783170640468597f,0.3294205460697412490845f,0.2306728032417595386505f, + 0.2136296601966023445129f, +0.4054998042993247509003f,0.3095371201634407043457f,0.6762971603311598300934f, + 0.970691631548106670380f,0.5441796570084989070892f,0.0204747971147298812866f, + 0.8941364963538944721222f,0.3490363890305161476135f,0.1105365152470767498016f, + 0.2023377753794193267822f}; + float inI[70]={1.0377217042259871959686f,1.9830380710773169994354f,-0.6786614381708204746246f, + -1.7368789152242243289948f,0.6849579229019582271576f,-1.9756898251362144947052f, 0.9018773441202938556671f,0.4113956945948302745819f,0.0771432374604046344757f, + -2.6145569621585309505463f, +-0.8694803346879780292511f,1.1954508102498948574066f,1.0175080369226634502411f, + -1.86952689336612820625f,1.6495719677768647670746f,-1.1282413271255791187286f, + 1.7159116868861019611359f,1.3512618443928658962250f,1.6467350018210709095001f, + -4.3247690196149051189423f, +-1.1214177873916923999786f,0.3549467395059764385223f,1.5090364827774465084076f, + 0.0271988785825669765472f,-0.3927204073406755924225f,-2.2866433826275169849396f, + 2.4531399612314999103546f,1.2140426929108798503876f,0.1123848785646259784699f, + -1.2278760573826730251312f, +0.5748759503476321697235f,0.1001535071991384029388f,0.7154782521538436412811f, + -0.3598340046592056751251f,0.1114491275511682033539f,-1.0214430955238640308380f, + 1.8411546354182064533234f,1.3313704966567456722260f,0.107393887359648942947f, + -2.1405860441736876964569f, +-0.1921784919686615467072f,-0.0941377175040543079376f,-0.3007089742459356784821f, + -1.6332105011679232120514f,-0.9827875629998743534088f,-4.0793808070011436939240f, + 1.6021160488016903400421f,0.5996482106857001781464f,-1.0103867049328982830048f, + -1.9795853956602513790131f, +-0.7019297261722385883331f,0.1910370937548577785492f,0.5148729826323688030243f, + -1.2210475285537540912628f,1.4409833527170121669769f,-2.0624672439880669116974f, + 2.2999203805811703205109f,1.6434787488542497158051f,-0.0813916879706084728241f, + -4.3653216282837092876434f, +0.0896512451581656932831f,1.4530082489363849163055f,-0.1911182911135256290436f, + -1.5278804996050894260406f,-0.8655951828695833683014f,-2.6959278550930321216583f, + 1.089711368549615144730f,0.2611377011053264141083f,-0.0787748913280665874481f, + -1.675187868531793355942f}; + float varianceR=- 2.3201230329620456949158f; + float varianceI=0.0135359053960125846894f; + float rowVarianceR[7]={- 2.1748250359163439071608f,- 4.0055927597555047725564f,- 1.9380991813636070375537f,- 1.211164632384367667584f, + - 2.3819157100812309302285f,- 3.865411523472068289209f,- 1.5488286339908912125907f}; + float rowVarianceI[7]={- 0.5161401892195496277083f,- 0.0302397956223948334575f,0.0072526988331105511632f,0.2035074619460965072992f, + - 0.0227578793067023492369f,0.0176453877563822227048f,0.2048099414748655033858f}; + float colVarianceR[10]={ - 0.5673920596394929072304f, + - 0.6095831761740567733554f, + - 0.4837275005370789138226f, + - 0.4518709923747168399899f, + - 1.1155710732654480210613f, + - 0.9922425930742954092168f, + - 0.2615272073355465187738f, + - 0.2448899237808548345896f, + - 0.5783271525148965253038f, + - 1.4662540245146995498970f }; + float colVarianceI[10]={ - 0.2519451287679840834066f, + - 0.1132720366896080160801f, + - 0.0393753052279357945720f , + 0.0678956480014177715665f , + 0.0165011281984272333012f , + 0.1043646242921155153915f , + - 0.0697520473529744805541f , + 0.0395755738577838397929f , + - 0.0906906077772287183558f , + 0.2030521845859689644698f }; + floatComplex *in, *rowVariance, *colVariance; + floatComplex out, *outRow, *outCol; + + in= (floatComplex*)malloc ((unsigned int)70*sizeof(floatComplex)); + outRow= (floatComplex*)malloc ((unsigned int)7*sizeof(floatComplex)); + outCol= (floatComplex*)malloc ((unsigned int)10*sizeof(floatComplex)); + + in=FloatComplexMatrix(inR,inI,70); + rowVariance=FloatComplexMatrix(rowVarianceR,rowVarianceI,7); + colVariance=FloatComplexMatrix(colVarianceR,colVarianceI,10); + + + out=cvariancea(in,70); + printf("Variance 2 \n"); + printf("%f + %f *i\n",creals(out),cimags(out)); + + assert(fabs(creals(out)-varianceR)/fabs(creals(out)) <1e-6); + assert(fabs(cimags(out)-varianceI)/fabs(cimags(out)) <3e-5); + + + + + + crowvariancea(in,10,7,outRow); + printf("Row Variance 2 \n"); + for (i=0;i<7;i++) printf("%1.20f + %1.20f *i\n",creals(outRow[i]),cimags(outRow[i])); + + + for (i=0;i<7;i++){ + assert(fabs(creals(outRow[i])-rowVarianceR[i])/fabs(creals(outRow[i])) <1e-6); + assert(fabs(cimags(outRow[i])-rowVarianceI[i])/fabs(cimags(outRow[i])) <3e-5); + } + + + + ccolumnvariancea(in,10,7,outCol); + printf("Column Variance 2 \n"); + for (i=0;i<10;i++) printf("%f + %f *i\n",creals(outCol[i]),cimags(outCol[i])); + + + for (i=0;i<10;i++){ + assert(fabs(creals(outCol[i])-colVarianceR[i])/fabs(creals(outCol[i])) <1e-6); + assert(fabs(cimags(outCol[i])-colVarianceI[i])/fabs(cimags(outCol[i])) <3e-6); + } + + free(in); + free(outCol); + free(outRow); + } + + return 0; +} + + + + + +static int testFloatVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Float Tests Nono****\n"); + printf("*********************\n"); + assert(floatVariance()==0); + assert(floatComplexVariance()==0); + + + return 0; +} + +int main(void) { + assert(testFloatVariance () == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj new file mode 100644 index 00000000..51b25354 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {774783E0-2443-42DB-AA48-04730E59B396} + testDoubleVariance + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj.filters new file mode 100644 index 00000000..8b08a255 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVariance/testDoubleVariance.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj new file mode 100644 index 00000000..c87dce75 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CCD3F89C-A278-457D-BFD6-ADEEF4860E07} + testDoubleVarianceNono + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj.filters new file mode 100644 index 00000000..f7a7ed72 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_DoubleVarianceNono/testDoubleVarianceNono.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj new file mode 100644 index 00000000..05b4a448 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {53F78E7F-3024-4999-BE70-F4A242357809} + testFloatVariance + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../elementaryFunctions/includes;../../../operations/includes;../../../matrixOperations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../elementaryFunctions/includes;../../../operations/includes;../../../matrixOperations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../elementaryFunctions/includes;../../../operations/includes;../../../matrixOperations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../elementaryFunctions/includes;../../../operations/includes;../../../matrixOperations/includes;../../../type;../../includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj.filters new file mode 100644 index 00000000..d0a741bb --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVariance/testFloatVariance.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj new file mode 100644 index 00000000..321c2a71 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DEF1A42F-599B-4B1D-AB11-202E86670021} + testFloatVarianceNono + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../../includes;../../../operations/includes;../../../type;../../includes;../../../elementaryFunctions/includes;../../../matrixOperations/includes;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {e11ed064-3bf2-4f70-b66e-3223c737ec60} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj.filters b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj.filters new file mode 100644 index 00000000..e0eb6dbf --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/test_FloatVarianceNono/testFloatVarianceNono.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/statisticsFunctions/variance/zcolumnvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/zcolumnvariancea.c new file mode 100644 index 00000000..bba80303 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/zcolumnvariancea.c @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variance.h" + +void zcolumnvariancea(doubleComplex *in, int lines, int columns, doubleComplex* out){ + + int i = 0 ; + + doubleComplex* transp = (doubleComplex*) malloc ( sizeof (doubleComplex) *(unsigned int) (lines*columns)); + + + + ztransposea ( in , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = zvariancea ( transp + i*columns , columns ) ; + + + free (transp); + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variance/zrowvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/zrowvariancea.c new file mode 100644 index 00000000..285889aa --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/zrowvariancea.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +void zrowvariancea(doubleComplex *in, int lines, int columns, doubleComplex* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = zvariancea ( in + i*lines , lines ) ; +} diff --git a/2.3-1/src/c/statisticsFunctions/variance/zvariancea.c b/2.3-1/src/c/statisticsFunctions/variance/zvariancea.c new file mode 100644 index 00000000..92e2667d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variance/zvariancea.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variance.h" + +doubleComplex zvariancea(doubleComplex *in, int size) +{ + int i = 0 ; + + doubleComplex sum = DoubleComplex ( 0 , 0 ) ; + doubleComplex temp = DoubleComplex ( 0 , 0 ) ; + doubleComplex variance = DoubleComplex ( 0 , 0 ); + doubleComplex mean = zmeana ( in , size ) ; + + for ( i = 0 ; i < size ; i++) + { + temp = zdiffs( in[i] , mean ) ; + sum = zadds ( sum , zpows ( temp , DoubleComplex ( 2, 0) ) ); + } + + variance = zrdivs (sum , DoubleComplex ( (size - 1),0 )); + + return variance ; + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/Makefile.am b/2.3-1/src/c/statisticsFunctions/variancef/Makefile.am new file mode 100644 index 00000000..804025bf --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/Makefile.am @@ -0,0 +1,89 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libvariancef_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libvariancef.la + +libvariancef_la_SOURCES = $(HEAD) $(SRC) + +SRC = svariancefa.c \ + scolumnvariancefa.c \ + dvariancefa.c \ + srowvariancefa.c \ + drowvariancefa.c \ + dcolumnvariancefa.c \ + cvariancefa.c \ + crowvariancefa.c \ + ccolumnvariancefa.c \ + zvariancefa.c \ + zrowvariancefa.c \ + zcolumnvariancefa.c + +HEAD = ../includes/variancef.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variancef/libvariancef.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + +check_PROGRAMS = testFloatVariancef testDoubleVariancef + +TESTS = testFloatVariancef testDoubleVariancef + +# +# -*- variancef Tests -*- +# +testFloatVariancef_SOURCES = testFloatVariancef.c +testFloatVariancef_CFLAGS = $(check_INCLUDES) +testFloatVariancef_LDADD = $(check_LDADD) + +testDoubleVariancef_SOURCES =testDoubleVariancef.c +testDoubleVariancef_CFLAGS = $(check_INCLUDES) +testDoubleVariancef_LDADD = $(check_LDADD) diff --git a/2.3-1/src/c/statisticsFunctions/variancef/Makefile.in b/2.3-1/src/c/statisticsFunctions/variancef/Makefile.in new file mode 100644 index 00000000..9cbd3dfa --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/Makefile.in @@ -0,0 +1,886 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testFloatVariancef$(EXEEXT) \ + testDoubleVariancef$(EXEEXT) +TESTS = testFloatVariancef$(EXEEXT) testDoubleVariancef$(EXEEXT) +subdir = src/c/statisticsFunctions/variancef +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libvariancef_la_LIBADD = +am__objects_1 = +am__objects_2 = libvariancef_la-svariancefa.lo \ + libvariancef_la-scolumnvariancefa.lo \ + libvariancef_la-dvariancefa.lo \ + libvariancef_la-srowvariancefa.lo \ + libvariancef_la-drowvariancefa.lo \ + libvariancef_la-dcolumnvariancefa.lo \ + libvariancef_la-cvariancefa.lo \ + libvariancef_la-crowvariancefa.lo \ + libvariancef_la-ccolumnvariancefa.lo \ + libvariancef_la-zvariancefa.lo \ + libvariancef_la-zrowvariancefa.lo \ + libvariancef_la-zcolumnvariancefa.lo +am_libvariancef_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libvariancef_la_OBJECTS = $(am_libvariancef_la_OBJECTS) +libvariancef_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libvariancef_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDoubleVariancef_OBJECTS = \ + testDoubleVariancef-testDoubleVariancef.$(OBJEXT) +testDoubleVariancef_OBJECTS = $(am_testDoubleVariancef_OBJECTS) +am__DEPENDENCIES_1 = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variancef/libvariancef.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la +testDoubleVariancef_DEPENDENCIES = $(am__DEPENDENCIES_1) +testDoubleVariancef_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testDoubleVariancef_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am_testFloatVariancef_OBJECTS = \ + testFloatVariancef-testFloatVariancef.$(OBJEXT) +testFloatVariancef_OBJECTS = $(am_testFloatVariancef_OBJECTS) +testFloatVariancef_DEPENDENCIES = $(am__DEPENDENCIES_1) +testFloatVariancef_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(testFloatVariancef_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libvariancef_la_SOURCES) $(testDoubleVariancef_SOURCES) \ + $(testFloatVariancef_SOURCES) +DIST_SOURCES = $(libvariancef_la_SOURCES) \ + $(testDoubleVariancef_SOURCES) $(testFloatVariancef_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libvariancef_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I ../includes + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libvariancef.la +libvariancef_la_SOURCES = $(HEAD) $(SRC) +SRC = svariancefa.c \ + scolumnvariancefa.c \ + dvariancefa.c \ + srowvariancefa.c \ + drowvariancefa.c \ + dcolumnvariancefa.c \ + cvariancefa.c \ + crowvariancefa.c \ + ccolumnvariancefa.c \ + zvariancefa.c \ + zrowvariancefa.c \ + zcolumnvariancefa.c + +HEAD = ../includes/variancef.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/statisticsFunctions/includes \ + -I $(top_builddir)/src/c/elementaryFunctions/includes \ + -I $(top_builddir)/src/c/matrixOperations/includes \ + -I $(top_builddir)/src/c/operations/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/operations/addition/libAddition.la \ + $(top_builddir)/src/c/operations/subtraction/libSubtraction.la \ + $(top_builddir)/src/fortran/lapack/libscilapack.la \ + $(top_builddir)/src/c/statisticsFunctions/variancef/libvariancef.la \ + $(top_builddir)/src/c/statisticsFunctions/sum/libSum.la \ + $(top_builddir)/src/c/statisticsFunctions/meanf/libMeanf.la \ + $(top_builddir)/src/c/elementaryFunctions/pow/libPow.la \ + $(top_builddir)/src/c/elementaryFunctions/log/libLog.la \ + $(top_builddir)/src/c/elementaryFunctions/exp/libExp.la \ + $(top_builddir)/src/c/elementaryFunctions/cos/libCos.la \ + $(top_builddir)/src/c/elementaryFunctions/sin/libSin.la \ + $(top_builddir)/src/c/elementaryFunctions/cosh/libCosh.la \ + $(top_builddir)/src/c/elementaryFunctions/sinh/libSinh.la \ + $(top_builddir)/src/c/elementaryFunctions/sqrt/libSqrt.la \ + $(top_builddir)/src/c/elementaryFunctions/log1p/libLog1p.la \ + $(top_builddir)/src/c/elementaryFunctions/lnp1m1/libLnp1m1.la \ + $(top_builddir)/src/c/auxiliaryFunctions/pythag/libPythag.la \ + $(top_builddir)/src/c/auxiliaryFunctions/abs/libAbs.la \ + $(top_builddir)/src/c/matrixOperations/transpose/libMatrixTranspose.la \ + $(top_builddir)/src/c/operations/multiplication/libMultiplication.la \ + $(top_builddir)/src/c/operations/division/libDivision.la \ + $(top_builddir)/src/c/auxiliaryFunctions/conj/libConj.la \ + @LIBMATH@ + + +# +# -*- variancef Tests -*- +# +testFloatVariancef_SOURCES = testFloatVariancef.c +testFloatVariancef_CFLAGS = $(check_INCLUDES) +testFloatVariancef_LDADD = $(check_LDADD) +testDoubleVariancef_SOURCES = testDoubleVariancef.c +testDoubleVariancef_CFLAGS = $(check_INCLUDES) +testDoubleVariancef_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/statisticsFunctions/variancef/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/statisticsFunctions/variancef/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libvariancef.la: $(libvariancef_la_OBJECTS) $(libvariancef_la_DEPENDENCIES) + $(libvariancef_la_LINK) -rpath $(pkglibdir) $(libvariancef_la_OBJECTS) $(libvariancef_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleVariancef$(EXEEXT): $(testDoubleVariancef_OBJECTS) $(testDoubleVariancef_DEPENDENCIES) + @rm -f testDoubleVariancef$(EXEEXT) + $(testDoubleVariancef_LINK) $(testDoubleVariancef_OBJECTS) $(testDoubleVariancef_LDADD) $(LIBS) +testFloatVariancef$(EXEEXT): $(testFloatVariancef_OBJECTS) $(testFloatVariancef_DEPENDENCIES) + @rm -f testFloatVariancef$(EXEEXT) + $(testFloatVariancef_LINK) $(testFloatVariancef_OBJECTS) $(testFloatVariancef_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-ccolumnvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-crowvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-cvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-dcolumnvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-drowvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-dvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-scolumnvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-srowvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-svariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-zcolumnvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-zrowvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libvariancef_la-zvariancefa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatVariancef-testFloatVariancef.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libvariancef_la-svariancefa.lo: svariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-svariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-svariancefa.Tpo -c -o libvariancef_la-svariancefa.lo `test -f 'svariancefa.c' || echo '$(srcdir)/'`svariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-svariancefa.Tpo $(DEPDIR)/libvariancef_la-svariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='svariancefa.c' object='libvariancef_la-svariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-svariancefa.lo `test -f 'svariancefa.c' || echo '$(srcdir)/'`svariancefa.c + +libvariancef_la-scolumnvariancefa.lo: scolumnvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-scolumnvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-scolumnvariancefa.Tpo -c -o libvariancef_la-scolumnvariancefa.lo `test -f 'scolumnvariancefa.c' || echo '$(srcdir)/'`scolumnvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-scolumnvariancefa.Tpo $(DEPDIR)/libvariancef_la-scolumnvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scolumnvariancefa.c' object='libvariancef_la-scolumnvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-scolumnvariancefa.lo `test -f 'scolumnvariancefa.c' || echo '$(srcdir)/'`scolumnvariancefa.c + +libvariancef_la-dvariancefa.lo: dvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-dvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-dvariancefa.Tpo -c -o libvariancef_la-dvariancefa.lo `test -f 'dvariancefa.c' || echo '$(srcdir)/'`dvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-dvariancefa.Tpo $(DEPDIR)/libvariancef_la-dvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dvariancefa.c' object='libvariancef_la-dvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-dvariancefa.lo `test -f 'dvariancefa.c' || echo '$(srcdir)/'`dvariancefa.c + +libvariancef_la-srowvariancefa.lo: srowvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-srowvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-srowvariancefa.Tpo -c -o libvariancef_la-srowvariancefa.lo `test -f 'srowvariancefa.c' || echo '$(srcdir)/'`srowvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-srowvariancefa.Tpo $(DEPDIR)/libvariancef_la-srowvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='srowvariancefa.c' object='libvariancef_la-srowvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-srowvariancefa.lo `test -f 'srowvariancefa.c' || echo '$(srcdir)/'`srowvariancefa.c + +libvariancef_la-drowvariancefa.lo: drowvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-drowvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-drowvariancefa.Tpo -c -o libvariancef_la-drowvariancefa.lo `test -f 'drowvariancefa.c' || echo '$(srcdir)/'`drowvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-drowvariancefa.Tpo $(DEPDIR)/libvariancef_la-drowvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='drowvariancefa.c' object='libvariancef_la-drowvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-drowvariancefa.lo `test -f 'drowvariancefa.c' || echo '$(srcdir)/'`drowvariancefa.c + +libvariancef_la-dcolumnvariancefa.lo: dcolumnvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-dcolumnvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-dcolumnvariancefa.Tpo -c -o libvariancef_la-dcolumnvariancefa.lo `test -f 'dcolumnvariancefa.c' || echo '$(srcdir)/'`dcolumnvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-dcolumnvariancefa.Tpo $(DEPDIR)/libvariancef_la-dcolumnvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dcolumnvariancefa.c' object='libvariancef_la-dcolumnvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-dcolumnvariancefa.lo `test -f 'dcolumnvariancefa.c' || echo '$(srcdir)/'`dcolumnvariancefa.c + +libvariancef_la-cvariancefa.lo: cvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-cvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-cvariancefa.Tpo -c -o libvariancef_la-cvariancefa.lo `test -f 'cvariancefa.c' || echo '$(srcdir)/'`cvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-cvariancefa.Tpo $(DEPDIR)/libvariancef_la-cvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cvariancefa.c' object='libvariancef_la-cvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-cvariancefa.lo `test -f 'cvariancefa.c' || echo '$(srcdir)/'`cvariancefa.c + +libvariancef_la-crowvariancefa.lo: crowvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-crowvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-crowvariancefa.Tpo -c -o libvariancef_la-crowvariancefa.lo `test -f 'crowvariancefa.c' || echo '$(srcdir)/'`crowvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-crowvariancefa.Tpo $(DEPDIR)/libvariancef_la-crowvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='crowvariancefa.c' object='libvariancef_la-crowvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-crowvariancefa.lo `test -f 'crowvariancefa.c' || echo '$(srcdir)/'`crowvariancefa.c + +libvariancef_la-ccolumnvariancefa.lo: ccolumnvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-ccolumnvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-ccolumnvariancefa.Tpo -c -o libvariancef_la-ccolumnvariancefa.lo `test -f 'ccolumnvariancefa.c' || echo '$(srcdir)/'`ccolumnvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-ccolumnvariancefa.Tpo $(DEPDIR)/libvariancef_la-ccolumnvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ccolumnvariancefa.c' object='libvariancef_la-ccolumnvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-ccolumnvariancefa.lo `test -f 'ccolumnvariancefa.c' || echo '$(srcdir)/'`ccolumnvariancefa.c + +libvariancef_la-zvariancefa.lo: zvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-zvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-zvariancefa.Tpo -c -o libvariancef_la-zvariancefa.lo `test -f 'zvariancefa.c' || echo '$(srcdir)/'`zvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-zvariancefa.Tpo $(DEPDIR)/libvariancef_la-zvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zvariancefa.c' object='libvariancef_la-zvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-zvariancefa.lo `test -f 'zvariancefa.c' || echo '$(srcdir)/'`zvariancefa.c + +libvariancef_la-zrowvariancefa.lo: zrowvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-zrowvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-zrowvariancefa.Tpo -c -o libvariancef_la-zrowvariancefa.lo `test -f 'zrowvariancefa.c' || echo '$(srcdir)/'`zrowvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-zrowvariancefa.Tpo $(DEPDIR)/libvariancef_la-zrowvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zrowvariancefa.c' object='libvariancef_la-zrowvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-zrowvariancefa.lo `test -f 'zrowvariancefa.c' || echo '$(srcdir)/'`zrowvariancefa.c + +libvariancef_la-zcolumnvariancefa.lo: zcolumnvariancefa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -MT libvariancef_la-zcolumnvariancefa.lo -MD -MP -MF $(DEPDIR)/libvariancef_la-zcolumnvariancefa.Tpo -c -o libvariancef_la-zcolumnvariancefa.lo `test -f 'zcolumnvariancefa.c' || echo '$(srcdir)/'`zcolumnvariancefa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libvariancef_la-zcolumnvariancefa.Tpo $(DEPDIR)/libvariancef_la-zcolumnvariancefa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zcolumnvariancefa.c' object='libvariancef_la-zcolumnvariancefa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libvariancef_la_CFLAGS) $(CFLAGS) -c -o libvariancef_la-zcolumnvariancefa.lo `test -f 'zcolumnvariancefa.c' || echo '$(srcdir)/'`zcolumnvariancefa.c + +testDoubleVariancef-testDoubleVariancef.o: testDoubleVariancef.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVariancef_CFLAGS) $(CFLAGS) -MT testDoubleVariancef-testDoubleVariancef.o -MD -MP -MF $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Tpo -c -o testDoubleVariancef-testDoubleVariancef.o `test -f 'testDoubleVariancef.c' || echo '$(srcdir)/'`testDoubleVariancef.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Tpo $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleVariancef.c' object='testDoubleVariancef-testDoubleVariancef.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVariancef_CFLAGS) $(CFLAGS) -c -o testDoubleVariancef-testDoubleVariancef.o `test -f 'testDoubleVariancef.c' || echo '$(srcdir)/'`testDoubleVariancef.c + +testDoubleVariancef-testDoubleVariancef.obj: testDoubleVariancef.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVariancef_CFLAGS) $(CFLAGS) -MT testDoubleVariancef-testDoubleVariancef.obj -MD -MP -MF $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Tpo -c -o testDoubleVariancef-testDoubleVariancef.obj `if test -f 'testDoubleVariancef.c'; then $(CYGPATH_W) 'testDoubleVariancef.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleVariancef.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Tpo $(DEPDIR)/testDoubleVariancef-testDoubleVariancef.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDoubleVariancef.c' object='testDoubleVariancef-testDoubleVariancef.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDoubleVariancef_CFLAGS) $(CFLAGS) -c -o testDoubleVariancef-testDoubleVariancef.obj `if test -f 'testDoubleVariancef.c'; then $(CYGPATH_W) 'testDoubleVariancef.c'; else $(CYGPATH_W) '$(srcdir)/testDoubleVariancef.c'; fi` + +testFloatVariancef-testFloatVariancef.o: testFloatVariancef.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVariancef_CFLAGS) $(CFLAGS) -MT testFloatVariancef-testFloatVariancef.o -MD -MP -MF $(DEPDIR)/testFloatVariancef-testFloatVariancef.Tpo -c -o testFloatVariancef-testFloatVariancef.o `test -f 'testFloatVariancef.c' || echo '$(srcdir)/'`testFloatVariancef.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatVariancef-testFloatVariancef.Tpo $(DEPDIR)/testFloatVariancef-testFloatVariancef.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatVariancef.c' object='testFloatVariancef-testFloatVariancef.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVariancef_CFLAGS) $(CFLAGS) -c -o testFloatVariancef-testFloatVariancef.o `test -f 'testFloatVariancef.c' || echo '$(srcdir)/'`testFloatVariancef.c + +testFloatVariancef-testFloatVariancef.obj: testFloatVariancef.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVariancef_CFLAGS) $(CFLAGS) -MT testFloatVariancef-testFloatVariancef.obj -MD -MP -MF $(DEPDIR)/testFloatVariancef-testFloatVariancef.Tpo -c -o testFloatVariancef-testFloatVariancef.obj `if test -f 'testFloatVariancef.c'; then $(CYGPATH_W) 'testFloatVariancef.c'; else $(CYGPATH_W) '$(srcdir)/testFloatVariancef.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testFloatVariancef-testFloatVariancef.Tpo $(DEPDIR)/testFloatVariancef-testFloatVariancef.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testFloatVariancef.c' object='testFloatVariancef-testFloatVariancef.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testFloatVariancef_CFLAGS) $(CFLAGS) -c -o testFloatVariancef-testFloatVariancef.obj `if test -f 'testFloatVariancef.c'; then $(CYGPATH_W) 'testFloatVariancef.c'; else $(CYGPATH_W) '$(srcdir)/testFloatVariancef.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/statisticsFunctions/variancef/ccolumnvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/ccolumnvariancefa.c new file mode 100644 index 00000000..4b00a087 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/ccolumnvariancefa.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variancef.h" +#include "matrixTranspose.h" + +void ccolumnvariancefa(floatComplex *in1, int lines, int columns,floatComplex *in2, floatComplex* out){ + + int i = 0 ; + + floatComplex* transp = (floatComplex*) malloc ( sizeof (double) *(unsigned int) (lines*columns)); + + + + ctransposea ( in1 , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = cvariancefa ( transp + i*columns , columns , in2 ) ; + + + free (transp); + + +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/crowvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/crowvariancefa.c new file mode 100644 index 00000000..1e4f8549 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/crowvariancefa.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" + +void crowvariancefa(floatComplex *in1, int lines, int columns,floatComplex *in2, floatComplex* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = cvariancefa ( in1 + i*lines , lines , in2) ; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/cvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/cvariancefa.c new file mode 100644 index 00000000..4f4871c6 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/cvariancefa.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" +#include "division.h" + +floatComplex cvariancefa(floatComplex *in1, int size, floatComplex *in2) + +{ + int i = 0 ; + floatComplex temp = FloatComplex (0.0f, 0.0f ); + floatComplex accumulate =FloatComplex (0.0f, 0.0f ); + floatComplex accumulateFre = FloatComplex (0.0f, 0.0f ); + + floatComplex meanf = cmeanfa (in1 , size , in2); + + for(i = 0 ; i < size ; ++i) + { + temp = cpows ( cdiffs (in1[i] , meanf ) ,FloatComplex (2.0f, 0.0f ) ); + temp = cmuls( in2[i] , temp); + + accumulate = cadds( temp , accumulate); + accumulateFre = cadds (in2[i] ,accumulateFre ); + } + return crdivs (accumulate , cdiffs (accumulateFre ,FloatComplex(1.0f,0.0f)) ); +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/dcolumnvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/dcolumnvariancefa.c new file mode 100644 index 00000000..686e6de4 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/dcolumnvariancefa.c @@ -0,0 +1,33 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" +#include "matrixTranspose.h" + +void dcolumnvariancefa(double *in1, int lines, int columns, double *in2, double* out){ + + int i = 0 ; + + double* transp = (double*) malloc ( sizeof (double) *(unsigned int) (lines*columns)); + + + + dtransposea ( in1 , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = dvariancefa ( transp + i*columns , columns , in2) ; + + + free (transp); +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/drowvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/drowvariancefa.c new file mode 100644 index 00000000..274e8281 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/drowvariancefa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variancef.h" + +void drowvariancefa(double *in1, int lines, int columns,double *in2, double* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = dvariancefa ( in1 + i*lines , lines , in2 ) ; + +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/dvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/dvariancefa.c new file mode 100644 index 00000000..32bd38ca --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/dvariancefa.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" + +double dvariancefa(double *in1, int size , double * in2) +{ + int i = 0 ; + double temp = 0.0; + double accumulate = 0.0 ; + double accumulateFre = 0.0 ; + + double meanf = dmeanfa (in1 , size , in2); + + for(i = 0 ; i < size ; ++i) + { + temp = dpows ( (in1[i] - meanf ) ,2 ); + temp *= in2[i]; + + accumulate += temp ; + accumulateFre += in2[i]; + } + + return accumulate / (accumulateFre -1); +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/scolumnvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/scolumnvariancefa.c new file mode 100644 index 00000000..a0283aa1 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/scolumnvariancefa.c @@ -0,0 +1,47 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variancef.h" +#include "meanf.h" + + +void scolumnvariancefa(float *in1, int lines, int columns, float *in2, float* out){ + int i = 0; + int j = 0; + float temp = 0.0f; + float accumulate = 0.0f; + float accumulateFre = 0.0f ; + + scolumnmeanfa(in1, lines, columns, in2, out ); + + + /*we first multiply each cell of the input matrix by its coefficient*/ + for (j = 0; j < lines; ++j) + { + accumulate = 0.0f; + accumulateFre= 0.0f; + temp = 0.0f; + + for ( i = 0 ; i < columns; ++i ) + { + temp = spows ( (in1[lines*i + j] - out[j] ) ,2 ); + temp *= in2[lines*i + j]; + + accumulate += temp ; + accumulateFre += in2[lines*i + j]; + } + out[j] = accumulate / (accumulateFre - 1) ; + } + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/srowvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/srowvariancefa.c new file mode 100644 index 00000000..36c4783d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/srowvariancefa.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" + +void srowvariancefa(float *in1, int lines, int columns, float *in2, float* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = svariancefa ( in1 + i*lines , lines,in2 + i*lines ) ; +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/svariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/svariancefa.c new file mode 100644 index 00000000..f49d2b38 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/svariancefa.c @@ -0,0 +1,46 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" + +/* +s_moyennepond = meanf(x, fre) +s_ecartmoyenne = x - s_moyennepond +s_ecartcarre = s_ecartmoyenne.^2 +s_ecartcarrepondere = s_ecartcarre .* fre +s = sum( s_ecartcarrepondere )/(sumfre - 1), +*/ +float svariancefa(float *in1, int size, float* in2) +{ + int i = 0 ; + float temp = 0.0f; + float accumulate = 0.0f ; + float accumulateFre = 0.0f ; + + float meanf = smeanfa (in1 , size , in2); + /*printf ("\nmeanf %lf \n" ,meanf);*/ + for(i = 0 ; i < size ; ++i) + { + + temp = spows ( (in1[i] - meanf ) ,2 ); + temp *= in2[i]; + + accumulate += temp ; + accumulateFre += in2[i]; + + + } + + return accumulate / (accumulateFre - 1) ; +} + + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariance.c b/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariance.c new file mode 100644 index 00000000..b85a1571 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariance.c @@ -0,0 +1,335 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include + +#include "variance.h" + +#define SINGLE 1.323312455 +#define LINES 7 +#define COLUMNS 10 +#define MATRIX {0.102326436434,0.939044147730,0.638607255649,0.059883427806,0.311199211050,\ + 0.377510951832,0.909709410276,0.928138985299,0.855155082885,0.308869514614,\ +0.729239261709,0.127006734256,0.242402311414,0.807912770193,0.621117659844,\ + 0.081452373881,0.088844371960,0.587072817143,0.068080495112,0.995457543526,\ +0.835322400089,0.656235548668,0.767905956600,0.706818781793,0.187699332368,\ + 0.568810169585,0.401039466728,0.397196868435,0.483212330844,0.161224133335,\ +0.932864250615,0.719208867755,0.262409000657,0.931377100293,0.596724558622,\ + 0.310327019077,0.350161732174,0.104841318447,0.830732351169,0.804621329065,\ +0.050784428138,0.551920620725,0.125952405389,0.083156193607,0.420623748098,\ + 0.168616071343,0.707545555662,0.104633864947,0.465604968835,0.489758284763,\ +0.167727907188,0.760689914692,0.454900974408,0.063926273491,0.87152507063,0.978668818716,\ + 0.135898929089,0.484713065904,0.785042577423,0.049412418623,\ +0.947593610268,0.884073690511,0.212796610314,0.654832502827,0.007690255996,\ + 0.031808692031,0.706323316786,0.008731670678,0.270014822017,0.153652121313} + + +#define MATRIXROW {0.1688249423502767021521 , 0.0729081225272336097554 , 0.0579879770921138057438 , 0.1499989757031960635469 , 0.0850863194040760717485 , 0.1085086384507867873772 , 0.0969379859569881041637 , 0.1072816602642319844252 , 0.0913638718167188862429 , 0.1285778184208021535095 } +#define MATRIXCOL { 0.1233078274276283442523, \ + 0.1232135941992091865416 , \ + 0.0540377259589001762707 , \ + 0.0925512303008872161403 , \ + 0.0555055644879708723338 , \ + 0.1276299219577190779962 , \ + 0.1385167433745558840386 } + + +#define IMATRIX {0.05826747464016080,0.99946373142302036,0.85600351681932807,0.62329693790525198,\ + 0.49792320514097810,0.44210509583353996,0.55833499459549785,0.09633230511099100,\ + 0.80100952507928014,0.34466254524886608,\ +0.48831309471279383,0.95087061496451497,0.01332767866551876,0.76261807000264525,\ + 0.74346329551190138,0.65157829830422997,0.57006288319826126,0.70580983115360141,\ + 0.51323400903493166,0.64977857517078519,\ +0.80352442665025592,0.69910932797938585,0.69258948462083936,0.91169391758739948,\ + 0.92454590043053031,0.27637310232967138,0.31692579621449113,0.86305770650506020,\ + 0.20109100220724940,0.01225362811237574,\ +0.38199013099074364,0.96006405679509044,0.16440964583307505,0.59608811559155583,\ + 0.72101737372577190,0.58661046391353011,0.99326277803629637,0.00761850038543344,\ + 0.78608208894729614,0.89965870184823871,\ +0.43115562805905938,0.81857266277074814,0.83410377753898501,0.55516970623284578,\ + 0.51345925079658628,0.04770902730524540,0.80747798969969153,0.80489510949701071,\ + 0.78650354826822877,0.30791273340582848,\ +0.75731822755187750,0.53423820668831468,0.42618893459439278,0.85448804078623652,\ + 0.92601215932518244,0.94169309409335256,0.85547966323792934,0.59637623047456145,\ + 0.69515300076454878,0.18359116325154901,\ +0.01200280850753188,0.2255702270194888,0.34853330114856362,0.55313225090503693,\ + 0.63695094687864184,0.96132039744406939,0.50314606027677655,0.11768362112343311,\ + 0.42481321236118674,0.52963322307914495} + +#define RMATRIX {0.53868199465796351,0.65326874051243067,0.37497402401641011,0.60422550700604916,\ + 0.33622304117307067,0.03531436901539564,0.33213760564103723,0.39493087679147720,\ + 0.04170337272807956,0.87363853026181459,\ +0.65950810909271240,0.31221040291711688,0.15333442110568285,0.66478573577478528,\ + 0.44319023378193378,0.40884594758972526,0.94536898937076330,0.67733758920803666,\ + 0.18673646822571754,0.92331133363768458,\ +0.55921846115961671,0.75012728199362755,0.23257926432415843,0.57102064136415720,\ + 0.60969385923817754,0.67336730472743511,0.07624059682711959,0.10437540244311094,\ + 0.95672677317634225,0.19771346449851990,\ +0.05278092902153730,0.75808868417516351,0.17633479088544846,0.01146994484588504,\ + 0.36732212174683809,0.19948644982650876,0.52714426256716251,0.21445603063330054,\ + 0.94751045759767294,0.04272260749712586,\ +0.03257346292957664,0.53217577841132879,0.87635089689865708,0.15471007302403450,\ + 0.25448470888659358,0.91815057490020990,0.72509902389720082,0.87545845471322536,\ + 0.05635281419381499,0.01432112138718367,\ +0.57406943850219250,0.80984140699729323,0.01664119493216276,0.93888836959376931,\ + 0.11264799535274506,0.66036546928808093,0.76042845565825701,0.25908330874517560,\ + 0.88014078326523304,0.70332178613170981,\ +0.94614937948063016,0.78529163636267185,0.20241560926660895,0.10981105919927359,\ + 0.75415370846167207,0.15320260450243950,0.59521253732964396,0.71318271104246378,\ + 0.51107599260285497,0.52125945501029491} + + + + + + +#define IMATRIXROW {-0.0419293790250184,-0.05416405376783551,+0.11775191182077104,+0.08015791690354153,+0.00011032748454003,\ +-0.10124210045965254,0.06720614014223115,+0.02470873836336094,-0.07082037296251543,-0.00621987869853545} + +#define RMATRIXROW {0.01439621349781126,-0.04697393442028135,-0.03018604392150223,0.09765990436118642,0.01606884471097247,\ +-0.00604250542333471,0.02870576510687836,-0.04985742926427023,0.12356001472881707,0.05909180726174274} + +#define IMATRIXCOL {-0.01904810719805961,+0.04121453132770223,+0.00378553967089328,\ ++0.10307670507342410,+0.03497427750676810,+0.01761849804019567,-0.10182321471060848} + +#define RMATRIXCOL {-0.02739893277693160,0.01792852626358409,-0.02205084134302381,\ +-0.01012610864032573,0.07317682977907164,0.04762062457313784,0.00849011627117621} + + +static void dvariancesTest (void ) { + + double toTest = dvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + + +static void drowvariancesTest (void ) { + + double toTest = drowvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + +static void dcolumnvariancesTest (void) { + + double toTest = dcolumnvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-16 ) ; +} + + +static void zvariancesTest (void ) { + + doubleComplex toTest = zvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + +static void zrowvariancesTest (void ) { + + doubleComplex toTest = zrowvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + +static void zcolumnvariancesTest (void ) { + + doubleComplex toTest = zrowvariances ( DoubleComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( zreals( toTest) - SINGLE ) / fabs( zreals( toTest)) < 1e-16 ) ; + assert ( fabs ( zimags( toTest) - SINGLE ) / fabs( zimags( toTest)) < 1e-16 ) ; +} + + + + + + +static void dvarianceaTest ( void){ + + double mtoTest[] = MATRIX ; + double result = 0.1007532974338590653352; + double out = dvariancea ( mtoTest , LINES*COLUMNS ); ; + + + + printf ( "out : %1.20f\t result : %1.20f\t\n" , out , result ) ; + + + + assert ( fabs ( out - result ) / fabs( out ) < 3e-16 ) ; + +} + + +static void drowvarianceaTest ( void ) +{ + int i = 0 ; + + double mtoTest[] = MATRIX ; + double result[LINES] = MATRIXCOL ; + double out[LINES] ; + + drowvariancea ( mtoTest , COLUMNS , LINES , out ) ; + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "ROWout : %1.20f\t result : %1.20f\t\n" , out[i] , result [i] ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 3e-16 ) ; + } + +} + +static void dcolumnvarianceaTest ( void ) +{ + int i = 0 ; + + double mtoTest[] = MATRIX ; + double result[COLUMNS] = MATRIXROW ; + double out[ COLUMNS] ; + + + + dcolumnvariancea ( mtoTest , COLUMNS, LINES , out ) ; + + for ( i = 0 ; i < COLUMNS; i++) + { + printf ( "%dCOLout : %1.20f\t result : %1.20f\t\n" ,i, out[i] , result [i] ) ; } + for ( i = 0 ; i < COLUMNS; i++) + { + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 3e-16 ) ; + } + +} + + + + +static void zvarianceaTest ( void){ + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + doubleComplex Result = DoubleComplex ( 0.01225832057910708 , 0.01071188208687752 ); + + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex out = zvariancea ( mtoTest , LINES*COLUMNS ); ; + + assert ( fabs( zreals(out) - zreals (Result) ) / fabs (zreals (out)) < 3e-16 ); + assert( fabs( zimags(out) - zimags (Result )) / fabs (zimags (out)) < 3e-16 ); + + +} + +static void zrowvarianceaTest (void ) { + + int i = 0 ; + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + double rResult [] = RMATRIXROW; + double iResult [] = IMATRIXROW ; + + doubleComplex out[COLUMNS]; + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex* Result = DoubleComplexMatrix ( rResult , iResult , COLUMNS ); + + zrowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + /*FIXME test failed under 1-e04 precision */ + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , zreals(out[i]) , zimags(out[i]), zreals(Result[i]) ,zimags( Result[i])); + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + assert( fabs( zimags(out[i]) - zimags (Result[i])) / fabs (zimags (out[i])) < 3e-16); + + } +} + + + +static void zcolumnvarianceaTest ( void) { + int i = 0 ; + + double rmtoTest [] = RMATRIX ; + double imtoTest [] = IMATRIX ; + double rResult [] = RMATRIXCOL; + double iResult [] = IMATRIXCOL ; + + doubleComplex out[LINES]; + doubleComplex* mtoTest = DoubleComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + doubleComplex* Result = DoubleComplexMatrix ( rResult , iResult , LINES ); + + zcolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , zreals(out[i]) , zimags(out[i]), zreals(Result[i]) ,zimags( Result[i])); + assert ( fabs( zreals(out[i]) - zreals (Result[i]) ) / fabs (zreals (out[i])) < 3e-16 ); + assert( fabs( zimags(out[i]) - zimags (Result[i])) / fabs (zimags (out[i])) < 3e-16); + + } + + + +} + + + + + +static int testDoubleVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Double Tests ****\n"); + printf("*********************\n"); + + printf("\n\t>>>>singleton real Tests\n"); + dcolumnvariancesTest () ; + dvariancesTest () ; + drowvariancesTest () ; + + + printf("\n\t>>>>singleton complex Tests\n"); + + zrowvariancesTest () ; + zcolumnvariancesTest () ; + zvariancesTest () ; + + + + printf("\n\t>>>>array real Tests\n"); + + dvarianceaTest () ; + + dcolumnvarianceaTest () ; + drowvarianceaTest ( ); + + + printf("\n\t>>>>array complex Tests\n"); + + zvarianceaTest () ; + zrowvarianceaTest ( ); + zcolumnvarianceaTest () ; + + + return 0; +} + +int main(void) { + assert(testDoubleVariance () == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariancef.c b/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariancef.c new file mode 100644 index 00000000..1102ae18 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/testDoubleVariancef.c @@ -0,0 +1,373 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "variancef.h" + + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + +static int dvariancefsTest(void) { + + + printf("\n>>>> variancef Double Scalar Test\n"); + printf("result : %e " ,dvariancefs(value1,coef1)) ; + + assert( ( dvariancefs(3.0,56.0) ) == 0.0 ); + assert( ( dvariancefs( 1.123456789 ,2.0) ) == 0.0 ); + + + return 0; +} + +static int dvariancefaTest(void) { + double table1[3] = {3.0, 6.0, 9.0}; + double coef1[3] = {10.0, 2.0, 6.0}; + + double table2[5] = {3.186784563, + 4.186784563, + 5.186784563, + 6.186784563, + 7.186784563}; + + double coef2[5] = {3.0, + 4.0, + 5.0, + 6.0, + 7.0}; + + printf("\n>>>> variancef Double Array Test\n"); + printf("result1 : %e " ,dvariancefa(table1, 3, coef1)) ; + printf("result2 : %e " ,dvariancefa(table2, 5, coef2)) ; + assert((dvariancefa(table1, 3, coef1) - 8.000000000 )/ dvariancefa(table1, 3 ,coef1) < 1e-6); + assert((dvariancefa(table2, 5, coef2) - 1.916666666 )/ dvariancefa(table2, 5 ,coef2) < 1e-6); + return 0; +} + +/* +static int dcolumnvariancefaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double coef2[10] = {11.0, 12.0, 13.0, 14.0 , 15.0, 16.0, 17.0, 18.0, 19.0, 20.0}; + double columnMeanmedTable1_3_3[3] = {0}; + double columnMeanmedTable1_1_9[1] = {0}; + double columnMeanmedTable1_9_1[9] = {0}; + double columnMeanmedTable2_2_5[2] = {0}; + double columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Variancef Double Array Test\n"); + + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 68 32 146 ] + [ 7 8 9 ] [ 5 6 7 ] + + dcolumnvariancefa(table1, 3, 3, coef1 ,columnMeanmedTable1_3_3); + assert( ( fabs(columnMeanmedTable1_3_3[0] ) - ( 68.0 / 33.0 ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable1_3_3[1] ) - ( 32.0 / 6.0 ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable1_3_3[2] ) - ( 146.0 / 18.0 ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 1e-6 ); + + + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + + dcolumnvariancefa(table1, 1, 9, coef1 ,columnMeanmedTable1_1_9); + printf("result qui foire : %e\n " ,columnMeanmedTable1_1_9[0]) ; + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 1.146666666f ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 1e-6 ); + + + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + + dcolumnvariancefa(table1, 9, 1, coef1, columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ]=> [ 415 520 ] + + dcolumnvariancefa(table2, 2, 5, coef2 , columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 415.0 / 75.0 ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 520.0 / 80.0 ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 1e-6 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + + [ 1 6 ] [ 11 16 ] + [ 2 7 ] [ 12 17 ] => [ 107 143 183 227 275 ] + [ 3 8 ].*[ 13 18 ] + [ 4 9 ] [ 14 19 ] + [ 5 10 ] [ 15 20 ] + + + dcolumnvariancefa(table2, 5, 2, coef2 ,columnMeanmedTable2_5_2); + assert( ( fabs(columnMeanmedTable2_5_2[0] ) - ( 107.0 / 27.0 ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[1] ) - ( 143.0 / 29.0 ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[2] ) - ( 183.0 / 31.0 ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[3] ) - ( 227.0 / 33.0 ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[4] ) - ( 275.0 / 35.0 ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 1e-6 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} +*/ +/* +static int srowvariancefaTest(void) { + int i = 0; + double table1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double coef1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double table2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 10.0}; + double coef2[10] = {11.0, 12.0, 13.0, 14.0 , 15.0, 16.0, 17.0, 18.0, 19.0, 20.0}; + double rowMeanmedTable1_3_3[3] = {0}; + double rowMeanmedTable1_1_9[9] = {0}; + double rowMeanmedTable1_9_1[1] = {0}; + double rowMeanmedTable2_2_5[5] = {0}; + double rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Double Array Test\n"); + + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 49 80 117 ] + [ 7 8 9 ] [ 5 6 7 ] + + srowvariancefa(table1, 3, 3, coef1 , rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( ( fabs(rowMeanmedTable1_3_3[0] ) - ( 49.0 / 16.0 ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable1_3_3[1] ) - ( 80.0 / 19.0 ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable1_3_3[2] ) - ( 117.0 / 22.0 ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 1e-6 ); + + + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + + srowvariancefa(table1, 1, 9, coef1, rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + + [ 1 2 3 4 5 6 7 8 9 ] => [ 246 ] + + srowvariancefa(table1, 9, 1, coef1, rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 246.0 / 57.0 ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 1e-6 ); + + + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ] => [ 3 7 11 15 19 ] + + srowvariancefa(table2, 2, 5, coef2, rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( ( fabs(rowMeanmedTable2_2_5[0] ) - ( 35.0 / 23.0 ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[1] ) - ( 95.0 / 27.0 ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[2] ) - ( 171.0 / 31.0 ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[3] ) - ( 263.0 / 35.0 ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[4] ) - ( 371.0 / 39.0 ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 1e-6 ); + + + return 0; +} +*/ + +static int zvariancefsTest(void) { + + printf("\n>>>> Mean Double Complex Scalar Test\n"); + assert( zreals(zvariancefs(DoubleComplex(3.0, 0.0),DoubleComplex(3.0, 0.0))) == 0.0 ); + assert( zimags(zvariancefs(DoubleComplex(3.0, 0.0),DoubleComplex(3.0, 0.0))) == 0.0 ); + assert( zreals(zvariancefs(DoubleComplex(1.123456789, 1.123456789),DoubleComplex(9.0, 0.0))) == 0.0 ); + assert( zimags(zvariancefs(DoubleComplex(1.123456789, 1.123456789),DoubleComplex(9.0, 0.0))) == 0.0 ); + + return 0; +} + + + +static int zvariancefaTest(void) { + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + doubleComplex result =DoubleComplex(0.0 , 0.0); + + printf("\n>>>> Mean Double Complex Array Test\n"); + result = zvariancefa(table1, 9, coef1); + /*printf("\nresult : %e \t+ %e i " ,zreals(result) ,zimags(result)) ;*/ + + assert( fabs(zreals(result) - ( 1.3834586f ) ) / fabs ( zreals(result) ) < 1e-6 ); + assert( fabs(zimags(result) - ( 9.6090226f ) ) / fabs ( zimags(result) ) < 1e-6 ); + + return 0; +} + +/* +static int crowvariancefaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 9); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 9); + + doubleComplex rowMeanmedTable1_3_3[3] = {DoubleComplex(0.0, 0.0)}; + + doubleComplex rowMeanmedTable1_1_9[9] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable1_9_1[1] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_2_5[5] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_5_2[2] = {DoubleComplex(0.0, 0.0)}; + + printf("\n>>>> Row variancef Double Complex Array Test\n"); + + + + crowvariancefa(table1 , 3 , 3 , coef1 , rowMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + + printf("rowMeanmedTable_3_3[%d] = %e + %ei\n", i, zreals(rowMeanmedTable1_3_3[i]), zimags(rowMeanmedTable1_3_3[i])); + } + assert( ( fabs(zimags(rowMeanmedTable1_3_3[0]) ) - ( 27.0 / 16.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( ( fabs(zreals(rowMeanmedTable1_3_3[0]) ) - ( 49.0 / 16.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( ( fabs(zimags(rowMeanmedTable1_3_3[1]) ) - ( 90.0 / 19.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( ( fabs(zreals(rowMeanmedTable1_3_3[1]) ) - ( 80.0 / 19.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( ( fabs(zimags(rowMeanmedTable1_3_3[2]) ) - (171.0 / 22.0 ) ) / fabs ( zimags(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( ( fabs(zreals(rowMeanmedTable1_3_3[2]) ) - (117.0 / 22.0 ) ) / fabs ( zreals(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} +*/ + + +/* +static int scolumnvariancefaTest(void) { + + int i = 0 ; + + double tableR1[9] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0}; + double tableI1[9] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0}; + double coefR1[9] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0}; + double coefI1[9] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0}; + + double tableR2[10] = {1.0, 4.0, 7.0, 2.0 , 5.0, 8.0, 3.0, 6.0, 9.0, 10.0}; + double tableI2[10] = {1.0, 2.0, 3.0, 4.0 , 5.0, 6.0, 7.0, 8.0, 9.0, 15.0}; + double coefR2[10] = {10.0, 1.0, 5.0,11.0 , 2.0, 6.0,12.0, 3.0, 7.0, 19.0}; + double coefI2[10] = { 0.0, 0.0, 0.0, 0.0 , 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + doubleComplex* table1 = DoubleComplexMatrix (tableR1, tableI1, 9); + doubleComplex* coef1 = DoubleComplexMatrix (coefR1, coefI1, 9); + + doubleComplex* table2 = DoubleComplexMatrix (tableR2, tableI2, 9); + doubleComplex* coef2 = DoubleComplexMatrix (coefR2, coefI2, 9); + + doubleComplex columnMeanmedTable1_3_3[3] = {DoubleComplex(0.0, 0.0)}; + + doubleComplex rowMeanmedTable1_1_9[9] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable1_9_1[1] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_2_5[5] = {DoubleComplex(0.0, 0.0)}; + doubleComplex rowMeanmedTable2_5_2[2] = {DoubleComplex(0.0, 0.0)}; + + + printf("\n>>>> Column variancef Double Complex Array Test\n"); + + + + scolumnvariancefa(table1 , 3 , 3 , coef1 , columnMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnMeanmedTable_3_3[%d] = %e + %ei\n", i, zreals(columnMeanmedTable1_3_3[i]), zimags(columnMeanmedTable1_3_3[i])); + } + assert( ( fabs(zimags(columnMeanmedTable1_3_3[0]) ) - (138.0 / 33.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[0]) ) - ( 68.0 / 33.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( ( fabs(zimags(columnMeanmedTable1_3_3[1]) ) - ( 36.0 / 6.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[1]) ) - ( 32.0 / 6.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( ( fabs(zimags(columnMeanmedTable1_3_3[2]) ) - (114.0 / 18.0 ) ) / fabs ( zimags(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( ( fabs(zreals(columnMeanmedTable1_3_3[2]) ) - (146.0 / 18.0 ) ) / fabs ( zreals(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} + +*/ + +static int testvariancef(void) { + + dvariancefsTest(); + dvariancefaTest(); + /*dcolumnvariancefaTest(); + srowvariancefaTest();*/ + zvariancefsTest(); + zvariancefaTest(); + /*crowvariancefaTest(); + scolumnvariancefaTest(); +*/ + return 0; +} + +int main(void) { + assert(testvariancef() == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariance.c b/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariance.c new file mode 100644 index 00000000..97b56d4d --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariance.c @@ -0,0 +1,329 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include + +#include "variance.h" + +#define SINGLE 1.323312455f +#define LINES 7 +#define COLUMNS 10 +#define MATRIX {0.102326436434f,0.939044147730f,0.638607255649f,0.059883427806f,0.311199211050f,\ + 0.377510951832f,0.909709410276f,0.928138985299f,0.855155082885f,0.308869514614f,\ +0.729239261709f,0.127006734256f,0.242402311414f,0.807912770193f,0.621117659844f,\ + 0.081452373881f,0.088844371960f,0.587072817143f,0.068080495112f,0.995457543526f,\ +0.835322400089f,0.656235548668f,0.767905956600f,0.706818781793f,0.187699332368f,\ + 0.568810169585f,0.401039466728f,0.397196868435f,0.483212330844f,0.161224133335f,\ +0.932864250615f,0.719208867755f,0.262409000657f,0.931377100293f,0.596724558622f,\ + 0.310327019077f,0.350161732174f,0.104841318447f,0.830732351169f,0.804621329065f,\ +0.050784428138f,0.551920620725f,0.125952405389f,0.083156193607f,0.420623748098f,\ + 0.168616071343f,0.707545555662f,0.104633864947f,0.465604968835f,0.489758284763f,\ +0.167727907188f,0.760689914692f,0.454900974408f,0.063926273491f,0.87152507063f,0.978668818716f,\ + 0.135898929089f,0.484713065904f,0.785042577423f,0.049412418623f,\ +0.947593610268f,0.884073690511f,0.212796610314f,0.654832502827f,0.007690255996f,\ + 0.031808692031f,0.706323316786f,0.008731670678f,0.270014822017f,0.153652121313f} + + +#define MATRIXROW {0.168824942350f,0.072908122527f,0.057987977092f,0.149998975703f,0.085086319404f,\ +0.108508638451f,0.096937985957f,0.107281660264f,0.091363871817f,0.128577818421f} + +#define MATRIXCOL { 0.123307827428f,0.123213594199f,0.054037725959f,0.092551230301f,0.055505564488f,\ +0.127629921958f,0.138516743375f } + + +#define IMATRIX {0.05826747464016080f,0.99946373142302036f,0.85600351681932807f,0.62329693790525198f,\ + 0.49792320514097810f,0.44210509583353996f,0.55833499459549785f,0.09633230511099100f,\ + 0.80100952507928014f,0.34466254524886608f,\ +0.48831309471279383f,0.95087061496451497f,0.01332767866551876f,0.76261807000264525f,\ + 0.74346329551190138f,0.65157829830422997f,0.57006288319826126f,0.70580983115360141f,\ + 0.51323400903493166f,0.64977857517078519f,\ +0.80352442665025592f,0.69910932797938585f,0.69258948462083936f,0.91169391758739948f,\ + 0.92454590043053031f,0.27637310232967138f,0.31692579621449113f,0.86305770650506020f,\ + 0.20109100220724940f,0.01225362811237574f,\ +0.38199013099074364f,0.96006405679509044f,0.16440964583307505f,0.59608811559155583f,\ + 0.72101737372577190f,0.58661046391353011f,0.99326277803629637f,0.00761850038543344f,\ + 0.78608208894729614f,0.89965870184823871f,\ +0.43115562805905938f,0.81857266277074814f,0.83410377753898501f,0.55516970623284578f,\ + 0.51345925079658628f,0.04770902730524540f,0.80747798969969153f,0.80489510949701071f,\ + 0.78650354826822877f,0.30791273340582848f,\ +0.75731822755187750f,0.53423820668831468f,0.42618893459439278f,0.85448804078623652f,\ + 0.92601215932518244f,0.94169309409335256f,0.85547966323792934f,0.59637623047456145f,\ + 0.69515300076454878f,0.18359116325154901f,\ +0.01200280850753188f,0.2255702270194888f,0.34853330114856362f,0.55313225090503693f,\ + 0.63695094687864184f,0.96132039744406939f,0.50314606027677655f,0.11768362112343311f,\ + 0.42481321236118674f,0.52963322307914495f} + +#define RMATRIX {0.53868199465796351f,0.65326874051243067f,0.37497402401641011f,0.60422550700604916f,\ + 0.33622304117307067f,0.03531436901539564f,0.33213760564103723f,0.39493087679147720f,\ + 0.04170337272807956f,0.87363853026181459f,\ +0.65950810909271240f,0.31221040291711688f,0.15333442110568285f,0.66478573577478528f,\ + 0.44319023378193378f,0.40884594758972526f,0.94536898937076330f,0.67733758920803666f,\ + 0.18673646822571754f,0.92331133363768458f,\ +0.55921846115961671f,0.75012728199362755f,0.23257926432415843f,0.57102064136415720f,\ + 0.60969385923817754f,0.67336730472743511f,0.07624059682711959f,0.10437540244311094f,\ + 0.95672677317634225f,0.19771346449851990f,\ +0.05278092902153730f,0.75808868417516351f,0.17633479088544846f,0.01146994484588504f,\ + 0.36732212174683809f,0.19948644982650876f,0.52714426256716251f,0.21445603063330054f,\ + 0.94751045759767294f,0.04272260749712586f,\ +0.03257346292957664f,0.53217577841132879f,0.87635089689865708f,0.15471007302403450f,\ + 0.25448470888659358f,0.91815057490020990f,0.72509902389720082f,0.87545845471322536f,\ + 0.05635281419381499f,0.01432112138718367f,\ +0.57406943850219250f,0.80984140699729323f,0.01664119493216276f,0.93888836959376931f,\ + 0.11264799535274506f,0.66036546928808093f,0.76042845565825701f,0.25908330874517560f,\ + 0.88014078326523304f,0.70332178613170981f,\ +0.94614937948063016f,0.78529163636267185f,0.20241560926660895f,0.10981105919927359f,\ + 0.75415370846167207f,0.15320260450243950f,0.59521253732964396f,0.71318271104246378f,\ + 0.51107599260285497f,0.52125945501029491f} + + + + + + +#define IMATRIXROW {-0.0419293790250184f,-0.05416405376783551f,+0.11775191182077104f,+0.08015791690354153f,+0.00011032748454003f,\ +-0.10124210045965254f,0.06720614014223115f,+0.02470873836336094f,-0.07082037296251543f,-0.00621987869853545f} + +#define RMATRIXROW {0.01439621349781126f,-0.04697393442028135f,-0.03018604392150223f,0.09765990436118642f,0.01606884471097247f,\ +-0.00604250542333471f,0.02870576510687836f,-0.04985742926427023f,0.12356001472881707f,0.05909180726174274f} + +#define IMATRIXCOL {-0.01904810719805961f,+0.04121453132770223f,+0.00378553967089328f,\ ++0.10307670507342410f,+0.03497427750676810f,+0.01761849804019567f,-0.10182321471060848f} + +#define RMATRIXCOL {-0.02739893277693160f,0.01792852626358409f,-0.02205084134302381f,\ +-0.01012610864032573f,0.07317682977907164f,0.04762062457313784f,0.00849011627117621f} + + +static void svariancesTest (void ) { + + float toTest = svariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + + +static void srowvariancesTest (void ) { + + float toTest = srowvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + +static void scolumnvariancesTest (void) { + + float toTest = scolumnvariances (SINGLE) ; + + assert ( fabs ( toTest - SINGLE ) / fabs( toTest) < 1e-06 ) ; +} + + +static void cvariancesTest (void ) { + + floatComplex toTest = cvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + +static void crowvariancesTest (void ) { + + floatComplex toTest = crowvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + +static void ccolumnvariancesTest (void ) { + + floatComplex toTest = crowvariances ( FloatComplex ( SINGLE , SINGLE ) ); + + assert ( fabs ( creals( toTest) - SINGLE ) / fabs( creals( toTest)) < 1e-06 ) ; + assert ( fabs ( cimags( toTest) - SINGLE ) / fabs( cimags( toTest)) < 1e-06 ) ; +} + + + + + + +static void svarianceaTest ( void){ + + float mtoTest[] = MATRIX ; + float result = 0.100753297434f; + float out = svariancea ( mtoTest , LINES*COLUMNS ); ; + + + + printf ( "out : %e\t result : %e\t\n" , out , result ) ; + + + + assert ( fabs ( out - result ) / fabs( out ) < 1e-06 ) ; + +} + + +static void srowvarianceaTest ( void ) +{ + int i = 0 ; + + float mtoTest[] = MATRIX ; + float result[COLUMNS] = MATRIXROW ; + float out[COLUMNS] ; + + srowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "ROWout : %e\t result : %e\t\n" , out[i] , result [i] ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 1e-06 ) ; + } + +} + +static void scolumnvarianceaTest ( void ) +{ + int i = 0 ; + + float mtoTest[] = MATRIX ; + float result[LINES] = MATRIXCOL ; + float out[ LINES] ; + + + + scolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%dCOLout : %e\t result : %e\t\n" ,i, out[i] , result [i] ) ; + assert ( fabs ( out[i] - result[i] ) / fabs( out[i] ) < 1e-06 ) ; + } + +} + + + + +static void cvarianceaTest ( void){ + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + floatComplex Result = FloatComplex ( 0.01225832057910708f , 0.01071188208687752f ); + + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex out = cvariancea ( mtoTest , LINES*COLUMNS ); ; + + assert ( fabs( creals(out) - creals (Result) ) / fabs (creals (out)) < 1e-06 ); + assert( fabs( cimags(out) - cimags (Result )) / fabs (cimags (out)) < 1e-06 ); + + +} + +static void crowvarianceaTest (void ) { + + int i = 0 ; + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + float rResult [] = RMATRIXROW; + float iResult [] = IMATRIXROW ; + + floatComplex out[COLUMNS]; + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex* Result = FloatComplexMatrix ( rResult , iResult , COLUMNS ); + + crowvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + /*FIXME test failed under 1-e04 precision */ + for ( i = 0 ; i < COLUMNS ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , creals(out[i]) , cimags(out[i]), creals(Result[i]) ,cimags( Result[i])); + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 3e-6 ); + assert( fabs( cimags(out[i]) - cimags (Result[i])) / fabs (cimags (out[i])) < 3e-6); + + } +} + + + +static void ccolumnvarianceaTest ( void) { + int i = 0 ; + + float rmtoTest [] = RMATRIX ; + float imtoTest [] = IMATRIX ; + float rResult [] = RMATRIXCOL; + float iResult [] = IMATRIXCOL ; + + floatComplex out[LINES]; + floatComplex* mtoTest = FloatComplexMatrix ( rmtoTest , imtoTest , LINES*COLUMNS ) ; + floatComplex* Result = FloatComplexMatrix ( rResult , iResult , LINES ); + + ccolumnvariancea ( mtoTest , LINES , COLUMNS , out ) ; + + + for ( i = 0 ; i < LINES ; i++) + { + printf ( "%d out : %e %e \t result %e %e \n" , i , creals(out[i]) , cimags(out[i]), creals(Result[i]) ,cimags( Result[i])); + assert ( fabs( creals(out[i]) - creals (Result[i]) ) / fabs (creals (out[i])) < 1e-06 ); + assert( fabs( cimags(out[i]) - cimags (Result[i])) / fabs (cimags (out[i])) < 1e-06); + + } + + + +} + + + + + +static int testFloatVariance (void) { + printf("\n\n\n\n*********************\n"); + printf("***** Float Tests ****\n"); + printf("*********************\n"); + + printf("\n\t>>>>singleton real Tests\n"); + scolumnvariancesTest () ; + svariancesTest () ; + srowvariancesTest () ; + + + printf("\n\t>>>>singleton complex Tests\n"); + + crowvariancesTest () ; + ccolumnvariancesTest () ; + cvariancesTest () ; + + + + printf("\n\t>>>>array real Tests\n"); + + svarianceaTest () ; + + scolumnvarianceaTest () ; + srowvarianceaTest ( ); + + + printf("\n\t>>>>array complex Tests\n"); + + cvarianceaTest () ; + crowvarianceaTest ( ); + ccolumnvarianceaTest () ; + + + return 0; +} + +int main(void) { + assert(testFloatVariance () == 0); + return 0; +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariancef.c b/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariancef.c new file mode 100644 index 00000000..4363052e --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/testFloatVariancef.c @@ -0,0 +1,381 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "variancef.h" + + +/* #define LOCAL_DEBUG */ + +#define ERROR(x) printf("diff = %e\n", x) + + + #define VALUE1 3.0f + #define VALUE2 1.123456789f + #define COEF1 56.0f + #define COEF2 2.0f + + +static int svariancefsTest(void) { + + printf("\n>>>> variancef Float Scalar Test\n"); + printf("result : %e " ,svariancefs(VALUE1,COEF1)) ; + + assert( ( svariancefs(VALUE1,COEF1) ) == 0.0f ); + assert( ( svariancefs(VALUE2,COEF2) ) == 0.0f ); + + + + return 0; +} + +static int svariancefaTest(void) { + float table1[3] = {3.0f, 6.0f, 9.0f}; + float coef1[3] = {10.0f, 2.0f, 6.0f}; + + float table2[5] = {3.186784563f, + 4.186784563f, + 5.186784563f, + 6.186784563f, + 7.186784563f}; + + float coef2[5] = {3.0f, + 4.0f, + 5.0f, + 6.0f, + 7.0f}; + + printf("\n>>>> variancef Float Array Test\n"); + printf("result : %e " ,svariancefa(table1, 3, coef1)) ; + printf("result : %e " ,svariancefa(table2, 5, coef2)) ; + assert(svariancefa(table1, 3, coef1) == 8.0f); + assert((svariancefa(table2, 5, coef2) - 1.916666666 )/ svariancefa(table2, 5 ,coef2) < 1e-6); + return 0; +} + +/* +static int scolumnvariancefaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float coef2[10] = {11.0f, 12.0f, 13.0f, 14.0f , 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f}; + float columnMeanmedTable1_3_3[3] = {0}; + float columnMeanmedTable1_1_9[1] = {0}; + float columnMeanmedTable1_9_1[9] = {0}; + float columnMeanmedTable2_2_5[2] = {0}; + float columnMeanmedTable2_5_2[5] = {0}; + + printf("\n>>>> Column Variancef Float Array Test\n"); + + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 68 32 146 ] + [ 7 8 9 ] [ 5 6 7 ] + + scolumnvariancefa(table1, 3, 3, coef1 ,columnMeanmedTable1_3_3); + assert( ( fabs(columnMeanmedTable1_3_3[0] ) - ( 68.0f / 33.0f ) ) / fabs ( columnMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable1_3_3[1] ) - ( 32.0f / 6.0f ) ) / fabs ( columnMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable1_3_3[2] ) - ( 146.0f / 18.0f ) ) / fabs ( columnMeanmedTable1_3_3[2] ) < 1e-6 ); + + + [ 1 2 3 4 5 6 7 8 9 ] => [ 45 ] + + scolumnvariancefa(table1, 1, 9, coef1 ,columnMeanmedTable1_1_9); + printf("result qui foire : %e\n " ,columnMeanmedTable1_1_9[0]) ; + assert( ( fabs(columnMeanmedTable1_1_9[0] ) - ( 1.146666666f ) ) / fabs ( columnMeanmedTable1_1_9[0] ) < 1e-6 ); + + + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + + scolumnvariancefa(table1, 9, 1, coef1, columnMeanmedTable1_9_1); + for ( i = 0 ; i < 9 ; ++i) { + printf("columnMeanmedTable1_9_1[%d] = %e\n", i, columnMeanmedTable1_9_1[i]); + assert(columnMeanmedTable1_9_1[i] == table1[i]); + } + + + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ]=> [ 415 520 ] + + scolumnvariancefa(table2, 2, 5, coef2 , columnMeanmedTable2_2_5); + assert( ( fabs(columnMeanmedTable2_2_5[0] ) - ( 415.0f / 75.0f ) ) / fabs ( columnMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_2_5[1] ) - ( 520.0f / 80.0f ) ) / fabs ( columnMeanmedTable2_2_5[1] ) < 1e-6 ); + for ( i = 0 ; i < 2 ; ++i) { + printf("columnMeanmedTable2_2_5[%d] = %e\n", i, columnMeanmedTable2_2_5[i]); + } + + + [ 1 6 ] [ 11 16 ] + [ 2 7 ] [ 12 17 ] => [ 107 143 183 227 275 ] + [ 3 8 ].*[ 13 18 ] + [ 4 9 ] [ 14 19 ] + [ 5 10 ] [ 15 20 ] + + + scolumnvariancefa(table2, 5, 2, coef2 ,columnMeanmedTable2_5_2); + assert( ( fabs(columnMeanmedTable2_5_2[0] ) - ( 107.0f / 27.0f ) ) / fabs ( columnMeanmedTable2_5_2[0] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[1] ) - ( 143.0f / 29.0f ) ) / fabs ( columnMeanmedTable2_5_2[1] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[2] ) - ( 183.0f / 31.0f ) ) / fabs ( columnMeanmedTable2_5_2[2] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[3] ) - ( 227.0f / 33.0f ) ) / fabs ( columnMeanmedTable2_5_2[3] ) < 1e-6 ); + assert( ( fabs(columnMeanmedTable2_5_2[4] ) - ( 275.0f / 35.0f ) ) / fabs ( columnMeanmedTable2_5_2[4] ) < 1e-6 ); + for ( i = 0 ; i < 5 ; ++i) { + printf("columnMeanmedTable2_5_2[%d] = %e\n", i, columnMeanmedTable2_5_2[i]); + } + + return 0; +} +*/ +/* +static int srowvariancefaTest(void) { + int i = 0; + float table1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float coef1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float table2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f}; + float coef2[10] = {11.0f, 12.0f, 13.0f, 14.0f , 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f}; + float rowMeanmedTable1_3_3[3] = {0}; + float rowMeanmedTable1_1_9[9] = {0}; + float rowMeanmedTable1_9_1[1] = {0}; + float rowMeanmedTable2_2_5[5] = {0}; + float rowMeanmedTable2_5_2[2] = {0}; + + printf("\n>>>> Row Mean Float Array Test\n"); + + [ 1 2 3 ] [10 11 12 ] + [ 4 5 6 ].*[ 1 2 3 ] => [ 49 80 117 ] + [ 7 8 9 ] [ 5 6 7 ] + + srowvariancefa(table1, 3, 3, coef1 , rowMeanmedTable1_3_3); + for ( i = 0 ; i < 3 ; ++i) { + printf("rowMeanmedTable1_3_3[%d] = %e\n", i, rowMeanmedTable1_3_3[i]); + } + assert( ( fabs(rowMeanmedTable1_3_3[0] ) - ( 49.0f / 16.0f ) ) / fabs ( rowMeanmedTable1_3_3[0] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable1_3_3[1] ) - ( 80.0f / 19.0f ) ) / fabs ( rowMeanmedTable1_3_3[1] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable1_3_3[2] ) - ( 117.0f / 22.0f ) ) / fabs ( rowMeanmedTable1_3_3[2] ) < 1e-6 ); + + + [ 1 ] + [ 2 ] + [ 3 ] + [ 4 ] + [ 5 ] => [ 1 2 3 4 5 6 7 8 9 ] + [ 6 ] + [ 7 ] + [ 8 ] + [ 9 ] + + srowvariancefa(table1, 1, 9, coef1, rowMeanmedTable1_1_9); + for ( i = 0 ; i < 9 ; ++i) { + printf("rowMeanmedTable1_1_9[%d] = %e\n", i, rowMeanmedTable1_1_9[i]); + assert(rowMeanmedTable1_1_9[i] == table1[i]); + } + + + [ 1 2 3 4 5 6 7 8 9 ] => [ 246 ] + + srowvariancefa(table1, 9, 1, coef1, rowMeanmedTable1_9_1); + assert( ( fabs(rowMeanmedTable1_9_1[0] ) - ( 246.0f / 57.0f ) ) / fabs ( rowMeanmedTable1_9_1[0] ) < 1e-6 ); + + + [ 1 3 5 7 9 ] .* [ 11 13 15 17 19 ] + [ 2 4 6 8 10 ] [ 12 14 16 18 20 ] => [ 3 7 11 15 19 ] + + srowvariancefa(table2, 2, 5, coef2, rowMeanmedTable2_2_5); + for ( i = 0 ; i < 5 ; ++i) { + printf("rowMeanmedTable2_2_5[%d] = %e\n", i, rowMeanmedTable2_2_5[i]); + } + assert( ( fabs(rowMeanmedTable2_2_5[0] ) - ( 35.0f / 23.0f ) ) / fabs ( rowMeanmedTable2_2_5[0] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[1] ) - ( 95.0f / 27.0f ) ) / fabs ( rowMeanmedTable2_2_5[1] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[2] ) - ( 171.0f / 31.0f ) ) / fabs ( rowMeanmedTable2_2_5[2] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[3] ) - ( 263.0f / 35.0f ) ) / fabs ( rowMeanmedTable2_2_5[3] ) < 1e-6 ); + assert( ( fabs(rowMeanmedTable2_2_5[4] ) - ( 371.0f / 39.0f ) ) / fabs ( rowMeanmedTable2_2_5[4] ) < 1e-6 ); + + + return 0; +} +*/ + +static int cvariancefsTest(void) { + + + printf("\n>>>> Mean Float Complex Scalar Test\n"); + assert( creals(cvariancefs(FloatComplex(3.0f, 3.0f),FloatComplex(3.0f, 0.0f);)) == 0.0f ); + assert( cimags(cvariancefs(FloatComplex(3.0f, 3.0f),FloatComplex(3.0f, 0.0f);)) == 0.0f ); + assert( creals(cvariancefs(FloatComplex(1.123456789f, 1.123456789f),FloatComplex(1.123456789f, 1.123456789f))) == 0.0f ); + assert( cimags(cvariancefs(FloatComplex(1.123456789f, 1.123456789f),FloatComplex(1.123456789f, 1.123456789f))) == 0.0f ); + + return 0; +} + + + +static int cvariancefaTest(void) { + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + floatComplex result =FloatComplex(0.0f , 0.0f); + + printf("\n>>>> Mean Float Complex Array Test\n"); + result = cvariancefa(table1, 9, coef1); + /*printf("\nresult : %lf \t+ %lf i " ,creals(result) ,cimags(result)) ;*/ + + assert( fabs(creals(result) - ( 1.3834586f ) ) / fabs ( creals(result) ) < 1e-6 ); + assert( fabs(cimags(result) - ( 9.6090226f ) ) / fabs ( cimags(result) ) < 1e-6 ); + + return 0; +} + +/* +static int crowvariancefaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 9); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 9); + + floatComplex rowMeanmedTable1_3_3[3] = {FloatComplex(0.0f, 0.0f)}; + + floatComplex rowMeanmedTable1_1_9[9] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable1_9_1[1] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_2_5[5] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_5_2[2] = {FloatComplex(0.0f, 0.0f)}; + + printf("\n>>>> Row variancef Float Complex Array Test\n"); + + + + crowvariancefa(table1 , 3 , 3 , coef1 , rowMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + + printf("rowMeanmedTable_3_3[%d] = %e + %ei\n", i, creals(rowMeanmedTable1_3_3[i]), cimags(rowMeanmedTable1_3_3[i])); + } + assert( ( fabs(cimags(rowMeanmedTable1_3_3[0]) ) - ( 27.0f / 16.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( ( fabs(creals(rowMeanmedTable1_3_3[0]) ) - ( 49.0f / 16.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( ( fabs(cimags(rowMeanmedTable1_3_3[1]) ) - ( 90.0f / 19.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( ( fabs(creals(rowMeanmedTable1_3_3[1]) ) - ( 80.0f / 19.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( ( fabs(cimags(rowMeanmedTable1_3_3[2]) ) - (171.0f / 22.0f ) ) / fabs ( cimags(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( ( fabs(creals(rowMeanmedTable1_3_3[2]) ) - (117.0f / 22.0f ) ) / fabs ( creals(rowMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} +*/ + + +/* +static int ccolumnvariancefaTest(void) { + + int i = 0 ; + + float tableR1[9] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f}; + float tableI1[9] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}; + float coefR1[9] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f}; + float coefI1[9] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + float tableR2[10] = {1.0f, 4.0f, 7.0f, 2.0f , 5.0f, 8.0f, 3.0f, 6.0f, 9.0f, 10.0f}; + float tableI2[10] = {1.0f, 2.0f, 3.0f, 4.0f , 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 15.0f}; + float coefR2[10] = {10.0f, 1.0f, 5.0f,11.0f , 2.0f, 6.0f,12.0f, 3.0f, 7.0f, 19.0f}; + float coefI2[10] = { 0.0f, 0.0f, 0.0f, 0.0f , 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}; + + floatComplex* table1 = FloatComplexMatrix (tableR1, tableI1, 9); + floatComplex* coef1 = FloatComplexMatrix (coefR1, coefI1, 9); + + floatComplex* table2 = FloatComplexMatrix (tableR2, tableI2, 9); + floatComplex* coef2 = FloatComplexMatrix (coefR2, coefI2, 9); + + floatComplex columnMeanmedTable1_3_3[3] = {FloatComplex(0.0f, 0.0f)}; + + floatComplex rowMeanmedTable1_1_9[9] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable1_9_1[1] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_2_5[5] = {FloatComplex(0.0f, 0.0f)}; + floatComplex rowMeanmedTable2_5_2[2] = {FloatComplex(0.0f, 0.0f)}; + + + printf("\n>>>> Column variancef Float Complex Array Test\n"); + + + + ccolumnvariancefa(table1 , 3 , 3 , coef1 , columnMeanmedTable1_3_3); + + for (i = 0 ; i < 3 ; ++i ) + { + printf("columnMeanmedTable_3_3[%d] = %e + %ei\n", i, creals(columnMeanmedTable1_3_3[i]), cimags(columnMeanmedTable1_3_3[i])); + } + assert( ( fabs(cimags(columnMeanmedTable1_3_3[0]) ) - (138.0f / 33.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + assert( ( fabs(creals(columnMeanmedTable1_3_3[0]) ) - ( 68.0f / 33.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[0]) ) < 1e-6 ); + + assert( ( fabs(cimags(columnMeanmedTable1_3_3[1]) ) - ( 36.0f / 6.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + assert( ( fabs(creals(columnMeanmedTable1_3_3[1]) ) - ( 32.0f / 6.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[1]) ) < 1e-6 ); + + assert( ( fabs(cimags(columnMeanmedTable1_3_3[2]) ) - (114.0f / 18.0f ) ) / fabs ( cimags(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + assert( ( fabs(creals(columnMeanmedTable1_3_3[2]) ) - (146.0f / 18.0f ) ) / fabs ( creals(columnMeanmedTable1_3_3[2]) ) < 1e-6 ); + + + + + return 0; +} + +*/ + +static int testvariancef(void) { + + svariancefsTest(); + svariancefaTest(); + /*scolumnvariancefaTest(); + srowvariancefaTest();*/ + cvariancefsTest(); + cvariancefaTest(); + /*crowvariancefaTest(); + ccolumnvariancefaTest(); +*/ + return 0; +} + +int main(void) { + assert(testvariancef() == 0); + return 0; +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/zcolumnvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/zcolumnvariancefa.c new file mode 100644 index 00000000..47fee75b --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/zcolumnvariancefa.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + +#include "variancef.h" +#include "matrixTranspose.h" + +void zcolumnvariancefa(doubleComplex *in1, int lines, int columns,doubleComplex *in2 , doubleComplex* out){ + + int i = 0 ; + + doubleComplex* transp = (doubleComplex*) malloc ( sizeof (doubleComplex) *(unsigned int) (lines*columns)); + + + + ztransposea ( in1 , lines , columns , transp ) ; + + + for ( i = 0; i < lines ; i++) + out[i] = zvariancefa ( transp + i*columns , columns, in2 ) ; + + + free (transp); + +} + diff --git a/2.3-1/src/c/statisticsFunctions/variancef/zrowvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/zrowvariancefa.c new file mode 100644 index 00000000..b39b2ee7 --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/zrowvariancefa.c @@ -0,0 +1,21 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" + +void zrowvariancefa(doubleComplex *in1, int lines, int columns,doubleComplex *in2, doubleComplex* out){ + + int i = 0 ; + + for ( i = 0; i < columns ; i++) + out[i] = zvariancefa ( in1 + i*lines , lines , in2 ) ; +} diff --git a/2.3-1/src/c/statisticsFunctions/variancef/zvariancefa.c b/2.3-1/src/c/statisticsFunctions/variancef/zvariancefa.c new file mode 100644 index 00000000..6de6f11a --- /dev/null +++ b/2.3-1/src/c/statisticsFunctions/variancef/zvariancefa.c @@ -0,0 +1,35 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "variancef.h" +#include "division.h" + +doubleComplex zvariancefa(doubleComplex *in1, int size, doubleComplex *in2) + +{ + int i = 0 ; + doubleComplex temp = DoubleComplex (0.0, 0.0 ); + doubleComplex accumulate =DoubleComplex (0.0, 0.0 ); + doubleComplex accumulateFre = DoubleComplex (0.0, 0.0 ); + + doubleComplex meanf = zmeanfa (in1 , size , in2); + for(i = 0 ; i < size ; ++i) + { + temp = zpows ( zdiffs (in1[i] , meanf ) ,DoubleComplex (2.0, 0.0 ) ); + temp = zmuls( in2[i] , temp); + + accumulate = zadds( temp , accumulate); + accumulateFre = zadds(in2[i ] ,accumulateFre ); + } + + return zrdivs(accumulate, zdiffs(accumulateFre ,DoubleComplex(1.0,0.0) )); +} diff --git a/2.3-1/src/c/string/Makefile.am b/2.3-1/src/c/string/Makefile.am new file mode 100644 index 00000000..9fc47f04 --- /dev/null +++ b/2.3-1/src/c/string/Makefile.am @@ -0,0 +1,17 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +SUBDIRS = disp \ + string + + + diff --git a/2.3-1/src/c/string/Makefile.in b/2.3-1/src/c/string/Makefile.in new file mode 100644 index 00000000..2593e26c --- /dev/null +++ b/2.3-1/src/c/string/Makefile.in @@ -0,0 +1,562 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/c/string +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = disp \ + string + +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/string/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/string/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/string/disp/Makefile.am b/2.3-1/src/c/string/disp/Makefile.am new file mode 100644 index 00000000..bafafee0 --- /dev/null +++ b/2.3-1/src/c/string/disp/Makefile.am @@ -0,0 +1,52 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libDisp_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/string/includes + +pkglib_LTLIBRARIES = libDisp.la + +libDisp_la_SOURCES = $(HEAD) $(SRC) + +SRC = sdisps.c \ + ddisps.c \ + cdisps.c \ + zdisps.c \ + sdispa.c \ + ddispa.c \ + cdispa.c \ + zdispa.c + +HEAD = ../includes/disp.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/string/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/string/disp/libDisp.la + +check_PROGRAMS = testDisp + +TESTS = testDisp + +# +# -*- Dispine Tests -*- +# +testDisp_SOURCES = testDisp.c +testDisp_CFLAGS = $(check_INCLUDES) +testDisp_LDADD = $(check_LDADD) + diff --git a/2.3-1/src/c/string/disp/Makefile.in b/2.3-1/src/c/string/disp/Makefile.in new file mode 100644 index 00000000..cb2362dc --- /dev/null +++ b/2.3-1/src/c/string/disp/Makefile.in @@ -0,0 +1,754 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDisp$(EXEEXT) +TESTS = testDisp$(EXEEXT) +subdir = src/c/string/disp +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libDisp_la_LIBADD = +am__objects_1 = +am__objects_2 = libDisp_la-sdisps.lo libDisp_la-ddisps.lo \ + libDisp_la-cdisps.lo libDisp_la-zdisps.lo libDisp_la-sdispa.lo \ + libDisp_la-ddispa.lo libDisp_la-cdispa.lo libDisp_la-zdispa.lo +am_libDisp_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libDisp_la_OBJECTS = $(am_libDisp_la_OBJECTS) +libDisp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libDisp_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testDisp_OBJECTS = testDisp-testDisp.$(OBJEXT) +testDisp_OBJECTS = $(am_testDisp_OBJECTS) +testDisp_DEPENDENCIES = $(check_LDADD) +testDisp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(testDisp_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDisp_la_SOURCES) $(testDisp_SOURCES) +DIST_SOURCES = $(libDisp_la_SOURCES) $(testDisp_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libDisp_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/string/includes + +pkglib_LTLIBRARIES = libDisp.la +libDisp_la_SOURCES = $(HEAD) $(SRC) +SRC = sdisps.c \ + ddisps.c \ + cdisps.c \ + zdisps.c \ + sdispa.c \ + ddispa.c \ + cdispa.c \ + zdispa.c + +HEAD = ../includes/disp.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/string/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + $(top_builddir)/src/c/string/disp/libDisp.la + + +# +# -*- Dispine Tests -*- +# +testDisp_SOURCES = testDisp.c +testDisp_CFLAGS = $(check_INCLUDES) +testDisp_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/string/disp/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/string/disp/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDisp.la: $(libDisp_la_OBJECTS) $(libDisp_la_DEPENDENCIES) + $(libDisp_la_LINK) -rpath $(pkglibdir) $(libDisp_la_OBJECTS) $(libDisp_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDisp$(EXEEXT): $(testDisp_OBJECTS) $(testDisp_DEPENDENCIES) + @rm -f testDisp$(EXEEXT) + $(testDisp_LINK) $(testDisp_OBJECTS) $(testDisp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-cdispa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-cdisps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-ddispa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-ddisps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-sdispa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-sdisps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-zdispa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDisp_la-zdisps.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDisp-testDisp.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libDisp_la-sdisps.lo: sdisps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-sdisps.lo -MD -MP -MF $(DEPDIR)/libDisp_la-sdisps.Tpo -c -o libDisp_la-sdisps.lo `test -f 'sdisps.c' || echo '$(srcdir)/'`sdisps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-sdisps.Tpo $(DEPDIR)/libDisp_la-sdisps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdisps.c' object='libDisp_la-sdisps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-sdisps.lo `test -f 'sdisps.c' || echo '$(srcdir)/'`sdisps.c + +libDisp_la-ddisps.lo: ddisps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-ddisps.lo -MD -MP -MF $(DEPDIR)/libDisp_la-ddisps.Tpo -c -o libDisp_la-ddisps.lo `test -f 'ddisps.c' || echo '$(srcdir)/'`ddisps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-ddisps.Tpo $(DEPDIR)/libDisp_la-ddisps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddisps.c' object='libDisp_la-ddisps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-ddisps.lo `test -f 'ddisps.c' || echo '$(srcdir)/'`ddisps.c + +libDisp_la-cdisps.lo: cdisps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-cdisps.lo -MD -MP -MF $(DEPDIR)/libDisp_la-cdisps.Tpo -c -o libDisp_la-cdisps.lo `test -f 'cdisps.c' || echo '$(srcdir)/'`cdisps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-cdisps.Tpo $(DEPDIR)/libDisp_la-cdisps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdisps.c' object='libDisp_la-cdisps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-cdisps.lo `test -f 'cdisps.c' || echo '$(srcdir)/'`cdisps.c + +libDisp_la-zdisps.lo: zdisps.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-zdisps.lo -MD -MP -MF $(DEPDIR)/libDisp_la-zdisps.Tpo -c -o libDisp_la-zdisps.lo `test -f 'zdisps.c' || echo '$(srcdir)/'`zdisps.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-zdisps.Tpo $(DEPDIR)/libDisp_la-zdisps.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdisps.c' object='libDisp_la-zdisps.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-zdisps.lo `test -f 'zdisps.c' || echo '$(srcdir)/'`zdisps.c + +libDisp_la-sdispa.lo: sdispa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-sdispa.lo -MD -MP -MF $(DEPDIR)/libDisp_la-sdispa.Tpo -c -o libDisp_la-sdispa.lo `test -f 'sdispa.c' || echo '$(srcdir)/'`sdispa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-sdispa.Tpo $(DEPDIR)/libDisp_la-sdispa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sdispa.c' object='libDisp_la-sdispa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-sdispa.lo `test -f 'sdispa.c' || echo '$(srcdir)/'`sdispa.c + +libDisp_la-ddispa.lo: ddispa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-ddispa.lo -MD -MP -MF $(DEPDIR)/libDisp_la-ddispa.Tpo -c -o libDisp_la-ddispa.lo `test -f 'ddispa.c' || echo '$(srcdir)/'`ddispa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-ddispa.Tpo $(DEPDIR)/libDisp_la-ddispa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ddispa.c' object='libDisp_la-ddispa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-ddispa.lo `test -f 'ddispa.c' || echo '$(srcdir)/'`ddispa.c + +libDisp_la-cdispa.lo: cdispa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-cdispa.lo -MD -MP -MF $(DEPDIR)/libDisp_la-cdispa.Tpo -c -o libDisp_la-cdispa.lo `test -f 'cdispa.c' || echo '$(srcdir)/'`cdispa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-cdispa.Tpo $(DEPDIR)/libDisp_la-cdispa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cdispa.c' object='libDisp_la-cdispa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-cdispa.lo `test -f 'cdispa.c' || echo '$(srcdir)/'`cdispa.c + +libDisp_la-zdispa.lo: zdispa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -MT libDisp_la-zdispa.lo -MD -MP -MF $(DEPDIR)/libDisp_la-zdispa.Tpo -c -o libDisp_la-zdispa.lo `test -f 'zdispa.c' || echo '$(srcdir)/'`zdispa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libDisp_la-zdispa.Tpo $(DEPDIR)/libDisp_la-zdispa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zdispa.c' object='libDisp_la-zdispa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDisp_la_CFLAGS) $(CFLAGS) -c -o libDisp_la-zdispa.lo `test -f 'zdispa.c' || echo '$(srcdir)/'`zdispa.c + +testDisp-testDisp.o: testDisp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDisp_CFLAGS) $(CFLAGS) -MT testDisp-testDisp.o -MD -MP -MF $(DEPDIR)/testDisp-testDisp.Tpo -c -o testDisp-testDisp.o `test -f 'testDisp.c' || echo '$(srcdir)/'`testDisp.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDisp-testDisp.Tpo $(DEPDIR)/testDisp-testDisp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDisp.c' object='testDisp-testDisp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDisp_CFLAGS) $(CFLAGS) -c -o testDisp-testDisp.o `test -f 'testDisp.c' || echo '$(srcdir)/'`testDisp.c + +testDisp-testDisp.obj: testDisp.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDisp_CFLAGS) $(CFLAGS) -MT testDisp-testDisp.obj -MD -MP -MF $(DEPDIR)/testDisp-testDisp.Tpo -c -o testDisp-testDisp.obj `if test -f 'testDisp.c'; then $(CYGPATH_W) 'testDisp.c'; else $(CYGPATH_W) '$(srcdir)/testDisp.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testDisp-testDisp.Tpo $(DEPDIR)/testDisp-testDisp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testDisp.c' object='testDisp-testDisp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testDisp_CFLAGS) $(CFLAGS) -c -o testDisp-testDisp.obj `if test -f 'testDisp.c'; then $(CYGPATH_W) 'testDisp.c'; else $(CYGPATH_W) '$(srcdir)/testDisp.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/string/disp/cdispa.c b/2.3-1/src/c/string/disp/cdispa.c new file mode 100644 index 00000000..8cf8152d --- /dev/null +++ b/2.3-1/src/c/string/disp/cdispa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "disp.h" + +double cdispa (floatComplex* in, int rows, int columns) { + int i = 0,j = 0; + + for (i = 0; i < rows; ++i) { + for (j=0;j +#include +#include "disp.h" + + +#define SIZE 10000 + +/* +** \float scalars displaying test +*/ +static void sdispaTest (void) { + + int i = 0 ; + float tabF[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = (float) rand () ; + } + + sdispa ( tabF, 1, SIZE ); +} + +/* +** \double scalars displaying test +*/ + +static void ddispaTest (void) { + + int i = 0 ; + double tabD[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = (double) rand () ; + } + + ddispa ( tabD, 1, SIZE ) ; + +} + + +/* +** \float complexes displaying test +*/ +static void cdispaTest (void) { + + int i = 0 ; + floatComplex tabF[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = FloatComplex ((float) rand (), (float) rand()); + } + + cdispa ( tabF, 1, SIZE ) ; +} + + + +/* +** \double complexes displaying test +*/ +static void zdispaTest (void) { + + int i = 0 ; + doubleComplex tabD[SIZE] ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = DoubleComplex ((double) rand (), (double) rand()); + } + + zdispa ( tabD, 1, SIZE ) ; + +} + + + +static int testDisp (void) { + + printf("\n>>>> Disp Tests\n"); + sdispaTest(); + ddispaTest(); + cdispaTest(); + zdispaTest(); + + return 0; +} + + +int main(void) { + assert(testDisp() == 0); + return 0; +} diff --git a/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj b/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj new file mode 100644 index 00000000..c0b76e7c --- /dev/null +++ b/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {432917E4-F042-47B2-BF43-0C376883A7E6} + testDisp + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {38a141f2-df77-4032-a17c-0901ea1a7af1} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj.filters b/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj.filters new file mode 100644 index 00000000..51089028 --- /dev/null +++ b/2.3-1/src/c/string/disp/test_Disp/testDisp.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/disp/zdispa.c b/2.3-1/src/c/string/disp/zdispa.c new file mode 100644 index 00000000..5d085d32 --- /dev/null +++ b/2.3-1/src/c/string/disp/zdispa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "disp.h" + +double zdispa (doubleComplex* in, int rows, int columns){ + int i = 0,j = 0; + + for (i = 0; i < rows; ++i) { + for (j=0;j +#include "dynlib_string.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif +/* +** \brief display of a float scalar +*/ +EXTERN_STRING double sdisps (float in); + +/* +** \brief display of a double scalar +*/ +EXTERN_STRING double ddisps (double in); + +/* +** \brief display of a float complex +*/ +EXTERN_STRING double cdisps (floatComplex in); + +/* +** \brief display of a double complex +*/ +EXTERN_STRING double zdisps (doubleComplex in); + +/* +** \brief display of a float scalar array +** \param in the float scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double sdispa (float* in, int rows, int columns); + +/* +** \brief display of a double scalar array +** \param in the double scalar array to display +** \param size the size of the array +*/ +EXTERN_STRING double ddispa (double* in, int rows, int columns); + +/* +** \brief display of a float complex array +** \param in the float complex array to display +** \param size the size of the array +*/ +EXTERN_STRING double cdispa (floatComplex* in, int rows, int columns); + +/* +** \brief display of a double complex array +** \param in the double complex array to display +** \param size the size of the array +*/ +EXTERN_STRING double zdispa (doubleComplex* in, int rows, int columns); + + +EXTERN_STRING double ddisph (double *in, int rows, int cols, int levels); + +EXTERN_STRING double g2dispd0(char *array,int* tmparraysize); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__DISP_H__ */ diff --git a/2.3-1/src/c/string/includes/dynlib_string.h b/2.3-1/src/c/string/includes/dynlib_string.h new file mode 100644 index 00000000..ca11ce10 --- /dev/null +++ b/2.3-1/src/c/string/includes/dynlib_string.h @@ -0,0 +1,27 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_STRING_H__ +#define __DYNLIB_STRING_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if STRING_EXPORTS + #define EXTERN_STRING __declspec (dllexport) + #else + #define EXTERN_STRING __declspec (dllimport) + #endif +#else + #define EXTERN_STRING +#endif + +#endif /* __DYNLIB_STRING_H__ */ + diff --git a/2.3-1/src/c/string/includes/str.h b/2.3-1/src/c/string/includes/str.h new file mode 100644 index 00000000..434c68e0 --- /dev/null +++ b/2.3-1/src/c/string/includes/str.h @@ -0,0 +1,88 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + + + +#ifndef __STR_H__ +#define __STR_H__ + +#include +#include "dynlib_string.h" +#include "floatComplex.h" +#include "doubleComplex.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** \brief convert of a float scalar into a char array +** \param in the float scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void sstrings (float in, char* out); + +/* +** \brief convert of a double scalar into a char array +** \param in the double scalar to convert +** \param out the output char array +*/ +EXTERN_STRING void dstrings (double in, char* out); + +/* +** \brief convert of a float complex into a char array +** \param in the float complex to convert +** \param out the output char array +*/ +EXTERN_STRING void cstrings (floatComplex in, char* out); + +/* +** \brief convert of a double complex into a char array +** \param in the double complex to convert +** \param out the output char array +*/ +EXTERN_STRING void zstrings (doubleComplex in, char* out); + + +/* +** \brief convert of a float scalar array into an array of char arrays +** \param in the float scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void sstringa (float* in, int size, char** out); + +/* +** \brief convert of a double scalar array into an array of char arrays +** \param in the double scalar array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void dstringa (double* in, int size, char** out); + +/* +** \brief convert of a float complex array into an array of char arrays +** \param in the float complex array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void cstringa (floatComplex* in, int size, char** out ); + +/* +** \brief convert of a double complex array into an array of char arrays +** \param in the double complex array to convert +** \param out the output array of char arrays +*/ +EXTERN_STRING void zstringa (doubleComplex* in, int size, char** out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* !__STR_H__ */ diff --git a/2.3-1/src/c/string/interfaces/int_disp.h b/2.3-1/src/c/string/interfaces/int_disp.h new file mode 100644 index 00000000..57f7bd45 --- /dev/null +++ b/2.3-1/src/c/string/interfaces/int_disp.h @@ -0,0 +1,44 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_DISP_H__ +#define __INT_DISP_H__ + +#include + +#define s0dispd0(in) sdisps(in) + +#define d0dispd0(in) ddisps(in) + +#define c0dispd0(in) cdisps(in) + +#define z0dispd0(in) zdisps(in) + +#define s2dispd0(in,size) sdispa(in,size[0],size[1]) + +#define d2dispd0(in,size) ddispa(in,size[0],size[1]) + +#define c2dispd0(in,size) cdispa(in,size[0],size[1]) + +#define z2dispd0(in,size) zdispa(in,size[0],size[1]) + +#define d3dispd0(in,size) ddisph(in,size[0],size[1],size[2]) + +#define g2dispd0(in, size) printf("%s\n",in) + +#endif /* __INT_DISP_H__ */ + + + + diff --git a/2.3-1/src/c/string/string.vcxproj b/2.3-1/src/c/string/string.vcxproj new file mode 100644 index 00000000..06706215 --- /dev/null +++ b/2.3-1/src/c/string/string.vcxproj @@ -0,0 +1,276 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {38A141F2-DF77-4032-A17C-0901EA1A7AF1} + string + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + includes;../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;STRING_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + Disabled + includes;../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;STRING_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(ProjectName).lib + + + + + MaxSpeed + true + includes;../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;STRING_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + MachineX86 + + + + + MaxSpeed + true + includes;../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;STRING_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(ProjectName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/string.vcxproj.filters b/2.3-1/src/c/string/string.vcxproj.filters new file mode 100644 index 00000000..8309e230 --- /dev/null +++ b/2.3-1/src/c/string/string.vcxproj.filters @@ -0,0 +1,89 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {b94a802b-46a2-4208-b7c2-982395b9a4a0} + + + {03649445-c48f-4716-b559-21d648261a80} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\disp + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + Source Files\string + + + + + Source Files\disp + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/string/Makefile.am b/2.3-1/src/c/string/string/Makefile.am new file mode 100644 index 00000000..708118f3 --- /dev/null +++ b/2.3-1/src/c/string/string/Makefile.am @@ -0,0 +1,52 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2008-2008 - INRIA - Allan SIMON +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +libString_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/string/includes + +pkglib_LTLIBRARIES = libString.la + +libString_la_SOURCES = $(HEAD) $(SRC) + +SRC = sstrings.c \ + dstrings.c \ + cstrings.c \ + zstrings.c \ + sstringa.c \ + dstringa.c \ + cstringa.c \ + zstringa.c + +HEAD = ../includes/string.h + +#### +# Checking Part +#### + +check_INCLUDES = -I $(top_builddir)/src/c/string/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libString.la + +check_PROGRAMS = testString + +TESTS = testString + +# +# -*- Dispine Tests -*- +# +testString_SOURCES = testString.c +testString_CFLAGS = $(check_INCLUDES) +testString_LDADD = $(check_LDADD) + diff --git a/2.3-1/src/c/string/string/Makefile.am.bak b/2.3-1/src/c/string/string/Makefile.am.bak new file mode 100644 index 00000000..b4f449a5 --- /dev/null +++ b/2.3-1/src/c/string/string/Makefile.am.bak @@ -0,0 +1,3 @@ +## File created by the gnome-build tools + + diff --git a/2.3-1/src/c/string/string/Makefile.in b/2.3-1/src/c/string/string/Makefile.in new file mode 100644 index 00000000..8799f20d --- /dev/null +++ b/2.3-1/src/c/string/string/Makefile.in @@ -0,0 +1,755 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testString$(EXEEXT) +TESTS = testString$(EXEEXT) +subdir = src/c/string/string +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libString_la_LIBADD = +am__objects_1 = +am__objects_2 = libString_la-sstrings.lo libString_la-dstrings.lo \ + libString_la-cstrings.lo libString_la-zstrings.lo \ + libString_la-sstringa.lo libString_la-dstringa.lo \ + libString_la-cstringa.lo libString_la-zstringa.lo +am_libString_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libString_la_OBJECTS = $(am_libString_la_OBJECTS) +libString_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libString_la_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am_testString_OBJECTS = testString-testString.$(OBJEXT) +testString_OBJECTS = $(am_testString_OBJECTS) +testString_DEPENDENCIES = $(check_LDADD) +testString_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(testString_CFLAGS) \ + $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libString_la_SOURCES) $(testString_SOURCES) +DIST_SOURCES = $(libString_la_SOURCES) $(testString_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +libString_la_CFLAGS = -I $(top_builddir)/src/c/type \ + -I $(top_builddir)/src/c/string/includes + +pkglib_LTLIBRARIES = libString.la +libString_la_SOURCES = $(HEAD) $(SRC) +SRC = sstrings.c \ + dstrings.c \ + cstrings.c \ + zstrings.c \ + sstringa.c \ + dstringa.c \ + cstringa.c \ + zstringa.c + +HEAD = ../includes/string.h + +#### +# Checking Part +#### +check_INCLUDES = -I $(top_builddir)/src/c/string/includes \ + -I $(top_builddir)/src/c/type + +check_LDADD = $(top_builddir)/src/c/type/libDoubleComplex.la \ + $(top_builddir)/src/c/type/libFloatComplex.la \ + libString.la + + +# +# -*- Dispine Tests -*- +# +testString_SOURCES = testString.c +testString_CFLAGS = $(check_INCLUDES) +testString_LDADD = $(check_LDADD) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/string/string/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/string/string/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libString.la: $(libString_la_OBJECTS) $(libString_la_DEPENDENCIES) + $(libString_la_LINK) -rpath $(pkglibdir) $(libString_la_OBJECTS) $(libString_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testString$(EXEEXT): $(testString_OBJECTS) $(testString_DEPENDENCIES) + @rm -f testString$(EXEEXT) + $(testString_LINK) $(testString_OBJECTS) $(testString_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-cstringa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-cstrings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-dstringa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-dstrings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-sstringa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-sstrings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-zstringa.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libString_la-zstrings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testString-testString.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +libString_la-sstrings.lo: sstrings.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-sstrings.lo -MD -MP -MF $(DEPDIR)/libString_la-sstrings.Tpo -c -o libString_la-sstrings.lo `test -f 'sstrings.c' || echo '$(srcdir)/'`sstrings.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-sstrings.Tpo $(DEPDIR)/libString_la-sstrings.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sstrings.c' object='libString_la-sstrings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-sstrings.lo `test -f 'sstrings.c' || echo '$(srcdir)/'`sstrings.c + +libString_la-dstrings.lo: dstrings.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-dstrings.lo -MD -MP -MF $(DEPDIR)/libString_la-dstrings.Tpo -c -o libString_la-dstrings.lo `test -f 'dstrings.c' || echo '$(srcdir)/'`dstrings.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-dstrings.Tpo $(DEPDIR)/libString_la-dstrings.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dstrings.c' object='libString_la-dstrings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-dstrings.lo `test -f 'dstrings.c' || echo '$(srcdir)/'`dstrings.c + +libString_la-cstrings.lo: cstrings.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-cstrings.lo -MD -MP -MF $(DEPDIR)/libString_la-cstrings.Tpo -c -o libString_la-cstrings.lo `test -f 'cstrings.c' || echo '$(srcdir)/'`cstrings.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-cstrings.Tpo $(DEPDIR)/libString_la-cstrings.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cstrings.c' object='libString_la-cstrings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-cstrings.lo `test -f 'cstrings.c' || echo '$(srcdir)/'`cstrings.c + +libString_la-zstrings.lo: zstrings.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-zstrings.lo -MD -MP -MF $(DEPDIR)/libString_la-zstrings.Tpo -c -o libString_la-zstrings.lo `test -f 'zstrings.c' || echo '$(srcdir)/'`zstrings.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-zstrings.Tpo $(DEPDIR)/libString_la-zstrings.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zstrings.c' object='libString_la-zstrings.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-zstrings.lo `test -f 'zstrings.c' || echo '$(srcdir)/'`zstrings.c + +libString_la-sstringa.lo: sstringa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-sstringa.lo -MD -MP -MF $(DEPDIR)/libString_la-sstringa.Tpo -c -o libString_la-sstringa.lo `test -f 'sstringa.c' || echo '$(srcdir)/'`sstringa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-sstringa.Tpo $(DEPDIR)/libString_la-sstringa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sstringa.c' object='libString_la-sstringa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-sstringa.lo `test -f 'sstringa.c' || echo '$(srcdir)/'`sstringa.c + +libString_la-dstringa.lo: dstringa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-dstringa.lo -MD -MP -MF $(DEPDIR)/libString_la-dstringa.Tpo -c -o libString_la-dstringa.lo `test -f 'dstringa.c' || echo '$(srcdir)/'`dstringa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-dstringa.Tpo $(DEPDIR)/libString_la-dstringa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='dstringa.c' object='libString_la-dstringa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-dstringa.lo `test -f 'dstringa.c' || echo '$(srcdir)/'`dstringa.c + +libString_la-cstringa.lo: cstringa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-cstringa.lo -MD -MP -MF $(DEPDIR)/libString_la-cstringa.Tpo -c -o libString_la-cstringa.lo `test -f 'cstringa.c' || echo '$(srcdir)/'`cstringa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-cstringa.Tpo $(DEPDIR)/libString_la-cstringa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cstringa.c' object='libString_la-cstringa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-cstringa.lo `test -f 'cstringa.c' || echo '$(srcdir)/'`cstringa.c + +libString_la-zstringa.lo: zstringa.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -MT libString_la-zstringa.lo -MD -MP -MF $(DEPDIR)/libString_la-zstringa.Tpo -c -o libString_la-zstringa.lo `test -f 'zstringa.c' || echo '$(srcdir)/'`zstringa.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libString_la-zstringa.Tpo $(DEPDIR)/libString_la-zstringa.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='zstringa.c' object='libString_la-zstringa.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libString_la_CFLAGS) $(CFLAGS) -c -o libString_la-zstringa.lo `test -f 'zstringa.c' || echo '$(srcdir)/'`zstringa.c + +testString-testString.o: testString.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testString_CFLAGS) $(CFLAGS) -MT testString-testString.o -MD -MP -MF $(DEPDIR)/testString-testString.Tpo -c -o testString-testString.o `test -f 'testString.c' || echo '$(srcdir)/'`testString.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testString-testString.Tpo $(DEPDIR)/testString-testString.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testString.c' object='testString-testString.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testString_CFLAGS) $(CFLAGS) -c -o testString-testString.o `test -f 'testString.c' || echo '$(srcdir)/'`testString.c + +testString-testString.obj: testString.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testString_CFLAGS) $(CFLAGS) -MT testString-testString.obj -MD -MP -MF $(DEPDIR)/testString-testString.Tpo -c -o testString-testString.obj `if test -f 'testString.c'; then $(CYGPATH_W) 'testString.c'; else $(CYGPATH_W) '$(srcdir)/testString.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/testString-testString.Tpo $(DEPDIR)/testString-testString.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testString.c' object='testString-testString.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testString_CFLAGS) $(CFLAGS) -c -o testString-testString.obj `if test -f 'testString.c'; then $(CYGPATH_W) 'testString.c'; else $(CYGPATH_W) '$(srcdir)/testString.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/string/string/cstringa.c b/2.3-1/src/c/string/string/cstringa.c new file mode 100644 index 00000000..6b600f48 --- /dev/null +++ b/2.3-1/src/c/string/string/cstringa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include "str.h" + +void cstringa (floatComplex* in, int size ,char** out){ + + int i = 0; + for (i = 0; i < size; ++i) + { + cstrings (in[i], out[i]); + } + + +} diff --git a/2.3-1/src/c/string/string/cstrings.c b/2.3-1/src/c/string/string/cstrings.c new file mode 100644 index 00000000..e9d3504b --- /dev/null +++ b/2.3-1/src/c/string/string/cstrings.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ +#include +#include "str.h" + +void cstrings (floatComplex in, char* out) { + + float RealIn = creals(in); + float ImgIn = cimags(in); + + sprintf ( out, "%5.20e + %5.20ei" ,RealIn ,ImgIn ); + +} diff --git a/2.3-1/src/c/string/string/dstringa.c b/2.3-1/src/c/string/string/dstringa.c new file mode 100644 index 00000000..1d10f861 --- /dev/null +++ b/2.3-1/src/c/string/string/dstringa.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "str.h" + +void dstringa (double* in, int size, char** out){ + + int i = 0; + for (i = 0; i < size; ++i) + { + dstrings (in[i], out[i]); + } +} diff --git a/2.3-1/src/c/string/string/dstrings.c b/2.3-1/src/c/string/string/dstrings.c new file mode 100644 index 00000000..6a178a73 --- /dev/null +++ b/2.3-1/src/c/string/string/dstrings.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "str.h" + +void dstrings (double in, char* out) { + + sprintf (out, "%5.20e" ,in ); +} diff --git a/2.3-1/src/c/string/string/sstringa.c b/2.3-1/src/c/string/string/sstringa.c new file mode 100644 index 00000000..0206d6a9 --- /dev/null +++ b/2.3-1/src/c/string/string/sstringa.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "str.h" + +void sstringa (float* in, int size, char** out){ + + int i = 0; + for (i = 0; i < size; ++i) + { + sstrings (in[i], out[i]); + } +} diff --git a/2.3-1/src/c/string/string/sstrings.c b/2.3-1/src/c/string/string/sstrings.c new file mode 100644 index 00000000..25daa8d6 --- /dev/null +++ b/2.3-1/src/c/string/string/sstrings.c @@ -0,0 +1,19 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "str.h" + +void sstrings (float in, char* out) { + + sprintf (out, "%5.20e" ,in ); +} diff --git a/2.3-1/src/c/string/string/testString.c b/2.3-1/src/c/string/string/testString.c new file mode 100644 index 00000000..765af263 --- /dev/null +++ b/2.3-1/src/c/string/string/testString.c @@ -0,0 +1,238 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan Simon + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include +#include +#include "str.h" +#define SIZE 10000 + +/* +** \floating scalars test +*/ +static void sstringaTest (void) { + float tabF[SIZE]; + float tabF2[SIZE]; + char** tabC = NULL ; + int i = 0 ; + + printf("\n>>>> sstringaTest Tests\n"); + + tabC = (char**)malloc( SIZE *sizeof(char*)); + + for ( i=0;i< SIZE ; ++i ) + { + tabC[i] = (char *)malloc( 26 * sizeof(char)); + } + + srand( 1 ) ; + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = (float) rand () ; + } + +/* call to the function to test */ + sstringa ( tabF , SIZE , tabC ) ; + +/* reverse convertion*/ + for ( i = 0 ; i < SIZE ; ++i) + { + sscanf ( tabC[i] , "%e" , &(tabF2[i]) ) ; + } + +/* and we compare if the initial and final floats are equal */ + + for ( i = 0 ; i < SIZE ; ++i) + { + assert ( fabs( tabF[i] - tabF2[i]) / ( fabs ( tabF[i] )) < 1e-07 ) ; + } + + + +} + + +/* +** \double scalars test +*/ + +static void dstringaTest (void) { + double tabD[SIZE]; + double tabD2[SIZE]; + char** tabC = NULL ; + int i = 0 ; + + srand( 1 ) ; + + printf("\n>>>> dstringaTest Tests\n"); + + tabC = (char**)malloc( SIZE *sizeof(char*)); + + for ( i=0;i< SIZE ; ++i ) + { + tabC[i] = (char *)malloc( 26 * sizeof(char)); + } + + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = (double) rand () ; + } + +/* call to the function to test */ + + dstringa ( tabD , SIZE , tabC ) ; +/* reverse convertion*/ + for ( i = 0 ; i < SIZE ; ++i) + { + + tabD2[i] = strtod (tabC[i] , NULL); + + } + +/* and we compare if the initial and final doubles are equal */ + + for ( i = 0 ; i < SIZE ; ++i) + { + assert ( fabs( tabD[i] - tabD2[i]) / ( fabs ( tabD[i] )) < 1e-16 ) ; + } + + + +} + + +/* +** \complex floats test +*/ + +static void cstringaTest (void) { + floatComplex tabF[SIZE]; + floatComplex tabF2[SIZE] ; + float img ; + float real ; + char** tabC = NULL ; + + int i = 0 ; + + srand( 1 ) ; + + printf("\n>>>> cstringaTest Tests\n"); + tabC = (char**)malloc( SIZE *sizeof(char*)); + + for ( i=0;i< SIZE ; ++i ) + { + tabC[i] = (char *)malloc( 53 * sizeof(char)); + } + + for ( i = 0 ; i < SIZE ; ++i) + { + tabF[i] = FloatComplex ((float) rand (), (float) rand()); + } + + + cstringa ( tabF , SIZE , tabC ) ; + +/* reverse convertion*/ + + for ( i = 0 ; i < SIZE ; ++i) + { + sscanf (tabC[i] , "%e + %e" , &real , &img ); + + + tabF2[i] = FloatComplex (real ,img ); + } + + +/* and we compare if the initial and final floats are equal */ + + + for ( i = 0 ; i < SIZE ; ++i) + { + assert ( fabs( creals(tabF2[i]) - creals (tabF[i]) ) / fabs (creals (tabF[i])) < 1e-07 ); + assert ( fabs( cimags(tabF2[i]) - cimags (tabF[i]) ) / fabs (cimags (tabF[i])) < 1e-07 ) ; + } + + + +} + + +/* +** \double 07 test +*/ +static void zstringaTest (void) { + doubleComplex tabD[SIZE]; + doubleComplex tabD2[SIZE] ; + double img ; + double real ; + char* temp = NULL ; + char** tabC = NULL ; + + int i = 0 ; + + srand( 1 ) ; + + printf("\n>>>> zstringaTest Tests\n"); + + tabC = (char**)malloc( SIZE *sizeof(char*)); + + for ( i=0;i< SIZE ; ++i ) + { + tabC[i] = (char *)malloc( 53 * sizeof(char)); + } + + + for ( i = 0 ; i < SIZE ; ++i) + { + tabD[i] = DoubleComplex ((double) rand (), (double) rand()); + } + + zstringa ( tabD , SIZE , tabC ) ; + +/* reverse convertion*/ + for ( i = 0 ; i < SIZE ; ++i) + { + real = (double) strtod (tabC[i] ,&temp ); + img = (double) strtod (temp + 3 ,NULL ); + + tabD2[i] = DoubleComplex (real ,img ); + } +/* and we compare if the initial and final doubles are equal */ + + for ( i = 0 ; i < SIZE ; ++i) + { + assert ( fabs( zreals(tabD2[i]) - zreals (tabD[i]) ) / fabs (zreals (tabD[i])) < 1e-16 ); + assert ( fabs( zimags(tabD2[i]) - zimags (tabD[i]) ) / fabs (zimags (tabD[i])) < 1e-16 ); + } + + +} + +static int testString (void) { + + printf("\n>>>> String Tests\n"); + sstringaTest(); + dstringaTest(); + cstringaTest(); + zstringaTest(); + + return 0; +} + +int main(void) { + assert(testString() == 0); + return 0; +} diff --git a/2.3-1/src/c/string/string/test_String/testString.vcxproj b/2.3-1/src/c/string/string/test_String/testString.vcxproj new file mode 100644 index 00000000..6cb95238 --- /dev/null +++ b/2.3-1/src/c/string/string/test_String/testString.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {DF010F03-718D-4CEF-BD03-5E2C9C47613D} + testString + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../../includes;../../../type;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + {38a141f2-df77-4032-a17c-0901ea1a7af1} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/string/test_String/testString.vcxproj.filters b/2.3-1/src/c/string/string/test_String/testString.vcxproj.filters new file mode 100644 index 00000000..95101ab6 --- /dev/null +++ b/2.3-1/src/c/string/string/test_String/testString.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/string/string/zstringa.c b/2.3-1/src/c/string/string/zstringa.c new file mode 100644 index 00000000..29ce0b26 --- /dev/null +++ b/2.3-1/src/c/string/string/zstringa.c @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "str.h" + +void zstringa (doubleComplex* in, int size, char** out){ + + int i = 0; + for (i = 0; i < size; ++i) + { + zstrings (in[i], out[i]); + } +} + diff --git a/2.3-1/src/c/string/string/zstrings.c b/2.3-1/src/c/string/string/zstrings.c new file mode 100644 index 00000000..8db08aa1 --- /dev/null +++ b/2.3-1/src/c/string/string/zstrings.c @@ -0,0 +1,22 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include "str.h" + +void zstrings (doubleComplex in, char* out) { + + double RealIn = zreals(in); + double ImgIn = zimags(in); + + sprintf (out, "%5.20e + %5.20ei" ,RealIn ,ImgIn ); +} diff --git a/2.3-1/src/c/type/Makefile.am b/2.3-1/src/c/type/Makefile.am new file mode 100644 index 00000000..6fd65ea2 --- /dev/null +++ b/2.3-1/src/c/type/Makefile.am @@ -0,0 +1,37 @@ +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2006-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libDoubleComplex.la libFloatComplex.la + +libDoubleComplex_la_SOURCES = $(DCHEAD) $(DCSRC) + +libFloatComplex_la_SOURCES = $(FCHEAD) $(FCSRC) + +check_PROGRAMS = testDoubleComplex testFloatComplex + +testDoubleComplex_SOURCES = testDoubleComplex.c +testDoubleComplex_LDADD = libDoubleComplex.la + +testFloatComplex_SOURCES = testFloatComplex.c +testFloatComplex_LDADD = libFloatComplex.la + +TESTS = testDoubleComplex testFloatComplex + +### Double Complex +DCSRC = doubleComplex.c +DCHEAD = doubleComplex.h + +### Float Complex +FCSRC = floatComplex.c +FCHEAD = floatComplex.h diff --git a/2.3-1/src/c/type/Makefile.in b/2.3-1/src/c/type/Makefile.in new file mode 100644 index 00000000..7f673156 --- /dev/null +++ b/2.3-1/src/c/type/Makefile.in @@ -0,0 +1,669 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +check_PROGRAMS = testDoubleComplex$(EXEEXT) testFloatComplex$(EXEEXT) +TESTS = testDoubleComplex$(EXEEXT) testFloatComplex$(EXEEXT) +subdir = src/c/type +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libDoubleComplex_la_LIBADD = +am__objects_1 = +am__objects_2 = doubleComplex.lo +am_libDoubleComplex_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libDoubleComplex_la_OBJECTS = $(am_libDoubleComplex_la_OBJECTS) +libFloatComplex_la_LIBADD = +am__objects_3 = floatComplex.lo +am_libFloatComplex_la_OBJECTS = $(am__objects_1) $(am__objects_3) +libFloatComplex_la_OBJECTS = $(am_libFloatComplex_la_OBJECTS) +am_testDoubleComplex_OBJECTS = testDoubleComplex.$(OBJEXT) +testDoubleComplex_OBJECTS = $(am_testDoubleComplex_OBJECTS) +testDoubleComplex_DEPENDENCIES = libDoubleComplex.la +am_testFloatComplex_OBJECTS = testFloatComplex.$(OBJEXT) +testFloatComplex_OBJECTS = $(am_testFloatComplex_OBJECTS) +testFloatComplex_DEPENDENCIES = libFloatComplex.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libDoubleComplex_la_SOURCES) $(libFloatComplex_la_SOURCES) \ + $(testDoubleComplex_SOURCES) $(testFloatComplex_SOURCES) +DIST_SOURCES = $(libDoubleComplex_la_SOURCES) \ + $(libFloatComplex_la_SOURCES) $(testDoubleComplex_SOURCES) \ + $(testFloatComplex_SOURCES) +ETAGS = etags +CTAGS = ctags +am__tty_colors = \ +red=; grn=; lgn=; blu=; std= +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libDoubleComplex.la libFloatComplex.la +libDoubleComplex_la_SOURCES = $(DCHEAD) $(DCSRC) +libFloatComplex_la_SOURCES = $(FCHEAD) $(FCSRC) +testDoubleComplex_SOURCES = testDoubleComplex.c +testDoubleComplex_LDADD = libDoubleComplex.la +testFloatComplex_SOURCES = testFloatComplex.c +testFloatComplex_LDADD = libFloatComplex.la + +### Double Complex +DCSRC = doubleComplex.c +DCHEAD = doubleComplex.h + +### Float Complex +FCSRC = floatComplex.c +FCHEAD = floatComplex.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/c/type/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/c/type/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libDoubleComplex.la: $(libDoubleComplex_la_OBJECTS) $(libDoubleComplex_la_DEPENDENCIES) + $(LINK) -rpath $(pkglibdir) $(libDoubleComplex_la_OBJECTS) $(libDoubleComplex_la_LIBADD) $(LIBS) +libFloatComplex.la: $(libFloatComplex_la_OBJECTS) $(libFloatComplex_la_DEPENDENCIES) + $(LINK) -rpath $(pkglibdir) $(libFloatComplex_la_OBJECTS) $(libFloatComplex_la_LIBADD) $(LIBS) + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +testDoubleComplex$(EXEEXT): $(testDoubleComplex_OBJECTS) $(testDoubleComplex_DEPENDENCIES) + @rm -f testDoubleComplex$(EXEEXT) + $(LINK) $(testDoubleComplex_OBJECTS) $(testDoubleComplex_LDADD) $(LIBS) +testFloatComplex$(EXEEXT): $(testFloatComplex_OBJECTS) $(testFloatComplex_DEPENDENCIES) + @rm -f testFloatComplex$(EXEEXT) + $(LINK) $(testFloatComplex_OBJECTS) $(testFloatComplex_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doubleComplex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatComplex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testDoubleComplex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testFloatComplex.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + col=$$red; res=XPASS; \ + ;; \ + *) \ + col=$$grn; res=PASS; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$tst[\ \ ]*) \ + xfail=`expr $$xfail + 1`; \ + col=$$lgn; res=XFAIL; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + col=$$red; res=FAIL; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + col=$$blu; res=SKIP; \ + fi; \ + echo "$${col}$$res$${std}: $$tst"; \ + done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="$$All$$all $$tests passed"; \ + else \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all $$tests failed"; \ + else \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + if test "$$failed" -eq 0; then \ + echo "$$grn$$dashes"; \ + else \ + echo "$$red$$dashes"; \ + fi; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes$$std"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-pkglibLTLIBRARIES install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/c/type/doubleComplex.c b/2.3-1/src/c/type/doubleComplex.c new file mode 100644 index 00000000..72460495 --- /dev/null +++ b/2.3-1/src/c/type/doubleComplex.c @@ -0,0 +1,138 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#include +#include "doubleComplex.h" + +#ifndef STDC99 +/* +** \function zreals +** \brief Return a Complex Real Part . +*/ +double zreals(doubleComplex z) { + return z.real; +} + +/* +** \function zimags +** \brief Return a Complex Imaginary Part . +*/ +double zimags(doubleComplex z) { + return z.imag; +} +#else +/* +** \function zreals +** \brief Return a Complex Real Part . +*/ +double zreals(doubleComplex z) { + return creal(z); +} + +/* +** \function zimags +** \brief Return a Complex Imaginary Part . +*/ +double zimags(doubleComplex z) { + return cimag(z); +} +#endif + +/* +** \function creala +** \brief Return a Complex Real Part array. +*/ +void zreala(doubleComplex* z, int size, double* out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) + { + out[i] = zreals(z[i]); + } +} + +/* +** \function cimaga +** \brief Return a Complex Imaginary Part array. +*/ +void zimaga(doubleComplex* z, int size, double* out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) + { + out[i] = zimags(z[i]); + } +} + +/* +** \function DoubleComplex +** \brief construct a Double Complex . +*/ +doubleComplex DoubleComplex(double real, double imag) { + doubleComplex z; +#ifndef STDC99 + z.real = real; + z.imag = imag; +#else + z = real + I * imag; +#endif + return z; +} + +/* +** \function DoubleComplexMatrix +** \brief construct a Double Complex Matrix. +*/ +doubleComplex *DoubleComplexMatrix(double* real, double* imag, int size) { + doubleComplex *z = (doubleComplex *) malloc((unsigned int) size * sizeof(doubleComplex)); + int i = 0; + + for(i = 0; i < size; ++i) + { + z[i] = DoubleComplex(real[i], imag[i]); + } + return z; +} + +/* +** \function isreal +** \brief check if complex is real . +*/ +bool zisreals(doubleComplex z) { + if (zimags(z) == 0) + return true; + return false; +} + +/* +** \function isimag +** \brief check if complex is pure imaginary . +*/ +bool zisimags(doubleComplex z) { + if (zreals(z) == 0) + return true; + return false; +} + + + diff --git a/2.3-1/src/c/type/doubleComplex.h b/2.3-1/src/c/type/doubleComplex.h new file mode 100644 index 00000000..4be0d7d3 --- /dev/null +++ b/2.3-1/src/c/type/doubleComplex.h @@ -0,0 +1,78 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __DOUBLECOMPLEX_H__ +#define __DOUBLECOMPLEX_H__ + +#include "dynlib_type.h" + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#ifndef _MSC_VER +#include +#endif + +#ifndef STDC99 +/* +** Hand made Double Complex definition +** { +*/ +struct double_complex +{ + double real; + double imag; +}; + +typedef struct double_complex doubleComplex; +/* +** } +*/ +#else +/* +** Standard C99 Complex +** { +*/ +#include + +typedef double complex doubleComplex; +/* +** } +*/ +#endif + +#ifdef __cplusplus +extern "C" { +#endif +EXTERN_TYPE double zreals(doubleComplex); +EXTERN_TYPE double zimags(doubleComplex); +EXTERN_TYPE void zreala(doubleComplex *in, int size, double *out); +EXTERN_TYPE void zimaga(doubleComplex *in, int size, double *out); +EXTERN_TYPE doubleComplex DoubleComplex(double, double); +EXTERN_TYPE doubleComplex* DoubleComplexMatrix(double*, double*, int); +EXTERN_TYPE bool zisreals(doubleComplex); +EXTERN_TYPE bool zisimags(doubleComplex); +EXTERN_TYPE doubleComplex zdevides(doubleComplex, doubleComplex); +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__DOUBLECOMPLEX_H__ */ diff --git a/2.3-1/src/c/type/dynlib_type.h b/2.3-1/src/c/type/dynlib_type.h new file mode 100644 index 00000000..35ae247f --- /dev/null +++ b/2.3-1/src/c/type/dynlib_type.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_TYPE_H__ +#define __DYNLIB_TYPE_H__ + +#if defined(_MSC_VER) && defined(_USRDLL) + #if TYPE_EXPORTS + #define EXTERN_TYPE __declspec (dllexport) + #else + #define EXTERN_TYPE __declspec (dllimport) + #endif +#else + #define EXTERN_TYPE +#endif + +#endif /* __DYNLIB_TYPE_H__ */ diff --git a/2.3-1/src/c/type/floatComplex.c b/2.3-1/src/c/type/floatComplex.c new file mode 100644 index 00000000..8ff7774b --- /dev/null +++ b/2.3-1/src/c/type/floatComplex.c @@ -0,0 +1,139 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#include +#include "floatComplex.h" + +#ifndef STDC99 +/* +** \function real +** \brief Return a Complex Real Part . +*/ +float creals(floatComplex z) { + return z.real; +} + +/* +** \function imag +** \brief Return a Complex Imaginary Part . +*/ +float cimags(floatComplex z) { + return z.imag; +} +#else +/* +** \function real +** \brief Return a Complex Real Part . +*/ +float creals(floatComplex z) { + return crealf(z); +} + +/* +** \function imag +** \brief Return a Complex Imaginary Part . +*/ +float cimags(floatComplex z) { + return cimagf(z); +} +#endif + +/* +** \function creala +** \brief Return a Complex Real Part array. +*/ +void creala(floatComplex* z, int size, float* out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) + { + out[i] = creals(z[i]); + } +} + +/* +** \function cimaga +** \brief Return a Complex Imaginary Part array. +*/ +void cimaga(floatComplex* z, int size, float* out) { + int i = 0; + + for (i = 0 ; i < size ; ++i) + { + out[i] = cimags(z[i]); + } +} + +/* +** \function FloatComplex +** \brief construct a Float Complex . +*/ +floatComplex FloatComplex(float a, float b) { + floatComplex z; +#ifndef STDC99 + z.real = a; + z.imag = b; +#else + z = a + I * b; +#endif + return z; +} + +/* +** \function FloatComplexMatrix +** \brief construct a Float Complex Matrix. +*/ +floatComplex *FloatComplexMatrix(float* real, float* imag, int size) { + floatComplex *z = (floatComplex *) malloc((unsigned int) size * sizeof(floatComplex)); + int i = 0; + + for(i = 0; i < size; ++i) + { + z[i] = FloatComplex(real[i], imag[i]); + } + return z; +} + +/* +** \function isreal +** \brief check if complex is real . +*/ +bool cisreals(floatComplex z) { + if (cimags(z) == 0) + return true; + return false; +} + +/* +** \function isimag +** \brief check if complex is pure imaginary . +*/ +bool cisimags(floatComplex z) { + if (creals(z) == 0) + return true; + return false; +} + + + + diff --git a/2.3-1/src/c/type/floatComplex.h b/2.3-1/src/c/type/floatComplex.h new file mode 100644 index 00000000..fe35ca48 --- /dev/null +++ b/2.3-1/src/c/type/floatComplex.h @@ -0,0 +1,79 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __FLOATCOMPLEX_H__ +#define __FLOATCOMPLEX_H__ + +#include "dynlib_type.h" + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif + +#ifndef _MSC_VER + #include +#endif + +#ifndef STDC99 +/* +** Hand made Float Complex definition +** { +*/ +struct float_complex +{ + float real; + float imag; +}; + +typedef struct float_complex floatComplex; +/* +** } +*/ +#else +/* +** C99 Standard +** { +*/ +#include + +typedef float complex floatComplex; +/* +** } +*/ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +EXTERN_TYPE float creals(floatComplex); +EXTERN_TYPE float cimags(floatComplex); +EXTERN_TYPE void creala(floatComplex *in, int size, float *out); +EXTERN_TYPE void cimaga(floatComplex *in, int size, float *out); +EXTERN_TYPE floatComplex FloatComplex(float, float); +EXTERN_TYPE floatComplex* FloatComplexMatrix(float*, float*, int); +EXTERN_TYPE bool cisreals(floatComplex); +EXTERN_TYPE bool cisimags(floatComplex); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + + +#endif /* !__FLOATCOMPLEX_H__ */ diff --git a/2.3-1/src/c/type/int_imag.h b/2.3-1/src/c/type/int_imag.h new file mode 100644 index 00000000..9647f6ad --- /dev/null +++ b/2.3-1/src/c/type/int_imag.h @@ -0,0 +1,34 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_IMAG_H__ +#define __INT_IMAG_H__ + +#define s0imags0(in) 0 + +#define d0imagd0(in) 0 + +#define c0imags0(in) cimags(in) + +#define z0imagd0(in) zimags(in) + +#define s2imags2(in,size,out) szerosa(out,size[0],size[1]) + +#define d2imagd2(in,size,out) dzerosa(out,size[0],size[1]) + +#define c2imags2(in,size,out) cimaga(in, size[0]*size[1], out) + +#define z2imagd2(in,size,out) zimaga(in, size[0]*size[1], out) + +#endif /* !__INT_IMAG_H__ */ diff --git a/2.3-1/src/c/type/int_real.h b/2.3-1/src/c/type/int_real.h new file mode 100644 index 00000000..4949b883 --- /dev/null +++ b/2.3-1/src/c/type/int_real.h @@ -0,0 +1,38 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Arnaud Torset + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +/* THIS IS AN AUTOMATICALLY GENERATED FILE : DO NOT EDIT BY HAND. */ + +#ifndef __INT_REAL_H__ +#define __INT_REAL_H__ + +#define s0reals0(in) in + +#define d0reald0(in) in + +#define c0reals0(in) creals(in) + +#define z0reald0(in) zreals(in) + +#define s2reals2(in,size,out) {int i;\ + for (i=0;i +#include +#include "doubleComplex.h" + +#define size 10000 + +static int matrixCreation(void) { + double real[size]; + double imag[size]; + + doubleComplex *Z; + double extractedReal[size]; + double extractedImag[size]; + + int i = 0; + + for (i = 0; i < size; ++i) + { + real[i] = i; + imag[i] = size - i; + } + + Z = DoubleComplexMatrix(real, imag, size); + + for (i = 0; i < size; ++i) + { + printf("Partie reelle = %f\n", zreals(Z[i])); + assert(zreals(Z[i]) == i); + printf("Partie imaginaire = %f\n", zimags(Z[i])); + assert(zimags(Z[i]) == size - i); + } + + zreala(Z, size, extractedReal); + zimaga(Z, size, extractedImag); + for (i = 0; i < size; ++i) + { + printf("Partie reelle = %f\n", extractedReal[i]); + assert(extractedReal[i] == i); + printf("Partie imaginaire = %f\n", extractedImag[i]); + assert(extractedImag[i] == size - i); + } + + return 0; +} + +int main(void) { + matrixCreation(); + return 0; +} diff --git a/2.3-1/src/c/type/testFloatComplex.c b/2.3-1/src/c/type/testFloatComplex.c new file mode 100644 index 00000000..703aac17 --- /dev/null +++ b/2.3-1/src/c/type/testFloatComplex.c @@ -0,0 +1,62 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include +#include +#include +#include "floatComplex.h" + +#define size 10000 + +static int matrixCreation(void) { + float real[size]; + float imag[size]; + + floatComplex *Z; + float extractedReal[size]; + float extractedImag[size]; + + int i = 0; + + for (i = 0; i < size; ++i) + { + real[i] = (float) i; + imag[i] = (float) (size - i); + } + + Z = FloatComplexMatrix(real, imag, size); + + for (i = 0; i < size; ++i) + { + printf("Partie reelle = %f\n", creals(Z[i])); + assert(creals(Z[i]) == i); + printf("Partie imaginaire = %f\n", cimags(Z[i])); + assert(cimags(Z[i]) == size - i); + } + + creala(Z, size, extractedReal); + cimaga(Z, size, extractedImag); + for (i = 0; i < size; ++i) + { + printf("Partie reelle = %f\n", extractedReal[i]); + assert(extractedReal[i] == i); + printf("Partie imaginaire = %f\n", extractedImag[i]); + assert(extractedImag[i] == size - i); + } + + return 0; +} + +int main(void) { + matrixCreation(); + return 0; +} diff --git a/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj b/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj new file mode 100644 index 00000000..a964ef66 --- /dev/null +++ b/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj @@ -0,0 +1,171 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testDoubleComplex + {DBB1B4E8-E9D0-44E5-8AA6-4ECF1AAA1D0F} + test_doubleComplex + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj.filters b/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj.filters new file mode 100644 index 00000000..95bfbeb6 --- /dev/null +++ b/2.3-1/src/c/type/test_doubleComplex/test_doubleComplex.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj b/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj new file mode 100644 index 00000000..6401b9bc --- /dev/null +++ b/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + testFloatComplex + {A6EBF2F9-C100-453F-A0D1-1649DCF557EC} + test_floatComplex + Win32Proj + + + + Application + Unicode + true + + + Application + Unicode + true + + + Application + Unicode + + + Application + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + MachineX86 + + + + + Disabled + %(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + + + + + MaxSpeed + true + ../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + MachineX86 + + + + + MaxSpeed + true + ../;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).exe + true + Console + true + true + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + {9b1bd750-1fef-4d6b-9422-782d16181cee} + false + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj.filters b/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj.filters new file mode 100644 index 00000000..0275512a --- /dev/null +++ b/2.3-1/src/c/type/test_floatComplex/test_floatComplex.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + \ No newline at end of file diff --git a/2.3-1/src/c/type/type.vcxproj b/2.3-1/src/c/type/type.vcxproj new file mode 100644 index 00000000..887062c9 --- /dev/null +++ b/2.3-1/src/c/type/type.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9B1BD750-1FEF-4D6B-9422-782D16181CEE} + type + Win32Proj + + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + true + + + DynamicLibrary + Unicode + + + DynamicLibrary + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + true + true + $(SolutionDir)bin\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + false + false + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;TYPE_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(TargetName).lib + MachineX86 + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;TYPE_EXPORTS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + $(SolutionDir)bin\$(TargetName).lib + + + + + MaxSpeed + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;TYPE_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(TargetName).lib + MachineX86 + + + + + MaxSpeed + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;TYPE_EXPORTS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + + + $(SolutionDir)bin\$(ProjectName).dll + true + Windows + true + true + $(SolutionDir)bin\$(TargetName).lib + + + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + CompileAsCpp + CompileAsCpp + CompileAsCpp + CompileAsCpp + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/c/type/type.vcxproj.filters b/2.3-1/src/c/type/type.vcxproj.filters new file mode 100644 index 00000000..22f5c9e0 --- /dev/null +++ b/2.3-1/src/c/type/type.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + + + + \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/Makefile.am b/2.3-1/src/fortran/blas/Makefile.am new file mode 100644 index 00000000..6b8b83de --- /dev/null +++ b/2.3-1/src/fortran/blas/Makefile.am @@ -0,0 +1,86 @@ +########## +### Sylvestre Ledru +### INRIA - Scilab 2006 +########## + +BLAS_FORTRAN_SOURCES = zrotg.f \ +zhpr2.f \ +zher2k.f \ +dspr.f \ +xerbla.f \ +dcopy.f \ +dsyr2k.f \ +zsymm.f \ +zhemm.f \ +dtbsv.f \ +dtrmm.f \ +dscal.f \ +ddot.f \ +dgbmv.f \ +dtpsv.f \ +dtrsv.f \ +dgemv.f \ +idamax.f \ +dzasum.f \ +zcopy.f \ +zher.f \ +drot.f \ +ztbsv.f \ +dasum.f \ +ztrmm.f \ +dsbmv.f \ +zscal.f \ +dswap.f \ +zdotc.f \ +zgbmv.f \ +ztpsv.f \ +zgemv.f \ +ztrsv.f \ +izamax.f \ +dspmv.f \ +dcabs1.f \ +dsymv.f \ +zswap.f \ +zdotu.f \ +zgerc.f \ +dznrm2.f \ +dtbmv.f \ +zdscal.f \ +dger.f \ +dnrm2.f \ +zhpr.f \ +daxpy.f \ +zhbmv.f \ +zhemv.f \ +dtrsm.f \ +dgemm.f \ +dspr2.f \ +dtpmv.f \ +zgeru.f \ +dtrmv.f \ +dsyrk.f \ +lsame.f \ +ztbmv.f \ +dsyr2.f \ +zhpmv.f \ +zsyr2k.f \ +zaxpy.f \ +zgemm.f \ +drotg.f \ +ztrsm.f \ +ztpmv.f \ +dsyr.f \ +zsyrk.f \ +ztrmv.f \ +zherk.f \ +dsymm.f \ +zher2.f + +instdir = $(top_builddir)/lib + +pkglib_LTLIBRARIES = libsciblas.la + +HEAD = $(top_builddir)/includes/blas.h + +libsciblas_la_SOURCES = $(HEAD) $(BLAS_FORTRAN_SOURCES) + diff --git a/2.3-1/src/fortran/blas/Makefile.in b/2.3-1/src/fortran/blas/Makefile.in new file mode 100644 index 00000000..b2651816 --- /dev/null +++ b/2.3-1/src/fortran/blas/Makefile.in @@ -0,0 +1,601 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +########## +### Sylvestre Ledru +### INRIA - Scilab 2006 +########## + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/fortran/blas +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libsciblas_la_LIBADD = +am__objects_1 = +am__objects_2 = zrotg.lo zhpr2.lo zher2k.lo dspr.lo xerbla.lo dcopy.lo \ + dsyr2k.lo zsymm.lo zhemm.lo dtbsv.lo dtrmm.lo dscal.lo ddot.lo \ + dgbmv.lo dtpsv.lo dtrsv.lo dgemv.lo idamax.lo dzasum.lo \ + zcopy.lo zher.lo drot.lo ztbsv.lo dasum.lo ztrmm.lo dsbmv.lo \ + zscal.lo dswap.lo zdotc.lo zgbmv.lo ztpsv.lo zgemv.lo ztrsv.lo \ + izamax.lo dspmv.lo dcabs1.lo dsymv.lo zswap.lo zdotu.lo \ + zgerc.lo dznrm2.lo dtbmv.lo zdscal.lo dger.lo dnrm2.lo zhpr.lo \ + daxpy.lo zhbmv.lo zhemv.lo dtrsm.lo dgemm.lo dspr2.lo dtpmv.lo \ + zgeru.lo dtrmv.lo dsyrk.lo lsame.lo ztbmv.lo dsyr2.lo zhpmv.lo \ + zsyr2k.lo zaxpy.lo zgemm.lo drotg.lo ztrsm.lo ztpmv.lo dsyr.lo \ + zsyrk.lo ztrmv.lo zherk.lo dsymm.lo zher2.lo +am_libsciblas_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libsciblas_la_OBJECTS = $(am_libsciblas_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) +LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) +F77LD = $(F77) +F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsciblas_la_SOURCES) +DIST_SOURCES = $(libsciblas_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +BLAS_FORTRAN_SOURCES = zrotg.f \ +zhpr2.f \ +zher2k.f \ +dspr.f \ +xerbla.f \ +dcopy.f \ +dsyr2k.f \ +zsymm.f \ +zhemm.f \ +dtbsv.f \ +dtrmm.f \ +dscal.f \ +ddot.f \ +dgbmv.f \ +dtpsv.f \ +dtrsv.f \ +dgemv.f \ +idamax.f \ +dzasum.f \ +zcopy.f \ +zher.f \ +drot.f \ +ztbsv.f \ +dasum.f \ +ztrmm.f \ +dsbmv.f \ +zscal.f \ +dswap.f \ +zdotc.f \ +zgbmv.f \ +ztpsv.f \ +zgemv.f \ +ztrsv.f \ +izamax.f \ +dspmv.f \ +dcabs1.f \ +dsymv.f \ +zswap.f \ +zdotu.f \ +zgerc.f \ +dznrm2.f \ +dtbmv.f \ +zdscal.f \ +dger.f \ +dnrm2.f \ +zhpr.f \ +daxpy.f \ +zhbmv.f \ +zhemv.f \ +dtrsm.f \ +dgemm.f \ +dspr2.f \ +dtpmv.f \ +zgeru.f \ +dtrmv.f \ +dsyrk.f \ +lsame.f \ +ztbmv.f \ +dsyr2.f \ +zhpmv.f \ +zsyr2k.f \ +zaxpy.f \ +zgemm.f \ +drotg.f \ +ztrsm.f \ +ztpmv.f \ +dsyr.f \ +zsyrk.f \ +ztrmv.f \ +zherk.f \ +dsymm.f \ +zher2.f + +instdir = $(top_builddir)/lib +pkglib_LTLIBRARIES = libsciblas.la +HEAD = $(top_builddir)/includes/blas.h +libsciblas_la_SOURCES = $(HEAD) $(BLAS_FORTRAN_SOURCES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .f .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fortran/blas/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/fortran/blas/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsciblas.la: $(libsciblas_la_OBJECTS) $(libsciblas_la_DEPENDENCIES) + $(F77LINK) -rpath $(pkglibdir) $(libsciblas_la_OBJECTS) $(libsciblas_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.f.o: + $(F77COMPILE) -c -o $@ $< + +.f.obj: + $(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f.lo: + $(LTF77COMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/fortran/blas/README b/2.3-1/src/fortran/blas/README new file mode 100644 index 00000000..8c281661 --- /dev/null +++ b/2.3-1/src/fortran/blas/README @@ -0,0 +1,6 @@ +This directory contains double precision version of the standard blas routines. + The makefile produces /libs/blas.a + +However this code is intended for use only if there is no other implementation +of the BLAS already available on your machine; + diff --git a/2.3-1/src/fortran/blas/blas_f/blasplus.def b/2.3-1/src/fortran/blas/blas_f/blasplus.def new file mode 100644 index 00000000..336d98ac --- /dev/null +++ b/2.3-1/src/fortran/blas/blas_f/blasplus.def @@ -0,0 +1,74 @@ +LIBRARY blasplus.dll + +EXPORTS + dasum + daxpy + dcopy + ddot + dgbmv + dgemm + dgemv + dger + dnrm2 + drot + drotg + dsbmv + dscal + dspmv + dspr + dspr2 + dswap + dsymm + dsymv + dsyr + dsyr2 + dsyr2k + dsyrk + dtbmv + dtbsv + dtpmv + dtpsv + dtrmm + dtrmv + dtrsm + dtrsv + dzasum + dznrm2 + idamax + izamax + xerbla + zaxpy + zcopy + zdotc + zdotu + zdscal + zgbmv + zgemm + zgemv + zgerc + zgeru + zhbmv + zhemm + zhemv + zher + zher2 + zher2k + zherk + zhpmv + zhpr + zhpr2 + zrotg + zscal + zswap + zsymm + zsyr2k + zsyrk + ztbmv + ztbsv + ztpmv + ztpsv + ztrmm + ztrmv + ztrsm + ztrsv + \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/blas_f/blasplusAtlas.def b/2.3-1/src/fortran/blas/blas_f/blasplusAtlas.def new file mode 100644 index 00000000..d13dde93 --- /dev/null +++ b/2.3-1/src/fortran/blas/blas_f/blasplusAtlas.def @@ -0,0 +1,144 @@ +LIBRARY blasplus.dll + +EXPORTS + dasum_ @1 + dasum = dasum_ + daxpy_ @2 + daxpy = daxpy_ + dcopy_ @3 + dcopy = dcopy_ + ddot_ @4 + ddot = ddot_ + dgbmv_ @5 + dgbmv = dgbmv_ + dgemm_ @6 + dgemm = dgemm_ + dgemv_ @7 + dgemv = dgemv_ + dger_ @8 + dger = dger_ + dnrm2_ @9 + dnrm2 = dnrm2_ + drot_ @10 + drot = drot_ + drotg_ @11 + drotg = drotg_ + dsbmv_ @12 + dsbmv = dsbmv_ + dscal_ @13 + dscal = dscal_ + dspmv_ @14 + dspmv = dspmv_ + dspr_ @15 + dspr = dspr_ + dspr2_ @16 + dspr2 = dspr2_ + dswap_ @17 + dswap = dswap_ + dsymm_ @18 + dsymm = dsymm_ + dsymv_ @19 + dsymv = dsymv_ + dsyr_ @20 + dsyr = dsyr_ + dsyr2_ @21 + dsyr2 = dsyr2_ + dsyr2k_ @22 + dsyr2k = dsyr2k_ + dsyrk_ @23 + dsyrk = dsyrk_ + dtbmv_ @24 + dtbmv = dtbmv_ + dtbsv_ @25 + dtbsv = dtbsv_ + dtpmv_ @26 + dtpmv = dtpmv_ + dtpsv_ @27 + dtpsv = dtpsv_ + dtrmm_ @28 + dtrmm = dtrmm_ + dtrmv_ @29 + dtrmv = dtrmv_ + dtrsm_ @30 + dtrsm = dtrsm_ + dtrsv_ @31 + dtrsv = dtrsv_ + dzasum_ @32 + dzasum = dzasum_ + dznrm2_ @33 + dznrm2 = dznrm2_ + idamax_ @34 + idamax = idamax_ + izamax_ @35 + izamax = izamax_ + xerbla_ @36 + xerbla = xerbla_ + zaxpy_ @37 + zaxpy = zaxpy_ + zcopy_ @38 + zcopy = zcopy_ + zdotc_ @39 + zdotc = zdotc_ + zdotu_ @40 + zdotu = zdotu_ + zdscal_ @41 + zdscal = zdscal_ + zgbmv_ @42 + zgbmv = zgbmv_ + zgemm_ @43 + zgemm = zgemm_ + zgemv_ @44 + zgemv = zgemv_ + zgerc_ @45 + zgerc = zgerc_ + zgeru_ @46 + zgeru = zgeru_ + zhbmv_ @47 + zhbmv = zhbmv_ + zhemm_ @48 + zhemm = zhemm_ + zhemv_ @49 + zhemv = zhemv_ + zher_ @50 + zher = zher_ + zher2_ @51 + zher2 = zher2_ + zher2k_ @52 + zher2k = zher2k_ + zherk_ @53 + zherk = zherk_ + zhpmv_ @54 + zhpmv = zhpmv_ + zhpr_ @55 + zhpr = zhpr_ + zhpr2_ @56 + zhpr2 = zhpr2_ + zrotg_ @57 + zrotg = zrotg_ + zscal_ @58 + zscal = zscal_ + zswap_ @59 + zswap = zswap_ + zsymm_ @60 + zsymm = zsymm_ + zsyr2k_ @61 + zsyr2k = zsyr2k_ + zsyrk_ @62 + zsyrk = zsyrk_ + ztbmv_ @63 + ztbmv = ztbmv_ + ztbsv_ @64 + ztbsv = ztbsv_ + ztpmv_ @65 + ztpmv = ztpmv_ + ztpsv_ @66 + ztpsv = ztpsv_ + ztrmm_ @67 + ztrmm =ztrmm_ + ztrmv_ @68 + ztrmv = ztrmv_ + ztrsm_ @69 + ztrsm = ztrsm_ + ztrsv_ @70 + ztrsv = ztrsv_ + \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.suo b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.suo new file mode 100644 index 00000000..b83ddab8 Binary files /dev/null and b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.suo differ diff --git a/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.vfproj b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.vfproj new file mode 100644 index 00000000..c1f337d1 --- /dev/null +++ b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL.vfproj @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj new file mode 100644 index 00000000..d557d2b9 --- /dev/null +++ b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj @@ -0,0 +1,370 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + blasplus_f2c_DLL + {78BD64CE-181D-4D3F-9254-5C4F55C1EDC9} + blas_f2c + Win32Proj + + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(ProjectDir)$(Configuration)\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + + + + + + + + Disabled + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + /fixed:no %(AdditionalOptions) + $(SolutionDir)bin\blasplus.dll + blasplusAtlas.def + false + + + $(SolutionDir)bin\blasplus.lib + true + + + + + + + + + + + + + X64 + + + Disabled + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + /fixed:no %(AdditionalOptions) + ../../../bin/blasplus.dll + blasplusAtlas.def + false + + + ../../../bin/blasplus.lib + MachineX64 + true + + + + + + + + + + + + + Speed + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreaded + NotSet + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + $(SolutionDir)bin\blasplus.dll + blasplusAtlas.def + false + + + $(SolutionDir)bin\blasplus.lib + true + + + + + + + + + + + + + X64 + + + Speed + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreaded + StreamingSIMDExtensions + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + ../../../bin/blasplus.dll + blasplusAtlas.def + false + + + ../../../bin/blasplus.lib + MachineX64 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj.filters b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj.filters new file mode 100644 index 00000000..7930e6c0 --- /dev/null +++ b/2.3-1/src/fortran/blas/blas_f/blasplus_DLL_f2c.vcxproj.filters @@ -0,0 +1,463 @@ + + + + + {1601b9fb-7d71-4db3-a10f-2ebf4e42eb41} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {00d1d9d7-fbdc-44d6-8833-2fe6c3202478} + h;hpp;hxx;hm;inl;inc;xsd + + + {e894258f-c565-49f3-a686-3d4b79d703a9} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx + + + {f47cf0f8-ff06-42b4-86b2-ffa42424f976} + *.f + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/dasum.f b/2.3-1/src/fortran/blas/dasum.f new file mode 100644 index 00000000..28b128a8 --- /dev/null +++ b/2.3-1/src/fortran/blas/dasum.f @@ -0,0 +1,43 @@ + double precision function dasum(n,dx,incx) +c +c takes the sum of the absolute values. +c jack dongarra, linpack, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dtemp + integer i,incx,m,mp1,n,nincx +c + dasum = 0.0d0 + dtemp = 0.0d0 + if( n.le.0 .or. incx.le.0 )return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + nincx = n*incx + do 10 i = 1,nincx,incx + dtemp = dtemp + dabs(dx(i)) + 10 continue + dasum = dtemp + return +c +c code for increment equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,6) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dtemp = dtemp + dabs(dx(i)) + 30 continue + if( n .lt. 6 ) go to 60 + 40 mp1 = m + 1 + do 50 i = mp1,n,6 + dtemp = dtemp + dabs(dx(i)) + dabs(dx(i + 1)) + dabs(dx(i + 2)) + * + dabs(dx(i + 3)) + dabs(dx(i + 4)) + dabs(dx(i + 5)) + 50 continue + 60 dasum = dtemp + return + end diff --git a/2.3-1/src/fortran/blas/daxpy.f b/2.3-1/src/fortran/blas/daxpy.f new file mode 100644 index 00000000..91daa3c6 --- /dev/null +++ b/2.3-1/src/fortran/blas/daxpy.f @@ -0,0 +1,48 @@ + subroutine daxpy(n,da,dx,incx,dy,incy) +c +c constant times a vector plus a vector. +c uses unrolled loops for increments equal to one. +c jack dongarra, linpack, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dy(*),da + integer i,incx,incy,ix,iy,m,mp1,n +c + if(n.le.0)return + if (da .eq. 0.0d0) return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + dy(iy) = dy(iy) + da*dx(ix) + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,4) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dy(i) = dy(i) + da*dx(i) + 30 continue + if( n .lt. 4 ) return + 40 mp1 = m + 1 + do 50 i = mp1,n,4 + dy(i) = dy(i) + da*dx(i) + dy(i + 1) = dy(i + 1) + da*dx(i + 1) + dy(i + 2) = dy(i + 2) + da*dx(i + 2) + dy(i + 3) = dy(i + 3) + da*dx(i + 3) + 50 continue + return + end diff --git a/2.3-1/src/fortran/blas/dcabs1.f b/2.3-1/src/fortran/blas/dcabs1.f new file mode 100644 index 00000000..385ea5e1 --- /dev/null +++ b/2.3-1/src/fortran/blas/dcabs1.f @@ -0,0 +1,8 @@ + double precision function dcabs1(z) + double complex z,zz + double precision t(2) + equivalence (zz,t(1)) + zz = z + dcabs1 = dabs(t(1)) + dabs(t(2)) + return + end diff --git a/2.3-1/src/fortran/blas/dcopy.f b/2.3-1/src/fortran/blas/dcopy.f new file mode 100644 index 00000000..e1689271 --- /dev/null +++ b/2.3-1/src/fortran/blas/dcopy.f @@ -0,0 +1,50 @@ + subroutine dcopy(n,dx,incx,dy,incy) +c +c copies a vector, x, to a vector, y. +c uses unrolled loops for increments equal to one. +c jack dongarra, linpack, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dy(*) + integer i,incx,incy,ix,iy,m,mp1,n +c + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + dy(iy) = dx(ix) + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,7) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dy(i) = dx(i) + 30 continue + if( n .lt. 7 ) return + 40 mp1 = m + 1 + do 50 i = mp1,n,7 + dy(i) = dx(i) + dy(i + 1) = dx(i + 1) + dy(i + 2) = dx(i + 2) + dy(i + 3) = dx(i + 3) + dy(i + 4) = dx(i + 4) + dy(i + 5) = dx(i + 5) + dy(i + 6) = dx(i + 6) + 50 continue + return + end diff --git a/2.3-1/src/fortran/blas/ddot.f b/2.3-1/src/fortran/blas/ddot.f new file mode 100644 index 00000000..e04c7c25 --- /dev/null +++ b/2.3-1/src/fortran/blas/ddot.f @@ -0,0 +1,49 @@ + double precision function ddot(n,dx,incx,dy,incy) +c +c forms the dot product of two vectors. +c uses unrolled loops for increments equal to one. +c jack dongarra, linpack, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dy(*),dtemp + integer i,incx,incy,ix,iy,m,mp1,n +c + ddot = 0.0d0 + dtemp = 0.0d0 + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + dtemp = dtemp + dx(ix)*dy(iy) + ix = ix + incx + iy = iy + incy + 10 continue + ddot = dtemp + return +c +c code for both increments equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,5) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dtemp = dtemp + dx(i)*dy(i) + 30 continue + if( n .lt. 5 ) go to 60 + 40 mp1 = m + 1 + do 50 i = mp1,n,5 + dtemp = dtemp + dx(i)*dy(i) + dx(i + 1)*dy(i + 1) + + * dx(i + 2)*dy(i + 2) + dx(i + 3)*dy(i + 3) + dx(i + 4)*dy(i + 4) + 50 continue + 60 ddot = dtemp + return + end diff --git a/2.3-1/src/fortran/blas/dgbmv.f b/2.3-1/src/fortran/blas/dgbmv.f new file mode 100644 index 00000000..e9c8f76f --- /dev/null +++ b/2.3-1/src/fortran/blas/dgbmv.f @@ -0,0 +1,300 @@ + SUBROUTINE DGBMV ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA, BETA + INTEGER INCX, INCY, KL, KU, LDA, M, N + CHARACTER*1 TRANS +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DGBMV performs one of the matrix-vector operations +* +* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, +* +* where alpha and beta are scalars, x and y are vectors and A is an +* m by n band matrix, with kl sub-diagonals and ku super-diagonals. +* +* Parameters +* ========== +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' y := alpha*A*x + beta*y. +* +* TRANS = 'T' or 't' y := alpha*A'*x + beta*y. +* +* TRANS = 'C' or 'c' y := alpha*A'*x + beta*y. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* KL - INTEGER. +* On entry, KL specifies the number of sub-diagonals of the +* matrix A. KL must satisfy 0 .le. KL. +* Unchanged on exit. +* +* KU - INTEGER. +* On entry, KU specifies the number of super-diagonals of the +* matrix A. KU must satisfy 0 .le. KU. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry, the leading ( kl + ku + 1 ) by n part of the +* array A must contain the matrix of coefficients, supplied +* column by column, with the leading diagonal of the matrix in +* row ( ku + 1 ) of the array, the first super-diagonal +* starting at position 2 in row ku, the first sub-diagonal +* starting at position 1 in row ( ku + 2 ), and so on. +* Elements in the array A that do not correspond to elements +* in the band matrix (such as the top left ku by ku triangle) +* are not referenced. +* The following program segment will transfer a band matrix +* from conventional full matrix storage to band storage: +* +* DO 20, J = 1, N +* K = KU + 1 - J +* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL ) +* A( K + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( kl + ku + 1 ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. +* Before entry, the incremented array Y must contain the +* vector y. On exit, Y is overwritten by the updated vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, IY, J, JX, JY, K, KUP1, KX, KY, + $ LENX, LENY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 1 + ELSE IF( M.LT.0 )THEN + INFO = 2 + ELSE IF( N.LT.0 )THEN + INFO = 3 + ELSE IF( KL.LT.0 )THEN + INFO = 4 + ELSE IF( KU.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( KL + KU + 1 ) )THEN + INFO = 8 + ELSE IF( INCX.EQ.0 )THEN + INFO = 10 + ELSE IF( INCY.EQ.0 )THEN + INFO = 13 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DGBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set LENX and LENY, the lengths of the vectors x and y, and set +* up the start points in X and Y. +* + IF( LSAME( TRANS, 'N' ) )THEN + LENX = N + LENY = M + ELSE + LENX = M + LENY = N + END IF + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( LENX - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( LENY - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the band part of A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, LENY + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, LENY + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, LENY + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, LENY + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + KUP1 = KU + 1 + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form y := alpha*A*x + y. +* + JX = KX + IF( INCY.EQ.1 )THEN + DO 60, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + K = KUP1 - J + DO 50, I = MAX( 1, J - KU ), MIN( M, J + KL ) + Y( I ) = Y( I ) + TEMP*A( K + I, J ) + 50 CONTINUE + END IF + JX = JX + INCX + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IY = KY + K = KUP1 - J + DO 70, I = MAX( 1, J - KU ), MIN( M, J + KL ) + Y( IY ) = Y( IY ) + TEMP*A( K + I, J ) + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + IF( J.GT.KU ) + $ KY = KY + INCY + 80 CONTINUE + END IF + ELSE +* +* Form y := alpha*A'*x + y. +* + JY = KY + IF( INCX.EQ.1 )THEN + DO 100, J = 1, N + TEMP = ZERO + K = KUP1 - J + DO 90, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + A( K + I, J )*X( I ) + 90 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 100 CONTINUE + ELSE + DO 120, J = 1, N + TEMP = ZERO + IX = KX + K = KUP1 - J + DO 110, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + A( K + I, J )*X( IX ) + IX = IX + INCX + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + IF( J.GT.KU ) + $ KX = KX + INCX + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of DGBMV . +* + END diff --git a/2.3-1/src/fortran/blas/dgemm.f b/2.3-1/src/fortran/blas/dgemm.f new file mode 100644 index 00000000..1531fd57 --- /dev/null +++ b/2.3-1/src/fortran/blas/dgemm.f @@ -0,0 +1,315 @@ + SUBROUTINE DGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 TRANSA, TRANSB + INTEGER M, N, K, LDA, LDB, LDC + DOUBLE PRECISION ALPHA, BETA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +C WARNING : this routine has been modified for Scilab (see comments +C Cscilab) because algorithm is not ok if A matrix contains NaN +C (NaN*0 should be NaN, not 0) +* Purpose +* ======= +* +* DGEMM performs one of the matrix-matrix operations +* +* C := alpha*op( A )*op( B ) + beta*C, +* +* where op( X ) is one of +* +* op( X ) = X or op( X ) = X', +* +* alpha and beta are scalars, and A, B and C are matrices, with op( A ) +* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. +* +* Parameters +* ========== +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n', op( A ) = A. +* +* TRANSA = 'T' or 't', op( A ) = A'. +* +* TRANSA = 'C' or 'c', op( A ) = A'. +* +* Unchanged on exit. +* +* TRANSB - CHARACTER*1. +* On entry, TRANSB specifies the form of op( B ) to be used in +* the matrix multiplication as follows: +* +* TRANSB = 'N' or 'n', op( B ) = B. +* +* TRANSB = 'T' or 't', op( B ) = B'. +* +* TRANSB = 'C' or 'c', op( B ) = B'. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix +* op( A ) and of the matrix C. M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix +* op( B ) and the number of columns of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry, K specifies the number of columns of the matrix +* op( A ) and the number of rows of the matrix op( B ). K must +* be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +* k when TRANSA = 'N' or 'n', and is m otherwise. +* Before entry with TRANSA = 'N' or 'n', the leading m by k +* part of the array A must contain the matrix A, otherwise +* the leading k by m part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANSA = 'N' or 'n' then +* LDA must be at least max( 1, m ), otherwise LDA must be at +* least max( 1, k ). +* Unchanged on exit. +* +* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is +* n when TRANSB = 'N' or 'n', and is k otherwise. +* Before entry with TRANSB = 'N' or 'n', the leading k by n +* part of the array B must contain the matrix B, otherwise +* the leading n by k part of the array B must contain the +* matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. When TRANSB = 'N' or 'n' then +* LDB must be at least max( 1, k ), otherwise LDB must be at +* least max( 1, n ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then C need not be set on input. +* Unchanged on exit. +* +* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). +* Before entry, the leading m by n part of the array C must +* contain the matrix C, except when beta is zero, in which +* case C need not be set on entry. +* On exit, the array C is overwritten by the m by n matrix +* ( alpha*op( A )*op( B ) + beta*C ). +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL NOTA, NOTB + INTEGER I, INFO, J, L, NCOLA, NROWA, NROWB + DOUBLE PRECISION TEMP +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Set NOTA and NOTB as true if A and B respectively are not +* transposed and set NROWA, NCOLA and NROWB as the number of rows +* and columns of A and the number of rows of B respectively. +* + NOTA = LSAME( TRANSA, 'N' ) + NOTB = LSAME( TRANSB, 'N' ) + IF( NOTA )THEN + NROWA = M + NCOLA = K + ELSE + NROWA = K + NCOLA = M + END IF + IF( NOTB )THEN + NROWB = K + ELSE + NROWB = N + END IF +* +* Test the input parameters. +* + INFO = 0 + IF( ( .NOT.NOTA ).AND. + $ ( .NOT.LSAME( TRANSA, 'C' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.NOTB ).AND. + $ ( .NOT.LSAME( TRANSB, 'C' ) ).AND. + $ ( .NOT.LSAME( TRANSB, 'T' ) ) )THEN + INFO = 2 + ELSE IF( M .LT.0 )THEN + INFO = 3 + ELSE IF( N .LT.0 )THEN + INFO = 4 + ELSE IF( K .LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 8 + ELSE IF( LDB.LT.MAX( 1, NROWB ) )THEN + INFO = 10 + ELSE IF( LDC.LT.MAX( 1, M ) )THEN + INFO = 13 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DGEMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And if alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, M + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + RETURN + END IF +* +* Start the operations. +* + IF( NOTB )THEN + IF( NOTA )THEN +* +* Form C := alpha*A*B + beta*C. +* + DO 90, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 50, I = 1, M + C( I, J ) = ZERO + 50 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 60, I = 1, M + C( I, J ) = BETA*C( I, J ) + 60 CONTINUE + END IF + DO 80, L = 1, K +Cscilab IF( B( L, J ).NE.ZERO )THEN + TEMP = ALPHA*B( L, J ) + DO 70, I = 1, M + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 70 CONTINUE +Cscilab END IF + 80 CONTINUE + 90 CONTINUE + ELSE +* +* Form C := alpha*A'*B + beta*C +* + DO 120, J = 1, N + DO 110, I = 1, M + TEMP = ZERO + DO 100, L = 1, K + TEMP = TEMP + A( L, I )*B( L, J ) + 100 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 110 CONTINUE + 120 CONTINUE + END IF + ELSE + IF( NOTA )THEN +* +* Form C := alpha*A*B' + beta*C +* + DO 170, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 130, I = 1, M + C( I, J ) = ZERO + 130 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 140, I = 1, M + C( I, J ) = BETA*C( I, J ) + 140 CONTINUE + END IF + DO 160, L = 1, K +Cscilab IF( B( J, L ).NE.ZERO )THEN + TEMP = ALPHA*B( J, L ) + DO 150, I = 1, M + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 150 CONTINUE +Cscilab END IF + 160 CONTINUE + 170 CONTINUE + ELSE +* +* Form C := alpha*A'*B' + beta*C +* + DO 200, J = 1, N + DO 190, I = 1, M + TEMP = ZERO + DO 180, L = 1, K + TEMP = TEMP + A( L, I )*B( J, L ) + 180 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 190 CONTINUE + 200 CONTINUE + END IF + END IF +* + RETURN +* +* End of DGEMM . +* + END diff --git a/2.3-1/src/fortran/blas/dgemv.f b/2.3-1/src/fortran/blas/dgemv.f new file mode 100644 index 00000000..8ef80b3a --- /dev/null +++ b/2.3-1/src/fortran/blas/dgemv.f @@ -0,0 +1,261 @@ + SUBROUTINE DGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA, BETA + INTEGER INCX, INCY, LDA, M, N + CHARACTER*1 TRANS +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DGEMV performs one of the matrix-vector operations +* +* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, +* +* where alpha and beta are scalars, x and y are vectors and A is an +* m by n matrix. +* +* Parameters +* ========== +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' y := alpha*A*x + beta*y. +* +* TRANS = 'T' or 't' y := alpha*A'*x + beta*y. +* +* TRANS = 'C' or 'c' y := alpha*A'*x + beta*y. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry, the leading m by n part of the array A must +* contain the matrix of coefficients. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, m ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. +* Before entry with BETA non-zero, the incremented array Y +* must contain the vector y. On exit, Y is overwritten by the +* updated vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 1 + ELSE IF( M.LT.0 )THEN + INFO = 2 + ELSE IF( N.LT.0 )THEN + INFO = 3 + ELSE IF( LDA.LT.MAX( 1, M ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + ELSE IF( INCY.EQ.0 )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DGEMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set LENX and LENY, the lengths of the vectors x and y, and set +* up the start points in X and Y. +* + IF( LSAME( TRANS, 'N' ) )THEN + LENX = N + LENY = M + ELSE + LENX = M + LENY = N + END IF + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( LENX - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( LENY - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, LENY + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, LENY + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, LENY + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, LENY + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form y := alpha*A*x + y. +* + JX = KX + IF( INCY.EQ.1 )THEN + DO 60, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + DO 50, I = 1, M + Y( I ) = Y( I ) + TEMP*A( I, J ) + 50 CONTINUE + END IF + JX = JX + INCX + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IY = KY + DO 70, I = 1, M + Y( IY ) = Y( IY ) + TEMP*A( I, J ) + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + ELSE +* +* Form y := alpha*A'*x + y. +* + JY = KY + IF( INCX.EQ.1 )THEN + DO 100, J = 1, N + TEMP = ZERO + DO 90, I = 1, M + TEMP = TEMP + A( I, J )*X( I ) + 90 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 100 CONTINUE + ELSE + DO 120, J = 1, N + TEMP = ZERO + IX = KX + DO 110, I = 1, M + TEMP = TEMP + A( I, J )*X( IX ) + IX = IX + INCX + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of DGEMV . +* + END diff --git a/2.3-1/src/fortran/blas/dger.f b/2.3-1/src/fortran/blas/dger.f new file mode 100644 index 00000000..d316000a --- /dev/null +++ b/2.3-1/src/fortran/blas/dger.f @@ -0,0 +1,157 @@ + SUBROUTINE DGER ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, INCY, LDA, M, N +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DGER performs the rank 1 operation +* +* A := alpha*x*y' + A, +* +* where alpha is a scalar, x is an m element vector, y is an n element +* vector and A is an m by n matrix. +* +* Parameters +* ========== +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( m - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the m +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry, the leading m by n part of the array A must +* contain the matrix of coefficients. On exit, A is +* overwritten by the updated matrix. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JY, KX +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( M.LT.0 )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + ELSE IF( LDA.LT.MAX( 1, M ) )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DGER ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( INCY.GT.0 )THEN + JY = 1 + ELSE + JY = 1 - ( N - 1 )*INCY + END IF + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*Y( JY ) + DO 10, I = 1, M + A( I, J ) = A( I, J ) + X( I )*TEMP + 10 CONTINUE + END IF + JY = JY + INCY + 20 CONTINUE + ELSE + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( M - 1 )*INCX + END IF + DO 40, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*Y( JY ) + IX = KX + DO 30, I = 1, M + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + END IF + JY = JY + INCY + 40 CONTINUE + END IF +* + RETURN +* +* End of DGER . +* + END diff --git a/2.3-1/src/fortran/blas/dnrm2.f b/2.3-1/src/fortran/blas/dnrm2.f new file mode 100644 index 00000000..119d0477 --- /dev/null +++ b/2.3-1/src/fortran/blas/dnrm2.f @@ -0,0 +1,60 @@ + DOUBLE PRECISION FUNCTION DNRM2 ( N, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N +* .. Array Arguments .. + DOUBLE PRECISION X( * ) +* .. +* +* DNRM2 returns the euclidean norm of a vector via the function +* name, so that +* +* DNRM2 := sqrt( x'*x ) +* +* +* +* -- This version written on 25-October-1982. +* Modified on 14-October-1993 to inline the call to DLASSQ. +* Sven Hammarling, Nag Ltd. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + INTEGER IX + DOUBLE PRECISION ABSXI, NORM, SCALE, SSQ +* .. Intrinsic Functions .. + INTRINSIC ABS, SQRT +* .. +* .. Executable Statements .. + IF( N.LT.1 .OR. INCX.LT.1 )THEN + NORM = ZERO + ELSE IF( N.EQ.1 )THEN + NORM = ABS( X( 1 ) ) + ELSE + SCALE = ZERO + SSQ = ONE +* The following loop is equivalent to this call to the LAPACK +* auxiliary routine: +* CALL DLASSQ( N, X, INCX, SCALE, SSQ ) +* + DO 10, IX = 1, 1 + ( N - 1 )*INCX, INCX + IF( X( IX ).NE.ZERO )THEN + ABSXI = ABS( X( IX ) ) + IF( SCALE.LT.ABSXI )THEN + SSQ = ONE + SSQ*( SCALE/ABSXI )**2 + SCALE = ABSXI + ELSE + SSQ = SSQ + ( ABSXI/SCALE )**2 + END IF + END IF + 10 CONTINUE + NORM = SCALE * SQRT( SSQ ) + END IF +* + DNRM2 = NORM + RETURN +* +* End of DNRM2. +* + END diff --git a/2.3-1/src/fortran/blas/drot.f b/2.3-1/src/fortran/blas/drot.f new file mode 100644 index 00000000..b9ea3bd9 --- /dev/null +++ b/2.3-1/src/fortran/blas/drot.f @@ -0,0 +1,37 @@ + subroutine drot (n,dx,incx,dy,incy,c,s) +c +c applies a plane rotation. +c jack dongarra, linpack, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dy(*),dtemp,c,s + integer i,incx,incy,ix,iy,n +c + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments not equal +c to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + dtemp = c*dx(ix) + s*dy(iy) + dy(iy) = c*dy(iy) - s*dx(ix) + dx(ix) = dtemp + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c + 20 do 30 i = 1,n + dtemp = c*dx(i) + s*dy(i) + dy(i) = c*dy(i) - s*dx(i) + dx(i) = dtemp + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/drotg.f b/2.3-1/src/fortran/blas/drotg.f new file mode 100644 index 00000000..67838e2c --- /dev/null +++ b/2.3-1/src/fortran/blas/drotg.f @@ -0,0 +1,27 @@ + subroutine drotg(da,db,c,s) +c +c construct givens plane rotation. +c jack dongarra, linpack, 3/11/78. +c + double precision da,db,c,s,roe,scale,r,z +c + roe = db + if( dabs(da) .gt. dabs(db) ) roe = da + scale = dabs(da) + dabs(db) + if( scale .ne. 0.0d0 ) go to 10 + c = 1.0d0 + s = 0.0d0 + r = 0.0d0 + z = 0.0d0 + go to 20 + 10 r = scale*dsqrt((da/scale)**2 + (db/scale)**2) + r = dsign(1.0d0,roe)*r + c = da/r + s = db/r + z = 1.0d0 + if( dabs(da) .gt. dabs(db) ) z = s + if( dabs(db) .ge. dabs(da) .and. c .ne. 0.0d0 ) z = 1.0d0/c + 20 da = r + db = z + return + end diff --git a/2.3-1/src/fortran/blas/dsbmv.f b/2.3-1/src/fortran/blas/dsbmv.f new file mode 100644 index 00000000..272042af --- /dev/null +++ b/2.3-1/src/fortran/blas/dsbmv.f @@ -0,0 +1,303 @@ + SUBROUTINE DSBMV ( UPLO, N, K, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA, BETA + INTEGER INCX, INCY, K, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DSBMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n symmetric band matrix, with k super-diagonals. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the band matrix A is being supplied as +* follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* being supplied. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* being supplied. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry, K specifies the number of super-diagonals of the +* matrix A. K must satisfy 0 .le. K. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the symmetric matrix, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer the upper +* triangular part of a symmetric band matrix from conventional +* full matrix storage to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the symmetric matrix, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer the lower +* triangular part of a symmetric band matrix from conventional +* full matrix storage to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the +* vector y. On exit, Y is overwritten by the updated vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KPLUS1, KX, KY, L +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( K.LT.0 )THEN + INFO = 3 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + ELSE IF( INCY.EQ.0 )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of the array A +* are accessed sequentially with one pass through A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when upper triangle of A is stored. +* + KPLUS1 = K + 1 + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + L = KPLUS1 - J + DO 50, I = MAX( 1, J - K ), J - 1 + Y( I ) = Y( I ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + A( L + I, J )*X( I ) + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*A( KPLUS1, J ) + ALPHA*TEMP2 + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + L = KPLUS1 - J + DO 70, I = MAX( 1, J - K ), J - 1 + Y( IY ) = Y( IY ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + A( L + I, J )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*A( KPLUS1, J ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + IF( J.GT.K )THEN + KX = KX + INCX + KY = KY + INCY + END IF + 80 CONTINUE + END IF + ELSE +* +* Form y when lower triangle of A is stored. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*A( 1, J ) + L = 1 - J + DO 90, I = J + 1, MIN( N, J + K ) + Y( I ) = Y( I ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + A( L + I, J )*X( I ) + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*A( 1, J ) + L = 1 - J + IX = JX + IY = JY + DO 110, I = J + 1, MIN( N, J + K ) + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + A( L + I, J )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSBMV . +* + END diff --git a/2.3-1/src/fortran/blas/dscal.f b/2.3-1/src/fortran/blas/dscal.f new file mode 100644 index 00000000..e1467faf --- /dev/null +++ b/2.3-1/src/fortran/blas/dscal.f @@ -0,0 +1,43 @@ + subroutine dscal(n,da,dx,incx) +c +c scales a vector by a constant. +c uses unrolled loops for increment equal to one. +c jack dongarra, linpack, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision da,dx(*) + integer i,incx,m,mp1,n,nincx +c + if( n.le.0 .or. incx.le.0 )return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + nincx = n*incx + do 10 i = 1,nincx,incx + dx(i) = da*dx(i) + 10 continue + return +c +c code for increment equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,5) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dx(i) = da*dx(i) + 30 continue + if( n .lt. 5 ) return + 40 mp1 = m + 1 + do 50 i = mp1,n,5 + dx(i) = da*dx(i) + dx(i + 1) = da*dx(i + 1) + dx(i + 2) = da*dx(i + 2) + dx(i + 3) = da*dx(i + 3) + dx(i + 4) = da*dx(i + 4) + 50 continue + return + end diff --git a/2.3-1/src/fortran/blas/dspmv.f b/2.3-1/src/fortran/blas/dspmv.f new file mode 100644 index 00000000..3ace7bf2 --- /dev/null +++ b/2.3-1/src/fortran/blas/dspmv.f @@ -0,0 +1,262 @@ + SUBROUTINE DSPMV ( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA, BETA + INTEGER INCX, INCY, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DSPMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n symmetric matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* AP - DOUBLE PRECISION array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. On exit, Y is overwritten by the updated +* vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 6 + ELSE IF( INCY.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSPMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when AP contains the upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + K = KK + DO 50, I = 1, J - 1 + Y( I ) = Y( I ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + AP( K )*X( I ) + K = K + 1 + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*AP( KK + J - 1 ) + ALPHA*TEMP2 + KK = KK + J + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + DO 70, K = KK, KK + J - 2 + Y( IY ) = Y( IY ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + AP( K )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*AP( KK + J - 1 ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + KK = KK + J + 80 CONTINUE + END IF + ELSE +* +* Form y when AP contains the lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*AP( KK ) + K = KK + 1 + DO 90, I = J + 1, N + Y( I ) = Y( I ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + AP( K )*X( I ) + K = K + 1 + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + KK = KK + ( N - J + 1 ) + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*AP( KK ) + IX = JX + IY = JY + DO 110, K = KK + 1, KK + N - J + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + AP( K )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + KK = KK + ( N - J + 1 ) + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSPMV . +* + END diff --git a/2.3-1/src/fortran/blas/dspr.f b/2.3-1/src/fortran/blas/dspr.f new file mode 100644 index 00000000..3da6889c --- /dev/null +++ b/2.3-1/src/fortran/blas/dspr.f @@ -0,0 +1,198 @@ + SUBROUTINE DSPR ( UPLO, N, ALPHA, X, INCX, AP ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DSPR performs the symmetric rank 1 operation +* +* A := alpha*x*x' + A, +* +* where alpha is a real scalar, x is an n element vector and A is an +* n by n symmetric matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* AP - DOUBLE PRECISION array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. On exit, the array +* AP is overwritten by the upper triangular part of the +* updated matrix. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. On exit, the array +* AP is overwritten by the lower triangular part of the +* updated matrix. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSPR ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set the start point in X if the increment is not unity. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when upper triangle is stored in AP. +* + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*X( J ) + K = KK + DO 10, I = 1, J + AP( K ) = AP( K ) + X( I )*TEMP + K = K + 1 + 10 CONTINUE + END IF + KK = KK + J + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IX = KX + DO 30, K = KK, KK + J - 1 + AP( K ) = AP( K ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + END IF + JX = JX + INCX + KK = KK + J + 40 CONTINUE + END IF + ELSE +* +* Form A when lower triangle is stored in AP. +* + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*X( J ) + K = KK + DO 50, I = J, N + AP( K ) = AP( K ) + X( I )*TEMP + K = K + 1 + 50 CONTINUE + END IF + KK = KK + N - J + 1 + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IX = JX + DO 70, K = KK, KK + N - J + AP( K ) = AP( K ) + X( IX )*TEMP + IX = IX + INCX + 70 CONTINUE + END IF + JX = JX + INCX + KK = KK + N - J + 1 + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSPR . +* + END diff --git a/2.3-1/src/fortran/blas/dspr2.f b/2.3-1/src/fortran/blas/dspr2.f new file mode 100644 index 00000000..1cfce21b --- /dev/null +++ b/2.3-1/src/fortran/blas/dspr2.f @@ -0,0 +1,229 @@ + SUBROUTINE DSPR2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, AP ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, INCY, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DSPR2 performs the symmetric rank 2 operation +* +* A := alpha*x*y' + alpha*y*x' + A, +* +* where alpha is a scalar, x and y are n element vectors and A is an +* n by n symmetric matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* AP - DOUBLE PRECISION array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. On exit, the array +* AP is overwritten by the upper triangular part of the +* updated matrix. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the symmetric matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. On exit, the array +* AP is overwritten by the lower triangular part of the +* updated matrix. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSPR2 ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set up the start points in X and Y if the increments are not both +* unity. +* + IF( ( INCX.NE.1 ).OR.( INCY.NE.1 ) )THEN + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF + JX = KX + JY = KY + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when upper triangle is stored in AP. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 20, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( J ) + TEMP2 = ALPHA*X( J ) + K = KK + DO 10, I = 1, J + AP( K ) = AP( K ) + X( I )*TEMP1 + Y( I )*TEMP2 + K = K + 1 + 10 CONTINUE + END IF + KK = KK + J + 20 CONTINUE + ELSE + DO 40, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( JY ) + TEMP2 = ALPHA*X( JX ) + IX = KX + IY = KY + DO 30, K = KK, KK + J - 1 + AP( K ) = AP( K ) + X( IX )*TEMP1 + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 30 CONTINUE + END IF + JX = JX + INCX + JY = JY + INCY + KK = KK + J + 40 CONTINUE + END IF + ELSE +* +* Form A when lower triangle is stored in AP. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( J ) + TEMP2 = ALPHA*X( J ) + K = KK + DO 50, I = J, N + AP( K ) = AP( K ) + X( I )*TEMP1 + Y( I )*TEMP2 + K = K + 1 + 50 CONTINUE + END IF + KK = KK + N - J + 1 + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( JY ) + TEMP2 = ALPHA*X( JX ) + IX = JX + IY = JY + DO 70, K = KK, KK + N - J + AP( K ) = AP( K ) + X( IX )*TEMP1 + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + JY = JY + INCY + KK = KK + N - J + 1 + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSPR2 . +* + END diff --git a/2.3-1/src/fortran/blas/dswap.f b/2.3-1/src/fortran/blas/dswap.f new file mode 100644 index 00000000..7f7d1fbb --- /dev/null +++ b/2.3-1/src/fortran/blas/dswap.f @@ -0,0 +1,56 @@ + subroutine dswap (n,dx,incx,dy,incy) +c +c interchanges two vectors. +c uses unrolled loops for increments equal one. +c jack dongarra, linpack, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dy(*),dtemp + integer i,incx,incy,ix,iy,m,mp1,n +c + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments not equal +c to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + dtemp = dx(ix) + dx(ix) = dy(iy) + dy(iy) = dtemp + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c +c +c clean-up loop +c + 20 m = mod(n,3) + if( m .eq. 0 ) go to 40 + do 30 i = 1,m + dtemp = dx(i) + dx(i) = dy(i) + dy(i) = dtemp + 30 continue + if( n .lt. 3 ) return + 40 mp1 = m + 1 + do 50 i = mp1,n,3 + dtemp = dx(i) + dx(i) = dy(i) + dy(i) = dtemp + dtemp = dx(i + 1) + dx(i + 1) = dy(i + 1) + dy(i + 1) = dtemp + dtemp = dx(i + 2) + dx(i + 2) = dy(i + 2) + dy(i + 2) = dtemp + 50 continue + return + end diff --git a/2.3-1/src/fortran/blas/dsymm.f b/2.3-1/src/fortran/blas/dsymm.f new file mode 100644 index 00000000..0f251417 --- /dev/null +++ b/2.3-1/src/fortran/blas/dsymm.f @@ -0,0 +1,294 @@ + SUBROUTINE DSYMM ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO + INTEGER M, N, LDA, LDB, LDC + DOUBLE PRECISION ALPHA, BETA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* DSYMM performs one of the matrix-matrix operations +* +* C := alpha*A*B + beta*C, +* +* or +* +* C := alpha*B*A + beta*C, +* +* where alpha and beta are scalars, A is a symmetric matrix and B and +* C are m by n matrices. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether the symmetric matrix A +* appears on the left or right in the operation as follows: +* +* SIDE = 'L' or 'l' C := alpha*A*B + beta*C, +* +* SIDE = 'R' or 'r' C := alpha*B*A + beta*C, +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the symmetric matrix A is to be +* referenced as follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of the +* symmetric matrix is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of the +* symmetric matrix is to be referenced. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix C. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix C. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +* m when SIDE = 'L' or 'l' and is n otherwise. +* Before entry with SIDE = 'L' or 'l', the m by m part of +* the array A must contain the symmetric matrix, such that +* when UPLO = 'U' or 'u', the leading m by m upper triangular +* part of the array A must contain the upper triangular part +* of the symmetric matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading m by m lower triangular part of the array A +* must contain the lower triangular part of the symmetric +* matrix and the strictly upper triangular part of A is not +* referenced. +* Before entry with SIDE = 'R' or 'r', the n by n part of +* the array A must contain the symmetric matrix, such that +* when UPLO = 'U' or 'u', the leading n by n upper triangular +* part of the array A must contain the upper triangular part +* of the symmetric matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading n by n lower triangular part of the array A +* must contain the lower triangular part of the symmetric +* matrix and the strictly upper triangular part of A is not +* referenced. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), otherwise LDA must be at +* least max( 1, n ). +* Unchanged on exit. +* +* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then C need not be set on input. +* Unchanged on exit. +* +* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). +* Before entry, the leading m by n part of the array C must +* contain the matrix C, except when beta is zero, in which +* case C need not be set on entry. +* On exit, the array C is overwritten by the m by n updated +* matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, K, NROWA + DOUBLE PRECISION TEMP1, TEMP2 +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Set NROWA as the number of rows of A. +* + IF( LSAME( SIDE, 'L' ) )THEN + NROWA = M + ELSE + NROWA = N + END IF + UPPER = LSAME( UPLO, 'U' ) +* +* Test the input parameters. +* + INFO = 0 + IF( ( .NOT.LSAME( SIDE, 'L' ) ).AND. + $ ( .NOT.LSAME( SIDE, 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO, 'L' ) ) )THEN + INFO = 2 + ELSE IF( M .LT.0 )THEN + INFO = 3 + ELSE IF( N .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, M ) )THEN + INFO = 12 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, M + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( SIDE, 'L' ) )THEN +* +* Form C := alpha*A*B + beta*C. +* + IF( UPPER )THEN + DO 70, J = 1, N + DO 60, I = 1, M + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 50, K = 1, I - 1 + C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) + TEMP2 = TEMP2 + B( K, J )*A( K, I ) + 50 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*A( I, I ) + ALPHA*TEMP2 + END IF + 60 CONTINUE + 70 CONTINUE + ELSE + DO 100, J = 1, N + DO 90, I = M, 1, -1 + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 80, K = I + 1, M + C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) + TEMP2 = TEMP2 + B( K, J )*A( K, I ) + 80 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*A( I, I ) + ALPHA*TEMP2 + END IF + 90 CONTINUE + 100 CONTINUE + END IF + ELSE +* +* Form C := alpha*B*A + beta*C. +* + DO 170, J = 1, N + TEMP1 = ALPHA*A( J, J ) + IF( BETA.EQ.ZERO )THEN + DO 110, I = 1, M + C( I, J ) = TEMP1*B( I, J ) + 110 CONTINUE + ELSE + DO 120, I = 1, M + C( I, J ) = BETA*C( I, J ) + TEMP1*B( I, J ) + 120 CONTINUE + END IF + DO 140, K = 1, J - 1 + IF( UPPER )THEN + TEMP1 = ALPHA*A( K, J ) + ELSE + TEMP1 = ALPHA*A( J, K ) + END IF + DO 130, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 130 CONTINUE + 140 CONTINUE + DO 160, K = J + 1, N + IF( UPPER )THEN + TEMP1 = ALPHA*A( J, K ) + ELSE + TEMP1 = ALPHA*A( K, J ) + END IF + DO 150, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 150 CONTINUE + 160 CONTINUE + 170 CONTINUE + END IF +* + RETURN +* +* End of DSYMM . +* + END diff --git a/2.3-1/src/fortran/blas/dsymv.f b/2.3-1/src/fortran/blas/dsymv.f new file mode 100644 index 00000000..7592d156 --- /dev/null +++ b/2.3-1/src/fortran/blas/dsymv.f @@ -0,0 +1,262 @@ + SUBROUTINE DSYMV ( UPLO, N, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA, BETA + INTEGER INCX, INCY, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DSYMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n symmetric matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of A is not referenced. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. On exit, Y is overwritten by the updated +* vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 5 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + ELSE IF( INCY.EQ.0 )THEN + INFO = 10 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when A is stored in upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + DO 50, I = 1, J - 1 + Y( I ) = Y( I ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + A( I, J )*X( I ) + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*A( J, J ) + ALPHA*TEMP2 + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + DO 70, I = 1, J - 1 + Y( IY ) = Y( IY ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + A( I, J )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*A( J, J ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 80 CONTINUE + END IF + ELSE +* +* Form y when A is stored in lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*A( J, J ) + DO 90, I = J + 1, N + Y( I ) = Y( I ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + A( I, J )*X( I ) + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*A( J, J ) + IX = JX + IY = JY + DO 110, I = J + 1, N + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + A( I, J )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSYMV . +* + END diff --git a/2.3-1/src/fortran/blas/dsyr.f b/2.3-1/src/fortran/blas/dsyr.f new file mode 100644 index 00000000..87377196 --- /dev/null +++ b/2.3-1/src/fortran/blas/dsyr.f @@ -0,0 +1,197 @@ + SUBROUTINE DSYR ( UPLO, N, ALPHA, X, INCX, A, LDA ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DSYR performs the symmetric rank 1 operation +* +* A := alpha*x*x' + A, +* +* where alpha is a real scalar, x is an n element vector and A is an +* n by n symmetric matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of A is not referenced. On exit, the +* upper triangular part of the array A is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of A is not referenced. On exit, the +* lower triangular part of the array A is overwritten by the +* lower triangular part of the updated matrix. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, KX +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYR ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set the start point in X if the increment is not unity. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when A is stored in upper triangle. +* + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*X( J ) + DO 10, I = 1, J + A( I, J ) = A( I, J ) + X( I )*TEMP + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IX = KX + DO 30, I = 1, J + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + END IF + JX = JX + INCX + 40 CONTINUE + END IF + ELSE +* +* Form A when A is stored in lower triangle. +* + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*X( J ) + DO 50, I = J, N + A( I, J ) = A( I, J ) + X( I )*TEMP + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IX = JX + DO 70, I = J, N + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSYR . +* + END diff --git a/2.3-1/src/fortran/blas/dsyr2.f b/2.3-1/src/fortran/blas/dsyr2.f new file mode 100644 index 00000000..918ad8a7 --- /dev/null +++ b/2.3-1/src/fortran/blas/dsyr2.f @@ -0,0 +1,230 @@ + SUBROUTINE DSYR2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, INCY, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* DSYR2 performs the symmetric rank 2 operation +* +* A := alpha*x*y' + alpha*y*x' + A, +* +* where alpha is a scalar, x and y are n element vectors and A is an n +* by n symmetric matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of A is not referenced. On exit, the +* upper triangular part of the array A is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of A is not referenced. On exit, the +* lower triangular part of the array A is overwritten by the +* lower triangular part of the updated matrix. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYR2 ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set up the start points in X and Y if the increments are not both +* unity. +* + IF( ( INCX.NE.1 ).OR.( INCY.NE.1 ) )THEN + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF + JX = KX + JY = KY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when A is stored in the upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 20, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( J ) + TEMP2 = ALPHA*X( J ) + DO 10, I = 1, J + A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + DO 40, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( JY ) + TEMP2 = ALPHA*X( JX ) + IX = KX + IY = KY + DO 30, I = 1, J + A( I, J ) = A( I, J ) + X( IX )*TEMP1 + $ + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 30 CONTINUE + END IF + JX = JX + INCX + JY = JY + INCY + 40 CONTINUE + END IF + ELSE +* +* Form A when A is stored in the lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( J ) + TEMP2 = ALPHA*X( J ) + DO 50, I = J, N + A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*Y( JY ) + TEMP2 = ALPHA*X( JX ) + IX = JX + IY = JY + DO 70, I = J, N + A( I, J ) = A( I, J ) + X( IX )*TEMP1 + $ + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + JY = JY + INCY + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSYR2 . +* + END diff --git a/2.3-1/src/fortran/blas/dsyr2k.f b/2.3-1/src/fortran/blas/dsyr2k.f new file mode 100644 index 00000000..ac7d97de --- /dev/null +++ b/2.3-1/src/fortran/blas/dsyr2k.f @@ -0,0 +1,327 @@ + SUBROUTINE DSYR2K( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 UPLO, TRANS + INTEGER N, K, LDA, LDB, LDC + DOUBLE PRECISION ALPHA, BETA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* DSYR2K performs one of the symmetric rank 2k operations +* +* C := alpha*A*B' + alpha*B*A' + beta*C, +* +* or +* +* C := alpha*A'*B + alpha*B'*A + beta*C, +* +* where alpha and beta are scalars, C is an n by n symmetric matrix +* and A and B are n by k matrices in the first case and k by n +* matrices in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' + +* beta*C. +* +* TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A + +* beta*C. +* +* TRANS = 'C' or 'c' C := alpha*A'*B + alpha*B'*A + +* beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrices A and B, and on entry with +* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number +* of rows of the matrices A and B. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array B must contain the matrix B, otherwise +* the leading k by n part of the array B must contain the +* matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDB must be at least max( 1, n ), otherwise LDB must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + DOUBLE PRECISION TEMP1, TEMP2 +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) )THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN + INFO = 2 + ELSE IF( N .LT.0 )THEN + INFO = 3 + ELSE IF( K .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, N ) )THEN + INFO = 12 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYR2K', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( UPPER )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, J + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.ZERO )THEN + DO 60, J = 1, N + DO 50, I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80, J = 1, N + DO 70, I = J, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form C := alpha*A*B' + alpha*B*A' + C. +* + IF( UPPER )THEN + DO 130, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 90, I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 100, I = 1, J + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + END IF + DO 120, L = 1, K + IF( ( A( J, L ).NE.ZERO ).OR. + $ ( B( J, L ).NE.ZERO ) )THEN + TEMP1 = ALPHA*B( J, L ) + TEMP2 = ALPHA*A( J, L ) + DO 110, I = 1, J + C( I, J ) = C( I, J ) + + $ A( I, L )*TEMP1 + B( I, L )*TEMP2 + 110 CONTINUE + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 140, I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 150, I = J, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + END IF + DO 170, L = 1, K + IF( ( A( J, L ).NE.ZERO ).OR. + $ ( B( J, L ).NE.ZERO ) )THEN + TEMP1 = ALPHA*B( J, L ) + TEMP2 = ALPHA*A( J, L ) + DO 160, I = J, N + C( I, J ) = C( I, J ) + + $ A( I, L )*TEMP1 + B( I, L )*TEMP2 + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*A'*B + alpha*B'*A + C. +* + IF( UPPER )THEN + DO 210, J = 1, N + DO 200, I = 1, J + TEMP1 = ZERO + TEMP2 = ZERO + DO 190, L = 1, K + TEMP1 = TEMP1 + A( L, I )*B( L, J ) + TEMP2 = TEMP2 + B( L, I )*A( L, J ) + 190 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ ALPHA*TEMP1 + ALPHA*TEMP2 + END IF + 200 CONTINUE + 210 CONTINUE + ELSE + DO 240, J = 1, N + DO 230, I = J, N + TEMP1 = ZERO + TEMP2 = ZERO + DO 220, L = 1, K + TEMP1 = TEMP1 + A( L, I )*B( L, J ) + TEMP2 = TEMP2 + B( L, I )*A( L, J ) + 220 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ ALPHA*TEMP1 + ALPHA*TEMP2 + END IF + 230 CONTINUE + 240 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSYR2K. +* + END diff --git a/2.3-1/src/fortran/blas/dsyrk.f b/2.3-1/src/fortran/blas/dsyrk.f new file mode 100644 index 00000000..b618b296 --- /dev/null +++ b/2.3-1/src/fortran/blas/dsyrk.f @@ -0,0 +1,294 @@ + SUBROUTINE DSYRK ( UPLO, TRANS, N, K, ALPHA, A, LDA, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 UPLO, TRANS + INTEGER N, K, LDA, LDC + DOUBLE PRECISION ALPHA, BETA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* DSYRK performs one of the symmetric rank k operations +* +* C := alpha*A*A' + beta*C, +* +* or +* +* C := alpha*A'*A + beta*C, +* +* where alpha and beta are scalars, C is an n by n symmetric matrix +* and A is an n by k matrix in the first case and a k by n matrix +* in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*A' + beta*C. +* +* TRANS = 'T' or 't' C := alpha*A'*A + beta*C. +* +* TRANS = 'C' or 'c' C := alpha*A'*A + beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrix A, and on entry with +* TRANS = 'T' or 't' or 'C' or 'c', K specifies the number +* of rows of the matrix A. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + DOUBLE PRECISION TEMP +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) )THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN + INFO = 2 + ELSE IF( N .LT.0 )THEN + INFO = 3 + ELSE IF( K .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDC.LT.MAX( 1, N ) )THEN + INFO = 10 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DSYRK ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( UPPER )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, J + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.ZERO )THEN + DO 60, J = 1, N + DO 50, I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80, J = 1, N + DO 70, I = J, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form C := alpha*A*A' + beta*C. +* + IF( UPPER )THEN + DO 130, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 90, I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 100, I = 1, J + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + END IF + DO 120, L = 1, K + IF( A( J, L ).NE.ZERO )THEN + TEMP = ALPHA*A( J, L ) + DO 110, I = 1, J + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 110 CONTINUE + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 140, I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 150, I = J, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + END IF + DO 170, L = 1, K + IF( A( J, L ).NE.ZERO )THEN + TEMP = ALPHA*A( J, L ) + DO 160, I = J, N + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*A'*A + beta*C. +* + IF( UPPER )THEN + DO 210, J = 1, N + DO 200, I = 1, J + TEMP = ZERO + DO 190, L = 1, K + TEMP = TEMP + A( L, I )*A( L, J ) + 190 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 200 CONTINUE + 210 CONTINUE + ELSE + DO 240, J = 1, N + DO 230, I = J, N + TEMP = ZERO + DO 220, L = 1, K + TEMP = TEMP + A( L, I )*A( L, J ) + 220 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 230 CONTINUE + 240 CONTINUE + END IF + END IF +* + RETURN +* +* End of DSYRK . +* + END diff --git a/2.3-1/src/fortran/blas/dtbmv.f b/2.3-1/src/fortran/blas/dtbmv.f new file mode 100644 index 00000000..1363db79 --- /dev/null +++ b/2.3-1/src/fortran/blas/dtbmv.f @@ -0,0 +1,342 @@ + SUBROUTINE DTBMV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, K, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTBMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular band matrix, with ( k + 1 ) diagonals. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := A'*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with UPLO = 'U' or 'u', K specifies the number of +* super-diagonals of the matrix A. +* On entry with UPLO = 'L' or 'l', K specifies the number of +* sub-diagonals of the matrix A. +* K must satisfy 0 .le. K. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer an upper +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer a lower +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Note that when DIAG = 'U' or 'u' the elements of the array A +* corresponding to the diagonal elements of the matrix are not +* referenced, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( K.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 7 + ELSE IF( INCX.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + L = KPLUS1 - J + DO 10, I = MAX( 1, J - K ), J - 1 + X( I ) = X( I ) + TEMP*A( L + I, J ) + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( KPLUS1, J ) + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + L = KPLUS1 - J + DO 30, I = MAX( 1, J - K ), J - 1 + X( IX ) = X( IX ) + TEMP*A( L + I, J ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( KPLUS1, J ) + END IF + JX = JX + INCX + IF( J.GT.K ) + $ KX = KX + INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + L = 1 - J + DO 50, I = MIN( N, J + K ), J + 1, -1 + X( I ) = X( I ) + TEMP*A( L + I, J ) + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( 1, J ) + END IF + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + L = 1 - J + DO 70, I = MIN( N, J + K ), J + 1, -1 + X( IX ) = X( IX ) + TEMP*A( L + I, J ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( 1, J ) + END IF + JX = JX - INCX + IF( ( N - J ).GE.K ) + $ KX = KX - INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 100, J = N, 1, -1 + TEMP = X( J ) + L = KPLUS1 - J + IF( NOUNIT ) + $ TEMP = TEMP*A( KPLUS1, J ) + DO 90, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + A( L + I, J )*X( I ) + 90 CONTINUE + X( J ) = TEMP + 100 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 120, J = N, 1, -1 + TEMP = X( JX ) + KX = KX - INCX + IX = KX + L = KPLUS1 - J + IF( NOUNIT ) + $ TEMP = TEMP*A( KPLUS1, J ) + DO 110, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + A( L + I, J )*X( IX ) + IX = IX - INCX + 110 CONTINUE + X( JX ) = TEMP + JX = JX - INCX + 120 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 140, J = 1, N + TEMP = X( J ) + L = 1 - J + IF( NOUNIT ) + $ TEMP = TEMP*A( 1, J ) + DO 130, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + A( L + I, J )*X( I ) + 130 CONTINUE + X( J ) = TEMP + 140 CONTINUE + ELSE + JX = KX + DO 160, J = 1, N + TEMP = X( JX ) + KX = KX + INCX + IX = KX + L = 1 - J + IF( NOUNIT ) + $ TEMP = TEMP*A( 1, J ) + DO 150, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + A( L + I, J )*X( IX ) + IX = IX + INCX + 150 CONTINUE + X( JX ) = TEMP + JX = JX + INCX + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTBMV . +* + END diff --git a/2.3-1/src/fortran/blas/dtbsv.f b/2.3-1/src/fortran/blas/dtbsv.f new file mode 100644 index 00000000..d87ed82d --- /dev/null +++ b/2.3-1/src/fortran/blas/dtbsv.f @@ -0,0 +1,346 @@ + SUBROUTINE DTBSV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, K, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTBSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular band matrix, with ( k + 1 ) +* diagonals. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' A'*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with UPLO = 'U' or 'u', K specifies the number of +* super-diagonals of the matrix A. +* On entry with UPLO = 'L' or 'l', K specifies the number of +* sub-diagonals of the matrix A. +* K must satisfy 0 .le. K. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer an upper +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer a lower +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Note that when DIAG = 'U' or 'u' the elements of the array A +* corresponding to the diagonal elements of the matrix are not +* referenced, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( K.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 7 + ELSE IF( INCX.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTBSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed by sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + L = KPLUS1 - J + IF( NOUNIT ) + $ X( J ) = X( J )/A( KPLUS1, J ) + TEMP = X( J ) + DO 10, I = J - 1, MAX( 1, J - K ), -1 + X( I ) = X( I ) - TEMP*A( L + I, J ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 40, J = N, 1, -1 + KX = KX - INCX + IF( X( JX ).NE.ZERO )THEN + IX = KX + L = KPLUS1 - J + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( KPLUS1, J ) + TEMP = X( JX ) + DO 30, I = J - 1, MAX( 1, J - K ), -1 + X( IX ) = X( IX ) - TEMP*A( L + I, J ) + IX = IX - INCX + 30 CONTINUE + END IF + JX = JX - INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + L = 1 - J + IF( NOUNIT ) + $ X( J ) = X( J )/A( 1, J ) + TEMP = X( J ) + DO 50, I = J + 1, MIN( N, J + K ) + X( I ) = X( I ) - TEMP*A( L + I, J ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + KX = KX + INCX + IF( X( JX ).NE.ZERO )THEN + IX = KX + L = 1 - J + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( 1, J ) + TEMP = X( JX ) + DO 70, I = J + 1, MIN( N, J + K ) + X( IX ) = X( IX ) - TEMP*A( L + I, J ) + IX = IX + INCX + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A')*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 100, J = 1, N + TEMP = X( J ) + L = KPLUS1 - J + DO 90, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - A( L + I, J )*X( I ) + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( KPLUS1, J ) + X( J ) = TEMP + 100 CONTINUE + ELSE + JX = KX + DO 120, J = 1, N + TEMP = X( JX ) + IX = KX + L = KPLUS1 - J + DO 110, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - A( L + I, J )*X( IX ) + IX = IX + INCX + 110 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( KPLUS1, J ) + X( JX ) = TEMP + JX = JX + INCX + IF( J.GT.K ) + $ KX = KX + INCX + 120 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 140, J = N, 1, -1 + TEMP = X( J ) + L = 1 - J + DO 130, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - A( L + I, J )*X( I ) + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( 1, J ) + X( J ) = TEMP + 140 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 160, J = N, 1, -1 + TEMP = X( JX ) + IX = KX + L = 1 - J + DO 150, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - A( L + I, J )*X( IX ) + IX = IX - INCX + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( 1, J ) + X( JX ) = TEMP + JX = JX - INCX + IF( ( N - J ).GE.K ) + $ KX = KX - INCX + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTBSV . +* + END diff --git a/2.3-1/src/fortran/blas/dtpmv.f b/2.3-1/src/fortran/blas/dtpmv.f new file mode 100644 index 00000000..ee11bc1b --- /dev/null +++ b/2.3-1/src/fortran/blas/dtpmv.f @@ -0,0 +1,299 @@ + SUBROUTINE DTPMV ( UPLO, TRANS, DIAG, N, AP, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTPMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := A'*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* AP - DOUBLE PRECISION array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) +* respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) +* respectively, and so on. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced, but are assumed to be unity. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTPMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of AP are +* accessed sequentially with one pass through AP. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x:= A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK =1 + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + K = KK + DO 10, I = 1, J - 1 + X( I ) = X( I ) + TEMP*AP( K ) + K = K + 1 + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*AP( KK + J - 1 ) + END IF + KK = KK + J + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 30, K = KK, KK + J - 2 + X( IX ) = X( IX ) + TEMP*AP( K ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*AP( KK + J - 1 ) + END IF + JX = JX + INCX + KK = KK + J + 40 CONTINUE + END IF + ELSE + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + K = KK + DO 50, I = N, J + 1, -1 + X( I ) = X( I ) + TEMP*AP( K ) + K = K - 1 + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*AP( KK - N + J ) + END IF + KK = KK - ( N - J + 1 ) + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 70, K = KK, KK - ( N - ( J + 1 ) ), -1 + X( IX ) = X( IX ) + TEMP*AP( K ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*AP( KK - N + J ) + END IF + JX = JX - INCX + KK = KK - ( N - J + 1 ) + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 100, J = N, 1, -1 + TEMP = X( J ) + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + K = KK - 1 + DO 90, I = J - 1, 1, -1 + TEMP = TEMP + AP( K )*X( I ) + K = K - 1 + 90 CONTINUE + X( J ) = TEMP + KK = KK - J + 100 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 120, J = N, 1, -1 + TEMP = X( JX ) + IX = JX + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 110, K = KK - 1, KK - J + 1, -1 + IX = IX - INCX + TEMP = TEMP + AP( K )*X( IX ) + 110 CONTINUE + X( JX ) = TEMP + JX = JX - INCX + KK = KK - J + 120 CONTINUE + END IF + ELSE + KK = 1 + IF( INCX.EQ.1 )THEN + DO 140, J = 1, N + TEMP = X( J ) + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + K = KK + 1 + DO 130, I = J + 1, N + TEMP = TEMP + AP( K )*X( I ) + K = K + 1 + 130 CONTINUE + X( J ) = TEMP + KK = KK + ( N - J + 1 ) + 140 CONTINUE + ELSE + JX = KX + DO 160, J = 1, N + TEMP = X( JX ) + IX = JX + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 150, K = KK + 1, KK + N - J + IX = IX + INCX + TEMP = TEMP + AP( K )*X( IX ) + 150 CONTINUE + X( JX ) = TEMP + JX = JX + INCX + KK = KK + ( N - J + 1 ) + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTPMV . +* + END diff --git a/2.3-1/src/fortran/blas/dtpsv.f b/2.3-1/src/fortran/blas/dtpsv.f new file mode 100644 index 00000000..91930d9f --- /dev/null +++ b/2.3-1/src/fortran/blas/dtpsv.f @@ -0,0 +1,302 @@ + SUBROUTINE DTPSV ( UPLO, TRANS, DIAG, N, AP, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTPSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular matrix, supplied in packed form. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' A'*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* AP - DOUBLE PRECISION array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) +* respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) +* respectively, and so on. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced, but are assumed to be unity. +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTPSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of AP are +* accessed sequentially with one pass through AP. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/AP( KK ) + TEMP = X( J ) + K = KK - 1 + DO 10, I = J - 1, 1, -1 + X( I ) = X( I ) - TEMP*AP( K ) + K = K - 1 + 10 CONTINUE + END IF + KK = KK - J + 20 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 40, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/AP( KK ) + TEMP = X( JX ) + IX = JX + DO 30, K = KK - 1, KK - J + 1, -1 + IX = IX - INCX + X( IX ) = X( IX ) - TEMP*AP( K ) + 30 CONTINUE + END IF + JX = JX - INCX + KK = KK - J + 40 CONTINUE + END IF + ELSE + KK = 1 + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/AP( KK ) + TEMP = X( J ) + K = KK + 1 + DO 50, I = J + 1, N + X( I ) = X( I ) - TEMP*AP( K ) + K = K + 1 + 50 CONTINUE + END IF + KK = KK + ( N - J + 1 ) + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/AP( KK ) + TEMP = X( JX ) + IX = JX + DO 70, K = KK + 1, KK + N - J + IX = IX + INCX + X( IX ) = X( IX ) - TEMP*AP( K ) + 70 CONTINUE + END IF + JX = JX + INCX + KK = KK + ( N - J + 1 ) + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A' )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = 1 + IF( INCX.EQ.1 )THEN + DO 100, J = 1, N + TEMP = X( J ) + K = KK + DO 90, I = 1, J - 1 + TEMP = TEMP - AP( K )*X( I ) + K = K + 1 + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK + J - 1 ) + X( J ) = TEMP + KK = KK + J + 100 CONTINUE + ELSE + JX = KX + DO 120, J = 1, N + TEMP = X( JX ) + IX = KX + DO 110, K = KK, KK + J - 2 + TEMP = TEMP - AP( K )*X( IX ) + IX = IX + INCX + 110 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK + J - 1 ) + X( JX ) = TEMP + JX = JX + INCX + KK = KK + J + 120 CONTINUE + END IF + ELSE + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 140, J = N, 1, -1 + TEMP = X( J ) + K = KK + DO 130, I = N, J + 1, -1 + TEMP = TEMP - AP( K )*X( I ) + K = K - 1 + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK - N + J ) + X( J ) = TEMP + KK = KK - ( N - J + 1 ) + 140 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 160, J = N, 1, -1 + TEMP = X( JX ) + IX = KX + DO 150, K = KK, KK - ( N - ( J + 1 ) ), -1 + TEMP = TEMP - AP( K )*X( IX ) + IX = IX - INCX + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK - N + J ) + X( JX ) = TEMP + JX = JX - INCX + KK = KK - (N - J + 1 ) + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTPSV . +* + END diff --git a/2.3-1/src/fortran/blas/dtrmm.f b/2.3-1/src/fortran/blas/dtrmm.f new file mode 100644 index 00000000..f98da46a --- /dev/null +++ b/2.3-1/src/fortran/blas/dtrmm.f @@ -0,0 +1,355 @@ + SUBROUTINE DTRMM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, + $ B, LDB ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO, TRANSA, DIAG + INTEGER M, N, LDA, LDB + DOUBLE PRECISION ALPHA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DTRMM performs one of the matrix-matrix operations +* +* B := alpha*op( A )*B, or B := alpha*B*op( A ), +* +* where alpha is a scalar, B is an m by n matrix, A is a unit, or +* non-unit, upper or lower triangular matrix and op( A ) is one of +* +* op( A ) = A or op( A ) = A'. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether op( A ) multiplies B from +* the left or right as follows: +* +* SIDE = 'L' or 'l' B := alpha*op( A )*B. +* +* SIDE = 'R' or 'r' B := alpha*B*op( A ). +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix A is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n' op( A ) = A. +* +* TRANSA = 'T' or 't' op( A ) = A'. +* +* TRANSA = 'C' or 'c' op( A ) = A'. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit triangular +* as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of B. M must be at +* least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of B. N must be +* at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. When alpha is +* zero then A is not referenced and B need not be set before +* entry. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m +* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. +* Before entry with UPLO = 'U' or 'u', the leading k by k +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading k by k +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' +* then LDA must be at least max( 1, n ). +* Unchanged on exit. +* +* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the matrix B, and on exit is overwritten by the +* transformed matrix. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL LSIDE, NOUNIT, UPPER + INTEGER I, INFO, J, K, NROWA + DOUBLE PRECISION TEMP +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + LSIDE = LSAME( SIDE , 'L' ) + IF( LSIDE )THEN + NROWA = M + ELSE + NROWA = N + END IF + NOUNIT = LSAME( DIAG , 'N' ) + UPPER = LSAME( UPLO , 'U' ) +* + INFO = 0 + IF( ( .NOT.LSIDE ).AND. + $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 2 + ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN + INFO = 3 + ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. + $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN + INFO = 4 + ELSE IF( M .LT.0 )THEN + INFO = 5 + ELSE IF( N .LT.0 )THEN + INFO = 6 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTRMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + B( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + RETURN + END IF +* +* Start the operations. +* + IF( LSIDE )THEN + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*A*B. +* + IF( UPPER )THEN + DO 50, J = 1, N + DO 40, K = 1, M + IF( B( K, J ).NE.ZERO )THEN + TEMP = ALPHA*B( K, J ) + DO 30, I = 1, K - 1 + B( I, J ) = B( I, J ) + TEMP*A( I, K ) + 30 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP*A( K, K ) + B( K, J ) = TEMP + END IF + 40 CONTINUE + 50 CONTINUE + ELSE + DO 80, J = 1, N + DO 70 K = M, 1, -1 + IF( B( K, J ).NE.ZERO )THEN + TEMP = ALPHA*B( K, J ) + B( K, J ) = TEMP + IF( NOUNIT ) + $ B( K, J ) = B( K, J )*A( K, K ) + DO 60, I = K + 1, M + B( I, J ) = B( I, J ) + TEMP*A( I, K ) + 60 CONTINUE + END IF + 70 CONTINUE + 80 CONTINUE + END IF + ELSE +* +* Form B := alpha*B*A'. +* + IF( UPPER )THEN + DO 110, J = 1, N + DO 100, I = M, 1, -1 + TEMP = B( I, J ) + IF( NOUNIT ) + $ TEMP = TEMP*A( I, I ) + DO 90, K = 1, I - 1 + TEMP = TEMP + A( K, I )*B( K, J ) + 90 CONTINUE + B( I, J ) = ALPHA*TEMP + 100 CONTINUE + 110 CONTINUE + ELSE + DO 140, J = 1, N + DO 130, I = 1, M + TEMP = B( I, J ) + IF( NOUNIT ) + $ TEMP = TEMP*A( I, I ) + DO 120, K = I + 1, M + TEMP = TEMP + A( K, I )*B( K, J ) + 120 CONTINUE + B( I, J ) = ALPHA*TEMP + 130 CONTINUE + 140 CONTINUE + END IF + END IF + ELSE + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*B*A. +* + IF( UPPER )THEN + DO 180, J = N, 1, -1 + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 150, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 150 CONTINUE + DO 170, K = 1, J - 1 + IF( A( K, J ).NE.ZERO )THEN + TEMP = ALPHA*A( K, J ) + DO 160, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + ELSE + DO 220, J = 1, N + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 190, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 190 CONTINUE + DO 210, K = J + 1, N + IF( A( K, J ).NE.ZERO )THEN + TEMP = ALPHA*A( K, J ) + DO 200, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 200 CONTINUE + END IF + 210 CONTINUE + 220 CONTINUE + END IF + ELSE +* +* Form B := alpha*B*A'. +* + IF( UPPER )THEN + DO 260, K = 1, N + DO 240, J = 1, K - 1 + IF( A( J, K ).NE.ZERO )THEN + TEMP = ALPHA*A( J, K ) + DO 230, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 230 CONTINUE + END IF + 240 CONTINUE + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( K, K ) + IF( TEMP.NE.ONE )THEN + DO 250, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 250 CONTINUE + END IF + 260 CONTINUE + ELSE + DO 300, K = N, 1, -1 + DO 280, J = K + 1, N + IF( A( J, K ).NE.ZERO )THEN + TEMP = ALPHA*A( J, K ) + DO 270, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 270 CONTINUE + END IF + 280 CONTINUE + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( K, K ) + IF( TEMP.NE.ONE )THEN + DO 290, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 290 CONTINUE + END IF + 300 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTRMM . +* + END diff --git a/2.3-1/src/fortran/blas/dtrmv.f b/2.3-1/src/fortran/blas/dtrmv.f new file mode 100644 index 00000000..3d5c61b2 --- /dev/null +++ b/2.3-1/src/fortran/blas/dtrmv.f @@ -0,0 +1,286 @@ + SUBROUTINE DTRMV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTRMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := A'*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, KX + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTRMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + DO 10, I = 1, J - 1 + X( I ) = X( I ) + TEMP*A( I, J ) + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( J, J ) + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 30, I = 1, J - 1 + X( IX ) = X( IX ) + TEMP*A( I, J ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( J, J ) + END IF + JX = JX + INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + DO 50, I = N, J + 1, -1 + X( I ) = X( I ) + TEMP*A( I, J ) + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( J, J ) + END IF + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 70, I = N, J + 1, -1 + X( IX ) = X( IX ) + TEMP*A( I, J ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( J, J ) + END IF + JX = JX - INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 100, J = N, 1, -1 + TEMP = X( J ) + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 90, I = J - 1, 1, -1 + TEMP = TEMP + A( I, J )*X( I ) + 90 CONTINUE + X( J ) = TEMP + 100 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 120, J = N, 1, -1 + TEMP = X( JX ) + IX = JX + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 110, I = J - 1, 1, -1 + IX = IX - INCX + TEMP = TEMP + A( I, J )*X( IX ) + 110 CONTINUE + X( JX ) = TEMP + JX = JX - INCX + 120 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 140, J = 1, N + TEMP = X( J ) + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 130, I = J + 1, N + TEMP = TEMP + A( I, J )*X( I ) + 130 CONTINUE + X( J ) = TEMP + 140 CONTINUE + ELSE + JX = KX + DO 160, J = 1, N + TEMP = X( JX ) + IX = JX + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 150, I = J + 1, N + IX = IX + INCX + TEMP = TEMP + A( I, J )*X( IX ) + 150 CONTINUE + X( JX ) = TEMP + JX = JX + INCX + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTRMV . +* + END diff --git a/2.3-1/src/fortran/blas/dtrsm.f b/2.3-1/src/fortran/blas/dtrsm.f new file mode 100644 index 00000000..e8425142 --- /dev/null +++ b/2.3-1/src/fortran/blas/dtrsm.f @@ -0,0 +1,378 @@ + SUBROUTINE DTRSM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, + $ B, LDB ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO, TRANSA, DIAG + INTEGER M, N, LDA, LDB + DOUBLE PRECISION ALPHA +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DTRSM solves one of the matrix equations +* +* op( A )*X = alpha*B, or X*op( A ) = alpha*B, +* +* where alpha is a scalar, X and B are m by n matrices, A is a unit, or +* non-unit, upper or lower triangular matrix and op( A ) is one of +* +* op( A ) = A or op( A ) = A'. +* +* The matrix X is overwritten on B. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether op( A ) appears on the left +* or right of X as follows: +* +* SIDE = 'L' or 'l' op( A )*X = alpha*B. +* +* SIDE = 'R' or 'r' X*op( A ) = alpha*B. +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix A is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n' op( A ) = A. +* +* TRANSA = 'T' or 't' op( A ) = A'. +* +* TRANSA = 'C' or 'c' op( A ) = A'. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit triangular +* as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of B. M must be at +* least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of B. N must be +* at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. When alpha is +* zero then A is not referenced and B need not be set before +* entry. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m +* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. +* Before entry with UPLO = 'U' or 'u', the leading k by k +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading k by k +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' +* then LDA must be at least max( 1, n ). +* Unchanged on exit. +* +* B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the right-hand side matrix B, and on exit is +* overwritten by the solution matrix X. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL LSIDE, NOUNIT, UPPER + INTEGER I, INFO, J, K, NROWA + DOUBLE PRECISION TEMP +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + LSIDE = LSAME( SIDE , 'L' ) + IF( LSIDE )THEN + NROWA = M + ELSE + NROWA = N + END IF + NOUNIT = LSAME( DIAG , 'N' ) + UPPER = LSAME( UPLO , 'U' ) +* + INFO = 0 + IF( ( .NOT.LSIDE ).AND. + $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 2 + ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN + INFO = 3 + ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. + $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN + INFO = 4 + ELSE IF( M .LT.0 )THEN + INFO = 5 + ELSE IF( N .LT.0 )THEN + INFO = 6 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTRSM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + B( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + RETURN + END IF +* +* Start the operations. +* + IF( LSIDE )THEN + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*inv( A )*B. +* + IF( UPPER )THEN + DO 60, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 30, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 30 CONTINUE + END IF + DO 50, K = M, 1, -1 + IF( B( K, J ).NE.ZERO )THEN + IF( NOUNIT ) + $ B( K, J ) = B( K, J )/A( K, K ) + DO 40, I = 1, K - 1 + B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) + 40 CONTINUE + END IF + 50 CONTINUE + 60 CONTINUE + ELSE + DO 100, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 70, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 70 CONTINUE + END IF + DO 90 K = 1, M + IF( B( K, J ).NE.ZERO )THEN + IF( NOUNIT ) + $ B( K, J ) = B( K, J )/A( K, K ) + DO 80, I = K + 1, M + B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) + 80 CONTINUE + END IF + 90 CONTINUE + 100 CONTINUE + END IF + ELSE +* +* Form B := alpha*inv( A' )*B. +* + IF( UPPER )THEN + DO 130, J = 1, N + DO 120, I = 1, M + TEMP = ALPHA*B( I, J ) + DO 110, K = 1, I - 1 + TEMP = TEMP - A( K, I )*B( K, J ) + 110 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( I, I ) + B( I, J ) = TEMP + 120 CONTINUE + 130 CONTINUE + ELSE + DO 160, J = 1, N + DO 150, I = M, 1, -1 + TEMP = ALPHA*B( I, J ) + DO 140, K = I + 1, M + TEMP = TEMP - A( K, I )*B( K, J ) + 140 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( I, I ) + B( I, J ) = TEMP + 150 CONTINUE + 160 CONTINUE + END IF + END IF + ELSE + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*B*inv( A ). +* + IF( UPPER )THEN + DO 210, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 170, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 170 CONTINUE + END IF + DO 190, K = 1, J - 1 + IF( A( K, J ).NE.ZERO )THEN + DO 180, I = 1, M + B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) + 180 CONTINUE + END IF + 190 CONTINUE + IF( NOUNIT )THEN + TEMP = ONE/A( J, J ) + DO 200, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 200 CONTINUE + END IF + 210 CONTINUE + ELSE + DO 260, J = N, 1, -1 + IF( ALPHA.NE.ONE )THEN + DO 220, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 220 CONTINUE + END IF + DO 240, K = J + 1, N + IF( A( K, J ).NE.ZERO )THEN + DO 230, I = 1, M + B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) + 230 CONTINUE + END IF + 240 CONTINUE + IF( NOUNIT )THEN + TEMP = ONE/A( J, J ) + DO 250, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 250 CONTINUE + END IF + 260 CONTINUE + END IF + ELSE +* +* Form B := alpha*B*inv( A' ). +* + IF( UPPER )THEN + DO 310, K = N, 1, -1 + IF( NOUNIT )THEN + TEMP = ONE/A( K, K ) + DO 270, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 270 CONTINUE + END IF + DO 290, J = 1, K - 1 + IF( A( J, K ).NE.ZERO )THEN + TEMP = A( J, K ) + DO 280, I = 1, M + B( I, J ) = B( I, J ) - TEMP*B( I, K ) + 280 CONTINUE + END IF + 290 CONTINUE + IF( ALPHA.NE.ONE )THEN + DO 300, I = 1, M + B( I, K ) = ALPHA*B( I, K ) + 300 CONTINUE + END IF + 310 CONTINUE + ELSE + DO 360, K = 1, N + IF( NOUNIT )THEN + TEMP = ONE/A( K, K ) + DO 320, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 320 CONTINUE + END IF + DO 340, J = K + 1, N + IF( A( J, K ).NE.ZERO )THEN + TEMP = A( J, K ) + DO 330, I = 1, M + B( I, J ) = B( I, J ) - TEMP*B( I, K ) + 330 CONTINUE + END IF + 340 CONTINUE + IF( ALPHA.NE.ONE )THEN + DO 350, I = 1, M + B( I, K ) = ALPHA*B( I, K ) + 350 CONTINUE + END IF + 360 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTRSM . +* + END diff --git a/2.3-1/src/fortran/blas/dtrsv.f b/2.3-1/src/fortran/blas/dtrsv.f new file mode 100644 index 00000000..9c3e90a9 --- /dev/null +++ b/2.3-1/src/fortran/blas/dtrsv.f @@ -0,0 +1,289 @@ + SUBROUTINE DTRSV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DTRSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular matrix. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' A'*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - DOUBLE PRECISION array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. Local Scalars .. + DOUBLE PRECISION TEMP + INTEGER I, INFO, IX, J, JX, KX + LOGICAL NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'DTRSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOUNIT = LSAME( DIAG, 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/A( J, J ) + TEMP = X( J ) + DO 10, I = J - 1, 1, -1 + X( I ) = X( I ) - TEMP*A( I, J ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 40, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( J, J ) + TEMP = X( JX ) + IX = JX + DO 30, I = J - 1, 1, -1 + IX = IX - INCX + X( IX ) = X( IX ) - TEMP*A( I, J ) + 30 CONTINUE + END IF + JX = JX - INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/A( J, J ) + TEMP = X( J ) + DO 50, I = J + 1, N + X( I ) = X( I ) - TEMP*A( I, J ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( J, J ) + TEMP = X( JX ) + IX = JX + DO 70, I = J + 1, N + IX = IX + INCX + X( IX ) = X( IX ) - TEMP*A( I, J ) + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A' )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 100, J = 1, N + TEMP = X( J ) + DO 90, I = 1, J - 1 + TEMP = TEMP - A( I, J )*X( I ) + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + X( J ) = TEMP + 100 CONTINUE + ELSE + JX = KX + DO 120, J = 1, N + TEMP = X( JX ) + IX = KX + DO 110, I = 1, J - 1 + TEMP = TEMP - A( I, J )*X( IX ) + IX = IX + INCX + 110 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + X( JX ) = TEMP + JX = JX + INCX + 120 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 140, J = N, 1, -1 + TEMP = X( J ) + DO 130, I = N, J + 1, -1 + TEMP = TEMP - A( I, J )*X( I ) + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + X( J ) = TEMP + 140 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 160, J = N, 1, -1 + TEMP = X( JX ) + IX = KX + DO 150, I = N, J + 1, -1 + TEMP = TEMP - A( I, J )*X( IX ) + IX = IX - INCX + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + X( JX ) = TEMP + JX = JX - INCX + 160 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DTRSV . +* + END diff --git a/2.3-1/src/fortran/blas/dzasum.f b/2.3-1/src/fortran/blas/dzasum.f new file mode 100644 index 00000000..d21c1ffc --- /dev/null +++ b/2.3-1/src/fortran/blas/dzasum.f @@ -0,0 +1,34 @@ + double precision function dzasum(n,zx,incx) +c +c takes the sum of the absolute values. +c jack dongarra, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*) + double precision stemp,dcabs1 + integer i,incx,ix,n +c + dzasum = 0.0d0 + stemp = 0.0d0 + if( n.le.0 .or. incx.le.0 )return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + ix = 1 + do 10 i = 1,n + stemp = stemp + dcabs1(zx(ix)) + ix = ix + incx + 10 continue + dzasum = stemp + return +c +c code for increment equal to 1 +c + 20 do 30 i = 1,n + stemp = stemp + dcabs1(zx(i)) + 30 continue + dzasum = stemp + return + end diff --git a/2.3-1/src/fortran/blas/dznrm2.f b/2.3-1/src/fortran/blas/dznrm2.f new file mode 100644 index 00000000..205ce393 --- /dev/null +++ b/2.3-1/src/fortran/blas/dznrm2.f @@ -0,0 +1,67 @@ + DOUBLE PRECISION FUNCTION DZNRM2( N, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N +* .. Array Arguments .. + COMPLEX*16 X( * ) +* .. +* +* DZNRM2 returns the euclidean norm of a vector via the function +* name, so that +* +* DZNRM2 := sqrt( conjg( x' )*x ) +* +* +* +* -- This version written on 25-October-1982. +* Modified on 14-October-1993 to inline the call to ZLASSQ. +* Sven Hammarling, Nag Ltd. +* +* +* .. Parameters .. + DOUBLE PRECISION ONE , ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. Local Scalars .. + INTEGER IX + DOUBLE PRECISION NORM, SCALE, SSQ, TEMP +* .. Intrinsic Functions .. + INTRINSIC ABS, DIMAG, DBLE, SQRT +* .. +* .. Executable Statements .. + IF( N.LT.1 .OR. INCX.LT.1 )THEN + NORM = ZERO + ELSE + SCALE = ZERO + SSQ = ONE +* The following loop is equivalent to this call to the LAPACK +* auxiliary routine: +* CALL ZLASSQ( N, X, INCX, SCALE, SSQ ) +* + DO 10, IX = 1, 1 + ( N - 1 )*INCX, INCX + IF( DBLE( X( IX ) ).NE.ZERO )THEN + TEMP = ABS( DBLE( X( IX ) ) ) + IF( SCALE.LT.TEMP )THEN + SSQ = ONE + SSQ*( SCALE/TEMP )**2 + SCALE = TEMP + ELSE + SSQ = SSQ + ( TEMP/SCALE )**2 + END IF + END IF + IF( DIMAG( X( IX ) ).NE.ZERO )THEN + TEMP = ABS( DIMAG( X( IX ) ) ) + IF( SCALE.LT.TEMP )THEN + SSQ = ONE + SSQ*( SCALE/TEMP )**2 + SCALE = TEMP + ELSE + SSQ = SSQ + ( TEMP/SCALE )**2 + END IF + END IF + 10 CONTINUE + NORM = SCALE * SQRT( SSQ ) + END IF +* + DZNRM2 = NORM + RETURN +* +* End of DZNRM2. +* + END diff --git a/2.3-1/src/fortran/blas/idamax.f b/2.3-1/src/fortran/blas/idamax.f new file mode 100644 index 00000000..59d80dc4 --- /dev/null +++ b/2.3-1/src/fortran/blas/idamax.f @@ -0,0 +1,39 @@ + integer function idamax(n,dx,incx) +c +c finds the index of element having max. absolute value. +c jack dongarra, linpack, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double precision dx(*),dmax + integer i,incx,ix,n +c + idamax = 0 + if( n.lt.1 .or. incx.le.0 ) return + idamax = 1 + if(n.eq.1)return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + ix = 1 + dmax = dabs(dx(1)) + ix = ix + incx + do 10 i = 2,n + if(dabs(dx(ix)).le.dmax) go to 5 + idamax = i + dmax = dabs(dx(ix)) + 5 ix = ix + incx + 10 continue + return +c +c code for increment equal to 1 +c + 20 dmax = dabs(dx(1)) + do 30 i = 2,n + if(dabs(dx(i)).le.dmax) go to 30 + idamax = i + dmax = dabs(dx(i)) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/izamax.f b/2.3-1/src/fortran/blas/izamax.f new file mode 100644 index 00000000..ec14f827 --- /dev/null +++ b/2.3-1/src/fortran/blas/izamax.f @@ -0,0 +1,41 @@ + integer function izamax(n,zx,incx) +c +c finds the index of element having max. absolute value. +c jack dongarra, 1/15/85. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*) + double precision smax + integer i,incx,ix,n + double precision dcabs1 +c + izamax = 0 + if( n.lt.1 .or. incx.le.0 )return + izamax = 1 + if(n.eq.1)return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + ix = 1 + smax = dcabs1(zx(1)) + ix = ix + incx + do 10 i = 2,n + if(dcabs1(zx(ix)).le.smax) go to 5 + izamax = i + smax = dcabs1(zx(ix)) + 5 ix = ix + incx + 10 continue + return +c +c code for increment equal to 1 +c + 20 smax = dcabs1(zx(1)) + do 30 i = 2,n + if(dcabs1(zx(i)).le.smax) go to 30 + izamax = i + smax = dcabs1(zx(i)) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/license.txt b/2.3-1/src/fortran/blas/license.txt new file mode 100644 index 00000000..8014a5bd --- /dev/null +++ b/2.3-1/src/fortran/blas/license.txt @@ -0,0 +1,6 @@ +This software is in the public domain + + +More information: +http://www.netlib.org/blas/faq.html#2 +http://packages.debian.org/changelogs/pool/main/b/blas/blas_1.1-14/blas.copyright \ No newline at end of file diff --git a/2.3-1/src/fortran/blas/lsame.f b/2.3-1/src/fortran/blas/lsame.f new file mode 100644 index 00000000..bf25d86f --- /dev/null +++ b/2.3-1/src/fortran/blas/lsame.f @@ -0,0 +1,87 @@ + LOGICAL FUNCTION LSAME( CA, CB ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* September 30, 1994 +* +* .. Scalar Arguments .. + CHARACTER CA, CB +* .. +* +* Purpose +* ======= +* +* LSAME returns .TRUE. if CA is the same letter as CB regardless of +* case. +* +* Arguments +* ========= +* +* CA (input) CHARACTER*1 +* CB (input) CHARACTER*1 +* CA and CB specify the single characters to be compared. +* +* ===================================================================== +* +* .. Intrinsic Functions .. + INTRINSIC ICHAR +* .. +* .. Local Scalars .. + INTEGER INTA, INTB, ZCODE +* .. +* .. Executable Statements .. +* +* Test if the characters are equal +* + LSAME = CA.EQ.CB + IF( LSAME ) + $ RETURN +* +* Now test for equivalence if both characters are alphabetic. +* + ZCODE = ICHAR( 'Z' ) +* +* Use 'Z' rather than 'A' so that ASCII can be detected on Prime +* machines, on which ICHAR returns a value with bit 8 set. +* ICHAR('A') on Prime machines returns 193 which is the same as +* ICHAR('A') on an EBCDIC machine. +* + INTA = ICHAR( CA ) + INTB = ICHAR( CB ) +* + IF( ZCODE.EQ.90 .OR. ZCODE.EQ.122 ) THEN +* +* ASCII is assumed - ZCODE is the ASCII code of either lower or +* upper case 'Z'. +* + IF( INTA.GE.97 .AND. INTA.LE.122 ) INTA = INTA - 32 + IF( INTB.GE.97 .AND. INTB.LE.122 ) INTB = INTB - 32 +* + ELSE IF( ZCODE.EQ.233 .OR. ZCODE.EQ.169 ) THEN +* +* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or +* upper case 'Z'. +* + IF( INTA.GE.129 .AND. INTA.LE.137 .OR. + $ INTA.GE.145 .AND. INTA.LE.153 .OR. + $ INTA.GE.162 .AND. INTA.LE.169 ) INTA = INTA + 64 + IF( INTB.GE.129 .AND. INTB.LE.137 .OR. + $ INTB.GE.145 .AND. INTB.LE.153 .OR. + $ INTB.GE.162 .AND. INTB.LE.169 ) INTB = INTB + 64 +* + ELSE IF( ZCODE.EQ.218 .OR. ZCODE.EQ.250 ) THEN +* +* ASCII is assumed, on Prime machines - ZCODE is the ASCII code +* plus 128 of either lower or upper case 'Z'. +* + IF( INTA.GE.225 .AND. INTA.LE.250 ) INTA = INTA - 32 + IF( INTB.GE.225 .AND. INTB.LE.250 ) INTB = INTB - 32 + END IF + LSAME = INTA.EQ.INTB +* +* RETURN +* +* End of LSAME +* + END diff --git a/2.3-1/src/fortran/blas/xerbla.f b/2.3-1/src/fortran/blas/xerbla.f new file mode 100644 index 00000000..6e11175f --- /dev/null +++ b/2.3-1/src/fortran/blas/xerbla.f @@ -0,0 +1,46 @@ + SUBROUTINE XERBLA( SRNAME, INFO ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* September 30, 1994 +* +* .. Scalar Arguments .. + CHARACTER*6 SRNAME + INTEGER INFO +* .. +* +* Purpose +* ======= +* +* XERBLA is an error handler for the LAPACK routines. +* It is called by an LAPACK routine if an input parameter has an +* invalid value. A message is printed and execution stops. +* +* Installers may consider modifying the STOP statement in order to +* call system-specific exception-handling facilities. +* +* Arguments +* ========= +* +* SRNAME (input) CHARACTER*6 +* The name of the routine which called XERBLA. +* +* INFO (input) INTEGER +* The position of the invalid parameter in the parameter list +* of the calling routine. +* +* ===================================================================== +* +* .. Executable Statements .. +* + WRITE( *, FMT = 9999 )SRNAME, INFO +* + STOP +* + 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ', + $ 'an illegal value' ) +* +* End of XERBLA +* + END diff --git a/2.3-1/src/fortran/blas/zaxpy.f b/2.3-1/src/fortran/blas/zaxpy.f new file mode 100644 index 00000000..4fa3b1e4 --- /dev/null +++ b/2.3-1/src/fortran/blas/zaxpy.f @@ -0,0 +1,34 @@ + subroutine zaxpy(n,za,zx,incx,zy,incy) +c +c constant times a vector plus a vector. +c jack dongarra, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*),zy(*),za + integer i,incx,incy,ix,iy,n + double precision dcabs1 + if(n.le.0)return + if (dcabs1(za) .eq. 0.0d0) return + if (incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + zy(iy) = zy(iy) + za*zx(ix) + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c + 20 do 30 i = 1,n + zy(i) = zy(i) + za*zx(i) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/zcopy.f b/2.3-1/src/fortran/blas/zcopy.f new file mode 100644 index 00000000..9ccfa880 --- /dev/null +++ b/2.3-1/src/fortran/blas/zcopy.f @@ -0,0 +1,33 @@ + subroutine zcopy(n,zx,incx,zy,incy) +c +c copies a vector, x, to a vector, y. +c jack dongarra, linpack, 4/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*),zy(*) + integer i,incx,incy,ix,iy,n +c + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + zy(iy) = zx(ix) + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 +c + 20 do 30 i = 1,n + zy(i) = zx(i) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/zdotc.f b/2.3-1/src/fortran/blas/zdotc.f new file mode 100644 index 00000000..d6ac6853 --- /dev/null +++ b/2.3-1/src/fortran/blas/zdotc.f @@ -0,0 +1,36 @@ + double complex function zdotc(n,zx,incx,zy,incy) +c +c forms the dot product of a vector. +c jack dongarra, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*),zy(*),ztemp + integer i,incx,incy,ix,iy,n + ztemp = (0.0d0,0.0d0) + zdotc = (0.0d0,0.0d0) + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + ztemp = ztemp + dconjg(zx(ix))*zy(iy) + ix = ix + incx + iy = iy + incy + 10 continue + zdotc = ztemp + return +c +c code for both increments equal to 1 +c + 20 do 30 i = 1,n + ztemp = ztemp + dconjg(zx(i))*zy(i) + 30 continue + zdotc = ztemp + return + end diff --git a/2.3-1/src/fortran/blas/zdotu.f b/2.3-1/src/fortran/blas/zdotu.f new file mode 100644 index 00000000..329e9885 --- /dev/null +++ b/2.3-1/src/fortran/blas/zdotu.f @@ -0,0 +1,36 @@ + double complex function zdotu(n,zx,incx,zy,incy) +c +c forms the dot product of two vectors. +c jack dongarra, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*),zy(*),ztemp + integer i,incx,incy,ix,iy,n + ztemp = (0.0d0,0.0d0) + zdotu = (0.0d0,0.0d0) + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments +c not equal to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + ztemp = ztemp + zx(ix)*zy(iy) + ix = ix + incx + iy = iy + incy + 10 continue + zdotu = ztemp + return +c +c code for both increments equal to 1 +c + 20 do 30 i = 1,n + ztemp = ztemp + zx(i)*zy(i) + 30 continue + zdotu = ztemp + return + end diff --git a/2.3-1/src/fortran/blas/zdscal.f b/2.3-1/src/fortran/blas/zdscal.f new file mode 100644 index 00000000..8123424d --- /dev/null +++ b/2.3-1/src/fortran/blas/zdscal.f @@ -0,0 +1,30 @@ + subroutine zdscal(n,da,zx,incx) +c +c scales a vector by a constant. +c jack dongarra, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*) + double precision da + integer i,incx,ix,n +c + if( n.le.0 .or. incx.le.0 )return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + ix = 1 + do 10 i = 1,n + zx(ix) = dcmplx(da,0.0d0)*zx(ix) + ix = ix + incx + 10 continue + return +c +c code for increment equal to 1 +c + 20 do 30 i = 1,n + zx(i) = dcmplx(da,0.0d0)*zx(i) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/zgbmv.f b/2.3-1/src/fortran/blas/zgbmv.f new file mode 100644 index 00000000..91ce9a60 --- /dev/null +++ b/2.3-1/src/fortran/blas/zgbmv.f @@ -0,0 +1,322 @@ + SUBROUTINE ZGBMV ( TRANS, M, N, KL, KU, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA, BETA + INTEGER INCX, INCY, KL, KU, LDA, M, N + CHARACTER*1 TRANS +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZGBMV performs one of the matrix-vector operations +* +* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, or +* +* y := alpha*conjg( A' )*x + beta*y, +* +* where alpha and beta are scalars, x and y are vectors and A is an +* m by n band matrix, with kl sub-diagonals and ku super-diagonals. +* +* Parameters +* ========== +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' y := alpha*A*x + beta*y. +* +* TRANS = 'T' or 't' y := alpha*A'*x + beta*y. +* +* TRANS = 'C' or 'c' y := alpha*conjg( A' )*x + beta*y. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* KL - INTEGER. +* On entry, KL specifies the number of sub-diagonals of the +* matrix A. KL must satisfy 0 .le. KL. +* Unchanged on exit. +* +* KU - INTEGER. +* On entry, KU specifies the number of super-diagonals of the +* matrix A. KU must satisfy 0 .le. KU. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry, the leading ( kl + ku + 1 ) by n part of the +* array A must contain the matrix of coefficients, supplied +* column by column, with the leading diagonal of the matrix in +* row ( ku + 1 ) of the array, the first super-diagonal +* starting at position 2 in row ku, the first sub-diagonal +* starting at position 1 in row ( ku + 2 ), and so on. +* Elements in the array A that do not correspond to elements +* in the band matrix (such as the top left ku by ku triangle) +* are not referenced. +* The following program segment will transfer a band matrix +* from conventional full matrix storage to band storage: +* +* DO 20, J = 1, N +* K = KU + 1 - J +* DO 10, I = MAX( 1, J - KU ), MIN( M, J + KL ) +* A( K + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( kl + ku + 1 ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. +* Before entry, the incremented array Y must contain the +* vector y. On exit, Y is overwritten by the updated vector y. +* +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, IY, J, JX, JY, K, KUP1, KX, KY, + $ LENX, LENY + LOGICAL NOCONJ +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 1 + ELSE IF( M.LT.0 )THEN + INFO = 2 + ELSE IF( N.LT.0 )THEN + INFO = 3 + ELSE IF( KL.LT.0 )THEN + INFO = 4 + ELSE IF( KU.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( KL + KU + 1 ) )THEN + INFO = 8 + ELSE IF( INCX.EQ.0 )THEN + INFO = 10 + ELSE IF( INCY.EQ.0 )THEN + INFO = 13 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZGBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) +* +* Set LENX and LENY, the lengths of the vectors x and y, and set +* up the start points in X and Y. +* + IF( LSAME( TRANS, 'N' ) )THEN + LENX = N + LENY = M + ELSE + LENX = M + LENY = N + END IF + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( LENX - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( LENY - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the band part of A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, LENY + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, LENY + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, LENY + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, LENY + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + KUP1 = KU + 1 + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form y := alpha*A*x + y. +* + JX = KX + IF( INCY.EQ.1 )THEN + DO 60, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + K = KUP1 - J + DO 50, I = MAX( 1, J - KU ), MIN( M, J + KL ) + Y( I ) = Y( I ) + TEMP*A( K + I, J ) + 50 CONTINUE + END IF + JX = JX + INCX + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IY = KY + K = KUP1 - J + DO 70, I = MAX( 1, J - KU ), MIN( M, J + KL ) + Y( IY ) = Y( IY ) + TEMP*A( K + I, J ) + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + IF( J.GT.KU ) + $ KY = KY + INCY + 80 CONTINUE + END IF + ELSE +* +* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y. +* + JY = KY + IF( INCX.EQ.1 )THEN + DO 110, J = 1, N + TEMP = ZERO + K = KUP1 - J + IF( NOCONJ )THEN + DO 90, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + A( K + I, J )*X( I ) + 90 CONTINUE + ELSE + DO 100, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + DCONJG( A( K + I, J ) )*X( I ) + 100 CONTINUE + END IF + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 110 CONTINUE + ELSE + DO 140, J = 1, N + TEMP = ZERO + IX = KX + K = KUP1 - J + IF( NOCONJ )THEN + DO 120, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + A( K + I, J )*X( IX ) + IX = IX + INCX + 120 CONTINUE + ELSE + DO 130, I = MAX( 1, J - KU ), MIN( M, J + KL ) + TEMP = TEMP + DCONJG( A( K + I, J ) )*X( IX ) + IX = IX + INCX + 130 CONTINUE + END IF + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + IF( J.GT.KU ) + $ KX = KX + INCX + 140 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZGBMV . +* + END diff --git a/2.3-1/src/fortran/blas/zgemm.f b/2.3-1/src/fortran/blas/zgemm.f new file mode 100644 index 00000000..09cd151e --- /dev/null +++ b/2.3-1/src/fortran/blas/zgemm.f @@ -0,0 +1,415 @@ + SUBROUTINE ZGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 TRANSA, TRANSB + INTEGER M, N, K, LDA, LDB, LDC + COMPLEX*16 ALPHA, BETA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZGEMM performs one of the matrix-matrix operations +* +* C := alpha*op( A )*op( B ) + beta*C, +* +* where op( X ) is one of +* +* op( X ) = X or op( X ) = X' or op( X ) = conjg( X' ), +* +* alpha and beta are scalars, and A, B and C are matrices, with op( A ) +* an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. +* +* Parameters +* ========== +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n', op( A ) = A. +* +* TRANSA = 'T' or 't', op( A ) = A'. +* +* TRANSA = 'C' or 'c', op( A ) = conjg( A' ). +* +* Unchanged on exit. +* +* TRANSB - CHARACTER*1. +* On entry, TRANSB specifies the form of op( B ) to be used in +* the matrix multiplication as follows: +* +* TRANSB = 'N' or 'n', op( B ) = B. +* +* TRANSB = 'T' or 't', op( B ) = B'. +* +* TRANSB = 'C' or 'c', op( B ) = conjg( B' ). +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix +* op( A ) and of the matrix C. M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix +* op( B ) and the number of columns of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry, K specifies the number of columns of the matrix +* op( A ) and the number of rows of the matrix op( B ). K must +* be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* k when TRANSA = 'N' or 'n', and is m otherwise. +* Before entry with TRANSA = 'N' or 'n', the leading m by k +* part of the array A must contain the matrix A, otherwise +* the leading k by m part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANSA = 'N' or 'n' then +* LDA must be at least max( 1, m ), otherwise LDA must be at +* least max( 1, k ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +* n when TRANSB = 'N' or 'n', and is k otherwise. +* Before entry with TRANSB = 'N' or 'n', the leading k by n +* part of the array B must contain the matrix B, otherwise +* the leading n by k part of the array B must contain the +* matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. When TRANSB = 'N' or 'n' then +* LDB must be at least max( 1, k ), otherwise LDB must be at +* least max( 1, n ). +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then C need not be set on input. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry, the leading m by n part of the array C must +* contain the matrix C, except when beta is zero, in which +* case C need not be set on entry. +* On exit, the array C is overwritten by the m by n matrix +* ( alpha*op( A )*op( B ) + beta*C ). +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. Local Scalars .. + LOGICAL CONJA, CONJB, NOTA, NOTB + INTEGER I, INFO, J, L, NCOLA, NROWA, NROWB + COMPLEX*16 TEMP +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Set NOTA and NOTB as true if A and B respectively are not +* conjugated or transposed, set CONJA and CONJB as true if A and +* B respectively are to be transposed but not conjugated and set +* NROWA, NCOLA and NROWB as the number of rows and columns of A +* and the number of rows of B respectively. +* + NOTA = LSAME( TRANSA, 'N' ) + NOTB = LSAME( TRANSB, 'N' ) + CONJA = LSAME( TRANSA, 'C' ) + CONJB = LSAME( TRANSB, 'C' ) + IF( NOTA )THEN + NROWA = M + NCOLA = K + ELSE + NROWA = K + NCOLA = M + END IF + IF( NOTB )THEN + NROWB = K + ELSE + NROWB = N + END IF +* +* Test the input parameters. +* + INFO = 0 + IF( ( .NOT.NOTA ).AND. + $ ( .NOT.CONJA ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.NOTB ).AND. + $ ( .NOT.CONJB ).AND. + $ ( .NOT.LSAME( TRANSB, 'T' ) ) )THEN + INFO = 2 + ELSE IF( M .LT.0 )THEN + INFO = 3 + ELSE IF( N .LT.0 )THEN + INFO = 4 + ELSE IF( K .LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 8 + ELSE IF( LDB.LT.MAX( 1, NROWB ) )THEN + INFO = 10 + ELSE IF( LDC.LT.MAX( 1, M ) )THEN + INFO = 13 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZGEMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, M + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + RETURN + END IF +* +* Start the operations. +* + IF( NOTB )THEN + IF( NOTA )THEN +* +* Form C := alpha*A*B + beta*C. +* + DO 90, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 50, I = 1, M + C( I, J ) = ZERO + 50 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 60, I = 1, M + C( I, J ) = BETA*C( I, J ) + 60 CONTINUE + END IF + DO 80, L = 1, K + IF( B( L, J ).NE.ZERO )THEN + TEMP = ALPHA*B( L, J ) + DO 70, I = 1, M + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 70 CONTINUE + END IF + 80 CONTINUE + 90 CONTINUE + ELSE IF( CONJA )THEN +* +* Form C := alpha*conjg( A' )*B + beta*C. +* + DO 120, J = 1, N + DO 110, I = 1, M + TEMP = ZERO + DO 100, L = 1, K + TEMP = TEMP + DCONJG( A( L, I ) )*B( L, J ) + 100 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 110 CONTINUE + 120 CONTINUE + ELSE +* +* Form C := alpha*A'*B + beta*C +* + DO 150, J = 1, N + DO 140, I = 1, M + TEMP = ZERO + DO 130, L = 1, K + TEMP = TEMP + A( L, I )*B( L, J ) + 130 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 140 CONTINUE + 150 CONTINUE + END IF + ELSE IF( NOTA )THEN + IF( CONJB )THEN +* +* Form C := alpha*A*conjg( B' ) + beta*C. +* + DO 200, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 160, I = 1, M + C( I, J ) = ZERO + 160 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 170, I = 1, M + C( I, J ) = BETA*C( I, J ) + 170 CONTINUE + END IF + DO 190, L = 1, K + IF( B( J, L ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( B( J, L ) ) + DO 180, I = 1, M + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 180 CONTINUE + END IF + 190 CONTINUE + 200 CONTINUE + ELSE +* +* Form C := alpha*A*B' + beta*C +* + DO 250, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 210, I = 1, M + C( I, J ) = ZERO + 210 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 220, I = 1, M + C( I, J ) = BETA*C( I, J ) + 220 CONTINUE + END IF + DO 240, L = 1, K + IF( B( J, L ).NE.ZERO )THEN + TEMP = ALPHA*B( J, L ) + DO 230, I = 1, M + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 230 CONTINUE + END IF + 240 CONTINUE + 250 CONTINUE + END IF + ELSE IF( CONJA )THEN + IF( CONJB )THEN +* +* Form C := alpha*conjg( A' )*conjg( B' ) + beta*C. +* + DO 280, J = 1, N + DO 270, I = 1, M + TEMP = ZERO + DO 260, L = 1, K + TEMP = TEMP + + $ DCONJG( A( L, I ) )*DCONJG( B( J, L ) ) + 260 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 270 CONTINUE + 280 CONTINUE + ELSE +* +* Form C := alpha*conjg( A' )*B' + beta*C +* + DO 310, J = 1, N + DO 300, I = 1, M + TEMP = ZERO + DO 290, L = 1, K + TEMP = TEMP + DCONJG( A( L, I ) )*B( J, L ) + 290 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 300 CONTINUE + 310 CONTINUE + END IF + ELSE + IF( CONJB )THEN +* +* Form C := alpha*A'*conjg( B' ) + beta*C +* + DO 340, J = 1, N + DO 330, I = 1, M + TEMP = ZERO + DO 320, L = 1, K + TEMP = TEMP + A( L, I )*DCONJG( B( J, L ) ) + 320 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 330 CONTINUE + 340 CONTINUE + ELSE +* +* Form C := alpha*A'*B' + beta*C +* + DO 370, J = 1, N + DO 360, I = 1, M + TEMP = ZERO + DO 350, L = 1, K + TEMP = TEMP + A( L, I )*B( J, L ) + 350 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 360 CONTINUE + 370 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZGEMM . +* + END diff --git a/2.3-1/src/fortran/blas/zgemv.f b/2.3-1/src/fortran/blas/zgemv.f new file mode 100644 index 00000000..014a5e02 --- /dev/null +++ b/2.3-1/src/fortran/blas/zgemv.f @@ -0,0 +1,281 @@ + SUBROUTINE ZGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA, BETA + INTEGER INCX, INCY, LDA, M, N + CHARACTER*1 TRANS +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZGEMV performs one of the matrix-vector operations +* +* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, or +* +* y := alpha*conjg( A' )*x + beta*y, +* +* where alpha and beta are scalars, x and y are vectors and A is an +* m by n matrix. +* +* Parameters +* ========== +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' y := alpha*A*x + beta*y. +* +* TRANS = 'T' or 't' y := alpha*A'*x + beta*y. +* +* TRANS = 'C' or 'c' y := alpha*conjg( A' )*x + beta*y. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry, the leading m by n part of the array A must +* contain the matrix of coefficients. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, m ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' +* and at least +* ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. +* Before entry with BETA non-zero, the incremented array Y +* must contain the vector y. On exit, Y is overwritten by the +* updated vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY + LOGICAL NOCONJ +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 1 + ELSE IF( M.LT.0 )THEN + INFO = 2 + ELSE IF( N.LT.0 )THEN + INFO = 3 + ELSE IF( LDA.LT.MAX( 1, M ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + ELSE IF( INCY.EQ.0 )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZGEMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) +* +* Set LENX and LENY, the lengths of the vectors x and y, and set +* up the start points in X and Y. +* + IF( LSAME( TRANS, 'N' ) )THEN + LENX = N + LENY = M + ELSE + LENX = M + LENY = N + END IF + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( LENX - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( LENY - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, LENY + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, LENY + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, LENY + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, LENY + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form y := alpha*A*x + y. +* + JX = KX + IF( INCY.EQ.1 )THEN + DO 60, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + DO 50, I = 1, M + Y( I ) = Y( I ) + TEMP*A( I, J ) + 50 CONTINUE + END IF + JX = JX + INCX + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*X( JX ) + IY = KY + DO 70, I = 1, M + Y( IY ) = Y( IY ) + TEMP*A( I, J ) + IY = IY + INCY + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + ELSE +* +* Form y := alpha*A'*x + y or y := alpha*conjg( A' )*x + y. +* + JY = KY + IF( INCX.EQ.1 )THEN + DO 110, J = 1, N + TEMP = ZERO + IF( NOCONJ )THEN + DO 90, I = 1, M + TEMP = TEMP + A( I, J )*X( I ) + 90 CONTINUE + ELSE + DO 100, I = 1, M + TEMP = TEMP + DCONJG( A( I, J ) )*X( I ) + 100 CONTINUE + END IF + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 110 CONTINUE + ELSE + DO 140, J = 1, N + TEMP = ZERO + IX = KX + IF( NOCONJ )THEN + DO 120, I = 1, M + TEMP = TEMP + A( I, J )*X( IX ) + IX = IX + INCX + 120 CONTINUE + ELSE + DO 130, I = 1, M + TEMP = TEMP + DCONJG( A( I, J ) )*X( IX ) + IX = IX + INCX + 130 CONTINUE + END IF + Y( JY ) = Y( JY ) + ALPHA*TEMP + JY = JY + INCY + 140 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZGEMV . +* + END diff --git a/2.3-1/src/fortran/blas/zgerc.f b/2.3-1/src/fortran/blas/zgerc.f new file mode 100644 index 00000000..968c5b47 --- /dev/null +++ b/2.3-1/src/fortran/blas/zgerc.f @@ -0,0 +1,157 @@ + SUBROUTINE ZGERC ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA + INTEGER INCX, INCY, LDA, M, N +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZGERC performs the rank 1 operation +* +* A := alpha*x*conjg( y' ) + A, +* +* where alpha is a scalar, x is an m element vector, y is an n element +* vector and A is an m by n matrix. +* +* Parameters +* ========== +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( m - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the m +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry, the leading m by n part of the array A must +* contain the matrix of coefficients. On exit, A is +* overwritten by the updated matrix. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JY, KX +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( M.LT.0 )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + ELSE IF( LDA.LT.MAX( 1, M ) )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZGERC ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( INCY.GT.0 )THEN + JY = 1 + ELSE + JY = 1 - ( N - 1 )*INCY + END IF + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( Y( JY ) ) + DO 10, I = 1, M + A( I, J ) = A( I, J ) + X( I )*TEMP + 10 CONTINUE + END IF + JY = JY + INCY + 20 CONTINUE + ELSE + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( M - 1 )*INCX + END IF + DO 40, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( Y( JY ) ) + IX = KX + DO 30, I = 1, M + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + END IF + JY = JY + INCY + 40 CONTINUE + END IF +* + RETURN +* +* End of ZGERC . +* + END diff --git a/2.3-1/src/fortran/blas/zgeru.f b/2.3-1/src/fortran/blas/zgeru.f new file mode 100644 index 00000000..5283af64 --- /dev/null +++ b/2.3-1/src/fortran/blas/zgeru.f @@ -0,0 +1,157 @@ + SUBROUTINE ZGERU ( M, N, ALPHA, X, INCX, Y, INCY, A, LDA ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA + INTEGER INCX, INCY, LDA, M, N +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZGERU performs the rank 1 operation +* +* A := alpha*x*y' + A, +* +* where alpha is a scalar, x is an m element vector, y is an n element +* vector and A is an m by n matrix. +* +* Parameters +* ========== +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix A. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( m - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the m +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry, the leading m by n part of the array A must +* contain the matrix of coefficients. On exit, A is +* overwritten by the updated matrix. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JY, KX +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( M.LT.0 )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + ELSE IF( LDA.LT.MAX( 1, M ) )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZGERU ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( INCY.GT.0 )THEN + JY = 1 + ELSE + JY = 1 - ( N - 1 )*INCY + END IF + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*Y( JY ) + DO 10, I = 1, M + A( I, J ) = A( I, J ) + X( I )*TEMP + 10 CONTINUE + END IF + JY = JY + INCY + 20 CONTINUE + ELSE + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( M - 1 )*INCX + END IF + DO 40, J = 1, N + IF( Y( JY ).NE.ZERO )THEN + TEMP = ALPHA*Y( JY ) + IX = KX + DO 30, I = 1, M + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + END IF + JY = JY + INCY + 40 CONTINUE + END IF +* + RETURN +* +* End of ZGERU . +* + END diff --git a/2.3-1/src/fortran/blas/zhbmv.f b/2.3-1/src/fortran/blas/zhbmv.f new file mode 100644 index 00000000..1c044936 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhbmv.f @@ -0,0 +1,309 @@ + SUBROUTINE ZHBMV ( UPLO, N, K, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA, BETA + INTEGER INCX, INCY, K, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZHBMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n hermitian band matrix, with k super-diagonals. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the band matrix A is being supplied as +* follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* being supplied. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* being supplied. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry, K specifies the number of super-diagonals of the +* matrix A. K must satisfy 0 .le. K. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the hermitian matrix, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer the upper +* triangular part of a hermitian band matrix from conventional +* full matrix storage to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the hermitian matrix, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer the lower +* triangular part of a hermitian band matrix from conventional +* full matrix storage to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Note that the imaginary parts of the diagonal elements need +* not be set and are assumed to be zero. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the +* vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of DIMENSION at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the +* vector y. On exit, Y is overwritten by the updated vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KPLUS1, KX, KY, L +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( K.LT.0 )THEN + INFO = 3 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + ELSE IF( INCY.EQ.0 )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of the array A +* are accessed sequentially with one pass through A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when upper triangle of A is stored. +* + KPLUS1 = K + 1 + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + L = KPLUS1 - J + DO 50, I = MAX( 1, J - K ), J - 1 + Y( I ) = Y( I ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + DCONJG( A( L + I, J ) )*X( I ) + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*DBLE( A( KPLUS1, J ) ) + $ + ALPHA*TEMP2 + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + L = KPLUS1 - J + DO 70, I = MAX( 1, J - K ), J - 1 + Y( IY ) = Y( IY ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + DCONJG( A( L + I, J ) )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*DBLE( A( KPLUS1, J ) ) + $ + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + IF( J.GT.K )THEN + KX = KX + INCX + KY = KY + INCY + END IF + 80 CONTINUE + END IF + ELSE +* +* Form y when lower triangle of A is stored. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*DBLE( A( 1, J ) ) + L = 1 - J + DO 90, I = J + 1, MIN( N, J + K ) + Y( I ) = Y( I ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + DCONJG( A( L + I, J ) )*X( I ) + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*DBLE( A( 1, J ) ) + L = 1 - J + IX = JX + IY = JY + DO 110, I = J + 1, MIN( N, J + K ) + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*A( L + I, J ) + TEMP2 = TEMP2 + DCONJG( A( L + I, J ) )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHBMV . +* + END diff --git a/2.3-1/src/fortran/blas/zhemm.f b/2.3-1/src/fortran/blas/zhemm.f new file mode 100644 index 00000000..d3912c08 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhemm.f @@ -0,0 +1,304 @@ + SUBROUTINE ZHEMM ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO + INTEGER M, N, LDA, LDB, LDC + COMPLEX*16 ALPHA, BETA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZHEMM performs one of the matrix-matrix operations +* +* C := alpha*A*B + beta*C, +* +* or +* +* C := alpha*B*A + beta*C, +* +* where alpha and beta are scalars, A is an hermitian matrix and B and +* C are m by n matrices. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether the hermitian matrix A +* appears on the left or right in the operation as follows: +* +* SIDE = 'L' or 'l' C := alpha*A*B + beta*C, +* +* SIDE = 'R' or 'r' C := alpha*B*A + beta*C, +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the hermitian matrix A is to be +* referenced as follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of the +* hermitian matrix is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of the +* hermitian matrix is to be referenced. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix C. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix C. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* m when SIDE = 'L' or 'l' and is n otherwise. +* Before entry with SIDE = 'L' or 'l', the m by m part of +* the array A must contain the hermitian matrix, such that +* when UPLO = 'U' or 'u', the leading m by m upper triangular +* part of the array A must contain the upper triangular part +* of the hermitian matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading m by m lower triangular part of the array A +* must contain the lower triangular part of the hermitian +* matrix and the strictly upper triangular part of A is not +* referenced. +* Before entry with SIDE = 'R' or 'r', the n by n part of +* the array A must contain the hermitian matrix, such that +* when UPLO = 'U' or 'u', the leading n by n upper triangular +* part of the array A must contain the upper triangular part +* of the hermitian matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading n by n lower triangular part of the array A +* must contain the lower triangular part of the hermitian +* matrix and the strictly upper triangular part of A is not +* referenced. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), otherwise LDA must be at +* least max( 1, n ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then C need not be set on input. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry, the leading m by n part of the array C must +* contain the matrix C, except when beta is zero, in which +* case C need not be set on entry. +* On exit, the array C is overwritten by the m by n updated +* matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, DBLE +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, K, NROWA + COMPLEX*16 TEMP1, TEMP2 +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Set NROWA as the number of rows of A. +* + IF( LSAME( SIDE, 'L' ) )THEN + NROWA = M + ELSE + NROWA = N + END IF + UPPER = LSAME( UPLO, 'U' ) +* +* Test the input parameters. +* + INFO = 0 + IF( ( .NOT.LSAME( SIDE, 'L' ) ).AND. + $ ( .NOT.LSAME( SIDE, 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO, 'L' ) ) )THEN + INFO = 2 + ELSE IF( M .LT.0 )THEN + INFO = 3 + ELSE IF( N .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, M ) )THEN + INFO = 12 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHEMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, M + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( SIDE, 'L' ) )THEN +* +* Form C := alpha*A*B + beta*C. +* + IF( UPPER )THEN + DO 70, J = 1, N + DO 60, I = 1, M + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 50, K = 1, I - 1 + C( K, J ) = C( K, J ) + TEMP1*A( K, I ) + TEMP2 = TEMP2 + + $ B( K, J )*DCONJG( A( K, I ) ) + 50 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*DBLE( A( I, I ) ) + + $ ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*DBLE( A( I, I ) ) + + $ ALPHA*TEMP2 + END IF + 60 CONTINUE + 70 CONTINUE + ELSE + DO 100, J = 1, N + DO 90, I = M, 1, -1 + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 80, K = I + 1, M + C( K, J ) = C( K, J ) + TEMP1*A( K, I ) + TEMP2 = TEMP2 + + $ B( K, J )*DCONJG( A( K, I ) ) + 80 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*DBLE( A( I, I ) ) + + $ ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*DBLE( A( I, I ) ) + + $ ALPHA*TEMP2 + END IF + 90 CONTINUE + 100 CONTINUE + END IF + ELSE +* +* Form C := alpha*B*A + beta*C. +* + DO 170, J = 1, N + TEMP1 = ALPHA*DBLE( A( J, J ) ) + IF( BETA.EQ.ZERO )THEN + DO 110, I = 1, M + C( I, J ) = TEMP1*B( I, J ) + 110 CONTINUE + ELSE + DO 120, I = 1, M + C( I, J ) = BETA*C( I, J ) + TEMP1*B( I, J ) + 120 CONTINUE + END IF + DO 140, K = 1, J - 1 + IF( UPPER )THEN + TEMP1 = ALPHA*A( K, J ) + ELSE + TEMP1 = ALPHA*DCONJG( A( J, K ) ) + END IF + DO 130, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 130 CONTINUE + 140 CONTINUE + DO 160, K = J + 1, N + IF( UPPER )THEN + TEMP1 = ALPHA*DCONJG( A( J, K ) ) + ELSE + TEMP1 = ALPHA*A( K, J ) + END IF + DO 150, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 150 CONTINUE + 160 CONTINUE + 170 CONTINUE + END IF +* + RETURN +* +* End of ZHEMM . +* + END diff --git a/2.3-1/src/fortran/blas/zhemv.f b/2.3-1/src/fortran/blas/zhemv.f new file mode 100644 index 00000000..54aa7b90 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhemv.f @@ -0,0 +1,266 @@ + SUBROUTINE ZHEMV ( UPLO, N, ALPHA, A, LDA, X, INCX, + $ BETA, Y, INCY ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA, BETA + INTEGER INCX, INCY, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZHEMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n hermitian matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the hermitian matrix and the strictly +* lower triangular part of A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the hermitian matrix and the strictly +* upper triangular part of A is not referenced. +* Note that the imaginary parts of the diagonal elements need +* not be set and are assumed to be zero. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. On exit, Y is overwritten by the updated +* vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 5 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + ELSE IF( INCY.EQ.0 )THEN + INFO = 10 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHEMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when A is stored in upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + DO 50, I = 1, J - 1 + Y( I ) = Y( I ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + DCONJG( A( I, J ) )*X( I ) + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*DBLE( A( J, J ) ) + ALPHA*TEMP2 + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + DO 70, I = 1, J - 1 + Y( IY ) = Y( IY ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + DCONJG( A( I, J ) )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*DBLE( A( J, J ) ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 80 CONTINUE + END IF + ELSE +* +* Form y when A is stored in lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*DBLE( A( J, J ) ) + DO 90, I = J + 1, N + Y( I ) = Y( I ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + DCONJG( A( I, J ) )*X( I ) + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*DBLE( A( J, J ) ) + IX = JX + IY = JY + DO 110, I = J + 1, N + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*A( I, J ) + TEMP2 = TEMP2 + DCONJG( A( I, J ) )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHEMV . +* + END diff --git a/2.3-1/src/fortran/blas/zher.f b/2.3-1/src/fortran/blas/zher.f new file mode 100644 index 00000000..fcf40a5e --- /dev/null +++ b/2.3-1/src/fortran/blas/zher.f @@ -0,0 +1,212 @@ + SUBROUTINE ZHER ( UPLO, N, ALPHA, X, INCX, A, LDA ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZHER performs the hermitian rank 1 operation +* +* A := alpha*x*conjg( x' ) + A, +* +* where alpha is a real scalar, x is an n element vector and A is an +* n by n hermitian matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the hermitian matrix and the strictly +* lower triangular part of A is not referenced. On exit, the +* upper triangular part of the array A is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the hermitian matrix and the strictly +* upper triangular part of A is not referenced. On exit, the +* lower triangular part of the array A is overwritten by the +* lower triangular part of the updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, KX +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHER ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.DBLE( ZERO ) ) ) + $ RETURN +* +* Set the start point in X if the increment is not unity. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when A is stored in upper triangle. +* + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( J ) ) + DO 10, I = 1, J - 1 + A( I, J ) = A( I, J ) + X( I )*TEMP + 10 CONTINUE + A( J, J ) = DBLE( A( J, J ) ) + DBLE( X( J )*TEMP ) + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( JX ) ) + IX = KX + DO 30, I = 1, J - 1 + A( I, J ) = A( I, J ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + A( J, J ) = DBLE( A( J, J ) ) + DBLE( X( JX )*TEMP ) + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + JX = JX + INCX + 40 CONTINUE + END IF + ELSE +* +* Form A when A is stored in lower triangle. +* + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( J ) ) + A( J, J ) = DBLE( A( J, J ) ) + DBLE( TEMP*X( J ) ) + DO 50, I = J + 1, N + A( I, J ) = A( I, J ) + X( I )*TEMP + 50 CONTINUE + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( JX ) ) + A( J, J ) = DBLE( A( J, J ) ) + DBLE( TEMP*X( JX ) ) + IX = JX + DO 70, I = J + 1, N + IX = IX + INCX + A( I, J ) = A( I, J ) + X( IX )*TEMP + 70 CONTINUE + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHER . +* + END diff --git a/2.3-1/src/fortran/blas/zher2.f b/2.3-1/src/fortran/blas/zher2.f new file mode 100644 index 00000000..06acdff7 --- /dev/null +++ b/2.3-1/src/fortran/blas/zher2.f @@ -0,0 +1,249 @@ + SUBROUTINE ZHER2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA + INTEGER INCX, INCY, LDA, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZHER2 performs the hermitian rank 2 operation +* +* A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A, +* +* where alpha is a scalar, x and y are n element vectors and A is an n +* by n hermitian matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array A is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of A +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of A +* is to be referenced. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular part of the hermitian matrix and the strictly +* lower triangular part of A is not referenced. On exit, the +* upper triangular part of the array A is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular part of the hermitian matrix and the strictly +* upper triangular part of A is not referenced. On exit, the +* lower triangular part of the array A is overwritten by the +* lower triangular part of the updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHER2 ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set up the start points in X and Y if the increments are not both +* unity. +* + IF( ( INCX.NE.1 ).OR.( INCY.NE.1 ) )THEN + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF + JX = KX + JY = KY + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through the triangular part +* of A. +* + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when A is stored in the upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 20, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( J ) ) + TEMP2 = DCONJG( ALPHA*X( J ) ) + DO 10, I = 1, J - 1 + A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 + 10 CONTINUE + A( J, J ) = DBLE( A( J, J ) ) + + $ DBLE( X( J )*TEMP1 + Y( J )*TEMP2 ) + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + 20 CONTINUE + ELSE + DO 40, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( JY ) ) + TEMP2 = DCONJG( ALPHA*X( JX ) ) + IX = KX + IY = KY + DO 30, I = 1, J - 1 + A( I, J ) = A( I, J ) + X( IX )*TEMP1 + $ + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 30 CONTINUE + A( J, J ) = DBLE( A( J, J ) ) + + $ DBLE( X( JX )*TEMP1 + Y( JY )*TEMP2 ) + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + JX = JX + INCX + JY = JY + INCY + 40 CONTINUE + END IF + ELSE +* +* Form A when A is stored in the lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( J ) ) + TEMP2 = DCONJG( ALPHA*X( J ) ) + A( J, J ) = DBLE( A( J, J ) ) + + $ DBLE( X( J )*TEMP1 + Y( J )*TEMP2 ) + DO 50, I = J + 1, N + A( I, J ) = A( I, J ) + X( I )*TEMP1 + Y( I )*TEMP2 + 50 CONTINUE + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( JY ) ) + TEMP2 = DCONJG( ALPHA*X( JX ) ) + A( J, J ) = DBLE( A( J, J ) ) + + $ DBLE( X( JX )*TEMP1 + Y( JY )*TEMP2 ) + IX = JX + IY = JY + DO 70, I = J + 1, N + IX = IX + INCX + IY = IY + INCY + A( I, J ) = A( I, J ) + X( IX )*TEMP1 + $ + Y( IY )*TEMP2 + 70 CONTINUE + ELSE + A( J, J ) = DBLE( A( J, J ) ) + END IF + JX = JX + INCX + JY = JY + INCY + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHER2 . +* + END diff --git a/2.3-1/src/fortran/blas/zher2k.f b/2.3-1/src/fortran/blas/zher2k.f new file mode 100644 index 00000000..408d75cf --- /dev/null +++ b/2.3-1/src/fortran/blas/zher2k.f @@ -0,0 +1,372 @@ + SUBROUTINE ZHER2K( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, BETA, + $ C, LDC ) +* .. Scalar Arguments .. + CHARACTER TRANS, UPLO + INTEGER K, LDA, LDB, LDC, N + DOUBLE PRECISION BETA + COMPLEX*16 ALPHA +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZHER2K performs one of the hermitian rank 2k operations +* +* C := alpha*A*conjg( B' ) + conjg( alpha )*B*conjg( A' ) + beta*C, +* +* or +* +* C := alpha*conjg( A' )*B + conjg( alpha )*conjg( B' )*A + beta*C, +* +* where alpha and beta are scalars with beta real, C is an n by n +* hermitian matrix and A and B are n by k matrices in the first case +* and k by n matrices in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*conjg( B' ) + +* conjg( alpha )*B*conjg( A' ) + +* beta*C. +* +* TRANS = 'C' or 'c' C := alpha*conjg( A' )*B + +* conjg( alpha )*conjg( B' )*A + +* beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrices A and B, and on entry with +* TRANS = 'C' or 'c', K specifies the number of rows of the +* matrices A and B. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array B must contain the matrix B, otherwise +* the leading k by n part of the array B must contain the +* matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDB must be at least max( 1, n ), otherwise LDB must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION . +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the hermitian matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the hermitian matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1. +* Ed Anderson, Cray Research Inc. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, DCONJG, MAX +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + COMPLEX*16 TEMP1, TEMP2 +* .. +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) ) THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ) .AND. ( .NOT.LSAME( UPLO, 'L' ) ) ) THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ) .AND. + $ ( .NOT.LSAME( TRANS, 'C' ) ) ) THEN + INFO = 2 + ELSE IF( N.LT.0 ) THEN + INFO = 3 + ELSE IF( K.LT.0 ) THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) ) THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, NROWA ) ) THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, N ) ) THEN + INFO = 12 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHER2K', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ) .OR. ( ( ( ALPHA.EQ.ZERO ) .OR. ( K.EQ.0 ) ) .AND. + $ ( BETA.EQ.ONE ) ) )RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO ) THEN + IF( UPPER ) THEN + IF( BETA.EQ.DBLE( ZERO ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40 J = 1, N + DO 30 I = 1, J - 1 + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + C( J, J ) = BETA*DBLE( C( J, J ) ) + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.DBLE( ZERO ) ) THEN + DO 60 J = 1, N + DO 50 I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80 J = 1, N + C( J, J ) = BETA*DBLE( C( J, J ) ) + DO 70 I = J + 1, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) ) THEN +* +* Form C := alpha*A*conjg( B' ) + conjg( alpha )*B*conjg( A' ) + +* C. +* + IF( UPPER ) THEN + DO 130 J = 1, N + IF( BETA.EQ.DBLE( ZERO ) ) THEN + DO 90 I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE ) THEN + DO 100 I = 1, J - 1 + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + C( J, J ) = BETA*DBLE( C( J, J ) ) + ELSE + C( J, J ) = DBLE( C( J, J ) ) + END IF + DO 120 L = 1, K + IF( ( A( J, L ).NE.ZERO ) .OR. ( B( J, L ).NE.ZERO ) ) + $ THEN + TEMP1 = ALPHA*DCONJG( B( J, L ) ) + TEMP2 = DCONJG( ALPHA*A( J, L ) ) + DO 110 I = 1, J - 1 + C( I, J ) = C( I, J ) + A( I, L )*TEMP1 + + $ B( I, L )*TEMP2 + 110 CONTINUE + C( J, J ) = DBLE( C( J, J ) ) + + $ DBLE( A( J, L )*TEMP1+B( J, L )*TEMP2 ) + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180 J = 1, N + IF( BETA.EQ.DBLE( ZERO ) ) THEN + DO 140 I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE ) THEN + DO 150 I = J + 1, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + C( J, J ) = BETA*DBLE( C( J, J ) ) + ELSE + C( J, J ) = DBLE( C( J, J ) ) + END IF + DO 170 L = 1, K + IF( ( A( J, L ).NE.ZERO ) .OR. ( B( J, L ).NE.ZERO ) ) + $ THEN + TEMP1 = ALPHA*DCONJG( B( J, L ) ) + TEMP2 = DCONJG( ALPHA*A( J, L ) ) + DO 160 I = J + 1, N + C( I, J ) = C( I, J ) + A( I, L )*TEMP1 + + $ B( I, L )*TEMP2 + 160 CONTINUE + C( J, J ) = DBLE( C( J, J ) ) + + $ DBLE( A( J, L )*TEMP1+B( J, L )*TEMP2 ) + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*conjg( A' )*B + conjg( alpha )*conjg( B' )*A + +* C. +* + IF( UPPER ) THEN + DO 210 J = 1, N + DO 200 I = 1, J + TEMP1 = ZERO + TEMP2 = ZERO + DO 190 L = 1, K + TEMP1 = TEMP1 + DCONJG( A( L, I ) )*B( L, J ) + TEMP2 = TEMP2 + DCONJG( B( L, I ) )*A( L, J ) + 190 CONTINUE + IF( I.EQ.J ) THEN + IF( BETA.EQ.DBLE( ZERO ) ) THEN + C( J, J ) = DBLE( ALPHA*TEMP1+DCONJG( ALPHA )* + $ TEMP2 ) + ELSE + C( J, J ) = BETA*DBLE( C( J, J ) ) + + $ DBLE( ALPHA*TEMP1+DCONJG( ALPHA )* + $ TEMP2 ) + END IF + ELSE + IF( BETA.EQ.DBLE( ZERO ) ) THEN + C( I, J ) = ALPHA*TEMP1 + DCONJG( ALPHA )*TEMP2 + ELSE + C( I, J ) = BETA*C( I, J ) + ALPHA*TEMP1 + + $ DCONJG( ALPHA )*TEMP2 + END IF + END IF + 200 CONTINUE + 210 CONTINUE + ELSE + DO 240 J = 1, N + DO 230 I = J, N + TEMP1 = ZERO + TEMP2 = ZERO + DO 220 L = 1, K + TEMP1 = TEMP1 + DCONJG( A( L, I ) )*B( L, J ) + TEMP2 = TEMP2 + DCONJG( B( L, I ) )*A( L, J ) + 220 CONTINUE + IF( I.EQ.J ) THEN + IF( BETA.EQ.DBLE( ZERO ) ) THEN + C( J, J ) = DBLE( ALPHA*TEMP1+DCONJG( ALPHA )* + $ TEMP2 ) + ELSE + C( J, J ) = BETA*DBLE( C( J, J ) ) + + $ DBLE( ALPHA*TEMP1+DCONJG( ALPHA )* + $ TEMP2 ) + END IF + ELSE + IF( BETA.EQ.DBLE( ZERO ) ) THEN + C( I, J ) = ALPHA*TEMP1 + DCONJG( ALPHA )*TEMP2 + ELSE + C( I, J ) = BETA*C( I, J ) + ALPHA*TEMP1 + + $ DCONJG( ALPHA )*TEMP2 + END IF + END IF + 230 CONTINUE + 240 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHER2K. +* + END diff --git a/2.3-1/src/fortran/blas/zherk.f b/2.3-1/src/fortran/blas/zherk.f new file mode 100644 index 00000000..cfbf7180 --- /dev/null +++ b/2.3-1/src/fortran/blas/zherk.f @@ -0,0 +1,330 @@ + SUBROUTINE ZHERK( UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER TRANS, UPLO + INTEGER K, LDA, LDC, N + DOUBLE PRECISION ALPHA, BETA +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZHERK performs one of the hermitian rank k operations +* +* C := alpha*A*conjg( A' ) + beta*C, +* +* or +* +* C := alpha*conjg( A' )*A + beta*C, +* +* where alpha and beta are real scalars, C is an n by n hermitian +* matrix and A is an n by k matrix in the first case and a k by n +* matrix in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*conjg( A' ) + beta*C. +* +* TRANS = 'C' or 'c' C := alpha*conjg( A' )*A + beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrix A, and on entry with +* TRANS = 'C' or 'c', K specifies the number of rows of the +* matrix A. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - DOUBLE PRECISION. +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the hermitian matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the hermitian matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* -- Modified 8-Nov-93 to set C(J,J) to DBLE( C(J,J) ) when BETA = 1. +* Ed Anderson, Cray Research Inc. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, DCMPLX, DCONJG, MAX +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + DOUBLE PRECISION RTEMP + COMPLEX*16 TEMP +* .. +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) ) THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ) .AND. ( .NOT.LSAME( UPLO, 'L' ) ) ) THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ) .AND. + $ ( .NOT.LSAME( TRANS, 'C' ) ) ) THEN + INFO = 2 + ELSE IF( N.LT.0 ) THEN + INFO = 3 + ELSE IF( K.LT.0 ) THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) ) THEN + INFO = 7 + ELSE IF( LDC.LT.MAX( 1, N ) ) THEN + INFO = 10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHERK ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ) .OR. ( ( ( ALPHA.EQ.ZERO ) .OR. ( K.EQ.0 ) ) .AND. + $ ( BETA.EQ.ONE ) ) )RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO ) THEN + IF( UPPER ) THEN + IF( BETA.EQ.ZERO ) THEN + DO 20 J = 1, N + DO 10 I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40 J = 1, N + DO 30 I = 1, J - 1 + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + C( J, J ) = BETA*DBLE( C( J, J ) ) + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.ZERO ) THEN + DO 60 J = 1, N + DO 50 I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80 J = 1, N + C( J, J ) = BETA*DBLE( C( J, J ) ) + DO 70 I = J + 1, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) ) THEN +* +* Form C := alpha*A*conjg( A' ) + beta*C. +* + IF( UPPER ) THEN + DO 130 J = 1, N + IF( BETA.EQ.ZERO ) THEN + DO 90 I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE ) THEN + DO 100 I = 1, J - 1 + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + C( J, J ) = BETA*DBLE( C( J, J ) ) + ELSE + C( J, J ) = DBLE( C( J, J ) ) + END IF + DO 120 L = 1, K + IF( A( J, L ).NE.DCMPLX( ZERO ) ) THEN + TEMP = ALPHA*DCONJG( A( J, L ) ) + DO 110 I = 1, J - 1 + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 110 CONTINUE + C( J, J ) = DBLE( C( J, J ) ) + + $ DBLE( TEMP*A( I, L ) ) + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180 J = 1, N + IF( BETA.EQ.ZERO ) THEN + DO 140 I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE ) THEN + C( J, J ) = BETA*DBLE( C( J, J ) ) + DO 150 I = J + 1, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + ELSE + C( J, J ) = DBLE( C( J, J ) ) + END IF + DO 170 L = 1, K + IF( A( J, L ).NE.DCMPLX( ZERO ) ) THEN + TEMP = ALPHA*DCONJG( A( J, L ) ) + C( J, J ) = DBLE( C( J, J ) ) + + $ DBLE( TEMP*A( J, L ) ) + DO 160 I = J + 1, N + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*conjg( A' )*A + beta*C. +* + IF( UPPER ) THEN + DO 220 J = 1, N + DO 200 I = 1, J - 1 + TEMP = ZERO + DO 190 L = 1, K + TEMP = TEMP + DCONJG( A( L, I ) )*A( L, J ) + 190 CONTINUE + IF( BETA.EQ.ZERO ) THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 200 CONTINUE + RTEMP = ZERO + DO 210 L = 1, K + RTEMP = RTEMP + DCONJG( A( L, J ) )*A( L, J ) + 210 CONTINUE + IF( BETA.EQ.ZERO ) THEN + C( J, J ) = ALPHA*RTEMP + ELSE + C( J, J ) = ALPHA*RTEMP + BETA*DBLE( C( J, J ) ) + END IF + 220 CONTINUE + ELSE + DO 260 J = 1, N + RTEMP = ZERO + DO 230 L = 1, K + RTEMP = RTEMP + DCONJG( A( L, J ) )*A( L, J ) + 230 CONTINUE + IF( BETA.EQ.ZERO ) THEN + C( J, J ) = ALPHA*RTEMP + ELSE + C( J, J ) = ALPHA*RTEMP + BETA*DBLE( C( J, J ) ) + END IF + DO 250 I = J + 1, N + TEMP = ZERO + DO 240 L = 1, K + TEMP = TEMP + DCONJG( A( L, I ) )*A( L, J ) + 240 CONTINUE + IF( BETA.EQ.ZERO ) THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 250 CONTINUE + 260 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHERK . +* + END diff --git a/2.3-1/src/fortran/blas/zhpmv.f b/2.3-1/src/fortran/blas/zhpmv.f new file mode 100644 index 00000000..9cde9234 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhpmv.f @@ -0,0 +1,270 @@ + SUBROUTINE ZHPMV ( UPLO, N, ALPHA, AP, X, INCX, BETA, Y, INCY ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA, BETA + INTEGER INCX, INCY, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 AP( * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZHPMV performs the matrix-vector operation +* +* y := alpha*A*x + beta*y, +* +* where alpha and beta are scalars, x and y are n element vectors and +* A is an n by n hermitian matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* AP - COMPLEX*16 array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. +* Note that the imaginary parts of the diagonal elements need +* not be set and are assumed to be zero. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then Y need not be set on input. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. On exit, Y is overwritten by the updated +* vector y. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 6 + ELSE IF( INCY.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHPMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* Set up the start points in X and Y. +* + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* +* First form y := beta*y. +* + IF( BETA.NE.ONE )THEN + IF( INCY.EQ.1 )THEN + IF( BETA.EQ.ZERO )THEN + DO 10, I = 1, N + Y( I ) = ZERO + 10 CONTINUE + ELSE + DO 20, I = 1, N + Y( I ) = BETA*Y( I ) + 20 CONTINUE + END IF + ELSE + IY = KY + IF( BETA.EQ.ZERO )THEN + DO 30, I = 1, N + Y( IY ) = ZERO + IY = IY + INCY + 30 CONTINUE + ELSE + DO 40, I = 1, N + Y( IY ) = BETA*Y( IY ) + IY = IY + INCY + 40 CONTINUE + END IF + END IF + END IF + IF( ALPHA.EQ.ZERO ) + $ RETURN + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form y when AP contains the upper triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + K = KK + DO 50, I = 1, J - 1 + Y( I ) = Y( I ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + DCONJG( AP( K ) )*X( I ) + K = K + 1 + 50 CONTINUE + Y( J ) = Y( J ) + TEMP1*DBLE( AP( KK + J - 1 ) ) + $ + ALPHA*TEMP2 + KK = KK + J + 60 CONTINUE + ELSE + JX = KX + JY = KY + DO 80, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + IX = KX + IY = KY + DO 70, K = KK, KK + J - 2 + Y( IY ) = Y( IY ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + DCONJG( AP( K ) )*X( IX ) + IX = IX + INCX + IY = IY + INCY + 70 CONTINUE + Y( JY ) = Y( JY ) + TEMP1*DBLE( AP( KK + J - 1 ) ) + $ + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + KK = KK + J + 80 CONTINUE + END IF + ELSE +* +* Form y when AP contains the lower triangle. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 100, J = 1, N + TEMP1 = ALPHA*X( J ) + TEMP2 = ZERO + Y( J ) = Y( J ) + TEMP1*DBLE( AP( KK ) ) + K = KK + 1 + DO 90, I = J + 1, N + Y( I ) = Y( I ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + DCONJG( AP( K ) )*X( I ) + K = K + 1 + 90 CONTINUE + Y( J ) = Y( J ) + ALPHA*TEMP2 + KK = KK + ( N - J + 1 ) + 100 CONTINUE + ELSE + JX = KX + JY = KY + DO 120, J = 1, N + TEMP1 = ALPHA*X( JX ) + TEMP2 = ZERO + Y( JY ) = Y( JY ) + TEMP1*DBLE( AP( KK ) ) + IX = JX + IY = JY + DO 110, K = KK + 1, KK + N - J + IX = IX + INCX + IY = IY + INCY + Y( IY ) = Y( IY ) + TEMP1*AP( K ) + TEMP2 = TEMP2 + DCONJG( AP( K ) )*X( IX ) + 110 CONTINUE + Y( JY ) = Y( JY ) + ALPHA*TEMP2 + JX = JX + INCX + JY = JY + INCY + KK = KK + ( N - J + 1 ) + 120 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHPMV . +* + END diff --git a/2.3-1/src/fortran/blas/zhpr.f b/2.3-1/src/fortran/blas/zhpr.f new file mode 100644 index 00000000..2e368de4 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhpr.f @@ -0,0 +1,217 @@ + SUBROUTINE ZHPR ( UPLO, N, ALPHA, X, INCX, AP ) +* .. Scalar Arguments .. + DOUBLE PRECISION ALPHA + INTEGER INCX, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZHPR performs the hermitian rank 1 operation +* +* A := alpha*x*conjg( x' ) + A, +* +* where alpha is a real scalar, x is an n element vector and A is an +* n by n hermitian matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - DOUBLE PRECISION. +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* AP - COMPLEX*16 array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. On exit, the array +* AP is overwritten by the upper triangular part of the +* updated matrix. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. On exit, the array +* AP is overwritten by the lower triangular part of the +* updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHPR ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.DBLE( ZERO ) ) ) + $ RETURN +* +* Set the start point in X if the increment is not unity. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when upper triangle is stored in AP. +* + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( J ) ) + K = KK + DO 10, I = 1, J - 1 + AP( K ) = AP( K ) + X( I )*TEMP + K = K + 1 + 10 CONTINUE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + $ + DBLE( X( J )*TEMP ) + ELSE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + END IF + KK = KK + J + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( JX ) ) + IX = KX + DO 30, K = KK, KK + J - 2 + AP( K ) = AP( K ) + X( IX )*TEMP + IX = IX + INCX + 30 CONTINUE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + $ + DBLE( X( JX )*TEMP ) + ELSE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + END IF + JX = JX + INCX + KK = KK + J + 40 CONTINUE + END IF + ELSE +* +* Form A when lower triangle is stored in AP. +* + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( J ) ) + AP( KK ) = DBLE( AP( KK ) ) + DBLE( TEMP*X( J ) ) + K = KK + 1 + DO 50, I = J + 1, N + AP( K ) = AP( K ) + X( I )*TEMP + K = K + 1 + 50 CONTINUE + ELSE + AP( KK ) = DBLE( AP( KK ) ) + END IF + KK = KK + N - J + 1 + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = ALPHA*DCONJG( X( JX ) ) + AP( KK ) = DBLE( AP( KK ) ) + DBLE( TEMP*X( JX ) ) + IX = JX + DO 70, K = KK + 1, KK + N - J + IX = IX + INCX + AP( K ) = AP( K ) + X( IX )*TEMP + 70 CONTINUE + ELSE + AP( KK ) = DBLE( AP( KK ) ) + END IF + JX = JX + INCX + KK = KK + N - J + 1 + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHPR . +* + END diff --git a/2.3-1/src/fortran/blas/zhpr2.f b/2.3-1/src/fortran/blas/zhpr2.f new file mode 100644 index 00000000..e10774b1 --- /dev/null +++ b/2.3-1/src/fortran/blas/zhpr2.f @@ -0,0 +1,251 @@ + SUBROUTINE ZHPR2 ( UPLO, N, ALPHA, X, INCX, Y, INCY, AP ) +* .. Scalar Arguments .. + COMPLEX*16 ALPHA + INTEGER INCX, INCY, N + CHARACTER*1 UPLO +* .. Array Arguments .. + COMPLEX*16 AP( * ), X( * ), Y( * ) +* .. +* +* Purpose +* ======= +* +* ZHPR2 performs the hermitian rank 2 operation +* +* A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A, +* +* where alpha is a scalar, x and y are n element vectors and A is an +* n by n hermitian matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the matrix A is supplied in the packed +* array AP as follows: +* +* UPLO = 'U' or 'u' The upper triangular part of A is +* supplied in AP. +* +* UPLO = 'L' or 'l' The lower triangular part of A is +* supplied in AP. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. +* Unchanged on exit. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* Y - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCY ) ). +* Before entry, the incremented array Y must contain the n +* element vector y. +* Unchanged on exit. +* +* INCY - INTEGER. +* On entry, INCY specifies the increment for the elements of +* Y. INCY must not be zero. +* Unchanged on exit. +* +* AP - COMPLEX*16 array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 1, 2 ) +* and a( 2, 2 ) respectively, and so on. On exit, the array +* AP is overwritten by the upper triangular part of the +* updated matrix. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular part of the hermitian matrix +* packed sequentially, column by column, so that AP( 1 ) +* contains a( 1, 1 ), AP( 2 ) and AP( 3 ) contain a( 2, 1 ) +* and a( 3, 1 ) respectively, and so on. On exit, the array +* AP is overwritten by the lower triangular part of the +* updated matrix. +* Note that the imaginary parts of the diagonal elements need +* not be set, they are assumed to be zero, and on exit they +* are set to zero. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP1, TEMP2 + INTEGER I, INFO, IX, IY, J, JX, JY, K, KK, KX, KY +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, DBLE +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO, 'U' ).AND. + $ .NOT.LSAME( UPLO, 'L' ) )THEN + INFO = 1 + ELSE IF( N.LT.0 )THEN + INFO = 2 + ELSE IF( INCX.EQ.0 )THEN + INFO = 5 + ELSE IF( INCY.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZHPR2 ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) + $ RETURN +* +* Set up the start points in X and Y if the increments are not both +* unity. +* + IF( ( INCX.NE.1 ).OR.( INCY.NE.1 ) )THEN + IF( INCX.GT.0 )THEN + KX = 1 + ELSE + KX = 1 - ( N - 1 )*INCX + END IF + IF( INCY.GT.0 )THEN + KY = 1 + ELSE + KY = 1 - ( N - 1 )*INCY + END IF + JX = KX + JY = KY + END IF +* +* Start the operations. In this version the elements of the array AP +* are accessed sequentially with one pass through AP. +* + KK = 1 + IF( LSAME( UPLO, 'U' ) )THEN +* +* Form A when upper triangle is stored in AP. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 20, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( J ) ) + TEMP2 = DCONJG( ALPHA*X( J ) ) + K = KK + DO 10, I = 1, J - 1 + AP( K ) = AP( K ) + X( I )*TEMP1 + Y( I )*TEMP2 + K = K + 1 + 10 CONTINUE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + + $ DBLE( X( J )*TEMP1 + Y( J )*TEMP2 ) + ELSE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + END IF + KK = KK + J + 20 CONTINUE + ELSE + DO 40, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( JY ) ) + TEMP2 = DCONJG( ALPHA*X( JX ) ) + IX = KX + IY = KY + DO 30, K = KK, KK + J - 2 + AP( K ) = AP( K ) + X( IX )*TEMP1 + Y( IY )*TEMP2 + IX = IX + INCX + IY = IY + INCY + 30 CONTINUE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + + $ DBLE( X( JX )*TEMP1 + + $ Y( JY )*TEMP2 ) + ELSE + AP( KK + J - 1 ) = DBLE( AP( KK + J - 1 ) ) + END IF + JX = JX + INCX + JY = JY + INCY + KK = KK + J + 40 CONTINUE + END IF + ELSE +* +* Form A when lower triangle is stored in AP. +* + IF( ( INCX.EQ.1 ).AND.( INCY.EQ.1 ) )THEN + DO 60, J = 1, N + IF( ( X( J ).NE.ZERO ).OR.( Y( J ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( J ) ) + TEMP2 = DCONJG( ALPHA*X( J ) ) + AP( KK ) = DBLE( AP( KK ) ) + + $ DBLE( X( J )*TEMP1 + Y( J )*TEMP2 ) + K = KK + 1 + DO 50, I = J + 1, N + AP( K ) = AP( K ) + X( I )*TEMP1 + Y( I )*TEMP2 + K = K + 1 + 50 CONTINUE + ELSE + AP( KK ) = DBLE( AP( KK ) ) + END IF + KK = KK + N - J + 1 + 60 CONTINUE + ELSE + DO 80, J = 1, N + IF( ( X( JX ).NE.ZERO ).OR.( Y( JY ).NE.ZERO ) )THEN + TEMP1 = ALPHA*DCONJG( Y( JY ) ) + TEMP2 = DCONJG( ALPHA*X( JX ) ) + AP( KK ) = DBLE( AP( KK ) ) + + $ DBLE( X( JX )*TEMP1 + Y( JY )*TEMP2 ) + IX = JX + IY = JY + DO 70, K = KK + 1, KK + N - J + IX = IX + INCX + IY = IY + INCY + AP( K ) = AP( K ) + X( IX )*TEMP1 + Y( IY )*TEMP2 + 70 CONTINUE + ELSE + AP( KK ) = DBLE( AP( KK ) ) + END IF + JX = JX + INCX + JY = JY + INCY + KK = KK + N - J + 1 + 80 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZHPR2 . +* + END diff --git a/2.3-1/src/fortran/blas/zrotg.f b/2.3-1/src/fortran/blas/zrotg.f new file mode 100644 index 00000000..f6a4aa12 --- /dev/null +++ b/2.3-1/src/fortran/blas/zrotg.f @@ -0,0 +1,21 @@ + subroutine zrotg(ca,cb,c,s) + double complex ca,cb,s + double precision c + double precision norm,scale + double complex alpha + if (cdabs(ca) .ne. 0.0d0) go to 10 + c = 0.0d0 + s = (1.0d0,0.0d0) + ca = cb + go to 20 + 10 continue + scale = cdabs(ca) + cdabs(cb) + norm = scale*dsqrt((cdabs(ca/dcmplx(scale,0.0d0)))**2 + + * (cdabs(cb/dcmplx(scale,0.0d0)))**2) + alpha = ca /cdabs(ca) + c = cdabs(ca) / norm + s = alpha * dconjg(cb) / norm + ca = alpha * norm + 20 continue + return + end diff --git a/2.3-1/src/fortran/blas/zscal.f b/2.3-1/src/fortran/blas/zscal.f new file mode 100644 index 00000000..6fa85763 --- /dev/null +++ b/2.3-1/src/fortran/blas/zscal.f @@ -0,0 +1,29 @@ + subroutine zscal(n,za,zx,incx) +c +c scales a vector by a constant. +c jack dongarra, 3/11/78. +c modified 3/93 to return if incx .le. 0. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex za,zx(*) + integer i,incx,ix,n +c + if( n.le.0 .or. incx.le.0 )return + if(incx.eq.1)go to 20 +c +c code for increment not equal to 1 +c + ix = 1 + do 10 i = 1,n + zx(ix) = za*zx(ix) + ix = ix + incx + 10 continue + return +c +c code for increment equal to 1 +c + 20 do 30 i = 1,n + zx(i) = za*zx(i) + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/zswap.f b/2.3-1/src/fortran/blas/zswap.f new file mode 100644 index 00000000..f28a4e41 --- /dev/null +++ b/2.3-1/src/fortran/blas/zswap.f @@ -0,0 +1,36 @@ + subroutine zswap (n,zx,incx,zy,incy) +c +c interchanges two vectors. +c jack dongarra, 3/11/78. +c modified 12/3/93, array(1) declarations changed to array(*) +c + double complex zx(*),zy(*),ztemp + integer i,incx,incy,ix,iy,n +c + if(n.le.0)return + if(incx.eq.1.and.incy.eq.1)go to 20 +c +c code for unequal increments or equal increments not equal +c to 1 +c + ix = 1 + iy = 1 + if(incx.lt.0)ix = (-n+1)*incx + 1 + if(incy.lt.0)iy = (-n+1)*incy + 1 + do 10 i = 1,n + ztemp = zx(ix) + zx(ix) = zy(iy) + zy(iy) = ztemp + ix = ix + incx + iy = iy + incy + 10 continue + return +c +c code for both increments equal to 1 + 20 do 30 i = 1,n + ztemp = zx(i) + zx(i) = zy(i) + zy(i) = ztemp + 30 continue + return + end diff --git a/2.3-1/src/fortran/blas/zsymm.f b/2.3-1/src/fortran/blas/zsymm.f new file mode 100644 index 00000000..20b7c08d --- /dev/null +++ b/2.3-1/src/fortran/blas/zsymm.f @@ -0,0 +1,296 @@ + SUBROUTINE ZSYMM ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO + INTEGER M, N, LDA, LDB, LDC + COMPLEX*16 ALPHA, BETA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZSYMM performs one of the matrix-matrix operations +* +* C := alpha*A*B + beta*C, +* +* or +* +* C := alpha*B*A + beta*C, +* +* where alpha and beta are scalars, A is a symmetric matrix and B and +* C are m by n matrices. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether the symmetric matrix A +* appears on the left or right in the operation as follows: +* +* SIDE = 'L' or 'l' C := alpha*A*B + beta*C, +* +* SIDE = 'R' or 'r' C := alpha*B*A + beta*C, +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the symmetric matrix A is to be +* referenced as follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of the +* symmetric matrix is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of the +* symmetric matrix is to be referenced. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of the matrix C. +* M must be at least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of the matrix C. +* N must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* m when SIDE = 'L' or 'l' and is n otherwise. +* Before entry with SIDE = 'L' or 'l', the m by m part of +* the array A must contain the symmetric matrix, such that +* when UPLO = 'U' or 'u', the leading m by m upper triangular +* part of the array A must contain the upper triangular part +* of the symmetric matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading m by m lower triangular part of the array A +* must contain the lower triangular part of the symmetric +* matrix and the strictly upper triangular part of A is not +* referenced. +* Before entry with SIDE = 'R' or 'r', the n by n part of +* the array A must contain the symmetric matrix, such that +* when UPLO = 'U' or 'u', the leading n by n upper triangular +* part of the array A must contain the upper triangular part +* of the symmetric matrix and the strictly lower triangular +* part of A is not referenced, and when UPLO = 'L' or 'l', +* the leading n by n lower triangular part of the array A +* must contain the lower triangular part of the symmetric +* matrix and the strictly upper triangular part of A is not +* referenced. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), otherwise LDA must be at +* least max( 1, n ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. When BETA is +* supplied as zero then C need not be set on input. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry, the leading m by n part of the array C must +* contain the matrix C, except when beta is zero, in which +* case C need not be set on entry. +* On exit, the array C is overwritten by the m by n updated +* matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, K, NROWA + COMPLEX*16 TEMP1, TEMP2 +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Set NROWA as the number of rows of A. +* + IF( LSAME( SIDE, 'L' ) )THEN + NROWA = M + ELSE + NROWA = N + END IF + UPPER = LSAME( UPLO, 'U' ) +* +* Test the input parameters. +* + INFO = 0 + IF( ( .NOT.LSAME( SIDE, 'L' ) ).AND. + $ ( .NOT.LSAME( SIDE, 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO, 'L' ) ) )THEN + INFO = 2 + ELSE IF( M .LT.0 )THEN + INFO = 3 + ELSE IF( N .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, M ) )THEN + INFO = 12 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZSYMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. + $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, M + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( SIDE, 'L' ) )THEN +* +* Form C := alpha*A*B + beta*C. +* + IF( UPPER )THEN + DO 70, J = 1, N + DO 60, I = 1, M + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 50, K = 1, I - 1 + C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) + TEMP2 = TEMP2 + B( K, J )*A( K, I ) + 50 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*A( I, I ) + ALPHA*TEMP2 + END IF + 60 CONTINUE + 70 CONTINUE + ELSE + DO 100, J = 1, N + DO 90, I = M, 1, -1 + TEMP1 = ALPHA*B( I, J ) + TEMP2 = ZERO + DO 80, K = I + 1, M + C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) + TEMP2 = TEMP2 + B( K, J )*A( K, I ) + 80 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ TEMP1*A( I, I ) + ALPHA*TEMP2 + END IF + 90 CONTINUE + 100 CONTINUE + END IF + ELSE +* +* Form C := alpha*B*A + beta*C. +* + DO 170, J = 1, N + TEMP1 = ALPHA*A( J, J ) + IF( BETA.EQ.ZERO )THEN + DO 110, I = 1, M + C( I, J ) = TEMP1*B( I, J ) + 110 CONTINUE + ELSE + DO 120, I = 1, M + C( I, J ) = BETA*C( I, J ) + TEMP1*B( I, J ) + 120 CONTINUE + END IF + DO 140, K = 1, J - 1 + IF( UPPER )THEN + TEMP1 = ALPHA*A( K, J ) + ELSE + TEMP1 = ALPHA*A( J, K ) + END IF + DO 130, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 130 CONTINUE + 140 CONTINUE + DO 160, K = J + 1, N + IF( UPPER )THEN + TEMP1 = ALPHA*A( J, K ) + ELSE + TEMP1 = ALPHA*A( K, J ) + END IF + DO 150, I = 1, M + C( I, J ) = C( I, J ) + TEMP1*B( I, K ) + 150 CONTINUE + 160 CONTINUE + 170 CONTINUE + END IF +* + RETURN +* +* End of ZSYMM . +* + END diff --git a/2.3-1/src/fortran/blas/zsyr2k.f b/2.3-1/src/fortran/blas/zsyr2k.f new file mode 100644 index 00000000..aba2071a --- /dev/null +++ b/2.3-1/src/fortran/blas/zsyr2k.f @@ -0,0 +1,324 @@ + SUBROUTINE ZSYR2K( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 UPLO, TRANS + INTEGER N, K, LDA, LDB, LDC + COMPLEX*16 ALPHA, BETA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZSYR2K performs one of the symmetric rank 2k operations +* +* C := alpha*A*B' + alpha*B*A' + beta*C, +* +* or +* +* C := alpha*A'*B + alpha*B'*A + beta*C, +* +* where alpha and beta are scalars, C is an n by n symmetric matrix +* and A and B are n by k matrices in the first case and k by n +* matrices in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' + +* beta*C. +* +* TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A + +* beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrices A and B, and on entry with +* TRANS = 'T' or 't', K specifies the number of rows of the +* matrices A and B. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, kb ), where kb is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array B must contain the matrix B, otherwise +* the leading k by n part of the array B must contain the +* matrix B. +* Unchanged on exit. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDB must be at least max( 1, n ), otherwise LDB must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + COMPLEX*16 TEMP1, TEMP2 +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) )THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'T' ) ) )THEN + INFO = 2 + ELSE IF( N .LT.0 )THEN + INFO = 3 + ELSE IF( K .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDB.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDC.LT.MAX( 1, N ) )THEN + INFO = 12 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZSYR2K', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( UPPER )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, J + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.ZERO )THEN + DO 60, J = 1, N + DO 50, I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80, J = 1, N + DO 70, I = J, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form C := alpha*A*B' + alpha*B*A' + C. +* + IF( UPPER )THEN + DO 130, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 90, I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 100, I = 1, J + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + END IF + DO 120, L = 1, K + IF( ( A( J, L ).NE.ZERO ).OR. + $ ( B( J, L ).NE.ZERO ) )THEN + TEMP1 = ALPHA*B( J, L ) + TEMP2 = ALPHA*A( J, L ) + DO 110, I = 1, J + C( I, J ) = C( I, J ) + A( I, L )*TEMP1 + + $ B( I, L )*TEMP2 + 110 CONTINUE + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 140, I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 150, I = J, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + END IF + DO 170, L = 1, K + IF( ( A( J, L ).NE.ZERO ).OR. + $ ( B( J, L ).NE.ZERO ) )THEN + TEMP1 = ALPHA*B( J, L ) + TEMP2 = ALPHA*A( J, L ) + DO 160, I = J, N + C( I, J ) = C( I, J ) + A( I, L )*TEMP1 + + $ B( I, L )*TEMP2 + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*A'*B + alpha*B'*A + C. +* + IF( UPPER )THEN + DO 210, J = 1, N + DO 200, I = 1, J + TEMP1 = ZERO + TEMP2 = ZERO + DO 190, L = 1, K + TEMP1 = TEMP1 + A( L, I )*B( L, J ) + TEMP2 = TEMP2 + B( L, I )*A( L, J ) + 190 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ ALPHA*TEMP1 + ALPHA*TEMP2 + END IF + 200 CONTINUE + 210 CONTINUE + ELSE + DO 240, J = 1, N + DO 230, I = J, N + TEMP1 = ZERO + TEMP2 = ZERO + DO 220, L = 1, K + TEMP1 = TEMP1 + A( L, I )*B( L, J ) + TEMP2 = TEMP2 + B( L, I )*A( L, J ) + 220 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 + ELSE + C( I, J ) = BETA *C( I, J ) + + $ ALPHA*TEMP1 + ALPHA*TEMP2 + END IF + 230 CONTINUE + 240 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZSYR2K. +* + END diff --git a/2.3-1/src/fortran/blas/zsyrk.f b/2.3-1/src/fortran/blas/zsyrk.f new file mode 100644 index 00000000..77e2c20a --- /dev/null +++ b/2.3-1/src/fortran/blas/zsyrk.f @@ -0,0 +1,293 @@ + SUBROUTINE ZSYRK ( UPLO, TRANS, N, K, ALPHA, A, LDA, + $ BETA, C, LDC ) +* .. Scalar Arguments .. + CHARACTER*1 UPLO, TRANS + INTEGER N, K, LDA, LDC + COMPLEX*16 ALPHA, BETA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZSYRK performs one of the symmetric rank k operations +* +* C := alpha*A*A' + beta*C, +* +* or +* +* C := alpha*A'*A + beta*C, +* +* where alpha and beta are scalars, C is an n by n symmetric matrix +* and A is an n by k matrix in the first case and a k by n matrix +* in the second case. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the upper or lower +* triangular part of the array C is to be referenced as +* follows: +* +* UPLO = 'U' or 'u' Only the upper triangular part of C +* is to be referenced. +* +* UPLO = 'L' or 'l' Only the lower triangular part of C +* is to be referenced. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' C := alpha*A*A' + beta*C. +* +* TRANS = 'T' or 't' C := alpha*A'*A + beta*C. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix C. N must be +* at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with TRANS = 'N' or 'n', K specifies the number +* of columns of the matrix A, and on entry with +* TRANS = 'T' or 't', K specifies the number of rows of the +* matrix A. K must be at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, ka ), where ka is +* k when TRANS = 'N' or 'n', and is n otherwise. +* Before entry with TRANS = 'N' or 'n', the leading n by k +* part of the array A must contain the matrix A, otherwise +* the leading k by n part of the array A must contain the +* matrix A. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When TRANS = 'N' or 'n' +* then LDA must be at least max( 1, n ), otherwise LDA must +* be at least max( 1, k ). +* Unchanged on exit. +* +* BETA - COMPLEX*16 . +* On entry, BETA specifies the scalar beta. +* Unchanged on exit. +* +* C - COMPLEX*16 array of DIMENSION ( LDC, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array C must contain the upper +* triangular part of the symmetric matrix and the strictly +* lower triangular part of C is not referenced. On exit, the +* upper triangular part of the array C is overwritten by the +* upper triangular part of the updated matrix. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array C must contain the lower +* triangular part of the symmetric matrix and the strictly +* upper triangular part of C is not referenced. On exit, the +* lower triangular part of the array C is overwritten by the +* lower triangular part of the updated matrix. +* +* LDC - INTEGER. +* On entry, LDC specifies the first dimension of C as declared +* in the calling (sub) program. LDC must be at least +* max( 1, n ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, INFO, J, L, NROWA + COMPLEX*16 TEMP +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + IF( LSAME( TRANS, 'N' ) )THEN + NROWA = N + ELSE + NROWA = K + END IF + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANS, 'T' ) ) )THEN + INFO = 2 + ELSE IF( N .LT.0 )THEN + INFO = 3 + ELSE IF( K .LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 7 + ELSE IF( LDC.LT.MAX( 1, N ) )THEN + INFO = 10 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZSYRK ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( ( N.EQ.0 ).OR. + $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + IF( UPPER )THEN + IF( BETA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, J + C( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40, J = 1, N + DO 30, I = 1, J + C( I, J ) = BETA*C( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE + IF( BETA.EQ.ZERO )THEN + DO 60, J = 1, N + DO 50, I = J, N + C( I, J ) = ZERO + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80, J = 1, N + DO 70, I = J, N + C( I, J ) = BETA*C( I, J ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + RETURN + END IF +* +* Start the operations. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form C := alpha*A*A' + beta*C. +* + IF( UPPER )THEN + DO 130, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 90, I = 1, J + C( I, J ) = ZERO + 90 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 100, I = 1, J + C( I, J ) = BETA*C( I, J ) + 100 CONTINUE + END IF + DO 120, L = 1, K + IF( A( J, L ).NE.ZERO )THEN + TEMP = ALPHA*A( J, L ) + DO 110, I = 1, J + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 110 CONTINUE + END IF + 120 CONTINUE + 130 CONTINUE + ELSE + DO 180, J = 1, N + IF( BETA.EQ.ZERO )THEN + DO 140, I = J, N + C( I, J ) = ZERO + 140 CONTINUE + ELSE IF( BETA.NE.ONE )THEN + DO 150, I = J, N + C( I, J ) = BETA*C( I, J ) + 150 CONTINUE + END IF + DO 170, L = 1, K + IF( A( J, L ).NE.ZERO )THEN + TEMP = ALPHA*A( J, L ) + DO 160, I = J, N + C( I, J ) = C( I, J ) + TEMP*A( I, L ) + 160 CONTINUE + END IF + 170 CONTINUE + 180 CONTINUE + END IF + ELSE +* +* Form C := alpha*A'*A + beta*C. +* + IF( UPPER )THEN + DO 210, J = 1, N + DO 200, I = 1, J + TEMP = ZERO + DO 190, L = 1, K + TEMP = TEMP + A( L, I )*A( L, J ) + 190 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 200 CONTINUE + 210 CONTINUE + ELSE + DO 240, J = 1, N + DO 230, I = J, N + TEMP = ZERO + DO 220, L = 1, K + TEMP = TEMP + A( L, I )*A( L, J ) + 220 CONTINUE + IF( BETA.EQ.ZERO )THEN + C( I, J ) = ALPHA*TEMP + ELSE + C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) + END IF + 230 CONTINUE + 240 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZSYRK . +* + END diff --git a/2.3-1/src/fortran/blas/ztbmv.f b/2.3-1/src/fortran/blas/ztbmv.f new file mode 100644 index 00000000..17944082 --- /dev/null +++ b/2.3-1/src/fortran/blas/ztbmv.f @@ -0,0 +1,377 @@ + SUBROUTINE ZTBMV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, K, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTBMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, or x := conjg( A' )*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular band matrix, with ( k + 1 ) diagonals. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := conjg( A' )*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with UPLO = 'U' or 'u', K specifies the number of +* super-diagonals of the matrix A. +* On entry with UPLO = 'L' or 'l', K specifies the number of +* sub-diagonals of the matrix A. +* K must satisfy 0 .le. K. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer an upper +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer a lower +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Note that when DIAG = 'U' or 'u' the elements of the array A +* corresponding to the diagonal elements of the matrix are not +* referenced, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( K.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 7 + ELSE IF( INCX.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTBMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + L = KPLUS1 - J + DO 10, I = MAX( 1, J - K ), J - 1 + X( I ) = X( I ) + TEMP*A( L + I, J ) + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( KPLUS1, J ) + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + L = KPLUS1 - J + DO 30, I = MAX( 1, J - K ), J - 1 + X( IX ) = X( IX ) + TEMP*A( L + I, J ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( KPLUS1, J ) + END IF + JX = JX + INCX + IF( J.GT.K ) + $ KX = KX + INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + L = 1 - J + DO 50, I = MIN( N, J + K ), J + 1, -1 + X( I ) = X( I ) + TEMP*A( L + I, J ) + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( 1, J ) + END IF + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + L = 1 - J + DO 70, I = MIN( N, J + K ), J + 1, -1 + X( IX ) = X( IX ) + TEMP*A( L + I, J ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( 1, J ) + END IF + JX = JX - INCX + IF( ( N - J ).GE.K ) + $ KX = KX - INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x or x := conjg( A' )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 110, J = N, 1, -1 + TEMP = X( J ) + L = KPLUS1 - J + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( KPLUS1, J ) + DO 90, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + A( L + I, J )*X( I ) + 90 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( KPLUS1, J ) ) + DO 100, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + DCONJG( A( L + I, J ) )*X( I ) + 100 CONTINUE + END IF + X( J ) = TEMP + 110 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 140, J = N, 1, -1 + TEMP = X( JX ) + KX = KX - INCX + IX = KX + L = KPLUS1 - J + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( KPLUS1, J ) + DO 120, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + A( L + I, J )*X( IX ) + IX = IX - INCX + 120 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( KPLUS1, J ) ) + DO 130, I = J - 1, MAX( 1, J - K ), -1 + TEMP = TEMP + DCONJG( A( L + I, J ) )*X( IX ) + IX = IX - INCX + 130 CONTINUE + END IF + X( JX ) = TEMP + JX = JX - INCX + 140 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 170, J = 1, N + TEMP = X( J ) + L = 1 - J + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( 1, J ) + DO 150, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + A( L + I, J )*X( I ) + 150 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( 1, J ) ) + DO 160, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + DCONJG( A( L + I, J ) )*X( I ) + 160 CONTINUE + END IF + X( J ) = TEMP + 170 CONTINUE + ELSE + JX = KX + DO 200, J = 1, N + TEMP = X( JX ) + KX = KX + INCX + IX = KX + L = 1 - J + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( 1, J ) + DO 180, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + A( L + I, J )*X( IX ) + IX = IX + INCX + 180 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( 1, J ) ) + DO 190, I = J + 1, MIN( N, J + K ) + TEMP = TEMP + DCONJG( A( L + I, J ) )*X( IX ) + IX = IX + INCX + 190 CONTINUE + END IF + X( JX ) = TEMP + JX = JX + INCX + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTBMV . +* + END diff --git a/2.3-1/src/fortran/blas/ztbsv.f b/2.3-1/src/fortran/blas/ztbsv.f new file mode 100644 index 00000000..f3ded819 --- /dev/null +++ b/2.3-1/src/fortran/blas/ztbsv.f @@ -0,0 +1,381 @@ + SUBROUTINE ZTBSV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, K, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTBSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, or conjg( A' )*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular band matrix, with ( k + 1 ) +* diagonals. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' conjg( A' )*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* K - INTEGER. +* On entry with UPLO = 'U' or 'u', K specifies the number of +* super-diagonals of the matrix A. +* On entry with UPLO = 'L' or 'l', K specifies the number of +* sub-diagonals of the matrix A. +* K must satisfy 0 .le. K. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) +* by n part of the array A must contain the upper triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row +* ( k + 1 ) of the array, the first super-diagonal starting at +* position 2 in row k, and so on. The top left k by k triangle +* of the array A is not referenced. +* The following program segment will transfer an upper +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = K + 1 - J +* DO 10, I = MAX( 1, J - K ), J +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) +* by n part of the array A must contain the lower triangular +* band part of the matrix of coefficients, supplied column by +* column, with the leading diagonal of the matrix in row 1 of +* the array, the first sub-diagonal starting at position 1 in +* row 2, and so on. The bottom right k by k triangle of the +* array A is not referenced. +* The following program segment will transfer a lower +* triangular band matrix from conventional full matrix storage +* to band storage: +* +* DO 20, J = 1, N +* M = 1 - J +* DO 10, I = J, MIN( N, J + K ) +* A( M + I, J ) = matrix( I, J ) +* 10 CONTINUE +* 20 CONTINUE +* +* Note that when DIAG = 'U' or 'u' the elements of the array A +* corresponding to the diagonal elements of the matrix are not +* referenced, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* ( k + 1 ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( K.LT.0 )THEN + INFO = 5 + ELSE IF( LDA.LT.( K + 1 ) )THEN + INFO = 7 + ELSE IF( INCX.EQ.0 )THEN + INFO = 9 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTBSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed by sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + L = KPLUS1 - J + IF( NOUNIT ) + $ X( J ) = X( J )/A( KPLUS1, J ) + TEMP = X( J ) + DO 10, I = J - 1, MAX( 1, J - K ), -1 + X( I ) = X( I ) - TEMP*A( L + I, J ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 40, J = N, 1, -1 + KX = KX - INCX + IF( X( JX ).NE.ZERO )THEN + IX = KX + L = KPLUS1 - J + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( KPLUS1, J ) + TEMP = X( JX ) + DO 30, I = J - 1, MAX( 1, J - K ), -1 + X( IX ) = X( IX ) - TEMP*A( L + I, J ) + IX = IX - INCX + 30 CONTINUE + END IF + JX = JX - INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + L = 1 - J + IF( NOUNIT ) + $ X( J ) = X( J )/A( 1, J ) + TEMP = X( J ) + DO 50, I = J + 1, MIN( N, J + K ) + X( I ) = X( I ) - TEMP*A( L + I, J ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + KX = KX + INCX + IF( X( JX ).NE.ZERO )THEN + IX = KX + L = 1 - J + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( 1, J ) + TEMP = X( JX ) + DO 70, I = J + 1, MIN( N, J + K ) + X( IX ) = X( IX ) - TEMP*A( L + I, J ) + IX = IX + INCX + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A' )*x or x := inv( conjg( A') )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KPLUS1 = K + 1 + IF( INCX.EQ.1 )THEN + DO 110, J = 1, N + TEMP = X( J ) + L = KPLUS1 - J + IF( NOCONJ )THEN + DO 90, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - A( L + I, J )*X( I ) + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( KPLUS1, J ) + ELSE + DO 100, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - DCONJG( A( L + I, J ) )*X( I ) + 100 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( KPLUS1, J ) ) + END IF + X( J ) = TEMP + 110 CONTINUE + ELSE + JX = KX + DO 140, J = 1, N + TEMP = X( JX ) + IX = KX + L = KPLUS1 - J + IF( NOCONJ )THEN + DO 120, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - A( L + I, J )*X( IX ) + IX = IX + INCX + 120 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( KPLUS1, J ) + ELSE + DO 130, I = MAX( 1, J - K ), J - 1 + TEMP = TEMP - DCONJG( A( L + I, J ) )*X( IX ) + IX = IX + INCX + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( KPLUS1, J ) ) + END IF + X( JX ) = TEMP + JX = JX + INCX + IF( J.GT.K ) + $ KX = KX + INCX + 140 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 170, J = N, 1, -1 + TEMP = X( J ) + L = 1 - J + IF( NOCONJ )THEN + DO 150, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - A( L + I, J )*X( I ) + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( 1, J ) + ELSE + DO 160, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - DCONJG( A( L + I, J ) )*X( I ) + 160 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( 1, J ) ) + END IF + X( J ) = TEMP + 170 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 200, J = N, 1, -1 + TEMP = X( JX ) + IX = KX + L = 1 - J + IF( NOCONJ )THEN + DO 180, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - A( L + I, J )*X( IX ) + IX = IX - INCX + 180 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( 1, J ) + ELSE + DO 190, I = MIN( N, J + K ), J + 1, -1 + TEMP = TEMP - DCONJG( A( L + I, J ) )*X( IX ) + IX = IX - INCX + 190 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( 1, J ) ) + END IF + X( JX ) = TEMP + JX = JX - INCX + IF( ( N - J ).GE.K ) + $ KX = KX - INCX + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTBSV . +* + END diff --git a/2.3-1/src/fortran/blas/ztpmv.f b/2.3-1/src/fortran/blas/ztpmv.f new file mode 100644 index 00000000..4fad3a8b --- /dev/null +++ b/2.3-1/src/fortran/blas/ztpmv.f @@ -0,0 +1,338 @@ + SUBROUTINE ZTPMV ( UPLO, TRANS, DIAG, N, AP, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTPMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, or x := conjg( A' )*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular matrix, supplied in packed form. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := conjg( A' )*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* AP - COMPLEX*16 array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) +* respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) +* respectively, and so on. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced, but are assumed to be unity. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTPMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of AP are +* accessed sequentially with one pass through AP. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x:= A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = 1 + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + K = KK + DO 10, I = 1, J - 1 + X( I ) = X( I ) + TEMP*AP( K ) + K = K + 1 + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*AP( KK + J - 1 ) + END IF + KK = KK + J + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 30, K = KK, KK + J - 2 + X( IX ) = X( IX ) + TEMP*AP( K ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*AP( KK + J - 1 ) + END IF + JX = JX + INCX + KK = KK + J + 40 CONTINUE + END IF + ELSE + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + K = KK + DO 50, I = N, J + 1, -1 + X( I ) = X( I ) + TEMP*AP( K ) + K = K - 1 + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*AP( KK - N + J ) + END IF + KK = KK - ( N - J + 1 ) + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 70, K = KK, KK - ( N - ( J + 1 ) ), -1 + X( IX ) = X( IX ) + TEMP*AP( K ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*AP( KK - N + J ) + END IF + JX = JX - INCX + KK = KK - ( N - J + 1 ) + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x or x := conjg( A' )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 110, J = N, 1, -1 + TEMP = X( J ) + K = KK - 1 + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 90, I = J - 1, 1, -1 + TEMP = TEMP + AP( K )*X( I ) + K = K - 1 + 90 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( AP( KK ) ) + DO 100, I = J - 1, 1, -1 + TEMP = TEMP + DCONJG( AP( K ) )*X( I ) + K = K - 1 + 100 CONTINUE + END IF + X( J ) = TEMP + KK = KK - J + 110 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 140, J = N, 1, -1 + TEMP = X( JX ) + IX = JX + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 120, K = KK - 1, KK - J + 1, -1 + IX = IX - INCX + TEMP = TEMP + AP( K )*X( IX ) + 120 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( AP( KK ) ) + DO 130, K = KK - 1, KK - J + 1, -1 + IX = IX - INCX + TEMP = TEMP + DCONJG( AP( K ) )*X( IX ) + 130 CONTINUE + END IF + X( JX ) = TEMP + JX = JX - INCX + KK = KK - J + 140 CONTINUE + END IF + ELSE + KK = 1 + IF( INCX.EQ.1 )THEN + DO 170, J = 1, N + TEMP = X( J ) + K = KK + 1 + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 150, I = J + 1, N + TEMP = TEMP + AP( K )*X( I ) + K = K + 1 + 150 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( AP( KK ) ) + DO 160, I = J + 1, N + TEMP = TEMP + DCONJG( AP( K ) )*X( I ) + K = K + 1 + 160 CONTINUE + END IF + X( J ) = TEMP + KK = KK + ( N - J + 1 ) + 170 CONTINUE + ELSE + JX = KX + DO 200, J = 1, N + TEMP = X( JX ) + IX = JX + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*AP( KK ) + DO 180, K = KK + 1, KK + N - J + IX = IX + INCX + TEMP = TEMP + AP( K )*X( IX ) + 180 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( AP( KK ) ) + DO 190, K = KK + 1, KK + N - J + IX = IX + INCX + TEMP = TEMP + DCONJG( AP( K ) )*X( IX ) + 190 CONTINUE + END IF + X( JX ) = TEMP + JX = JX + INCX + KK = KK + ( N - J + 1 ) + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTPMV . +* + END diff --git a/2.3-1/src/fortran/blas/ztpsv.f b/2.3-1/src/fortran/blas/ztpsv.f new file mode 100644 index 00000000..8649f474 --- /dev/null +++ b/2.3-1/src/fortran/blas/ztpsv.f @@ -0,0 +1,341 @@ + SUBROUTINE ZTPSV ( UPLO, TRANS, DIAG, N, AP, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 AP( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTPSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, or conjg( A' )*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular matrix, supplied in packed form. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' conjg( A' )*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* AP - COMPLEX*16 array of DIMENSION at least +* ( ( n*( n + 1 ) )/2 ). +* Before entry with UPLO = 'U' or 'u', the array AP must +* contain the upper triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 1, 2 ) and a( 2, 2 ) +* respectively, and so on. +* Before entry with UPLO = 'L' or 'l', the array AP must +* contain the lower triangular matrix packed sequentially, +* column by column, so that AP( 1 ) contains a( 1, 1 ), +* AP( 2 ) and AP( 3 ) contain a( 2, 1 ) and a( 3, 1 ) +* respectively, and so on. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced, but are assumed to be unity. +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, K, KK, KX + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( INCX.EQ.0 )THEN + INFO = 7 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTPSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of AP are +* accessed sequentially with one pass through AP. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/AP( KK ) + TEMP = X( J ) + K = KK - 1 + DO 10, I = J - 1, 1, -1 + X( I ) = X( I ) - TEMP*AP( K ) + K = K - 1 + 10 CONTINUE + END IF + KK = KK - J + 20 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 40, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/AP( KK ) + TEMP = X( JX ) + IX = JX + DO 30, K = KK - 1, KK - J + 1, -1 + IX = IX - INCX + X( IX ) = X( IX ) - TEMP*AP( K ) + 30 CONTINUE + END IF + JX = JX - INCX + KK = KK - J + 40 CONTINUE + END IF + ELSE + KK = 1 + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/AP( KK ) + TEMP = X( J ) + K = KK + 1 + DO 50, I = J + 1, N + X( I ) = X( I ) - TEMP*AP( K ) + K = K + 1 + 50 CONTINUE + END IF + KK = KK + ( N - J + 1 ) + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/AP( KK ) + TEMP = X( JX ) + IX = JX + DO 70, K = KK + 1, KK + N - J + IX = IX + INCX + X( IX ) = X( IX ) - TEMP*AP( K ) + 70 CONTINUE + END IF + JX = JX + INCX + KK = KK + ( N - J + 1 ) + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + KK = 1 + IF( INCX.EQ.1 )THEN + DO 110, J = 1, N + TEMP = X( J ) + K = KK + IF( NOCONJ )THEN + DO 90, I = 1, J - 1 + TEMP = TEMP - AP( K )*X( I ) + K = K + 1 + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK + J - 1 ) + ELSE + DO 100, I = 1, J - 1 + TEMP = TEMP - DCONJG( AP( K ) )*X( I ) + K = K + 1 + 100 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( AP( KK + J - 1 ) ) + END IF + X( J ) = TEMP + KK = KK + J + 110 CONTINUE + ELSE + JX = KX + DO 140, J = 1, N + TEMP = X( JX ) + IX = KX + IF( NOCONJ )THEN + DO 120, K = KK, KK + J - 2 + TEMP = TEMP - AP( K )*X( IX ) + IX = IX + INCX + 120 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK + J - 1 ) + ELSE + DO 130, K = KK, KK + J - 2 + TEMP = TEMP - DCONJG( AP( K ) )*X( IX ) + IX = IX + INCX + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( AP( KK + J - 1 ) ) + END IF + X( JX ) = TEMP + JX = JX + INCX + KK = KK + J + 140 CONTINUE + END IF + ELSE + KK = ( N*( N + 1 ) )/2 + IF( INCX.EQ.1 )THEN + DO 170, J = N, 1, -1 + TEMP = X( J ) + K = KK + IF( NOCONJ )THEN + DO 150, I = N, J + 1, -1 + TEMP = TEMP - AP( K )*X( I ) + K = K - 1 + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK - N + J ) + ELSE + DO 160, I = N, J + 1, -1 + TEMP = TEMP - DCONJG( AP( K ) )*X( I ) + K = K - 1 + 160 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( AP( KK - N + J ) ) + END IF + X( J ) = TEMP + KK = KK - ( N - J + 1 ) + 170 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 200, J = N, 1, -1 + TEMP = X( JX ) + IX = KX + IF( NOCONJ )THEN + DO 180, K = KK, KK - ( N - ( J + 1 ) ), -1 + TEMP = TEMP - AP( K )*X( IX ) + IX = IX - INCX + 180 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/AP( KK - N + J ) + ELSE + DO 190, K = KK, KK - ( N - ( J + 1 ) ), -1 + TEMP = TEMP - DCONJG( AP( K ) )*X( IX ) + IX = IX - INCX + 190 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( AP( KK - N + J ) ) + END IF + X( JX ) = TEMP + JX = JX - INCX + KK = KK - ( N - J + 1 ) + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTPSV . +* + END diff --git a/2.3-1/src/fortran/blas/ztrmm.f b/2.3-1/src/fortran/blas/ztrmm.f new file mode 100644 index 00000000..30910d1d --- /dev/null +++ b/2.3-1/src/fortran/blas/ztrmm.f @@ -0,0 +1,392 @@ + SUBROUTINE ZTRMM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, + $ B, LDB ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO, TRANSA, DIAG + INTEGER M, N, LDA, LDB + COMPLEX*16 ALPHA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* ZTRMM performs one of the matrix-matrix operations +* +* B := alpha*op( A )*B, or B := alpha*B*op( A ) +* +* where alpha is a scalar, B is an m by n matrix, A is a unit, or +* non-unit, upper or lower triangular matrix and op( A ) is one of +* +* op( A ) = A or op( A ) = A' or op( A ) = conjg( A' ). +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether op( A ) multiplies B from +* the left or right as follows: +* +* SIDE = 'L' or 'l' B := alpha*op( A )*B. +* +* SIDE = 'R' or 'r' B := alpha*B*op( A ). +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix A is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n' op( A ) = A. +* +* TRANSA = 'T' or 't' op( A ) = A'. +* +* TRANSA = 'C' or 'c' op( A ) = conjg( A' ). +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit triangular +* as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of B. M must be at +* least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of B. N must be +* at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. When alpha is +* zero then A is not referenced and B need not be set before +* entry. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m +* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. +* Before entry with UPLO = 'U' or 'u', the leading k by k +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading k by k +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' +* then LDA must be at least max( 1, n ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the matrix B, and on exit is overwritten by the +* transformed matrix. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. Local Scalars .. + LOGICAL LSIDE, NOCONJ, NOUNIT, UPPER + INTEGER I, INFO, J, K, NROWA + COMPLEX*16 TEMP +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + LSIDE = LSAME( SIDE , 'L' ) + IF( LSIDE )THEN + NROWA = M + ELSE + NROWA = N + END IF + NOCONJ = LSAME( TRANSA, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) + UPPER = LSAME( UPLO , 'U' ) +* + INFO = 0 + IF( ( .NOT.LSIDE ).AND. + $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 2 + ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN + INFO = 3 + ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. + $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN + INFO = 4 + ELSE IF( M .LT.0 )THEN + INFO = 5 + ELSE IF( N .LT.0 )THEN + INFO = 6 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTRMM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + B( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + RETURN + END IF +* +* Start the operations. +* + IF( LSIDE )THEN + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*A*B. +* + IF( UPPER )THEN + DO 50, J = 1, N + DO 40, K = 1, M + IF( B( K, J ).NE.ZERO )THEN + TEMP = ALPHA*B( K, J ) + DO 30, I = 1, K - 1 + B( I, J ) = B( I, J ) + TEMP*A( I, K ) + 30 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP*A( K, K ) + B( K, J ) = TEMP + END IF + 40 CONTINUE + 50 CONTINUE + ELSE + DO 80, J = 1, N + DO 70 K = M, 1, -1 + IF( B( K, J ).NE.ZERO )THEN + TEMP = ALPHA*B( K, J ) + B( K, J ) = TEMP + IF( NOUNIT ) + $ B( K, J ) = B( K, J )*A( K, K ) + DO 60, I = K + 1, M + B( I, J ) = B( I, J ) + TEMP*A( I, K ) + 60 CONTINUE + END IF + 70 CONTINUE + 80 CONTINUE + END IF + ELSE +* +* Form B := alpha*A'*B or B := alpha*conjg( A' )*B. +* + IF( UPPER )THEN + DO 120, J = 1, N + DO 110, I = M, 1, -1 + TEMP = B( I, J ) + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( I, I ) + DO 90, K = 1, I - 1 + TEMP = TEMP + A( K, I )*B( K, J ) + 90 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( I, I ) ) + DO 100, K = 1, I - 1 + TEMP = TEMP + DCONJG( A( K, I ) )*B( K, J ) + 100 CONTINUE + END IF + B( I, J ) = ALPHA*TEMP + 110 CONTINUE + 120 CONTINUE + ELSE + DO 160, J = 1, N + DO 150, I = 1, M + TEMP = B( I, J ) + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( I, I ) + DO 130, K = I + 1, M + TEMP = TEMP + A( K, I )*B( K, J ) + 130 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( I, I ) ) + DO 140, K = I + 1, M + TEMP = TEMP + DCONJG( A( K, I ) )*B( K, J ) + 140 CONTINUE + END IF + B( I, J ) = ALPHA*TEMP + 150 CONTINUE + 160 CONTINUE + END IF + END IF + ELSE + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*B*A. +* + IF( UPPER )THEN + DO 200, J = N, 1, -1 + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 170, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 170 CONTINUE + DO 190, K = 1, J - 1 + IF( A( K, J ).NE.ZERO )THEN + TEMP = ALPHA*A( K, J ) + DO 180, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 180 CONTINUE + END IF + 190 CONTINUE + 200 CONTINUE + ELSE + DO 240, J = 1, N + TEMP = ALPHA + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 210, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 210 CONTINUE + DO 230, K = J + 1, N + IF( A( K, J ).NE.ZERO )THEN + TEMP = ALPHA*A( K, J ) + DO 220, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 220 CONTINUE + END IF + 230 CONTINUE + 240 CONTINUE + END IF + ELSE +* +* Form B := alpha*B*A' or B := alpha*B*conjg( A' ). +* + IF( UPPER )THEN + DO 280, K = 1, N + DO 260, J = 1, K - 1 + IF( A( J, K ).NE.ZERO )THEN + IF( NOCONJ )THEN + TEMP = ALPHA*A( J, K ) + ELSE + TEMP = ALPHA*DCONJG( A( J, K ) ) + END IF + DO 250, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 250 CONTINUE + END IF + 260 CONTINUE + TEMP = ALPHA + IF( NOUNIT )THEN + IF( NOCONJ )THEN + TEMP = TEMP*A( K, K ) + ELSE + TEMP = TEMP*DCONJG( A( K, K ) ) + END IF + END IF + IF( TEMP.NE.ONE )THEN + DO 270, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 270 CONTINUE + END IF + 280 CONTINUE + ELSE + DO 320, K = N, 1, -1 + DO 300, J = K + 1, N + IF( A( J, K ).NE.ZERO )THEN + IF( NOCONJ )THEN + TEMP = ALPHA*A( J, K ) + ELSE + TEMP = ALPHA*DCONJG( A( J, K ) ) + END IF + DO 290, I = 1, M + B( I, J ) = B( I, J ) + TEMP*B( I, K ) + 290 CONTINUE + END IF + 300 CONTINUE + TEMP = ALPHA + IF( NOUNIT )THEN + IF( NOCONJ )THEN + TEMP = TEMP*A( K, K ) + ELSE + TEMP = TEMP*DCONJG( A( K, K ) ) + END IF + END IF + IF( TEMP.NE.ONE )THEN + DO 310, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 310 CONTINUE + END IF + 320 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTRMM . +* + END diff --git a/2.3-1/src/fortran/blas/ztrmv.f b/2.3-1/src/fortran/blas/ztrmv.f new file mode 100644 index 00000000..677e212b --- /dev/null +++ b/2.3-1/src/fortran/blas/ztrmv.f @@ -0,0 +1,321 @@ + SUBROUTINE ZTRMV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTRMV performs one of the matrix-vector operations +* +* x := A*x, or x := A'*x, or x := conjg( A' )*x, +* +* where x is an n element vector and A is an n by n unit, or non-unit, +* upper or lower triangular matrix. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the operation to be performed as +* follows: +* +* TRANS = 'N' or 'n' x := A*x. +* +* TRANS = 'T' or 't' x := A'*x. +* +* TRANS = 'C' or 'c' x := conjg( A' )*x. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element vector x. On exit, X is overwritten with the +* tranformed vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, KX + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTRMV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := A*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 20, J = 1, N + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + DO 10, I = 1, J - 1 + X( I ) = X( I ) + TEMP*A( I, J ) + 10 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( J, J ) + END IF + 20 CONTINUE + ELSE + JX = KX + DO 40, J = 1, N + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 30, I = 1, J - 1 + X( IX ) = X( IX ) + TEMP*A( I, J ) + IX = IX + INCX + 30 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( J, J ) + END IF + JX = JX + INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + TEMP = X( J ) + DO 50, I = N, J + 1, -1 + X( I ) = X( I ) + TEMP*A( I, J ) + 50 CONTINUE + IF( NOUNIT ) + $ X( J ) = X( J )*A( J, J ) + END IF + 60 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 80, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + TEMP = X( JX ) + IX = KX + DO 70, I = N, J + 1, -1 + X( IX ) = X( IX ) + TEMP*A( I, J ) + IX = IX - INCX + 70 CONTINUE + IF( NOUNIT ) + $ X( JX ) = X( JX )*A( J, J ) + END IF + JX = JX - INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := A'*x or x := conjg( A' )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 110, J = N, 1, -1 + TEMP = X( J ) + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 90, I = J - 1, 1, -1 + TEMP = TEMP + A( I, J )*X( I ) + 90 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( J, J ) ) + DO 100, I = J - 1, 1, -1 + TEMP = TEMP + DCONJG( A( I, J ) )*X( I ) + 100 CONTINUE + END IF + X( J ) = TEMP + 110 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 140, J = N, 1, -1 + TEMP = X( JX ) + IX = JX + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 120, I = J - 1, 1, -1 + IX = IX - INCX + TEMP = TEMP + A( I, J )*X( IX ) + 120 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( J, J ) ) + DO 130, I = J - 1, 1, -1 + IX = IX - INCX + TEMP = TEMP + DCONJG( A( I, J ) )*X( IX ) + 130 CONTINUE + END IF + X( JX ) = TEMP + JX = JX - INCX + 140 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 170, J = 1, N + TEMP = X( J ) + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 150, I = J + 1, N + TEMP = TEMP + A( I, J )*X( I ) + 150 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( J, J ) ) + DO 160, I = J + 1, N + TEMP = TEMP + DCONJG( A( I, J ) )*X( I ) + 160 CONTINUE + END IF + X( J ) = TEMP + 170 CONTINUE + ELSE + JX = KX + DO 200, J = 1, N + TEMP = X( JX ) + IX = JX + IF( NOCONJ )THEN + IF( NOUNIT ) + $ TEMP = TEMP*A( J, J ) + DO 180, I = J + 1, N + IX = IX + INCX + TEMP = TEMP + A( I, J )*X( IX ) + 180 CONTINUE + ELSE + IF( NOUNIT ) + $ TEMP = TEMP*DCONJG( A( J, J ) ) + DO 190, I = J + 1, N + IX = IX + INCX + TEMP = TEMP + DCONJG( A( I, J ) )*X( IX ) + 190 CONTINUE + END IF + X( JX ) = TEMP + JX = JX + INCX + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTRMV . +* + END diff --git a/2.3-1/src/fortran/blas/ztrsm.f b/2.3-1/src/fortran/blas/ztrsm.f new file mode 100644 index 00000000..e414ec66 --- /dev/null +++ b/2.3-1/src/fortran/blas/ztrsm.f @@ -0,0 +1,414 @@ + SUBROUTINE ZTRSM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, + $ B, LDB ) +* .. Scalar Arguments .. + CHARACTER*1 SIDE, UPLO, TRANSA, DIAG + INTEGER M, N, LDA, LDB + COMPLEX*16 ALPHA +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* ZTRSM solves one of the matrix equations +* +* op( A )*X = alpha*B, or X*op( A ) = alpha*B, +* +* where alpha is a scalar, X and B are m by n matrices, A is a unit, or +* non-unit, upper or lower triangular matrix and op( A ) is one of +* +* op( A ) = A or op( A ) = A' or op( A ) = conjg( A' ). +* +* The matrix X is overwritten on B. +* +* Parameters +* ========== +* +* SIDE - CHARACTER*1. +* On entry, SIDE specifies whether op( A ) appears on the left +* or right of X as follows: +* +* SIDE = 'L' or 'l' op( A )*X = alpha*B. +* +* SIDE = 'R' or 'r' X*op( A ) = alpha*B. +* +* Unchanged on exit. +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix A is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANSA - CHARACTER*1. +* On entry, TRANSA specifies the form of op( A ) to be used in +* the matrix multiplication as follows: +* +* TRANSA = 'N' or 'n' op( A ) = A. +* +* TRANSA = 'T' or 't' op( A ) = A'. +* +* TRANSA = 'C' or 'c' op( A ) = conjg( A' ). +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit triangular +* as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* M - INTEGER. +* On entry, M specifies the number of rows of B. M must be at +* least zero. +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the number of columns of B. N must be +* at least zero. +* Unchanged on exit. +* +* ALPHA - COMPLEX*16 . +* On entry, ALPHA specifies the scalar alpha. When alpha is +* zero then A is not referenced and B need not be set before +* entry. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, k ), where k is m +* when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. +* Before entry with UPLO = 'U' or 'u', the leading k by k +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading k by k +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. When SIDE = 'L' or 'l' then +* LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' +* then LDA must be at least max( 1, n ). +* Unchanged on exit. +* +* B - COMPLEX*16 array of DIMENSION ( LDB, n ). +* Before entry, the leading m by n part of the array B must +* contain the right-hand side matrix B, and on exit is +* overwritten by the solution matrix X. +* +* LDB - INTEGER. +* On entry, LDB specifies the first dimension of B as declared +* in the calling (sub) program. LDB must be at least +* max( 1, m ). +* Unchanged on exit. +* +* +* Level 3 Blas routine. +* +* -- Written on 8-February-1989. +* Jack Dongarra, Argonne National Laboratory. +* Iain Duff, AERE Harwell. +* Jeremy Du Croz, Numerical Algorithms Group Ltd. +* Sven Hammarling, Numerical Algorithms Group Ltd. +* +* +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. Local Scalars .. + LOGICAL LSIDE, NOCONJ, NOUNIT, UPPER + INTEGER I, INFO, J, K, NROWA + COMPLEX*16 TEMP +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + LSIDE = LSAME( SIDE , 'L' ) + IF( LSIDE )THEN + NROWA = M + ELSE + NROWA = N + END IF + NOCONJ = LSAME( TRANSA, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) + UPPER = LSAME( UPLO , 'U' ) +* + INFO = 0 + IF( ( .NOT.LSIDE ).AND. + $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN + INFO = 1 + ELSE IF( ( .NOT.UPPER ).AND. + $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN + INFO = 2 + ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. + $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN + INFO = 3 + ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. + $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN + INFO = 4 + ELSE IF( M .LT.0 )THEN + INFO = 5 + ELSE IF( N .LT.0 )THEN + INFO = 6 + ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN + INFO = 9 + ELSE IF( LDB.LT.MAX( 1, M ) )THEN + INFO = 11 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTRSM ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* And when alpha.eq.zero. +* + IF( ALPHA.EQ.ZERO )THEN + DO 20, J = 1, N + DO 10, I = 1, M + B( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + RETURN + END IF +* +* Start the operations. +* + IF( LSIDE )THEN + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*inv( A )*B. +* + IF( UPPER )THEN + DO 60, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 30, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 30 CONTINUE + END IF + DO 50, K = M, 1, -1 + IF( B( K, J ).NE.ZERO )THEN + IF( NOUNIT ) + $ B( K, J ) = B( K, J )/A( K, K ) + DO 40, I = 1, K - 1 + B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) + 40 CONTINUE + END IF + 50 CONTINUE + 60 CONTINUE + ELSE + DO 100, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 70, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 70 CONTINUE + END IF + DO 90 K = 1, M + IF( B( K, J ).NE.ZERO )THEN + IF( NOUNIT ) + $ B( K, J ) = B( K, J )/A( K, K ) + DO 80, I = K + 1, M + B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) + 80 CONTINUE + END IF + 90 CONTINUE + 100 CONTINUE + END IF + ELSE +* +* Form B := alpha*inv( A' )*B +* or B := alpha*inv( conjg( A' ) )*B. +* + IF( UPPER )THEN + DO 140, J = 1, N + DO 130, I = 1, M + TEMP = ALPHA*B( I, J ) + IF( NOCONJ )THEN + DO 110, K = 1, I - 1 + TEMP = TEMP - A( K, I )*B( K, J ) + 110 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( I, I ) + ELSE + DO 120, K = 1, I - 1 + TEMP = TEMP - DCONJG( A( K, I ) )*B( K, J ) + 120 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( I, I ) ) + END IF + B( I, J ) = TEMP + 130 CONTINUE + 140 CONTINUE + ELSE + DO 180, J = 1, N + DO 170, I = M, 1, -1 + TEMP = ALPHA*B( I, J ) + IF( NOCONJ )THEN + DO 150, K = I + 1, M + TEMP = TEMP - A( K, I )*B( K, J ) + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( I, I ) + ELSE + DO 160, K = I + 1, M + TEMP = TEMP - DCONJG( A( K, I ) )*B( K, J ) + 160 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( I, I ) ) + END IF + B( I, J ) = TEMP + 170 CONTINUE + 180 CONTINUE + END IF + END IF + ELSE + IF( LSAME( TRANSA, 'N' ) )THEN +* +* Form B := alpha*B*inv( A ). +* + IF( UPPER )THEN + DO 230, J = 1, N + IF( ALPHA.NE.ONE )THEN + DO 190, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 190 CONTINUE + END IF + DO 210, K = 1, J - 1 + IF( A( K, J ).NE.ZERO )THEN + DO 200, I = 1, M + B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) + 200 CONTINUE + END IF + 210 CONTINUE + IF( NOUNIT )THEN + TEMP = ONE/A( J, J ) + DO 220, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 220 CONTINUE + END IF + 230 CONTINUE + ELSE + DO 280, J = N, 1, -1 + IF( ALPHA.NE.ONE )THEN + DO 240, I = 1, M + B( I, J ) = ALPHA*B( I, J ) + 240 CONTINUE + END IF + DO 260, K = J + 1, N + IF( A( K, J ).NE.ZERO )THEN + DO 250, I = 1, M + B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) + 250 CONTINUE + END IF + 260 CONTINUE + IF( NOUNIT )THEN + TEMP = ONE/A( J, J ) + DO 270, I = 1, M + B( I, J ) = TEMP*B( I, J ) + 270 CONTINUE + END IF + 280 CONTINUE + END IF + ELSE +* +* Form B := alpha*B*inv( A' ) +* or B := alpha*B*inv( conjg( A' ) ). +* + IF( UPPER )THEN + DO 330, K = N, 1, -1 + IF( NOUNIT )THEN + IF( NOCONJ )THEN + TEMP = ONE/A( K, K ) + ELSE + TEMP = ONE/DCONJG( A( K, K ) ) + END IF + DO 290, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 290 CONTINUE + END IF + DO 310, J = 1, K - 1 + IF( A( J, K ).NE.ZERO )THEN + IF( NOCONJ )THEN + TEMP = A( J, K ) + ELSE + TEMP = DCONJG( A( J, K ) ) + END IF + DO 300, I = 1, M + B( I, J ) = B( I, J ) - TEMP*B( I, K ) + 300 CONTINUE + END IF + 310 CONTINUE + IF( ALPHA.NE.ONE )THEN + DO 320, I = 1, M + B( I, K ) = ALPHA*B( I, K ) + 320 CONTINUE + END IF + 330 CONTINUE + ELSE + DO 380, K = 1, N + IF( NOUNIT )THEN + IF( NOCONJ )THEN + TEMP = ONE/A( K, K ) + ELSE + TEMP = ONE/DCONJG( A( K, K ) ) + END IF + DO 340, I = 1, M + B( I, K ) = TEMP*B( I, K ) + 340 CONTINUE + END IF + DO 360, J = K + 1, N + IF( A( J, K ).NE.ZERO )THEN + IF( NOCONJ )THEN + TEMP = A( J, K ) + ELSE + TEMP = DCONJG( A( J, K ) ) + END IF + DO 350, I = 1, M + B( I, J ) = B( I, J ) - TEMP*B( I, K ) + 350 CONTINUE + END IF + 360 CONTINUE + IF( ALPHA.NE.ONE )THEN + DO 370, I = 1, M + B( I, K ) = ALPHA*B( I, K ) + 370 CONTINUE + END IF + 380 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTRSM . +* + END diff --git a/2.3-1/src/fortran/blas/ztrsv.f b/2.3-1/src/fortran/blas/ztrsv.f new file mode 100644 index 00000000..d0a57c44 --- /dev/null +++ b/2.3-1/src/fortran/blas/ztrsv.f @@ -0,0 +1,324 @@ + SUBROUTINE ZTRSV ( UPLO, TRANS, DIAG, N, A, LDA, X, INCX ) +* .. Scalar Arguments .. + INTEGER INCX, LDA, N + CHARACTER*1 DIAG, TRANS, UPLO +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZTRSV solves one of the systems of equations +* +* A*x = b, or A'*x = b, or conjg( A' )*x = b, +* +* where b and x are n element vectors and A is an n by n unit, or +* non-unit, upper or lower triangular matrix. +* +* No test for singularity or near-singularity is included in this +* routine. Such tests must be performed before calling this routine. +* +* Parameters +* ========== +* +* UPLO - CHARACTER*1. +* On entry, UPLO specifies whether the matrix is an upper or +* lower triangular matrix as follows: +* +* UPLO = 'U' or 'u' A is an upper triangular matrix. +* +* UPLO = 'L' or 'l' A is a lower triangular matrix. +* +* Unchanged on exit. +* +* TRANS - CHARACTER*1. +* On entry, TRANS specifies the equations to be solved as +* follows: +* +* TRANS = 'N' or 'n' A*x = b. +* +* TRANS = 'T' or 't' A'*x = b. +* +* TRANS = 'C' or 'c' conjg( A' )*x = b. +* +* Unchanged on exit. +* +* DIAG - CHARACTER*1. +* On entry, DIAG specifies whether or not A is unit +* triangular as follows: +* +* DIAG = 'U' or 'u' A is assumed to be unit triangular. +* +* DIAG = 'N' or 'n' A is not assumed to be unit +* triangular. +* +* Unchanged on exit. +* +* N - INTEGER. +* On entry, N specifies the order of the matrix A. +* N must be at least zero. +* Unchanged on exit. +* +* A - COMPLEX*16 array of DIMENSION ( LDA, n ). +* Before entry with UPLO = 'U' or 'u', the leading n by n +* upper triangular part of the array A must contain the upper +* triangular matrix and the strictly lower triangular part of +* A is not referenced. +* Before entry with UPLO = 'L' or 'l', the leading n by n +* lower triangular part of the array A must contain the lower +* triangular matrix and the strictly upper triangular part of +* A is not referenced. +* Note that when DIAG = 'U' or 'u', the diagonal elements of +* A are not referenced either, but are assumed to be unity. +* Unchanged on exit. +* +* LDA - INTEGER. +* On entry, LDA specifies the first dimension of A as declared +* in the calling (sub) program. LDA must be at least +* max( 1, n ). +* Unchanged on exit. +* +* X - COMPLEX*16 array of dimension at least +* ( 1 + ( n - 1 )*abs( INCX ) ). +* Before entry, the incremented array X must contain the n +* element right-hand side vector b. On exit, X is overwritten +* with the solution vector x. +* +* INCX - INTEGER. +* On entry, INCX specifies the increment for the elements of +* X. INCX must not be zero. +* Unchanged on exit. +* +* +* Level 2 Blas routine. +* +* -- Written on 22-October-1986. +* Jack Dongarra, Argonne National Lab. +* Jeremy Du Croz, Nag Central Office. +* Sven Hammarling, Nag Central Office. +* Richard Hanson, Sandia National Labs. +* +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. Local Scalars .. + COMPLEX*16 TEMP + INTEGER I, INFO, IX, J, JX, KX + LOGICAL NOCONJ, NOUNIT +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. External Subroutines .. + EXTERNAL XERBLA +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF ( .NOT.LSAME( UPLO , 'U' ).AND. + $ .NOT.LSAME( UPLO , 'L' ) )THEN + INFO = 1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. + $ .NOT.LSAME( TRANS, 'T' ).AND. + $ .NOT.LSAME( TRANS, 'C' ) )THEN + INFO = 2 + ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. + $ .NOT.LSAME( DIAG , 'N' ) )THEN + INFO = 3 + ELSE IF( N.LT.0 )THEN + INFO = 4 + ELSE IF( LDA.LT.MAX( 1, N ) )THEN + INFO = 6 + ELSE IF( INCX.EQ.0 )THEN + INFO = 8 + END IF + IF( INFO.NE.0 )THEN + CALL XERBLA( 'ZTRSV ', INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* + NOCONJ = LSAME( TRANS, 'T' ) + NOUNIT = LSAME( DIAG , 'N' ) +* +* Set up the start point in X if the increment is not unity. This +* will be ( N - 1 )*INCX too small for descending loops. +* + IF( INCX.LE.0 )THEN + KX = 1 - ( N - 1 )*INCX + ELSE IF( INCX.NE.1 )THEN + KX = 1 + END IF +* +* Start the operations. In this version the elements of A are +* accessed sequentially with one pass through A. +* + IF( LSAME( TRANS, 'N' ) )THEN +* +* Form x := inv( A )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 20, J = N, 1, -1 + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/A( J, J ) + TEMP = X( J ) + DO 10, I = J - 1, 1, -1 + X( I ) = X( I ) - TEMP*A( I, J ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE + JX = KX + ( N - 1 )*INCX + DO 40, J = N, 1, -1 + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( J, J ) + TEMP = X( JX ) + IX = JX + DO 30, I = J - 1, 1, -1 + IX = IX - INCX + X( IX ) = X( IX ) - TEMP*A( I, J ) + 30 CONTINUE + END IF + JX = JX - INCX + 40 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 60, J = 1, N + IF( X( J ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( J ) = X( J )/A( J, J ) + TEMP = X( J ) + DO 50, I = J + 1, N + X( I ) = X( I ) - TEMP*A( I, J ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE + JX = KX + DO 80, J = 1, N + IF( X( JX ).NE.ZERO )THEN + IF( NOUNIT ) + $ X( JX ) = X( JX )/A( J, J ) + TEMP = X( JX ) + IX = JX + DO 70, I = J + 1, N + IX = IX + INCX + X( IX ) = X( IX ) - TEMP*A( I, J ) + 70 CONTINUE + END IF + JX = JX + INCX + 80 CONTINUE + END IF + END IF + ELSE +* +* Form x := inv( A' )*x or x := inv( conjg( A' ) )*x. +* + IF( LSAME( UPLO, 'U' ) )THEN + IF( INCX.EQ.1 )THEN + DO 110, J = 1, N + TEMP = X( J ) + IF( NOCONJ )THEN + DO 90, I = 1, J - 1 + TEMP = TEMP - A( I, J )*X( I ) + 90 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + ELSE + DO 100, I = 1, J - 1 + TEMP = TEMP - DCONJG( A( I, J ) )*X( I ) + 100 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( J, J ) ) + END IF + X( J ) = TEMP + 110 CONTINUE + ELSE + JX = KX + DO 140, J = 1, N + IX = KX + TEMP = X( JX ) + IF( NOCONJ )THEN + DO 120, I = 1, J - 1 + TEMP = TEMP - A( I, J )*X( IX ) + IX = IX + INCX + 120 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + ELSE + DO 130, I = 1, J - 1 + TEMP = TEMP - DCONJG( A( I, J ) )*X( IX ) + IX = IX + INCX + 130 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( J, J ) ) + END IF + X( JX ) = TEMP + JX = JX + INCX + 140 CONTINUE + END IF + ELSE + IF( INCX.EQ.1 )THEN + DO 170, J = N, 1, -1 + TEMP = X( J ) + IF( NOCONJ )THEN + DO 150, I = N, J + 1, -1 + TEMP = TEMP - A( I, J )*X( I ) + 150 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + ELSE + DO 160, I = N, J + 1, -1 + TEMP = TEMP - DCONJG( A( I, J ) )*X( I ) + 160 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( J, J ) ) + END IF + X( J ) = TEMP + 170 CONTINUE + ELSE + KX = KX + ( N - 1 )*INCX + JX = KX + DO 200, J = N, 1, -1 + IX = KX + TEMP = X( JX ) + IF( NOCONJ )THEN + DO 180, I = N, J + 1, -1 + TEMP = TEMP - A( I, J )*X( IX ) + IX = IX - INCX + 180 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/A( J, J ) + ELSE + DO 190, I = N, J + 1, -1 + TEMP = TEMP - DCONJG( A( I, J ) )*X( IX ) + IX = IX - INCX + 190 CONTINUE + IF( NOUNIT ) + $ TEMP = TEMP/DCONJG( A( J, J ) ) + END IF + X( JX ) = TEMP + JX = JX - INCX + 200 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZTRSV . +* + END diff --git a/2.3-1/src/fortran/lapack/Makefile.am b/2.3-1/src/fortran/lapack/Makefile.am new file mode 100644 index 00000000..4bfc54d6 --- /dev/null +++ b/2.3-1/src/fortran/lapack/Makefile.am @@ -0,0 +1,322 @@ +########## +### Sylvestre Ledru +### INRIA - Scilab 2006 +########## + +#### Target ###### +modulename=lapack + +pkglib_LTLIBRARIES = libscilapack.la + +noinst_LTLIBRARIES = libdummy-lapack.la + +LAPACK_FORTRAN_SOURCES = dlasv2.f \ +zgeqpf.f \ +zrot.f \ +dpotrf.f \ +zunmr3.f \ +zlanhs.f \ +zgebak.f \ +zbdsqr.f \ +zunmrz.f \ +dgetc2.f \ +zlaqp2.f \ +dsytrd.f \ +dsytd2.f \ +zlange.f \ +dlansp.f \ +dhgeqz.f \ +dlasq2.f \ +dtrevc.f \ +dgelsy.f \ +zladiv.f \ +dlaswp.f \ +dormlq.f \ +dorml2.f \ +dlaexc.f \ +zlahqr.f \ +zdrot.f \ +dlabad.f \ +dlarft.f \ +zlassq.f \ +dlartg.f \ +zlarf.f \ +ztrexc.f \ +zgeev.f \ +dggbal.f \ +dtrtrs.f \ +zlatdf.f \ +dgeqr2.f \ +zlarfg.f \ +dgetrs.f \ +dlag2.f \ +dlaqge.f \ +dpotf2.f \ +zgetrf.f \ +ztgsy2.f \ +zgebal.f \ +dspgst.f \ +dormqr.f \ +drscl.f \ +dtrti2.f \ +dlaset.f \ +dgeesx.f \ +dpocon.f \ +dlasyf.f \ +dgerq2.f \ +dlasq3.f \ +dlansy.f \ +dgehrd.f \ +dgehd2.f \ +dsptrd.f \ +dorgtr.f \ +dormrq.f \ +dorm2r.f \ +dormr2.f \ +zgges.f \ +zunglq.f \ +zlanhe.f \ +zungl2.f \ +zhetrd.f \ +zhetd2.f \ +dlacon.f \ +dgesvx.f \ +zgetf2.f \ +ztgevc.f \ +dsteqr.f \ +dgelqf.f \ +zlarzb.f \ +zlarfx.f \ +dsysv.f \ +zlaqps.f \ +dtzrqf.f \ +dsytrf.f \ +xerbla.f \ +dtrsyl.f \ +dgelss.f \ +dtgsen.f \ +zgecon.f \ +dormbr.f \ +zlatrz.f \ +zungqr.f \ +dlabrd.f \ +dlasq4.f \ +dggev.f \ +dpptrf.f \ +zgelq2.f \ +dgeqpf.f \ +dormr3.f \ +dlanhs.f \ +dgerfs.f \ +dlarz.f \ +zgebrd.f \ +zgebd2.f \ +dgebak.f \ +dormrz.f \ +dbdsqr.f \ +dspev.f \ +dlaqp2.f \ +zung2r.f \ +dlange.f \ +zgeqrf.f \ +dormql.f \ +zgesvd.f \ +dladiv.f \ +dlas2.f \ +dgeequ.f \ +dsytf2.f \ +dlahqr.f \ +zlatrs.f \ +zheev.f \ +ztgex2.f \ +zlaic1.f \ +ztrsen.f \ +zlacgv.f \ +dgees.f \ +dlassq.f \ +zlascl.f \ +dtrexc.f \ +dlasq5.f \ +dormhr.f \ +zgesc2.f \ +dlatdf.f \ +dsycon.f \ +dlarfg.f \ +dorm2l.f \ +dsptrf.f \ +zungbr.f \ +dgesv.f \ +dgetrf.f \ +zhseqr.f \ +dtgsy2.f \ +dlaev2.f \ +dgebal.f \ +zlarfb.f \ +zlahrd.f \ +dlantr.f \ +zgghrd.f \ +dlatzm.f \ +ztgsyl.f \ +ztrtri.f \ +zlatrd.f \ +zlacpy.f \ +zgetri.f \ +dlasr.f \ +zgeqp3.f \ +zungql.f \ +dlanst.f \ +zlarzt.f \ +dorglq.f \ +dorgl2.f \ +dlasq6.f \ +dlasy2.f \ +dopgtr.f \ +dgeqlf.f \ +dgetf2.f \ +dtgevc.f \ +zunghr.f \ +dlarzb.f \ +dlarfx.f \ +zung2l.f \ +zggev.f \ +dzsum1.f \ +dlaqps.f \ +dtrcon.f \ +dlasrt.f \ +dsyev.f \ +dorgqr.f \ +dgecon.f \ +dlatrz.f \ +zlarz.f \ +ztgexc.f \ +zggbak.f \ +ztzrzf.f \ +dpotrs.f \ +dsytri.f \ +dgelq2.f \ +zpotrf.f \ +dgebrd.f \ +dgebd2.f \ +zgetc2.f \ +dorgrq.f \ +dorg2r.f \ +dorgr2.f \ +zhgeqz.f \ +dgeqrf.f \ +dlaln2.f \ +dgesvd.f \ +ztrevc.f \ +zgelsy.f \ +zgees.f \ +zlaswp.f \ +dspgv.f \ +dlanv2.f \ +zunmlq.f \ +dlae2.f \ +zunml2.f \ +dlatrs.f \ +dtgex2.f \ +dlaic1.f \ +dgels.f \ +dtrsen.f \ +zdrscl.f \ +zlarft.f \ +dlascl.f \ +zlartg.f \ +zggbal.f \ +dgesc2.f \ +dgerqf.f \ +zgeqr2.f \ +zgetrs.f \ +ilaenv.f \ +dorgbr.f \ +zpotf2.f \ +dhseqr.f \ +dlarf.f \ +dgegs.f \ +dgeev.f \ +dlarfb.f \ +zlasr.f \ +dlapy2.f \ +zunmqr.f \ +ztrti2.f \ +dlahrd.f \ +dgghrd.f \ +zlaset.f \ +dtgsyl.f \ +dtrtri.f \ +dlatrd.f \ +dlacpy.f \ +dgetri.f \ +zgehrd.f \ +zgehd2.f \ +dgeqp3.f \ +dorgql.f \ +zungtr.f \ +zunm2r.f \ +dlarzt.f \ +dlapmt.f \ +ieeeck.f \ +dlasq1.f \ +dorghr.f \ +zlacon.f \ +dgelsx.f \ +dsterf.f \ +zsteqr.f \ +zgelqf.f \ +dsytrs.f \ +dgges.f \ +dorg2l.f \ +dlapy3.f \ +lsame.f \ +ztrsyl.f \ +izmax1.f \ +ztgsen.f \ +zunmbr.f \ +zlabrd.f \ +dtgexc.f \ +dgeql2.f \ +dlagv2.f \ +dggbak.f \ +dtzrzf.f \ +zlaqr0.f \ +dlacn2.f \ +zlacn2.f \ +dlazq3.f \ +zlahr2.f \ +dlaqr0.f \ +iparmq.f \ +disnan.f \ +dlaisnan.f \ +dlahr2.f \ +zlaqr3.f \ +zlaqr4.f \ +zlaqr5.f \ +dlazq4.f \ +dlaqr3.f \ +dlaqr4.f \ +dlaqr5.f \ +zlaqr2.f \ +zlaqr1.f \ +dlaqr2.f \ +dlaqr1.f + +HEAD = $(top_builddir)/includes/lapack.h + +libscilapack_la_SOURCES = $(HEAD) $(LAPACK_FORTRAN_SOURCES) + +libdummy_lapack_la_SOURCES = dlamch.f slamch.f + +libdummy_lapack_la_FFLAGS = `echo "@FFLAGS@"| sed -e 's|-O[0-9+]|-O0|'` + + +libscilapack_la_LIBADD = libdummy-lapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la + +libscilapack_la_PKGCONFIG = lapack.pc + +libdummy_lapack_la-dlamch.lo: dlamch.f + $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_lapack_la_FFLAGS) -c -o libdummy_lapack_la-dlamch.lo `test -f 'dlamch.f' || echo '$(srcdir)/'`dlamch.f + +libdummy_lapack_la-slamch.lo: slamch.f + $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_lapack_la_FFLAGS) -c -o libdummy_lapack_la-slamch.lo `test -f 'slamch.f' || echo '$(srcdir)/'`slamch.f diff --git a/2.3-1/src/fortran/lapack/Makefile.in b/2.3-1/src/fortran/lapack/Makefile.in new file mode 100644 index 00000000..3936d9ae --- /dev/null +++ b/2.3-1/src/fortran/lapack/Makefile.in @@ -0,0 +1,894 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +########## +### Sylvestre Ledru +### INRIA - Scilab 2006 +########## + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/fortran/lapack +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/includes/machine.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) +libdummy_lapack_la_LIBADD = +am_libdummy_lapack_la_OBJECTS = libdummy_lapack_la-dlamch.lo \ + libdummy_lapack_la-slamch.lo +libdummy_lapack_la_OBJECTS = $(am_libdummy_lapack_la_OBJECTS) +libdummy_lapack_la_LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(F77LD) \ + $(libdummy_lapack_la_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +libscilapack_la_DEPENDENCIES = libdummy-lapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la +am__objects_1 = +am__objects_2 = dlasv2.lo zgeqpf.lo zrot.lo dpotrf.lo zunmr3.lo \ + zlanhs.lo zgebak.lo zbdsqr.lo zunmrz.lo dgetc2.lo zlaqp2.lo \ + dsytrd.lo dsytd2.lo zlange.lo dlansp.lo dhgeqz.lo dlasq2.lo \ + dtrevc.lo dgelsy.lo zladiv.lo dlaswp.lo dormlq.lo dorml2.lo \ + dlaexc.lo zlahqr.lo zdrot.lo dlabad.lo dlarft.lo zlassq.lo \ + dlartg.lo zlarf.lo ztrexc.lo zgeev.lo dggbal.lo dtrtrs.lo \ + zlatdf.lo dgeqr2.lo zlarfg.lo dgetrs.lo dlag2.lo dlaqge.lo \ + dpotf2.lo zgetrf.lo ztgsy2.lo zgebal.lo dspgst.lo dormqr.lo \ + drscl.lo dtrti2.lo dlaset.lo dgeesx.lo dpocon.lo dlasyf.lo \ + dgerq2.lo dlasq3.lo dlansy.lo dgehrd.lo dgehd2.lo dsptrd.lo \ + dorgtr.lo dormrq.lo dorm2r.lo dormr2.lo zgges.lo zunglq.lo \ + zlanhe.lo zungl2.lo zhetrd.lo zhetd2.lo dlacon.lo dgesvx.lo \ + zgetf2.lo ztgevc.lo dsteqr.lo dgelqf.lo zlarzb.lo zlarfx.lo \ + dsysv.lo zlaqps.lo dtzrqf.lo dsytrf.lo xerbla.lo dtrsyl.lo \ + dgelss.lo dtgsen.lo zgecon.lo dormbr.lo zlatrz.lo zungqr.lo \ + dlabrd.lo dlasq4.lo dggev.lo dpptrf.lo zgelq2.lo dgeqpf.lo \ + dormr3.lo dlanhs.lo dgerfs.lo dlarz.lo zgebrd.lo zgebd2.lo \ + dgebak.lo dormrz.lo dbdsqr.lo dspev.lo dlaqp2.lo zung2r.lo \ + dlange.lo zgeqrf.lo dormql.lo zgesvd.lo dladiv.lo dlas2.lo \ + dgeequ.lo dsytf2.lo dlahqr.lo zlatrs.lo zheev.lo ztgex2.lo \ + zlaic1.lo ztrsen.lo zlacgv.lo dgees.lo dlassq.lo zlascl.lo \ + dtrexc.lo dlasq5.lo dormhr.lo zgesc2.lo dlatdf.lo dsycon.lo \ + dlarfg.lo dorm2l.lo dsptrf.lo zungbr.lo dgesv.lo dgetrf.lo \ + zhseqr.lo dtgsy2.lo dlaev2.lo dgebal.lo zlarfb.lo zlahrd.lo \ + dlantr.lo zgghrd.lo dlatzm.lo ztgsyl.lo ztrtri.lo zlatrd.lo \ + zlacpy.lo zgetri.lo dlasr.lo zgeqp3.lo zungql.lo dlanst.lo \ + zlarzt.lo dorglq.lo dorgl2.lo dlasq6.lo dlasy2.lo dopgtr.lo \ + dgeqlf.lo dgetf2.lo dtgevc.lo zunghr.lo dlarzb.lo dlarfx.lo \ + zung2l.lo zggev.lo dzsum1.lo dlaqps.lo dtrcon.lo dlasrt.lo \ + dsyev.lo dorgqr.lo dgecon.lo dlatrz.lo zlarz.lo ztgexc.lo \ + zggbak.lo ztzrzf.lo dpotrs.lo dsytri.lo dgelq2.lo zpotrf.lo \ + dgebrd.lo dgebd2.lo zgetc2.lo dorgrq.lo dorg2r.lo dorgr2.lo \ + zhgeqz.lo dgeqrf.lo dlaln2.lo dgesvd.lo ztrevc.lo zgelsy.lo \ + zgees.lo zlaswp.lo dspgv.lo dlanv2.lo zunmlq.lo dlae2.lo \ + zunml2.lo dlatrs.lo dtgex2.lo dlaic1.lo dgels.lo dtrsen.lo \ + zdrscl.lo zlarft.lo dlascl.lo zlartg.lo zggbal.lo dgesc2.lo \ + dgerqf.lo zgeqr2.lo zgetrs.lo ilaenv.lo dorgbr.lo zpotf2.lo \ + dhseqr.lo dlarf.lo dgegs.lo dgeev.lo dlarfb.lo zlasr.lo \ + dlapy2.lo zunmqr.lo ztrti2.lo dlahrd.lo dgghrd.lo zlaset.lo \ + dtgsyl.lo dtrtri.lo dlatrd.lo dlacpy.lo dgetri.lo zgehrd.lo \ + zgehd2.lo dgeqp3.lo dorgql.lo zungtr.lo zunm2r.lo dlarzt.lo \ + dlapmt.lo ieeeck.lo dlasq1.lo dorghr.lo zlacon.lo dgelsx.lo \ + dsterf.lo zsteqr.lo zgelqf.lo dsytrs.lo dgges.lo dorg2l.lo \ + dlapy3.lo lsame.lo ztrsyl.lo izmax1.lo ztgsen.lo zunmbr.lo \ + zlabrd.lo dtgexc.lo dgeql2.lo dlagv2.lo dggbak.lo dtzrzf.lo \ + zlaqr0.lo dlacn2.lo zlacn2.lo dlazq3.lo zlahr2.lo dlaqr0.lo \ + iparmq.lo disnan.lo dlaisnan.lo dlahr2.lo zlaqr3.lo zlaqr4.lo \ + zlaqr5.lo dlazq4.lo dlaqr3.lo dlaqr4.lo dlaqr5.lo zlaqr2.lo \ + zlaqr1.lo dlaqr2.lo dlaqr1.lo +am_libscilapack_la_OBJECTS = $(am__objects_1) $(am__objects_2) +libscilapack_la_OBJECTS = $(am_libscilapack_la_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/includes +F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS) +LTF77COMPILE = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS) +F77LD = $(F77) +F77LINK = $(LIBTOOL) --tag=F77 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libdummy_lapack_la_SOURCES) $(libscilapack_la_SOURCES) +DIST_SOURCES = $(libdummy_lapack_la_SOURCES) \ + $(libscilapack_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBMATH = @LIBMATH@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ + +#### Target ###### +modulename = lapack +pkglib_LTLIBRARIES = libscilapack.la +noinst_LTLIBRARIES = libdummy-lapack.la +LAPACK_FORTRAN_SOURCES = dlasv2.f \ +zgeqpf.f \ +zrot.f \ +dpotrf.f \ +zunmr3.f \ +zlanhs.f \ +zgebak.f \ +zbdsqr.f \ +zunmrz.f \ +dgetc2.f \ +zlaqp2.f \ +dsytrd.f \ +dsytd2.f \ +zlange.f \ +dlansp.f \ +dhgeqz.f \ +dlasq2.f \ +dtrevc.f \ +dgelsy.f \ +zladiv.f \ +dlaswp.f \ +dormlq.f \ +dorml2.f \ +dlaexc.f \ +zlahqr.f \ +zdrot.f \ +dlabad.f \ +dlarft.f \ +zlassq.f \ +dlartg.f \ +zlarf.f \ +ztrexc.f \ +zgeev.f \ +dggbal.f \ +dtrtrs.f \ +zlatdf.f \ +dgeqr2.f \ +zlarfg.f \ +dgetrs.f \ +dlag2.f \ +dlaqge.f \ +dpotf2.f \ +zgetrf.f \ +ztgsy2.f \ +zgebal.f \ +dspgst.f \ +dormqr.f \ +drscl.f \ +dtrti2.f \ +dlaset.f \ +dgeesx.f \ +dpocon.f \ +dlasyf.f \ +dgerq2.f \ +dlasq3.f \ +dlansy.f \ +dgehrd.f \ +dgehd2.f \ +dsptrd.f \ +dorgtr.f \ +dormrq.f \ +dorm2r.f \ +dormr2.f \ +zgges.f \ +zunglq.f \ +zlanhe.f \ +zungl2.f \ +zhetrd.f \ +zhetd2.f \ +dlacon.f \ +dgesvx.f \ +zgetf2.f \ +ztgevc.f \ +dsteqr.f \ +dgelqf.f \ +zlarzb.f \ +zlarfx.f \ +dsysv.f \ +zlaqps.f \ +dtzrqf.f \ +dsytrf.f \ +xerbla.f \ +dtrsyl.f \ +dgelss.f \ +dtgsen.f \ +zgecon.f \ +dormbr.f \ +zlatrz.f \ +zungqr.f \ +dlabrd.f \ +dlasq4.f \ +dggev.f \ +dpptrf.f \ +zgelq2.f \ +dgeqpf.f \ +dormr3.f \ +dlanhs.f \ +dgerfs.f \ +dlarz.f \ +zgebrd.f \ +zgebd2.f \ +dgebak.f \ +dormrz.f \ +dbdsqr.f \ +dspev.f \ +dlaqp2.f \ +zung2r.f \ +dlange.f \ +zgeqrf.f \ +dormql.f \ +zgesvd.f \ +dladiv.f \ +dlas2.f \ +dgeequ.f \ +dsytf2.f \ +dlahqr.f \ +zlatrs.f \ +zheev.f \ +ztgex2.f \ +zlaic1.f \ +ztrsen.f \ +zlacgv.f \ +dgees.f \ +dlassq.f \ +zlascl.f \ +dtrexc.f \ +dlasq5.f \ +dormhr.f \ +zgesc2.f \ +dlatdf.f \ +dsycon.f \ +dlarfg.f \ +dorm2l.f \ +dsptrf.f \ +zungbr.f \ +dgesv.f \ +dgetrf.f \ +zhseqr.f \ +dtgsy2.f \ +dlaev2.f \ +dgebal.f \ +zlarfb.f \ +zlahrd.f \ +dlantr.f \ +zgghrd.f \ +dlatzm.f \ +ztgsyl.f \ +ztrtri.f \ +zlatrd.f \ +zlacpy.f \ +zgetri.f \ +dlasr.f \ +zgeqp3.f \ +zungql.f \ +dlanst.f \ +zlarzt.f \ +dorglq.f \ +dorgl2.f \ +dlasq6.f \ +dlasy2.f \ +dopgtr.f \ +dgeqlf.f \ +dgetf2.f \ +dtgevc.f \ +zunghr.f \ +dlarzb.f \ +dlarfx.f \ +zung2l.f \ +zggev.f \ +dzsum1.f \ +dlaqps.f \ +dtrcon.f \ +dlasrt.f \ +dsyev.f \ +dorgqr.f \ +dgecon.f \ +dlatrz.f \ +zlarz.f \ +ztgexc.f \ +zggbak.f \ +ztzrzf.f \ +dpotrs.f \ +dsytri.f \ +dgelq2.f \ +zpotrf.f \ +dgebrd.f \ +dgebd2.f \ +zgetc2.f \ +dorgrq.f \ +dorg2r.f \ +dorgr2.f \ +zhgeqz.f \ +dgeqrf.f \ +dlaln2.f \ +dgesvd.f \ +ztrevc.f \ +zgelsy.f \ +zgees.f \ +zlaswp.f \ +dspgv.f \ +dlanv2.f \ +zunmlq.f \ +dlae2.f \ +zunml2.f \ +dlatrs.f \ +dtgex2.f \ +dlaic1.f \ +dgels.f \ +dtrsen.f \ +zdrscl.f \ +zlarft.f \ +dlascl.f \ +zlartg.f \ +zggbal.f \ +dgesc2.f \ +dgerqf.f \ +zgeqr2.f \ +zgetrs.f \ +ilaenv.f \ +dorgbr.f \ +zpotf2.f \ +dhseqr.f \ +dlarf.f \ +dgegs.f \ +dgeev.f \ +dlarfb.f \ +zlasr.f \ +dlapy2.f \ +zunmqr.f \ +ztrti2.f \ +dlahrd.f \ +dgghrd.f \ +zlaset.f \ +dtgsyl.f \ +dtrtri.f \ +dlatrd.f \ +dlacpy.f \ +dgetri.f \ +zgehrd.f \ +zgehd2.f \ +dgeqp3.f \ +dorgql.f \ +zungtr.f \ +zunm2r.f \ +dlarzt.f \ +dlapmt.f \ +ieeeck.f \ +dlasq1.f \ +dorghr.f \ +zlacon.f \ +dgelsx.f \ +dsterf.f \ +zsteqr.f \ +zgelqf.f \ +dsytrs.f \ +dgges.f \ +dorg2l.f \ +dlapy3.f \ +lsame.f \ +ztrsyl.f \ +izmax1.f \ +ztgsen.f \ +zunmbr.f \ +zlabrd.f \ +dtgexc.f \ +dgeql2.f \ +dlagv2.f \ +dggbak.f \ +dtzrzf.f \ +zlaqr0.f \ +dlacn2.f \ +zlacn2.f \ +dlazq3.f \ +zlahr2.f \ +dlaqr0.f \ +iparmq.f \ +disnan.f \ +dlaisnan.f \ +dlahr2.f \ +zlaqr3.f \ +zlaqr4.f \ +zlaqr5.f \ +dlazq4.f \ +dlaqr3.f \ +dlaqr4.f \ +dlaqr5.f \ +zlaqr2.f \ +zlaqr1.f \ +dlaqr2.f \ +dlaqr1.f + +HEAD = $(top_builddir)/includes/lapack.h +libscilapack_la_SOURCES = $(HEAD) $(LAPACK_FORTRAN_SOURCES) +libdummy_lapack_la_SOURCES = dlamch.f slamch.f +libdummy_lapack_la_FFLAGS = `echo "@FFLAGS@"| sed -e 's|-O[0-9+]|-O0|'` +libscilapack_la_LIBADD = libdummy-lapack.la \ + $(top_builddir)/src/fortran/blas/libsciblas.la + +libscilapack_la_PKGCONFIG = lapack.pc +all: all-am + +.SUFFIXES: +.SUFFIXES: .f .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/fortran/lapack/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/fortran/lapack/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libdummy-lapack.la: $(libdummy_lapack_la_OBJECTS) $(libdummy_lapack_la_DEPENDENCIES) + $(libdummy_lapack_la_LINK) $(libdummy_lapack_la_OBJECTS) $(libdummy_lapack_la_LIBADD) $(LIBS) +libscilapack.la: $(libscilapack_la_OBJECTS) $(libscilapack_la_DEPENDENCIES) + $(F77LINK) -rpath $(pkglibdir) $(libscilapack_la_OBJECTS) $(libscilapack_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.f.o: + $(F77COMPILE) -c -o $@ $< + +.f.obj: + $(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.f.lo: + $(LTF77COMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + clean-pkglibLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-pkglibLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkglibLTLIBRARIES install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-pkglibLTLIBRARIES + + +libdummy_lapack_la-dlamch.lo: dlamch.f + $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_lapack_la_FFLAGS) -c -o libdummy_lapack_la-dlamch.lo `test -f 'dlamch.f' || echo '$(srcdir)/'`dlamch.f + +libdummy_lapack_la-slamch.lo: slamch.f + $(LIBTOOL) --tag=F77 --mode=compile $(F77) $(libdummy_lapack_la_FFLAGS) -c -o libdummy_lapack_la-slamch.lo `test -f 'slamch.f' || echo '$(srcdir)/'`slamch.f + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/2.3-1/src/fortran/lapack/README b/2.3-1/src/fortran/lapack/README new file mode 100644 index 00000000..c14fb64f --- /dev/null +++ b/2.3-1/src/fortran/lapack/README @@ -0,0 +1,5 @@ +This directory contains LAPACK routines. +File xerbla.f is not used. +A customized version of xerbla +for Scilab is in SCIDIR/system/xerbla.f + diff --git a/2.3-1/src/fortran/lapack/dbdsqr.f b/2.3-1/src/fortran/lapack/dbdsqr.f new file mode 100644 index 00000000..b9f87ec1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dbdsqr.f @@ -0,0 +1,742 @@ + SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, + $ LDU, C, LDC, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), D( * ), E( * ), U( LDU, * ), + $ VT( LDVT, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DBDSQR computes the singular values and, optionally, the right and/or +* left singular vectors from the singular value decomposition (SVD) of +* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit +* zero-shift QR algorithm. The SVD of B has the form +* +* B = Q * S * P**T +* +* where S is the diagonal matrix of singular values, Q is an orthogonal +* matrix of left singular vectors, and P is an orthogonal matrix of +* right singular vectors. If left singular vectors are requested, this +* subroutine actually returns U*Q instead of Q, and, if right singular +* vectors are requested, this subroutine returns P**T*VT instead of +* P**T, for given real input matrices U and VT. When U and VT are the +* orthogonal matrices that reduce a general matrix A to bidiagonal +* form: A = U*B*VT, as computed by DGEBRD, then +* +* A = (U*Q) * S * (P**T*VT) +* +* is the SVD of A. Optionally, the subroutine may also compute Q**T*C +* for a given real input matrix C. +* +* See "Computing Small Singular Values of Bidiagonal Matrices With +* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan, +* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, +* no. 5, pp. 873-912, Sept 1990) and +* "Accurate singular values and differential qd algorithms," by +* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics +* Department, University of California at Berkeley, July 1992 +* for a detailed description of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': B is upper bidiagonal; +* = 'L': B is lower bidiagonal. +* +* N (input) INTEGER +* The order of the matrix B. N >= 0. +* +* NCVT (input) INTEGER +* The number of columns of the matrix VT. NCVT >= 0. +* +* NRU (input) INTEGER +* The number of rows of the matrix U. NRU >= 0. +* +* NCC (input) INTEGER +* The number of columns of the matrix C. NCC >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the n diagonal elements of the bidiagonal matrix B. +* On exit, if INFO=0, the singular values of B in decreasing +* order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N-1) +* On entry, the N-1 offdiagonal elements of the bidiagonal +* matrix B. +* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E +* will contain the diagonal and superdiagonal elements of a +* bidiagonal matrix orthogonally equivalent to the one given +* as input. +* +* VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT) +* On entry, an N-by-NCVT matrix VT. +* On exit, VT is overwritten by P**T * VT. +* Not referenced if NCVT = 0. +* +* LDVT (input) INTEGER +* The leading dimension of the array VT. +* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0. +* +* U (input/output) DOUBLE PRECISION array, dimension (LDU, N) +* On entry, an NRU-by-N matrix U. +* On exit, U is overwritten by U * Q. +* Not referenced if NRU = 0. +* +* LDU (input) INTEGER +* The leading dimension of the array U. LDU >= max(1,NRU). +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC) +* On entry, an N-by-NCC matrix C. +* On exit, C is overwritten by Q**T * C. +* Not referenced if NCC = 0. +* +* LDC (input) INTEGER +* The leading dimension of the array C. +* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: If INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm did not converge; D and E contain the +* elements of a bidiagonal matrix which is orthogonally +* similar to the input matrix B; if INFO = i, i +* elements of E have not converged to zero. +* +* Internal Parameters +* =================== +* +* TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8))) +* TOLMUL controls the convergence criterion of the QR loop. +* If it is positive, TOLMUL*EPS is the desired relative +* precision in the computed singular values. +* If it is negative, abs(TOLMUL*EPS*sigma_max) is the +* desired absolute accuracy in the computed singular +* values (corresponds to relative accuracy +* abs(TOLMUL*EPS) in the largest singular value. +* abs(TOLMUL) should be between 1 and 1/EPS, and preferably +* between 10 (for fast convergence) and .1/EPS +* (for there to be some accuracy in the results). +* Default is to lose at either one eighth or 2 of the +* available decimal digits in each computed singular value +* (whichever is smaller). +* +* MAXITR INTEGER, default = 6 +* MAXITR controls the maximum number of passes of the +* algorithm through its inner loop. The algorithms stops +* (and so fails to converge) if the number of passes +* through the inner loop exceeds MAXITR*N**2. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION NEGONE + PARAMETER ( NEGONE = -1.0D0 ) + DOUBLE PRECISION HNDRTH + PARAMETER ( HNDRTH = 0.01D0 ) + DOUBLE PRECISION TEN + PARAMETER ( TEN = 10.0D0 ) + DOUBLE PRECISION HNDRD + PARAMETER ( HNDRD = 100.0D0 ) + DOUBLE PRECISION MEIGTH + PARAMETER ( MEIGTH = -0.125D0 ) + INTEGER MAXITR + PARAMETER ( MAXITR = 6 ) +* .. +* .. Local Scalars .. + LOGICAL LOWER, ROTATE + INTEGER I, IDIR, ISUB, ITER, J, LL, LLL, M, MAXIT, NM1, + $ NM12, NM13, OLDLL, OLDM + DOUBLE PRECISION ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU, + $ OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL, + $ SINR, SLL, SMAX, SMIN, SMINL, SMINOA, + $ SN, THRESH, TOL, TOLMUL, UNFL +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLARTG, DLAS2, DLASQ1, DLASR, DLASV2, DROT, + $ DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + LOWER = LSAME( UPLO, 'L' ) + IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LOWER ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NCVT.LT.0 ) THEN + INFO = -3 + ELSE IF( NRU.LT.0 ) THEN + INFO = -4 + ELSE IF( NCC.LT.0 ) THEN + INFO = -5 + ELSE IF( ( NCVT.EQ.0 .AND. LDVT.LT.1 ) .OR. + $ ( NCVT.GT.0 .AND. LDVT.LT.MAX( 1, N ) ) ) THEN + INFO = -9 + ELSE IF( LDU.LT.MAX( 1, NRU ) ) THEN + INFO = -11 + ELSE IF( ( NCC.EQ.0 .AND. LDC.LT.1 ) .OR. + $ ( NCC.GT.0 .AND. LDC.LT.MAX( 1, N ) ) ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DBDSQR', -INFO ) + RETURN + END IF + IF( N.EQ.0 ) + $ RETURN + IF( N.EQ.1 ) + $ GO TO 160 +* +* ROTATE is true if any singular vectors desired, false otherwise +* + ROTATE = ( NCVT.GT.0 ) .OR. ( NRU.GT.0 ) .OR. ( NCC.GT.0 ) +* +* If no singular vectors desired, use qd algorithm +* + IF( .NOT.ROTATE ) THEN + CALL DLASQ1( N, D, E, WORK, INFO ) + RETURN + END IF +* + NM1 = N - 1 + NM12 = NM1 + NM1 + NM13 = NM12 + NM1 + IDIR = 0 +* +* Get machine constants +* + EPS = DLAMCH( 'Epsilon' ) + UNFL = DLAMCH( 'Safe minimum' ) +* +* If matrix lower bidiagonal, rotate to be upper bidiagonal +* by applying Givens rotations on the left +* + IF( LOWER ) THEN + DO 10 I = 1, N - 1 + CALL DLARTG( D( I ), E( I ), CS, SN, R ) + D( I ) = R + E( I ) = SN*D( I+1 ) + D( I+1 ) = CS*D( I+1 ) + WORK( I ) = CS + WORK( NM1+I ) = SN + 10 CONTINUE +* +* Update singular vectors if desired +* + IF( NRU.GT.0 ) + $ CALL DLASR( 'R', 'V', 'F', NRU, N, WORK( 1 ), WORK( N ), U, + $ LDU ) + IF( NCC.GT.0 ) + $ CALL DLASR( 'L', 'V', 'F', N, NCC, WORK( 1 ), WORK( N ), C, + $ LDC ) + END IF +* +* Compute singular values to relative accuracy TOL +* (By setting TOL to be negative, algorithm will compute +* singular values to absolute accuracy ABS(TOL)*norm(input matrix)) +* + TOLMUL = MAX( TEN, MIN( HNDRD, EPS**MEIGTH ) ) + TOL = TOLMUL*EPS +* +* Compute approximate maximum, minimum singular values +* + SMAX = ZERO + DO 20 I = 1, N + SMAX = MAX( SMAX, ABS( D( I ) ) ) + 20 CONTINUE + DO 30 I = 1, N - 1 + SMAX = MAX( SMAX, ABS( E( I ) ) ) + 30 CONTINUE + SMINL = ZERO + IF( TOL.GE.ZERO ) THEN +* +* Relative accuracy desired +* + SMINOA = ABS( D( 1 ) ) + IF( SMINOA.EQ.ZERO ) + $ GO TO 50 + MU = SMINOA + DO 40 I = 2, N + MU = ABS( D( I ) )*( MU / ( MU+ABS( E( I-1 ) ) ) ) + SMINOA = MIN( SMINOA, MU ) + IF( SMINOA.EQ.ZERO ) + $ GO TO 50 + 40 CONTINUE + 50 CONTINUE + SMINOA = SMINOA / SQRT( DBLE( N ) ) + THRESH = MAX( TOL*SMINOA, MAXITR*N*N*UNFL ) + ELSE +* +* Absolute accuracy desired +* + THRESH = MAX( ABS( TOL )*SMAX, MAXITR*N*N*UNFL ) + END IF +* +* Prepare for main iteration loop for the singular values +* (MAXIT is the maximum number of passes through the inner +* loop permitted before nonconvergence signalled.) +* + MAXIT = MAXITR*N*N + ITER = 0 + OLDLL = -1 + OLDM = -1 +* +* M points to last element of unconverged part of matrix +* + M = N +* +* Begin main iteration loop +* + 60 CONTINUE +* +* Check for convergence or exceeding iteration count +* + IF( M.LE.1 ) + $ GO TO 160 + IF( ITER.GT.MAXIT ) + $ GO TO 200 +* +* Find diagonal block of matrix to work on +* + IF( TOL.LT.ZERO .AND. ABS( D( M ) ).LE.THRESH ) + $ D( M ) = ZERO + SMAX = ABS( D( M ) ) + SMIN = SMAX + DO 70 LLL = 1, M - 1 + LL = M - LLL + ABSS = ABS( D( LL ) ) + ABSE = ABS( E( LL ) ) + IF( TOL.LT.ZERO .AND. ABSS.LE.THRESH ) + $ D( LL ) = ZERO + IF( ABSE.LE.THRESH ) + $ GO TO 80 + SMIN = MIN( SMIN, ABSS ) + SMAX = MAX( SMAX, ABSS, ABSE ) + 70 CONTINUE + LL = 0 + GO TO 90 + 80 CONTINUE + E( LL ) = ZERO +* +* Matrix splits since E(LL) = 0 +* + IF( LL.EQ.M-1 ) THEN +* +* Convergence of bottom singular value, return to top of loop +* + M = M - 1 + GO TO 60 + END IF + 90 CONTINUE + LL = LL + 1 +* +* E(LL) through E(M-1) are nonzero, E(LL-1) is zero +* + IF( LL.EQ.M-1 ) THEN +* +* 2 by 2 block, handle separately +* + CALL DLASV2( D( M-1 ), E( M-1 ), D( M ), SIGMN, SIGMX, SINR, + $ COSR, SINL, COSL ) + D( M-1 ) = SIGMX + E( M-1 ) = ZERO + D( M ) = SIGMN +* +* Compute singular vectors, if desired +* + IF( NCVT.GT.0 ) + $ CALL DROT( NCVT, VT( M-1, 1 ), LDVT, VT( M, 1 ), LDVT, COSR, + $ SINR ) + IF( NRU.GT.0 ) + $ CALL DROT( NRU, U( 1, M-1 ), 1, U( 1, M ), 1, COSL, SINL ) + IF( NCC.GT.0 ) + $ CALL DROT( NCC, C( M-1, 1 ), LDC, C( M, 1 ), LDC, COSL, + $ SINL ) + M = M - 2 + GO TO 60 + END IF +* +* If working on new submatrix, choose shift direction +* (from larger end diagonal element towards smaller) +* + IF( LL.GT.OLDM .OR. M.LT.OLDLL ) THEN + IF( ABS( D( LL ) ).GE.ABS( D( M ) ) ) THEN +* +* Chase bulge from top (big end) to bottom (small end) +* + IDIR = 1 + ELSE +* +* Chase bulge from bottom (big end) to top (small end) +* + IDIR = 2 + END IF + END IF +* +* Apply convergence tests +* + IF( IDIR.EQ.1 ) THEN +* +* Run convergence test in forward direction +* First apply standard test to bottom of matrix +* + IF( ABS( E( M-1 ) ).LE.ABS( TOL )*ABS( D( M ) ) .OR. + $ ( TOL.LT.ZERO .AND. ABS( E( M-1 ) ).LE.THRESH ) ) THEN + E( M-1 ) = ZERO + GO TO 60 + END IF +* + IF( TOL.GE.ZERO ) THEN +* +* If relative accuracy desired, +* apply convergence criterion forward +* + MU = ABS( D( LL ) ) + SMINL = MU + DO 100 LLL = LL, M - 1 + IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN + E( LLL ) = ZERO + GO TO 60 + END IF + MU = ABS( D( LLL+1 ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) + SMINL = MIN( SMINL, MU ) + 100 CONTINUE + END IF +* + ELSE +* +* Run convergence test in backward direction +* First apply standard test to top of matrix +* + IF( ABS( E( LL ) ).LE.ABS( TOL )*ABS( D( LL ) ) .OR. + $ ( TOL.LT.ZERO .AND. ABS( E( LL ) ).LE.THRESH ) ) THEN + E( LL ) = ZERO + GO TO 60 + END IF +* + IF( TOL.GE.ZERO ) THEN +* +* If relative accuracy desired, +* apply convergence criterion backward +* + MU = ABS( D( M ) ) + SMINL = MU + DO 110 LLL = M - 1, LL, -1 + IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN + E( LLL ) = ZERO + GO TO 60 + END IF + MU = ABS( D( LLL ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) + SMINL = MIN( SMINL, MU ) + 110 CONTINUE + END IF + END IF + OLDLL = LL + OLDM = M +* +* Compute shift. First, test if shifting would ruin relative +* accuracy, and if so set the shift to zero. +* + IF( TOL.GE.ZERO .AND. N*TOL*( SMINL / SMAX ).LE. + $ MAX( EPS, HNDRTH*TOL ) ) THEN +* +* Use a zero shift to avoid loss of relative accuracy +* + SHIFT = ZERO + ELSE +* +* Compute the shift from 2-by-2 block at end of matrix +* + IF( IDIR.EQ.1 ) THEN + SLL = ABS( D( LL ) ) + CALL DLAS2( D( M-1 ), E( M-1 ), D( M ), SHIFT, R ) + ELSE + SLL = ABS( D( M ) ) + CALL DLAS2( D( LL ), E( LL ), D( LL+1 ), SHIFT, R ) + END IF +* +* Test if shift negligible, and if so set to zero +* + IF( SLL.GT.ZERO ) THEN + IF( ( SHIFT / SLL )**2.LT.EPS ) + $ SHIFT = ZERO + END IF + END IF +* +* Increment iteration count +* + ITER = ITER + M - LL +* +* If SHIFT = 0, do simplified QR iteration +* + IF( SHIFT.EQ.ZERO ) THEN + IF( IDIR.EQ.1 ) THEN +* +* Chase bulge from top to bottom +* Save cosines and sines for later singular vector updates +* + CS = ONE + OLDCS = ONE + DO 120 I = LL, M - 1 + CALL DLARTG( D( I )*CS, E( I ), CS, SN, R ) + IF( I.GT.LL ) + $ E( I-1 ) = OLDSN*R + CALL DLARTG( OLDCS*R, D( I+1 )*SN, OLDCS, OLDSN, D( I ) ) + WORK( I-LL+1 ) = CS + WORK( I-LL+1+NM1 ) = SN + WORK( I-LL+1+NM12 ) = OLDCS + WORK( I-LL+1+NM13 ) = OLDSN + 120 CONTINUE + H = D( M )*CS + D( M ) = H*OLDCS + E( M-1 ) = H*OLDSN +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCVT, WORK( 1 ), + $ WORK( N ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL DLASR( 'R', 'V', 'F', NRU, M-LL+1, WORK( NM12+1 ), + $ WORK( NM13+1 ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCC, WORK( NM12+1 ), + $ WORK( NM13+1 ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( M-1 ) ).LE.THRESH ) + $ E( M-1 ) = ZERO +* + ELSE +* +* Chase bulge from bottom to top +* Save cosines and sines for later singular vector updates +* + CS = ONE + OLDCS = ONE + DO 130 I = M, LL + 1, -1 + CALL DLARTG( D( I )*CS, E( I-1 ), CS, SN, R ) + IF( I.LT.M ) + $ E( I ) = OLDSN*R + CALL DLARTG( OLDCS*R, D( I-1 )*SN, OLDCS, OLDSN, D( I ) ) + WORK( I-LL ) = CS + WORK( I-LL+NM1 ) = -SN + WORK( I-LL+NM12 ) = OLDCS + WORK( I-LL+NM13 ) = -OLDSN + 130 CONTINUE + H = D( LL )*CS + D( LL ) = H*OLDCS + E( LL ) = H*OLDSN +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCVT, WORK( NM12+1 ), + $ WORK( NM13+1 ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL DLASR( 'R', 'V', 'B', NRU, M-LL+1, WORK( 1 ), + $ WORK( N ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCC, WORK( 1 ), + $ WORK( N ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( LL ) ).LE.THRESH ) + $ E( LL ) = ZERO + END IF + ELSE +* +* Use nonzero shift +* + IF( IDIR.EQ.1 ) THEN +* +* Chase bulge from top to bottom +* Save cosines and sines for later singular vector updates +* + F = ( ABS( D( LL ) )-SHIFT )* + $ ( SIGN( ONE, D( LL ) )+SHIFT / D( LL ) ) + G = E( LL ) + DO 140 I = LL, M - 1 + CALL DLARTG( F, G, COSR, SINR, R ) + IF( I.GT.LL ) + $ E( I-1 ) = R + F = COSR*D( I ) + SINR*E( I ) + E( I ) = COSR*E( I ) - SINR*D( I ) + G = SINR*D( I+1 ) + D( I+1 ) = COSR*D( I+1 ) + CALL DLARTG( F, G, COSL, SINL, R ) + D( I ) = R + F = COSL*E( I ) + SINL*D( I+1 ) + D( I+1 ) = COSL*D( I+1 ) - SINL*E( I ) + IF( I.LT.M-1 ) THEN + G = SINL*E( I+1 ) + E( I+1 ) = COSL*E( I+1 ) + END IF + WORK( I-LL+1 ) = COSR + WORK( I-LL+1+NM1 ) = SINR + WORK( I-LL+1+NM12 ) = COSL + WORK( I-LL+1+NM13 ) = SINL + 140 CONTINUE + E( M-1 ) = F +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCVT, WORK( 1 ), + $ WORK( N ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL DLASR( 'R', 'V', 'F', NRU, M-LL+1, WORK( NM12+1 ), + $ WORK( NM13+1 ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL DLASR( 'L', 'V', 'F', M-LL+1, NCC, WORK( NM12+1 ), + $ WORK( NM13+1 ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( M-1 ) ).LE.THRESH ) + $ E( M-1 ) = ZERO +* + ELSE +* +* Chase bulge from bottom to top +* Save cosines and sines for later singular vector updates +* + F = ( ABS( D( M ) )-SHIFT )*( SIGN( ONE, D( M ) )+SHIFT / + $ D( M ) ) + G = E( M-1 ) + DO 150 I = M, LL + 1, -1 + CALL DLARTG( F, G, COSR, SINR, R ) + IF( I.LT.M ) + $ E( I ) = R + F = COSR*D( I ) + SINR*E( I-1 ) + E( I-1 ) = COSR*E( I-1 ) - SINR*D( I ) + G = SINR*D( I-1 ) + D( I-1 ) = COSR*D( I-1 ) + CALL DLARTG( F, G, COSL, SINL, R ) + D( I ) = R + F = COSL*E( I-1 ) + SINL*D( I-1 ) + D( I-1 ) = COSL*D( I-1 ) - SINL*E( I-1 ) + IF( I.GT.LL+1 ) THEN + G = SINL*E( I-2 ) + E( I-2 ) = COSL*E( I-2 ) + END IF + WORK( I-LL ) = COSR + WORK( I-LL+NM1 ) = -SINR + WORK( I-LL+NM12 ) = COSL + WORK( I-LL+NM13 ) = -SINL + 150 CONTINUE + E( LL ) = F +* +* Test convergence +* + IF( ABS( E( LL ) ).LE.THRESH ) + $ E( LL ) = ZERO +* +* Update singular vectors if desired +* + IF( NCVT.GT.0 ) + $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCVT, WORK( NM12+1 ), + $ WORK( NM13+1 ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL DLASR( 'R', 'V', 'B', NRU, M-LL+1, WORK( 1 ), + $ WORK( N ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL DLASR( 'L', 'V', 'B', M-LL+1, NCC, WORK( 1 ), + $ WORK( N ), C( LL, 1 ), LDC ) + END IF + END IF +* +* QR iteration finished, go back and check convergence +* + GO TO 60 +* +* All singular values converged, so make them positive +* + 160 CONTINUE + DO 170 I = 1, N + IF( D( I ).LT.ZERO ) THEN + D( I ) = -D( I ) +* +* Change sign of singular vectors, if desired +* + IF( NCVT.GT.0 ) + $ CALL DSCAL( NCVT, NEGONE, VT( I, 1 ), LDVT ) + END IF + 170 CONTINUE +* +* Sort the singular values into decreasing order (insertion sort on +* singular values, but only one transposition per singular vector) +* + DO 190 I = 1, N - 1 +* +* Scan for smallest D(I) +* + ISUB = 1 + SMIN = D( 1 ) + DO 180 J = 2, N + 1 - I + IF( D( J ).LE.SMIN ) THEN + ISUB = J + SMIN = D( J ) + END IF + 180 CONTINUE + IF( ISUB.NE.N+1-I ) THEN +* +* Swap singular values and vectors +* + D( ISUB ) = D( N+1-I ) + D( N+1-I ) = SMIN + IF( NCVT.GT.0 ) + $ CALL DSWAP( NCVT, VT( ISUB, 1 ), LDVT, VT( N+1-I, 1 ), + $ LDVT ) + IF( NRU.GT.0 ) + $ CALL DSWAP( NRU, U( 1, ISUB ), 1, U( 1, N+1-I ), 1 ) + IF( NCC.GT.0 ) + $ CALL DSWAP( NCC, C( ISUB, 1 ), LDC, C( N+1-I, 1 ), LDC ) + END IF + 190 CONTINUE + GO TO 220 +* +* Maximum number of iterations exceeded, failure to converge +* + 200 CONTINUE + INFO = 0 + DO 210 I = 1, N - 1 + IF( E( I ).NE.ZERO ) + $ INFO = INFO + 1 + 210 CONTINUE + 220 CONTINUE + RETURN +* +* End of DBDSQR +* + END diff --git a/2.3-1/src/fortran/lapack/dgebak.f b/2.3-1/src/fortran/lapack/dgebak.f new file mode 100644 index 00000000..b8e9be56 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgebak.f @@ -0,0 +1,188 @@ + SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB, SIDE + INTEGER IHI, ILO, INFO, LDV, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION SCALE( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* DGEBAK forms the right or left eigenvectors of a real general matrix +* by backward transformation on the computed eigenvectors of the +* balanced matrix output by DGEBAL. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the type of backward transformation required: +* = 'N', do nothing, return immediately; +* = 'P', do backward transformation for permutation only; +* = 'S', do backward transformation for scaling only; +* = 'B', do backward transformations for both permutation and +* scaling. +* JOB must be the same as the argument JOB supplied to DGEBAL. +* +* SIDE (input) CHARACTER*1 +* = 'R': V contains right eigenvectors; +* = 'L': V contains left eigenvectors. +* +* N (input) INTEGER +* The number of rows of the matrix V. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* The integers ILO and IHI determined by DGEBAL. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* SCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutation and scaling factors, as returned +* by DGEBAL. +* +* M (input) INTEGER +* The number of columns of the matrix V. M >= 0. +* +* V (input/output) DOUBLE PRECISION array, dimension (LDV,M) +* On entry, the matrix of right or left eigenvectors to be +* transformed, as returned by DHSEIN or DTREVC. +* On exit, V is overwritten by the transformed eigenvectors. +* +* LDV (input) INTEGER +* The leading dimension of the array V. LDV >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFTV, RIGHTV + INTEGER I, II, K + DOUBLE PRECISION S +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Decode and Test the input parameters +* + RIGHTV = LSAME( SIDE, 'R' ) + LEFTV = LSAME( SIDE, 'L' ) +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -5 + ELSE IF( M.LT.0 ) THEN + INFO = -7 + ELSE IF( LDV.LT.MAX( 1, N ) ) THEN + INFO = -9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEBAK', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( M.EQ.0 ) + $ RETURN + IF( LSAME( JOB, 'N' ) ) + $ RETURN +* + IF( ILO.EQ.IHI ) + $ GO TO 30 +* +* Backward balance +* + IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN +* + IF( RIGHTV ) THEN + DO 10 I = ILO, IHI + S = SCALE( I ) + CALL DSCAL( M, S, V( I, 1 ), LDV ) + 10 CONTINUE + END IF +* + IF( LEFTV ) THEN + DO 20 I = ILO, IHI + S = ONE / SCALE( I ) + CALL DSCAL( M, S, V( I, 1 ), LDV ) + 20 CONTINUE + END IF +* + END IF +* +* Backward permutation +* +* For I = ILO-1 step -1 until 1, +* IHI+1 step 1 until N do -- +* + 30 CONTINUE + IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN + IF( RIGHTV ) THEN + DO 40 II = 1, N + I = II + IF( I.GE.ILO .AND. I.LE.IHI ) + $ GO TO 40 + IF( I.LT.ILO ) + $ I = ILO - II + K = SCALE( I ) + IF( K.EQ.I ) + $ GO TO 40 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 40 CONTINUE + END IF +* + IF( LEFTV ) THEN + DO 50 II = 1, N + I = II + IF( I.GE.ILO .AND. I.LE.IHI ) + $ GO TO 50 + IF( I.LT.ILO ) + $ I = ILO - II + K = SCALE( I ) + IF( K.EQ.I ) + $ GO TO 50 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 50 CONTINUE + END IF + END IF +* + RETURN +* +* End of DGEBAK +* + END diff --git a/2.3-1/src/fortran/lapack/dgebal.f b/2.3-1/src/fortran/lapack/dgebal.f new file mode 100644 index 00000000..1796577b --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgebal.f @@ -0,0 +1,322 @@ + SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB + INTEGER IHI, ILO, INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), SCALE( * ) +* .. +* +* Purpose +* ======= +* +* DGEBAL balances a general real matrix A. This involves, first, +* permuting A by a similarity transformation to isolate eigenvalues +* in the first 1 to ILO-1 and last IHI+1 to N elements on the +* diagonal; and second, applying a diagonal similarity transformation +* to rows and columns ILO to IHI to make the rows and columns as +* close in norm as possible. Both steps are optional. +* +* Balancing may reduce the 1-norm of the matrix, and improve the +* accuracy of the computed eigenvalues and/or eigenvectors. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the operations to be performed on A: +* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 +* for i = 1,...,N; +* = 'P': permute only; +* = 'S': scale only; +* = 'B': both permute and scale. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the input matrix A. +* On exit, A is overwritten by the balanced matrix. +* If JOB = 'N', A is not referenced. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* ILO (output) INTEGER +* IHI (output) INTEGER +* ILO and IHI are set to integers such that on exit +* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. +* If JOB = 'N' or 'S', ILO = 1 and IHI = N. +* +* SCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied to +* A. If P(j) is the index of the row and column interchanged +* with row and column j and D(j) is the scaling factor +* applied to row and column j, then +* SCALE(j) = P(j) for j = 1,...,ILO-1 +* = D(j) for j = ILO,...,IHI +* = P(j) for j = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The permutations consist of row and column interchanges which put +* the matrix in the form +* +* ( T1 X Y ) +* P A P = ( 0 B Z ) +* ( 0 0 T2 ) +* +* where T1 and T2 are upper triangular matrices whose eigenvalues lie +* along the diagonal. The column indices ILO and IHI mark the starting +* and ending columns of the submatrix B. Balancing consists of applying +* a diagonal similarity transformation inv(D) * B * D to make the +* 1-norms of each row of B and its corresponding column nearly equal. +* The output matrix is +* +* ( T1 X*D Y ) +* ( 0 inv(D)*B*D inv(D)*Z ). +* ( 0 0 T2 ) +* +* Information about the permutations P and the diagonal matrix D is +* returned in the vector SCALE. +* +* This subroutine is based on the EISPACK routine BALANC. +* +* Modified by Tzu-Yi Chen, Computer Science Division, University of +* California at Berkeley, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION SCLFAC + PARAMETER ( SCLFAC = 2.0D+0 ) + DOUBLE PRECISION FACTOR + PARAMETER ( FACTOR = 0.95D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOCONV + INTEGER I, ICA, IEXC, IRA, J, K, L, M + DOUBLE PRECISION C, CA, F, G, R, RA, S, SFMAX1, SFMAX2, SFMIN1, + $ SFMIN2 +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, IDAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEBAL', -INFO ) + RETURN + END IF +* + K = 1 + L = N +* + IF( N.EQ.0 ) + $ GO TO 210 +* + IF( LSAME( JOB, 'N' ) ) THEN + DO 10 I = 1, N + SCALE( I ) = ONE + 10 CONTINUE + GO TO 210 + END IF +* + IF( LSAME( JOB, 'S' ) ) + $ GO TO 120 +* +* Permutation to isolate eigenvalues if possible +* + GO TO 50 +* +* Row and column exchange. +* + 20 CONTINUE + SCALE( M ) = J + IF( J.EQ.M ) + $ GO TO 30 +* + CALL DSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) + CALL DSWAP( N-K+1, A( J, K ), LDA, A( M, K ), LDA ) +* + 30 CONTINUE + GO TO ( 40, 80 )IEXC +* +* Search for rows isolating an eigenvalue and push them down. +* + 40 CONTINUE + IF( L.EQ.1 ) + $ GO TO 210 + L = L - 1 +* + 50 CONTINUE + DO 70 J = L, 1, -1 +* + DO 60 I = 1, L + IF( I.EQ.J ) + $ GO TO 60 + IF( A( J, I ).NE.ZERO ) + $ GO TO 70 + 60 CONTINUE +* + M = L + IEXC = 1 + GO TO 20 + 70 CONTINUE +* + GO TO 90 +* +* Search for columns isolating an eigenvalue and push them left. +* + 80 CONTINUE + K = K + 1 +* + 90 CONTINUE + DO 110 J = K, L +* + DO 100 I = K, L + IF( I.EQ.J ) + $ GO TO 100 + IF( A( I, J ).NE.ZERO ) + $ GO TO 110 + 100 CONTINUE +* + M = K + IEXC = 2 + GO TO 20 + 110 CONTINUE +* + 120 CONTINUE + DO 130 I = K, L + SCALE( I ) = ONE + 130 CONTINUE +* + IF( LSAME( JOB, 'P' ) ) + $ GO TO 210 +* +* Balance the submatrix in rows K to L. +* +* Iterative loop for norm reduction +* + SFMIN1 = DLAMCH( 'S' ) / DLAMCH( 'P' ) + SFMAX1 = ONE / SFMIN1 + SFMIN2 = SFMIN1*SCLFAC + SFMAX2 = ONE / SFMIN2 + 140 CONTINUE + NOCONV = .FALSE. +* + DO 200 I = K, L + C = ZERO + R = ZERO +* + DO 150 J = K, L + IF( J.EQ.I ) + $ GO TO 150 + C = C + ABS( A( J, I ) ) + R = R + ABS( A( I, J ) ) + 150 CONTINUE + ICA = IDAMAX( L, A( 1, I ), 1 ) + CA = ABS( A( ICA, I ) ) + IRA = IDAMAX( N-K+1, A( I, K ), LDA ) + RA = ABS( A( I, IRA+K-1 ) ) +* +* Guard against zero C or R due to underflow. +* + IF( C.EQ.ZERO .OR. R.EQ.ZERO ) + $ GO TO 200 + G = R / SCLFAC + F = ONE + S = C + R + 160 CONTINUE + IF( C.GE.G .OR. MAX( F, C, CA ).GE.SFMAX2 .OR. + $ MIN( R, G, RA ).LE.SFMIN2 )GO TO 170 + F = F*SCLFAC + C = C*SCLFAC + CA = CA*SCLFAC + R = R / SCLFAC + G = G / SCLFAC + RA = RA / SCLFAC + GO TO 160 +* + 170 CONTINUE + G = C / SCLFAC + 180 CONTINUE + IF( G.LT.R .OR. MAX( R, RA ).GE.SFMAX2 .OR. + $ MIN( F, C, G, CA ).LE.SFMIN2 )GO TO 190 + F = F / SCLFAC + C = C / SCLFAC + G = G / SCLFAC + CA = CA / SCLFAC + R = R*SCLFAC + RA = RA*SCLFAC + GO TO 180 +* +* Now balance. +* + 190 CONTINUE + IF( ( C+R ).GE.FACTOR*S ) + $ GO TO 200 + IF( F.LT.ONE .AND. SCALE( I ).LT.ONE ) THEN + IF( F*SCALE( I ).LE.SFMIN1 ) + $ GO TO 200 + END IF + IF( F.GT.ONE .AND. SCALE( I ).GT.ONE ) THEN + IF( SCALE( I ).GE.SFMAX1 / F ) + $ GO TO 200 + END IF + G = ONE / F + SCALE( I ) = SCALE( I )*F + NOCONV = .TRUE. +* + CALL DSCAL( N-K+1, G, A( I, K ), LDA ) + CALL DSCAL( L, F, A( 1, I ), 1 ) +* + 200 CONTINUE +* + IF( NOCONV ) + $ GO TO 140 +* + 210 CONTINUE + ILO = K + IHI = L +* + RETURN +* +* End of DGEBAL +* + END diff --git a/2.3-1/src/fortran/lapack/dgebd2.f b/2.3-1/src/fortran/lapack/dgebd2.f new file mode 100644 index 00000000..b9eb6387 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgebd2.f @@ -0,0 +1,239 @@ + SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), + $ TAUQ( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEBD2 reduces a real general m by n matrix A to upper or lower +* bidiagonal form B by an orthogonal transformation: Q' * A * P = B. +* +* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns in the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n general matrix to be reduced. +* On exit, +* if m >= n, the diagonal and the first superdiagonal are +* overwritten with the upper bidiagonal matrix B; the +* elements below the diagonal, with the array TAUQ, represent +* the orthogonal matrix Q as a product of elementary +* reflectors, and the elements above the first superdiagonal, +* with the array TAUP, represent the orthogonal matrix P as +* a product of elementary reflectors; +* if m < n, the diagonal and the first subdiagonal are +* overwritten with the lower bidiagonal matrix B; the +* elements below the first subdiagonal, with the array TAUQ, +* represent the orthogonal matrix Q as a product of +* elementary reflectors, and the elements above the diagonal, +* with the array TAUP, represent the orthogonal matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The diagonal elements of the bidiagonal matrix B: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) +* The off-diagonal elements of the bidiagonal matrix B: +* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; +* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. +* +* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix Q. See Further Details. +* +* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix P. See Further Details. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (max(M,N)) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* If m >= n, +* +* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are real scalars, and v and u are real vectors; +* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i); +* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n); +* tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, +* +* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are real scalars, and v and u are real vectors; +* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i); +* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n); +* tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The contents of A on exit are illustrated by the following examples: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) +* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) +* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) +* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) +* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) +* ( v1 v2 v3 v4 v5 ) +* +* where d and e denote diagonal and off-diagonal elements of B, vi +* denotes an element of the vector defining H(i), and ui an element of +* the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.LT.0 ) THEN + CALL XERBLA( 'DGEBD2', -INFO ) + RETURN + END IF +* + IF( M.GE.N ) THEN +* +* Reduce to upper bidiagonal form +* + DO 10 I = 1, N +* +* Generate elementary reflector H(i) to annihilate A(i+1:m,i) +* + CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, + $ TAUQ( I ) ) + D( I ) = A( I, I ) + A( I, I ) = ONE +* +* Apply H(i) to A(i:m,i+1:n) from the left +* + IF( I.LT.N ) + $ CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAUQ( I ), + $ A( I, I+1 ), LDA, WORK ) + A( I, I ) = D( I ) +* + IF( I.LT.N ) THEN +* +* Generate elementary reflector G(i) to annihilate +* A(i,i+2:n) +* + CALL DLARFG( N-I, A( I, I+1 ), A( I, MIN( I+2, N ) ), + $ LDA, TAUP( I ) ) + E( I ) = A( I, I+1 ) + A( I, I+1 ) = ONE +* +* Apply G(i) to A(i+1:m,i+1:n) from the right +* + CALL DLARF( 'Right', M-I, N-I, A( I, I+1 ), LDA, + $ TAUP( I ), A( I+1, I+1 ), LDA, WORK ) + A( I, I+1 ) = E( I ) + ELSE + TAUP( I ) = ZERO + END IF + 10 CONTINUE + ELSE +* +* Reduce to lower bidiagonal form +* + DO 20 I = 1, M +* +* Generate elementary reflector G(i) to annihilate A(i,i+1:n) +* + CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, + $ TAUP( I ) ) + D( I ) = A( I, I ) + A( I, I ) = ONE +* +* Apply G(i) to A(i+1:m,i:n) from the right +* + IF( I.LT.M ) + $ CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, + $ TAUP( I ), A( I+1, I ), LDA, WORK ) + A( I, I ) = D( I ) +* + IF( I.LT.M ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(i+2:m,i) +* + CALL DLARFG( M-I, A( I+1, I ), A( MIN( I+2, M ), I ), 1, + $ TAUQ( I ) ) + E( I ) = A( I+1, I ) + A( I+1, I ) = ONE +* +* Apply H(i) to A(i+1:m,i+1:n) from the left +* + CALL DLARF( 'Left', M-I, N-I, A( I+1, I ), 1, TAUQ( I ), + $ A( I+1, I+1 ), LDA, WORK ) + A( I+1, I ) = E( I ) + ELSE + TAUQ( I ) = ZERO + END IF + 20 CONTINUE + END IF + RETURN +* +* End of DGEBD2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgebrd.f b/2.3-1/src/fortran/lapack/dgebrd.f new file mode 100644 index 00000000..6544715d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgebrd.f @@ -0,0 +1,268 @@ + SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), + $ TAUQ( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEBRD reduces a general real M-by-N matrix A to upper or lower +* bidiagonal form B by an orthogonal transformation: Q**T * A * P = B. +* +* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns in the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N general matrix to be reduced. +* On exit, +* if m >= n, the diagonal and the first superdiagonal are +* overwritten with the upper bidiagonal matrix B; the +* elements below the diagonal, with the array TAUQ, represent +* the orthogonal matrix Q as a product of elementary +* reflectors, and the elements above the first superdiagonal, +* with the array TAUP, represent the orthogonal matrix P as +* a product of elementary reflectors; +* if m < n, the diagonal and the first subdiagonal are +* overwritten with the lower bidiagonal matrix B; the +* elements below the first subdiagonal, with the array TAUQ, +* represent the orthogonal matrix Q as a product of +* elementary reflectors, and the elements above the diagonal, +* with the array TAUP, represent the orthogonal matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The diagonal elements of the bidiagonal matrix B: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) +* The off-diagonal elements of the bidiagonal matrix B: +* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; +* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. +* +* TAUQ (output) DOUBLE PRECISION array dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix Q. See Further Details. +* +* TAUP (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix P. See Further Details. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,M,N). +* For optimum performance LWORK >= (M+N)*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* If m >= n, +* +* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are real scalars, and v and u are real vectors; +* v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in A(i+1:m,i); +* u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in A(i,i+2:n); +* tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, +* +* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are real scalars, and v and u are real vectors; +* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i); +* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n); +* tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The contents of A on exit are illustrated by the following examples: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) +* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) +* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) +* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) +* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) +* ( v1 v2 v3 v4 v5 ) +* +* where d and e denote diagonal and off-diagonal elements of B, vi +* denotes an element of the vector defining H(i), and ui an element of +* the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB, + $ NBMIN, NX + DOUBLE PRECISION WS +* .. +* .. External Subroutines .. + EXTERNAL DGEBD2, DGEMM, DLABRD, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + NB = MAX( 1, ILAENV( 1, 'DGEBRD', ' ', M, N, -1, -1 ) ) + LWKOPT = ( M+N )*NB + WORK( 1 ) = DBLE( LWKOPT ) + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, M, N ) .AND. .NOT.LQUERY ) THEN + INFO = -10 + END IF + IF( INFO.LT.0 ) THEN + CALL XERBLA( 'DGEBRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + MINMN = MIN( M, N ) + IF( MINMN.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + WS = MAX( M, N ) + LDWRKX = M + LDWRKY = N +* + IF( NB.GT.1 .AND. NB.LT.MINMN ) THEN +* +* Set the crossover point NX. +* + NX = MAX( NB, ILAENV( 3, 'DGEBRD', ' ', M, N, -1, -1 ) ) +* +* Determine when to switch from blocked to unblocked code. +* + IF( NX.LT.MINMN ) THEN + WS = ( M+N )*NB + IF( LWORK.LT.WS ) THEN +* +* Not enough work space for the optimal NB, consider using +* a smaller block size. +* + NBMIN = ILAENV( 2, 'DGEBRD', ' ', M, N, -1, -1 ) + IF( LWORK.GE.( M+N )*NBMIN ) THEN + NB = LWORK / ( M+N ) + ELSE + NB = 1 + NX = MINMN + END IF + END IF + END IF + ELSE + NX = MINMN + END IF +* + DO 30 I = 1, MINMN - NX, NB +* +* Reduce rows and columns i:i+nb-1 to bidiagonal form and return +* the matrices X and Y which are needed to update the unreduced +* part of the matrix +* + CALL DLABRD( M-I+1, N-I+1, NB, A( I, I ), LDA, D( I ), E( I ), + $ TAUQ( I ), TAUP( I ), WORK, LDWRKX, + $ WORK( LDWRKX*NB+1 ), LDWRKY ) +* +* Update the trailing submatrix A(i+nb:m,i+nb:n), using an update +* of the form A := A - V*Y' - X*U' +* + CALL DGEMM( 'No transpose', 'Transpose', M-I-NB+1, N-I-NB+1, + $ NB, -ONE, A( I+NB, I ), LDA, + $ WORK( LDWRKX*NB+NB+1 ), LDWRKY, ONE, + $ A( I+NB, I+NB ), LDA ) + CALL DGEMM( 'No transpose', 'No transpose', M-I-NB+1, N-I-NB+1, + $ NB, -ONE, WORK( NB+1 ), LDWRKX, A( I, I+NB ), LDA, + $ ONE, A( I+NB, I+NB ), LDA ) +* +* Copy diagonal and off-diagonal elements of B back into A +* + IF( M.GE.N ) THEN + DO 10 J = I, I + NB - 1 + A( J, J ) = D( J ) + A( J, J+1 ) = E( J ) + 10 CONTINUE + ELSE + DO 20 J = I, I + NB - 1 + A( J, J ) = D( J ) + A( J+1, J ) = E( J ) + 20 CONTINUE + END IF + 30 CONTINUE +* +* Use unblocked code to reduce the remainder of the matrix +* + CALL DGEBD2( M-I+1, N-I+1, A( I, I ), LDA, D( I ), E( I ), + $ TAUQ( I ), TAUP( I ), WORK, IINFO ) + WORK( 1 ) = WS + RETURN +* +* End of DGEBRD +* + END diff --git a/2.3-1/src/fortran/lapack/dgecon.f b/2.3-1/src/fortran/lapack/dgecon.f new file mode 100644 index 00000000..807cafca --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgecon.f @@ -0,0 +1,185 @@ + SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER INFO, LDA, N + DOUBLE PRECISION ANORM, RCOND +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGECON estimates the reciprocal of the condition number of a general +* real matrix A, in either the 1-norm or the infinity-norm, using +* the LU factorization computed by DGETRF. +* +* An estimate is obtained for norm(inv(A)), and the reciprocal of the +* condition number is computed as +* RCOND = 1 / ( norm(A) * norm(inv(A)) ). +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies whether the 1-norm condition number or the +* infinity-norm condition number is required: +* = '1' or 'O': 1-norm; +* = 'I': Infinity-norm. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The factors L and U from the factorization A = P*L*U +* as computed by DGETRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* ANORM (input) DOUBLE PRECISION +* If NORM = '1' or 'O', the 1-norm of the original matrix A. +* If NORM = 'I', the infinity-norm of the original matrix A. +* +* RCOND (output) DOUBLE PRECISION +* The reciprocal of the condition number of the matrix A, +* computed as RCOND = 1/(norm(A) * norm(inv(A))). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) +* +* IWORK (workspace) INTEGER array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ONENRM + CHARACTER NORMIN + INTEGER IX, KASE, KASE1 + DOUBLE PRECISION AINVNM, SCALE, SL, SMLNUM, SU +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, IDAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DLATRS, DRSCL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' ) + IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( ANORM.LT.ZERO ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGECON', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + RCOND = ZERO + IF( N.EQ.0 ) THEN + RCOND = ONE + RETURN + ELSE IF( ANORM.EQ.ZERO ) THEN + RETURN + END IF +* + SMLNUM = DLAMCH( 'Safe minimum' ) +* +* Estimate the norm of inv(A). +* + AINVNM = ZERO + NORMIN = 'N' + IF( ONENRM ) THEN + KASE1 = 1 + ELSE + KASE1 = 2 + END IF + KASE = 0 + 10 CONTINUE + CALL DLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.KASE1 ) THEN +* +* Multiply by inv(L). +* + CALL DLATRS( 'Lower', 'No transpose', 'Unit', NORMIN, N, A, + $ LDA, WORK, SL, WORK( 2*N+1 ), INFO ) +* +* Multiply by inv(U). +* + CALL DLATRS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, + $ A, LDA, WORK, SU, WORK( 3*N+1 ), INFO ) + ELSE +* +* Multiply by inv(U'). +* + CALL DLATRS( 'Upper', 'Transpose', 'Non-unit', NORMIN, N, A, + $ LDA, WORK, SU, WORK( 3*N+1 ), INFO ) +* +* Multiply by inv(L'). +* + CALL DLATRS( 'Lower', 'Transpose', 'Unit', NORMIN, N, A, + $ LDA, WORK, SL, WORK( 2*N+1 ), INFO ) + END IF +* +* Divide X by 1/(SL*SU) if doing so will not cause overflow. +* + SCALE = SL*SU + NORMIN = 'Y' + IF( SCALE.NE.ONE ) THEN + IX = IDAMAX( N, WORK, 1 ) + IF( SCALE.LT.ABS( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) + $ GO TO 20 + CALL DRSCL( N, SCALE, WORK, 1 ) + END IF + GO TO 10 + END IF +* +* Compute the estimate of the reciprocal condition number. +* + IF( AINVNM.NE.ZERO ) + $ RCOND = ( ONE / AINVNM ) / ANORM +* + 20 CONTINUE + RETURN +* +* End of DGECON +* + END diff --git a/2.3-1/src/fortran/lapack/dgeequ.f b/2.3-1/src/fortran/lapack/dgeequ.f new file mode 100644 index 00000000..b703116e --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeequ.f @@ -0,0 +1,225 @@ + SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N + DOUBLE PRECISION AMAX, COLCND, ROWCND +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( * ), R( * ) +* .. +* +* Purpose +* ======= +* +* DGEEQU computes row and column scalings intended to equilibrate an +* M-by-N matrix A and reduce its condition number. R returns the row +* scale factors and C the column scale factors, chosen to try to make +* the largest element in each row and column of the matrix B with +* elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1. +* +* R(i) and C(j) are restricted to be between SMLNUM = smallest safe +* number and BIGNUM = largest safe number. Use of these scaling +* factors is not guaranteed to reduce the condition number of A but +* works well in practice. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The M-by-N matrix whose equilibration factors are +* to be computed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* R (output) DOUBLE PRECISION array, dimension (M) +* If INFO = 0 or INFO > M, R contains the row scale factors +* for A. +* +* C (output) DOUBLE PRECISION array, dimension (N) +* If INFO = 0, C contains the column scale factors for A. +* +* ROWCND (output) DOUBLE PRECISION +* If INFO = 0 or INFO > M, ROWCND contains the ratio of the +* smallest R(i) to the largest R(i). If ROWCND >= 0.1 and +* AMAX is neither too large nor too small, it is not worth +* scaling by R. +* +* COLCND (output) DOUBLE PRECISION +* If INFO = 0, COLCND contains the ratio of the smallest +* C(i) to the largest C(i). If COLCND >= 0.1, it is not +* worth scaling by C. +* +* AMAX (output) DOUBLE PRECISION +* Absolute value of largest matrix element. If AMAX is very +* close to overflow or very close to underflow, the matrix +* should be scaled. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, and i is +* <= M: the i-th row of A is exactly zero +* > M: the (i-M)-th column of A is exactly zero +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION BIGNUM, RCMAX, RCMIN, SMLNUM +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEEQU', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + ROWCND = ONE + COLCND = ONE + AMAX = ZERO + RETURN + END IF +* +* Get machine constants. +* + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM +* +* Compute row scale factors. +* + DO 10 I = 1, M + R( I ) = ZERO + 10 CONTINUE +* +* Find the maximum element in each row. +* + DO 30 J = 1, N + DO 20 I = 1, M + R( I ) = MAX( R( I ), ABS( A( I, J ) ) ) + 20 CONTINUE + 30 CONTINUE +* +* Find the maximum and minimum scale factors. +* + RCMIN = BIGNUM + RCMAX = ZERO + DO 40 I = 1, M + RCMAX = MAX( RCMAX, R( I ) ) + RCMIN = MIN( RCMIN, R( I ) ) + 40 CONTINUE + AMAX = RCMAX +* + IF( RCMIN.EQ.ZERO ) THEN +* +* Find the first zero scale factor and return an error code. +* + DO 50 I = 1, M + IF( R( I ).EQ.ZERO ) THEN + INFO = I + RETURN + END IF + 50 CONTINUE + ELSE +* +* Invert the scale factors. +* + DO 60 I = 1, M + R( I ) = ONE / MIN( MAX( R( I ), SMLNUM ), BIGNUM ) + 60 CONTINUE +* +* Compute ROWCND = min(R(I)) / max(R(I)) +* + ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM ) + END IF +* +* Compute column scale factors +* + DO 70 J = 1, N + C( J ) = ZERO + 70 CONTINUE +* +* Find the maximum element in each column, +* assuming the row scaling computed above. +* + DO 90 J = 1, N + DO 80 I = 1, M + C( J ) = MAX( C( J ), ABS( A( I, J ) )*R( I ) ) + 80 CONTINUE + 90 CONTINUE +* +* Find the maximum and minimum scale factors. +* + RCMIN = BIGNUM + RCMAX = ZERO + DO 100 J = 1, N + RCMIN = MIN( RCMIN, C( J ) ) + RCMAX = MAX( RCMAX, C( J ) ) + 100 CONTINUE +* + IF( RCMIN.EQ.ZERO ) THEN +* +* Find the first zero scale factor and return an error code. +* + DO 110 J = 1, N + IF( C( J ).EQ.ZERO ) THEN + INFO = M + J + RETURN + END IF + 110 CONTINUE + ELSE +* +* Invert the scale factors. +* + DO 120 J = 1, N + C( J ) = ONE / MIN( MAX( C( J ), SMLNUM ), BIGNUM ) + 120 CONTINUE +* +* Compute COLCND = min(C(J)) / max(C(J)) +* + COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM ) + END IF +* + RETURN +* +* End of DGEEQU +* + END diff --git a/2.3-1/src/fortran/lapack/dgees.f b/2.3-1/src/fortran/lapack/dgees.f new file mode 100644 index 00000000..96ba8019 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgees.f @@ -0,0 +1,434 @@ + SUBROUTINE DGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI, + $ VS, LDVS, WORK, LWORK, BWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVS, SORT + INTEGER INFO, LDA, LDVS, LWORK, N, SDIM +* .. +* .. Array Arguments .. + LOGICAL BWORK( * ) + DOUBLE PRECISION A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ), + $ WR( * ) +* .. +* .. Function Arguments .. + LOGICAL SELECT + EXTERNAL SELECT +* .. +* +* Purpose +* ======= +* +* DGEES computes for an N-by-N real nonsymmetric matrix A, the +* eigenvalues, the real Schur form T, and, optionally, the matrix of +* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T). +* +* Optionally, it also orders the eigenvalues on the diagonal of the +* real Schur form so that selected eigenvalues are at the top left. +* The leading columns of Z then form an orthonormal basis for the +* invariant subspace corresponding to the selected eigenvalues. +* +* A matrix is in real Schur form if it is upper quasi-triangular with +* 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the +* form +* [ a b ] +* [ c a ] +* +* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc). +* +* Arguments +* ========= +* +* JOBVS (input) CHARACTER*1 +* = 'N': Schur vectors are not computed; +* = 'V': Schur vectors are computed. +* +* SORT (input) CHARACTER*1 +* Specifies whether or not to order the eigenvalues on the +* diagonal of the Schur form. +* = 'N': Eigenvalues are not ordered; +* = 'S': Eigenvalues are ordered (see SELECT). +* +* SELECT (external procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments +* SELECT must be declared EXTERNAL in the calling subroutine. +* If SORT = 'S', SELECT is used to select eigenvalues to sort +* to the top left of the Schur form. +* If SORT = 'N', SELECT is not referenced. +* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if +* SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex +* conjugate pair of eigenvalues is selected, then both complex +* eigenvalues are selected. +* Note that a selected complex eigenvalue may no longer +* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since +* ordering may change the value of complex eigenvalues +* (especially if the eigenvalue is ill-conditioned); in this +* case INFO is set to N+2 (see INFO below). +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the N-by-N matrix A. +* On exit, A has been overwritten by its real Schur form T. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* SDIM (output) INTEGER +* If SORT = 'N', SDIM = 0. +* If SORT = 'S', SDIM = number of eigenvalues (after sorting) +* for which SELECT is true. (Complex conjugate +* pairs for which SELECT is true for either +* eigenvalue count as 2.) +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* WR and WI contain the real and imaginary parts, +* respectively, of the computed eigenvalues in the same order +* that they appear on the diagonal of the output Schur form T. +* Complex conjugate pairs of eigenvalues will appear +* consecutively with the eigenvalue having the positive +* imaginary part first. +* +* VS (output) DOUBLE PRECISION array, dimension (LDVS,N) +* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur +* vectors. +* If JOBVS = 'N', VS is not referenced. +* +* LDVS (input) INTEGER +* The leading dimension of the array VS. LDVS >= 1; if +* JOBVS = 'V', LDVS >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) contains the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,3*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* BWORK (workspace) LOGICAL array, dimension (N) +* Not referenced if SORT = 'N'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, and i is +* <= N: the QR algorithm failed to compute all the +* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI +* contain those eigenvalues which have converged; if +* JOBVS = 'V', VS contains the matrix which reduces A +* to its partially converged Schur form. +* = N+1: the eigenvalues could not be reordered because some +* eigenvalues were too close to separate (the problem +* is very ill-conditioned); +* = N+2: after reordering, roundoff changed values of some +* complex eigenvalues so that leading eigenvalues in +* the Schur form no longer satisfy SELECT=.TRUE. This +* could also be caused by underflow due to scaling. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL CURSL, LASTSL, LQUERY, LST2SL, SCALEA, WANTST, + $ WANTVS + INTEGER HSWORK, I, I1, I2, IBAL, ICOND, IERR, IEVAL, + $ IHI, ILO, INXT, IP, ITAU, IWRK, MAXWRK, MINWRK + DOUBLE PRECISION ANRM, BIGNUM, CSCALE, EPS, S, SEP, SMLNUM +* .. +* .. Local Arrays .. + INTEGER IDUM( 1 ) + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY, + $ DLABAD, DLASCL, DORGHR, DSWAP, DTRSEN, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + WANTVS = LSAME( JOBVS, 'V' ) + WANTST = LSAME( SORT, 'S' ) + IF( ( .NOT.WANTVS ) .AND. ( .NOT.LSAME( JOBVS, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDVS.LT.1 .OR. ( WANTVS .AND. LDVS.LT.N ) ) THEN + INFO = -11 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV. +* HSWORK refers to the workspace preferred by DHSEQR, as +* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, +* the worst case.) +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + ELSE + MAXWRK = 2*N + N*ILAENV( 1, 'DGEHRD', ' ', N, 1, N, 0 ) + MINWRK = 3*N +* + CALL DHSEQR( 'S', JOBVS, N, 1, N, A, LDA, WR, WI, VS, LDVS, + $ WORK, -1, IEVAL ) + HSWORK = WORK( 1 ) +* + IF( .NOT.WANTVS ) THEN + MAXWRK = MAX( MAXWRK, N + HSWORK ) + ELSE + MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1, + $ 'DORGHR', ' ', N, 1, N, -1 ) ) + MAXWRK = MAX( MAXWRK, N + HSWORK ) + END IF + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEES ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + SDIM = 0 + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, DUM ) + SCALEA = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + SCALEA = .TRUE. + CSCALE = SMLNUM + ELSE IF( ANRM.GT.BIGNUM ) THEN + SCALEA = .TRUE. + CSCALE = BIGNUM + END IF + IF( SCALEA ) + $ CALL DLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) +* +* Permute the matrix to make it more nearly triangular +* (Workspace: need N) +* + IBAL = 1 + CALL DGEBAL( 'P', N, A, LDA, ILO, IHI, WORK( IBAL ), IERR ) +* +* Reduce to upper Hessenberg form +* (Workspace: need 3*N, prefer 2*N+N*NB) +* + ITAU = N + IBAL + IWRK = N + ITAU + CALL DGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* + IF( WANTVS ) THEN +* +* Copy Householder vectors to VS +* + CALL DLACPY( 'L', N, N, A, LDA, VS, LDVS ) +* +* Generate orthogonal matrix in VS +* (Workspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* + CALL DORGHR( N, ILO, IHI, VS, LDVS, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) + END IF +* + SDIM = 0 +* +* Perform QR iteration, accumulating Schur vectors in VS if desired +* (Workspace: need N+1, prefer N+HSWORK (see comments) ) +* + IWRK = ITAU + CALL DHSEQR( 'S', JOBVS, N, ILO, IHI, A, LDA, WR, WI, VS, LDVS, + $ WORK( IWRK ), LWORK-IWRK+1, IEVAL ) + IF( IEVAL.GT.0 ) + $ INFO = IEVAL +* +* Sort eigenvalues if desired +* + IF( WANTST .AND. INFO.EQ.0 ) THEN + IF( SCALEA ) THEN + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, WR, N, IERR ) + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, WI, N, IERR ) + END IF + DO 10 I = 1, N + BWORK( I ) = SELECT( WR( I ), WI( I ) ) + 10 CONTINUE +* +* Reorder eigenvalues and transform Schur vectors +* (Workspace: none needed) +* + CALL DTRSEN( 'N', JOBVS, BWORK, N, A, LDA, VS, LDVS, WR, WI, + $ SDIM, S, SEP, WORK( IWRK ), LWORK-IWRK+1, IDUM, 1, + $ ICOND ) + IF( ICOND.GT.0 ) + $ INFO = N + ICOND + END IF +* + IF( WANTVS ) THEN +* +* Undo balancing +* (Workspace: need N) +* + CALL DGEBAK( 'P', 'R', N, ILO, IHI, WORK( IBAL ), N, VS, LDVS, + $ IERR ) + END IF +* + IF( SCALEA ) THEN +* +* Undo scaling for the Schur form of A +* + CALL DLASCL( 'H', 0, 0, CSCALE, ANRM, N, N, A, LDA, IERR ) + CALL DCOPY( N, A, LDA+1, WR, 1 ) + IF( CSCALE.EQ.SMLNUM ) THEN +* +* If scaling back towards underflow, adjust WI if an +* offdiagonal element of a 2-by-2 block in the Schur form +* underflows. +* + IF( IEVAL.GT.0 ) THEN + I1 = IEVAL + 1 + I2 = IHI - 1 + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WI, + $ MAX( ILO-1, 1 ), IERR ) + ELSE IF( WANTST ) THEN + I1 = 1 + I2 = N - 1 + ELSE + I1 = ILO + I2 = IHI - 1 + END IF + INXT = I1 - 1 + DO 20 I = I1, I2 + IF( I.LT.INXT ) + $ GO TO 20 + IF( WI( I ).EQ.ZERO ) THEN + INXT = I + 1 + ELSE + IF( A( I+1, I ).EQ.ZERO ) THEN + WI( I ) = ZERO + WI( I+1 ) = ZERO + ELSE IF( A( I+1, I ).NE.ZERO .AND. A( I, I+1 ).EQ. + $ ZERO ) THEN + WI( I ) = ZERO + WI( I+1 ) = ZERO + IF( I.GT.1 ) + $ CALL DSWAP( I-1, A( 1, I ), 1, A( 1, I+1 ), 1 ) + IF( N.GT.I+1 ) + $ CALL DSWAP( N-I-1, A( I, I+2 ), LDA, + $ A( I+1, I+2 ), LDA ) + IF( WANTVS ) THEN + CALL DSWAP( N, VS( 1, I ), 1, VS( 1, I+1 ), 1 ) + END IF + A( I, I+1 ) = A( I+1, I ) + A( I+1, I ) = ZERO + END IF + INXT = I + 2 + END IF + 20 CONTINUE + END IF +* +* Undo scaling for the imaginary part of the eigenvalues +* + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-IEVAL, 1, + $ WI( IEVAL+1 ), MAX( N-IEVAL, 1 ), IERR ) + END IF +* + IF( WANTST .AND. INFO.EQ.0 ) THEN +* +* Check if reordering successful +* + LASTSL = .TRUE. + LST2SL = .TRUE. + SDIM = 0 + IP = 0 + DO 30 I = 1, N + CURSL = SELECT( WR( I ), WI( I ) ) + IF( WI( I ).EQ.ZERO ) THEN + IF( CURSL ) + $ SDIM = SDIM + 1 + IP = 0 + IF( CURSL .AND. .NOT.LASTSL ) + $ INFO = N + 2 + ELSE + IF( IP.EQ.1 ) THEN +* +* Last eigenvalue of conjugate pair +* + CURSL = CURSL .OR. LASTSL + LASTSL = CURSL + IF( CURSL ) + $ SDIM = SDIM + 2 + IP = -1 + IF( CURSL .AND. .NOT.LST2SL ) + $ INFO = N + 2 + ELSE +* +* First eigenvalue of conjugate pair +* + IP = 1 + END IF + END IF + LST2SL = LASTSL + LASTSL = CURSL + 30 CONTINUE + END IF +* + WORK( 1 ) = MAXWRK + RETURN +* +* End of DGEES +* + END diff --git a/2.3-1/src/fortran/lapack/dgeesx.f b/2.3-1/src/fortran/lapack/dgeesx.f new file mode 100644 index 00000000..deb30ab2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeesx.f @@ -0,0 +1,527 @@ + SUBROUTINE DGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM, + $ WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK, + $ IWORK, LIWORK, BWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVS, SENSE, SORT + INTEGER INFO, LDA, LDVS, LIWORK, LWORK, N, SDIM + DOUBLE PRECISION RCONDE, RCONDV +* .. +* .. Array Arguments .. + LOGICAL BWORK( * ) + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ), + $ WR( * ) +* .. +* .. Function Arguments .. + LOGICAL SELECT + EXTERNAL SELECT +* .. +* +* Purpose +* ======= +* +* DGEESX computes for an N-by-N real nonsymmetric matrix A, the +* eigenvalues, the real Schur form T, and, optionally, the matrix of +* Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T). +* +* Optionally, it also orders the eigenvalues on the diagonal of the +* real Schur form so that selected eigenvalues are at the top left; +* computes a reciprocal condition number for the average of the +* selected eigenvalues (RCONDE); and computes a reciprocal condition +* number for the right invariant subspace corresponding to the +* selected eigenvalues (RCONDV). The leading columns of Z form an +* orthonormal basis for this invariant subspace. +* +* For further explanation of the reciprocal condition numbers RCONDE +* and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where +* these quantities are called s and sep respectively). +* +* A real matrix is in real Schur form if it is upper quasi-triangular +* with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in +* the form +* [ a b ] +* [ c a ] +* +* where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc). +* +* Arguments +* ========= +* +* JOBVS (input) CHARACTER*1 +* = 'N': Schur vectors are not computed; +* = 'V': Schur vectors are computed. +* +* SORT (input) CHARACTER*1 +* Specifies whether or not to order the eigenvalues on the +* diagonal of the Schur form. +* = 'N': Eigenvalues are not ordered; +* = 'S': Eigenvalues are ordered (see SELECT). +* +* SELECT (external procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments +* SELECT must be declared EXTERNAL in the calling subroutine. +* If SORT = 'S', SELECT is used to select eigenvalues to sort +* to the top left of the Schur form. +* If SORT = 'N', SELECT is not referenced. +* An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if +* SELECT(WR(j),WI(j)) is true; i.e., if either one of a +* complex conjugate pair of eigenvalues is selected, then both +* are. Note that a selected complex eigenvalue may no longer +* satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since +* ordering may change the value of complex eigenvalues +* (especially if the eigenvalue is ill-conditioned); in this +* case INFO may be set to N+3 (see INFO below). +* +* SENSE (input) CHARACTER*1 +* Determines which reciprocal condition numbers are computed. +* = 'N': None are computed; +* = 'E': Computed for average of selected eigenvalues only; +* = 'V': Computed for selected right invariant subspace only; +* = 'B': Computed for both. +* If SENSE = 'E', 'V' or 'B', SORT must equal 'S'. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the N-by-N matrix A. +* On exit, A is overwritten by its real Schur form T. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* SDIM (output) INTEGER +* If SORT = 'N', SDIM = 0. +* If SORT = 'S', SDIM = number of eigenvalues (after sorting) +* for which SELECT is true. (Complex conjugate +* pairs for which SELECT is true for either +* eigenvalue count as 2.) +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* WR and WI contain the real and imaginary parts, respectively, +* of the computed eigenvalues, in the same order that they +* appear on the diagonal of the output Schur form T. Complex +* conjugate pairs of eigenvalues appear consecutively with the +* eigenvalue having the positive imaginary part first. +* +* VS (output) DOUBLE PRECISION array, dimension (LDVS,N) +* If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur +* vectors. +* If JOBVS = 'N', VS is not referenced. +* +* LDVS (input) INTEGER +* The leading dimension of the array VS. LDVS >= 1, and if +* JOBVS = 'V', LDVS >= N. +* +* RCONDE (output) DOUBLE PRECISION +* If SENSE = 'E' or 'B', RCONDE contains the reciprocal +* condition number for the average of the selected eigenvalues. +* Not referenced if SENSE = 'N' or 'V'. +* +* RCONDV (output) DOUBLE PRECISION +* If SENSE = 'V' or 'B', RCONDV contains the reciprocal +* condition number for the selected right invariant subspace. +* Not referenced if SENSE = 'N' or 'E'. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,3*N). +* Also, if SENSE = 'E' or 'V' or 'B', +* LWORK >= N+2*SDIM*(N-SDIM), where SDIM is the number of +* selected eigenvalues computed by this routine. Note that +* N+2*SDIM*(N-SDIM) <= N+N*N/2. Note also that an error is only +* returned if LWORK < max(1,3*N), but if SENSE = 'E' or 'V' or +* 'B' this may not be large enough. +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates upper bounds on the optimal sizes of the +* arrays WORK and IWORK, returns these values as the first +* entries of the WORK and IWORK arrays, and no error messages +* related to LWORK or LIWORK are issued by XERBLA. +* +* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK)) +* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. +* +* LIWORK (input) INTEGER +* The dimension of the array IWORK. +* LIWORK >= 1; if SENSE = 'V' or 'B', LIWORK >= SDIM*(N-SDIM). +* Note that SDIM*(N-SDIM) <= N*N/4. Note also that an error is +* only returned if LIWORK < 1, but if SENSE = 'V' or 'B' this +* may not be large enough. +* +* If LIWORK = -1, then a workspace query is assumed; the +* routine only calculates upper bounds on the optimal sizes of +* the arrays WORK and IWORK, returns these values as the first +* entries of the WORK and IWORK arrays, and no error messages +* related to LWORK or LIWORK are issued by XERBLA. +* +* BWORK (workspace) LOGICAL array, dimension (N) +* Not referenced if SORT = 'N'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, and i is +* <= N: the QR algorithm failed to compute all the +* eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI +* contain those eigenvalues which have converged; if +* JOBVS = 'V', VS contains the transformation which +* reduces A to its partially converged Schur form. +* = N+1: the eigenvalues could not be reordered because some +* eigenvalues were too close to separate (the problem +* is very ill-conditioned); +* = N+2: after reordering, roundoff changed values of some +* complex eigenvalues so that leading eigenvalues in +* the Schur form no longer satisfy SELECT=.TRUE. This +* could also be caused by underflow due to scaling. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL CURSL, LASTSL, LQUERY, LST2SL, SCALEA, WANTSB, + $ WANTSE, WANTSN, WANTST, WANTSV, WANTVS + INTEGER HSWORK, I, I1, I2, IBAL, ICOND, IERR, IEVAL, + $ IHI, ILO, INXT, IP, ITAU, IWRK, LIWRK, LWRK, + $ MAXWRK, MINWRK + DOUBLE PRECISION ANRM, BIGNUM, CSCALE, EPS, SMLNUM +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLACPY, + $ DLASCL, DORGHR, DSWAP, DTRSEN, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLABAD, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + WANTVS = LSAME( JOBVS, 'V' ) + WANTST = LSAME( SORT, 'S' ) + WANTSN = LSAME( SENSE, 'N' ) + WANTSE = LSAME( SENSE, 'E' ) + WANTSV = LSAME( SENSE, 'V' ) + WANTSB = LSAME( SENSE, 'B' ) + LQUERY = ( LWORK.EQ.-1 .OR. LIWORK.EQ.-1 ) + IF( ( .NOT.WANTVS ) .AND. ( .NOT.LSAME( JOBVS, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( .NOT.( WANTSN .OR. WANTSE .OR. WANTSV .OR. WANTSB ) .OR. + $ ( .NOT.WANTST .AND. .NOT.WANTSN ) ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDVS.LT.1 .OR. ( WANTVS .AND. LDVS.LT.N ) ) THEN + INFO = -12 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "RWorkspace:" describe the +* minimal amount of real workspace needed at that point in the +* code, as well as the preferred amount for good performance. +* IWorkspace refers to integer workspace. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV. +* HSWORK refers to the workspace preferred by DHSEQR, as +* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, +* the worst case. +* If SENSE = 'E', 'V' or 'B', then the amount of workspace needed +* depends on SDIM, which is computed by the routine DTRSEN later +* in the code.) +* + IF( INFO.EQ.0 ) THEN + LIWRK = 1 + IF( N.EQ.0 ) THEN + MINWRK = 1 + LWRK = 1 + ELSE + MAXWRK = 2*N + N*ILAENV( 1, 'DGEHRD', ' ', N, 1, N, 0 ) + MINWRK = 3*N +* + CALL DHSEQR( 'S', JOBVS, N, 1, N, A, LDA, WR, WI, VS, LDVS, + $ WORK, -1, IEVAL ) + HSWORK = WORK( 1 ) +* + IF( .NOT.WANTVS ) THEN + MAXWRK = MAX( MAXWRK, N + HSWORK ) + ELSE + MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1, + $ 'DORGHR', ' ', N, 1, N, -1 ) ) + MAXWRK = MAX( MAXWRK, N + HSWORK ) + END IF + LWRK = MAXWRK + IF( .NOT.WANTSN ) + $ LWRK = MAX( LWRK, N + ( N*N )/2 ) + IF( WANTSV .OR. WANTSB ) + $ LIWRK = ( N*N )/4 + END IF + IWORK( 1 ) = LIWRK + WORK( 1 ) = LWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -16 + ELSE IF( LIWORK.LT.1 .AND. .NOT.LQUERY ) THEN + INFO = -18 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEESX', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + SDIM = 0 + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, DUM ) + SCALEA = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + SCALEA = .TRUE. + CSCALE = SMLNUM + ELSE IF( ANRM.GT.BIGNUM ) THEN + SCALEA = .TRUE. + CSCALE = BIGNUM + END IF + IF( SCALEA ) + $ CALL DLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) +* +* Permute the matrix to make it more nearly triangular +* (RWorkspace: need N) +* + IBAL = 1 + CALL DGEBAL( 'P', N, A, LDA, ILO, IHI, WORK( IBAL ), IERR ) +* +* Reduce to upper Hessenberg form +* (RWorkspace: need 3*N, prefer 2*N+N*NB) +* + ITAU = N + IBAL + IWRK = N + ITAU + CALL DGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* + IF( WANTVS ) THEN +* +* Copy Householder vectors to VS +* + CALL DLACPY( 'L', N, N, A, LDA, VS, LDVS ) +* +* Generate orthogonal matrix in VS +* (RWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* + CALL DORGHR( N, ILO, IHI, VS, LDVS, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) + END IF +* + SDIM = 0 +* +* Perform QR iteration, accumulating Schur vectors in VS if desired +* (RWorkspace: need N+1, prefer N+HSWORK (see comments) ) +* + IWRK = ITAU + CALL DHSEQR( 'S', JOBVS, N, ILO, IHI, A, LDA, WR, WI, VS, LDVS, + $ WORK( IWRK ), LWORK-IWRK+1, IEVAL ) + IF( IEVAL.GT.0 ) + $ INFO = IEVAL +* +* Sort eigenvalues if desired +* + IF( WANTST .AND. INFO.EQ.0 ) THEN + IF( SCALEA ) THEN + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, WR, N, IERR ) + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, WI, N, IERR ) + END IF + DO 10 I = 1, N + BWORK( I ) = SELECT( WR( I ), WI( I ) ) + 10 CONTINUE +* +* Reorder eigenvalues, transform Schur vectors, and compute +* reciprocal condition numbers +* (RWorkspace: if SENSE is not 'N', need N+2*SDIM*(N-SDIM) +* otherwise, need N ) +* (IWorkspace: if SENSE is 'V' or 'B', need SDIM*(N-SDIM) +* otherwise, need 0 ) +* + CALL DTRSEN( SENSE, JOBVS, BWORK, N, A, LDA, VS, LDVS, WR, WI, + $ SDIM, RCONDE, RCONDV, WORK( IWRK ), LWORK-IWRK+1, + $ IWORK, LIWORK, ICOND ) + IF( .NOT.WANTSN ) + $ MAXWRK = MAX( MAXWRK, N+2*SDIM*( N-SDIM ) ) + IF( ICOND.EQ.-15 ) THEN +* +* Not enough real workspace +* + INFO = -16 + ELSE IF( ICOND.EQ.-17 ) THEN +* +* Not enough integer workspace +* + INFO = -18 + ELSE IF( ICOND.GT.0 ) THEN +* +* DTRSEN failed to reorder or to restore standard Schur form +* + INFO = ICOND + N + END IF + END IF +* + IF( WANTVS ) THEN +* +* Undo balancing +* (RWorkspace: need N) +* + CALL DGEBAK( 'P', 'R', N, ILO, IHI, WORK( IBAL ), N, VS, LDVS, + $ IERR ) + END IF +* + IF( SCALEA ) THEN +* +* Undo scaling for the Schur form of A +* + CALL DLASCL( 'H', 0, 0, CSCALE, ANRM, N, N, A, LDA, IERR ) + CALL DCOPY( N, A, LDA+1, WR, 1 ) + IF( ( WANTSV .OR. WANTSB ) .AND. INFO.EQ.0 ) THEN + DUM( 1 ) = RCONDV + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, 1, 1, DUM, 1, IERR ) + RCONDV = DUM( 1 ) + END IF + IF( CSCALE.EQ.SMLNUM ) THEN +* +* If scaling back towards underflow, adjust WI if an +* offdiagonal element of a 2-by-2 block in the Schur form +* underflows. +* + IF( IEVAL.GT.0 ) THEN + I1 = IEVAL + 1 + I2 = IHI - 1 + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WI, N, + $ IERR ) + ELSE IF( WANTST ) THEN + I1 = 1 + I2 = N - 1 + ELSE + I1 = ILO + I2 = IHI - 1 + END IF + INXT = I1 - 1 + DO 20 I = I1, I2 + IF( I.LT.INXT ) + $ GO TO 20 + IF( WI( I ).EQ.ZERO ) THEN + INXT = I + 1 + ELSE + IF( A( I+1, I ).EQ.ZERO ) THEN + WI( I ) = ZERO + WI( I+1 ) = ZERO + ELSE IF( A( I+1, I ).NE.ZERO .AND. A( I, I+1 ).EQ. + $ ZERO ) THEN + WI( I ) = ZERO + WI( I+1 ) = ZERO + IF( I.GT.1 ) + $ CALL DSWAP( I-1, A( 1, I ), 1, A( 1, I+1 ), 1 ) + IF( N.GT.I+1 ) + $ CALL DSWAP( N-I-1, A( I, I+2 ), LDA, + $ A( I+1, I+2 ), LDA ) + CALL DSWAP( N, VS( 1, I ), 1, VS( 1, I+1 ), 1 ) + A( I, I+1 ) = A( I+1, I ) + A( I+1, I ) = ZERO + END IF + INXT = I + 2 + END IF + 20 CONTINUE + END IF + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-IEVAL, 1, + $ WI( IEVAL+1 ), MAX( N-IEVAL, 1 ), IERR ) + END IF +* + IF( WANTST .AND. INFO.EQ.0 ) THEN +* +* Check if reordering successful +* + LASTSL = .TRUE. + LST2SL = .TRUE. + SDIM = 0 + IP = 0 + DO 30 I = 1, N + CURSL = SELECT( WR( I ), WI( I ) ) + IF( WI( I ).EQ.ZERO ) THEN + IF( CURSL ) + $ SDIM = SDIM + 1 + IP = 0 + IF( CURSL .AND. .NOT.LASTSL ) + $ INFO = N + 2 + ELSE + IF( IP.EQ.1 ) THEN +* +* Last eigenvalue of conjugate pair +* + CURSL = CURSL .OR. LASTSL + LASTSL = CURSL + IF( CURSL ) + $ SDIM = SDIM + 2 + IP = -1 + IF( CURSL .AND. .NOT.LST2SL ) + $ INFO = N + 2 + ELSE +* +* First eigenvalue of conjugate pair +* + IP = 1 + END IF + END IF + LST2SL = LASTSL + LASTSL = CURSL + 30 CONTINUE + END IF +* + WORK( 1 ) = MAXWRK + IF( WANTSV .OR. WANTSB ) THEN + IWORK( 1 ) = MAX( 1, SDIM*( N-SDIM ) ) + ELSE + IWORK( 1 ) = 1 + END IF +* + RETURN +* +* End of DGEESX +* + END diff --git a/2.3-1/src/fortran/lapack/dgeev.f b/2.3-1/src/fortran/lapack/dgeev.f new file mode 100644 index 00000000..50e08a9c --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeev.f @@ -0,0 +1,423 @@ + SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, + $ LDVR, WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVL, JOBVR + INTEGER INFO, LDA, LDVL, LDVR, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), + $ WI( * ), WORK( * ), WR( * ) +* .. +* +* Purpose +* ======= +* +* DGEEV computes for an N-by-N real nonsymmetric matrix A, the +* eigenvalues and, optionally, the left and/or right eigenvectors. +* +* The right eigenvector v(j) of A satisfies +* A * v(j) = lambda(j) * v(j) +* where lambda(j) is its eigenvalue. +* The left eigenvector u(j) of A satisfies +* u(j)**H * A = lambda(j) * u(j)**H +* where u(j)**H denotes the conjugate transpose of u(j). +* +* The computed eigenvectors are normalized to have Euclidean norm +* equal to 1 and largest component real. +* +* Arguments +* ========= +* +* JOBVL (input) CHARACTER*1 +* = 'N': left eigenvectors of A are not computed; +* = 'V': left eigenvectors of A are computed. +* +* JOBVR (input) CHARACTER*1 +* = 'N': right eigenvectors of A are not computed; +* = 'V': right eigenvectors of A are computed. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the N-by-N matrix A. +* On exit, A has been overwritten. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* WR and WI contain the real and imaginary parts, +* respectively, of the computed eigenvalues. Complex +* conjugate pairs of eigenvalues appear consecutively +* with the eigenvalue having the positive imaginary part +* first. +* +* VL (output) DOUBLE PRECISION array, dimension (LDVL,N) +* If JOBVL = 'V', the left eigenvectors u(j) are stored one +* after another in the columns of VL, in the same order +* as their eigenvalues. +* If JOBVL = 'N', VL is not referenced. +* If the j-th eigenvalue is real, then u(j) = VL(:,j), +* the j-th column of VL. +* If the j-th and (j+1)-st eigenvalues form a complex +* conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and +* u(j+1) = VL(:,j) - i*VL(:,j+1). +* +* LDVL (input) INTEGER +* The leading dimension of the array VL. LDVL >= 1; if +* JOBVL = 'V', LDVL >= N. +* +* VR (output) DOUBLE PRECISION array, dimension (LDVR,N) +* If JOBVR = 'V', the right eigenvectors v(j) are stored one +* after another in the columns of VR, in the same order +* as their eigenvalues. +* If JOBVR = 'N', VR is not referenced. +* If the j-th eigenvalue is real, then v(j) = VR(:,j), +* the j-th column of VR. +* If the j-th and (j+1)-st eigenvalues form a complex +* conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and +* v(j+1) = VR(:,j) - i*VR(:,j+1). +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1; if +* JOBVR = 'V', LDVR >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,3*N), and +* if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good +* performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, the QR algorithm failed to compute all the +* eigenvalues, and no eigenvectors have been computed; +* elements i+1:N of WR and WI contain eigenvalues which +* have converged. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, SCALEA, WANTVL, WANTVR + CHARACTER SIDE + INTEGER HSWORK, I, IBAL, IERR, IHI, ILO, ITAU, IWRK, K, + $ MAXWRK, MINWRK, NOUT + DOUBLE PRECISION ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM, + $ SN +* .. +* .. Local Arrays .. + LOGICAL SELECT( 1 ) + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLABAD, DLACPY, + $ DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC, + $ XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX, ILAENV + DOUBLE PRECISION DLAMCH, DLANGE, DLAPY2, DNRM2 + EXTERNAL LSAME, IDAMAX, ILAENV, DLAMCH, DLANGE, DLAPY2, + $ DNRM2 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + WANTVL = LSAME( JOBVL, 'V' ) + WANTVR = LSAME( JOBVR, 'V' ) + IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( ( .NOT.WANTVR ) .AND. ( .NOT.LSAME( JOBVR, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDVL.LT.1 .OR. ( WANTVL .AND. LDVL.LT.N ) ) THEN + INFO = -9 + ELSE IF( LDVR.LT.1 .OR. ( WANTVR .AND. LDVR.LT.N ) ) THEN + INFO = -11 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV. +* HSWORK refers to the workspace preferred by DHSEQR, as +* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, +* the worst case.) +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + ELSE + MAXWRK = 2*N + N*ILAENV( 1, 'DGEHRD', ' ', N, 1, N, 0 ) + IF( WANTVL ) THEN + MINWRK = 4*N + MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1, + $ 'DORGHR', ' ', N, 1, N, -1 ) ) + CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VL, LDVL, + $ WORK, -1, INFO ) + HSWORK = WORK( 1 ) + MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK ) + MAXWRK = MAX( MAXWRK, 4*N ) + ELSE IF( WANTVR ) THEN + MINWRK = 4*N + MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1, + $ 'DORGHR', ' ', N, 1, N, -1 ) ) + CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VR, LDVR, + $ WORK, -1, INFO ) + HSWORK = WORK( 1 ) + MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK ) + MAXWRK = MAX( MAXWRK, 4*N ) + ELSE + MINWRK = 3*N + CALL DHSEQR( 'E', 'N', N, 1, N, A, LDA, WR, WI, VR, LDVR, + $ WORK, -1, INFO ) + HSWORK = WORK( 1 ) + MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK ) + END IF + MAXWRK = MAX( MAXWRK, MINWRK ) + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, DUM ) + SCALEA = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + SCALEA = .TRUE. + CSCALE = SMLNUM + ELSE IF( ANRM.GT.BIGNUM ) THEN + SCALEA = .TRUE. + CSCALE = BIGNUM + END IF + IF( SCALEA ) + $ CALL DLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) +* +* Balance the matrix +* (Workspace: need N) +* + IBAL = 1 + CALL DGEBAL( 'B', N, A, LDA, ILO, IHI, WORK( IBAL ), IERR ) +* +* Reduce to upper Hessenberg form +* (Workspace: need 3*N, prefer 2*N+N*NB) +* + ITAU = IBAL + N + IWRK = ITAU + N + CALL DGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* + IF( WANTVL ) THEN +* +* Want left eigenvectors +* Copy Householder vectors to VL +* + SIDE = 'L' + CALL DLACPY( 'L', N, N, A, LDA, VL, LDVL ) +* +* Generate orthogonal matrix in VL +* (Workspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* + CALL DORGHR( N, ILO, IHI, VL, LDVL, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* +* Perform QR iteration, accumulating Schur vectors in VL +* (Workspace: need N+1, prefer N+HSWORK (see comments) ) +* + IWRK = ITAU + CALL DHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, WR, WI, VL, LDVL, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) +* + IF( WANTVR ) THEN +* +* Want left and right eigenvectors +* Copy Schur vectors to VR +* + SIDE = 'B' + CALL DLACPY( 'F', N, N, VL, LDVL, VR, LDVR ) + END IF +* + ELSE IF( WANTVR ) THEN +* +* Want right eigenvectors +* Copy Householder vectors to VR +* + SIDE = 'R' + CALL DLACPY( 'L', N, N, A, LDA, VR, LDVR ) +* +* Generate orthogonal matrix in VR +* (Workspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* + CALL DORGHR( N, ILO, IHI, VR, LDVR, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* +* Perform QR iteration, accumulating Schur vectors in VR +* (Workspace: need N+1, prefer N+HSWORK (see comments) ) +* + IWRK = ITAU + CALL DHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, WR, WI, VR, LDVR, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) +* + ELSE +* +* Compute eigenvalues only +* (Workspace: need N+1, prefer N+HSWORK (see comments) ) +* + IWRK = ITAU + CALL DHSEQR( 'E', 'N', N, ILO, IHI, A, LDA, WR, WI, VR, LDVR, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) + END IF +* +* If INFO > 0 from DHSEQR, then quit +* + IF( INFO.GT.0 ) + $ GO TO 50 +* + IF( WANTVL .OR. WANTVR ) THEN +* +* Compute left and/or right eigenvectors +* (Workspace: need 4*N) +* + CALL DTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR, + $ N, NOUT, WORK( IWRK ), IERR ) + END IF +* + IF( WANTVL ) THEN +* +* Undo balancing of left eigenvectors +* (Workspace: need N) +* + CALL DGEBAK( 'B', 'L', N, ILO, IHI, WORK( IBAL ), N, VL, LDVL, + $ IERR ) +* +* Normalize left eigenvectors and make largest component real +* + DO 20 I = 1, N + IF( WI( I ).EQ.ZERO ) THEN + SCL = ONE / DNRM2( N, VL( 1, I ), 1 ) + CALL DSCAL( N, SCL, VL( 1, I ), 1 ) + ELSE IF( WI( I ).GT.ZERO ) THEN + SCL = ONE / DLAPY2( DNRM2( N, VL( 1, I ), 1 ), + $ DNRM2( N, VL( 1, I+1 ), 1 ) ) + CALL DSCAL( N, SCL, VL( 1, I ), 1 ) + CALL DSCAL( N, SCL, VL( 1, I+1 ), 1 ) + DO 10 K = 1, N + WORK( IWRK+K-1 ) = VL( K, I )**2 + VL( K, I+1 )**2 + 10 CONTINUE + K = IDAMAX( N, WORK( IWRK ), 1 ) + CALL DLARTG( VL( K, I ), VL( K, I+1 ), CS, SN, R ) + CALL DROT( N, VL( 1, I ), 1, VL( 1, I+1 ), 1, CS, SN ) + VL( K, I+1 ) = ZERO + END IF + 20 CONTINUE + END IF +* + IF( WANTVR ) THEN +* +* Undo balancing of right eigenvectors +* (Workspace: need N) +* + CALL DGEBAK( 'B', 'R', N, ILO, IHI, WORK( IBAL ), N, VR, LDVR, + $ IERR ) +* +* Normalize right eigenvectors and make largest component real +* + DO 40 I = 1, N + IF( WI( I ).EQ.ZERO ) THEN + SCL = ONE / DNRM2( N, VR( 1, I ), 1 ) + CALL DSCAL( N, SCL, VR( 1, I ), 1 ) + ELSE IF( WI( I ).GT.ZERO ) THEN + SCL = ONE / DLAPY2( DNRM2( N, VR( 1, I ), 1 ), + $ DNRM2( N, VR( 1, I+1 ), 1 ) ) + CALL DSCAL( N, SCL, VR( 1, I ), 1 ) + CALL DSCAL( N, SCL, VR( 1, I+1 ), 1 ) + DO 30 K = 1, N + WORK( IWRK+K-1 ) = VR( K, I )**2 + VR( K, I+1 )**2 + 30 CONTINUE + K = IDAMAX( N, WORK( IWRK ), 1 ) + CALL DLARTG( VR( K, I ), VR( K, I+1 ), CS, SN, R ) + CALL DROT( N, VR( 1, I ), 1, VR( 1, I+1 ), 1, CS, SN ) + VR( K, I+1 ) = ZERO + END IF + 40 CONTINUE + END IF +* +* Undo scaling if necessary +* + 50 CONTINUE + IF( SCALEA ) THEN + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-INFO, 1, WR( INFO+1 ), + $ MAX( N-INFO, 1 ), IERR ) + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, N-INFO, 1, WI( INFO+1 ), + $ MAX( N-INFO, 1 ), IERR ) + IF( INFO.GT.0 ) THEN + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WR, N, + $ IERR ) + CALL DLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, WI, N, + $ IERR ) + END IF + END IF +* + WORK( 1 ) = MAXWRK + RETURN +* +* End of DGEEV +* + END diff --git a/2.3-1/src/fortran/lapack/dgegs.f b/2.3-1/src/fortran/lapack/dgegs.f new file mode 100644 index 00000000..85c32531 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgegs.f @@ -0,0 +1,438 @@ + SUBROUTINE DGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR, + $ ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK, + $ LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVSL, JOBVSR + INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), + $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ), + $ VSR( LDVSR, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine DGGES. +* +* DGEGS computes the eigenvalues, real Schur form, and, optionally, +* left and or/right Schur vectors of a real matrix pair (A,B). +* Given two square matrices A and B, the generalized real Schur +* factorization has the form +* +* A = Q*S*Z**T, B = Q*T*Z**T +* +* where Q and Z are orthogonal matrices, T is upper triangular, and S +* is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal +* blocks, the 2-by-2 blocks corresponding to complex conjugate pairs +* of eigenvalues of (A,B). The columns of Q are the left Schur vectors +* and the columns of Z are the right Schur vectors. +* +* If only the eigenvalues of (A,B) are needed, the driver routine +* DGEGV should be used instead. See DGEGV for a description of the +* eigenvalues of the generalized nonsymmetric eigenvalue problem +* (GNEP). +* +* Arguments +* ========= +* +* JOBVSL (input) CHARACTER*1 +* = 'N': do not compute the left Schur vectors; +* = 'V': compute the left Schur vectors (returned in VSL). +* +* JOBVSR (input) CHARACTER*1 +* = 'N': do not compute the right Schur vectors; +* = 'V': compute the right Schur vectors (returned in VSR). +* +* N (input) INTEGER +* The order of the matrices A, B, VSL, and VSR. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the matrix A. +* On exit, the upper quasi-triangular matrix S from the +* generalized real Schur factorization. +* +* LDA (input) INTEGER +* The leading dimension of A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB, N) +* On entry, the matrix B. +* On exit, the upper triangular matrix T from the generalized +* real Schur factorization. +* +* LDB (input) INTEGER +* The leading dimension of B. LDB >= max(1,N). +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (N) +* The real parts of each scalar alpha defining an eigenvalue +* of GNEP. +* +* ALPHAI (output) DOUBLE PRECISION array, dimension (N) +* The imaginary parts of each scalar alpha defining an +* eigenvalue of GNEP. If ALPHAI(j) is zero, then the j-th +* eigenvalue is real; if positive, then the j-th and (j+1)-st +* eigenvalues are a complex conjugate pair, with +* ALPHAI(j+1) = -ALPHAI(j). +* +* BETA (output) DOUBLE PRECISION array, dimension (N) +* The scalars beta that define the eigenvalues of GNEP. +* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and +* beta = BETA(j) represent the j-th eigenvalue of the matrix +* pair (A,B), in one of the forms lambda = alpha/beta or +* mu = beta/alpha. Since either lambda or mu may overflow, +* they should not, in general, be computed. +* +* VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N) +* If JOBVSL = 'V', the matrix of left Schur vectors Q. +* Not referenced if JOBVSL = 'N'. +* +* LDVSL (input) INTEGER +* The leading dimension of the matrix VSL. LDVSL >=1, and +* if JOBVSL = 'V', LDVSL >= N. +* +* VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N) +* If JOBVSR = 'V', the matrix of right Schur vectors Z. +* Not referenced if JOBVSR = 'N'. +* +* LDVSR (input) INTEGER +* The leading dimension of the matrix VSR. LDVSR >= 1, and +* if JOBVSR = 'V', LDVSR >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,4*N). +* For good performance, LWORK must generally be larger. +* To compute the optimal value of LWORK, call ILAENV to get +* blocksizes (for DGEQRF, DORMQR, and DORGQR.) Then compute: +* NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR +* The optimal LWORK is 2*N + N*(NB+1). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* = 1,...,N: +* The QZ iteration failed. (A,B) are not in Schur +* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should +* be correct for j=INFO+1,...,N. +* > N: errors that usually indicate LAPACK problems: +* =N+1: error return from DGGBAL +* =N+2: error return from DGEQRF +* =N+3: error return from DORMQR +* =N+4: error return from DORGQR +* =N+5: error return from DGGHRD +* =N+6: error return from DHGEQZ (other than failed +* iteration) +* =N+7: error return from DGGBAK (computing VSL) +* =N+8: error return from DGGBAK (computing VSR) +* =N+9: error return from DLASCL (various places) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL ILASCL, ILBSCL, ILVSL, ILVSR, LQUERY + INTEGER ICOLS, IHI, IINFO, IJOBVL, IJOBVR, ILEFT, ILO, + $ IRIGHT, IROWS, ITAU, IWORK, LOPT, LWKMIN, + $ LWKOPT, NB, NB1, NB2, NB3 + DOUBLE PRECISION ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, + $ SAFMIN, SMLNUM +* .. +* .. External Subroutines .. + EXTERNAL DGEQRF, DGGBAK, DGGBAL, DGGHRD, DHGEQZ, DLACPY, + $ DLASCL, DLASET, DORGQR, DORMQR, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC INT, MAX +* .. +* .. Executable Statements .. +* +* Decode the input arguments +* + IF( LSAME( JOBVSL, 'N' ) ) THEN + IJOBVL = 1 + ILVSL = .FALSE. + ELSE IF( LSAME( JOBVSL, 'V' ) ) THEN + IJOBVL = 2 + ILVSL = .TRUE. + ELSE + IJOBVL = -1 + ILVSL = .FALSE. + END IF +* + IF( LSAME( JOBVSR, 'N' ) ) THEN + IJOBVR = 1 + ILVSR = .FALSE. + ELSE IF( LSAME( JOBVSR, 'V' ) ) THEN + IJOBVR = 2 + ILVSR = .TRUE. + ELSE + IJOBVR = -1 + ILVSR = .FALSE. + END IF +* +* Test the input arguments +* + LWKMIN = MAX( 4*N, 1 ) + LWKOPT = LWKMIN + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + INFO = 0 + IF( IJOBVL.LE.0 ) THEN + INFO = -1 + ELSE IF( IJOBVR.LE.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDVSL.LT.1 .OR. ( ILVSL .AND. LDVSL.LT.N ) ) THEN + INFO = -12 + ELSE IF( LDVSR.LT.1 .OR. ( ILVSR .AND. LDVSR.LT.N ) ) THEN + INFO = -14 + ELSE IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY ) THEN + INFO = -16 + END IF +* + IF( INFO.EQ.0 ) THEN + NB1 = ILAENV( 1, 'DGEQRF', ' ', N, N, -1, -1 ) + NB2 = ILAENV( 1, 'DORMQR', ' ', N, N, N, -1 ) + NB3 = ILAENV( 1, 'DORGQR', ' ', N, N, N, -1 ) + NB = MAX( NB1, NB2, NB3 ) + LOPT = 2*N + N*( NB+1 ) + WORK( 1 ) = LOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEGS ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Get machine constants +* + EPS = DLAMCH( 'E' )*DLAMCH( 'B' ) + SAFMIN = DLAMCH( 'S' ) + SMLNUM = N*SAFMIN / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, WORK ) + ILASCL = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ANRMTO = SMLNUM + ILASCL = .TRUE. + ELSE IF( ANRM.GT.BIGNUM ) THEN + ANRMTO = BIGNUM + ILASCL = .TRUE. + END IF +* + IF( ILASCL ) THEN + CALL DLASCL( 'G', -1, -1, ANRM, ANRMTO, N, N, A, LDA, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + END IF +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = DLANGE( 'M', N, N, B, LDB, WORK ) + ILBSCL = .FALSE. + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN + BNRMTO = SMLNUM + ILBSCL = .TRUE. + ELSE IF( BNRM.GT.BIGNUM ) THEN + BNRMTO = BIGNUM + ILBSCL = .TRUE. + END IF +* + IF( ILBSCL ) THEN + CALL DLASCL( 'G', -1, -1, BNRM, BNRMTO, N, N, B, LDB, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + END IF +* +* Permute the matrix to make it more nearly triangular +* Workspace layout: (2*N words -- "work..." not actually used) +* left_permutation, right_permutation, work... +* + ILEFT = 1 + IRIGHT = N + 1 + IWORK = IRIGHT + N + CALL DGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), WORK( IWORK ), IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 1 + GO TO 10 + END IF +* +* Reduce B to triangular form, and initialize VSL and/or VSR +* Workspace layout: ("work..." must have at least N words) +* left_permutation, right_permutation, tau, work... +* + IROWS = IHI + 1 - ILO + ICOLS = N + 1 - ILO + ITAU = IWORK + IWORK = ITAU + IROWS + CALL DGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ), + $ WORK( IWORK ), LWORK+1-IWORK, IINFO ) + IF( IINFO.GE.0 ) + $ LWKOPT = MAX( LWKOPT, INT( WORK( IWORK ) )+IWORK-1 ) + IF( IINFO.NE.0 ) THEN + INFO = N + 2 + GO TO 10 + END IF +* + CALL DORMQR( 'L', 'T', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB, + $ WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWORK ), + $ LWORK+1-IWORK, IINFO ) + IF( IINFO.GE.0 ) + $ LWKOPT = MAX( LWKOPT, INT( WORK( IWORK ) )+IWORK-1 ) + IF( IINFO.NE.0 ) THEN + INFO = N + 3 + GO TO 10 + END IF +* + IF( ILVSL ) THEN + CALL DLASET( 'Full', N, N, ZERO, ONE, VSL, LDVSL ) + CALL DLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB, + $ VSL( ILO+1, ILO ), LDVSL ) + CALL DORGQR( IROWS, IROWS, IROWS, VSL( ILO, ILO ), LDVSL, + $ WORK( ITAU ), WORK( IWORK ), LWORK+1-IWORK, + $ IINFO ) + IF( IINFO.GE.0 ) + $ LWKOPT = MAX( LWKOPT, INT( WORK( IWORK ) )+IWORK-1 ) + IF( IINFO.NE.0 ) THEN + INFO = N + 4 + GO TO 10 + END IF + END IF +* + IF( ILVSR ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, VSR, LDVSR ) +* +* Reduce to generalized Hessenberg form +* + CALL DGGHRD( JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, VSL, + $ LDVSL, VSR, LDVSR, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 5 + GO TO 10 + END IF +* +* Perform QZ algorithm, computing Schur vectors if desired +* Workspace layout: ("work..." must have at least 1 word) +* left_permutation, right_permutation, work... +* + IWORK = ITAU + CALL DHGEQZ( 'S', JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, + $ ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, + $ WORK( IWORK ), LWORK+1-IWORK, IINFO ) + IF( IINFO.GE.0 ) + $ LWKOPT = MAX( LWKOPT, INT( WORK( IWORK ) )+IWORK-1 ) + IF( IINFO.NE.0 ) THEN + IF( IINFO.GT.0 .AND. IINFO.LE.N ) THEN + INFO = IINFO + ELSE IF( IINFO.GT.N .AND. IINFO.LE.2*N ) THEN + INFO = IINFO - N + ELSE + INFO = N + 6 + END IF + GO TO 10 + END IF +* +* Apply permutation to VSL and VSR +* + IF( ILVSL ) THEN + CALL DGGBAK( 'P', 'L', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VSL, LDVSL, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 7 + GO TO 10 + END IF + END IF + IF( ILVSR ) THEN + CALL DGGBAK( 'P', 'R', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VSR, LDVSR, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 8 + GO TO 10 + END IF + END IF +* +* Undo scaling +* + IF( ILASCL ) THEN + CALL DLASCL( 'H', -1, -1, ANRMTO, ANRM, N, N, A, LDA, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + CALL DLASCL( 'G', -1, -1, ANRMTO, ANRM, N, 1, ALPHAR, N, + $ IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + CALL DLASCL( 'G', -1, -1, ANRMTO, ANRM, N, 1, ALPHAI, N, + $ IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + END IF +* + IF( ILBSCL ) THEN + CALL DLASCL( 'U', -1, -1, BNRMTO, BNRM, N, N, B, LDB, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + CALL DLASCL( 'G', -1, -1, BNRMTO, BNRM, N, 1, BETA, N, IINFO ) + IF( IINFO.NE.0 ) THEN + INFO = N + 9 + RETURN + END IF + END IF +* + 10 CONTINUE + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DGEGS +* + END diff --git a/2.3-1/src/fortran/lapack/dgehd2.f b/2.3-1/src/fortran/lapack/dgehd2.f new file mode 100644 index 00000000..28d1cc8d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgehd2.f @@ -0,0 +1,149 @@ + SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEHD2 reduces a real general matrix A to upper Hessenberg form H by +* an orthogonal similarity transformation: Q' * A * Q = H . +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that A is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally +* set by a previous call to DGEBAL; otherwise they should be +* set to 1 and N respectively. See Further Details. +* 1 <= ILO <= IHI <= max(1,N). +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the n by n general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* elements below the first subdiagonal, with the array TAU, +* represent the orthogonal matrix Q as a product of elementary +* reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of (ihi-ilo) elementary +* reflectors +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on +* exit in A(i+2:ihi,i), and tau in TAU(i). +* +* The contents of A are illustrated by the following example, with +* n = 7, ilo = 2 and ihi = 6: +* +* on entry, on exit, +* +* ( a a a a a a a ) ( a a h h h h a ) +* ( a a a a a a ) ( a h h h h a ) +* ( a a a a a a ) ( h h h h h h ) +* ( a a a a a a ) ( v2 h h h h h ) +* ( a a a a a a ) ( v2 v3 h h h h ) +* ( a a a a a a ) ( v2 v3 v4 h h h ) +* ( a ) ( a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I + DOUBLE PRECISION AII +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEHD2', -INFO ) + RETURN + END IF +* + DO 10 I = ILO, IHI - 1 +* +* Compute elementary reflector H(i) to annihilate A(i+2:ihi,i) +* + CALL DLARFG( IHI-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, + $ TAU( I ) ) + AII = A( I+1, I ) + A( I+1, I ) = ONE +* +* Apply H(i) to A(1:ihi,i+1:ihi) from the right +* + CALL DLARF( 'Right', IHI, IHI-I, A( I+1, I ), 1, TAU( I ), + $ A( 1, I+1 ), LDA, WORK ) +* +* Apply H(i) to A(i+1:ihi,i+1:n) from the left +* + CALL DLARF( 'Left', IHI-I, N-I, A( I+1, I ), 1, TAU( I ), + $ A( I+1, I+1 ), LDA, WORK ) +* + A( I+1, I ) = AII + 10 CONTINUE +* + RETURN +* +* End of DGEHD2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgehrd.f b/2.3-1/src/fortran/lapack/dgehrd.f new file mode 100644 index 00000000..339ee400 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgehrd.f @@ -0,0 +1,273 @@ + SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEHRD reduces a real general matrix A to upper Hessenberg form H by +* an orthogonal similarity transformation: Q' * A * Q = H . +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that A is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally +* set by a previous call to DGEBAL; otherwise they should be +* set to 1 and N respectively. See Further Details. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the N-by-N general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* elements below the first subdiagonal, with the array TAU, +* represent the orthogonal matrix Q as a product of elementary +* reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to +* zero. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of (ihi-ilo) elementary +* reflectors +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on +* exit in A(i+2:ihi,i), and tau in TAU(i). +* +* The contents of A are illustrated by the following example, with +* n = 7, ilo = 2 and ihi = 6: +* +* on entry, on exit, +* +* ( a a a a a a a ) ( a a h h h h a ) +* ( a a a a a a ) ( a h h h h a ) +* ( a a a a a a ) ( h h h h h h ) +* ( a a a a a a ) ( v2 h h h h h ) +* ( a a a a a a ) ( v2 v3 h h h h ) +* ( a a a a a a ) ( v2 v3 v4 h h h ) +* ( a ) ( a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* This file is a slight modification of LAPACK-3.0's DGEHRD +* subroutine incorporating improvements proposed by Quintana-Orti and +* Van de Geijn (2005). +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, + $ ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, LDWORK, LWKOPT, NB, + $ NBMIN, NH, NX + DOUBLE PRECISION EI +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DGEHD2, DGEMM, DLAHR2, DLARFB, DTRMM, + $ XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEHRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Set elements 1:ILO-1 and IHI:N-1 of TAU to zero +* + DO 10 I = 1, ILO - 1 + TAU( I ) = ZERO + 10 CONTINUE + DO 20 I = MAX( 1, IHI ), N - 1 + TAU( I ) = ZERO + 20 CONTINUE +* +* Quick return if possible +* + NH = IHI - ILO + 1 + IF( NH.LE.1 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* +* Determine the block size +* + NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) + NBMIN = 2 + IWS = 1 + IF( NB.GT.1 .AND. NB.LT.NH ) THEN +* +* Determine when to cross over from blocked to unblocked code +* (last block is always handled by unblocked code) +* + NX = MAX( NB, ILAENV( 3, 'DGEHRD', ' ', N, ILO, IHI, -1 ) ) + IF( NX.LT.NH ) THEN +* +* Determine if workspace is large enough for blocked code +* + IWS = N*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: determine the +* minimum value of NB, and reduce NB or force use of +* unblocked code +* + NBMIN = MAX( 2, ILAENV( 2, 'DGEHRD', ' ', N, ILO, IHI, + $ -1 ) ) + IF( LWORK.GE.N*NBMIN ) THEN + NB = LWORK / N + ELSE + NB = 1 + END IF + END IF + END IF + END IF + LDWORK = N +* + IF( NB.LT.NBMIN .OR. NB.GE.NH ) THEN +* +* Use unblocked code below +* + I = ILO +* + ELSE +* +* Use blocked code +* + DO 40 I = ILO, IHI - 1 - NX, NB + IB = MIN( NB, IHI-I ) +* +* Reduce columns i:i+ib-1 to Hessenberg form, returning the +* matrices V and T of the block reflector H = I - V*T*V' +* which performs the reduction, and also the matrix Y = A*V*T +* + CALL DLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ), T, LDT, + $ WORK, LDWORK ) +* +* Apply the block reflector H to A(1:ihi,i+ib:ihi) from the +* right, computing A := A - Y * V'. V(i+ib,ib-1) must be set +* to 1 +* + EI = A( I+IB, I+IB-1 ) + A( I+IB, I+IB-1 ) = ONE + CALL DGEMM( 'No transpose', 'Transpose', + $ IHI, IHI-I-IB+1, + $ IB, -ONE, WORK, LDWORK, A( I+IB, I ), LDA, ONE, + $ A( 1, I+IB ), LDA ) + A( I+IB, I+IB-1 ) = EI +* +* Apply the block reflector H to A(1:i,i+1:i+ib-1) from the +* right +* + CALL DTRMM( 'Right', 'Lower', 'Transpose', + $ 'Unit', I, IB-1, + $ ONE, A( I+1, I ), LDA, WORK, LDWORK ) + DO 30 J = 0, IB-2 + CALL DAXPY( I, -ONE, WORK( LDWORK*J+1 ), 1, + $ A( 1, I+J+1 ), 1 ) + 30 CONTINUE +* +* Apply the block reflector H to A(i+1:ihi,i+ib:n) from the +* left +* + CALL DLARFB( 'Left', 'Transpose', 'Forward', + $ 'Columnwise', + $ IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA, T, LDT, + $ A( I+1, I+IB ), LDA, WORK, LDWORK ) + 40 CONTINUE + END IF +* +* Use unblocked code to reduce the rest of the matrix +* + CALL DGEHD2( N, I, IHI, A, LDA, TAU, WORK, IINFO ) + WORK( 1 ) = IWS +* + RETURN +* +* End of DGEHRD +* + END diff --git a/2.3-1/src/fortran/lapack/dgelq2.f b/2.3-1/src/fortran/lapack/dgelq2.f new file mode 100644 index 00000000..f3540505 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgelq2.f @@ -0,0 +1,121 @@ + SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGELQ2 computes an LQ factorization of a real m by n matrix A: +* A = L * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, the elements on and below the diagonal of the array +* contain the m by min(m,n) lower trapezoidal matrix L (L is +* lower triangular if m <= n); the elements above the diagonal, +* with the array TAU, represent the orthogonal matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k) . . . H(2) H(1), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, K + DOUBLE PRECISION AII +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELQ2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = 1, K +* +* Generate elementary reflector H(i) to annihilate A(i,i+1:n) +* + CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, + $ TAU( I ) ) + IF( I.LT.M ) THEN +* +* Apply H(i) to A(i+1:m,i:n) from the right +* + AII = A( I, I ) + A( I, I ) = ONE + CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAU( I ), + $ A( I+1, I ), LDA, WORK ) + A( I, I ) = AII + END IF + 10 CONTINUE + RETURN +* +* End of DGELQ2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgelqf.f b/2.3-1/src/fortran/lapack/dgelqf.f new file mode 100644 index 00000000..063a38ba --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgelqf.f @@ -0,0 +1,195 @@ + SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGELQF computes an LQ factorization of a real M-by-N matrix A: +* A = L * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the elements on and below the diagonal of the array +* contain the m-by-min(m,n) lower trapezoidal matrix L (L is +* lower triangular if m <= n); the elements above the diagonal, +* with the array TAU, represent the orthogonal matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k) . . . H(2) H(1), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:n) is stored on exit in A(i,i+1:n), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DGELQ2, DLARFB, DLARFT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + LWKOPT = M*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELQF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DGELQF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGELQF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially +* + DO 10 I = 1, K - NX, NB + IB = MIN( K-I+1, NB ) +* +* Compute the LQ factorization of the current block +* A(i:i+ib-1,i:n) +* + CALL DGELQ2( IB, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) + IF( I+IB.LE.M ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(i+ib:m,i:n) from the right +* + CALL DLARFB( 'Right', 'No transpose', 'Forward', + $ 'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ), + $ LDA, WORK, LDWORK, A( I+IB, I ), LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + ELSE + I = 1 + END IF +* +* Use unblocked code to factor the last or only block. +* + IF( I.LE.K ) + $ CALL DGELQ2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of DGELQF +* + END diff --git a/2.3-1/src/fortran/lapack/dgels.f b/2.3-1/src/fortran/lapack/dgels.f new file mode 100644 index 00000000..4fa1e229 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgels.f @@ -0,0 +1,422 @@ + SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK, + $ INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGELS solves overdetermined or underdetermined real linear systems +* involving an M-by-N matrix A, or its transpose, using a QR or LQ +* factorization of A. It is assumed that A has full rank. +* +* The following options are provided: +* +* 1. If TRANS = 'N' and m >= n: find the least squares solution of +* an overdetermined system, i.e., solve the least squares problem +* minimize || B - A*X ||. +* +* 2. If TRANS = 'N' and m < n: find the minimum norm solution of +* an underdetermined system A * X = B. +* +* 3. If TRANS = 'T' and m >= n: find the minimum norm solution of +* an undetermined system A**T * X = B. +* +* 4. If TRANS = 'T' and m < n: find the least squares solution of +* an overdetermined system, i.e., solve the least squares problem +* minimize || B - A**T * X ||. +* +* Several right hand side vectors b and solution vectors x can be +* handled in a single call; they are stored as the columns of the +* M-by-NRHS right hand side matrix B and the N-by-NRHS solution +* matrix X. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* = 'N': the linear system involves A; +* = 'T': the linear system involves A**T. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of +* columns of the matrices B and X. NRHS >=0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, +* if M >= N, A is overwritten by details of its QR +* factorization as returned by DGEQRF; +* if M < N, A is overwritten by details of its LQ +* factorization as returned by DGELQF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the matrix B of right hand side vectors, stored +* columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS +* if TRANS = 'T'. +* On exit, if INFO = 0, B is overwritten by the solution +* vectors, stored columnwise: +* if TRANS = 'N' and m >= n, rows 1 to n of B contain the least +* squares solution vectors; the residual sum of squares for the +* solution in each column is given by the sum of squares of +* elements N+1 to M in that column; +* if TRANS = 'N' and m < n, rows 1 to N of B contain the +* minimum norm solution vectors; +* if TRANS = 'T' and m >= n, rows 1 to M of B contain the +* minimum norm solution vectors; +* if TRANS = 'T' and m < n, rows 1 to M of B contain the +* least squares solution vectors; the residual sum of squares +* for the solution in each column is given by the sum of +* squares of elements M+1 to N in that column. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= MAX(1,M,N). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* LWORK >= max( 1, MN + max( MN, NRHS ) ). +* For optimal performance, +* LWORK >= max( 1, MN + max( MN, NRHS )*NB ). +* where MN = min(M,N) and NB is the optimum block size. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the i-th diagonal element of the +* triangular factor of A is zero, so that A does not have +* full rank; the least squares solution could not be +* computed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, TPSD + INTEGER BROW, I, IASCL, IBSCL, J, MN, NB, SCLLEN, WSIZE + DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMLNUM +* .. +* .. Local Arrays .. + DOUBLE PRECISION RWORK( 1 ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLABAD, DLAMCH, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DGELQF, DGEQRF, DLASCL, DLASET, DORMLQ, DORMQR, + $ DTRTRS, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments. +* + INFO = 0 + MN = MIN( M, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.( LSAME( TRANS, 'N' ) .OR. LSAME( TRANS, 'T' ) ) ) THEN + INFO = -1 + ELSE IF( M.LT.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LDB.LT.MAX( 1, M, N ) ) THEN + INFO = -8 + ELSE IF( LWORK.LT.MAX( 1, MN+MAX( MN, NRHS ) ) .AND. .NOT.LQUERY ) + $ THEN + INFO = -10 + END IF +* +* Figure out optimal block size +* + IF( INFO.EQ.0 .OR. INFO.EQ.-10 ) THEN +* + TPSD = .TRUE. + IF( LSAME( TRANS, 'N' ) ) + $ TPSD = .FALSE. +* + IF( M.GE.N ) THEN + NB = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + IF( TPSD ) THEN + NB = MAX( NB, ILAENV( 1, 'DORMQR', 'LN', M, NRHS, N, + $ -1 ) ) + ELSE + NB = MAX( NB, ILAENV( 1, 'DORMQR', 'LT', M, NRHS, N, + $ -1 ) ) + END IF + ELSE + NB = ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + IF( TPSD ) THEN + NB = MAX( NB, ILAENV( 1, 'DORMLQ', 'LT', N, NRHS, M, + $ -1 ) ) + ELSE + NB = MAX( NB, ILAENV( 1, 'DORMLQ', 'LN', N, NRHS, M, + $ -1 ) ) + END IF + END IF +* + WSIZE = MAX( 1, MN+MAX( MN, NRHS )*NB ) + WORK( 1 ) = DBLE( WSIZE ) +* + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELS ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( MIN( M, N, NRHS ).EQ.0 ) THEN + CALL DLASET( 'Full', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + RETURN + END IF +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) / DLAMCH( 'P' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Scale A, B if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', M, N, A, LDA, RWORK ) + IASCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) + IASCL = 1 + ELSE IF( ANRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) + IASCL = 2 + ELSE IF( ANRM.EQ.ZERO ) THEN +* +* Matrix all zero. Return zero solution. +* + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + GO TO 50 + END IF +* + BROW = M + IF( TPSD ) + $ BROW = N + BNRM = DLANGE( 'M', BROW, NRHS, B, LDB, RWORK ) + IBSCL = 0 + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, SMLNUM, BROW, NRHS, B, LDB, + $ INFO ) + IBSCL = 1 + ELSE IF( BNRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, BIGNUM, BROW, NRHS, B, LDB, + $ INFO ) + IBSCL = 2 + END IF +* + IF( M.GE.N ) THEN +* +* compute QR factorization of A +* + CALL DGEQRF( M, N, A, LDA, WORK( 1 ), WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least N, optimally N*NB +* + IF( .NOT.TPSD ) THEN +* +* Least-Squares Problem min || A * X - B || +* +* B(1:M,1:NRHS) := Q' * B(1:M,1:NRHS) +* + CALL DORMQR( 'Left', 'Transpose', M, NRHS, N, A, LDA, + $ WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least NRHS, optimally NRHS*NB +* +* B(1:N,1:NRHS) := inv(R) * B(1:N,1:NRHS) +* + CALL DTRTRS( 'Upper', 'No transpose', 'Non-unit', N, NRHS, + $ A, LDA, B, LDB, INFO ) +* + IF( INFO.GT.0 ) THEN + RETURN + END IF +* + SCLLEN = N +* + ELSE +* +* Overdetermined system of equations A' * X = B +* +* B(1:N,1:NRHS) := inv(R') * B(1:N,1:NRHS) +* + CALL DTRTRS( 'Upper', 'Transpose', 'Non-unit', N, NRHS, + $ A, LDA, B, LDB, INFO ) +* + IF( INFO.GT.0 ) THEN + RETURN + END IF +* +* B(N+1:M,1:NRHS) = ZERO +* + DO 20 J = 1, NRHS + DO 10 I = N + 1, M + B( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE +* +* B(1:M,1:NRHS) := Q(1:N,:) * B(1:N,1:NRHS) +* + CALL DORMQR( 'Left', 'No transpose', M, NRHS, N, A, LDA, + $ WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least NRHS, optimally NRHS*NB +* + SCLLEN = M +* + END IF +* + ELSE +* +* Compute LQ factorization of A +* + CALL DGELQF( M, N, A, LDA, WORK( 1 ), WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least M, optimally M*NB. +* + IF( .NOT.TPSD ) THEN +* +* underdetermined system of equations A * X = B +* +* B(1:M,1:NRHS) := inv(L) * B(1:M,1:NRHS) +* + CALL DTRTRS( 'Lower', 'No transpose', 'Non-unit', M, NRHS, + $ A, LDA, B, LDB, INFO ) +* + IF( INFO.GT.0 ) THEN + RETURN + END IF +* +* B(M+1:N,1:NRHS) = 0 +* + DO 40 J = 1, NRHS + DO 30 I = M + 1, N + B( I, J ) = ZERO + 30 CONTINUE + 40 CONTINUE +* +* B(1:N,1:NRHS) := Q(1:N,:)' * B(1:M,1:NRHS) +* + CALL DORMLQ( 'Left', 'Transpose', N, NRHS, M, A, LDA, + $ WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least NRHS, optimally NRHS*NB +* + SCLLEN = N +* + ELSE +* +* overdetermined system min || A' * X - B || +* +* B(1:N,1:NRHS) := Q * B(1:N,1:NRHS) +* + CALL DORMLQ( 'Left', 'No transpose', N, NRHS, M, A, LDA, + $ WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN, + $ INFO ) +* +* workspace at least NRHS, optimally NRHS*NB +* +* B(1:M,1:NRHS) := inv(L') * B(1:M,1:NRHS) +* + CALL DTRTRS( 'Lower', 'Transpose', 'Non-unit', M, NRHS, + $ A, LDA, B, LDB, INFO ) +* + IF( INFO.GT.0 ) THEN + RETURN + END IF +* + SCLLEN = M +* + END IF +* + END IF +* +* Undo scaling +* + IF( IASCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, SCLLEN, NRHS, B, LDB, + $ INFO ) + ELSE IF( IASCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, SCLLEN, NRHS, B, LDB, + $ INFO ) + END IF + IF( IBSCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SMLNUM, BNRM, SCLLEN, NRHS, B, LDB, + $ INFO ) + ELSE IF( IBSCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, BIGNUM, BNRM, SCLLEN, NRHS, B, LDB, + $ INFO ) + END IF +* + 50 CONTINUE + WORK( 1 ) = DBLE( WSIZE ) +* + RETURN +* +* End of DGELS +* + END diff --git a/2.3-1/src/fortran/lapack/dgelss.f b/2.3-1/src/fortran/lapack/dgelss.f new file mode 100644 index 00000000..f024e138 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgelss.f @@ -0,0 +1,617 @@ + SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, + $ WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), S( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGELSS computes the minimum norm solution to a real linear least +* squares problem: +* +* Minimize 2-norm(| b - A*x |). +* +* using the singular value decomposition (SVD) of A. A is an M-by-N +* matrix which may be rank-deficient. +* +* Several right hand side vectors b and solution vectors x can be +* handled in a single call; they are stored as the columns of the +* M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix +* X. +* +* The effective rank of A is determined by treating as zero those +* singular values which are less than RCOND times the largest singular +* value. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrices B and X. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the first min(m,n) rows of A are overwritten with +* its right singular vectors, stored rowwise. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the M-by-NRHS right hand side matrix B. +* On exit, B is overwritten by the N-by-NRHS solution +* matrix X. If m >= n and RANK = n, the residual +* sum-of-squares for the solution in the i-th column is given +* by the sum of squares of elements n+1:m in that column. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,max(M,N)). +* +* S (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The singular values of A in decreasing order. +* The condition number of A in the 2-norm = S(1)/S(min(m,n)). +* +* RCOND (input) DOUBLE PRECISION +* RCOND is used to determine the effective rank of A. +* Singular values S(i) <= RCOND*S(1) are treated as zero. +* If RCOND < 0, machine precision is used instead. +* +* RANK (output) INTEGER +* The effective rank of A, i.e., the number of singular values +* which are greater than RCOND*S(1). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 1, and also: +* LWORK >= 3*min(M,N) + max( 2*min(M,N), max(M,N), NRHS ) +* For good performance, LWORK should generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: the algorithm for computing the SVD failed to converge; +* if INFO = i, i off-diagonal elements of an intermediate +* bidiagonal form did not converge to zero. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER BDSPAC, BL, CHUNK, I, IASCL, IBSCL, IE, IL, + $ ITAU, ITAUP, ITAUQ, IWORK, LDWORK, MAXMN, + $ MAXWRK, MINMN, MINWRK, MM, MNTHR + DOUBLE PRECISION ANRM, BIGNUM, BNRM, EPS, SFMIN, SMLNUM, THR +* .. +* .. Local Arrays .. + DOUBLE PRECISION VDUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DBDSQR, DCOPY, DGEBRD, DGELQF, DGEMM, DGEMV, + $ DGEQRF, DLABAD, DLACPY, DLASCL, DLASET, DORGBR, + $ DORMBR, DORMLQ, DORMQR, DRSCL, XERBLA +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + MINMN = MIN( M, N ) + MAXMN = MAX( M, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, MAXMN ) ) THEN + INFO = -7 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV.) +* + IF( INFO.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + IF( MINMN.GT.0 ) THEN + MM = M + MNTHR = ILAENV( 6, 'DGELSS', ' ', M, N, NRHS, -1 ) + IF( M.GE.N .AND. M.GE.MNTHR ) THEN +* +* Path 1a - overdetermined, with many more rows than +* columns +* + MM = N + MAXWRK = MAX( MAXWRK, N + N*ILAENV( 1, 'DGEQRF', ' ', M, + $ N, -1, -1 ) ) + MAXWRK = MAX( MAXWRK, N + NRHS*ILAENV( 1, 'DORMQR', 'LT', + $ M, NRHS, N, -1 ) ) + END IF + IF( M.GE.N ) THEN +* +* Path 1 - overdetermined or exactly determined +* +* Compute workspace needed for DBDSQR +* + BDSPAC = MAX( 1, 5*N ) + MAXWRK = MAX( MAXWRK, 3*N + ( MM + N )*ILAENV( 1, + $ 'DGEBRD', ' ', MM, N, -1, -1 ) ) + MAXWRK = MAX( MAXWRK, 3*N + NRHS*ILAENV( 1, 'DORMBR', + $ 'QLT', MM, NRHS, N, -1 ) ) + MAXWRK = MAX( MAXWRK, 3*N + ( N - 1 )*ILAENV( 1, + $ 'DORGBR', 'P', N, N, N, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MAXWRK = MAX( MAXWRK, N*NRHS ) + MINWRK = MAX( 3*N + MM, 3*N + NRHS, BDSPAC ) + MAXWRK = MAX( MINWRK, MAXWRK ) + END IF + IF( N.GT.M ) THEN +* +* Compute workspace needed for DBDSQR +* + BDSPAC = MAX( 1, 5*M ) + MINWRK = MAX( 3*M+NRHS, 3*M+N, BDSPAC ) + IF( N.GE.MNTHR ) THEN +* +* Path 2a - underdetermined, with many more columns +* than rows +* + MAXWRK = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, + $ -1 ) + MAXWRK = MAX( MAXWRK, M*M + 4*M + 2*M*ILAENV( 1, + $ 'DGEBRD', ' ', M, M, -1, -1 ) ) + MAXWRK = MAX( MAXWRK, M*M + 4*M + NRHS*ILAENV( 1, + $ 'DORMBR', 'QLT', M, NRHS, M, -1 ) ) + MAXWRK = MAX( MAXWRK, M*M + 4*M + + $ ( M - 1 )*ILAENV( 1, 'DORGBR', 'P', M, + $ M, M, -1 ) ) + MAXWRK = MAX( MAXWRK, M*M + M + BDSPAC ) + IF( NRHS.GT.1 ) THEN + MAXWRK = MAX( MAXWRK, M*M + M + M*NRHS ) + ELSE + MAXWRK = MAX( MAXWRK, M*M + 2*M ) + END IF + MAXWRK = MAX( MAXWRK, M + NRHS*ILAENV( 1, 'DORMLQ', + $ 'LT', N, NRHS, M, -1 ) ) + ELSE +* +* Path 2 - underdetermined +* + MAXWRK = 3*M + ( N + M )*ILAENV( 1, 'DGEBRD', ' ', M, + $ N, -1, -1 ) + MAXWRK = MAX( MAXWRK, 3*M + NRHS*ILAENV( 1, 'DORMBR', + $ 'QLT', M, NRHS, M, -1 ) ) + MAXWRK = MAX( MAXWRK, 3*M + M*ILAENV( 1, 'DORGBR', + $ 'P', M, N, M, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MAXWRK = MAX( MAXWRK, N*NRHS ) + END IF + END IF + MAXWRK = MAX( MINWRK, MAXWRK ) + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) + $ INFO = -12 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELSS', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RANK = 0 + RETURN + END IF +* +* Get machine parameters +* + EPS = DLAMCH( 'P' ) + SFMIN = DLAMCH( 'S' ) + SMLNUM = SFMIN / EPS + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', M, N, A, LDA, WORK ) + IASCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) + IASCL = 1 + ELSE IF( ANRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) + IASCL = 2 + ELSE IF( ANRM.EQ.ZERO ) THEN +* +* Matrix all zero. Return zero solution. +* + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + CALL DLASET( 'F', MINMN, 1, ZERO, ZERO, S, 1 ) + RANK = 0 + GO TO 70 + END IF +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = DLANGE( 'M', M, NRHS, B, LDB, WORK ) + IBSCL = 0 + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 1 + ELSE IF( BNRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 2 + END IF +* +* Overdetermined case +* + IF( M.GE.N ) THEN +* +* Path 1 - overdetermined or exactly determined +* + MM = M + IF( M.GE.MNTHR ) THEN +* +* Path 1a - overdetermined, with many more rows than columns +* + MM = N + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, INFO ) +* +* Multiply B by transpose(Q) +* (Workspace: need N+NRHS, prefer N+NRHS*NB) +* + CALL DORMQR( 'L', 'T', M, NRHS, N, A, LDA, WORK( ITAU ), B, + $ LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) +* +* Zero out below R +* + IF( N.GT.1 ) + $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), LDA ) + END IF +* + IE = 1 + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in A +* (Workspace: need 3*N+MM, prefer 3*N+(MM+N)*NB) +* + CALL DGEBRD( MM, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ INFO ) +* +* Multiply B by transpose of left bidiagonalizing vectors of R +* (Workspace: need 3*N+NRHS, prefer 3*N+NRHS*NB) +* + CALL DORMBR( 'Q', 'L', 'T', MM, NRHS, N, A, LDA, WORK( ITAUQ ), + $ B, LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) +* +* Generate right bidiagonalizing vectors of R in A +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, INFO ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration +* multiply B by transpose of left singular vectors +* compute right singular vectors in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, 0, NRHS, S, WORK( IE ), A, LDA, VDUM, + $ 1, B, LDB, WORK( IWORK ), INFO ) + IF( INFO.NE.0 ) + $ GO TO 70 +* +* Multiply B by reciprocals of singular values +* + THR = MAX( RCOND*S( 1 ), SFMIN ) + IF( RCOND.LT.ZERO ) + $ THR = MAX( EPS*S( 1 ), SFMIN ) + RANK = 0 + DO 10 I = 1, N + IF( S( I ).GT.THR ) THEN + CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) + RANK = RANK + 1 + ELSE + CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) + END IF + 10 CONTINUE +* +* Multiply B by right singular vectors +* (Workspace: need N, prefer N*NRHS) +* + IF( LWORK.GE.LDB*NRHS .AND. NRHS.GT.1 ) THEN + CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, A, LDA, B, LDB, ZERO, + $ WORK, LDB ) + CALL DLACPY( 'G', N, NRHS, WORK, LDB, B, LDB ) + ELSE IF( NRHS.GT.1 ) THEN + CHUNK = LWORK / N + DO 20 I = 1, NRHS, CHUNK + BL = MIN( NRHS-I+1, CHUNK ) + CALL DGEMM( 'T', 'N', N, BL, N, ONE, A, LDA, B( 1, I ), + $ LDB, ZERO, WORK, N ) + CALL DLACPY( 'G', N, BL, WORK, N, B( 1, I ), LDB ) + 20 CONTINUE + ELSE + CALL DGEMV( 'T', N, N, ONE, A, LDA, B, 1, ZERO, WORK, 1 ) + CALL DCOPY( N, WORK, 1, B, 1 ) + END IF +* + ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+ + $ MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN +* +* Path 2a - underdetermined, with many more columns than rows +* and sufficient workspace for an efficient algorithm +* + LDWORK = M + IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ), + $ M*LDA+M+M*NRHS ) )LDWORK = LDA + ITAU = 1 + IWORK = M + 1 +* +* Compute A=L*Q +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, INFO ) + IL = IWORK +* +* Copy L to WORK(IL), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWORK ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, WORK( IL+LDWORK ), + $ LDWORK ) + IE = IL + LDWORK*M + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IL) +* (Workspace: need M*M+5*M, prefer M*M+4*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IL ), LDWORK, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, INFO ) +* +* Multiply B by transpose of left bidiagonalizing vectors of L +* (Workspace: need M*M+4*M+NRHS, prefer M*M+4*M+NRHS*NB) +* + CALL DORMBR( 'Q', 'L', 'T', M, NRHS, M, WORK( IL ), LDWORK, + $ WORK( ITAUQ ), B, LDB, WORK( IWORK ), + $ LWORK-IWORK+1, INFO ) +* +* Generate right bidiagonalizing vectors of R in WORK(IL) +* (Workspace: need M*M+5*M-1, prefer M*M+4*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IL ), LDWORK, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, INFO ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, +* computing right singular vectors of L in WORK(IL) and +* multiplying B by transpose of left singular vectors +* (Workspace: need M*M+M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, 0, NRHS, S, WORK( IE ), WORK( IL ), + $ LDWORK, A, LDA, B, LDB, WORK( IWORK ), INFO ) + IF( INFO.NE.0 ) + $ GO TO 70 +* +* Multiply B by reciprocals of singular values +* + THR = MAX( RCOND*S( 1 ), SFMIN ) + IF( RCOND.LT.ZERO ) + $ THR = MAX( EPS*S( 1 ), SFMIN ) + RANK = 0 + DO 30 I = 1, M + IF( S( I ).GT.THR ) THEN + CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) + RANK = RANK + 1 + ELSE + CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) + END IF + 30 CONTINUE + IWORK = IE +* +* Multiply B by right singular vectors of L in WORK(IL) +* (Workspace: need M*M+2*M, prefer M*M+M+M*NRHS) +* + IF( LWORK.GE.LDB*NRHS+IWORK-1 .AND. NRHS.GT.1 ) THEN + CALL DGEMM( 'T', 'N', M, NRHS, M, ONE, WORK( IL ), LDWORK, + $ B, LDB, ZERO, WORK( IWORK ), LDB ) + CALL DLACPY( 'G', M, NRHS, WORK( IWORK ), LDB, B, LDB ) + ELSE IF( NRHS.GT.1 ) THEN + CHUNK = ( LWORK-IWORK+1 ) / M + DO 40 I = 1, NRHS, CHUNK + BL = MIN( NRHS-I+1, CHUNK ) + CALL DGEMM( 'T', 'N', M, BL, M, ONE, WORK( IL ), LDWORK, + $ B( 1, I ), LDB, ZERO, WORK( IWORK ), M ) + CALL DLACPY( 'G', M, BL, WORK( IWORK ), M, B( 1, I ), + $ LDB ) + 40 CONTINUE + ELSE + CALL DGEMV( 'T', M, M, ONE, WORK( IL ), LDWORK, B( 1, 1 ), + $ 1, ZERO, WORK( IWORK ), 1 ) + CALL DCOPY( M, WORK( IWORK ), 1, B( 1, 1 ), 1 ) + END IF +* +* Zero out below first M rows of B +* + CALL DLASET( 'F', N-M, NRHS, ZERO, ZERO, B( M+1, 1 ), LDB ) + IWORK = ITAU + M +* +* Multiply transpose(Q) by B +* (Workspace: need M+NRHS, prefer M+NRHS*NB) +* + CALL DORMLQ( 'L', 'T', N, NRHS, M, A, LDA, WORK( ITAU ), B, + $ LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) +* + ELSE +* +* Path 2 - remaining underdetermined cases +* + IE = 1 + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize A +* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) +* + CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ INFO ) +* +* Multiply B by transpose of left bidiagonalizing vectors +* (Workspace: need 3*M+NRHS, prefer 3*M+NRHS*NB) +* + CALL DORMBR( 'Q', 'L', 'T', M, NRHS, N, A, LDA, WORK( ITAUQ ), + $ B, LDB, WORK( IWORK ), LWORK-IWORK+1, INFO ) +* +* Generate right bidiagonalizing vectors in A +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, INFO ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, +* computing right singular vectors of A in A and +* multiplying B by transpose of left singular vectors +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'L', M, N, 0, NRHS, S, WORK( IE ), A, LDA, VDUM, + $ 1, B, LDB, WORK( IWORK ), INFO ) + IF( INFO.NE.0 ) + $ GO TO 70 +* +* Multiply B by reciprocals of singular values +* + THR = MAX( RCOND*S( 1 ), SFMIN ) + IF( RCOND.LT.ZERO ) + $ THR = MAX( EPS*S( 1 ), SFMIN ) + RANK = 0 + DO 50 I = 1, M + IF( S( I ).GT.THR ) THEN + CALL DRSCL( NRHS, S( I ), B( I, 1 ), LDB ) + RANK = RANK + 1 + ELSE + CALL DLASET( 'F', 1, NRHS, ZERO, ZERO, B( I, 1 ), LDB ) + END IF + 50 CONTINUE +* +* Multiply B by right singular vectors of A +* (Workspace: need N, prefer N*NRHS) +* + IF( LWORK.GE.LDB*NRHS .AND. NRHS.GT.1 ) THEN + CALL DGEMM( 'T', 'N', N, NRHS, M, ONE, A, LDA, B, LDB, ZERO, + $ WORK, LDB ) + CALL DLACPY( 'F', N, NRHS, WORK, LDB, B, LDB ) + ELSE IF( NRHS.GT.1 ) THEN + CHUNK = LWORK / N + DO 60 I = 1, NRHS, CHUNK + BL = MIN( NRHS-I+1, CHUNK ) + CALL DGEMM( 'T', 'N', N, BL, M, ONE, A, LDA, B( 1, I ), + $ LDB, ZERO, WORK, N ) + CALL DLACPY( 'F', N, BL, WORK, N, B( 1, I ), LDB ) + 60 CONTINUE + ELSE + CALL DGEMV( 'T', M, N, ONE, A, LDA, B, 1, ZERO, WORK, 1 ) + CALL DCOPY( N, WORK, 1, B, 1 ) + END IF + END IF +* +* Undo scaling +* + IF( IASCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN, + $ INFO ) + ELSE IF( IASCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN, + $ INFO ) + END IF + IF( IBSCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO ) + ELSE IF( IBSCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO ) + END IF +* + 70 CONTINUE + WORK( 1 ) = MAXWRK + RETURN +* +* End of DGELSS +* + END diff --git a/2.3-1/src/fortran/lapack/dgelsx.f b/2.3-1/src/fortran/lapack/dgelsx.f new file mode 100644 index 00000000..a597cd47 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgelsx.f @@ -0,0 +1,349 @@ + SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, + $ WORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LDB, M, N, NRHS, RANK + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine DGELSY. +* +* DGELSX computes the minimum-norm solution to a real linear least +* squares problem: +* minimize || A * X - B || +* using a complete orthogonal factorization of A. A is an M-by-N +* matrix which may be rank-deficient. +* +* Several right hand side vectors b and solution vectors x can be +* handled in a single call; they are stored as the columns of the +* M-by-NRHS right hand side matrix B and the N-by-NRHS solution +* matrix X. +* +* The routine first computes a QR factorization with column pivoting: +* A * P = Q * [ R11 R12 ] +* [ 0 R22 ] +* with R11 defined as the largest leading submatrix whose estimated +* condition number is less than 1/RCOND. The order of R11, RANK, +* is the effective rank of A. +* +* Then, R22 is considered to be negligible, and R12 is annihilated +* by orthogonal transformations from the right, arriving at the +* complete orthogonal factorization: +* A * P = Q * [ T11 0 ] * Z +* [ 0 0 ] +* The minimum-norm solution is then +* X = P * Z' [ inv(T11)*Q1'*B ] +* [ 0 ] +* where Q1 consists of the first RANK columns of Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of +* columns of matrices B and X. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, A has been overwritten by details of its +* complete orthogonal factorization. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the M-by-NRHS right hand side matrix B. +* On exit, the N-by-NRHS solution matrix X. +* If m >= n and RANK = n, the residual sum-of-squares for +* the solution in the i-th column is given by the sum of +* squares of elements N+1:M in that column. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,M,N). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is an +* initial column, otherwise it is a free column. Before +* the QR factorization of A, all initial columns are +* permuted to the leading positions; only the remaining +* free columns are moved as a result of column pivoting +* during the factorization. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* RCOND (input) DOUBLE PRECISION +* RCOND is used to determine the effective rank of A, which +* is defined as the order of the largest leading triangular +* submatrix R11 in the QR factorization with pivoting of A, +* whose estimated condition number < 1/RCOND. +* +* RANK (output) INTEGER +* The effective rank of A, i.e., the order of the submatrix +* R11. This is the same as the order of the submatrix T11 +* in the complete orthogonal factorization of A. +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (max( min(M,N)+3*N, 2*min(M,N)+NRHS )), +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER IMAX, IMIN + PARAMETER ( IMAX = 1, IMIN = 2 ) + DOUBLE PRECISION ZERO, ONE, DONE, NTDONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, DONE = ZERO, + $ NTDONE = ONE ) +* .. +* .. Local Scalars .. + INTEGER I, IASCL, IBSCL, ISMAX, ISMIN, J, K, MN + DOUBLE PRECISION ANRM, BIGNUM, BNRM, C1, C2, S1, S2, SMAX, + $ SMAXPR, SMIN, SMINPR, SMLNUM, T1, T2 +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL DLAMCH, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DGEQPF, DLAIC1, DLASCL, DLASET, DLATZM, DORM2R, + $ DTRSM, DTZRQF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* + MN = MIN( M, N ) + ISMIN = MN + 1 + ISMAX = 2*MN + 1 +* +* Test the input arguments. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, M, N ) ) THEN + INFO = -7 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELSX', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( MIN( M, N, NRHS ).EQ.0 ) THEN + RANK = 0 + RETURN + END IF +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) / DLAMCH( 'P' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Scale A, B if max elements outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', M, N, A, LDA, WORK ) + IASCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) + IASCL = 1 + ELSE IF( ANRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) + IASCL = 2 + ELSE IF( ANRM.EQ.ZERO ) THEN +* +* Matrix all zero. Return zero solution. +* + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + RANK = 0 + GO TO 100 + END IF +* + BNRM = DLANGE( 'M', M, NRHS, B, LDB, WORK ) + IBSCL = 0 + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 1 + ELSE IF( BNRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 2 + END IF +* +* Compute QR factorization with column pivoting of A: +* A * P = Q * R +* + CALL DGEQPF( M, N, A, LDA, JPVT, WORK( 1 ), WORK( MN+1 ), INFO ) +* +* workspace 3*N. Details of Householder rotations stored +* in WORK(1:MN). +* +* Determine RANK using incremental condition estimation +* + WORK( ISMIN ) = ONE + WORK( ISMAX ) = ONE + SMAX = ABS( A( 1, 1 ) ) + SMIN = SMAX + IF( ABS( A( 1, 1 ) ).EQ.ZERO ) THEN + RANK = 0 + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + GO TO 100 + ELSE + RANK = 1 + END IF +* + 10 CONTINUE + IF( RANK.LT.MN ) THEN + I = RANK + 1 + CALL DLAIC1( IMIN, RANK, WORK( ISMIN ), SMIN, A( 1, I ), + $ A( I, I ), SMINPR, S1, C1 ) + CALL DLAIC1( IMAX, RANK, WORK( ISMAX ), SMAX, A( 1, I ), + $ A( I, I ), SMAXPR, S2, C2 ) +* + IF( SMAXPR*RCOND.LE.SMINPR ) THEN + DO 20 I = 1, RANK + WORK( ISMIN+I-1 ) = S1*WORK( ISMIN+I-1 ) + WORK( ISMAX+I-1 ) = S2*WORK( ISMAX+I-1 ) + 20 CONTINUE + WORK( ISMIN+RANK ) = C1 + WORK( ISMAX+RANK ) = C2 + SMIN = SMINPR + SMAX = SMAXPR + RANK = RANK + 1 + GO TO 10 + END IF + END IF +* +* Logically partition R = [ R11 R12 ] +* [ 0 R22 ] +* where R11 = R(1:RANK,1:RANK) +* +* [R11,R12] = [ T11, 0 ] * Y +* + IF( RANK.LT.N ) + $ CALL DTZRQF( RANK, N, A, LDA, WORK( MN+1 ), INFO ) +* +* Details of Householder rotations stored in WORK(MN+1:2*MN) +* +* B(1:M,1:NRHS) := Q' * B(1:M,1:NRHS) +* + CALL DORM2R( 'Left', 'Transpose', M, NRHS, MN, A, LDA, WORK( 1 ), + $ B, LDB, WORK( 2*MN+1 ), INFO ) +* +* workspace NRHS +* +* B(1:RANK,1:NRHS) := inv(T11) * B(1:RANK,1:NRHS) +* + CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', RANK, + $ NRHS, ONE, A, LDA, B, LDB ) +* + DO 40 I = RANK + 1, N + DO 30 J = 1, NRHS + B( I, J ) = ZERO + 30 CONTINUE + 40 CONTINUE +* +* B(1:N,1:NRHS) := Y' * B(1:N,1:NRHS) +* + IF( RANK.LT.N ) THEN + DO 50 I = 1, RANK + CALL DLATZM( 'Left', N-RANK+1, NRHS, A( I, RANK+1 ), LDA, + $ WORK( MN+I ), B( I, 1 ), B( RANK+1, 1 ), LDB, + $ WORK( 2*MN+1 ) ) + 50 CONTINUE + END IF +* +* workspace NRHS +* +* B(1:N,1:NRHS) := P * B(1:N,1:NRHS) +* + DO 90 J = 1, NRHS + DO 60 I = 1, N + WORK( 2*MN+I ) = NTDONE + 60 CONTINUE + DO 80 I = 1, N + IF( WORK( 2*MN+I ).EQ.NTDONE ) THEN + IF( JPVT( I ).NE.I ) THEN + K = I + T1 = B( K, J ) + T2 = B( JPVT( K ), J ) + 70 CONTINUE + B( JPVT( K ), J ) = T1 + WORK( 2*MN+K ) = DONE + T1 = T2 + K = JPVT( K ) + T2 = B( JPVT( K ), J ) + IF( JPVT( K ).NE.I ) + $ GO TO 70 + B( I, J ) = T1 + WORK( 2*MN+K ) = DONE + END IF + END IF + 80 CONTINUE + 90 CONTINUE +* +* Undo scaling +* + IF( IASCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'U', 0, 0, SMLNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + ELSE IF( IASCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'U', 0, 0, BIGNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + END IF + IF( IBSCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO ) + ELSE IF( IBSCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO ) + END IF +* + 100 CONTINUE +* + RETURN +* +* End of DGELSX +* + END diff --git a/2.3-1/src/fortran/lapack/dgelsy.f b/2.3-1/src/fortran/lapack/dgelsy.f new file mode 100644 index 00000000..4334650f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgelsy.f @@ -0,0 +1,391 @@ + SUBROUTINE DGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, + $ WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGELSY computes the minimum-norm solution to a real linear least +* squares problem: +* minimize || A * X - B || +* using a complete orthogonal factorization of A. A is an M-by-N +* matrix which may be rank-deficient. +* +* Several right hand side vectors b and solution vectors x can be +* handled in a single call; they are stored as the columns of the +* M-by-NRHS right hand side matrix B and the N-by-NRHS solution +* matrix X. +* +* The routine first computes a QR factorization with column pivoting: +* A * P = Q * [ R11 R12 ] +* [ 0 R22 ] +* with R11 defined as the largest leading submatrix whose estimated +* condition number is less than 1/RCOND. The order of R11, RANK, +* is the effective rank of A. +* +* Then, R22 is considered to be negligible, and R12 is annihilated +* by orthogonal transformations from the right, arriving at the +* complete orthogonal factorization: +* A * P = Q * [ T11 0 ] * Z +* [ 0 0 ] +* The minimum-norm solution is then +* X = P * Z' [ inv(T11)*Q1'*B ] +* [ 0 ] +* where Q1 consists of the first RANK columns of Q. +* +* This routine is basically identical to the original xGELSX except +* three differences: +* o The call to the subroutine xGEQPF has been substituted by the +* the call to the subroutine xGEQP3. This subroutine is a Blas-3 +* version of the QR factorization with column pivoting. +* o Matrix B (the right hand side) is updated with Blas-3. +* o The permutation of matrix B (the right hand side) is faster and +* more simple. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of +* columns of matrices B and X. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, A has been overwritten by details of its +* complete orthogonal factorization. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the M-by-NRHS right hand side matrix B. +* On exit, the N-by-NRHS solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,M,N). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of AP, otherwise column i is a free column. +* On exit, if JPVT(i) = k, then the i-th column of AP +* was the k-th column of A. +* +* RCOND (input) DOUBLE PRECISION +* RCOND is used to determine the effective rank of A, which +* is defined as the order of the largest leading triangular +* submatrix R11 in the QR factorization with pivoting of A, +* whose estimated condition number < 1/RCOND. +* +* RANK (output) INTEGER +* The effective rank of A, i.e., the order of the submatrix +* R11. This is the same as the order of the submatrix T11 +* in the complete orthogonal factorization of A. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* The unblocked strategy requires that: +* LWORK >= MAX( MN+3*N+1, 2*MN+NRHS ), +* where MN = min( M, N ). +* The block algorithm requires that: +* LWORK >= MAX( MN+2*N+NB*(N+1), 2*MN+NB*NRHS ), +* where NB is an upper bound on the blocksize returned +* by ILAENV for the routines DGEQP3, DTZRZF, STZRQF, DORMQR, +* and DORMRZ. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: If INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* +* ===================================================================== +* +* .. Parameters .. + INTEGER IMAX, IMIN + PARAMETER ( IMAX = 1, IMIN = 2 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IASCL, IBSCL, ISMAX, ISMIN, J, LWKMIN, + $ LWKOPT, MN, NB, NB1, NB2, NB3, NB4 + DOUBLE PRECISION ANRM, BIGNUM, BNRM, C1, C2, S1, S2, SMAX, + $ SMAXPR, SMIN, SMINPR, SMLNUM, WSIZE +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL ILAENV, DLAMCH, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEQP3, DLABAD, DLAIC1, DLASCL, DLASET, + $ DORMQR, DORMRZ, DTRSM, DTZRZF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* + MN = MIN( M, N ) + ISMIN = MN + 1 + ISMAX = 2*MN + 1 +* +* Test the input arguments. +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, M, N ) ) THEN + INFO = -7 + END IF +* +* Figure out optimal block size +* + IF( INFO.EQ.0 ) THEN + IF( MN.EQ.0 .OR. NRHS.EQ.0 ) THEN + LWKMIN = 1 + LWKOPT = 1 + ELSE + NB1 = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + NB2 = ILAENV( 1, 'DGERQF', ' ', M, N, -1, -1 ) + NB3 = ILAENV( 1, 'DORMQR', ' ', M, N, NRHS, -1 ) + NB4 = ILAENV( 1, 'DORMRQ', ' ', M, N, NRHS, -1 ) + NB = MAX( NB1, NB2, NB3, NB4 ) + LWKMIN = MN + MAX( 2*MN, N + 1, MN + NRHS ) + LWKOPT = MAX( LWKMIN, + $ MN + 2*N + NB*( N + 1 ), 2*MN + NB*NRHS ) + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGELSY', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( MN.EQ.0 .OR. NRHS.EQ.0 ) THEN + RANK = 0 + RETURN + END IF +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) / DLAMCH( 'P' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Scale A, B if max entries outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', M, N, A, LDA, WORK ) + IASCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) + IASCL = 1 + ELSE IF( ANRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) + IASCL = 2 + ELSE IF( ANRM.EQ.ZERO ) THEN +* +* Matrix all zero. Return zero solution. +* + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + RANK = 0 + GO TO 70 + END IF +* + BNRM = DLANGE( 'M', M, NRHS, B, LDB, WORK ) + IBSCL = 0 + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 1 + ELSE IF( BNRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL DLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 2 + END IF +* +* Compute QR factorization with column pivoting of A: +* A * P = Q * R +* + CALL DGEQP3( M, N, A, LDA, JPVT, WORK( 1 ), WORK( MN+1 ), + $ LWORK-MN, INFO ) + WSIZE = MN + WORK( MN+1 ) +* +* workspace: MN+2*N+NB*(N+1). +* Details of Householder rotations stored in WORK(1:MN). +* +* Determine RANK using incremental condition estimation +* + WORK( ISMIN ) = ONE + WORK( ISMAX ) = ONE + SMAX = ABS( A( 1, 1 ) ) + SMIN = SMAX + IF( ABS( A( 1, 1 ) ).EQ.ZERO ) THEN + RANK = 0 + CALL DLASET( 'F', MAX( M, N ), NRHS, ZERO, ZERO, B, LDB ) + GO TO 70 + ELSE + RANK = 1 + END IF +* + 10 CONTINUE + IF( RANK.LT.MN ) THEN + I = RANK + 1 + CALL DLAIC1( IMIN, RANK, WORK( ISMIN ), SMIN, A( 1, I ), + $ A( I, I ), SMINPR, S1, C1 ) + CALL DLAIC1( IMAX, RANK, WORK( ISMAX ), SMAX, A( 1, I ), + $ A( I, I ), SMAXPR, S2, C2 ) +* + IF( SMAXPR*RCOND.LE.SMINPR ) THEN + DO 20 I = 1, RANK + WORK( ISMIN+I-1 ) = S1*WORK( ISMIN+I-1 ) + WORK( ISMAX+I-1 ) = S2*WORK( ISMAX+I-1 ) + 20 CONTINUE + WORK( ISMIN+RANK ) = C1 + WORK( ISMAX+RANK ) = C2 + SMIN = SMINPR + SMAX = SMAXPR + RANK = RANK + 1 + GO TO 10 + END IF + END IF +* +* workspace: 3*MN. +* +* Logically partition R = [ R11 R12 ] +* [ 0 R22 ] +* where R11 = R(1:RANK,1:RANK) +* +* [R11,R12] = [ T11, 0 ] * Y +* + IF( RANK.LT.N ) + $ CALL DTZRZF( RANK, N, A, LDA, WORK( MN+1 ), WORK( 2*MN+1 ), + $ LWORK-2*MN, INFO ) +* +* workspace: 2*MN. +* Details of Householder rotations stored in WORK(MN+1:2*MN) +* +* B(1:M,1:NRHS) := Q' * B(1:M,1:NRHS) +* + CALL DORMQR( 'Left', 'Transpose', M, NRHS, MN, A, LDA, WORK( 1 ), + $ B, LDB, WORK( 2*MN+1 ), LWORK-2*MN, INFO ) + WSIZE = MAX( WSIZE, 2*MN+WORK( 2*MN+1 ) ) +* +* workspace: 2*MN+NB*NRHS. +* +* B(1:RANK,1:NRHS) := inv(T11) * B(1:RANK,1:NRHS) +* + CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', RANK, + $ NRHS, ONE, A, LDA, B, LDB ) +* + DO 40 J = 1, NRHS + DO 30 I = RANK + 1, N + B( I, J ) = ZERO + 30 CONTINUE + 40 CONTINUE +* +* B(1:N,1:NRHS) := Y' * B(1:N,1:NRHS) +* + IF( RANK.LT.N ) THEN + CALL DORMRZ( 'Left', 'Transpose', N, NRHS, RANK, N-RANK, A, + $ LDA, WORK( MN+1 ), B, LDB, WORK( 2*MN+1 ), + $ LWORK-2*MN, INFO ) + END IF +* +* workspace: 2*MN+NRHS. +* +* B(1:N,1:NRHS) := P * B(1:N,1:NRHS) +* + DO 60 J = 1, NRHS + DO 50 I = 1, N + WORK( JPVT( I ) ) = B( I, J ) + 50 CONTINUE + CALL DCOPY( N, WORK( 1 ), 1, B( 1, J ), 1 ) + 60 CONTINUE +* +* workspace: N. +* +* Undo scaling +* + IF( IASCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'U', 0, 0, SMLNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + ELSE IF( IASCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO ) + CALL DLASCL( 'U', 0, 0, BIGNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + END IF + IF( IBSCL.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO ) + ELSE IF( IBSCL.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO ) + END IF +* + 70 CONTINUE + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DGELSY +* + END diff --git a/2.3-1/src/fortran/lapack/dgeql2.f b/2.3-1/src/fortran/lapack/dgeql2.f new file mode 100644 index 00000000..aa45113c --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeql2.f @@ -0,0 +1,122 @@ + SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEQL2 computes a QL factorization of a real m by n matrix A: +* A = Q * L. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, if m >= n, the lower triangle of the subarray +* A(m-n+1:m,1:n) contains the n by n lower triangular matrix L; +* if m <= n, the elements on and below the (n-m)-th +* superdiagonal contain the m by n lower trapezoidal matrix L; +* the remaining elements, with the array TAU, represent the +* orthogonal matrix Q as a product of elementary reflectors +* (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k) . . . H(2) H(1), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in +* A(1:m-k+i-1,n-k+i), and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, K + DOUBLE PRECISION AII +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQL2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = K, 1, -1 +* +* Generate elementary reflector H(i) to annihilate +* A(1:m-k+i-1,n-k+i) +* + CALL DLARFG( M-K+I, A( M-K+I, N-K+I ), A( 1, N-K+I ), 1, + $ TAU( I ) ) +* +* Apply H(i) to A(1:m-k+i,1:n-k+i-1) from the left +* + AII = A( M-K+I, N-K+I ) + A( M-K+I, N-K+I ) = ONE + CALL DLARF( 'Left', M-K+I, N-K+I-1, A( 1, N-K+I ), 1, TAU( I ), + $ A, LDA, WORK ) + A( M-K+I, N-K+I ) = AII + 10 CONTINUE + RETURN +* +* End of DGEQL2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgeqlf.f b/2.3-1/src/fortran/lapack/dgeqlf.f new file mode 100644 index 00000000..ec293574 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeqlf.f @@ -0,0 +1,213 @@ + SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEQLF computes a QL factorization of a real M-by-N matrix A: +* A = Q * L. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, +* if m >= n, the lower triangle of the subarray +* A(m-n+1:m,1:n) contains the N-by-N lower triangular matrix L; +* if m <= n, the elements on and below the (n-m)-th +* superdiagonal contain the M-by-N lower trapezoidal matrix L; +* the remaining elements, with the array TAU, represent the +* orthogonal matrix Q as a product of elementary reflectors +* (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k) . . . H(2) H(1), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(m-k+i+1:m) = 0 and v(m-k+i) = 1; v(1:m-k+i-1) is stored on exit in +* A(1:m-k+i-1,n-k+i), and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, KI, KK, LDWORK, LWKOPT, + $ MU, NB, NBMIN, NU, NX +* .. +* .. External Subroutines .. + EXTERNAL DGEQL2, DLARFB, DLARFT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'DGEQLF', ' ', M, N, -1, -1 ) + LWKOPT = N*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQLF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( K.EQ.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + NX = 1 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DGEQLF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGEQLF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially. +* The last kk columns are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* + DO 10 I = K - KK + KI + 1, K - KK + 1, -NB + IB = MIN( K-I+1, NB ) +* +* Compute the QL factorization of the current block +* A(1:m-k+i+ib-1,n-k+i:n-k+i+ib-1) +* + CALL DGEQL2( M-K+I+IB-1, IB, A( 1, N-K+I ), LDA, TAU( I ), + $ WORK, IINFO ) + IF( N-K+I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB, + $ A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(1:m-k+i+ib-1,1:n-k+i-1) from the left +* + CALL DLARFB( 'Left', 'Transpose', 'Backward', + $ 'Columnwise', M-K+I+IB-1, N-K+I-1, IB, + $ A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + MU = M - K + I + NB - 1 + NU = N - K + I + NB - 1 + ELSE + MU = M + NU = N + END IF +* +* Use unblocked code to factor the last or only block +* + IF( MU.GT.0 .AND. NU.GT.0 ) + $ CALL DGEQL2( MU, NU, A, LDA, TAU, WORK, IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of DGEQLF +* + END diff --git a/2.3-1/src/fortran/lapack/dgeqp3.f b/2.3-1/src/fortran/lapack/dgeqp3.f new file mode 100644 index 00000000..d6bc537d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeqp3.f @@ -0,0 +1,287 @@ + SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEQP3 computes a QR factorization with column pivoting of a +* matrix A: A*P = Q*R using Level 3 BLAS. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of the array contains the +* min(M,N)-by-N upper trapezoidal matrix R; the elements below +* the diagonal, together with the array TAU, represent the +* orthogonal matrix Q as a product of min(M,N) elementary +* reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(J).ne.0, the J-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(J)=0, +* the J-th column of A is a free column. +* On exit, if JPVT(J)=K, then the J-th column of A*P was the +* the K-th column of A. +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO=0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 3*N+1. +* For optimal performance LWORK >= 2*N+( N+1 )*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real/complex scalar, and v is a real/complex vector +* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in +* A(i+1:m,i), and tau in TAU(i). +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* ===================================================================== +* +* .. Parameters .. + INTEGER INB, INBMIN, IXOVER + PARAMETER ( INB = 1, INBMIN = 2, IXOVER = 3 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER FJB, IWS, J, JB, LWKOPT, MINMN, MINWS, NA, NB, + $ NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN +* .. +* .. External Subroutines .. + EXTERNAL DGEQRF, DLAQP2, DLAQPS, DORMQR, DSWAP, XERBLA +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DNRM2 + EXTERNAL ILAENV, DNRM2 +* .. +* .. Intrinsic Functions .. + INTRINSIC INT, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test input arguments +* ==================== +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + MINMN = MIN( M, N ) + IF( MINMN.EQ.0 ) THEN + IWS = 1 + LWKOPT = 1 + ELSE + IWS = 3*N + 1 + NB = ILAENV( INB, 'DGEQRF', ' ', M, N, -1, -1 ) + LWKOPT = 2*N + ( N + 1 )*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( ( LWORK.LT.IWS ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQP3', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible. +* + IF( MINMN.EQ.0 ) THEN + RETURN + END IF +* +* Move initial columns up front. +* + NFXD = 1 + DO 10 J = 1, N + IF( JPVT( J ).NE.0 ) THEN + IF( J.NE.NFXD ) THEN + CALL DSWAP( M, A( 1, J ), 1, A( 1, NFXD ), 1 ) + JPVT( J ) = JPVT( NFXD ) + JPVT( NFXD ) = J + ELSE + JPVT( J ) = J + END IF + NFXD = NFXD + 1 + ELSE + JPVT( J ) = J + END IF + 10 CONTINUE + NFXD = NFXD - 1 +* +* Factorize fixed columns +* ======================= +* +* Compute the QR factorization of fixed columns and update +* remaining columns. +* + IF( NFXD.GT.0 ) THEN + NA = MIN( M, NFXD ) +*CC CALL DGEQR2( M, NA, A, LDA, TAU, WORK, INFO ) + CALL DGEQRF( M, NA, A, LDA, TAU, WORK, LWORK, INFO ) + IWS = MAX( IWS, INT( WORK( 1 ) ) ) + IF( NA.LT.N ) THEN +*CC CALL DORM2R( 'Left', 'Transpose', M, N-NA, NA, A, LDA, +*CC $ TAU, A( 1, NA+1 ), LDA, WORK, INFO ) + CALL DORMQR( 'Left', 'Transpose', M, N-NA, NA, A, LDA, TAU, + $ A( 1, NA+1 ), LDA, WORK, LWORK, INFO ) + IWS = MAX( IWS, INT( WORK( 1 ) ) ) + END IF + END IF +* +* Factorize free columns +* ====================== +* + IF( NFXD.LT.MINMN ) THEN +* + SM = M - NFXD + SN = N - NFXD + SMINMN = MINMN - NFXD +* +* Determine the block size. +* + NB = ILAENV( INB, 'DGEQRF', ' ', SM, SN, -1, -1 ) + NBMIN = 2 + NX = 0 +* + IF( ( NB.GT.1 ) .AND. ( NB.LT.SMINMN ) ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( IXOVER, 'DGEQRF', ' ', SM, SN, -1, + $ -1 ) ) +* +* + IF( NX.LT.SMINMN ) THEN +* +* Determine if workspace is large enough for blocked code. +* + MINWS = 2*SN + ( SN+1 )*NB + IWS = MAX( IWS, MINWS ) + IF( LWORK.LT.MINWS ) THEN +* +* Not enough workspace to use optimal NB: Reduce NB and +* determine the minimum value of NB. +* + NB = ( LWORK-2*SN ) / ( SN+1 ) + NBMIN = MAX( 2, ILAENV( INBMIN, 'DGEQRF', ' ', SM, SN, + $ -1, -1 ) ) +* +* + END IF + END IF + END IF +* +* Initialize partial column norms. The first N elements of work +* store the exact column norms. +* + DO 20 J = NFXD + 1, N + WORK( J ) = DNRM2( SM, A( NFXD+1, J ), 1 ) + WORK( N+J ) = WORK( J ) + 20 CONTINUE +* + IF( ( NB.GE.NBMIN ) .AND. ( NB.LT.SMINMN ) .AND. + $ ( NX.LT.SMINMN ) ) THEN +* +* Use blocked code initially. +* + J = NFXD + 1 +* +* Compute factorization: while loop. +* +* + TOPBMN = MINMN - NX + 30 CONTINUE + IF( J.LE.TOPBMN ) THEN + JB = MIN( NB, TOPBMN-J+1 ) +* +* Factorize JB columns among columns J:N. +* + CALL DLAQPS( M, N-J+1, J-1, JB, FJB, A( 1, J ), LDA, + $ JPVT( J ), TAU( J ), WORK( J ), WORK( N+J ), + $ WORK( 2*N+1 ), WORK( 2*N+JB+1 ), N-J+1 ) +* + J = J + FJB + GO TO 30 + END IF + ELSE + J = NFXD + 1 + END IF +* +* Use unblocked code to factor the last or only block. +* +* + IF( J.LE.MINMN ) + $ CALL DLAQP2( M, N-J+1, J-1, A( 1, J ), LDA, JPVT( J ), + $ TAU( J ), WORK( J ), WORK( N+J ), + $ WORK( 2*N+1 ) ) +* + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of DGEQP3 +* + END diff --git a/2.3-1/src/fortran/lapack/dgeqpf.f b/2.3-1/src/fortran/lapack/dgeqpf.f new file mode 100644 index 00000000..1b7acd6d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeqpf.f @@ -0,0 +1,231 @@ + SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO ) +* +* -- LAPACK deprecated driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine DGEQP3. +* +* DGEQPF computes a QR factorization with column pivoting of a +* real M-by-N matrix A: A*P = Q*R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0 +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of the array contains the +* min(M,N)-by-N upper triangular matrix R; the elements +* below the diagonal, together with the array TAU, +* represent the orthogonal matrix Q as a product of +* min(m,n) elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(i) = 0, +* the i-th column of A is a free column. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(n) +* +* Each H(i) has the form +* +* H = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i). +* +* The matrix P is represented in jpvt as follows: If +* jpvt(j) = i +* then the jth column of P is the ith canonical unit vector. +* +* Partial column norm updating strategy modified by +* Z. Drmac and Z. Bujanovic, Dept. of Mathematics, +* University of Zagreb, Croatia. +* June 2006. +* For more details see LAPACK Working Note 176. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, ITEMP, J, MA, MN, PVT + DOUBLE PRECISION AII, TEMP, TEMP2, TOL3Z +* .. +* .. External Subroutines .. + EXTERNAL DGEQR2, DLARF, DLARFG, DORM2R, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DNRM2 + EXTERNAL IDAMAX, DLAMCH, DNRM2 +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQPF', -INFO ) + RETURN + END IF +* + MN = MIN( M, N ) + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Move initial columns up front +* + ITEMP = 1 + DO 10 I = 1, N + IF( JPVT( I ).NE.0 ) THEN + IF( I.NE.ITEMP ) THEN + CALL DSWAP( M, A( 1, I ), 1, A( 1, ITEMP ), 1 ) + JPVT( I ) = JPVT( ITEMP ) + JPVT( ITEMP ) = I + ELSE + JPVT( I ) = I + END IF + ITEMP = ITEMP + 1 + ELSE + JPVT( I ) = I + END IF + 10 CONTINUE + ITEMP = ITEMP - 1 +* +* Compute the QR factorization and update remaining columns +* + IF( ITEMP.GT.0 ) THEN + MA = MIN( ITEMP, M ) + CALL DGEQR2( M, MA, A, LDA, TAU, WORK, INFO ) + IF( MA.LT.N ) THEN + CALL DORM2R( 'Left', 'Transpose', M, N-MA, MA, A, LDA, TAU, + $ A( 1, MA+1 ), LDA, WORK, INFO ) + END IF + END IF +* + IF( ITEMP.LT.MN ) THEN +* +* Initialize partial column norms. The first n elements of +* work store the exact column norms. +* + DO 20 I = ITEMP + 1, N + WORK( I ) = DNRM2( M-ITEMP, A( ITEMP+1, I ), 1 ) + WORK( N+I ) = WORK( I ) + 20 CONTINUE +* +* Compute factorization +* + DO 40 I = ITEMP + 1, MN +* +* Determine ith pivot column and swap if necessary +* + PVT = ( I-1 ) + IDAMAX( N-I+1, WORK( I ), 1 ) +* + IF( PVT.NE.I ) THEN + CALL DSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( I ) + JPVT( I ) = ITEMP + WORK( PVT ) = WORK( I ) + WORK( N+PVT ) = WORK( N+I ) + END IF +* +* Generate elementary reflector H(i) +* + IF( I.LT.M ) THEN + CALL DLARFG( M-I+1, A( I, I ), A( I+1, I ), 1, TAU( I ) ) + ELSE + CALL DLARFG( 1, A( M, M ), A( M, M ), 1, TAU( M ) ) + END IF +* + IF( I.LT.N ) THEN +* +* Apply H(i) to A(i:m,i+1:n) from the left +* + AII = A( I, I ) + A( I, I ) = ONE + CALL DLARF( 'LEFT', M-I+1, N-I, A( I, I ), 1, TAU( I ), + $ A( I, I+1 ), LDA, WORK( 2*N+1 ) ) + A( I, I ) = AII + END IF +* +* Update partial column norms +* + DO 30 J = I + 1, N + IF( WORK( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ABS( A( I, J ) ) / WORK( J ) + TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) ) + TEMP2 = TEMP*( WORK( J ) / WORK( N+J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + IF( M-I.GT.0 ) THEN + WORK( J ) = DNRM2( M-I, A( I+1, J ), 1 ) + WORK( N+J ) = WORK( J ) + ELSE + WORK( J ) = ZERO + WORK( N+J ) = ZERO + END IF + ELSE + WORK( J ) = WORK( J )*SQRT( TEMP ) + END IF + END IF + 30 CONTINUE +* + 40 CONTINUE + END IF + RETURN +* +* End of DGEQPF +* + END diff --git a/2.3-1/src/fortran/lapack/dgeqr2.f b/2.3-1/src/fortran/lapack/dgeqr2.f new file mode 100644 index 00000000..9872a162 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeqr2.f @@ -0,0 +1,121 @@ + SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEQR2 computes a QR factorization of a real m by n matrix A: +* A = Q * R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, the elements on and above the diagonal of the array +* contain the min(m,n) by n upper trapezoidal matrix R (R is +* upper triangular if m >= n); the elements below the diagonal, +* with the array TAU, represent the orthogonal matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, K + DOUBLE PRECISION AII +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQR2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = 1, K +* +* Generate elementary reflector H(i) to annihilate A(i+1:m,i) +* + CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, + $ TAU( I ) ) + IF( I.LT.N ) THEN +* +* Apply H(i) to A(i:m,i+1:n) from the left +* + AII = A( I, I ) + A( I, I ) = ONE + CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ), + $ A( I, I+1 ), LDA, WORK ) + A( I, I ) = AII + END IF + 10 CONTINUE + RETURN +* +* End of DGEQR2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgeqrf.f b/2.3-1/src/fortran/lapack/dgeqrf.f new file mode 100644 index 00000000..1e940597 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgeqrf.f @@ -0,0 +1,196 @@ + SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGEQRF computes a QR factorization of a real M-by-N matrix A: +* A = Q * R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the elements on and above the diagonal of the array +* contain the min(M,N)-by-N upper trapezoidal matrix R (R is +* upper triangular if m >= n); the elements below the diagonal, +* with the array TAU, represent the orthogonal matrix Q as a +* product of min(m,n) elementary reflectors (see Further +* Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DGEQR2, DLARFB, DLARFT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGEQRF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DGEQRF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGEQRF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially +* + DO 10 I = 1, K - NX, NB + IB = MIN( K-I+1, NB ) +* +* Compute the QR factorization of the current block +* A(i:m,i:i+ib-1) +* + CALL DGEQR2( M-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) + IF( I+IB.LE.N ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Columnwise', M-I+1, IB, + $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(i:m,i+ib:n) from the left +* + CALL DLARFB( 'Left', 'Transpose', 'Forward', + $ 'Columnwise', M-I+1, N-I-IB+1, IB, + $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), + $ LDA, WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + ELSE + I = 1 + END IF +* +* Use unblocked code to factor the last or only block. +* + IF( I.LE.K ) + $ CALL DGEQR2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of DGEQRF +* + END diff --git a/2.3-1/src/fortran/lapack/dgerfs.f b/2.3-1/src/fortran/lapack/dgerfs.f new file mode 100644 index 00000000..bada6e56 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgerfs.f @@ -0,0 +1,336 @@ + SUBROUTINE DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, + $ X, LDX, FERR, BERR, WORK, IWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), IWORK( * ) + DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ), + $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * ) +* .. +* +* Purpose +* ======= +* +* DGERFS improves the computed solution to a system of linear +* equations and provides error bounds and backward error estimates for +* the solution. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* Specifies the form of the system of equations: +* = 'N': A * X = B (No transpose) +* = 'T': A**T * X = B (Transpose) +* = 'C': A**H * X = B (Conjugate transpose = Transpose) +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrices B and X. NRHS >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The original N-by-N matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* AF (input) DOUBLE PRECISION array, dimension (LDAF,N) +* The factors L and U from the factorization A = P*L*U +* as computed by DGETRF. +* +* LDAF (input) INTEGER +* The leading dimension of the array AF. LDAF >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* The pivot indices from DGETRF; for 1<=i<=N, row i of the +* matrix was interchanged with row IPIV(i). +* +* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS) +* The right hand side matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS) +* On entry, the solution matrix X, as computed by DGETRS. +* On exit, the improved solution matrix X. +* +* LDX (input) INTEGER +* The leading dimension of the array X. LDX >= max(1,N). +* +* FERR (output) DOUBLE PRECISION array, dimension (NRHS) +* The estimated forward error bound for each solution vector +* X(j) (the j-th column of the solution matrix X). +* If XTRUE is the true solution corresponding to X(j), FERR(j) +* is an estimated upper bound for the magnitude of the largest +* element in (X(j) - XTRUE) divided by the magnitude of the +* largest element in X(j). The estimate is as reliable as +* the estimate for RCOND, and is almost always a slight +* overestimate of the true error. +* +* BERR (output) DOUBLE PRECISION array, dimension (NRHS) +* The componentwise relative backward error of each solution +* vector X(j) (i.e., the smallest relative change in +* any element of A or B that makes X(j) an exact solution). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* IWORK (workspace) INTEGER array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Internal Parameters +* =================== +* +* ITMAX is the maximum number of steps of iterative refinement. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 5 ) + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D+0 ) + DOUBLE PRECISION THREE + PARAMETER ( THREE = 3.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN + CHARACTER TRANST + INTEGER COUNT, I, J, K, KASE, NZ + DOUBLE PRECISION EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DGETRS, DLACN2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NOTRAN = LSAME( TRANS, 'N' ) + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -10 + ELSE IF( LDX.LT.MAX( 1, N ) ) THEN + INFO = -12 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGERFS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. NRHS.EQ.0 ) THEN + DO 10 J = 1, NRHS + FERR( J ) = ZERO + BERR( J ) = ZERO + 10 CONTINUE + RETURN + END IF +* + IF( NOTRAN ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* +* NZ = maximum number of nonzero elements in each row of A, plus 1 +* + NZ = N + 1 + EPS = DLAMCH( 'Epsilon' ) + SAFMIN = DLAMCH( 'Safe minimum' ) + SAFE1 = NZ*SAFMIN + SAFE2 = SAFE1 / EPS +* +* Do for each right hand side +* + DO 140 J = 1, NRHS +* + COUNT = 1 + LSTRES = THREE + 20 CONTINUE +* +* Loop until stopping criterion is satisfied. +* +* Compute residual R = B - op(A) * X, +* where op(A) = A, A**T, or A**H, depending on TRANS. +* + CALL DCOPY( N, B( 1, J ), 1, WORK( N+1 ), 1 ) + CALL DGEMV( TRANS, N, N, -ONE, A, LDA, X( 1, J ), 1, ONE, + $ WORK( N+1 ), 1 ) +* +* Compute componentwise relative backward error from formula +* +* max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) ) +* +* where abs(Z) is the componentwise absolute value of the matrix +* or vector Z. If the i-th component of the denominator is less +* than SAFE2, then SAFE1 is added to the i-th components of the +* numerator and denominator before dividing. +* + DO 30 I = 1, N + WORK( I ) = ABS( B( I, J ) ) + 30 CONTINUE +* +* Compute abs(op(A))*abs(X) + abs(B). +* + IF( NOTRAN ) THEN + DO 50 K = 1, N + XK = ABS( X( K, J ) ) + DO 40 I = 1, N + WORK( I ) = WORK( I ) + ABS( A( I, K ) )*XK + 40 CONTINUE + 50 CONTINUE + ELSE + DO 70 K = 1, N + S = ZERO + DO 60 I = 1, N + S = S + ABS( A( I, K ) )*ABS( X( I, J ) ) + 60 CONTINUE + WORK( K ) = WORK( K ) + S + 70 CONTINUE + END IF + S = ZERO + DO 80 I = 1, N + IF( WORK( I ).GT.SAFE2 ) THEN + S = MAX( S, ABS( WORK( N+I ) ) / WORK( I ) ) + ELSE + S = MAX( S, ( ABS( WORK( N+I ) )+SAFE1 ) / + $ ( WORK( I )+SAFE1 ) ) + END IF + 80 CONTINUE + BERR( J ) = S +* +* Test stopping criterion. Continue iterating if +* 1) The residual BERR(J) is larger than machine epsilon, and +* 2) BERR(J) decreased by at least a factor of 2 during the +* last iteration, and +* 3) At most ITMAX iterations tried. +* + IF( BERR( J ).GT.EPS .AND. TWO*BERR( J ).LE.LSTRES .AND. + $ COUNT.LE.ITMAX ) THEN +* +* Update solution and try again. +* + CALL DGETRS( TRANS, N, 1, AF, LDAF, IPIV, WORK( N+1 ), N, + $ INFO ) + CALL DAXPY( N, ONE, WORK( N+1 ), 1, X( 1, J ), 1 ) + LSTRES = BERR( J ) + COUNT = COUNT + 1 + GO TO 20 + END IF +* +* Bound error from formula +* +* norm(X - XTRUE) / norm(X) .le. FERR = +* norm( abs(inv(op(A)))* +* ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X) +* +* where +* norm(Z) is the magnitude of the largest component of Z +* inv(op(A)) is the inverse of op(A) +* abs(Z) is the componentwise absolute value of the matrix or +* vector Z +* NZ is the maximum number of nonzeros in any row of A, plus 1 +* EPS is machine epsilon +* +* The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B)) +* is incremented by SAFE1 if the i-th component of +* abs(op(A))*abs(X) + abs(B) is less than SAFE2. +* +* Use DLACN2 to estimate the infinity-norm of the matrix +* inv(op(A)) * diag(W), +* where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) +* + DO 90 I = 1, N + IF( WORK( I ).GT.SAFE2 ) THEN + WORK( I ) = ABS( WORK( N+I ) ) + NZ*EPS*WORK( I ) + ELSE + WORK( I ) = ABS( WORK( N+I ) ) + NZ*EPS*WORK( I ) + SAFE1 + END IF + 90 CONTINUE +* + KASE = 0 + 100 CONTINUE + CALL DLACN2( N, WORK( 2*N+1 ), WORK( N+1 ), IWORK, FERR( J ), + $ KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Multiply by diag(W)*inv(op(A)**T). +* + CALL DGETRS( TRANST, N, 1, AF, LDAF, IPIV, WORK( N+1 ), + $ N, INFO ) + DO 110 I = 1, N + WORK( N+I ) = WORK( I )*WORK( N+I ) + 110 CONTINUE + ELSE +* +* Multiply by inv(op(A))*diag(W). +* + DO 120 I = 1, N + WORK( N+I ) = WORK( I )*WORK( N+I ) + 120 CONTINUE + CALL DGETRS( TRANS, N, 1, AF, LDAF, IPIV, WORK( N+1 ), N, + $ INFO ) + END IF + GO TO 100 + END IF +* +* Normalize error. +* + LSTRES = ZERO + DO 130 I = 1, N + LSTRES = MAX( LSTRES, ABS( X( I, J ) ) ) + 130 CONTINUE + IF( LSTRES.NE.ZERO ) + $ FERR( J ) = FERR( J ) / LSTRES +* + 140 CONTINUE +* + RETURN +* +* End of DGERFS +* + END diff --git a/2.3-1/src/fortran/lapack/dgerq2.f b/2.3-1/src/fortran/lapack/dgerq2.f new file mode 100644 index 00000000..4dfe8b0f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgerq2.f @@ -0,0 +1,122 @@ + SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGERQ2 computes an RQ factorization of a real m by n matrix A: +* A = R * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, if m <= n, the upper triangle of the subarray +* A(1:m,n-m+1:n) contains the m by m upper triangular matrix R; +* if m >= n, the elements on and above the (m-n)-th subdiagonal +* contain the m by n upper trapezoidal matrix R; the remaining +* elements, with the array TAU, represent the orthogonal matrix +* Q as a product of elementary reflectors (see Further +* Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in +* A(m-k+i,1:n-k+i-1), and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, K + DOUBLE PRECISION AII +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGERQ2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = K, 1, -1 +* +* Generate elementary reflector H(i) to annihilate +* A(m-k+i,1:n-k+i-1) +* + CALL DLARFG( N-K+I, A( M-K+I, N-K+I ), A( M-K+I, 1 ), LDA, + $ TAU( I ) ) +* +* Apply H(i) to A(1:m-k+i-1,1:n-k+i) from the right +* + AII = A( M-K+I, N-K+I ) + A( M-K+I, N-K+I ) = ONE + CALL DLARF( 'Right', M-K+I-1, N-K+I, A( M-K+I, 1 ), LDA, + $ TAU( I ), A, LDA, WORK ) + A( M-K+I, N-K+I ) = AII + 10 CONTINUE + RETURN +* +* End of DGERQ2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgerqf.f b/2.3-1/src/fortran/lapack/dgerqf.f new file mode 100644 index 00000000..3dc22652 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgerqf.f @@ -0,0 +1,213 @@ + SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGERQF computes an RQ factorization of a real M-by-N matrix A: +* A = R * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, +* if m <= n, the upper triangle of the subarray +* A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R; +* if m >= n, the elements on and above the (m-n)-th subdiagonal +* contain the M-by-N upper trapezoidal matrix R; +* the remaining elements, with the array TAU, represent the +* orthogonal matrix Q as a product of min(m,n) elementary +* reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in +* A(m-k+i,1:n-k+i-1), and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, KI, KK, LDWORK, LWKOPT, + $ MU, NB, NBMIN, NU, NX +* .. +* .. External Subroutines .. + EXTERNAL DGERQ2, DLARFB, DLARFT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'DGERQF', ' ', M, N, -1, -1 ) + LWKOPT = M*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGERQF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( K.EQ.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + NX = 1 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DGERQF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGERQF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially. +* The last kk rows are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* + DO 10 I = K - KK + KI + 1, K - KK + 1, -NB + IB = MIN( K-I+1, NB ) +* +* Compute the RQ factorization of the current block +* A(m-k+i:m-k+i+ib-1,1:n-k+i+ib-1) +* + CALL DGERQ2( IB, N-K+I+IB-1, A( M-K+I, 1 ), LDA, TAU( I ), + $ WORK, IINFO ) + IF( M-K+I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Rowwise', N-K+I+IB-1, IB, + $ A( M-K+I, 1 ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(1:m-k+i-1,1:n-k+i+ib-1) from the right +* + CALL DLARFB( 'Right', 'No transpose', 'Backward', + $ 'Rowwise', M-K+I-1, N-K+I+IB-1, IB, + $ A( M-K+I, 1 ), LDA, WORK, LDWORK, A, LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + MU = M - K + I + NB - 1 + NU = N - K + I + NB - 1 + ELSE + MU = M + NU = N + END IF +* +* Use unblocked code to factor the last or only block +* + IF( MU.GT.0 .AND. NU.GT.0 ) + $ CALL DGERQ2( MU, NU, A, LDA, TAU, WORK, IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of DGERQF +* + END diff --git a/2.3-1/src/fortran/lapack/dgesc2.f b/2.3-1/src/fortran/lapack/dgesc2.f new file mode 100644 index 00000000..1b0331f5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgesc2.f @@ -0,0 +1,132 @@ + SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + DOUBLE PRECISION A( LDA, * ), RHS( * ) +* .. +* +* Purpose +* ======= +* +* DGESC2 solves a system of linear equations +* +* A * X = scale* RHS +* +* with a general N-by-N matrix A using the LU factorization with +* complete pivoting computed by DGETC2. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the LU part of the factorization of the n-by-n +* matrix A computed by DGETC2: A = P * L * U * Q +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1, N). +* +* RHS (input/output) DOUBLE PRECISION array, dimension (N). +* On entry, the right hand side vector b. +* On exit, the solution vector X. +* +* IPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* SCALE (output) DOUBLE PRECISION +* On exit, SCALE contains the scale factor. SCALE is chosen +* 0 <= SCALE <= 1 to prevent owerflow in the solution. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, TWO + PARAMETER ( ONE = 1.0D+0, TWO = 2.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION BIGNUM, EPS, SMLNUM, TEMP +* .. +* .. External Subroutines .. + EXTERNAL DLASWP, DSCAL +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL IDAMAX, DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* +* Set constant to control owerflow +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Apply permutations IPIV to RHS +* + CALL DLASWP( 1, RHS, LDA, 1, N-1, IPIV, 1 ) +* +* Solve for L part +* + DO 20 I = 1, N - 1 + DO 10 J = I + 1, N + RHS( J ) = RHS( J ) - A( J, I )*RHS( I ) + 10 CONTINUE + 20 CONTINUE +* +* Solve for U part +* + SCALE = ONE +* +* Check for scaling +* + I = IDAMAX( N, RHS, 1 ) + IF( TWO*SMLNUM*ABS( RHS( I ) ).GT.ABS( A( N, N ) ) ) THEN + TEMP = ( ONE / TWO ) / ABS( RHS( I ) ) + CALL DSCAL( N, TEMP, RHS( 1 ), 1 ) + SCALE = SCALE*TEMP + END IF +* + DO 40 I = N, 1, -1 + TEMP = ONE / A( I, I ) + RHS( I ) = RHS( I )*TEMP + DO 30 J = I + 1, N + RHS( I ) = RHS( I ) - RHS( J )*( A( I, J )*TEMP ) + 30 CONTINUE + 40 CONTINUE +* +* Apply permutations JPIV to the solution (RHS) +* + CALL DLASWP( 1, RHS, LDA, 1, N-1, JPIV, -1 ) + RETURN +* +* End of DGESC2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgesv.f b/2.3-1/src/fortran/lapack/dgesv.f new file mode 100644 index 00000000..220ef56f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgesv.f @@ -0,0 +1,107 @@ + SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DGESV computes the solution to a real system of linear equations +* A * X = B, +* where A is an N-by-N matrix and X and B are N-by-NRHS matrices. +* +* The LU decomposition with partial pivoting and row interchanges is +* used to factor A as +* A = P * L * U, +* where P is a permutation matrix, L is unit lower triangular, and U is +* upper triangular. The factored form of A is then used to solve the +* system of equations A * X = B. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of linear equations, i.e., the order of the +* matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the N-by-N coefficient matrix A. +* On exit, the factors L and U from the factorization +* A = P*L*U; the unit diagonal elements of L are not stored. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension (N) +* The pivot indices that define the permutation matrix P; +* row i of the matrix was interchanged with row IPIV(i). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the N-by-NRHS matrix of right hand side matrix B. +* On exit, if INFO = 0, the N-by-NRHS solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, U(i,i) is exactly zero. The factorization +* has been completed, but the factor U is exactly +* singular, so the solution could not be computed. +* +* ===================================================================== +* +* .. External Subroutines .. + EXTERNAL DGETRF, DGETRS, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGESV ', -INFO ) + RETURN + END IF +* +* Compute the LU factorization of A. +* + CALL DGETRF( N, N, A, LDA, IPIV, INFO ) + IF( INFO.EQ.0 ) THEN +* +* Solve the system A*X = B, overwriting B with X. +* + CALL DGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB, + $ INFO ) + END IF + RETURN +* +* End of DGESV +* + END diff --git a/2.3-1/src/fortran/lapack/dgesvd.f b/2.3-1/src/fortran/lapack/dgesvd.f new file mode 100644 index 00000000..0b62ca10 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgesvd.f @@ -0,0 +1,3401 @@ + SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, + $ WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBU, JOBVT + INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), S( * ), U( LDU, * ), + $ VT( LDVT, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGESVD computes the singular value decomposition (SVD) of a real +* M-by-N matrix A, optionally computing the left and/or right singular +* vectors. The SVD is written +* +* A = U * SIGMA * transpose(V) +* +* where SIGMA is an M-by-N matrix which is zero except for its +* min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and +* V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA +* are the singular values of A; they are real and non-negative, and +* are returned in descending order. The first min(m,n) columns of +* U and V are the left and right singular vectors of A. +* +* Note that the routine returns V**T, not V. +* +* Arguments +* ========= +* +* JOBU (input) CHARACTER*1 +* Specifies options for computing all or part of the matrix U: +* = 'A': all M columns of U are returned in array U: +* = 'S': the first min(m,n) columns of U (the left singular +* vectors) are returned in the array U; +* = 'O': the first min(m,n) columns of U (the left singular +* vectors) are overwritten on the array A; +* = 'N': no columns of U (no left singular vectors) are +* computed. +* +* JOBVT (input) CHARACTER*1 +* Specifies options for computing all or part of the matrix +* V**T: +* = 'A': all N rows of V**T are returned in the array VT; +* = 'S': the first min(m,n) rows of V**T (the right singular +* vectors) are returned in the array VT; +* = 'O': the first min(m,n) rows of V**T (the right singular +* vectors) are overwritten on the array A; +* = 'N': no rows of V**T (no right singular vectors) are +* computed. +* +* JOBVT and JOBU cannot both be 'O'. +* +* M (input) INTEGER +* The number of rows of the input matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the input matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, +* if JOBU = 'O', A is overwritten with the first min(m,n) +* columns of U (the left singular vectors, +* stored columnwise); +* if JOBVT = 'O', A is overwritten with the first min(m,n) +* rows of V**T (the right singular vectors, +* stored rowwise); +* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A +* are destroyed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* S (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The singular values of A, sorted so that S(i) >= S(i+1). +* +* U (output) DOUBLE PRECISION array, dimension (LDU,UCOL) +* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'. +* If JOBU = 'A', U contains the M-by-M orthogonal matrix U; +* if JOBU = 'S', U contains the first min(m,n) columns of U +* (the left singular vectors, stored columnwise); +* if JOBU = 'N' or 'O', U is not referenced. +* +* LDU (input) INTEGER +* The leading dimension of the array U. LDU >= 1; if +* JOBU = 'S' or 'A', LDU >= M. +* +* VT (output) DOUBLE PRECISION array, dimension (LDVT,N) +* If JOBVT = 'A', VT contains the N-by-N orthogonal matrix +* V**T; +* if JOBVT = 'S', VT contains the first min(m,n) rows of +* V**T (the right singular vectors, stored rowwise); +* if JOBVT = 'N' or 'O', VT is not referenced. +* +* LDVT (input) INTEGER +* The leading dimension of the array VT. LDVT >= 1; if +* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK; +* if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged +* superdiagonal elements of an upper bidiagonal matrix B +* whose diagonal is in S (not necessarily sorted). B +* satisfies A = U * B * VT, so it has the same singular values +* as A, and singular vectors related by U and VT. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)). +* For good performance, LWORK should generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if DBDSQR did not converge, INFO specifies how many +* superdiagonals of an intermediate bidiagonal form B +* did not converge to zero. See the description of WORK +* above for details. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, WNTUA, WNTUAS, WNTUN, WNTUO, WNTUS, + $ WNTVA, WNTVAS, WNTVN, WNTVO, WNTVS + INTEGER BDSPAC, BLK, CHUNK, I, IE, IERR, IR, ISCL, + $ ITAU, ITAUP, ITAUQ, IU, IWORK, LDWRKR, LDWRKU, + $ MAXWRK, MINMN, MINWRK, MNTHR, NCU, NCVT, NRU, + $ NRVT, WRKBL + DOUBLE PRECISION ANRM, BIGNUM, EPS, SMLNUM +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DBDSQR, DGEBRD, DGELQF, DGEMM, DGEQRF, DLACPY, + $ DLASCL, DLASET, DORGBR, DORGLQ, DORGQR, DORMBR, + $ XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + MINMN = MIN( M, N ) + WNTUA = LSAME( JOBU, 'A' ) + WNTUS = LSAME( JOBU, 'S' ) + WNTUAS = WNTUA .OR. WNTUS + WNTUO = LSAME( JOBU, 'O' ) + WNTUN = LSAME( JOBU, 'N' ) + WNTVA = LSAME( JOBVT, 'A' ) + WNTVS = LSAME( JOBVT, 'S' ) + WNTVAS = WNTVA .OR. WNTVS + WNTVO = LSAME( JOBVT, 'O' ) + WNTVN = LSAME( JOBVT, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* + IF( .NOT.( WNTUA .OR. WNTUS .OR. WNTUO .OR. WNTUN ) ) THEN + INFO = -1 + ELSE IF( .NOT.( WNTVA .OR. WNTVS .OR. WNTVO .OR. WNTVN ) .OR. + $ ( WNTVO .AND. WNTUO ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN + INFO = -9 + ELSE IF( LDVT.LT.1 .OR. ( WNTVA .AND. LDVT.LT.N ) .OR. + $ ( WNTVS .AND. LDVT.LT.MINMN ) ) THEN + INFO = -11 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV.) +* + IF( INFO.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + IF( M.GE.N .AND. MINMN.GT.0 ) THEN +* +* Compute space needed for DBDSQR +* + MNTHR = ILAENV( 6, 'DGESVD', JOBU // JOBVT, M, N, 0, 0 ) + BDSPAC = 5*N + IF( M.GE.MNTHR ) THEN + IF( WNTUN ) THEN +* +* Path 1 (M much larger than N, JOBU='N') +* + MAXWRK = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, + $ -1 ) + MAXWRK = MAX( MAXWRK, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + IF( WNTVO .OR. WNTVAS ) + $ MAXWRK = MAX( MAXWRK, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MINWRK = MAX( 4*N, BDSPAC ) + ELSE IF( WNTUO .AND. WNTVN ) THEN +* +* Path 2 (M much larger than N, JOBU='O', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N ) + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUO .AND. WNTVAS ) THEN +* +* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N ) + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUS .AND. WNTVN ) THEN +* +* Path 4 (M much larger than N, JOBU='S', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUS .AND. WNTVO ) THEN +* +* Path 5 (M much larger than N, JOBU='S', JOBVT='O') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = 2*N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUS .AND. WNTVAS ) THEN +* +* Path 6 (M much larger than N, JOBU='S', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUA .AND. WNTVN ) THEN +* +* Path 7 (M much larger than N, JOBU='A', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUA .AND. WNTVO ) THEN +* +* Path 8 (M much larger than N, JOBU='A', JOBVT='O') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = 2*N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + ELSE IF( WNTUA .AND. WNTVAS ) THEN +* +* Path 9 (M much larger than N, JOBU='A', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+2*N* + $ ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = N*N + WRKBL + MINWRK = MAX( 3*N+M, BDSPAC ) + END IF + ELSE +* +* Path 10 (M at least N, but not much larger) +* + MAXWRK = 3*N + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, + $ -1, -1 ) + IF( WNTUS .OR. WNTUO ) + $ MAXWRK = MAX( MAXWRK, 3*N+N* + $ ILAENV( 1, 'DORGBR', 'Q', M, N, N, -1 ) ) + IF( WNTUA ) + $ MAXWRK = MAX( MAXWRK, 3*N+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, N, -1 ) ) + IF( .NOT.WNTVN ) + $ MAXWRK = MAX( MAXWRK, 3*N+( N-1 )* + $ ILAENV( 1, 'DORGBR', 'P', N, N, N, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MINWRK = MAX( 3*N+M, BDSPAC ) + END IF + ELSE IF( MINMN.GT.0 ) THEN +* +* Compute space needed for DBDSQR +* + MNTHR = ILAENV( 6, 'DGESVD', JOBU // JOBVT, M, N, 0, 0 ) + BDSPAC = 5*M + IF( N.GE.MNTHR ) THEN + IF( WNTVN ) THEN +* +* Path 1t(N much larger than M, JOBVT='N') +* + MAXWRK = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, + $ -1 ) + MAXWRK = MAX( MAXWRK, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + IF( WNTUO .OR. WNTUAS ) + $ MAXWRK = MAX( MAXWRK, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MINWRK = MAX( 4*M, BDSPAC ) + ELSE IF( WNTVO .AND. WNTUN ) THEN +* +* Path 2t(N much larger than M, JOBU='N', JOBVT='O') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M ) + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVO .AND. WNTUAS ) THEN +* +* Path 3t(N much larger than M, JOBU='S' or 'A', +* JOBVT='O') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M ) + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVS .AND. WNTUN ) THEN +* +* Path 4t(N much larger than M, JOBU='N', JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVS .AND. WNTUO ) THEN +* +* Path 5t(N much larger than M, JOBU='O', JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = 2*M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVS .AND. WNTUAS ) THEN +* +* Path 6t(N much larger than M, JOBU='S' or 'A', +* JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVA .AND. WNTUN ) THEN +* +* Path 7t(N much larger than M, JOBU='N', JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVA .AND. WNTUO ) THEN +* +* Path 8t(N much larger than M, JOBU='O', JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = 2*M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + ELSE IF( WNTVA .AND. WNTUAS ) THEN +* +* Path 9t(N much larger than M, JOBU='S' or 'A', +* JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+2*M* + $ ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, BDSPAC ) + MAXWRK = M*M + WRKBL + MINWRK = MAX( 3*M+N, BDSPAC ) + END IF + ELSE +* +* Path 10t(N greater than M, but not much larger) +* + MAXWRK = 3*M + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, + $ -1, -1 ) + IF( WNTVS .OR. WNTVO ) + $ MAXWRK = MAX( MAXWRK, 3*M+M* + $ ILAENV( 1, 'DORGBR', 'P', M, N, M, -1 ) ) + IF( WNTVA ) + $ MAXWRK = MAX( MAXWRK, 3*M+N* + $ ILAENV( 1, 'DORGBR', 'P', N, N, M, -1 ) ) + IF( .NOT.WNTUN ) + $ MAXWRK = MAX( MAXWRK, 3*M+( M-1 )* + $ ILAENV( 1, 'DORGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = MAX( MAXWRK, BDSPAC ) + MINWRK = MAX( 3*M+N, BDSPAC ) + END IF + END IF + MAXWRK = MAX( MAXWRK, MINWRK ) + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGESVD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', M, N, A, LDA, DUM ) + ISCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ISCL = 1 + CALL DLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR ) + ELSE IF( ANRM.GT.BIGNUM ) THEN + ISCL = 1 + CALL DLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR ) + END IF +* + IF( M.GE.N ) THEN +* +* A has at least as many rows as columns. If A has sufficiently +* more rows than columns, first reduce using the QR +* decomposition (if sufficient workspace available) +* + IF( M.GE.MNTHR ) THEN +* + IF( WNTUN ) THEN +* +* Path 1 (M much larger than N, JOBU='N') +* No left singular vectors to be computed +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Zero out below R +* + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), LDA ) + IE = 1 + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in A +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + NCVT = 0 + IF( WNTVO .OR. WNTVAS ) THEN +* +* If right singular vectors desired, generate P'. +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + NCVT = N + END IF + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in A if desired +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, NCVT, 0, 0, S, WORK( IE ), A, LDA, + $ DUM, 1, DUM, 1, WORK( IWORK ), INFO ) +* +* If right singular vectors desired in VT, copy them there +* + IF( WNTVAS ) + $ CALL DLACPY( 'F', N, N, A, LDA, VT, LDVT ) +* + ELSE IF( WNTUO .AND. WNTVN ) THEN +* +* Path 2 (M much larger than N, JOBU='O', JOBVT='N') +* N left singular vectors to be overwritten on A and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN +* +* WORK(IU) is LDA by N, WORK(IR) is LDA by N +* + LDWRKU = LDA + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN +* +* WORK(IU) is LDA by N, WORK(IR) is N by N +* + LDWRKU = LDA + LDWRKR = N + ELSE +* +* WORK(IU) is LDWRKU by N, WORK(IR) is N by N +* + LDWRKU = ( LWORK-N*N-N ) / N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IR) and zero out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, WORK( IR+1 ), + $ LDWRKR ) +* +* Generate Q in A +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing R +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, 1, + $ WORK( IR ), LDWRKR, DUM, 1, + $ WORK( IWORK ), INFO ) + IU = IE + N +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in WORK(IU) and copying to A +* (Workspace: need N*N+2*N, prefer N*N+M*N+N) +* + DO 10 I = 1, M, LDWRKU + CHUNK = MIN( M-I+1, LDWRKU ) + CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ), + $ LDA, WORK( IR ), LDWRKR, ZERO, + $ WORK( IU ), LDWRKU ) + CALL DLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, + $ A( I, 1 ), LDA ) + 10 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + IE = 1 + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize A +* (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB) +* + CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing A +* (Workspace: need 4*N, prefer 3*N+N*NB) +* + CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, 1, + $ A, LDA, DUM, 1, WORK( IWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUO .AND. WNTVAS ) THEN +* +* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or 'A') +* N left singular vectors to be overwritten on A and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + LDWRKR = N + ELSE +* +* WORK(IU) is LDWRKU by N and WORK(IR) is N by N +* + LDWRKU = ( LWORK-N*N-N ) / N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ VT( 2, 1 ), LDVT ) +* +* Generate Q in A +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT, copying result to WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR ) +* +* Generate left vectors bidiagonalizing R in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in VT +* (Workspace: need N*N+4*N-1, prefer N*N+3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) and computing right +* singular vectors of R in VT +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, LDVT, + $ WORK( IR ), LDWRKR, DUM, 1, + $ WORK( IWORK ), INFO ) + IU = IE + N +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in WORK(IU) and copying to A +* (Workspace: need N*N+2*N, prefer N*N+M*N+N) +* + DO 20 I = 1, M, LDWRKU + CHUNK = MIN( M-I+1, LDWRKU ) + CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ), + $ LDA, WORK( IR ), LDWRKR, ZERO, + $ WORK( IU ), LDWRKU ) + CALL DLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, + $ A( I, 1 ), LDA ) + 20 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ VT( 2, 1 ), LDVT ) +* +* Generate Q in A +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in A by left vectors bidiagonalizing R +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), A, LDA, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in VT +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, LDVT, + $ A, LDA, DUM, 1, WORK( IWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUS ) THEN +* + IF( WNTVN ) THEN +* +* Path 4 (M much larger than N, JOBU='S', JOBVT='N') +* N left singular vectors to be computed in U and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IR) is LDA by N +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is N by N +* + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IR), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IR+1 ), LDWRKR ) +* +* Generate Q in A +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing R in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, + $ 1, WORK( IR ), LDWRKR, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in U +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, + $ WORK( IR ), LDWRKR, ZERO, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), + $ LDA ) +* +* Bidiagonalize R in A +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left vectors bidiagonalizing R +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, + $ 1, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVO ) THEN +* +* Path 5 (M much larger than N, JOBU='S', JOBVT='O') +* N left singular vectors to be computed in U and +* N right singular vectors to be overwritten on A +* + IF( LWORK.GE.2*N*N+MAX( 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = N + ELSE +* +* WORK(IU) is N by N and WORK(IR) is N by N +* + LDWRKU = N + IR = IU + LDWRKU*N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IU+1 ), LDWRKU ) +* +* Generate Q in A +* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to +* WORK(IR) +* (Workspace: need 2*N*N+4*N, +* prefer 2*N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (Workspace: need 2*N*N+4*N-1, +* prefer 2*N*N+3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in WORK(IR) +* (Workspace: need 2*N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, WORK( IU ), + $ LDWRKU, DUM, 1, WORK( IWORK ), INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IU), storing result in U +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, + $ WORK( IU ), LDWRKU, ZERO, U, LDU ) +* +* Copy right singular vectors of R to A +* (Workspace: need N*N) +* + CALL DLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), + $ LDA ) +* +* Bidiagonalize R in A +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left vectors bidiagonalizing R +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in A +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), A, + $ LDA, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVAS ) THEN +* +* Path 6 (M much larger than N, JOBU='S', JOBVT='S' +* or 'A') +* N left singular vectors to be computed in U and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+MAX( 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is N by N +* + LDWRKU = N + END IF + ITAU = IU + LDWRKU*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IU+1 ), LDWRKU ) +* +* Generate Q in A +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to VT +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, + $ LDVT ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (Workspace: need N*N+4*N-1, +* prefer N*N+3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in VT +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, + $ LDVT, WORK( IU ), LDWRKU, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IU), storing result in U +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, + $ WORK( IU ), LDWRKU, ZERO, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ VT( 2, 1 ), LDVT ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in VT +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + END IF +* + ELSE IF( WNTUA ) THEN +* + IF( WNTVN ) THEN +* +* Path 7 (M much larger than N, JOBU='A', JOBVT='N') +* M left singular vectors to be computed in U and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IR) is LDA by N +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is N by N +* + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Copy R to WORK(IR), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IR+1 ), LDWRKR ) +* +* Generate Q in U +* (Workspace: need N*N+N+M, prefer N*N+N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, + $ 1, WORK( IR ), LDWRKR, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IR), storing result in A +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, + $ WORK( IR ), LDWRKR, ZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need N+M, prefer N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), + $ LDA ) +* +* Bidiagonalize R in A +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in A +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, 0, M, 0, S, WORK( IE ), DUM, + $ 1, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVO ) THEN +* +* Path 8 (M much larger than N, JOBU='A', JOBVT='O') +* M left singular vectors to be computed in U and +* N right singular vectors to be overwritten on A +* + IF( LWORK.GE.2*N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = N + ELSE +* +* WORK(IU) is N by N and WORK(IR) is N by N +* + LDWRKU = N + IR = IU + LDWRKU*N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IU+1 ), LDWRKU ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to +* WORK(IR) +* (Workspace: need 2*N*N+4*N, +* prefer 2*N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (Workspace: need 2*N*N+4*N-1, +* prefer 2*N*N+3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in WORK(IR) +* (Workspace: need 2*N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, WORK( IU ), + $ LDWRKU, DUM, 1, WORK( IWORK ), INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IU), storing result in A +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, + $ WORK( IU ), LDWRKU, ZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) +* +* Copy right singular vectors of R from WORK(IR) to A +* + CALL DLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need N+M, prefer N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), + $ LDA ) +* +* Bidiagonalize R in A +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in A +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in A +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), A, + $ LDA, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVAS ) THEN +* +* Path 9 (M much larger than N, JOBU='A', JOBVT='S' +* or 'A') +* M left singular vectors to be computed in U and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+MAX( N+M, 4*N, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is N by N +* + LDWRKU = N + END IF + ITAU = IU + LDWRKU*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need N*N+2*N, prefer N*N+N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need N*N+N+M, prefer N*N+N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ WORK( IU+1 ), LDWRKU ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to VT +* (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB) +* + CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, + $ LDVT ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB) +* + CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (Workspace: need N*N+4*N-1, +* prefer N*N+3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in VT +* (Workspace: need N*N+BDSPAC) +* + CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, + $ LDVT, WORK( IU ), LDWRKU, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IU), storing result in A +* (Workspace: need N*N) +* + CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, + $ WORK( IU ), LDWRKU, ZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL DLACPY( 'F', M, N, A, LDA, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (Workspace: need 2*N, prefer N+N*NB) +* + CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (Workspace: need N+M, prefer N+M*NB) +* + CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R from A to VT, zeroing out below it +* + CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, + $ VT( 2, 1 ), LDVT ) + IE = ITAU + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (Workspace: need 4*N, prefer 3*N+2*N*NB) +* + CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in VT +* (Workspace: need 3*N+M, prefer 3*N+M*NB) +* + CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, N, M, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + END IF +* + END IF +* + ELSE +* +* M .LT. MNTHR +* +* Path 10 (M at least N, but not much larger) +* Reduce to bidiagonal form without QR decomposition +* + IE = 1 + ITAUQ = IE + N + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize A +* (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB) +* + CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUAS ) THEN +* +* If left singular vectors desired in U, copy result to U +* and generate left bidiagonalizing vectors in U +* (Workspace: need 3*N+NCU, prefer 3*N+NCU*NB) +* + CALL DLACPY( 'L', M, N, A, LDA, U, LDU ) + IF( WNTUS ) + $ NCU = N + IF( WNTUA ) + $ NCU = M + CALL DORGBR( 'Q', M, NCU, N, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVAS ) THEN +* +* If right singular vectors desired in VT, copy result to +* VT and generate right bidiagonalizing vectors in VT +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT ) + CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTUO ) THEN +* +* If left singular vectors desired in A, generate left +* bidiagonalizing vectors in A +* (Workspace: need 4*N, prefer 3*N+N*NB) +* + CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVO ) THEN +* +* If right singular vectors desired in A, generate right +* bidiagonalizing vectors in A +* (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB) +* + CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IWORK = IE + N + IF( WNTUAS .OR. WNTUO ) + $ NRU = M + IF( WNTUN ) + $ NRU = 0 + IF( WNTVAS .OR. WNTVO ) + $ NCVT = N + IF( WNTVN ) + $ NCVT = 0 + IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), INFO ) + ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), A, LDA, + $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) + ELSE +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in A and computing right singular +* vectors in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', N, NCVT, NRU, 0, S, WORK( IE ), VT, + $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), INFO ) + END IF +* + END IF +* + ELSE +* +* A has more columns than rows. If A has sufficiently more +* columns than rows, first reduce using the LQ decomposition (if +* sufficient workspace available) +* + IF( N.GE.MNTHR ) THEN +* + IF( WNTVN ) THEN +* +* Path 1t(N much larger than M, JOBVT='N') +* No right singular vectors to be computed +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Zero out above L +* + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), LDA ) + IE = 1 + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in A +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUO .OR. WNTUAS ) THEN +* +* If left singular vectors desired, generate Q +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IWORK = IE + M + NRU = 0 + IF( WNTUO .OR. WNTUAS ) + $ NRU = M +* +* Perform bidiagonal QR iteration, computing left singular +* vectors of A in A if desired +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, 0, NRU, 0, S, WORK( IE ), DUM, 1, A, + $ LDA, DUM, 1, WORK( IWORK ), INFO ) +* +* If left singular vectors desired in U, copy them there +* + IF( WNTUAS ) + $ CALL DLACPY( 'F', M, M, A, LDA, U, LDU ) +* + ELSE IF( WNTVO .AND. WNTUN ) THEN +* +* Path 2t(N much larger than M, JOBU='N', JOBVT='O') +* M right singular vectors to be overwritten on A and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is M by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = M + ELSE +* +* WORK(IU) is M by CHUNK and WORK(IR) is M by M +* + LDWRKU = M + CHUNK = ( LWORK-M*M-M ) / M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IR) and zero out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), LDWRKR ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in A +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing L +* (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, + $ WORK( IWORK ), INFO ) + IU = IE + M +* +* Multiply right singular vectors of L in WORK(IR) by Q +* in A, storing result in WORK(IU) and copying to A +* (Workspace: need M*M+2*M, prefer M*M+M*N+M) +* + DO 30 I = 1, N, CHUNK + BLK = MIN( N-I+1, CHUNK ) + CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IR ), + $ LDWRKR, A( 1, I ), LDA, ZERO, + $ WORK( IU ), LDWRKU ) + CALL DLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, + $ A( 1, I ), LDA ) + 30 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + IE = 1 + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize A +* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) +* + CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing A +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'L', M, N, 0, 0, S, WORK( IE ), A, LDA, + $ DUM, 1, DUM, 1, WORK( IWORK ), INFO ) +* + END IF +* + ELSE IF( WNTVO .AND. WNTUAS ) THEN +* +* Path 3t(N much larger than M, JOBU='S' or 'A', JOBVT='O') +* M right singular vectors to be overwritten on A and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is M by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = M + ELSE +* +* WORK(IU) is M by CHUNK and WORK(IR) is M by M +* + LDWRKU = M + CHUNK = ( LWORK-M*M-M ) / M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing about above it +* + CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), + $ LDU ) +* +* Generate Q in A +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U, copying result to WORK(IR) +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR ) +* +* Generate right vectors bidiagonalizing L in WORK(IR) +* (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing L in U +* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U, and computing right +* singular vectors of L in WORK(IR) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, U, LDU, DUM, 1, + $ WORK( IWORK ), INFO ) + IU = IE + M +* +* Multiply right singular vectors of L in WORK(IR) by Q +* in A, storing result in WORK(IU) and copying to A +* (Workspace: need M*M+2*M, prefer M*M+M*N+M)) +* + DO 40 I = 1, N, CHUNK + BLK = MIN( N-I+1, CHUNK ) + CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IR ), + $ LDWRKR, A( 1, I ), LDA, ZERO, + $ WORK( IU ), LDWRKU ) + CALL DLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, + $ A( 1, I ), LDA ) + 40 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), + $ LDU ) +* +* Generate Q in A +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in A +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, + $ WORK( ITAUP ), A, LDA, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing L in U +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), A, LDA, + $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) +* + END IF +* + ELSE IF( WNTVS ) THEN +* + IF( WNTUN ) THEN +* +* Path 4t(N much larger than M, JOBU='N', JOBVT='S') +* M right singular vectors to be computed in VT and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IR) is LDA by M +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is M by M +* + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IR), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in A +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing L in +* WORK(IR) +* (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IR) by +* Q in A, storing result in VT +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IR ), + $ LDWRKR, A, LDA, ZERO, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy result to VT +* + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), + $ LDA ) +* +* Bidiagonalize L in A +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, 0, 0, S, WORK( IE ), VT, + $ LDVT, DUM, 1, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTUO ) THEN +* +* Path 5t(N much larger than M, JOBU='O', JOBVT='S') +* M right singular vectors to be computed in VT and +* M left singular vectors to be overwritten on A +* + IF( LWORK.GE.2*M*M+MAX( 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is LDA by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is M by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = M + ELSE +* +* WORK(IU) is M by M and WORK(IR) is M by M +* + LDWRKU = M + IR = IU + LDWRKU*M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out below it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) +* +* Generate Q in A +* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to +* WORK(IR) +* (Workspace: need 2*M*M+4*M, +* prefer 2*M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (Workspace: need 2*M*M+4*M-1, +* prefer 2*M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in WORK(IR) and computing +* right singular vectors of L in WORK(IU) +* (Workspace: need 2*M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), + $ WORK( IU ), LDWRKU, WORK( IR ), + $ LDWRKR, DUM, 1, WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in A, storing result in VT +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), + $ LDWRKU, A, LDA, ZERO, VT, LDVT ) +* +* Copy left singular vectors of L to A +* (Workspace: need M*M) +* + CALL DLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), + $ LDA ) +* +* Bidiagonalize L in A +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors of L in A +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, compute left +* singular vectors of A in A and compute right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, + $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTUAS ) THEN +* +* Path 6t(N much larger than M, JOBU='S' or 'A', +* JOBVT='S') +* M right singular vectors to be computed in VT and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+MAX( 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is LDA by M +* + LDWRKU = M + END IF + ITAU = IU + LDWRKU*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) +* +* Generate Q in A +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to U +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, + $ LDU ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (Workspace: need M*M+4*M-1, +* prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U and computing right +* singular vectors of L in WORK(IU) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), + $ WORK( IU ), LDWRKU, U, LDU, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in A, storing result in VT +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), + $ LDWRKU, A, LDA, ZERO, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), + $ LDU ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in U by Q +* in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + END IF +* + ELSE IF( WNTVA ) THEN +* + IF( WNTUN ) THEN +* +* Path 7t(N much larger than M, JOBU='N', JOBVT='A') +* N right singular vectors to be computed in VT and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IR) is LDA by M +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is M by M +* + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Copy L to WORK(IR), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in VT +* (Workspace: need M*M+M+N, prefer M*M+M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (Workspace: need M*M+4*M-1, +* prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ), + $ WORK( IR ), LDWRKR, DUM, 1, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IR) by +* Q in VT, storing result in A +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IR ), + $ LDWRKR, VT, LDVT, ZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need M+N, prefer M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), + $ LDA ) +* +* Bidiagonalize L in A +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in A by Q +* in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, 0, 0, S, WORK( IE ), VT, + $ LDVT, DUM, 1, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTUO ) THEN +* +* Path 8t(N much larger than M, JOBU='O', JOBVT='A') +* N right singular vectors to be computed in VT and +* M left singular vectors to be overwritten on A +* + IF( LWORK.GE.2*M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is LDA by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is M by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = M + ELSE +* +* WORK(IU) is M by M and WORK(IR) is M by M +* + LDWRKU = M + IR = IU + LDWRKU*M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to +* WORK(IR) +* (Workspace: need 2*M*M+4*M, +* prefer 2*M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (Workspace: need 2*M*M+4*M-1, +* prefer 2*M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in WORK(IR) and computing +* right singular vectors of L in WORK(IU) +* (Workspace: need 2*M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), + $ WORK( IU ), LDWRKU, WORK( IR ), + $ LDWRKR, DUM, 1, WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in VT, storing result in A +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), + $ LDWRKU, VT, LDVT, ZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* +* Copy left singular vectors of A from WORK(IR) to A +* + CALL DLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need M+N, prefer M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, A( 1, 2 ), + $ LDA ) +* +* Bidiagonalize L in A +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in A by Q +* in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in A +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, + $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTUAS ) THEN +* +* Path 9t(N much larger than M, JOBU='S' or 'A', +* JOBVT='A') +* N right singular vectors to be computed in VT and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IU) is LDA by M +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is M by M +* + LDWRKU = M + END IF + ITAU = IU + LDWRKU*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need M*M+2*M, prefer M*M+M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need M*M+M+N, prefer M*M+M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to U +* (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB) +* + CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL DLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, + $ LDU ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB) +* + CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U and computing right +* singular vectors of L in WORK(IU) +* (Workspace: need M*M+BDSPAC) +* + CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ), + $ WORK( IU ), LDWRKU, U, LDU, DUM, 1, + $ WORK( IWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in VT, storing result in A +* (Workspace: need M*M) +* + CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IU ), + $ LDWRKU, VT, LDVT, ZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL DLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (Workspace: need 2*M, prefer M+M*NB) +* + CALL DGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (Workspace: need M+N, prefer M+N*NB) +* + CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL DLASET( 'U', M-1, M-1, ZERO, ZERO, U( 1, 2 ), + $ LDU ) + IE = ITAU + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (Workspace: need 4*M, prefer 3*M+2*M*NB) +* + CALL DGEBRD( M, M, U, LDU, S, WORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in U by Q +* in VT +* (Workspace: need 3*M+N, prefer 3*M+N*NB) +* + CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'U', M, N, M, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), + $ INFO ) +* + END IF +* + END IF +* + END IF +* + ELSE +* +* N .LT. MNTHR +* +* Path 10t(N greater than M, but not much larger) +* Reduce to bidiagonal form without LQ decomposition +* + IE = 1 + ITAUQ = IE + M + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize A +* (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB) +* + CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUAS ) THEN +* +* If left singular vectors desired in U, copy result to U +* and generate left bidiagonalizing vectors in U +* (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB) +* + CALL DLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL DORGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVAS ) THEN +* +* If right singular vectors desired in VT, copy result to +* VT and generate right bidiagonalizing vectors in VT +* (Workspace: need 3*M+NRVT, prefer 3*M+NRVT*NB) +* + CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT ) + IF( WNTVA ) + $ NRVT = N + IF( WNTVS ) + $ NRVT = M + CALL DORGBR( 'P', NRVT, N, M, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTUO ) THEN +* +* If left singular vectors desired in A, generate left +* bidiagonalizing vectors in A +* (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB) +* + CALL DORGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVO ) THEN +* +* If right singular vectors desired in A, generate right +* bidiagonalizing vectors in A +* (Workspace: need 4*M, prefer 3*M+M*NB) +* + CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IWORK = IE + M + IF( WNTUAS .OR. WNTUO ) + $ NRU = M + IF( WNTUN ) + $ NRU = 0 + IF( WNTVAS .OR. WNTVO ) + $ NCVT = N + IF( WNTVN ) + $ NCVT = 0 + IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), VT, + $ LDVT, U, LDU, DUM, 1, WORK( IWORK ), INFO ) + ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in A +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), A, LDA, + $ U, LDU, DUM, 1, WORK( IWORK ), INFO ) + ELSE +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in A and computing right singular +* vectors in VT +* (Workspace: need BDSPAC) +* + CALL DBDSQR( 'L', M, NCVT, NRU, 0, S, WORK( IE ), VT, + $ LDVT, A, LDA, DUM, 1, WORK( IWORK ), INFO ) + END IF +* + END IF +* + END IF +* +* If DBDSQR failed to converge, copy unconverged superdiagonals +* to WORK( 2:MINMN ) +* + IF( INFO.NE.0 ) THEN + IF( IE.GT.2 ) THEN + DO 50 I = 1, MINMN - 1 + WORK( I+1 ) = WORK( I+IE-1 ) + 50 CONTINUE + END IF + IF( IE.LT.2 ) THEN + DO 60 I = MINMN - 1, 1, -1 + WORK( I+1 ) = WORK( I+IE-1 ) + 60 CONTINUE + END IF + END IF +* +* Undo scaling if necessary +* + IF( ISCL.EQ.1 ) THEN + IF( ANRM.GT.BIGNUM ) + $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN, + $ IERR ) + IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM ) + $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1, WORK( 2 ), + $ MINMN, IERR ) + IF( ANRM.LT.SMLNUM ) + $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN, + $ IERR ) + IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM ) + $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1, WORK( 2 ), + $ MINMN, IERR ) + END IF +* +* Return optimal workspace in WORK(1) +* + WORK( 1 ) = MAXWRK +* + RETURN +* +* End of DGESVD +* + END diff --git a/2.3-1/src/fortran/lapack/dgesvx.f b/2.3-1/src/fortran/lapack/dgesvx.f new file mode 100644 index 00000000..0645a20c --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgesvx.f @@ -0,0 +1,479 @@ + SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, + $ EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR, + $ WORK, IWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER EQUED, FACT, TRANS + INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), IWORK( * ) + DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ), + $ BERR( * ), C( * ), FERR( * ), R( * ), + $ WORK( * ), X( LDX, * ) +* .. +* +* Purpose +* ======= +* +* DGESVX uses the LU factorization to compute the solution to a real +* system of linear equations +* A * X = B, +* where A is an N-by-N matrix and X and B are N-by-NRHS matrices. +* +* Error bounds on the solution and a condition estimate are also +* provided. +* +* Description +* =========== +* +* The following steps are performed: +* +* 1. If FACT = 'E', real scaling factors are computed to equilibrate +* the system: +* TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B +* TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B +* TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B +* Whether or not the system will be equilibrated depends on the +* scaling of the matrix A, but if equilibration is used, A is +* overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N') +* or diag(C)*B (if TRANS = 'T' or 'C'). +* +* 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the +* matrix A (after equilibration if FACT = 'E') as +* A = P * L * U, +* where P is a permutation matrix, L is a unit lower triangular +* matrix, and U is upper triangular. +* +* 3. If some U(i,i)=0, so that U is exactly singular, then the routine +* returns with INFO = i. Otherwise, the factored form of A is used +* to estimate the condition number of the matrix A. If the +* reciprocal of the condition number is less than machine precision, +* INFO = N+1 is returned as a warning, but the routine still goes on +* to solve for X and compute error bounds as described below. +* +* 4. The system of equations is solved for X using the factored form +* of A. +* +* 5. Iterative refinement is applied to improve the computed solution +* matrix and calculate error bounds and backward error estimates +* for it. +* +* 6. If equilibration was used, the matrix X is premultiplied by +* diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so +* that it solves the original system before equilibration. +* +* Arguments +* ========= +* +* FACT (input) CHARACTER*1 +* Specifies whether or not the factored form of the matrix A is +* supplied on entry, and if not, whether the matrix A should be +* equilibrated before it is factored. +* = 'F': On entry, AF and IPIV contain the factored form of A. +* If EQUED is not 'N', the matrix A has been +* equilibrated with scaling factors given by R and C. +* A, AF, and IPIV are not modified. +* = 'N': The matrix A will be copied to AF and factored. +* = 'E': The matrix A will be equilibrated if necessary, then +* copied to AF and factored. +* +* TRANS (input) CHARACTER*1 +* Specifies the form of the system of equations: +* = 'N': A * X = B (No transpose) +* = 'T': A**T * X = B (Transpose) +* = 'C': A**H * X = B (Transpose) +* +* N (input) INTEGER +* The number of linear equations, i.e., the order of the +* matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrices B and X. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the N-by-N matrix A. If FACT = 'F' and EQUED is +* not 'N', then A must have been equilibrated by the scaling +* factors in R and/or C. A is not modified if FACT = 'F' or +* 'N', or if FACT = 'E' and EQUED = 'N' on exit. +* +* On exit, if EQUED .ne. 'N', A is scaled as follows: +* EQUED = 'R': A := diag(R) * A +* EQUED = 'C': A := A * diag(C) +* EQUED = 'B': A := diag(R) * A * diag(C). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* AF (input or output) DOUBLE PRECISION array, dimension (LDAF,N) +* If FACT = 'F', then AF is an input argument and on entry +* contains the factors L and U from the factorization +* A = P*L*U as computed by DGETRF. If EQUED .ne. 'N', then +* AF is the factored form of the equilibrated matrix A. +* +* If FACT = 'N', then AF is an output argument and on exit +* returns the factors L and U from the factorization A = P*L*U +* of the original matrix A. +* +* If FACT = 'E', then AF is an output argument and on exit +* returns the factors L and U from the factorization A = P*L*U +* of the equilibrated matrix A (see the description of A for +* the form of the equilibrated matrix). +* +* LDAF (input) INTEGER +* The leading dimension of the array AF. LDAF >= max(1,N). +* +* IPIV (input or output) INTEGER array, dimension (N) +* If FACT = 'F', then IPIV is an input argument and on entry +* contains the pivot indices from the factorization A = P*L*U +* as computed by DGETRF; row i of the matrix was interchanged +* with row IPIV(i). +* +* If FACT = 'N', then IPIV is an output argument and on exit +* contains the pivot indices from the factorization A = P*L*U +* of the original matrix A. +* +* If FACT = 'E', then IPIV is an output argument and on exit +* contains the pivot indices from the factorization A = P*L*U +* of the equilibrated matrix A. +* +* EQUED (input or output) CHARACTER*1 +* Specifies the form of equilibration that was done. +* = 'N': No equilibration (always true if FACT = 'N'). +* = 'R': Row equilibration, i.e., A has been premultiplied by +* diag(R). +* = 'C': Column equilibration, i.e., A has been postmultiplied +* by diag(C). +* = 'B': Both row and column equilibration, i.e., A has been +* replaced by diag(R) * A * diag(C). +* EQUED is an input argument if FACT = 'F'; otherwise, it is an +* output argument. +* +* R (input or output) DOUBLE PRECISION array, dimension (N) +* The row scale factors for A. If EQUED = 'R' or 'B', A is +* multiplied on the left by diag(R); if EQUED = 'N' or 'C', R +* is not accessed. R is an input argument if FACT = 'F'; +* otherwise, R is an output argument. If FACT = 'F' and +* EQUED = 'R' or 'B', each element of R must be positive. +* +* C (input or output) DOUBLE PRECISION array, dimension (N) +* The column scale factors for A. If EQUED = 'C' or 'B', A is +* multiplied on the right by diag(C); if EQUED = 'N' or 'R', C +* is not accessed. C is an input argument if FACT = 'F'; +* otherwise, C is an output argument. If FACT = 'F' and +* EQUED = 'C' or 'B', each element of C must be positive. +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the N-by-NRHS right hand side matrix B. +* On exit, +* if EQUED = 'N', B is not modified; +* if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by +* diag(R)*B; +* if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is +* overwritten by diag(C)*B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS) +* If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X +* to the original system of equations. Note that A and B are +* modified on exit if EQUED .ne. 'N', and the solution to the +* equilibrated system is inv(diag(C))*X if TRANS = 'N' and +* EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C' +* and EQUED = 'R' or 'B'. +* +* LDX (input) INTEGER +* The leading dimension of the array X. LDX >= max(1,N). +* +* RCOND (output) DOUBLE PRECISION +* The estimate of the reciprocal condition number of the matrix +* A after equilibration (if done). If RCOND is less than the +* machine precision (in particular, if RCOND = 0), the matrix +* is singular to working precision. This condition is +* indicated by a return code of INFO > 0. +* +* FERR (output) DOUBLE PRECISION array, dimension (NRHS) +* The estimated forward error bound for each solution vector +* X(j) (the j-th column of the solution matrix X). +* If XTRUE is the true solution corresponding to X(j), FERR(j) +* is an estimated upper bound for the magnitude of the largest +* element in (X(j) - XTRUE) divided by the magnitude of the +* largest element in X(j). The estimate is as reliable as +* the estimate for RCOND, and is almost always a slight +* overestimate of the true error. +* +* BERR (output) DOUBLE PRECISION array, dimension (NRHS) +* The componentwise relative backward error of each solution +* vector X(j) (i.e., the smallest relative change in +* any element of A or B that makes X(j) an exact solution). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (4*N) +* On exit, WORK(1) contains the reciprocal pivot growth +* factor norm(A)/norm(U). The "max absolute element" norm is +* used. If WORK(1) is much less than 1, then the stability +* of the LU factorization of the (equilibrated) matrix A +* could be poor. This also means that the solution X, condition +* estimator RCOND, and forward error bound FERR could be +* unreliable. If factorization fails with 0 0: if INFO = i, and i is +* <= N: U(i,i) is exactly zero. The factorization has +* been completed, but the factor U is exactly +* singular, so the solution and error bounds +* could not be computed. RCOND = 0 is returned. +* = N+1: U is nonsingular, but RCOND is less than machine +* precision, meaning that the matrix is singular +* to working precision. Nevertheless, the +* solution and error bounds are computed because +* there are a number of situations where the +* computed solution can be more accurate than the +* value of RCOND would suggest. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU + CHARACTER NORM + INTEGER I, INFEQU, J + DOUBLE PRECISION AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN, + $ ROWCND, RPVGRW, SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, DLANGE, DLANTR + EXTERNAL LSAME, DLAMCH, DLANGE, DLANTR +* .. +* .. External Subroutines .. + EXTERNAL DGECON, DGEEQU, DGERFS, DGETRF, DGETRS, DLACPY, + $ DLAQGE, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* + INFO = 0 + NOFACT = LSAME( FACT, 'N' ) + EQUIL = LSAME( FACT, 'E' ) + NOTRAN = LSAME( TRANS, 'N' ) + IF( NOFACT .OR. EQUIL ) THEN + EQUED = 'N' + ROWEQU = .FALSE. + COLEQU = .FALSE. + ELSE + ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' ) + COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' ) + SMLNUM = DLAMCH( 'Safe minimum' ) + BIGNUM = ONE / SMLNUM + END IF +* +* Test the input parameters. +* + IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) ) + $ THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT. + $ ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN + INFO = -10 + ELSE + IF( ROWEQU ) THEN + RCMIN = BIGNUM + RCMAX = ZERO + DO 10 J = 1, N + RCMIN = MIN( RCMIN, R( J ) ) + RCMAX = MAX( RCMAX, R( J ) ) + 10 CONTINUE + IF( RCMIN.LE.ZERO ) THEN + INFO = -11 + ELSE IF( N.GT.0 ) THEN + ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM ) + ELSE + ROWCND = ONE + END IF + END IF + IF( COLEQU .AND. INFO.EQ.0 ) THEN + RCMIN = BIGNUM + RCMAX = ZERO + DO 20 J = 1, N + RCMIN = MIN( RCMIN, C( J ) ) + RCMAX = MAX( RCMAX, C( J ) ) + 20 CONTINUE + IF( RCMIN.LE.ZERO ) THEN + INFO = -12 + ELSE IF( N.GT.0 ) THEN + COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM ) + ELSE + COLCND = ONE + END IF + END IF + IF( INFO.EQ.0 ) THEN + IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -14 + ELSE IF( LDX.LT.MAX( 1, N ) ) THEN + INFO = -16 + END IF + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGESVX', -INFO ) + RETURN + END IF +* + IF( EQUIL ) THEN +* +* Compute row and column scalings to equilibrate the matrix A. +* + CALL DGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU ) + IF( INFEQU.EQ.0 ) THEN +* +* Equilibrate the matrix. +* + CALL DLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, + $ EQUED ) + ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' ) + COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' ) + END IF + END IF +* +* Scale the right hand side. +* + IF( NOTRAN ) THEN + IF( ROWEQU ) THEN + DO 40 J = 1, NRHS + DO 30 I = 1, N + B( I, J ) = R( I )*B( I, J ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE IF( COLEQU ) THEN + DO 60 J = 1, NRHS + DO 50 I = 1, N + B( I, J ) = C( I )*B( I, J ) + 50 CONTINUE + 60 CONTINUE + END IF +* + IF( NOFACT .OR. EQUIL ) THEN +* +* Compute the LU factorization of A. +* + CALL DLACPY( 'Full', N, N, A, LDA, AF, LDAF ) + CALL DGETRF( N, N, AF, LDAF, IPIV, INFO ) +* +* Return if INFO is non-zero. +* + IF( INFO.GT.0 ) THEN +* +* Compute the reciprocal pivot growth factor of the +* leading rank-deficient INFO columns of A. +* + RPVGRW = DLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF, + $ WORK ) + IF( RPVGRW.EQ.ZERO ) THEN + RPVGRW = ONE + ELSE + RPVGRW = DLANGE( 'M', N, INFO, A, LDA, WORK ) / RPVGRW + END IF + WORK( 1 ) = RPVGRW + RCOND = ZERO + RETURN + END IF + END IF +* +* Compute the norm of the matrix A and the +* reciprocal pivot growth factor RPVGRW. +* + IF( NOTRAN ) THEN + NORM = '1' + ELSE + NORM = 'I' + END IF + ANORM = DLANGE( NORM, N, N, A, LDA, WORK ) + RPVGRW = DLANTR( 'M', 'U', 'N', N, N, AF, LDAF, WORK ) + IF( RPVGRW.EQ.ZERO ) THEN + RPVGRW = ONE + ELSE + RPVGRW = DLANGE( 'M', N, N, A, LDA, WORK ) / RPVGRW + END IF +* +* Compute the reciprocal of the condition number of A. +* + CALL DGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, IWORK, INFO ) +* +* Compute the solution matrix X. +* + CALL DLACPY( 'Full', N, NRHS, B, LDB, X, LDX ) + CALL DGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO ) +* +* Use iterative refinement to improve the computed solution and +* compute error bounds and backward error estimates for it. +* + CALL DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, + $ LDX, FERR, BERR, WORK, IWORK, INFO ) +* +* Transform the solution matrix X to a solution of the original +* system. +* + IF( NOTRAN ) THEN + IF( COLEQU ) THEN + DO 80 J = 1, NRHS + DO 70 I = 1, N + X( I, J ) = C( I )*X( I, J ) + 70 CONTINUE + 80 CONTINUE + DO 90 J = 1, NRHS + FERR( J ) = FERR( J ) / COLCND + 90 CONTINUE + END IF + ELSE IF( ROWEQU ) THEN + DO 110 J = 1, NRHS + DO 100 I = 1, N + X( I, J ) = R( I )*X( I, J ) + 100 CONTINUE + 110 CONTINUE + DO 120 J = 1, NRHS + FERR( J ) = FERR( J ) / ROWCND + 120 CONTINUE + END IF +* + WORK( 1 ) = RPVGRW +* +* Set INFO = N+1 if the matrix is singular to working precision. +* + IF( RCOND.LT.DLAMCH( 'Epsilon' ) ) + $ INFO = N + 1 + RETURN +* +* End of DGESVX +* + END diff --git a/2.3-1/src/fortran/lapack/dgetc2.f b/2.3-1/src/fortran/lapack/dgetc2.f new file mode 100644 index 00000000..5842b213 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgetc2.f @@ -0,0 +1,146 @@ + SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DGETC2 computes an LU factorization with complete pivoting of the +* n-by-n matrix A. The factorization has the form A = P * L * U * Q, +* where P and Q are permutation matrices, L is lower triangular with +* unit diagonal elements and U is upper triangular. +* +* This is the Level 2 BLAS algorithm. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the n-by-n matrix A to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U*Q; the unit diagonal elements of L are not stored. +* If U(k, k) appears to be less than SMIN, U(k, k) is given the +* value of SMIN, i.e., giving a nonsingular perturbed system. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension(N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (output) INTEGER array, dimension(N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* INFO (output) INTEGER +* = 0: successful exit +* > 0: if INFO = k, U(k, k) is likely to produce owerflow if +* we try to solve for x in Ax = b. So U is perturbed to +* avoid the overflow. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, IP, IPV, J, JP, JPV + DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX +* .. +* .. External Subroutines .. + EXTERNAL DGER, DSWAP +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* +* Set constants to control overflow +* + INFO = 0 + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Factorize A using complete pivoting. +* Set pivots less than SMIN to SMIN. +* + DO 40 I = 1, N - 1 +* +* Find max element in matrix A +* + XMAX = ZERO + DO 20 IP = I, N + DO 10 JP = I, N + IF( ABS( A( IP, JP ) ).GE.XMAX ) THEN + XMAX = ABS( A( IP, JP ) ) + IPV = IP + JPV = JP + END IF + 10 CONTINUE + 20 CONTINUE + IF( I.EQ.1 ) + $ SMIN = MAX( EPS*XMAX, SMLNUM ) +* +* Swap rows +* + IF( IPV.NE.I ) + $ CALL DSWAP( N, A( IPV, 1 ), LDA, A( I, 1 ), LDA ) + IPIV( I ) = IPV +* +* Swap columns +* + IF( JPV.NE.I ) + $ CALL DSWAP( N, A( 1, JPV ), 1, A( 1, I ), 1 ) + JPIV( I ) = JPV +* +* Check for singularity +* + IF( ABS( A( I, I ) ).LT.SMIN ) THEN + INFO = I + A( I, I ) = SMIN + END IF + DO 30 J = I + 1, N + A( J, I ) = A( J, I ) / A( I, I ) + 30 CONTINUE + CALL DGER( N-I, N-I, -ONE, A( I+1, I ), 1, A( I, I+1 ), LDA, + $ A( I+1, I+1 ), LDA ) + 40 CONTINUE +* + IF( ABS( A( N, N ) ).LT.SMIN ) THEN + INFO = N + A( N, N ) = SMIN + END IF +* + RETURN +* +* End of DGETC2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgetf2.f b/2.3-1/src/fortran/lapack/dgetf2.f new file mode 100644 index 00000000..573b1408 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgetf2.f @@ -0,0 +1,147 @@ + SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DGETF2 computes an LU factorization of a general m-by-n matrix A +* using partial pivoting with row interchanges. +* +* The factorization has the form +* A = P * L * U +* where P is a permutation matrix, L is lower triangular with unit +* diagonal elements (lower trapezoidal if m > n), and U is upper +* triangular (upper trapezoidal if m < n). +* +* This is the right-looking Level 2 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n matrix to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U; the unit diagonal elements of L are not stored. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* IPIV (output) INTEGER array, dimension (min(M,N)) +* The pivot indices; for 1 <= i <= min(M,N), row i of the +* matrix was interchanged with row IPIV(i). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* > 0: if INFO = k, U(k,k) is exactly zero. The factorization +* has been completed, but the factor U is exactly +* singular, and division by zero will occur if it is used +* to solve a system of equations. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION SFMIN + INTEGER I, J, JP +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + INTEGER IDAMAX + EXTERNAL DLAMCH, IDAMAX +* .. +* .. External Subroutines .. + EXTERNAL DGER, DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGETF2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Compute machine safe minimum +* + SFMIN = DLAMCH('S') +* + DO 10 J = 1, MIN( M, N ) +* +* Find pivot and test for singularity. +* + JP = J - 1 + IDAMAX( M-J+1, A( J, J ), 1 ) + IPIV( J ) = JP + IF( A( JP, J ).NE.ZERO ) THEN +* +* Apply the interchange to columns 1:N. +* + IF( JP.NE.J ) + $ CALL DSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA ) +* +* Compute elements J+1:M of J-th column. +* + IF( J.LT.M ) THEN + IF( ABS(A( J, J )) .GE. SFMIN ) THEN + CALL DSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 ) + ELSE + DO 20 I = 1, M-J + A( J+I, J ) = A( J+I, J ) / A( J, J ) + 20 CONTINUE + END IF + END IF +* + ELSE IF( INFO.EQ.0 ) THEN +* + INFO = J + END IF +* + IF( J.LT.MIN( M, N ) ) THEN +* +* Update trailing submatrix. +* + CALL DGER( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ), LDA, + $ A( J+1, J+1 ), LDA ) + END IF + 10 CONTINUE + RETURN +* +* End of DGETF2 +* + END diff --git a/2.3-1/src/fortran/lapack/dgetrf.f b/2.3-1/src/fortran/lapack/dgetrf.f new file mode 100644 index 00000000..c5b9df33 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgetrf.f @@ -0,0 +1,159 @@ + SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DGETRF computes an LU factorization of a general M-by-N matrix A +* using partial pivoting with row interchanges. +* +* The factorization has the form +* A = P * L * U +* where P is a permutation matrix, L is lower triangular with unit +* diagonal elements (lower trapezoidal if m > n), and U is upper +* triangular (upper trapezoidal if m < n). +* +* This is the right-looking Level 3 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U; the unit diagonal elements of L are not stored. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* IPIV (output) INTEGER array, dimension (min(M,N)) +* The pivot indices; for 1 <= i <= min(M,N), row i of the +* matrix was interchanged with row IPIV(i). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, U(i,i) is exactly zero. The factorization +* has been completed, but the factor U is exactly +* singular, and division by zero will occur if it is used +* to solve a system of equations. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, IINFO, J, JB, NB +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DGETF2, DLASWP, DTRSM, XERBLA +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGETRF', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'DGETRF', ' ', M, N, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN +* +* Use unblocked code. +* + CALL DGETF2( M, N, A, LDA, IPIV, INFO ) + ELSE +* +* Use blocked code. +* + DO 20 J = 1, MIN( M, N ), NB + JB = MIN( MIN( M, N )-J+1, NB ) +* +* Factor diagonal and subdiagonal blocks and test for exact +* singularity. +* + CALL DGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO ) +* +* Adjust INFO and the pivot indices. +* + IF( INFO.EQ.0 .AND. IINFO.GT.0 ) + $ INFO = IINFO + J - 1 + DO 10 I = J, MIN( M, J+JB-1 ) + IPIV( I ) = J - 1 + IPIV( I ) + 10 CONTINUE +* +* Apply interchanges to columns 1:J-1. +* + CALL DLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 ) +* + IF( J+JB.LE.N ) THEN +* +* Apply interchanges to columns J+JB:N. +* + CALL DLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1, + $ IPIV, 1 ) +* +* Compute block row of U. +* + CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB, + $ N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ), + $ LDA ) + IF( J+JB.LE.M ) THEN +* +* Update trailing submatrix. +* + CALL DGEMM( 'No transpose', 'No transpose', M-J-JB+1, + $ N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA, + $ A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ), + $ LDA ) + END IF + END IF + 20 CONTINUE + END IF + RETURN +* +* End of DGETRF +* + END diff --git a/2.3-1/src/fortran/lapack/dgetri.f b/2.3-1/src/fortran/lapack/dgetri.f new file mode 100644 index 00000000..9f1c1182 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgetri.f @@ -0,0 +1,192 @@ + SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGETRI computes the inverse of a matrix using the LU factorization +* computed by DGETRF. +* +* This method inverts U and then computes inv(A) by solving the system +* inv(A)*L = inv(U) for inv(A). +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the factors L and U from the factorization +* A = P*L*U as computed by DGETRF. +* On exit, if INFO = 0, the inverse of the original matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* The pivot indices from DGETRF; for 1<=i<=N, row i of the +* matrix was interchanged with row IPIV(i). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimal performance LWORK >= N*NB, where NB is +* the optimal blocksize returned by ILAENV. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is +* singular and its inverse could not be computed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, + $ NBMIN, NN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DGEMV, DSWAP, DTRSM, DTRTRI, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NB = ILAENV( 1, 'DGETRI', ' ', N, -1, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -3 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGETRI', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Form inv(U). If INFO > 0 from DTRTRI, then U is singular, +* and the inverse is not computed. +* + CALL DTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) + IF( INFO.GT.0 ) + $ RETURN +* + NBMIN = 2 + LDWORK = N + IF( NB.GT.1 .AND. NB.LT.N ) THEN + IWS = MAX( LDWORK*NB, 1 ) + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGETRI', ' ', N, -1, -1, -1 ) ) + END IF + ELSE + IWS = N + END IF +* +* Solve the equation inv(A)*L = inv(U) for inv(A). +* + IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN +* +* Use unblocked code. +* + DO 20 J = N, 1, -1 +* +* Copy current column of L to WORK and replace with zeros. +* + DO 10 I = J + 1, N + WORK( I ) = A( I, J ) + A( I, J ) = ZERO + 10 CONTINUE +* +* Compute current column of inv(A). +* + IF( J.LT.N ) + $ CALL DGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), + $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) + 20 CONTINUE + ELSE +* +* Use blocked code. +* + NN = ( ( N-1 ) / NB )*NB + 1 + DO 50 J = NN, 1, -NB + JB = MIN( NB, N-J+1 ) +* +* Copy current block column of L to WORK and replace with +* zeros. +* + DO 40 JJ = J, J + JB - 1 + DO 30 I = JJ + 1, N + WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) + A( I, JJ ) = ZERO + 30 CONTINUE + 40 CONTINUE +* +* Compute current block column of inv(A). +* + IF( J+JB.LE.N ) + $ CALL DGEMM( 'No transpose', 'No transpose', N, JB, + $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, + $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) + CALL DTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, + $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) + 50 CONTINUE + END IF +* +* Apply column interchanges. +* + DO 60 J = N - 1, 1, -1 + JP = IPIV( J ) + IF( JP.NE.J ) + $ CALL DSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) + 60 CONTINUE +* + WORK( 1 ) = IWS + RETURN +* +* End of DGETRI +* + END diff --git a/2.3-1/src/fortran/lapack/dgetrs.f b/2.3-1/src/fortran/lapack/dgetrs.f new file mode 100644 index 00000000..b7d17b0a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgetrs.f @@ -0,0 +1,149 @@ + SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DGETRS solves a system of linear equations +* A * X = B or A' * X = B +* with a general N-by-N matrix A using the LU factorization computed +* by DGETRF. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* Specifies the form of the system of equations: +* = 'N': A * X = B (No transpose) +* = 'T': A'* X = B (Transpose) +* = 'C': A'* X = B (Conjugate transpose = Transpose) +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The factors L and U from the factorization A = P*L*U +* as computed by DGETRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* The pivot indices from DGETRF; for 1<=i<=N, row i of the +* matrix was interchanged with row IPIV(i). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the right hand side matrix B. +* On exit, the solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLASWP, DTRSM, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NOTRAN = LSAME( TRANS, 'N' ) + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGETRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. NRHS.EQ.0 ) + $ RETURN +* + IF( NOTRAN ) THEN +* +* Solve A * X = B. +* +* Apply row interchanges to the right hand sides. +* + CALL DLASWP( NRHS, B, LDB, 1, N, IPIV, 1 ) +* +* Solve L*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Unit', N, NRHS, + $ ONE, A, LDA, B, LDB ) +* +* Solve U*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N, + $ NRHS, ONE, A, LDA, B, LDB ) + ELSE +* +* Solve A' * X = B. +* +* Solve U'*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', N, NRHS, + $ ONE, A, LDA, B, LDB ) +* +* Solve L'*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Lower', 'Transpose', 'Unit', N, NRHS, ONE, + $ A, LDA, B, LDB ) +* +* Apply row interchanges to the solution vectors. +* + CALL DLASWP( NRHS, B, LDB, 1, N, IPIV, -1 ) + END IF +* + RETURN +* +* End of DGETRS +* + END diff --git a/2.3-1/src/fortran/lapack/dggbak.f b/2.3-1/src/fortran/lapack/dggbak.f new file mode 100644 index 00000000..8ed9fbd4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dggbak.f @@ -0,0 +1,220 @@ + SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V, + $ LDV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB, SIDE + INTEGER IHI, ILO, INFO, LDV, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION LSCALE( * ), RSCALE( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* DGGBAK forms the right or left eigenvectors of a real generalized +* eigenvalue problem A*x = lambda*B*x, by backward transformation on +* the computed eigenvectors of the balanced pair of matrices output by +* DGGBAL. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the type of backward transformation required: +* = 'N': do nothing, return immediately; +* = 'P': do backward transformation for permutation only; +* = 'S': do backward transformation for scaling only; +* = 'B': do backward transformations for both permutation and +* scaling. +* JOB must be the same as the argument JOB supplied to DGGBAL. +* +* SIDE (input) CHARACTER*1 +* = 'R': V contains right eigenvectors; +* = 'L': V contains left eigenvectors. +* +* N (input) INTEGER +* The number of rows of the matrix V. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* The integers ILO and IHI determined by DGGBAL. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* LSCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and/or scaling factors applied +* to the left side of A and B, as returned by DGGBAL. +* +* RSCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and/or scaling factors applied +* to the right side of A and B, as returned by DGGBAL. +* +* M (input) INTEGER +* The number of columns of the matrix V. M >= 0. +* +* V (input/output) DOUBLE PRECISION array, dimension (LDV,M) +* On entry, the matrix of right or left eigenvectors to be +* transformed, as returned by DTGEVC. +* On exit, V is overwritten by the transformed eigenvectors. +* +* LDV (input) INTEGER +* The leading dimension of the matrix V. LDV >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* See R.C. Ward, Balancing the generalized eigenvalue problem, +* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LEFTV, RIGHTV + INTEGER I, K +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + RIGHTV = LSAME( SIDE, 'R' ) + LEFTV = LSAME( SIDE, 'L' ) +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 ) THEN + INFO = -4 + ELSE IF( N.EQ.0 .AND. IHI.EQ.0 .AND. ILO.NE.1 ) THEN + INFO = -4 + ELSE IF( N.GT.0 .AND. ( IHI.LT.ILO .OR. IHI.GT.MAX( 1, N ) ) ) + $ THEN + INFO = -5 + ELSE IF( N.EQ.0 .AND. ILO.EQ.1 .AND. IHI.NE.0 ) THEN + INFO = -5 + ELSE IF( M.LT.0 ) THEN + INFO = -8 + ELSE IF( LDV.LT.MAX( 1, N ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGGBAK', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( M.EQ.0 ) + $ RETURN + IF( LSAME( JOB, 'N' ) ) + $ RETURN +* + IF( ILO.EQ.IHI ) + $ GO TO 30 +* +* Backward balance +* + IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN +* +* Backward transformation on right eigenvectors +* + IF( RIGHTV ) THEN + DO 10 I = ILO, IHI + CALL DSCAL( M, RSCALE( I ), V( I, 1 ), LDV ) + 10 CONTINUE + END IF +* +* Backward transformation on left eigenvectors +* + IF( LEFTV ) THEN + DO 20 I = ILO, IHI + CALL DSCAL( M, LSCALE( I ), V( I, 1 ), LDV ) + 20 CONTINUE + END IF + END IF +* +* Backward permutation +* + 30 CONTINUE + IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN +* +* Backward permutation on right eigenvectors +* + IF( RIGHTV ) THEN + IF( ILO.EQ.1 ) + $ GO TO 50 +* + DO 40 I = ILO - 1, 1, -1 + K = RSCALE( I ) + IF( K.EQ.I ) + $ GO TO 40 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 40 CONTINUE +* + 50 CONTINUE + IF( IHI.EQ.N ) + $ GO TO 70 + DO 60 I = IHI + 1, N + K = RSCALE( I ) + IF( K.EQ.I ) + $ GO TO 60 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 60 CONTINUE + END IF +* +* Backward permutation on left eigenvectors +* + 70 CONTINUE + IF( LEFTV ) THEN + IF( ILO.EQ.1 ) + $ GO TO 90 + DO 80 I = ILO - 1, 1, -1 + K = LSCALE( I ) + IF( K.EQ.I ) + $ GO TO 80 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 80 CONTINUE +* + 90 CONTINUE + IF( IHI.EQ.N ) + $ GO TO 110 + DO 100 I = IHI + 1, N + K = LSCALE( I ) + IF( K.EQ.I ) + $ GO TO 100 + CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 100 CONTINUE + END IF + END IF +* + 110 CONTINUE +* + RETURN +* +* End of DGGBAK +* + END diff --git a/2.3-1/src/fortran/lapack/dggbal.f b/2.3-1/src/fortran/lapack/dggbal.f new file mode 100644 index 00000000..2034880a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dggbal.f @@ -0,0 +1,469 @@ + SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE, + $ RSCALE, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB + INTEGER IHI, ILO, INFO, LDA, LDB, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), LSCALE( * ), + $ RSCALE( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGGBAL balances a pair of general real matrices (A,B). This +* involves, first, permuting A and B by similarity transformations to +* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N +* elements on the diagonal; and second, applying a diagonal similarity +* transformation to rows and columns ILO to IHI to make the rows +* and columns as close in norm as possible. Both steps are optional. +* +* Balancing may reduce the 1-norm of the matrices, and improve the +* accuracy of the computed eigenvalues and/or eigenvectors in the +* generalized eigenvalue problem A*x = lambda*B*x. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the operations to be performed on A and B: +* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0 +* and RSCALE(I) = 1.0 for i = 1,...,N. +* = 'P': permute only; +* = 'S': scale only; +* = 'B': both permute and scale. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the input matrix A. +* On exit, A is overwritten by the balanced matrix. +* If JOB = 'N', A is not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,N) +* On entry, the input matrix B. +* On exit, B is overwritten by the balanced matrix. +* If JOB = 'N', B is not referenced. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* ILO (output) INTEGER +* IHI (output) INTEGER +* ILO and IHI are set to integers such that on exit +* A(i,j) = 0 and B(i,j) = 0 if i > j and +* j = 1,...,ILO-1 or i = IHI+1,...,N. +* If JOB = 'N' or 'S', ILO = 1 and IHI = N. +* +* LSCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied +* to the left side of A and B. If P(j) is the index of the +* row interchanged with row j, and D(j) +* is the scaling factor applied to row j, then +* LSCALE(j) = P(j) for J = 1,...,ILO-1 +* = D(j) for J = ILO,...,IHI +* = P(j) for J = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* RSCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied +* to the right side of A and B. If P(j) is the index of the +* column interchanged with column j, and D(j) +* is the scaling factor applied to column j, then +* LSCALE(j) = P(j) for J = 1,...,ILO-1 +* = D(j) for J = ILO,...,IHI +* = P(j) for J = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* WORK (workspace) REAL array, dimension (lwork) +* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and +* at least 1 when JOB = 'N' or 'P'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* See R.C. WARD, Balancing the generalized eigenvalue problem, +* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, HALF, ONE + PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION THREE, SCLFAC + PARAMETER ( THREE = 3.0D+0, SCLFAC = 1.0D+1 ) +* .. +* .. Local Scalars .. + INTEGER I, ICAB, IFLOW, IP1, IR, IRAB, IT, J, JC, JP1, + $ K, KOUNT, L, LCAB, LM1, LRAB, LSFMAX, LSFMIN, + $ M, NR, NRP2 + DOUBLE PRECISION ALPHA, BASL, BETA, CAB, CMAX, COEF, COEF2, + $ COEF5, COR, EW, EWC, GAMMA, PGAMMA, RAB, SFMAX, + $ SFMIN, SUM, T, TA, TB, TC +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DDOT, DLAMCH + EXTERNAL LSAME, IDAMAX, DDOT, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, INT, LOG10, MAX, MIN, SIGN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGGBAL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + ILO = 1 + IHI = N + RETURN + END IF +* + IF( N.EQ.1 ) THEN + ILO = 1 + IHI = N + LSCALE( 1 ) = ONE + RSCALE( 1 ) = ONE + RETURN + END IF +* + IF( LSAME( JOB, 'N' ) ) THEN + ILO = 1 + IHI = N + DO 10 I = 1, N + LSCALE( I ) = ONE + RSCALE( I ) = ONE + 10 CONTINUE + RETURN + END IF +* + K = 1 + L = N + IF( LSAME( JOB, 'S' ) ) + $ GO TO 190 +* + GO TO 30 +* +* Permute the matrices A and B to isolate the eigenvalues. +* +* Find row with one nonzero in columns 1 through L +* + 20 CONTINUE + L = LM1 + IF( L.NE.1 ) + $ GO TO 30 +* + RSCALE( 1 ) = ONE + LSCALE( 1 ) = ONE + GO TO 190 +* + 30 CONTINUE + LM1 = L - 1 + DO 80 I = L, 1, -1 + DO 40 J = 1, LM1 + JP1 = J + 1 + IF( A( I, J ).NE.ZERO .OR. B( I, J ).NE.ZERO ) + $ GO TO 50 + 40 CONTINUE + J = L + GO TO 70 +* + 50 CONTINUE + DO 60 J = JP1, L + IF( A( I, J ).NE.ZERO .OR. B( I, J ).NE.ZERO ) + $ GO TO 80 + 60 CONTINUE + J = JP1 - 1 +* + 70 CONTINUE + M = L + IFLOW = 1 + GO TO 160 + 80 CONTINUE + GO TO 100 +* +* Find column with one nonzero in rows K through N +* + 90 CONTINUE + K = K + 1 +* + 100 CONTINUE + DO 150 J = K, L + DO 110 I = K, LM1 + IP1 = I + 1 + IF( A( I, J ).NE.ZERO .OR. B( I, J ).NE.ZERO ) + $ GO TO 120 + 110 CONTINUE + I = L + GO TO 140 + 120 CONTINUE + DO 130 I = IP1, L + IF( A( I, J ).NE.ZERO .OR. B( I, J ).NE.ZERO ) + $ GO TO 150 + 130 CONTINUE + I = IP1 - 1 + 140 CONTINUE + M = K + IFLOW = 2 + GO TO 160 + 150 CONTINUE + GO TO 190 +* +* Permute rows M and I +* + 160 CONTINUE + LSCALE( M ) = I + IF( I.EQ.M ) + $ GO TO 170 + CALL DSWAP( N-K+1, A( I, K ), LDA, A( M, K ), LDA ) + CALL DSWAP( N-K+1, B( I, K ), LDB, B( M, K ), LDB ) +* +* Permute columns M and J +* + 170 CONTINUE + RSCALE( M ) = J + IF( J.EQ.M ) + $ GO TO 180 + CALL DSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) + CALL DSWAP( L, B( 1, J ), 1, B( 1, M ), 1 ) +* + 180 CONTINUE + GO TO ( 20, 90 )IFLOW +* + 190 CONTINUE + ILO = K + IHI = L +* + IF( LSAME( JOB, 'P' ) ) THEN + DO 195 I = ILO, IHI + LSCALE( I ) = ONE + RSCALE( I ) = ONE + 195 CONTINUE + RETURN + END IF +* + IF( ILO.EQ.IHI ) + $ RETURN +* +* Balance the submatrix in rows ILO to IHI. +* + NR = IHI - ILO + 1 + DO 200 I = ILO, IHI + RSCALE( I ) = ZERO + LSCALE( I ) = ZERO +* + WORK( I ) = ZERO + WORK( I+N ) = ZERO + WORK( I+2*N ) = ZERO + WORK( I+3*N ) = ZERO + WORK( I+4*N ) = ZERO + WORK( I+5*N ) = ZERO + 200 CONTINUE +* +* Compute right side vector in resulting linear equations +* + BASL = LOG10( SCLFAC ) + DO 240 I = ILO, IHI + DO 230 J = ILO, IHI + TB = B( I, J ) + TA = A( I, J ) + IF( TA.EQ.ZERO ) + $ GO TO 210 + TA = LOG10( ABS( TA ) ) / BASL + 210 CONTINUE + IF( TB.EQ.ZERO ) + $ GO TO 220 + TB = LOG10( ABS( TB ) ) / BASL + 220 CONTINUE + WORK( I+4*N ) = WORK( I+4*N ) - TA - TB + WORK( J+5*N ) = WORK( J+5*N ) - TA - TB + 230 CONTINUE + 240 CONTINUE +* + COEF = ONE / DBLE( 2*NR ) + COEF2 = COEF*COEF + COEF5 = HALF*COEF2 + NRP2 = NR + 2 + BETA = ZERO + IT = 1 +* +* Start generalized conjugate gradient iteration +* + 250 CONTINUE +* + GAMMA = DDOT( NR, WORK( ILO+4*N ), 1, WORK( ILO+4*N ), 1 ) + + $ DDOT( NR, WORK( ILO+5*N ), 1, WORK( ILO+5*N ), 1 ) +* + EW = ZERO + EWC = ZERO + DO 260 I = ILO, IHI + EW = EW + WORK( I+4*N ) + EWC = EWC + WORK( I+5*N ) + 260 CONTINUE +* + GAMMA = COEF*GAMMA - COEF2*( EW**2+EWC**2 ) - COEF5*( EW-EWC )**2 + IF( GAMMA.EQ.ZERO ) + $ GO TO 350 + IF( IT.NE.1 ) + $ BETA = GAMMA / PGAMMA + T = COEF5*( EWC-THREE*EW ) + TC = COEF5*( EW-THREE*EWC ) +* + CALL DSCAL( NR, BETA, WORK( ILO ), 1 ) + CALL DSCAL( NR, BETA, WORK( ILO+N ), 1 ) +* + CALL DAXPY( NR, COEF, WORK( ILO+4*N ), 1, WORK( ILO+N ), 1 ) + CALL DAXPY( NR, COEF, WORK( ILO+5*N ), 1, WORK( ILO ), 1 ) +* + DO 270 I = ILO, IHI + WORK( I ) = WORK( I ) + TC + WORK( I+N ) = WORK( I+N ) + T + 270 CONTINUE +* +* Apply matrix to vector +* + DO 300 I = ILO, IHI + KOUNT = 0 + SUM = ZERO + DO 290 J = ILO, IHI + IF( A( I, J ).EQ.ZERO ) + $ GO TO 280 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( J ) + 280 CONTINUE + IF( B( I, J ).EQ.ZERO ) + $ GO TO 290 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( J ) + 290 CONTINUE + WORK( I+2*N ) = DBLE( KOUNT )*WORK( I+N ) + SUM + 300 CONTINUE +* + DO 330 J = ILO, IHI + KOUNT = 0 + SUM = ZERO + DO 320 I = ILO, IHI + IF( A( I, J ).EQ.ZERO ) + $ GO TO 310 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( I+N ) + 310 CONTINUE + IF( B( I, J ).EQ.ZERO ) + $ GO TO 320 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( I+N ) + 320 CONTINUE + WORK( J+3*N ) = DBLE( KOUNT )*WORK( J ) + SUM + 330 CONTINUE +* + SUM = DDOT( NR, WORK( ILO+N ), 1, WORK( ILO+2*N ), 1 ) + + $ DDOT( NR, WORK( ILO ), 1, WORK( ILO+3*N ), 1 ) + ALPHA = GAMMA / SUM +* +* Determine correction to current iteration +* + CMAX = ZERO + DO 340 I = ILO, IHI + COR = ALPHA*WORK( I+N ) + IF( ABS( COR ).GT.CMAX ) + $ CMAX = ABS( COR ) + LSCALE( I ) = LSCALE( I ) + COR + COR = ALPHA*WORK( I ) + IF( ABS( COR ).GT.CMAX ) + $ CMAX = ABS( COR ) + RSCALE( I ) = RSCALE( I ) + COR + 340 CONTINUE + IF( CMAX.LT.HALF ) + $ GO TO 350 +* + CALL DAXPY( NR, -ALPHA, WORK( ILO+2*N ), 1, WORK( ILO+4*N ), 1 ) + CALL DAXPY( NR, -ALPHA, WORK( ILO+3*N ), 1, WORK( ILO+5*N ), 1 ) +* + PGAMMA = GAMMA + IT = IT + 1 + IF( IT.LE.NRP2 ) + $ GO TO 250 +* +* End generalized conjugate gradient iteration +* + 350 CONTINUE + SFMIN = DLAMCH( 'S' ) + SFMAX = ONE / SFMIN + LSFMIN = INT( LOG10( SFMIN ) / BASL+ONE ) + LSFMAX = INT( LOG10( SFMAX ) / BASL ) + DO 360 I = ILO, IHI + IRAB = IDAMAX( N-ILO+1, A( I, ILO ), LDA ) + RAB = ABS( A( I, IRAB+ILO-1 ) ) + IRAB = IDAMAX( N-ILO+1, B( I, ILO ), LDB ) + RAB = MAX( RAB, ABS( B( I, IRAB+ILO-1 ) ) ) + LRAB = INT( LOG10( RAB+SFMIN ) / BASL+ONE ) + IR = LSCALE( I ) + SIGN( HALF, LSCALE( I ) ) + IR = MIN( MAX( IR, LSFMIN ), LSFMAX, LSFMAX-LRAB ) + LSCALE( I ) = SCLFAC**IR + ICAB = IDAMAX( IHI, A( 1, I ), 1 ) + CAB = ABS( A( ICAB, I ) ) + ICAB = IDAMAX( IHI, B( 1, I ), 1 ) + CAB = MAX( CAB, ABS( B( ICAB, I ) ) ) + LCAB = INT( LOG10( CAB+SFMIN ) / BASL+ONE ) + JC = RSCALE( I ) + SIGN( HALF, RSCALE( I ) ) + JC = MIN( MAX( JC, LSFMIN ), LSFMAX, LSFMAX-LCAB ) + RSCALE( I ) = SCLFAC**JC + 360 CONTINUE +* +* Row scaling of matrices A and B +* + DO 370 I = ILO, IHI + CALL DSCAL( N-ILO+1, LSCALE( I ), A( I, ILO ), LDA ) + CALL DSCAL( N-ILO+1, LSCALE( I ), B( I, ILO ), LDB ) + 370 CONTINUE +* +* Column scaling of matrices A and B +* + DO 380 J = ILO, IHI + CALL DSCAL( IHI, RSCALE( J ), A( 1, J ), 1 ) + CALL DSCAL( IHI, RSCALE( J ), B( 1, J ), 1 ) + 380 CONTINUE +* + RETURN +* +* End of DGGBAL +* + END diff --git a/2.3-1/src/fortran/lapack/dgges.f b/2.3-1/src/fortran/lapack/dgges.f new file mode 100644 index 00000000..ce29aa52 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgges.f @@ -0,0 +1,550 @@ + SUBROUTINE DGGES( JOBVSL, JOBVSR, SORT, DELCTG, N, A, LDA, B, LDB, + $ SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR, + $ LDVSR, WORK, LWORK, BWORK, INFO ) +* +* -- LAPACK driver routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* June 30, 1999 +* +* .. Scalar Arguments .. + CHARACTER JOBVSL, JOBVSR, SORT + INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM +* .. +* .. Array Arguments .. + LOGICAL BWORK( * ) + DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), + $ B( LDB, * ), BETA( * ), VSL( LDVSL, * ), + $ VSR( LDVSR, * ), WORK( * ) +* .. +* .. Function Arguments .. + LOGICAL DELCTG + EXTERNAL DELCTG +* .. +* +* Purpose +* ======= +* +* DGGES computes for a pair of N-by-N real nonsymmetric matrices (A,B), +* the generalized eigenvalues, the generalized real Schur form (S,T), +* optionally, the left and/or right matrices of Schur vectors (VSL and +* VSR). This gives the generalized Schur factorization +* +* (A,B) = ( (VSL)*S*(VSR)**T, (VSL)*T*(VSR)**T ) +* +* Optionally, it also orders the eigenvalues so that a selected cluster +* of eigenvalues appears in the leading diagonal blocks of the upper +* quasi-triangular matrix S and the upper triangular matrix T.The +* leading columns of VSL and VSR then form an orthonormal basis for the +* corresponding left and right eigenspaces (deflating subspaces). +* +* (If only the generalized eigenvalues are needed, use the driver +* DGGEV instead, which is faster.) +* +* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w +* or a ratio alpha/beta = w, such that A - w*B is singular. It is +* usually represented as the pair (alpha,beta), as there is a +* reasonable interpretation for beta=0 or both being zero. +* +* A pair of matrices (S,T) is in generalized real Schur form if T is +* upper triangular with non-negative diagonal and S is block upper +* triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond +* to real generalized eigenvalues, while 2-by-2 blocks of S will be +* "standardized" by making the corresponding elements of T have the +* form: +* [ a 0 ] +* [ 0 b ] +* +* and the pair of corresponding 2-by-2 blocks in S and T will have a +* complex conjugate pair of generalized eigenvalues. +* +* +* Arguments +* ========= +* +* JOBVSL (input) CHARACTER*1 +* = 'N': do not compute the left Schur vectors; +* = 'V': compute the left Schur vectors. +* +* JOBVSR (input) CHARACTER*1 +* = 'N': do not compute the right Schur vectors; +* = 'V': compute the right Schur vectors. +* +* SORT (input) CHARACTER*1 +* Specifies whether or not to order the eigenvalues on the +* diagonal of the generalized Schur form. +* = 'N': Eigenvalues are not ordered; +* = 'S': Eigenvalues are ordered (see DELZTG); +* +* DELZTG (input) LOGICAL FUNCTION of three DOUBLE PRECISION arguments +* DELZTG must be declared EXTERNAL in the calling subroutine. +* If SORT = 'N', DELZTG is not referenced. +* If SORT = 'S', DELZTG is used to select eigenvalues to sort +* to the top left of the Schur form. +* An eigenvalue (ALPHAR(j)+ALPHAI(j))/BETA(j) is selected if +* DELZTG(ALPHAR(j),ALPHAI(j),BETA(j)) is true; i.e. if either +* one of a complex conjugate pair of eigenvalues is selected, +* then both complex eigenvalues are selected. +* +* Note that in the ill-conditioned case, a selected complex +* eigenvalue may no longer satisfy DELZTG(ALPHAR(j),ALPHAI(j), +* BETA(j)) = .TRUE. after ordering. INFO is to be set to N+2 +* in this case. +* +* N (input) INTEGER +* The order of the matrices A, B, VSL, and VSR. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the first of the pair of matrices. +* On exit, A has been overwritten by its generalized Schur +* form S. +* +* LDA (input) INTEGER +* The leading dimension of A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB, N) +* On entry, the second of the pair of matrices. +* On exit, B has been overwritten by its generalized Schur +* form T. +* +* LDB (input) INTEGER +* The leading dimension of B. LDB >= max(1,N). +* +* SDIM (output) INTEGER +* If SORT = 'N', SDIM = 0. +* If SORT = 'S', SDIM = number of eigenvalues (after sorting) +* for which DELZTG is true. (Complex conjugate pairs for which +* DELZTG is true for either eigenvalue count as 2.) +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (N) +* ALPHAI (output) DOUBLE PRECISION array, dimension (N) +* BETA (output) DOUBLE PRECISION array, dimension (N) +* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will +* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i, +* and BETA(j),j=1,...,N are the diagonals of the complex Schur +* form (S,T) that would result if the 2-by-2 diagonal blocks of +* the real Schur form of (A,B) were further reduced to +* triangular form using 2-by-2 complex unitary transformations. +* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if +* positive, then the j-th and (j+1)-st eigenvalues are a +* complex conjugate pair, with ALPHAI(j+1) negative. +* +* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) +* may easily over- or underflow, and BETA(j) may even be zero. +* Thus, the user should avoid naively computing the ratio. +* However, ALPHAR and ALPHAI will be always less than and +* usually comparable with norm(A) in magnitude, and BETA always +* less than and usually comparable with norm(B). +* +* VSL (output) DOUBLE PRECISION array, dimension (LDVSL,N) +* If JOBVSL = 'V', VSL will contain the left Schur vectors. +* Not referenced if JOBVSL = 'N'. +* +* LDVSL (input) INTEGER +* The leading dimension of the matrix VSL. LDVSL >=1, and +* if JOBVSL = 'V', LDVSL >= N. +* +* VSR (output) DOUBLE PRECISION array, dimension (LDVSR,N) +* If JOBVSR = 'V', VSR will contain the right Schur vectors. +* Not referenced if JOBVSR = 'N'. +* +* LDVSR (input) INTEGER +* The leading dimension of the matrix VSR. LDVSR >= 1, and +* if JOBVSR = 'V', LDVSR >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 8*N+16. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* BWORK (workspace) LOGICAL array, dimension (N) +* Not referenced if SORT = 'N'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* = 1,...,N: +* The QZ iteration failed. (A,B) are not in Schur +* form, but ALPHAR(j), ALPHAI(j), and BETA(j) should +* be correct for j=INFO+1,...,N. +* > N: =N+1: other than QZ iteration failed in DHGEQZ. +* =N+2: after reordering, roundoff changed values of +* some complex eigenvalues so that leading +* eigenvalues in the Generalized Schur form no +* longer satisfy DELZTG=.TRUE. This could also +* be caused due to scaling. +* =N+3: reordering failed in DTGSEN. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL CURSL, ILASCL, ILBSCL, ILVSL, ILVSR, LASTSL, + $ LQUERY, LST2SL, WANTST + INTEGER I, ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT, + $ ILO, IP, IRIGHT, IROWS, ITAU, IWRK, MAXWRK, + $ MINWRK + DOUBLE PRECISION ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, PVSL, + $ PVSR, SAFMAX, SAFMIN, SMLNUM +* .. +* .. Local Arrays .. + INTEGER IDUM( 1 ) + DOUBLE PRECISION DIF( 2 ) +* .. +* .. External Subroutines .. + EXTERNAL DGEQRF, DGGBAK, DGGBAL, DGGHRD, DHGEQZ, DLABAD, + $ DLACPY, DLASCL, DLASET, DORGQR, DORMQR, DTGSEN, + $ XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode the input arguments +* + IF( LSAME( JOBVSL, 'N' ) ) THEN + IJOBVL = 1 + ILVSL = .FALSE. + ELSE IF( LSAME( JOBVSL, 'V' ) ) THEN + IJOBVL = 2 + ILVSL = .TRUE. + ELSE + IJOBVL = -1 + ILVSL = .FALSE. + END IF +* + IF( LSAME( JOBVSR, 'N' ) ) THEN + IJOBVR = 1 + ILVSR = .FALSE. + ELSE IF( LSAME( JOBVSR, 'V' ) ) THEN + IJOBVR = 2 + ILVSR = .TRUE. + ELSE + IJOBVR = -1 + ILVSR = .FALSE. + END IF +* + WANTST = LSAME( SORT, 'S' ) +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( IJOBVL.LE.0 ) THEN + INFO = -1 + ELSE IF( IJOBVR.LE.0 ) THEN + INFO = -2 + ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDVSL.LT.1 .OR. ( ILVSL .AND. LDVSL.LT.N ) ) THEN + INFO = -15 + ELSE IF( LDVSR.LT.1 .OR. ( ILVSR .AND. LDVSR.LT.N ) ) THEN + INFO = -17 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV.) +* + MINWRK = 1 + IF( INFO.EQ.0 .AND. ( LWORK.GE.1 .OR. LQUERY ) ) THEN + MINWRK = 7*( N+1 ) + 16 + MAXWRK = 7*( N+1 ) + N*ILAENV( 1, 'DGEQRF', ' ', N, 1, N, 0 ) + + $ 16 + IF( ILVSL ) THEN + MAXWRK = MAX( MAXWRK, 7*( N+1 )+N* + $ ILAENV( 1, 'DORGQR', ' ', N, 1, N, -1 ) ) + END IF + WORK( 1 ) = MAXWRK + END IF +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) + $ INFO = -19 + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGGES ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + SDIM = 0 + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SAFMIN = DLAMCH( 'S' ) + SAFMAX = ONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + SMLNUM = SQRT( SAFMIN ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, WORK ) + ILASCL = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ANRMTO = SMLNUM + ILASCL = .TRUE. + ELSE IF( ANRM.GT.BIGNUM ) THEN + ANRMTO = BIGNUM + ILASCL = .TRUE. + END IF + IF( ILASCL ) + $ CALL DLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR ) +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = DLANGE( 'M', N, N, B, LDB, WORK ) + ILBSCL = .FALSE. + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN + BNRMTO = SMLNUM + ILBSCL = .TRUE. + ELSE IF( BNRM.GT.BIGNUM ) THEN + BNRMTO = BIGNUM + ILBSCL = .TRUE. + END IF + IF( ILBSCL ) + $ CALL DLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR ) +* +* Permute the matrix to make it more nearly triangular +* (Workspace: need 6*N + 2*N space for storing balancing factors) +* + ILEFT = 1 + IRIGHT = N + 1 + IWRK = IRIGHT + N + CALL DGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), WORK( IWRK ), IERR ) +* +* Reduce B to triangular form (QR decomposition of B) +* (Workspace: need N, prefer N*NB) +* + IROWS = IHI + 1 - ILO + ICOLS = N + 1 - ILO + ITAU = IWRK + IWRK = ITAU + IROWS + CALL DGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ), + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) +* +* Apply the orthogonal transformation to matrix A +* (Workspace: need N, prefer N*NB) +* + CALL DORMQR( 'L', 'T', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB, + $ WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ), + $ LWORK+1-IWRK, IERR ) +* +* Initialize VSL +* (Workspace: need N, prefer N*NB) +* + IF( ILVSL ) THEN + CALL DLASET( 'Full', N, N, ZERO, ONE, VSL, LDVSL ) + CALL DLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB, + $ VSL( ILO+1, ILO ), LDVSL ) + CALL DORGQR( IROWS, IROWS, IROWS, VSL( ILO, ILO ), LDVSL, + $ WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR ) + END IF +* +* Initialize VSR +* + IF( ILVSR ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, VSR, LDVSR ) +* +* Reduce to generalized Hessenberg form +* (Workspace: none needed) +* + CALL DGGHRD( JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, VSL, + $ LDVSL, VSR, LDVSR, IERR ) +* +* Perform QZ algorithm, computing Schur vectors if desired +* (Workspace: need N) +* + IWRK = ITAU + CALL DHGEQZ( 'S', JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, + $ ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) + IF( IERR.NE.0 ) THEN + IF( IERR.GT.0 .AND. IERR.LE.N ) THEN + INFO = IERR + ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN + INFO = IERR - N + ELSE + INFO = N + 1 + END IF + GO TO 50 + END IF +* +* Sort eigenvalues ALPHA/BETA if desired +* (Workspace: need 4*N+16 ) +* + SDIM = 0 + IF( WANTST ) THEN +* +* Undo scaling on eigenvalues before DELZTGing +* + IF( ILASCL ) THEN + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAR, N, + $ IERR ) + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAI, N, + $ IERR ) + END IF + IF( ILBSCL ) + $ CALL DLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR ) +* +* Select eigenvalues +* + DO 10 I = 1, N + BWORK( I ) = DELCTG( ALPHAR( I ), ALPHAI( I ), BETA( I ) ) + 10 CONTINUE +* + CALL DTGSEN( 0, ILVSL, ILVSR, BWORK, N, A, LDA, B, LDB, ALPHAR, + $ ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, SDIM, PVSL, + $ PVSR, DIF, WORK( IWRK ), LWORK-IWRK+1, IDUM, 1, + $ IERR ) + IF( IERR.EQ.1 ) + $ INFO = N + 3 +* + END IF +* +* Apply back-permutation to VSL and VSR +* (Workspace: none needed) +* + IF( ILVSL ) + $ CALL DGGBAK( 'P', 'L', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VSL, LDVSL, IERR ) +* + IF( ILVSR ) + $ CALL DGGBAK( 'P', 'R', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VSR, LDVSR, IERR ) +* +* Check if unscaling would cause over/underflow, if so, rescale +* (ALPHAR(I),ALPHAI(I),BETA(I)) so BETA(I) is on the order of +* B(I,I) and ALPHAR(I) and ALPHAI(I) are on the order of A(I,I) +* + IF( ILASCL ) THEN + DO 20 I = 1, N + IF( ALPHAI( I ).NE.ZERO ) THEN + IF( ( ALPHAR( I ) / SAFMAX ).GT.( ANRMTO / ANRM ) .OR. + $ ( SAFMIN / ALPHAR( I ) ).GT.( ANRM / ANRMTO ) ) THEN + WORK( 1 ) = ABS( A( I, I ) / ALPHAR( I ) ) + BETA( I ) = BETA( I )*WORK( 1 ) + ALPHAR( I ) = ALPHAR( I )*WORK( 1 ) + ALPHAI( I ) = ALPHAI( I )*WORK( 1 ) + ELSE IF( ( ALPHAI( I ) / SAFMAX ).GT. + $ ( ANRMTO / ANRM ) .OR. + $ ( SAFMIN / ALPHAI( I ) ).GT.( ANRM / ANRMTO ) ) + $ THEN + WORK( 1 ) = ABS( A( I, I+1 ) / ALPHAI( I ) ) + BETA( I ) = BETA( I )*WORK( 1 ) + ALPHAR( I ) = ALPHAR( I )*WORK( 1 ) + ALPHAI( I ) = ALPHAI( I )*WORK( 1 ) + END IF + END IF + 20 CONTINUE + END IF +* + IF( ILBSCL ) THEN + DO 30 I = 1, N + IF( ALPHAI( I ).NE.ZERO ) THEN + IF( ( BETA( I ) / SAFMAX ).GT.( BNRMTO / BNRM ) .OR. + $ ( SAFMIN / BETA( I ) ).GT.( BNRM / BNRMTO ) ) THEN + WORK( 1 ) = ABS( B( I, I ) / BETA( I ) ) + BETA( I ) = BETA( I )*WORK( 1 ) + ALPHAR( I ) = ALPHAR( I )*WORK( 1 ) + ALPHAI( I ) = ALPHAI( I )*WORK( 1 ) + END IF + END IF + 30 CONTINUE + END IF +* +* Undo scaling +* + IF( ILASCL ) THEN + CALL DLASCL( 'H', 0, 0, ANRMTO, ANRM, N, N, A, LDA, IERR ) + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAR, N, IERR ) + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAI, N, IERR ) + END IF +* + IF( ILBSCL ) THEN + CALL DLASCL( 'U', 0, 0, BNRMTO, BNRM, N, N, B, LDB, IERR ) + CALL DLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR ) + END IF +* + IF( WANTST ) THEN +* +* Check if reordering is correct +* + LASTSL = .TRUE. + LST2SL = .TRUE. + SDIM = 0 + IP = 0 + DO 40 I = 1, N + CURSL = DELCTG( ALPHAR( I ), ALPHAI( I ), BETA( I ) ) + IF( ALPHAI( I ).EQ.ZERO ) THEN + IF( CURSL ) + $ SDIM = SDIM + 1 + IP = 0 + IF( CURSL .AND. .NOT.LASTSL ) + $ INFO = N + 2 + ELSE + IF( IP.EQ.1 ) THEN +* +* Last eigenvalue of conjugate pair +* + CURSL = CURSL .OR. LASTSL + LASTSL = CURSL + IF( CURSL ) + $ SDIM = SDIM + 2 + IP = -1 + IF( CURSL .AND. .NOT.LST2SL ) + $ INFO = N + 2 + ELSE +* +* First eigenvalue of conjugate pair +* + IP = 1 + END IF + END IF + LST2SL = LASTSL + LASTSL = CURSL + 40 CONTINUE +* + END IF +* + 50 CONTINUE +* + WORK( 1 ) = MAXWRK +* + RETURN +* +* End of DGGES +* + END diff --git a/2.3-1/src/fortran/lapack/dggev.f b/2.3-1/src/fortran/lapack/dggev.f new file mode 100644 index 00000000..4a204c33 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dggev.f @@ -0,0 +1,489 @@ + SUBROUTINE DGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI, + $ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVL, JOBVR + INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), + $ B( LDB, * ), BETA( * ), VL( LDVL, * ), + $ VR( LDVR, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DGGEV computes for a pair of N-by-N real nonsymmetric matrices (A,B) +* the generalized eigenvalues, and optionally, the left and/or right +* generalized eigenvectors. +* +* A generalized eigenvalue for a pair of matrices (A,B) is a scalar +* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is +* singular. It is usually represented as the pair (alpha,beta), as +* there is a reasonable interpretation for beta=0, and even for both +* being zero. +* +* The right eigenvector v(j) corresponding to the eigenvalue lambda(j) +* of (A,B) satisfies +* +* A * v(j) = lambda(j) * B * v(j). +* +* The left eigenvector u(j) corresponding to the eigenvalue lambda(j) +* of (A,B) satisfies +* +* u(j)**H * A = lambda(j) * u(j)**H * B . +* +* where u(j)**H is the conjugate-transpose of u(j). +* +* +* Arguments +* ========= +* +* JOBVL (input) CHARACTER*1 +* = 'N': do not compute the left generalized eigenvectors; +* = 'V': compute the left generalized eigenvectors. +* +* JOBVR (input) CHARACTER*1 +* = 'N': do not compute the right generalized eigenvectors; +* = 'V': compute the right generalized eigenvectors. +* +* N (input) INTEGER +* The order of the matrices A, B, VL, and VR. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the matrix A in the pair (A,B). +* On exit, A has been overwritten. +* +* LDA (input) INTEGER +* The leading dimension of A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB, N) +* On entry, the matrix B in the pair (A,B). +* On exit, B has been overwritten. +* +* LDB (input) INTEGER +* The leading dimension of B. LDB >= max(1,N). +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (N) +* ALPHAI (output) DOUBLE PRECISION array, dimension (N) +* BETA (output) DOUBLE PRECISION array, dimension (N) +* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will +* be the generalized eigenvalues. If ALPHAI(j) is zero, then +* the j-th eigenvalue is real; if positive, then the j-th and +* (j+1)-st eigenvalues are a complex conjugate pair, with +* ALPHAI(j+1) negative. +* +* Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) +* may easily over- or underflow, and BETA(j) may even be zero. +* Thus, the user should avoid naively computing the ratio +* alpha/beta. However, ALPHAR and ALPHAI will be always less +* than and usually comparable with norm(A) in magnitude, and +* BETA always less than and usually comparable with norm(B). +* +* VL (output) DOUBLE PRECISION array, dimension (LDVL,N) +* If JOBVL = 'V', the left eigenvectors u(j) are stored one +* after another in the columns of VL, in the same order as +* their eigenvalues. If the j-th eigenvalue is real, then +* u(j) = VL(:,j), the j-th column of VL. If the j-th and +* (j+1)-th eigenvalues form a complex conjugate pair, then +* u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1). +* Each eigenvector is scaled so the largest component has +* abs(real part)+abs(imag. part)=1. +* Not referenced if JOBVL = 'N'. +* +* LDVL (input) INTEGER +* The leading dimension of the matrix VL. LDVL >= 1, and +* if JOBVL = 'V', LDVL >= N. +* +* VR (output) DOUBLE PRECISION array, dimension (LDVR,N) +* If JOBVR = 'V', the right eigenvectors v(j) are stored one +* after another in the columns of VR, in the same order as +* their eigenvalues. If the j-th eigenvalue is real, then +* v(j) = VR(:,j), the j-th column of VR. If the j-th and +* (j+1)-th eigenvalues form a complex conjugate pair, then +* v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1). +* Each eigenvector is scaled so the largest component has +* abs(real part)+abs(imag. part)=1. +* Not referenced if JOBVR = 'N'. +* +* LDVR (input) INTEGER +* The leading dimension of the matrix VR. LDVR >= 1, and +* if JOBVR = 'V', LDVR >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,8*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* = 1,...,N: +* The QZ iteration failed. No eigenvectors have been +* calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) +* should be correct for j=INFO+1,...,N. +* > N: =N+1: other than QZ iteration failed in DHGEQZ. +* =N+2: error return from DTGEVC. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ILASCL, ILBSCL, ILV, ILVL, ILVR, LQUERY + CHARACTER CHTEMP + INTEGER ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT, ILO, + $ IN, IRIGHT, IROWS, ITAU, IWRK, JC, JR, MAXWRK, + $ MINWRK + DOUBLE PRECISION ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, + $ SMLNUM, TEMP +* .. +* .. Local Arrays .. + LOGICAL LDUMMA( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DGEQRF, DGGBAK, DGGBAL, DGGHRD, DHGEQZ, DLABAD, + $ DLACPY,DLASCL, DLASET, DORGQR, DORMQR, DTGEVC, + $ XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, DLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode the input arguments +* + IF( LSAME( JOBVL, 'N' ) ) THEN + IJOBVL = 1 + ILVL = .FALSE. + ELSE IF( LSAME( JOBVL, 'V' ) ) THEN + IJOBVL = 2 + ILVL = .TRUE. + ELSE + IJOBVL = -1 + ILVL = .FALSE. + END IF +* + IF( LSAME( JOBVR, 'N' ) ) THEN + IJOBVR = 1 + ILVR = .FALSE. + ELSE IF( LSAME( JOBVR, 'V' ) ) THEN + IJOBVR = 2 + ILVR = .TRUE. + ELSE + IJOBVR = -1 + ILVR = .FALSE. + END IF + ILV = ILVL .OR. ILVR +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( IJOBVL.LE.0 ) THEN + INFO = -1 + ELSE IF( IJOBVR.LE.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDVL.LT.1 .OR. ( ILVL .AND. LDVL.LT.N ) ) THEN + INFO = -12 + ELSE IF( LDVR.LT.1 .OR. ( ILVR .AND. LDVR.LT.N ) ) THEN + INFO = -14 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV. The workspace is +* computed assuming ILO = 1 and IHI = N, the worst case.) +* + IF( INFO.EQ.0 ) THEN + MINWRK = MAX( 1, 8*N ) + MAXWRK = MAX( 1, N*( 7 + + $ ILAENV( 1, 'DGEQRF', ' ', N, 1, N, 0 ) ) ) + MAXWRK = MAX( MAXWRK, N*( 7 + + $ ILAENV( 1, 'DORMQR', ' ', N, 1, N, 0 ) ) ) + IF( ILVL ) THEN + MAXWRK = MAX( MAXWRK, N*( 7 + + $ ILAENV( 1, 'DORGQR', ' ', N, 1, N, -1 ) ) ) + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) + $ INFO = -16 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGGEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = DLANGE( 'M', N, N, A, LDA, WORK ) + ILASCL = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ANRMTO = SMLNUM + ILASCL = .TRUE. + ELSE IF( ANRM.GT.BIGNUM ) THEN + ANRMTO = BIGNUM + ILASCL = .TRUE. + END IF + IF( ILASCL ) + $ CALL DLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR ) +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = DLANGE( 'M', N, N, B, LDB, WORK ) + ILBSCL = .FALSE. + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN + BNRMTO = SMLNUM + ILBSCL = .TRUE. + ELSE IF( BNRM.GT.BIGNUM ) THEN + BNRMTO = BIGNUM + ILBSCL = .TRUE. + END IF + IF( ILBSCL ) + $ CALL DLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR ) +* +* Permute the matrices A, B to isolate eigenvalues if possible +* (Workspace: need 6*N) +* + ILEFT = 1 + IRIGHT = N + 1 + IWRK = IRIGHT + N + CALL DGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), WORK( IWRK ), IERR ) +* +* Reduce B to triangular form (QR decomposition of B) +* (Workspace: need N, prefer N*NB) +* + IROWS = IHI + 1 - ILO + IF( ILV ) THEN + ICOLS = N + 1 - ILO + ELSE + ICOLS = IROWS + END IF + ITAU = IWRK + IWRK = ITAU + IROWS + CALL DGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ), + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) +* +* Apply the orthogonal transformation to matrix A +* (Workspace: need N, prefer N*NB) +* + CALL DORMQR( 'L', 'T', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB, + $ WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ), + $ LWORK+1-IWRK, IERR ) +* +* Initialize VL +* (Workspace: need N, prefer N*NB) +* + IF( ILVL ) THEN + CALL DLASET( 'Full', N, N, ZERO, ONE, VL, LDVL ) + IF( IROWS.GT.1 ) THEN + CALL DLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB, + $ VL( ILO+1, ILO ), LDVL ) + END IF + CALL DORGQR( IROWS, IROWS, IROWS, VL( ILO, ILO ), LDVL, + $ WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR ) + END IF +* +* Initialize VR +* + IF( ILVR ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, VR, LDVR ) +* +* Reduce to generalized Hessenberg form +* (Workspace: none needed) +* + IF( ILV ) THEN +* +* Eigenvectors requested -- work on whole matrix. +* + CALL DGGHRD( JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, VL, + $ LDVL, VR, LDVR, IERR ) + ELSE + CALL DGGHRD( 'N', 'N', IROWS, 1, IROWS, A( ILO, ILO ), LDA, + $ B( ILO, ILO ), LDB, VL, LDVL, VR, LDVR, IERR ) + END IF +* +* Perform QZ algorithm (Compute eigenvalues, and optionally, the +* Schur forms and Schur vectors) +* (Workspace: need N) +* + IWRK = ITAU + IF( ILV ) THEN + CHTEMP = 'S' + ELSE + CHTEMP = 'E' + END IF + CALL DHGEQZ( CHTEMP, JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, + $ ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) + IF( IERR.NE.0 ) THEN + IF( IERR.GT.0 .AND. IERR.LE.N ) THEN + INFO = IERR + ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN + INFO = IERR - N + ELSE + INFO = N + 1 + END IF + GO TO 110 + END IF +* +* Compute Eigenvectors +* (Workspace: need 6*N) +* + IF( ILV ) THEN + IF( ILVL ) THEN + IF( ILVR ) THEN + CHTEMP = 'B' + ELSE + CHTEMP = 'L' + END IF + ELSE + CHTEMP = 'R' + END IF + CALL DTGEVC( CHTEMP, 'B', LDUMMA, N, A, LDA, B, LDB, VL, LDVL, + $ VR, LDVR, N, IN, WORK( IWRK ), IERR ) + IF( IERR.NE.0 ) THEN + INFO = N + 2 + GO TO 110 + END IF +* +* Undo balancing on VL and VR and normalization +* (Workspace: none needed) +* + IF( ILVL ) THEN + CALL DGGBAK( 'P', 'L', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VL, LDVL, IERR ) + DO 50 JC = 1, N + IF( ALPHAI( JC ).LT.ZERO ) + $ GO TO 50 + TEMP = ZERO + IF( ALPHAI( JC ).EQ.ZERO ) THEN + DO 10 JR = 1, N + TEMP = MAX( TEMP, ABS( VL( JR, JC ) ) ) + 10 CONTINUE + ELSE + DO 20 JR = 1, N + TEMP = MAX( TEMP, ABS( VL( JR, JC ) )+ + $ ABS( VL( JR, JC+1 ) ) ) + 20 CONTINUE + END IF + IF( TEMP.LT.SMLNUM ) + $ GO TO 50 + TEMP = ONE / TEMP + IF( ALPHAI( JC ).EQ.ZERO ) THEN + DO 30 JR = 1, N + VL( JR, JC ) = VL( JR, JC )*TEMP + 30 CONTINUE + ELSE + DO 40 JR = 1, N + VL( JR, JC ) = VL( JR, JC )*TEMP + VL( JR, JC+1 ) = VL( JR, JC+1 )*TEMP + 40 CONTINUE + END IF + 50 CONTINUE + END IF + IF( ILVR ) THEN + CALL DGGBAK( 'P', 'R', N, ILO, IHI, WORK( ILEFT ), + $ WORK( IRIGHT ), N, VR, LDVR, IERR ) + DO 100 JC = 1, N + IF( ALPHAI( JC ).LT.ZERO ) + $ GO TO 100 + TEMP = ZERO + IF( ALPHAI( JC ).EQ.ZERO ) THEN + DO 60 JR = 1, N + TEMP = MAX( TEMP, ABS( VR( JR, JC ) ) ) + 60 CONTINUE + ELSE + DO 70 JR = 1, N + TEMP = MAX( TEMP, ABS( VR( JR, JC ) )+ + $ ABS( VR( JR, JC+1 ) ) ) + 70 CONTINUE + END IF + IF( TEMP.LT.SMLNUM ) + $ GO TO 100 + TEMP = ONE / TEMP + IF( ALPHAI( JC ).EQ.ZERO ) THEN + DO 80 JR = 1, N + VR( JR, JC ) = VR( JR, JC )*TEMP + 80 CONTINUE + ELSE + DO 90 JR = 1, N + VR( JR, JC ) = VR( JR, JC )*TEMP + VR( JR, JC+1 ) = VR( JR, JC+1 )*TEMP + 90 CONTINUE + END IF + 100 CONTINUE + END IF +* +* End of eigenvector calculation +* + END IF +* +* Undo scaling if necessary +* + IF( ILASCL ) THEN + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAR, N, IERR ) + CALL DLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHAI, N, IERR ) + END IF +* + IF( ILBSCL ) THEN + CALL DLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR ) + END IF +* + 110 CONTINUE +* + WORK( 1 ) = MAXWRK +* + RETURN +* +* End of DGGEV +* + END diff --git a/2.3-1/src/fortran/lapack/dgghrd.f b/2.3-1/src/fortran/lapack/dgghrd.f new file mode 100644 index 00000000..6b8bbb08 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dgghrd.f @@ -0,0 +1,264 @@ + SUBROUTINE DGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q, + $ LDQ, Z, LDZ, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ, COMPZ + INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DGGHRD reduces a pair of real matrices (A,B) to generalized upper +* Hessenberg form using orthogonal transformations, where A is a +* general matrix and B is upper triangular. The form of the +* generalized eigenvalue problem is +* A*x = lambda*B*x, +* and B is typically made upper triangular by computing its QR +* factorization and moving the orthogonal matrix Q to the left side +* of the equation. +* +* This subroutine simultaneously reduces A to a Hessenberg matrix H: +* Q**T*A*Z = H +* and transforms B to another upper triangular matrix T: +* Q**T*B*Z = T +* in order to reduce the problem to its standard form +* H*y = lambda*T*y +* where y = Z**T*x. +* +* The orthogonal matrices Q and Z are determined as products of Givens +* rotations. They may either be formed explicitly, or they may be +* postmultiplied into input matrices Q1 and Z1, so that +* +* Q1 * A * Z1**T = (Q1*Q) * H * (Z1*Z)**T +* +* Q1 * B * Z1**T = (Q1*Q) * T * (Z1*Z)**T +* +* If Q1 is the orthogonal matrix from the QR factorization of B in the +* original equation A*x = lambda*B*x, then DGGHRD reduces the original +* problem to generalized Hessenberg form. +* +* Arguments +* ========= +* +* COMPQ (input) CHARACTER*1 +* = 'N': do not compute Q; +* = 'I': Q is initialized to the unit matrix, and the +* orthogonal matrix Q is returned; +* = 'V': Q must contain an orthogonal matrix Q1 on entry, +* and the product Q1*Q is returned. +* +* COMPZ (input) CHARACTER*1 +* = 'N': do not compute Z; +* = 'I': Z is initialized to the unit matrix, and the +* orthogonal matrix Z is returned; +* = 'V': Z must contain an orthogonal matrix Z1 on entry, +* and the product Z1*Z is returned. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI mark the rows and columns of A which are to be +* reduced. It is assumed that A is already upper triangular +* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are +* normally set by a previous call to SGGBAL; otherwise they +* should be set to 1 and N respectively. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the N-by-N general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* rest is set to zero. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB, N) +* On entry, the N-by-N upper triangular matrix B. +* On exit, the upper triangular matrix T = Q**T B Z. The +* elements below the diagonal are set to zero. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N) +* On entry, if COMPQ = 'V', the orthogonal matrix Q1, +* typically from the QR factorization of B. +* On exit, if COMPQ='I', the orthogonal matrix Q, and if +* COMPQ = 'V', the product Q1*Q. +* Not referenced if COMPQ='N'. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. +* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', the orthogonal matrix Z1. +* On exit, if COMPZ='I', the orthogonal matrix Z, and if +* COMPZ = 'V', the product Z1*Z. +* Not referenced if COMPZ='N'. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. +* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* This routine reduces A to Hessenberg and B to triangular form by +* an unblocked reduction, as described in _Matrix_Computations_, +* by Golub and Van Loan (Johns Hopkins Press.) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ILQ, ILZ + INTEGER ICOMPQ, ICOMPZ, JCOL, JROW + DOUBLE PRECISION C, S, TEMP +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARTG, DLASET, DROT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Decode COMPQ +* + IF( LSAME( COMPQ, 'N' ) ) THEN + ILQ = .FALSE. + ICOMPQ = 1 + ELSE IF( LSAME( COMPQ, 'V' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 2 + ELSE IF( LSAME( COMPQ, 'I' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 3 + ELSE + ICOMPQ = 0 + END IF +* +* Decode COMPZ +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ILZ = .FALSE. + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 2 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 3 + ELSE + ICOMPZ = 0 + END IF +* +* Test the input parameters. +* + INFO = 0 + IF( ICOMPQ.LE.0 ) THEN + INFO = -1 + ELSE IF( ICOMPZ.LE.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 ) THEN + INFO = -4 + ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( ( ILQ .AND. LDQ.LT.N ) .OR. LDQ.LT.1 ) THEN + INFO = -11 + ELSE IF( ( ILZ .AND. LDZ.LT.N ) .OR. LDZ.LT.1 ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DGGHRD', -INFO ) + RETURN + END IF +* +* Initialize Q and Z if desired. +* + IF( ICOMPQ.EQ.3 ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, Q, LDQ ) + IF( ICOMPZ.EQ.3 ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, Z, LDZ ) +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* +* Zero out lower triangle of B +* + DO 20 JCOL = 1, N - 1 + DO 10 JROW = JCOL + 1, N + B( JROW, JCOL ) = ZERO + 10 CONTINUE + 20 CONTINUE +* +* Reduce A and B +* + DO 40 JCOL = ILO, IHI - 2 +* + DO 30 JROW = IHI, JCOL + 2, -1 +* +* Step 1: rotate rows JROW-1, JROW to kill A(JROW,JCOL) +* + TEMP = A( JROW-1, JCOL ) + CALL DLARTG( TEMP, A( JROW, JCOL ), C, S, + $ A( JROW-1, JCOL ) ) + A( JROW, JCOL ) = ZERO + CALL DROT( N-JCOL, A( JROW-1, JCOL+1 ), LDA, + $ A( JROW, JCOL+1 ), LDA, C, S ) + CALL DROT( N+2-JROW, B( JROW-1, JROW-1 ), LDB, + $ B( JROW, JROW-1 ), LDB, C, S ) + IF( ILQ ) + $ CALL DROT( N, Q( 1, JROW-1 ), 1, Q( 1, JROW ), 1, C, S ) +* +* Step 2: rotate columns JROW, JROW-1 to kill B(JROW,JROW-1) +* + TEMP = B( JROW, JROW ) + CALL DLARTG( TEMP, B( JROW, JROW-1 ), C, S, + $ B( JROW, JROW ) ) + B( JROW, JROW-1 ) = ZERO + CALL DROT( IHI, A( 1, JROW ), 1, A( 1, JROW-1 ), 1, C, S ) + CALL DROT( JROW-1, B( 1, JROW ), 1, B( 1, JROW-1 ), 1, C, + $ S ) + IF( ILZ ) + $ CALL DROT( N, Z( 1, JROW ), 1, Z( 1, JROW-1 ), 1, C, S ) + 30 CONTINUE + 40 CONTINUE +* + RETURN +* +* End of DGGHRD +* + END diff --git a/2.3-1/src/fortran/lapack/dhgeqz.f b/2.3-1/src/fortran/lapack/dhgeqz.f new file mode 100644 index 00000000..de137dc1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dhgeqz.f @@ -0,0 +1,1243 @@ + SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT, + $ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK, + $ LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ, COMPZ, JOB + INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION ALPHAI( * ), ALPHAR( * ), BETA( * ), + $ H( LDH, * ), Q( LDQ, * ), T( LDT, * ), + $ WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DHGEQZ computes the eigenvalues of a real matrix pair (H,T), +* where H is an upper Hessenberg matrix and T is upper triangular, +* using the double-shift QZ method. +* Matrix pairs of this type are produced by the reduction to +* generalized upper Hessenberg form of a real matrix pair (A,B): +* +* A = Q1*H*Z1**T, B = Q1*T*Z1**T, +* +* as computed by DGGHRD. +* +* If JOB='S', then the Hessenberg-triangular pair (H,T) is +* also reduced to generalized Schur form, +* +* H = Q*S*Z**T, T = Q*P*Z**T, +* +* where Q and Z are orthogonal matrices, P is an upper triangular +* matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2 +* diagonal blocks. +* +* The 1-by-1 blocks correspond to real eigenvalues of the matrix pair +* (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of +* eigenvalues. +* +* Additionally, the 2-by-2 upper triangular diagonal blocks of P +* corresponding to 2-by-2 blocks of S are reduced to positive diagonal +* form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0, +* P(j,j) > 0, and P(j+1,j+1) > 0. +* +* Optionally, the orthogonal matrix Q from the generalized Schur +* factorization may be postmultiplied into an input matrix Q1, and the +* orthogonal matrix Z may be postmultiplied into an input matrix Z1. +* If Q1 and Z1 are the orthogonal matrices from DGGHRD that reduced +* the matrix pair (A,B) to generalized upper Hessenberg form, then the +* output matrices Q1*Q and Z1*Z are the orthogonal factors from the +* generalized Schur factorization of (A,B): +* +* A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T. +* +* To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently, +* of (A,B)) are computed as a pair of values (alpha,beta), where alpha is +* complex and beta real. +* If beta is nonzero, lambda = alpha / beta is an eigenvalue of the +* generalized nonsymmetric eigenvalue problem (GNEP) +* A*x = lambda*B*x +* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the +* alternate form of the GNEP +* mu*A*y = B*y. +* Real eigenvalues can be read directly from the generalized Schur +* form: +* alpha = S(i,i), beta = P(i,i). +* +* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix +* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973), +* pp. 241--256. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* = 'E': Compute eigenvalues only; +* = 'S': Compute eigenvalues and the Schur form. +* +* COMPQ (input) CHARACTER*1 +* = 'N': Left Schur vectors (Q) are not computed; +* = 'I': Q is initialized to the unit matrix and the matrix Q +* of left Schur vectors of (H,T) is returned; +* = 'V': Q must contain an orthogonal matrix Q1 on entry and +* the product Q1*Q is returned. +* +* COMPZ (input) CHARACTER*1 +* = 'N': Right Schur vectors (Z) are not computed; +* = 'I': Z is initialized to the unit matrix and the matrix Z +* of right Schur vectors of (H,T) is returned; +* = 'V': Z must contain an orthogonal matrix Z1 on entry and +* the product Z1*Z is returned. +* +* N (input) INTEGER +* The order of the matrices H, T, Q, and Z. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI mark the rows and columns of H which are in +* Hessenberg form. It is assumed that A is already upper +* triangular in rows and columns 1:ILO-1 and IHI+1:N. +* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0. +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH, N) +* On entry, the N-by-N upper Hessenberg matrix H. +* On exit, if JOB = 'S', H contains the upper quasi-triangular +* matrix S from the generalized Schur factorization; +* 2-by-2 diagonal blocks (corresponding to complex conjugate +* pairs of eigenvalues) are returned in standard form, with +* H(i,i) = H(i+1,i+1) and H(i+1,i)*H(i,i+1) < 0. +* If JOB = 'E', the diagonal blocks of H match those of S, but +* the rest of H is unspecified. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH >= max( 1, N ). +* +* T (input/output) DOUBLE PRECISION array, dimension (LDT, N) +* On entry, the N-by-N upper triangular matrix T. +* On exit, if JOB = 'S', T contains the upper triangular +* matrix P from the generalized Schur factorization; +* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S +* are reduced to positive diagonal form, i.e., if H(j+1,j) is +* non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and +* T(j+1,j+1) > 0. +* If JOB = 'E', the diagonal blocks of T match those of P, but +* the rest of T is unspecified. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max( 1, N ). +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (N) +* The real parts of each scalar alpha defining an eigenvalue +* of GNEP. +* +* ALPHAI (output) DOUBLE PRECISION array, dimension (N) +* The imaginary parts of each scalar alpha defining an +* eigenvalue of GNEP. +* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if +* positive, then the j-th and (j+1)-st eigenvalues are a +* complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j). +* +* BETA (output) DOUBLE PRECISION array, dimension (N) +* The scalars beta that define the eigenvalues of GNEP. +* Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and +* beta = BETA(j) represent the j-th eigenvalue of the matrix +* pair (A,B), in one of the forms lambda = alpha/beta or +* mu = beta/alpha. Since either lambda or mu may overflow, +* they should not, in general, be computed. +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N) +* On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in +* the reduction of (A,B) to generalized Hessenberg form. +* On exit, if COMPZ = 'I', the orthogonal matrix of left Schur +* vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix +* of left Schur vectors of (A,B). +* Not referenced if COMPZ = 'N'. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1. +* If COMPQ='V' or 'I', then LDQ >= N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in +* the reduction of (A,B) to generalized Hessenberg form. +* On exit, if COMPZ = 'I', the orthogonal matrix of +* right Schur vectors of (H,T), and if COMPZ = 'V', the +* orthogonal matrix of right Schur vectors of (A,B). +* Not referenced if COMPZ = 'N'. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1. +* If COMPZ='V' or 'I', then LDZ >= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1,...,N: the QZ iteration did not converge. (H,T) is not +* in Schur form, but ALPHAR(i), ALPHAI(i), and +* BETA(i), i=INFO+1,...,N should be correct. +* = N+1,...,2*N: the shift calculation failed. (H,T) is not +* in Schur form, but ALPHAR(i), ALPHAI(i), and +* BETA(i), i=INFO-N+1,...,N should be correct. +* +* Further Details +* =============== +* +* Iteration counters: +* +* JITER -- counts iterations. +* IITER -- counts iterations run since ILAST was last +* changed. This is therefore reset only when a 1-by-1 or +* 2-by-2 block deflates off the bottom. +* +* ===================================================================== +* +* .. Parameters .. +* $ SAFETY = 1.0E+0 ) + DOUBLE PRECISION HALF, ZERO, ONE, SAFETY + PARAMETER ( HALF = 0.5D+0, ZERO = 0.0D+0, ONE = 1.0D+0, + $ SAFETY = 1.0D+2 ) +* .. +* .. Local Scalars .. + LOGICAL ILAZR2, ILAZRO, ILPIVT, ILQ, ILSCHR, ILZ, + $ LQUERY + INTEGER ICOMPQ, ICOMPZ, IFIRST, IFRSTM, IITER, ILAST, + $ ILASTM, IN, ISCHUR, ISTART, J, JC, JCH, JITER, + $ JR, MAXIT + DOUBLE PRECISION A11, A12, A1I, A1R, A21, A22, A2I, A2R, AD11, + $ AD11L, AD12, AD12L, AD21, AD21L, AD22, AD22L, + $ AD32L, AN, ANORM, ASCALE, ATOL, B11, B1A, B1I, + $ B1R, B22, B2A, B2I, B2R, BN, BNORM, BSCALE, + $ BTOL, C, C11I, C11R, C12, C21, C22I, C22R, CL, + $ CQ, CR, CZ, ESHIFT, S, S1, S1INV, S2, SAFMAX, + $ SAFMIN, SCALE, SL, SQI, SQR, SR, SZI, SZR, T1, + $ TAU, TEMP, TEMP2, TEMPI, TEMPR, U1, U12, U12L, + $ U2, ULP, VS, W11, W12, W21, W22, WABS, WI, WR, + $ WR2 +* .. +* .. Local Arrays .. + DOUBLE PRECISION V( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, DLANHS, DLAPY2, DLAPY3 + EXTERNAL LSAME, DLAMCH, DLANHS, DLAPY2, DLAPY3 +* .. +* .. External Subroutines .. + EXTERNAL DLAG2, DLARFG, DLARTG, DLASET, DLASV2, DROT, + $ XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* Decode JOB, COMPQ, COMPZ +* + IF( LSAME( JOB, 'E' ) ) THEN + ILSCHR = .FALSE. + ISCHUR = 1 + ELSE IF( LSAME( JOB, 'S' ) ) THEN + ILSCHR = .TRUE. + ISCHUR = 2 + ELSE + ISCHUR = 0 + END IF +* + IF( LSAME( COMPQ, 'N' ) ) THEN + ILQ = .FALSE. + ICOMPQ = 1 + ELSE IF( LSAME( COMPQ, 'V' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 2 + ELSE IF( LSAME( COMPQ, 'I' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 3 + ELSE + ICOMPQ = 0 + END IF +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ILZ = .FALSE. + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 2 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 3 + ELSE + ICOMPZ = 0 + END IF +* +* Check Argument Values +* + INFO = 0 + WORK( 1 ) = MAX( 1, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( ISCHUR.EQ.0 ) THEN + INFO = -1 + ELSE IF( ICOMPQ.EQ.0 ) THEN + INFO = -2 + ELSE IF( ICOMPZ.EQ.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( ILO.LT.1 ) THEN + INFO = -5 + ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN + INFO = -6 + ELSE IF( LDH.LT.N ) THEN + INFO = -8 + ELSE IF( LDT.LT.N ) THEN + INFO = -10 + ELSE IF( LDQ.LT.1 .OR. ( ILQ .AND. LDQ.LT.N ) ) THEN + INFO = -15 + ELSE IF( LDZ.LT.1 .OR. ( ILZ .AND. LDZ.LT.N ) ) THEN + INFO = -17 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -19 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DHGEQZ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + WORK( 1 ) = DBLE( 1 ) + RETURN + END IF +* +* Initialize Q and Z +* + IF( ICOMPQ.EQ.3 ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, Q, LDQ ) + IF( ICOMPZ.EQ.3 ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, Z, LDZ ) +* +* Machine Constants +* + IN = IHI + 1 - ILO + SAFMIN = DLAMCH( 'S' ) + SAFMAX = ONE / SAFMIN + ULP = DLAMCH( 'E' )*DLAMCH( 'B' ) + ANORM = DLANHS( 'F', IN, H( ILO, ILO ), LDH, WORK ) + BNORM = DLANHS( 'F', IN, T( ILO, ILO ), LDT, WORK ) + ATOL = MAX( SAFMIN, ULP*ANORM ) + BTOL = MAX( SAFMIN, ULP*BNORM ) + ASCALE = ONE / MAX( SAFMIN, ANORM ) + BSCALE = ONE / MAX( SAFMIN, BNORM ) +* +* Set Eigenvalues IHI+1:N +* + DO 30 J = IHI + 1, N + IF( T( J, J ).LT.ZERO ) THEN + IF( ILSCHR ) THEN + DO 10 JR = 1, J + H( JR, J ) = -H( JR, J ) + T( JR, J ) = -T( JR, J ) + 10 CONTINUE + ELSE + H( J, J ) = -H( J, J ) + T( J, J ) = -T( J, J ) + END IF + IF( ILZ ) THEN + DO 20 JR = 1, N + Z( JR, J ) = -Z( JR, J ) + 20 CONTINUE + END IF + END IF + ALPHAR( J ) = H( J, J ) + ALPHAI( J ) = ZERO + BETA( J ) = T( J, J ) + 30 CONTINUE +* +* If IHI < ILO, skip QZ steps +* + IF( IHI.LT.ILO ) + $ GO TO 380 +* +* MAIN QZ ITERATION LOOP +* +* Initialize dynamic indices +* +* Eigenvalues ILAST+1:N have been found. +* Column operations modify rows IFRSTM:whatever. +* Row operations modify columns whatever:ILASTM. +* +* If only eigenvalues are being computed, then +* IFRSTM is the row of the last splitting row above row ILAST; +* this is always at least ILO. +* IITER counts iterations since the last eigenvalue was found, +* to tell when to use an extraordinary shift. +* MAXIT is the maximum number of QZ sweeps allowed. +* + ILAST = IHI + IF( ILSCHR ) THEN + IFRSTM = 1 + ILASTM = N + ELSE + IFRSTM = ILO + ILASTM = IHI + END IF + IITER = 0 + ESHIFT = ZERO + MAXIT = 30*( IHI-ILO+1 ) +* + DO 360 JITER = 1, MAXIT +* +* Split the matrix if possible. +* +* Two tests: +* 1: H(j,j-1)=0 or j=ILO +* 2: T(j,j)=0 +* + IF( ILAST.EQ.ILO ) THEN +* +* Special case: j=ILAST +* + GO TO 80 + ELSE + IF( ABS( H( ILAST, ILAST-1 ) ).LE.ATOL ) THEN + H( ILAST, ILAST-1 ) = ZERO + GO TO 80 + END IF + END IF +* + IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN + T( ILAST, ILAST ) = ZERO + GO TO 70 + END IF +* +* General case: j unfl ) +* __ +* (sA - wB) ( CZ -SZ ) +* ( SZ CZ ) +* + C11R = S1*A11 - WR*B11 + C11I = -WI*B11 + C12 = S1*A12 + C21 = S1*A21 + C22R = S1*A22 - WR*B22 + C22I = -WI*B22 +* + IF( ABS( C11R )+ABS( C11I )+ABS( C12 ).GT.ABS( C21 )+ + $ ABS( C22R )+ABS( C22I ) ) THEN + T1 = DLAPY3( C12, C11R, C11I ) + CZ = C12 / T1 + SZR = -C11R / T1 + SZI = -C11I / T1 + ELSE + CZ = DLAPY2( C22R, C22I ) + IF( CZ.LE.SAFMIN ) THEN + CZ = ZERO + SZR = ONE + SZI = ZERO + ELSE + TEMPR = C22R / CZ + TEMPI = C22I / CZ + T1 = DLAPY2( CZ, C21 ) + CZ = CZ / T1 + SZR = -C21*TEMPR / T1 + SZI = C21*TEMPI / T1 + END IF + END IF +* +* Compute Givens rotation on left +* +* ( CQ SQ ) +* ( __ ) A or B +* ( -SQ CQ ) +* + AN = ABS( A11 ) + ABS( A12 ) + ABS( A21 ) + ABS( A22 ) + BN = ABS( B11 ) + ABS( B22 ) + WABS = ABS( WR ) + ABS( WI ) + IF( S1*AN.GT.WABS*BN ) THEN + CQ = CZ*B11 + SQR = SZR*B22 + SQI = -SZI*B22 + ELSE + A1R = CZ*A11 + SZR*A12 + A1I = SZI*A12 + A2R = CZ*A21 + SZR*A22 + A2I = SZI*A22 + CQ = DLAPY2( A1R, A1I ) + IF( CQ.LE.SAFMIN ) THEN + CQ = ZERO + SQR = ONE + SQI = ZERO + ELSE + TEMPR = A1R / CQ + TEMPI = A1I / CQ + SQR = TEMPR*A2R + TEMPI*A2I + SQI = TEMPI*A2R - TEMPR*A2I + END IF + END IF + T1 = DLAPY3( CQ, SQR, SQI ) + CQ = CQ / T1 + SQR = SQR / T1 + SQI = SQI / T1 +* +* Compute diagonal elements of QBZ +* + TEMPR = SQR*SZR - SQI*SZI + TEMPI = SQR*SZI + SQI*SZR + B1R = CQ*CZ*B11 + TEMPR*B22 + B1I = TEMPI*B22 + B1A = DLAPY2( B1R, B1I ) + B2R = CQ*CZ*B22 + TEMPR*B11 + B2I = -TEMPI*B11 + B2A = DLAPY2( B2R, B2I ) +* +* Normalize so beta > 0, and Im( alpha1 ) > 0 +* + BETA( ILAST-1 ) = B1A + BETA( ILAST ) = B2A + ALPHAR( ILAST-1 ) = ( WR*B1A )*S1INV + ALPHAI( ILAST-1 ) = ( WI*B1A )*S1INV + ALPHAR( ILAST ) = ( WR*B2A )*S1INV + ALPHAI( ILAST ) = -( WI*B2A )*S1INV +* +* Step 3: Go to next block -- exit if finished. +* + ILAST = IFIRST - 1 + IF( ILAST.LT.ILO ) + $ GO TO 380 +* +* Reset counters +* + IITER = 0 + ESHIFT = ZERO + IF( .NOT.ILSCHR ) THEN + ILASTM = ILAST + IF( IFRSTM.GT.ILAST ) + $ IFRSTM = ILO + END IF + GO TO 350 + ELSE +* +* Usual case: 3x3 or larger block, using Francis implicit +* double-shift +* +* 2 +* Eigenvalue equation is w - c w + d = 0, +* +* -1 2 -1 +* so compute 1st column of (A B ) - c A B + d +* using the formula in QZIT (from EISPACK) +* +* We assume that the block is at least 3x3 +* + AD11 = ( ASCALE*H( ILAST-1, ILAST-1 ) ) / + $ ( BSCALE*T( ILAST-1, ILAST-1 ) ) + AD21 = ( ASCALE*H( ILAST, ILAST-1 ) ) / + $ ( BSCALE*T( ILAST-1, ILAST-1 ) ) + AD12 = ( ASCALE*H( ILAST-1, ILAST ) ) / + $ ( BSCALE*T( ILAST, ILAST ) ) + AD22 = ( ASCALE*H( ILAST, ILAST ) ) / + $ ( BSCALE*T( ILAST, ILAST ) ) + U12 = T( ILAST-1, ILAST ) / T( ILAST, ILAST ) + AD11L = ( ASCALE*H( IFIRST, IFIRST ) ) / + $ ( BSCALE*T( IFIRST, IFIRST ) ) + AD21L = ( ASCALE*H( IFIRST+1, IFIRST ) ) / + $ ( BSCALE*T( IFIRST, IFIRST ) ) + AD12L = ( ASCALE*H( IFIRST, IFIRST+1 ) ) / + $ ( BSCALE*T( IFIRST+1, IFIRST+1 ) ) + AD22L = ( ASCALE*H( IFIRST+1, IFIRST+1 ) ) / + $ ( BSCALE*T( IFIRST+1, IFIRST+1 ) ) + AD32L = ( ASCALE*H( IFIRST+2, IFIRST+1 ) ) / + $ ( BSCALE*T( IFIRST+1, IFIRST+1 ) ) + U12L = T( IFIRST, IFIRST+1 ) / T( IFIRST+1, IFIRST+1 ) +* + V( 1 ) = ( AD11-AD11L )*( AD22-AD11L ) - AD12*AD21 + + $ AD21*U12*AD11L + ( AD12L-AD11L*U12L )*AD21L + V( 2 ) = ( ( AD22L-AD11L )-AD21L*U12L-( AD11-AD11L )- + $ ( AD22-AD11L )+AD21*U12 )*AD21L + V( 3 ) = AD32L*AD21L +* + ISTART = IFIRST +* + CALL DLARFG( 3, V( 1 ), V( 2 ), 1, TAU ) + V( 1 ) = ONE +* +* Sweep +* + DO 290 J = ISTART, ILAST - 2 +* +* All but last elements: use 3x3 Householder transforms. +* +* Zero (j-1)st column of A +* + IF( J.GT.ISTART ) THEN + V( 1 ) = H( J, J-1 ) + V( 2 ) = H( J+1, J-1 ) + V( 3 ) = H( J+2, J-1 ) +* + CALL DLARFG( 3, H( J, J-1 ), V( 2 ), 1, TAU ) + V( 1 ) = ONE + H( J+1, J-1 ) = ZERO + H( J+2, J-1 ) = ZERO + END IF +* + DO 230 JC = J, ILASTM + TEMP = TAU*( H( J, JC )+V( 2 )*H( J+1, JC )+V( 3 )* + $ H( J+2, JC ) ) + H( J, JC ) = H( J, JC ) - TEMP + H( J+1, JC ) = H( J+1, JC ) - TEMP*V( 2 ) + H( J+2, JC ) = H( J+2, JC ) - TEMP*V( 3 ) + TEMP2 = TAU*( T( J, JC )+V( 2 )*T( J+1, JC )+V( 3 )* + $ T( J+2, JC ) ) + T( J, JC ) = T( J, JC ) - TEMP2 + T( J+1, JC ) = T( J+1, JC ) - TEMP2*V( 2 ) + T( J+2, JC ) = T( J+2, JC ) - TEMP2*V( 3 ) + 230 CONTINUE + IF( ILQ ) THEN + DO 240 JR = 1, N + TEMP = TAU*( Q( JR, J )+V( 2 )*Q( JR, J+1 )+V( 3 )* + $ Q( JR, J+2 ) ) + Q( JR, J ) = Q( JR, J ) - TEMP + Q( JR, J+1 ) = Q( JR, J+1 ) - TEMP*V( 2 ) + Q( JR, J+2 ) = Q( JR, J+2 ) - TEMP*V( 3 ) + 240 CONTINUE + END IF +* +* Zero j-th column of B (see DLAGBC for details) +* +* Swap rows to pivot +* + ILPIVT = .FALSE. + TEMP = MAX( ABS( T( J+1, J+1 ) ), ABS( T( J+1, J+2 ) ) ) + TEMP2 = MAX( ABS( T( J+2, J+1 ) ), ABS( T( J+2, J+2 ) ) ) + IF( MAX( TEMP, TEMP2 ).LT.SAFMIN ) THEN + SCALE = ZERO + U1 = ONE + U2 = ZERO + GO TO 250 + ELSE IF( TEMP.GE.TEMP2 ) THEN + W11 = T( J+1, J+1 ) + W21 = T( J+2, J+1 ) + W12 = T( J+1, J+2 ) + W22 = T( J+2, J+2 ) + U1 = T( J+1, J ) + U2 = T( J+2, J ) + ELSE + W21 = T( J+1, J+1 ) + W11 = T( J+2, J+1 ) + W22 = T( J+1, J+2 ) + W12 = T( J+2, J+2 ) + U2 = T( J+1, J ) + U1 = T( J+2, J ) + END IF +* +* Swap columns if nec. +* + IF( ABS( W12 ).GT.ABS( W11 ) ) THEN + ILPIVT = .TRUE. + TEMP = W12 + TEMP2 = W22 + W12 = W11 + W22 = W21 + W11 = TEMP + W21 = TEMP2 + END IF +* +* LU-factor +* + TEMP = W21 / W11 + U2 = U2 - TEMP*U1 + W22 = W22 - TEMP*W12 + W21 = ZERO +* +* Compute SCALE +* + SCALE = ONE + IF( ABS( W22 ).LT.SAFMIN ) THEN + SCALE = ZERO + U2 = ONE + U1 = -W12 / W11 + GO TO 250 + END IF + IF( ABS( W22 ).LT.ABS( U2 ) ) + $ SCALE = ABS( W22 / U2 ) + IF( ABS( W11 ).LT.ABS( U1 ) ) + $ SCALE = MIN( SCALE, ABS( W11 / U1 ) ) +* +* Solve +* + U2 = ( SCALE*U2 ) / W22 + U1 = ( SCALE*U1-W12*U2 ) / W11 +* + 250 CONTINUE + IF( ILPIVT ) THEN + TEMP = U2 + U2 = U1 + U1 = TEMP + END IF +* +* Compute Householder Vector +* + T1 = SQRT( SCALE**2+U1**2+U2**2 ) + TAU = ONE + SCALE / T1 + VS = -ONE / ( SCALE+T1 ) + V( 1 ) = ONE + V( 2 ) = VS*U1 + V( 3 ) = VS*U2 +* +* Apply transformations from the right. +* + DO 260 JR = IFRSTM, MIN( J+3, ILAST ) + TEMP = TAU*( H( JR, J )+V( 2 )*H( JR, J+1 )+V( 3 )* + $ H( JR, J+2 ) ) + H( JR, J ) = H( JR, J ) - TEMP + H( JR, J+1 ) = H( JR, J+1 ) - TEMP*V( 2 ) + H( JR, J+2 ) = H( JR, J+2 ) - TEMP*V( 3 ) + 260 CONTINUE + DO 270 JR = IFRSTM, J + 2 + TEMP = TAU*( T( JR, J )+V( 2 )*T( JR, J+1 )+V( 3 )* + $ T( JR, J+2 ) ) + T( JR, J ) = T( JR, J ) - TEMP + T( JR, J+1 ) = T( JR, J+1 ) - TEMP*V( 2 ) + T( JR, J+2 ) = T( JR, J+2 ) - TEMP*V( 3 ) + 270 CONTINUE + IF( ILZ ) THEN + DO 280 JR = 1, N + TEMP = TAU*( Z( JR, J )+V( 2 )*Z( JR, J+1 )+V( 3 )* + $ Z( JR, J+2 ) ) + Z( JR, J ) = Z( JR, J ) - TEMP + Z( JR, J+1 ) = Z( JR, J+1 ) - TEMP*V( 2 ) + Z( JR, J+2 ) = Z( JR, J+2 ) - TEMP*V( 3 ) + 280 CONTINUE + END IF + T( J+1, J ) = ZERO + T( J+2, J ) = ZERO + 290 CONTINUE +* +* Last elements: Use Givens rotations +* +* Rotations from the left +* + J = ILAST - 1 + TEMP = H( J, J-1 ) + CALL DLARTG( TEMP, H( J+1, J-1 ), C, S, H( J, J-1 ) ) + H( J+1, J-1 ) = ZERO +* + DO 300 JC = J, ILASTM + TEMP = C*H( J, JC ) + S*H( J+1, JC ) + H( J+1, JC ) = -S*H( J, JC ) + C*H( J+1, JC ) + H( J, JC ) = TEMP + TEMP2 = C*T( J, JC ) + S*T( J+1, JC ) + T( J+1, JC ) = -S*T( J, JC ) + C*T( J+1, JC ) + T( J, JC ) = TEMP2 + 300 CONTINUE + IF( ILQ ) THEN + DO 310 JR = 1, N + TEMP = C*Q( JR, J ) + S*Q( JR, J+1 ) + Q( JR, J+1 ) = -S*Q( JR, J ) + C*Q( JR, J+1 ) + Q( JR, J ) = TEMP + 310 CONTINUE + END IF +* +* Rotations from the right. +* + TEMP = T( J+1, J+1 ) + CALL DLARTG( TEMP, T( J+1, J ), C, S, T( J+1, J+1 ) ) + T( J+1, J ) = ZERO +* + DO 320 JR = IFRSTM, ILAST + TEMP = C*H( JR, J+1 ) + S*H( JR, J ) + H( JR, J ) = -S*H( JR, J+1 ) + C*H( JR, J ) + H( JR, J+1 ) = TEMP + 320 CONTINUE + DO 330 JR = IFRSTM, ILAST - 1 + TEMP = C*T( JR, J+1 ) + S*T( JR, J ) + T( JR, J ) = -S*T( JR, J+1 ) + C*T( JR, J ) + T( JR, J+1 ) = TEMP + 330 CONTINUE + IF( ILZ ) THEN + DO 340 JR = 1, N + TEMP = C*Z( JR, J+1 ) + S*Z( JR, J ) + Z( JR, J ) = -S*Z( JR, J+1 ) + C*Z( JR, J ) + Z( JR, J+1 ) = TEMP + 340 CONTINUE + END IF +* +* End of Double-Shift code +* + END IF +* + GO TO 350 +* +* End of iteration loop +* + 350 CONTINUE + 360 CONTINUE +* +* Drop-through = non-convergence +* + INFO = ILAST + GO TO 420 +* +* Successful completion of all QZ steps +* + 380 CONTINUE +* +* Set Eigenvalues 1:ILO-1 +* + DO 410 J = 1, ILO - 1 + IF( T( J, J ).LT.ZERO ) THEN + IF( ILSCHR ) THEN + DO 390 JR = 1, J + H( JR, J ) = -H( JR, J ) + T( JR, J ) = -T( JR, J ) + 390 CONTINUE + ELSE + H( J, J ) = -H( J, J ) + T( J, J ) = -T( J, J ) + END IF + IF( ILZ ) THEN + DO 400 JR = 1, N + Z( JR, J ) = -Z( JR, J ) + 400 CONTINUE + END IF + END IF + ALPHAR( J ) = H( J, J ) + ALPHAI( J ) = ZERO + BETA( J ) = T( J, J ) + 410 CONTINUE +* +* Normal Termination +* + INFO = 0 +* +* Exit (other than argument error) -- return optimal workspace size +* + 420 CONTINUE + WORK( 1 ) = DBLE( N ) + RETURN +* +* End of DHGEQZ +* + END diff --git a/2.3-1/src/fortran/lapack/dhseqr.f b/2.3-1/src/fortran/lapack/dhseqr.f new file mode 100644 index 00000000..5b307fa8 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dhseqr.f @@ -0,0 +1,407 @@ + SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z, + $ LDZ, WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N + CHARACTER COMPZ, JOB +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ), + $ Z( LDZ, * ) +* .. +* Purpose +* ======= +* +* DHSEQR computes the eigenvalues of a Hessenberg matrix H +* and, optionally, the matrices T and Z from the Schur decomposition +* H = Z T Z**T, where T is an upper quasi-triangular matrix (the +* Schur form), and Z is the orthogonal matrix of Schur vectors. +* +* Optionally Z may be postmultiplied into an input orthogonal +* matrix Q so that this routine can give the Schur factorization +* of a matrix A which has been reduced to the Hessenberg form H +* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* = 'E': compute eigenvalues only; +* = 'S': compute eigenvalues and the Schur form T. +* +* COMPZ (input) CHARACTER*1 +* = 'N': no Schur vectors are computed; +* = 'I': Z is initialized to the unit matrix and the matrix Z +* of Schur vectors of H is returned; +* = 'V': Z must contain an orthogonal matrix Q on entry, and +* the product Q*Z is returned. +* +* N (input) INTEGER +* The order of the matrix H. N .GE. 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally +* set by a previous call to DGEBAL, and then passed to DGEHRD +* when the matrix output by DGEBAL is reduced to Hessenberg +* form. Otherwise ILO and IHI should be set to 1 and N +* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. +* If N = 0, then ILO = 1 and IHI = 0. +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO = 0 and JOB = 'S', then H contains the +* upper quasi-triangular matrix T from the Schur decomposition +* (the Schur form); 2-by-2 diagonal blocks (corresponding to +* complex conjugate pairs of eigenvalues) are returned in +* standard form, with H(i,i) = H(i+1,i+1) and +* H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the +* contents of H are unspecified on exit. (The output value of +* H when INFO.GT.0 is given under the description of INFO +* below.) +* +* Unlike earlier versions of DHSEQR, this subroutine may +* explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1 +* or j = IHI+1, IHI+2, ... N. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH .GE. max(1,N). +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* The real and imaginary parts, respectively, of the computed +* eigenvalues. If two eigenvalues are computed as a complex +* conjugate pair, they are stored in consecutive elements of +* WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and +* WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in +* the same order as on the diagonal of the Schur form returned +* in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 +* diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and +* WI(i+1) = -WI(i). +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* If COMPZ = 'N', Z is not referenced. +* If COMPZ = 'I', on entry Z need not be set and on exit, +* if INFO = 0, Z contains the orthogonal matrix Z of the Schur +* vectors of H. If COMPZ = 'V', on entry Z must contain an +* N-by-N matrix Q, which is assumed to be equal to the unit +* matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit, +* if INFO = 0, Z contains Q*Z. +* Normally Q is the orthogonal matrix generated by DORGHR +* after the call to DGEHRD which formed the Hessenberg matrix +* H. (The output value of Z when INFO.GT.0 is given under +* the description of INFO below.) +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. if COMPZ = 'I' or +* COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK) +* On exit, if INFO = 0, WORK(1) returns an estimate of +* the optimal value for LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK .GE. max(1,N) +* is sufficient, but LWORK typically as large as 6*N may +* be required for optimal performance. A workspace query +* to determine the optimal workspace size is recommended. +* +* If LWORK = -1, then DHSEQR does a workspace query. +* In this case, DHSEQR checks the input parameters and +* estimates the optimal workspace size for the given +* values of N, ILO and IHI. The estimate is returned +* in WORK(1). No error message related to LWORK is +* issued by XERBLA. Neither H nor Z are accessed. +* +* +* INFO (output) INTEGER +* = 0: successful exit +* .LT. 0: if INFO = -i, the i-th argument had an illegal +* value +* .GT. 0: if INFO = i, DHSEQR failed to compute all of +* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR +* and WI contain those eigenvalues which have been +* successfully computed. (Failures are rare.) +* +* If INFO .GT. 0 and JOB = 'E', then on exit, the +* remaining unconverged eigenvalues are the eigen- +* values of the upper Hessenberg matrix rows and +* columns ILO through INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and JOB = 'S', then on exit +* +* (*) (initial value of H)*U = U*(final value of H) +* +* where U is an orthogonal matrix. The final +* value of H is upper Hessenberg and quasi-triangular +* in rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and COMPZ = 'V', then on exit +* +* (final value of Z) = (initial value of Z)*U +* +* where U is the orthogonal matrix in (*) (regard- +* less of the value of JOB.) +* +* If INFO .GT. 0 and COMPZ = 'I', then on exit +* (final value of Z) = U +* where U is the orthogonal matrix in (*) (regard- +* less of the value of JOB.) +* +* If INFO .GT. 0 and COMPZ = 'N', then Z is not +* accessed. +* +* ================================================================ +* Default values supplied by +* ILAENV(ISPEC,'DHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK). +* It is suggested that these defaults be adjusted in order +* to attain best performance in each particular +* computational environment. +* +* ISPEC=1: The DLAHQR vs DLAQR0 crossover point. +* Default: 75. (Must be at least 11.) +* +* ISPEC=2: Recommended deflation window size. +* This depends on ILO, IHI and NS. NS is the +* number of simultaneous shifts returned +* by ILAENV(ISPEC=4). (See ISPEC=4 below.) +* The default for (IHI-ILO+1).LE.500 is NS. +* The default for (IHI-ILO+1).GT.500 is 3*NS/2. +* +* ISPEC=3: Nibble crossover point. (See ILAENV for +* details.) Default: 14% of deflation window +* size. +* +* ISPEC=4: Number of simultaneous shifts, NS, in +* a multi-shift QR iteration. +* +* If IHI-ILO+1 is ... +* +* greater than ...but less ... the +* or equal to ... than default is +* +* 1 30 NS - 2(+) +* 30 60 NS - 4(+) +* 60 150 NS = 10(+) +* 150 590 NS = ** +* 590 3000 NS = 64 +* 3000 6000 NS = 128 +* 6000 infinity NS = 256 +* +* (+) By default some or all matrices of this order +* are passed to the implicit double shift routine +* DLAHQR and NS is ignored. See ISPEC=1 above +* and comments in IPARM for details. +* +* The asterisks (**) indicate an ad-hoc +* function of N increasing from 10 to 64. +* +* ISPEC=5: Select structured matrix multiply. +* (See ILAENV for details.) Default: 3. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* References: +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 +* Performance, SIAM Journal of Matrix Analysis, volume 23, pages +* 929--947, 2002. +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part II: Aggressive Early Deflation, SIAM Journal +* of Matrix Analysis, volume 23, pages 948--973, 2002. +* +* ================================================================ +* .. Parameters .. +* +* ==== Matrices of order NTINY or smaller must be processed by +* . DLAHQR because of insufficient subdiagonal scratch space. +* . (This is a hard limit.) ==== +* +* ==== NL allocates some local workspace to help small matrices +* . through a rare DLAHQR failure. NL .GT. NTINY = 11 is +* . required and NL .LE. NMIN = ILAENV(ISPEC=1,...) is recom- +* . mended. (The default value of NMIN is 75.) Using NL = 49 +* . allows up to six simultaneous shifts and a 16-by-16 +* . deflation window. ==== +* + INTEGER NTINY + PARAMETER ( NTINY = 11 ) + INTEGER NL + PARAMETER ( NL = 49 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Arrays .. + DOUBLE PRECISION HL( NL, NL ), WORKL( NL ) +* .. +* .. Local Scalars .. + INTEGER I, KBOT, NMIN + LOGICAL INITZ, LQUERY, WANTT, WANTZ +* .. +* .. External Functions .. + INTEGER ILAENV + LOGICAL LSAME + EXTERNAL ILAENV, LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLACPY, DLAHQR, DLAQR0, DLASET, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, MIN +* .. +* .. Executable Statements .. +* +* ==== Decode and check the input parameters. ==== +* + WANTT = LSAME( JOB, 'S' ) + INITZ = LSAME( COMPZ, 'I' ) + WANTZ = INITZ .OR. LSAME( COMPZ, 'V' ) + WORK( 1 ) = DBLE( MAX( 1, N ) ) + LQUERY = LWORK.EQ.-1 +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'E' ) .AND. .NOT.WANTT ) THEN + INFO = -1 + ELSE IF( .NOT.LSAME( COMPZ, 'N' ) .AND. .NOT.WANTZ ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -5 + ELSE IF( LDH.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.MAX( 1, N ) ) ) THEN + INFO = -11 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF +* + IF( INFO.NE.0 ) THEN +* +* ==== Quick return in case of invalid argument. ==== +* + CALL XERBLA( 'DHSEQR', -INFO ) + RETURN +* + ELSE IF( N.EQ.0 ) THEN +* +* ==== Quick return in case N = 0; nothing to do. ==== +* + RETURN +* + ELSE IF( LQUERY ) THEN +* +* ==== Quick return in case of a workspace query ==== +* + CALL DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, ILO, + $ IHI, Z, LDZ, WORK, LWORK, INFO ) +* ==== Ensure reported workspace size is backward-compatible with +* . previous LAPACK versions. ==== + WORK( 1 ) = MAX( DBLE( MAX( 1, N ) ), WORK( 1 ) ) + RETURN +* + ELSE +* +* ==== copy eigenvalues isolated by DGEBAL ==== +* + DO 10 I = 1, ILO - 1 + WR( I ) = H( I, I ) + WI( I ) = ZERO + 10 CONTINUE + DO 20 I = IHI + 1, N + WR( I ) = H( I, I ) + WI( I ) = ZERO + 20 CONTINUE +* +* ==== Initialize Z, if requested ==== +* + IF( INITZ ) + $ CALL DLASET( 'A', N, N, ZERO, ONE, Z, LDZ ) +* +* ==== Quick return if possible ==== +* + IF( ILO.EQ.IHI ) THEN + WR( ILO ) = H( ILO, ILO ) + WI( ILO ) = ZERO + RETURN + END IF +* +* ==== DLAHQR/DLAQR0 crossover point ==== +* + NMIN = ILAENV( 12, 'DHSEQR', JOB( : 1 ) // COMPZ( : 1 ), N, + $ ILO, IHI, LWORK ) + NMIN = MAX( NTINY, NMIN ) +* +* ==== DLAQR0 for big matrices; DLAHQR for small ones ==== +* + IF( N.GT.NMIN ) THEN + CALL DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, ILO, + $ IHI, Z, LDZ, WORK, LWORK, INFO ) + ELSE +* +* ==== Small matrix ==== +* + CALL DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, ILO, + $ IHI, Z, LDZ, INFO ) +* + IF( INFO.GT.0 ) THEN +* +* ==== A rare DLAHQR failure! DLAQR0 sometimes succeeds +* . when DLAHQR fails. ==== +* + KBOT = INFO +* + IF( N.GE.NL ) THEN +* +* ==== Larger matrices have enough subdiagonal scratch +* . space to call DLAQR0 directly. ==== +* + CALL DLAQR0( WANTT, WANTZ, N, ILO, KBOT, H, LDH, WR, + $ WI, ILO, IHI, Z, LDZ, WORK, LWORK, INFO ) +* + ELSE +* +* ==== Tiny matrices don't have enough subdiagonal +* . scratch space to benefit from DLAQR0. Hence, +* . tiny matrices must be copied into a larger +* . array before calling DLAQR0. ==== +* + CALL DLACPY( 'A', N, N, H, LDH, HL, NL ) + HL( N+1, N ) = ZERO + CALL DLASET( 'A', NL, NL-N, ZERO, ZERO, HL( 1, N+1 ), + $ NL ) + CALL DLAQR0( WANTT, WANTZ, NL, ILO, KBOT, HL, NL, WR, + $ WI, ILO, IHI, Z, LDZ, WORKL, NL, INFO ) + IF( WANTT .OR. INFO.NE.0 ) + $ CALL DLACPY( 'A', N, N, HL, NL, H, LDH ) + END IF + END IF + END IF +* +* ==== Clear out the trash, if necessary. ==== +* + IF( ( WANTT .OR. INFO.NE.0 ) .AND. N.GT.2 ) + $ CALL DLASET( 'L', N-2, N-2, ZERO, ZERO, H( 3, 1 ), LDH ) +* +* ==== Ensure reported workspace size is backward-compatible with +* . previous LAPACK versions. ==== +* + WORK( 1 ) = MAX( DBLE( MAX( 1, N ) ), WORK( 1 ) ) + END IF +* +* ==== End of DHSEQR ==== +* + END diff --git a/2.3-1/src/fortran/lapack/disnan.f b/2.3-1/src/fortran/lapack/disnan.f new file mode 100644 index 00000000..52003561 --- /dev/null +++ b/2.3-1/src/fortran/lapack/disnan.f @@ -0,0 +1,33 @@ + LOGICAL FUNCTION DISNAN(DIN) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION DIN +* .. +* +* Purpose +* ======= +* +* DISNAN returns .TRUE. if its argument is NaN, and .FALSE. +* otherwise. To be replaced by the Fortran 2003 intrinsic in the +* future. +* +* Arguments +* ========= +* +* DIN (input) DOUBLE PRECISION +* Input to test for NaN. +* +* ===================================================================== +* +* .. External Functions .. + LOGICAL DLAISNAN + EXTERNAL DLAISNAN +* .. +* .. Executable Statements .. + DISNAN = DLAISNAN(DIN,DIN) + RETURN + END diff --git a/2.3-1/src/fortran/lapack/dlabad.f b/2.3-1/src/fortran/lapack/dlabad.f new file mode 100644 index 00000000..05ff5d44 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlabad.f @@ -0,0 +1,55 @@ + SUBROUTINE DLABAD( SMALL, LARGE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION LARGE, SMALL +* .. +* +* Purpose +* ======= +* +* DLABAD takes as input the values computed by DLAMCH for underflow and +* overflow, and returns the square root of each of these values if the +* log of LARGE is sufficiently large. This subroutine is intended to +* identify machines with a large exponent range, such as the Crays, and +* redefine the underflow and overflow limits to be the square roots of +* the values computed by DLAMCH. This subroutine is needed because +* DLAMCH does not compensate for poor arithmetic in the upper half of +* the exponent range, as is found on a Cray. +* +* Arguments +* ========= +* +* SMALL (input/output) DOUBLE PRECISION +* On entry, the underflow threshold as computed by DLAMCH. +* On exit, if LOG10(LARGE) is sufficiently large, the square +* root of SMALL, otherwise unchanged. +* +* LARGE (input/output) DOUBLE PRECISION +* On entry, the overflow threshold as computed by DLAMCH. +* On exit, if LOG10(LARGE) is sufficiently large, the square +* root of LARGE, otherwise unchanged. +* +* ===================================================================== +* +* .. Intrinsic Functions .. + INTRINSIC LOG10, SQRT +* .. +* .. Executable Statements .. +* +* If it looks like we're on a Cray, take the square root of +* SMALL and LARGE to avoid overflow and underflow problems. +* + IF( LOG10( LARGE ).GT.2000.D0 ) THEN + SMALL = SQRT( SMALL ) + LARGE = SQRT( LARGE ) + END IF +* + RETURN +* +* End of DLABAD +* + END diff --git a/2.3-1/src/fortran/lapack/dlabrd.f b/2.3-1/src/fortran/lapack/dlabrd.f new file mode 100644 index 00000000..196b130c --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlabrd.f @@ -0,0 +1,290 @@ + SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y, + $ LDY ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, LDX, LDY, M, N, NB +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAUP( * ), + $ TAUQ( * ), X( LDX, * ), Y( LDY, * ) +* .. +* +* Purpose +* ======= +* +* DLABRD reduces the first NB rows and columns of a real general +* m by n matrix A to upper or lower bidiagonal form by an orthogonal +* transformation Q' * A * P, and returns the matrices X and Y which +* are needed to apply the transformation to the unreduced part of A. +* +* If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower +* bidiagonal form. +* +* This is an auxiliary routine called by DGEBRD +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. +* +* N (input) INTEGER +* The number of columns in the matrix A. +* +* NB (input) INTEGER +* The number of leading rows and columns of A to be reduced. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the m by n general matrix to be reduced. +* On exit, the first NB rows and columns of the matrix are +* overwritten; the rest of the array is unchanged. +* If m >= n, elements on and below the diagonal in the first NB +* columns, with the array TAUQ, represent the orthogonal +* matrix Q as a product of elementary reflectors; and +* elements above the diagonal in the first NB rows, with the +* array TAUP, represent the orthogonal matrix P as a product +* of elementary reflectors. +* If m < n, elements below the diagonal in the first NB +* columns, with the array TAUQ, represent the orthogonal +* matrix Q as a product of elementary reflectors, and +* elements on and above the diagonal in the first NB rows, +* with the array TAUP, represent the orthogonal matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (NB) +* The diagonal elements of the first NB rows and columns of +* the reduced matrix. D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (NB) +* The off-diagonal elements of the first NB rows and columns of +* the reduced matrix. +* +* TAUQ (output) DOUBLE PRECISION array dimension (NB) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix Q. See Further Details. +* +* TAUP (output) DOUBLE PRECISION array, dimension (NB) +* The scalar factors of the elementary reflectors which +* represent the orthogonal matrix P. See Further Details. +* +* X (output) DOUBLE PRECISION array, dimension (LDX,NB) +* The m-by-nb matrix X required to update the unreduced part +* of A. +* +* LDX (input) INTEGER +* The leading dimension of the array X. LDX >= M. +* +* Y (output) DOUBLE PRECISION array, dimension (LDY,NB) +* The n-by-nb matrix Y required to update the unreduced part +* of A. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= N. +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are real scalars, and v and u are real vectors. +* +* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in +* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in +* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in +* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in +* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The elements of the vectors v and u together form the m-by-nb matrix +* V and the nb-by-n matrix U' which are needed, with X and Y, to apply +* the transformation to the unreduced part of the matrix, using a block +* update of the form: A := A - V*Y' - X*U'. +* +* The contents of A on exit are illustrated by the following examples +* with nb = 2: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 ) +* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 ) +* ( v1 v2 a a a ) ( v1 1 a a a a ) +* ( v1 v2 a a a ) ( v1 v2 a a a a ) +* ( v1 v2 a a a ) ( v1 v2 a a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix which is unchanged, +* vi denotes an element of the vector defining H(i), and ui an element +* of the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + INTEGER I +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DLARFG, DSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* + IF( M.GE.N ) THEN +* +* Reduce to upper bidiagonal form +* + DO 10 I = 1, NB +* +* Update A(i:m,i) +* + CALL DGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ), + $ LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 ) + CALL DGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ), + $ LDX, A( 1, I ), 1, ONE, A( I, I ), 1 ) +* +* Generate reflection Q(i) to annihilate A(i+1:m,i) +* + CALL DLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, + $ TAUQ( I ) ) + D( I ) = A( I, I ) + IF( I.LT.N ) THEN + A( I, I ) = ONE +* +* Compute Y(i+1:n,i) +* + CALL DGEMV( 'Transpose', M-I+1, N-I, ONE, A( I, I+1 ), + $ LDA, A( I, I ), 1, ZERO, Y( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', M-I+1, I-1, ONE, A( I, 1 ), LDA, + $ A( I, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL DGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), + $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', M-I+1, I-1, ONE, X( I, 1 ), LDX, + $ A( I, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL DGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ), + $ LDA, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL DSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) +* +* Update A(i,i+1:n) +* + CALL DGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ), + $ LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA ) + CALL DGEMV( 'Transpose', I-1, N-I, -ONE, A( 1, I+1 ), + $ LDA, X( I, 1 ), LDX, ONE, A( I, I+1 ), LDA ) +* +* Generate reflection P(i) to annihilate A(i,i+2:n) +* + CALL DLARFG( N-I, A( I, I+1 ), A( I, MIN( I+2, N ) ), + $ LDA, TAUP( I ) ) + E( I ) = A( I, I+1 ) + A( I, I+1 ) = ONE +* +* Compute X(i+1:m,i) +* + CALL DGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ), + $ LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', N-I, I, ONE, Y( I+1, 1 ), LDY, + $ A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 ) + CALL DGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ), + $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL DGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ), + $ LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 ) + CALL DGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), + $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL DSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) + END IF + 10 CONTINUE + ELSE +* +* Reduce to lower bidiagonal form +* + DO 20 I = 1, NB +* +* Update A(i,i:n) +* + CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ), + $ LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA ) + CALL DGEMV( 'Transpose', I-1, N-I+1, -ONE, A( 1, I ), LDA, + $ X( I, 1 ), LDX, ONE, A( I, I ), LDA ) +* +* Generate reflection P(i) to annihilate A(i,i+1:n) +* + CALL DLARFG( N-I+1, A( I, I ), A( I, MIN( I+1, N ) ), LDA, + $ TAUP( I ) ) + D( I ) = A( I, I ) + IF( I.LT.M ) THEN + A( I, I ) = ONE +* +* Compute X(i+1:m,i) +* + CALL DGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ), + $ LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', N-I+1, I-1, ONE, Y( I, 1 ), LDY, + $ A( I, I ), LDA, ZERO, X( 1, I ), 1 ) + CALL DGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL DGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ), + $ LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 ) + CALL DGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), + $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL DSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) +* +* Update A(i+1:m,i) +* + CALL DGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 ) + CALL DGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ), + $ LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 ) +* +* Generate reflection Q(i) to annihilate A(i+2:m,i) +* + CALL DLARFG( M-I, A( I+1, I ), A( MIN( I+2, M ), I ), 1, + $ TAUQ( I ) ) + E( I ) = A( I+1, I ) + A( I+1, I ) = ONE +* +* Compute Y(i+1:n,i) +* + CALL DGEMV( 'Transpose', M-I, N-I, ONE, A( I+1, I+1 ), + $ LDA, A( I+1, I ), 1, ZERO, Y( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', M-I, I-1, ONE, A( I+1, 1 ), LDA, + $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL DGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), + $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', M-I, I, ONE, X( I+1, 1 ), LDX, + $ A( I+1, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL DGEMV( 'Transpose', I, N-I, -ONE, A( 1, I+1 ), LDA, + $ Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL DSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) + END IF + 20 CONTINUE + END IF + RETURN +* +* End of DLABRD +* + END diff --git a/2.3-1/src/fortran/lapack/dlacn2.f b/2.3-1/src/fortran/lapack/dlacn2.f new file mode 100644 index 00000000..6705d256 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlacn2.f @@ -0,0 +1,214 @@ + SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KASE, N + DOUBLE PRECISION EST +* .. +* .. Array Arguments .. + INTEGER ISGN( * ), ISAVE( 3 ) + DOUBLE PRECISION V( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DLACN2 estimates the 1-norm of a square, real matrix A. +* Reverse communication is used for evaluating matrix-vector products. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix. N >= 1. +* +* V (workspace) DOUBLE PRECISION array, dimension (N) +* On the final return, V = A*W, where EST = norm(V)/norm(W) +* (W is not returned). +* +* X (input/output) DOUBLE PRECISION array, dimension (N) +* On an intermediate return, X should be overwritten by +* A * X, if KASE=1, +* A' * X, if KASE=2, +* and DLACN2 must be re-called with all the other parameters +* unchanged. +* +* ISGN (workspace) INTEGER array, dimension (N) +* +* EST (input/output) DOUBLE PRECISION +* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be +* unchanged from the previous call to DLACN2. +* On exit, EST is an estimate (a lower bound) for norm(A). +* +* KASE (input/output) INTEGER +* On the initial call to DLACN2, KASE should be 0. +* On an intermediate return, KASE will be 1 or 2, indicating +* whether X should be overwritten by A * X or A' * X. +* On the final return from DLACN2, KASE will again be 0. +* +* ISAVE (input/output) INTEGER array, dimension (3) +* ISAVE is used to save variables between calls to DLACN2 +* +* Further Details +* ======= ======= +* +* Contributed by Nick Higham, University of Manchester. +* Originally named SONEST, dated March 16, 1988. +* +* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of +* a real or complex matrix, with applications to condition estimation", +* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. +* +* This is a thread safe version of DLACON, which uses the array ISAVE +* in place of a SAVE statement, as follows: +* +* DLACON DLACN2 +* JUMP ISAVE(1) +* J ISAVE(2) +* ITER ISAVE(3) +* +* ===================================================================== +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 5 ) + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, JLAST + DOUBLE PRECISION ALTSGN, ESTOLD, TEMP +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DASUM + EXTERNAL IDAMAX, DASUM +* .. +* .. External Subroutines .. + EXTERNAL DCOPY +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, NINT, SIGN +* .. +* .. Executable Statements .. +* + IF( KASE.EQ.0 ) THEN + DO 10 I = 1, N + X( I ) = ONE / DBLE( N ) + 10 CONTINUE + KASE = 1 + ISAVE( 1 ) = 1 + RETURN + END IF +* + GO TO ( 20, 40, 70, 110, 140 )ISAVE( 1 ) +* +* ................ ENTRY (ISAVE( 1 ) = 1) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. +* + 20 CONTINUE + IF( N.EQ.1 ) THEN + V( 1 ) = X( 1 ) + EST = ABS( V( 1 ) ) +* ... QUIT + GO TO 150 + END IF + EST = DASUM( N, X, 1 ) +* + DO 30 I = 1, N + X( I ) = SIGN( ONE, X( I ) ) + ISGN( I ) = NINT( X( I ) ) + 30 CONTINUE + KASE = 2 + ISAVE( 1 ) = 2 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 2) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. +* + 40 CONTINUE + ISAVE( 2 ) = IDAMAX( N, X, 1 ) + ISAVE( 3 ) = 2 +* +* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. +* + 50 CONTINUE + DO 60 I = 1, N + X( I ) = ZERO + 60 CONTINUE + X( ISAVE( 2 ) ) = ONE + KASE = 1 + ISAVE( 1 ) = 3 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 3) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 70 CONTINUE + CALL DCOPY( N, X, 1, V, 1 ) + ESTOLD = EST + EST = DASUM( N, V, 1 ) + DO 80 I = 1, N + IF( NINT( SIGN( ONE, X( I ) ) ).NE.ISGN( I ) ) + $ GO TO 90 + 80 CONTINUE +* REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. + GO TO 120 +* + 90 CONTINUE +* TEST FOR CYCLING. + IF( EST.LE.ESTOLD ) + $ GO TO 120 +* + DO 100 I = 1, N + X( I ) = SIGN( ONE, X( I ) ) + ISGN( I ) = NINT( X( I ) ) + 100 CONTINUE + KASE = 2 + ISAVE( 1 ) = 4 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 4) +* X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. +* + 110 CONTINUE + JLAST = ISAVE( 2 ) + ISAVE( 2 ) = IDAMAX( N, X, 1 ) + IF( ( X( JLAST ).NE.ABS( X( ISAVE( 2 ) ) ) ) .AND. + $ ( ISAVE( 3 ).LT.ITMAX ) ) THEN + ISAVE( 3 ) = ISAVE( 3 ) + 1 + GO TO 50 + END IF +* +* ITERATION COMPLETE. FINAL STAGE. +* + 120 CONTINUE + ALTSGN = ONE + DO 130 I = 1, N + X( I ) = ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) + ALTSGN = -ALTSGN + 130 CONTINUE + KASE = 1 + ISAVE( 1 ) = 5 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 5) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 140 CONTINUE + TEMP = TWO*( DASUM( N, X, 1 ) / DBLE( 3*N ) ) + IF( TEMP.GT.EST ) THEN + CALL DCOPY( N, X, 1, V, 1 ) + EST = TEMP + END IF +* + 150 CONTINUE + KASE = 0 + RETURN +* +* End of DLACN2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlacon.f b/2.3-1/src/fortran/lapack/dlacon.f new file mode 100644 index 00000000..f113b03a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlacon.f @@ -0,0 +1,205 @@ + SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KASE, N + DOUBLE PRECISION EST +* .. +* .. Array Arguments .. + INTEGER ISGN( * ) + DOUBLE PRECISION V( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DLACON estimates the 1-norm of a square, real matrix A. +* Reverse communication is used for evaluating matrix-vector products. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix. N >= 1. +* +* V (workspace) DOUBLE PRECISION array, dimension (N) +* On the final return, V = A*W, where EST = norm(V)/norm(W) +* (W is not returned). +* +* X (input/output) DOUBLE PRECISION array, dimension (N) +* On an intermediate return, X should be overwritten by +* A * X, if KASE=1, +* A' * X, if KASE=2, +* and DLACON must be re-called with all the other parameters +* unchanged. +* +* ISGN (workspace) INTEGER array, dimension (N) +* +* EST (input/output) DOUBLE PRECISION +* On entry with KASE = 1 or 2 and JUMP = 3, EST should be +* unchanged from the previous call to DLACON. +* On exit, EST is an estimate (a lower bound) for norm(A). +* +* KASE (input/output) INTEGER +* On the initial call to DLACON, KASE should be 0. +* On an intermediate return, KASE will be 1 or 2, indicating +* whether X should be overwritten by A * X or A' * X. +* On the final return from DLACON, KASE will again be 0. +* +* Further Details +* ======= ======= +* +* Contributed by Nick Higham, University of Manchester. +* Originally named SONEST, dated March 16, 1988. +* +* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of +* a real or complex matrix, with applications to condition estimation", +* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 5 ) + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, ITER, J, JLAST, JUMP + DOUBLE PRECISION ALTSGN, ESTOLD, TEMP +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DASUM + EXTERNAL IDAMAX, DASUM +* .. +* .. External Subroutines .. + EXTERNAL DCOPY +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, NINT, SIGN +* .. +* .. Save statement .. + SAVE +* .. +* .. Executable Statements .. +* + IF( KASE.EQ.0 ) THEN + DO 10 I = 1, N + X( I ) = ONE / DBLE( N ) + 10 CONTINUE + KASE = 1 + JUMP = 1 + RETURN + END IF +* + GO TO ( 20, 40, 70, 110, 140 )JUMP +* +* ................ ENTRY (JUMP = 1) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. +* + 20 CONTINUE + IF( N.EQ.1 ) THEN + V( 1 ) = X( 1 ) + EST = ABS( V( 1 ) ) +* ... QUIT + GO TO 150 + END IF + EST = DASUM( N, X, 1 ) +* + DO 30 I = 1, N + X( I ) = SIGN( ONE, X( I ) ) + ISGN( I ) = NINT( X( I ) ) + 30 CONTINUE + KASE = 2 + JUMP = 2 + RETURN +* +* ................ ENTRY (JUMP = 2) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. +* + 40 CONTINUE + J = IDAMAX( N, X, 1 ) + ITER = 2 +* +* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. +* + 50 CONTINUE + DO 60 I = 1, N + X( I ) = ZERO + 60 CONTINUE + X( J ) = ONE + KASE = 1 + JUMP = 3 + RETURN +* +* ................ ENTRY (JUMP = 3) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 70 CONTINUE + CALL DCOPY( N, X, 1, V, 1 ) + ESTOLD = EST + EST = DASUM( N, V, 1 ) + DO 80 I = 1, N + IF( NINT( SIGN( ONE, X( I ) ) ).NE.ISGN( I ) ) + $ GO TO 90 + 80 CONTINUE +* REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. + GO TO 120 +* + 90 CONTINUE +* TEST FOR CYCLING. + IF( EST.LE.ESTOLD ) + $ GO TO 120 +* + DO 100 I = 1, N + X( I ) = SIGN( ONE, X( I ) ) + ISGN( I ) = NINT( X( I ) ) + 100 CONTINUE + KASE = 2 + JUMP = 4 + RETURN +* +* ................ ENTRY (JUMP = 4) +* X HAS BEEN OVERWRITTEN BY TRANSPOSE(A)*X. +* + 110 CONTINUE + JLAST = J + J = IDAMAX( N, X, 1 ) + IF( ( X( JLAST ).NE.ABS( X( J ) ) ) .AND. ( ITER.LT.ITMAX ) ) THEN + ITER = ITER + 1 + GO TO 50 + END IF +* +* ITERATION COMPLETE. FINAL STAGE. +* + 120 CONTINUE + ALTSGN = ONE + DO 130 I = 1, N + X( I ) = ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) + ALTSGN = -ALTSGN + 130 CONTINUE + KASE = 1 + JUMP = 5 + RETURN +* +* ................ ENTRY (JUMP = 5) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 140 CONTINUE + TEMP = TWO*( DASUM( N, X, 1 ) / DBLE( 3*N ) ) + IF( TEMP.GT.EST ) THEN + CALL DCOPY( N, X, 1, V, 1 ) + EST = TEMP + END IF +* + 150 CONTINUE + KASE = 0 + RETURN +* +* End of DLACON +* + END diff --git a/2.3-1/src/fortran/lapack/dlacpy.f b/2.3-1/src/fortran/lapack/dlacpy.f new file mode 100644 index 00000000..d72603a5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlacpy.f @@ -0,0 +1,87 @@ + SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, LDB, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DLACPY copies all or part of a two-dimensional matrix A to another +* matrix B. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies the part of the matrix A to be copied to B. +* = 'U': Upper triangular part +* = 'L': Lower triangular part +* Otherwise: All of the matrix A +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The m by n matrix A. If UPLO = 'U', only the upper triangle +* or trapezoid is accessed; if UPLO = 'L', only the lower +* triangle or trapezoid is accessed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (output) DOUBLE PRECISION array, dimension (LDB,N) +* On exit, B = A in the locations specified by UPLO. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,M). +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( LSAME( UPLO, 'U' ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, MIN( J, M ) + B( I, J ) = A( I, J ) + 10 CONTINUE + 20 CONTINUE + ELSE IF( LSAME( UPLO, 'L' ) ) THEN + DO 40 J = 1, N + DO 30 I = J, M + B( I, J ) = A( I, J ) + 30 CONTINUE + 40 CONTINUE + ELSE + DO 60 J = 1, N + DO 50 I = 1, M + B( I, J ) = A( I, J ) + 50 CONTINUE + 60 CONTINUE + END IF + RETURN +* +* End of DLACPY +* + END diff --git a/2.3-1/src/fortran/lapack/dladiv.f b/2.3-1/src/fortran/lapack/dladiv.f new file mode 100644 index 00000000..b6a74d1b --- /dev/null +++ b/2.3-1/src/fortran/lapack/dladiv.f @@ -0,0 +1,62 @@ + SUBROUTINE DLADIV( A, B, C, D, P, Q ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION A, B, C, D, P, Q +* .. +* +* Purpose +* ======= +* +* DLADIV performs complex division in real arithmetic +* +* a + i*b +* p + i*q = --------- +* c + i*d +* +* The algorithm is due to Robert L. Smith and can be found +* in D. Knuth, The art of Computer Programming, Vol.2, p.195 +* +* Arguments +* ========= +* +* A (input) DOUBLE PRECISION +* B (input) DOUBLE PRECISION +* C (input) DOUBLE PRECISION +* D (input) DOUBLE PRECISION +* The scalars a, b, c, and d in the above expression. +* +* P (output) DOUBLE PRECISION +* Q (output) DOUBLE PRECISION +* The scalars p and q in the above expression. +* +* ===================================================================== +* +* .. Local Scalars .. + DOUBLE PRECISION E, F +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* + IF( ABS( D ).LT.ABS( C ) ) THEN + E = D / C + F = C + D*E + P = ( A+B*E ) / F + Q = ( B-A*E ) / F + ELSE + E = C / D + F = D + C*E + P = ( B+A*E ) / F + Q = ( -A+B*E ) / F + END IF +* + RETURN +* +* End of DLADIV +* + END diff --git a/2.3-1/src/fortran/lapack/dlae2.f b/2.3-1/src/fortran/lapack/dlae2.f new file mode 100644 index 00000000..8e81c608 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlae2.f @@ -0,0 +1,123 @@ + SUBROUTINE DLAE2( A, B, C, RT1, RT2 ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION A, B, C, RT1, RT2 +* .. +* +* Purpose +* ======= +* +* DLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix +* [ A B ] +* [ B C ]. +* On return, RT1 is the eigenvalue of larger absolute value, and RT2 +* is the eigenvalue of smaller absolute value. +* +* Arguments +* ========= +* +* A (input) DOUBLE PRECISION +* The (1,1) element of the 2-by-2 matrix. +* +* B (input) DOUBLE PRECISION +* The (1,2) and (2,1) elements of the 2-by-2 matrix. +* +* C (input) DOUBLE PRECISION +* The (2,2) element of the 2-by-2 matrix. +* +* RT1 (output) DOUBLE PRECISION +* The eigenvalue of larger absolute value. +* +* RT2 (output) DOUBLE PRECISION +* The eigenvalue of smaller absolute value. +* +* Further Details +* =============== +* +* RT1 is accurate to a few ulps barring over/underflow. +* +* RT2 may be inaccurate if there is massive cancellation in the +* determinant A*C-B*B; higher precision or correctly rounded or +* correctly truncated arithmetic would be needed to compute RT2 +* accurately in all cases. +* +* Overflow is possible only if RT1 is within a factor of 5 of overflow. +* Underflow is harmless if the input data is 0 or exceeds +* underflow_threshold / macheps. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION HALF + PARAMETER ( HALF = 0.5D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AB, ACMN, ACMX, ADF, DF, RT, SM, TB +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SQRT +* .. +* .. Executable Statements .. +* +* Compute the eigenvalues +* + SM = A + C + DF = A - C + ADF = ABS( DF ) + TB = B + B + AB = ABS( TB ) + IF( ABS( A ).GT.ABS( C ) ) THEN + ACMX = A + ACMN = C + ELSE + ACMX = C + ACMN = A + END IF + IF( ADF.GT.AB ) THEN + RT = ADF*SQRT( ONE+( AB / ADF )**2 ) + ELSE IF( ADF.LT.AB ) THEN + RT = AB*SQRT( ONE+( ADF / AB )**2 ) + ELSE +* +* Includes case AB=ADF=0 +* + RT = AB*SQRT( TWO ) + END IF + IF( SM.LT.ZERO ) THEN + RT1 = HALF*( SM-RT ) +* +* Order of execution important. +* To get fully accurate smaller eigenvalue, +* next line needs to be executed in higher precision. +* + RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B + ELSE IF( SM.GT.ZERO ) THEN + RT1 = HALF*( SM+RT ) +* +* Order of execution important. +* To get fully accurate smaller eigenvalue, +* next line needs to be executed in higher precision. +* + RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B + ELSE +* +* Includes case RT1 = RT2 = 0 +* + RT1 = HALF*RT + RT2 = -HALF*RT + END IF + RETURN +* +* End of DLAE2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaev2.f b/2.3-1/src/fortran/lapack/dlaev2.f new file mode 100644 index 00000000..49402faa --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaev2.f @@ -0,0 +1,169 @@ + SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION A, B, C, CS1, RT1, RT2, SN1 +* .. +* +* Purpose +* ======= +* +* DLAEV2 computes the eigendecomposition of a 2-by-2 symmetric matrix +* [ A B ] +* [ B C ]. +* On return, RT1 is the eigenvalue of larger absolute value, RT2 is the +* eigenvalue of smaller absolute value, and (CS1,SN1) is the unit right +* eigenvector for RT1, giving the decomposition +* +* [ CS1 SN1 ] [ A B ] [ CS1 -SN1 ] = [ RT1 0 ] +* [-SN1 CS1 ] [ B C ] [ SN1 CS1 ] [ 0 RT2 ]. +* +* Arguments +* ========= +* +* A (input) DOUBLE PRECISION +* The (1,1) element of the 2-by-2 matrix. +* +* B (input) DOUBLE PRECISION +* The (1,2) element and the conjugate of the (2,1) element of +* the 2-by-2 matrix. +* +* C (input) DOUBLE PRECISION +* The (2,2) element of the 2-by-2 matrix. +* +* RT1 (output) DOUBLE PRECISION +* The eigenvalue of larger absolute value. +* +* RT2 (output) DOUBLE PRECISION +* The eigenvalue of smaller absolute value. +* +* CS1 (output) DOUBLE PRECISION +* SN1 (output) DOUBLE PRECISION +* The vector (CS1, SN1) is a unit right eigenvector for RT1. +* +* Further Details +* =============== +* +* RT1 is accurate to a few ulps barring over/underflow. +* +* RT2 may be inaccurate if there is massive cancellation in the +* determinant A*C-B*B; higher precision or correctly rounded or +* correctly truncated arithmetic would be needed to compute RT2 +* accurately in all cases. +* +* CS1 and SN1 are accurate to a few ulps barring over/underflow. +* +* Overflow is possible only if RT1 is within a factor of 5 of overflow. +* Underflow is harmless if the input data is 0 or exceeds +* underflow_threshold / macheps. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION HALF + PARAMETER ( HALF = 0.5D0 ) +* .. +* .. Local Scalars .. + INTEGER SGN1, SGN2 + DOUBLE PRECISION AB, ACMN, ACMX, ACS, ADF, CS, CT, DF, RT, SM, + $ TB, TN +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SQRT +* .. +* .. Executable Statements .. +* +* Compute the eigenvalues +* + SM = A + C + DF = A - C + ADF = ABS( DF ) + TB = B + B + AB = ABS( TB ) + IF( ABS( A ).GT.ABS( C ) ) THEN + ACMX = A + ACMN = C + ELSE + ACMX = C + ACMN = A + END IF + IF( ADF.GT.AB ) THEN + RT = ADF*SQRT( ONE+( AB / ADF )**2 ) + ELSE IF( ADF.LT.AB ) THEN + RT = AB*SQRT( ONE+( ADF / AB )**2 ) + ELSE +* +* Includes case AB=ADF=0 +* + RT = AB*SQRT( TWO ) + END IF + IF( SM.LT.ZERO ) THEN + RT1 = HALF*( SM-RT ) + SGN1 = -1 +* +* Order of execution important. +* To get fully accurate smaller eigenvalue, +* next line needs to be executed in higher precision. +* + RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B + ELSE IF( SM.GT.ZERO ) THEN + RT1 = HALF*( SM+RT ) + SGN1 = 1 +* +* Order of execution important. +* To get fully accurate smaller eigenvalue, +* next line needs to be executed in higher precision. +* + RT2 = ( ACMX / RT1 )*ACMN - ( B / RT1 )*B + ELSE +* +* Includes case RT1 = RT2 = 0 +* + RT1 = HALF*RT + RT2 = -HALF*RT + SGN1 = 1 + END IF +* +* Compute the eigenvector +* + IF( DF.GE.ZERO ) THEN + CS = DF + RT + SGN2 = 1 + ELSE + CS = DF - RT + SGN2 = -1 + END IF + ACS = ABS( CS ) + IF( ACS.GT.AB ) THEN + CT = -TB / CS + SN1 = ONE / SQRT( ONE+CT*CT ) + CS1 = CT*SN1 + ELSE + IF( AB.EQ.ZERO ) THEN + CS1 = ONE + SN1 = ZERO + ELSE + TN = -CS / TB + CS1 = ONE / SQRT( ONE+TN*TN ) + SN1 = TN*CS1 + END IF + END IF + IF( SGN1.EQ.SGN2 ) THEN + TN = CS1 + CS1 = -SN1 + SN1 = TN + END IF + RETURN +* +* End of DLAEV2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaexc.f b/2.3-1/src/fortran/lapack/dlaexc.f new file mode 100644 index 00000000..18e7d247 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaexc.f @@ -0,0 +1,354 @@ + SUBROUTINE DLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK, + $ INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL WANTQ + INTEGER INFO, J1, LDQ, LDT, N, N1, N2 +* .. +* .. Array Arguments .. + DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLAEXC swaps adjacent diagonal blocks T11 and T22 of order 1 or 2 in +* an upper quasi-triangular matrix T by an orthogonal similarity +* transformation. +* +* T must be in Schur canonical form, that is, block upper triangular +* with 1-by-1 and 2-by-2 diagonal blocks; each 2-by-2 diagonal block +* has its diagonal elemnts equal and its off-diagonal elements of +* opposite sign. +* +* Arguments +* ========= +* +* WANTQ (input) LOGICAL +* = .TRUE. : accumulate the transformation in the matrix Q; +* = .FALSE.: do not accumulate the transformation. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) DOUBLE PRECISION array, dimension (LDT,N) +* On entry, the upper quasi-triangular matrix T, in Schur +* canonical form. +* On exit, the updated matrix T, again in Schur canonical form. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N) +* On entry, if WANTQ is .TRUE., the orthogonal matrix Q. +* On exit, if WANTQ is .TRUE., the updated matrix Q. +* If WANTQ is .FALSE., Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. +* LDQ >= 1; and if WANTQ is .TRUE., LDQ >= N. +* +* J1 (input) INTEGER +* The index of the first row of the first block T11. +* +* N1 (input) INTEGER +* The order of the first block T11. N1 = 0, 1 or 2. +* +* N2 (input) INTEGER +* The order of the second block T22. N2 = 0, 1 or 2. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* = 1: the transformed matrix T would be too far from Schur +* form; the blocks are not swapped and T and Q are +* unchanged. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION TEN + PARAMETER ( TEN = 1.0D+1 ) + INTEGER LDD, LDX + PARAMETER ( LDD = 4, LDX = 2 ) +* .. +* .. Local Scalars .. + INTEGER IERR, J2, J3, J4, K, ND + DOUBLE PRECISION CS, DNORM, EPS, SCALE, SMLNUM, SN, T11, T22, + $ T33, TAU, TAU1, TAU2, TEMP, THRESH, WI1, WI2, + $ WR1, WR2, XNORM +* .. +* .. Local Arrays .. + DOUBLE PRECISION D( LDD, 4 ), U( 3 ), U1( 3 ), U2( 3 ), + $ X( LDX, 2 ) +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLANGE + EXTERNAL DLAMCH, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DLACPY, DLANV2, DLARFG, DLARFX, DLARTG, DLASY2, + $ DROT +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.EQ.0 .OR. N1.EQ.0 .OR. N2.EQ.0 ) + $ RETURN + IF( J1+N1.GT.N ) + $ RETURN +* + J2 = J1 + 1 + J3 = J1 + 2 + J4 = J1 + 3 +* + IF( N1.EQ.1 .AND. N2.EQ.1 ) THEN +* +* Swap two 1-by-1 blocks. +* + T11 = T( J1, J1 ) + T22 = T( J2, J2 ) +* +* Determine the transformation to perform the interchange. +* + CALL DLARTG( T( J1, J2 ), T22-T11, CS, SN, TEMP ) +* +* Apply transformation to the matrix T. +* + IF( J3.LE.N ) + $ CALL DROT( N-J1-1, T( J1, J3 ), LDT, T( J2, J3 ), LDT, CS, + $ SN ) + CALL DROT( J1-1, T( 1, J1 ), 1, T( 1, J2 ), 1, CS, SN ) +* + T( J1, J1 ) = T22 + T( J2, J2 ) = T11 +* + IF( WANTQ ) THEN +* +* Accumulate transformation in the matrix Q. +* + CALL DROT( N, Q( 1, J1 ), 1, Q( 1, J2 ), 1, CS, SN ) + END IF +* + ELSE +* +* Swapping involves at least one 2-by-2 block. +* +* Copy the diagonal block of order N1+N2 to the local array D +* and compute its norm. +* + ND = N1 + N2 + CALL DLACPY( 'Full', ND, ND, T( J1, J1 ), LDT, D, LDD ) + DNORM = DLANGE( 'Max', ND, ND, D, LDD, WORK ) +* +* Compute machine-dependent threshold for test for accepting +* swap. +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + THRESH = MAX( TEN*EPS*DNORM, SMLNUM ) +* +* Solve T11*X - X*T22 = scale*T12 for X. +* + CALL DLASY2( .FALSE., .FALSE., -1, N1, N2, D, LDD, + $ D( N1+1, N1+1 ), LDD, D( 1, N1+1 ), LDD, SCALE, X, + $ LDX, XNORM, IERR ) +* +* Swap the adjacent diagonal blocks. +* + K = N1 + N1 + N2 - 3 + GO TO ( 10, 20, 30 )K +* + 10 CONTINUE +* +* N1 = 1, N2 = 2: generate elementary reflector H so that: +* +* ( scale, X11, X12 ) H = ( 0, 0, * ) +* + U( 1 ) = SCALE + U( 2 ) = X( 1, 1 ) + U( 3 ) = X( 1, 2 ) + CALL DLARFG( 3, U( 3 ), U, 1, TAU ) + U( 3 ) = ONE + T11 = T( J1, J1 ) +* +* Perform swap provisionally on diagonal block in D. +* + CALL DLARFX( 'L', 3, 3, U, TAU, D, LDD, WORK ) + CALL DLARFX( 'R', 3, 3, U, TAU, D, LDD, WORK ) +* +* Test whether to reject swap. +* + IF( MAX( ABS( D( 3, 1 ) ), ABS( D( 3, 2 ) ), ABS( D( 3, + $ 3 )-T11 ) ).GT.THRESH )GO TO 50 +* +* Accept swap: apply transformation to the entire matrix T. +* + CALL DLARFX( 'L', 3, N-J1+1, U, TAU, T( J1, J1 ), LDT, WORK ) + CALL DLARFX( 'R', J2, 3, U, TAU, T( 1, J1 ), LDT, WORK ) +* + T( J3, J1 ) = ZERO + T( J3, J2 ) = ZERO + T( J3, J3 ) = T11 +* + IF( WANTQ ) THEN +* +* Accumulate transformation in the matrix Q. +* + CALL DLARFX( 'R', N, 3, U, TAU, Q( 1, J1 ), LDQ, WORK ) + END IF + GO TO 40 +* + 20 CONTINUE +* +* N1 = 2, N2 = 1: generate elementary reflector H so that: +* +* H ( -X11 ) = ( * ) +* ( -X21 ) = ( 0 ) +* ( scale ) = ( 0 ) +* + U( 1 ) = -X( 1, 1 ) + U( 2 ) = -X( 2, 1 ) + U( 3 ) = SCALE + CALL DLARFG( 3, U( 1 ), U( 2 ), 1, TAU ) + U( 1 ) = ONE + T33 = T( J3, J3 ) +* +* Perform swap provisionally on diagonal block in D. +* + CALL DLARFX( 'L', 3, 3, U, TAU, D, LDD, WORK ) + CALL DLARFX( 'R', 3, 3, U, TAU, D, LDD, WORK ) +* +* Test whether to reject swap. +* + IF( MAX( ABS( D( 2, 1 ) ), ABS( D( 3, 1 ) ), ABS( D( 1, + $ 1 )-T33 ) ).GT.THRESH )GO TO 50 +* +* Accept swap: apply transformation to the entire matrix T. +* + CALL DLARFX( 'R', J3, 3, U, TAU, T( 1, J1 ), LDT, WORK ) + CALL DLARFX( 'L', 3, N-J1, U, TAU, T( J1, J2 ), LDT, WORK ) +* + T( J1, J1 ) = T33 + T( J2, J1 ) = ZERO + T( J3, J1 ) = ZERO +* + IF( WANTQ ) THEN +* +* Accumulate transformation in the matrix Q. +* + CALL DLARFX( 'R', N, 3, U, TAU, Q( 1, J1 ), LDQ, WORK ) + END IF + GO TO 40 +* + 30 CONTINUE +* +* N1 = 2, N2 = 2: generate elementary reflectors H(1) and H(2) so +* that: +* +* H(2) H(1) ( -X11 -X12 ) = ( * * ) +* ( -X21 -X22 ) ( 0 * ) +* ( scale 0 ) ( 0 0 ) +* ( 0 scale ) ( 0 0 ) +* + U1( 1 ) = -X( 1, 1 ) + U1( 2 ) = -X( 2, 1 ) + U1( 3 ) = SCALE + CALL DLARFG( 3, U1( 1 ), U1( 2 ), 1, TAU1 ) + U1( 1 ) = ONE +* + TEMP = -TAU1*( X( 1, 2 )+U1( 2 )*X( 2, 2 ) ) + U2( 1 ) = -TEMP*U1( 2 ) - X( 2, 2 ) + U2( 2 ) = -TEMP*U1( 3 ) + U2( 3 ) = SCALE + CALL DLARFG( 3, U2( 1 ), U2( 2 ), 1, TAU2 ) + U2( 1 ) = ONE +* +* Perform swap provisionally on diagonal block in D. +* + CALL DLARFX( 'L', 3, 4, U1, TAU1, D, LDD, WORK ) + CALL DLARFX( 'R', 4, 3, U1, TAU1, D, LDD, WORK ) + CALL DLARFX( 'L', 3, 4, U2, TAU2, D( 2, 1 ), LDD, WORK ) + CALL DLARFX( 'R', 4, 3, U2, TAU2, D( 1, 2 ), LDD, WORK ) +* +* Test whether to reject swap. +* + IF( MAX( ABS( D( 3, 1 ) ), ABS( D( 3, 2 ) ), ABS( D( 4, 1 ) ), + $ ABS( D( 4, 2 ) ) ).GT.THRESH )GO TO 50 +* +* Accept swap: apply transformation to the entire matrix T. +* + CALL DLARFX( 'L', 3, N-J1+1, U1, TAU1, T( J1, J1 ), LDT, WORK ) + CALL DLARFX( 'R', J4, 3, U1, TAU1, T( 1, J1 ), LDT, WORK ) + CALL DLARFX( 'L', 3, N-J1+1, U2, TAU2, T( J2, J1 ), LDT, WORK ) + CALL DLARFX( 'R', J4, 3, U2, TAU2, T( 1, J2 ), LDT, WORK ) +* + T( J3, J1 ) = ZERO + T( J3, J2 ) = ZERO + T( J4, J1 ) = ZERO + T( J4, J2 ) = ZERO +* + IF( WANTQ ) THEN +* +* Accumulate transformation in the matrix Q. +* + CALL DLARFX( 'R', N, 3, U1, TAU1, Q( 1, J1 ), LDQ, WORK ) + CALL DLARFX( 'R', N, 3, U2, TAU2, Q( 1, J2 ), LDQ, WORK ) + END IF +* + 40 CONTINUE +* + IF( N2.EQ.2 ) THEN +* +* Standardize new 2-by-2 block T11 +* + CALL DLANV2( T( J1, J1 ), T( J1, J2 ), T( J2, J1 ), + $ T( J2, J2 ), WR1, WI1, WR2, WI2, CS, SN ) + CALL DROT( N-J1-1, T( J1, J1+2 ), LDT, T( J2, J1+2 ), LDT, + $ CS, SN ) + CALL DROT( J1-1, T( 1, J1 ), 1, T( 1, J2 ), 1, CS, SN ) + IF( WANTQ ) + $ CALL DROT( N, Q( 1, J1 ), 1, Q( 1, J2 ), 1, CS, SN ) + END IF +* + IF( N1.EQ.2 ) THEN +* +* Standardize new 2-by-2 block T22 +* + J3 = J1 + N2 + J4 = J3 + 1 + CALL DLANV2( T( J3, J3 ), T( J3, J4 ), T( J4, J3 ), + $ T( J4, J4 ), WR1, WI1, WR2, WI2, CS, SN ) + IF( J3+2.LE.N ) + $ CALL DROT( N-J3-1, T( J3, J3+2 ), LDT, T( J4, J3+2 ), + $ LDT, CS, SN ) + CALL DROT( J3-1, T( 1, J3 ), 1, T( 1, J4 ), 1, CS, SN ) + IF( WANTQ ) + $ CALL DROT( N, Q( 1, J3 ), 1, Q( 1, J4 ), 1, CS, SN ) + END IF +* + END IF + RETURN +* +* Exit with INFO = 1 if swap was rejected. +* + 50 CONTINUE + INFO = 1 + RETURN +* +* End of DLAEXC +* + END diff --git a/2.3-1/src/fortran/lapack/dlag2.f b/2.3-1/src/fortran/lapack/dlag2.f new file mode 100644 index 00000000..e754203b --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlag2.f @@ -0,0 +1,300 @@ + SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, + $ WR2, WI ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, LDB + DOUBLE PRECISION SAFMIN, SCALE1, SCALE2, WI, WR1, WR2 +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DLAG2 computes the eigenvalues of a 2 x 2 generalized eigenvalue +* problem A - w B, with scaling as necessary to avoid over-/underflow. +* +* The scaling factor "s" results in a modified eigenvalue equation +* +* s A - w B +* +* where s is a non-negative scaling factor chosen so that w, w B, +* and s A do not overflow and, if possible, do not underflow, either. +* +* Arguments +* ========= +* +* A (input) DOUBLE PRECISION array, dimension (LDA, 2) +* On entry, the 2 x 2 matrix A. It is assumed that its 1-norm +* is less than 1/SAFMIN. Entries less than +* sqrt(SAFMIN)*norm(A) are subject to being treated as zero. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= 2. +* +* B (input) DOUBLE PRECISION array, dimension (LDB, 2) +* On entry, the 2 x 2 upper triangular matrix B. It is +* assumed that the one-norm of B is less than 1/SAFMIN. The +* diagonals should be at least sqrt(SAFMIN) times the largest +* element of B (in absolute value); if a diagonal is smaller +* than that, then +/- sqrt(SAFMIN) will be used instead of +* that diagonal. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= 2. +* +* SAFMIN (input) DOUBLE PRECISION +* The smallest positive number s.t. 1/SAFMIN does not +* overflow. (This should always be DLAMCH('S') -- it is an +* argument in order to avoid having to call DLAMCH frequently.) +* +* SCALE1 (output) DOUBLE PRECISION +* A scaling factor used to avoid over-/underflow in the +* eigenvalue equation which defines the first eigenvalue. If +* the eigenvalues are complex, then the eigenvalues are +* ( WR1 +/- WI i ) / SCALE1 (which may lie outside the +* exponent range of the machine), SCALE1=SCALE2, and SCALE1 +* will always be positive. If the eigenvalues are real, then +* the first (real) eigenvalue is WR1 / SCALE1 , but this may +* overflow or underflow, and in fact, SCALE1 may be zero or +* less than the underflow threshhold if the exact eigenvalue +* is sufficiently large. +* +* SCALE2 (output) DOUBLE PRECISION +* A scaling factor used to avoid over-/underflow in the +* eigenvalue equation which defines the second eigenvalue. If +* the eigenvalues are complex, then SCALE2=SCALE1. If the +* eigenvalues are real, then the second (real) eigenvalue is +* WR2 / SCALE2 , but this may overflow or underflow, and in +* fact, SCALE2 may be zero or less than the underflow +* threshhold if the exact eigenvalue is sufficiently large. +* +* WR1 (output) DOUBLE PRECISION +* If the eigenvalue is real, then WR1 is SCALE1 times the +* eigenvalue closest to the (2,2) element of A B**(-1). If the +* eigenvalue is complex, then WR1=WR2 is SCALE1 times the real +* part of the eigenvalues. +* +* WR2 (output) DOUBLE PRECISION +* If the eigenvalue is real, then WR2 is SCALE2 times the +* other eigenvalue. If the eigenvalue is complex, then +* WR1=WR2 is SCALE1 times the real part of the eigenvalues. +* +* WI (output) DOUBLE PRECISION +* If the eigenvalue is real, then WI is zero. If the +* eigenvalue is complex, then WI is SCALE1 times the imaginary +* part of the eigenvalues. WI will always be non-negative. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) + DOUBLE PRECISION HALF + PARAMETER ( HALF = ONE / TWO ) + DOUBLE PRECISION FUZZY1 + PARAMETER ( FUZZY1 = ONE+1.0D-5 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION A11, A12, A21, A22, ABI22, ANORM, AS11, AS12, + $ AS22, ASCALE, B11, B12, B22, BINV11, BINV22, + $ BMIN, BNORM, BSCALE, BSIZE, C1, C2, C3, C4, C5, + $ DIFF, DISCR, PP, QQ, R, RTMAX, RTMIN, S1, S2, + $ SAFMAX, SHIFT, SS, SUM, WABS, WBIG, WDET, + $ WSCALE, WSIZE, WSMALL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SIGN, SQRT +* .. +* .. Executable Statements .. +* + RTMIN = SQRT( SAFMIN ) + RTMAX = ONE / RTMIN + SAFMAX = ONE / SAFMIN +* +* Scale A +* + ANORM = MAX( ABS( A( 1, 1 ) )+ABS( A( 2, 1 ) ), + $ ABS( A( 1, 2 ) )+ABS( A( 2, 2 ) ), SAFMIN ) + ASCALE = ONE / ANORM + A11 = ASCALE*A( 1, 1 ) + A21 = ASCALE*A( 2, 1 ) + A12 = ASCALE*A( 1, 2 ) + A22 = ASCALE*A( 2, 2 ) +* +* Perturb B if necessary to insure non-singularity +* + B11 = B( 1, 1 ) + B12 = B( 1, 2 ) + B22 = B( 2, 2 ) + BMIN = RTMIN*MAX( ABS( B11 ), ABS( B12 ), ABS( B22 ), RTMIN ) + IF( ABS( B11 ).LT.BMIN ) + $ B11 = SIGN( BMIN, B11 ) + IF( ABS( B22 ).LT.BMIN ) + $ B22 = SIGN( BMIN, B22 ) +* +* Scale B +* + BNORM = MAX( ABS( B11 ), ABS( B12 )+ABS( B22 ), SAFMIN ) + BSIZE = MAX( ABS( B11 ), ABS( B22 ) ) + BSCALE = ONE / BSIZE + B11 = B11*BSCALE + B12 = B12*BSCALE + B22 = B22*BSCALE +* +* Compute larger eigenvalue by method described by C. van Loan +* +* ( AS is A shifted by -SHIFT*B ) +* + BINV11 = ONE / B11 + BINV22 = ONE / B22 + S1 = A11*BINV11 + S2 = A22*BINV22 + IF( ABS( S1 ).LE.ABS( S2 ) ) THEN + AS12 = A12 - S1*B12 + AS22 = A22 - S1*B22 + SS = A21*( BINV11*BINV22 ) + ABI22 = AS22*BINV22 - SS*B12 + PP = HALF*ABI22 + SHIFT = S1 + ELSE + AS12 = A12 - S2*B12 + AS11 = A11 - S2*B11 + SS = A21*( BINV11*BINV22 ) + ABI22 = -SS*B12 + PP = HALF*( AS11*BINV11+ABI22 ) + SHIFT = S2 + END IF + QQ = SS*AS12 + IF( ABS( PP*RTMIN ).GE.ONE ) THEN + DISCR = ( RTMIN*PP )**2 + QQ*SAFMIN + R = SQRT( ABS( DISCR ) )*RTMAX + ELSE + IF( PP**2+ABS( QQ ).LE.SAFMIN ) THEN + DISCR = ( RTMAX*PP )**2 + QQ*SAFMAX + R = SQRT( ABS( DISCR ) )*RTMIN + ELSE + DISCR = PP**2 + QQ + R = SQRT( ABS( DISCR ) ) + END IF + END IF +* +* Note: the test of R in the following IF is to cover the case when +* DISCR is small and negative and is flushed to zero during +* the calculation of R. On machines which have a consistent +* flush-to-zero threshhold and handle numbers above that +* threshhold correctly, it would not be necessary. +* + IF( DISCR.GE.ZERO .OR. R.EQ.ZERO ) THEN + SUM = PP + SIGN( R, PP ) + DIFF = PP - SIGN( R, PP ) + WBIG = SHIFT + SUM +* +* Compute smaller eigenvalue +* + WSMALL = SHIFT + DIFF + IF( HALF*ABS( WBIG ).GT.MAX( ABS( WSMALL ), SAFMIN ) ) THEN + WDET = ( A11*A22-A12*A21 )*( BINV11*BINV22 ) + WSMALL = WDET / WBIG + END IF +* +* Choose (real) eigenvalue closest to 2,2 element of A*B**(-1) +* for WR1. +* + IF( PP.GT.ABI22 ) THEN + WR1 = MIN( WBIG, WSMALL ) + WR2 = MAX( WBIG, WSMALL ) + ELSE + WR1 = MAX( WBIG, WSMALL ) + WR2 = MIN( WBIG, WSMALL ) + END IF + WI = ZERO + ELSE +* +* Complex eigenvalues +* + WR1 = SHIFT + PP + WR2 = WR1 + WI = R + END IF +* +* Further scaling to avoid underflow and overflow in computing +* SCALE1 and overflow in computing w*B. +* +* This scale factor (WSCALE) is bounded from above using C1 and C2, +* and from below using C3 and C4. +* C1 implements the condition s A must never overflow. +* C2 implements the condition w B must never overflow. +* C3, with C2, +* implement the condition that s A - w B must never overflow. +* C4 implements the condition s should not underflow. +* C5 implements the condition max(s,|w|) should be at least 2. +* + C1 = BSIZE*( SAFMIN*MAX( ONE, ASCALE ) ) + C2 = SAFMIN*MAX( ONE, BNORM ) + C3 = BSIZE*SAFMIN + IF( ASCALE.LE.ONE .AND. BSIZE.LE.ONE ) THEN + C4 = MIN( ONE, ( ASCALE / SAFMIN )*BSIZE ) + ELSE + C4 = ONE + END IF + IF( ASCALE.LE.ONE .OR. BSIZE.LE.ONE ) THEN + C5 = MIN( ONE, ASCALE*BSIZE ) + ELSE + C5 = ONE + END IF +* +* Scale first eigenvalue +* + WABS = ABS( WR1 ) + ABS( WI ) + WSIZE = MAX( SAFMIN, C1, FUZZY1*( WABS*C2+C3 ), + $ MIN( C4, HALF*MAX( WABS, C5 ) ) ) + IF( WSIZE.NE.ONE ) THEN + WSCALE = ONE / WSIZE + IF( WSIZE.GT.ONE ) THEN + SCALE1 = ( MAX( ASCALE, BSIZE )*WSCALE )* + $ MIN( ASCALE, BSIZE ) + ELSE + SCALE1 = ( MIN( ASCALE, BSIZE )*WSCALE )* + $ MAX( ASCALE, BSIZE ) + END IF + WR1 = WR1*WSCALE + IF( WI.NE.ZERO ) THEN + WI = WI*WSCALE + WR2 = WR1 + SCALE2 = SCALE1 + END IF + ELSE + SCALE1 = ASCALE*BSIZE + SCALE2 = SCALE1 + END IF +* +* Scale second eigenvalue (if real) +* + IF( WI.EQ.ZERO ) THEN + WSIZE = MAX( SAFMIN, C1, FUZZY1*( ABS( WR2 )*C2+C3 ), + $ MIN( C4, HALF*MAX( ABS( WR2 ), C5 ) ) ) + IF( WSIZE.NE.ONE ) THEN + WSCALE = ONE / WSIZE + IF( WSIZE.GT.ONE ) THEN + SCALE2 = ( MAX( ASCALE, BSIZE )*WSCALE )* + $ MIN( ASCALE, BSIZE ) + ELSE + SCALE2 = ( MIN( ASCALE, BSIZE )*WSCALE )* + $ MAX( ASCALE, BSIZE ) + END IF + WR2 = WR2*WSCALE + ELSE + SCALE2 = ASCALE*BSIZE + END IF + END IF +* +* End of DLAG2 +* + RETURN + END diff --git a/2.3-1/src/fortran/lapack/dlagv2.f b/2.3-1/src/fortran/lapack/dlagv2.f new file mode 100644 index 00000000..15bcb0b9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlagv2.f @@ -0,0 +1,287 @@ + SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL, + $ CSR, SNR ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, LDB + DOUBLE PRECISION CSL, CSR, SNL, SNR +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ), + $ B( LDB, * ), BETA( 2 ) +* .. +* +* Purpose +* ======= +* +* DLAGV2 computes the Generalized Schur factorization of a real 2-by-2 +* matrix pencil (A,B) where B is upper triangular. This routine +* computes orthogonal (rotation) matrices given by CSL, SNL and CSR, +* SNR such that +* +* 1) if the pencil (A,B) has two real eigenvalues (include 0/0 or 1/0 +* types), then +* +* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] +* [ 0 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ] +* +* [ b11 b12 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] +* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ], +* +* 2) if the pencil (A,B) has a pair of complex conjugate eigenvalues, +* then +* +* [ a11 a12 ] := [ CSL SNL ] [ a11 a12 ] [ CSR -SNR ] +* [ a21 a22 ] [ -SNL CSL ] [ a21 a22 ] [ SNR CSR ] +* +* [ b11 0 ] := [ CSL SNL ] [ b11 b12 ] [ CSR -SNR ] +* [ 0 b22 ] [ -SNL CSL ] [ 0 b22 ] [ SNR CSR ] +* +* where b11 >= b22 > 0. +* +* +* Arguments +* ========= +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, 2) +* On entry, the 2 x 2 matrix A. +* On exit, A is overwritten by the ``A-part'' of the +* generalized Schur form. +* +* LDA (input) INTEGER +* THe leading dimension of the array A. LDA >= 2. +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB, 2) +* On entry, the upper triangular 2 x 2 matrix B. +* On exit, B is overwritten by the ``B-part'' of the +* generalized Schur form. +* +* LDB (input) INTEGER +* THe leading dimension of the array B. LDB >= 2. +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (2) +* ALPHAI (output) DOUBLE PRECISION array, dimension (2) +* BETA (output) DOUBLE PRECISION array, dimension (2) +* (ALPHAR(k)+i*ALPHAI(k))/BETA(k) are the eigenvalues of the +* pencil (A,B), k=1,2, i = sqrt(-1). Note that BETA(k) may +* be zero. +* +* CSL (output) DOUBLE PRECISION +* The cosine of the left rotation matrix. +* +* SNL (output) DOUBLE PRECISION +* The sine of the left rotation matrix. +* +* CSR (output) DOUBLE PRECISION +* The cosine of the right rotation matrix. +* +* SNR (output) DOUBLE PRECISION +* The sine of the right rotation matrix. +* +* Further Details +* =============== +* +* Based on contributions by +* Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION ANORM, ASCALE, BNORM, BSCALE, H1, H2, H3, QQ, + $ R, RR, SAFMIN, SCALE1, SCALE2, T, ULP, WI, WR1, + $ WR2 +* .. +* .. External Subroutines .. + EXTERNAL DLAG2, DLARTG, DLASV2, DROT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLAPY2 + EXTERNAL DLAMCH, DLAPY2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* + SAFMIN = DLAMCH( 'S' ) + ULP = DLAMCH( 'P' ) +* +* Scale A +* + ANORM = MAX( ABS( A( 1, 1 ) )+ABS( A( 2, 1 ) ), + $ ABS( A( 1, 2 ) )+ABS( A( 2, 2 ) ), SAFMIN ) + ASCALE = ONE / ANORM + A( 1, 1 ) = ASCALE*A( 1, 1 ) + A( 1, 2 ) = ASCALE*A( 1, 2 ) + A( 2, 1 ) = ASCALE*A( 2, 1 ) + A( 2, 2 ) = ASCALE*A( 2, 2 ) +* +* Scale B +* + BNORM = MAX( ABS( B( 1, 1 ) ), ABS( B( 1, 2 ) )+ABS( B( 2, 2 ) ), + $ SAFMIN ) + BSCALE = ONE / BNORM + B( 1, 1 ) = BSCALE*B( 1, 1 ) + B( 1, 2 ) = BSCALE*B( 1, 2 ) + B( 2, 2 ) = BSCALE*B( 2, 2 ) +* +* Check if A can be deflated +* + IF( ABS( A( 2, 1 ) ).LE.ULP ) THEN + CSL = ONE + SNL = ZERO + CSR = ONE + SNR = ZERO + A( 2, 1 ) = ZERO + B( 2, 1 ) = ZERO +* +* Check if B is singular +* + ELSE IF( ABS( B( 1, 1 ) ).LE.ULP ) THEN + CALL DLARTG( A( 1, 1 ), A( 2, 1 ), CSL, SNL, R ) + CSR = ONE + SNR = ZERO + CALL DROT( 2, A( 1, 1 ), LDA, A( 2, 1 ), LDA, CSL, SNL ) + CALL DROT( 2, B( 1, 1 ), LDB, B( 2, 1 ), LDB, CSL, SNL ) + A( 2, 1 ) = ZERO + B( 1, 1 ) = ZERO + B( 2, 1 ) = ZERO +* + ELSE IF( ABS( B( 2, 2 ) ).LE.ULP ) THEN + CALL DLARTG( A( 2, 2 ), A( 2, 1 ), CSR, SNR, T ) + SNR = -SNR + CALL DROT( 2, A( 1, 1 ), 1, A( 1, 2 ), 1, CSR, SNR ) + CALL DROT( 2, B( 1, 1 ), 1, B( 1, 2 ), 1, CSR, SNR ) + CSL = ONE + SNL = ZERO + A( 2, 1 ) = ZERO + B( 2, 1 ) = ZERO + B( 2, 2 ) = ZERO +* + ELSE +* +* B is nonsingular, first compute the eigenvalues of (A,B) +* + CALL DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, WR2, + $ WI ) +* + IF( WI.EQ.ZERO ) THEN +* +* two real eigenvalues, compute s*A-w*B +* + H1 = SCALE1*A( 1, 1 ) - WR1*B( 1, 1 ) + H2 = SCALE1*A( 1, 2 ) - WR1*B( 1, 2 ) + H3 = SCALE1*A( 2, 2 ) - WR1*B( 2, 2 ) +* + RR = DLAPY2( H1, H2 ) + QQ = DLAPY2( SCALE1*A( 2, 1 ), H3 ) +* + IF( RR.GT.QQ ) THEN +* +* find right rotation matrix to zero 1,1 element of +* (sA - wB) +* + CALL DLARTG( H2, H1, CSR, SNR, T ) +* + ELSE +* +* find right rotation matrix to zero 2,1 element of +* (sA - wB) +* + CALL DLARTG( H3, SCALE1*A( 2, 1 ), CSR, SNR, T ) +* + END IF +* + SNR = -SNR + CALL DROT( 2, A( 1, 1 ), 1, A( 1, 2 ), 1, CSR, SNR ) + CALL DROT( 2, B( 1, 1 ), 1, B( 1, 2 ), 1, CSR, SNR ) +* +* compute inf norms of A and B +* + H1 = MAX( ABS( A( 1, 1 ) )+ABS( A( 1, 2 ) ), + $ ABS( A( 2, 1 ) )+ABS( A( 2, 2 ) ) ) + H2 = MAX( ABS( B( 1, 1 ) )+ABS( B( 1, 2 ) ), + $ ABS( B( 2, 1 ) )+ABS( B( 2, 2 ) ) ) +* + IF( ( SCALE1*H1 ).GE.ABS( WR1 )*H2 ) THEN +* +* find left rotation matrix Q to zero out B(2,1) +* + CALL DLARTG( B( 1, 1 ), B( 2, 1 ), CSL, SNL, R ) +* + ELSE +* +* find left rotation matrix Q to zero out A(2,1) +* + CALL DLARTG( A( 1, 1 ), A( 2, 1 ), CSL, SNL, R ) +* + END IF +* + CALL DROT( 2, A( 1, 1 ), LDA, A( 2, 1 ), LDA, CSL, SNL ) + CALL DROT( 2, B( 1, 1 ), LDB, B( 2, 1 ), LDB, CSL, SNL ) +* + A( 2, 1 ) = ZERO + B( 2, 1 ) = ZERO +* + ELSE +* +* a pair of complex conjugate eigenvalues +* first compute the SVD of the matrix B +* + CALL DLASV2( B( 1, 1 ), B( 1, 2 ), B( 2, 2 ), R, T, SNR, + $ CSR, SNL, CSL ) +* +* Form (A,B) := Q(A,B)Z' where Q is left rotation matrix and +* Z is right rotation matrix computed from DLASV2 +* + CALL DROT( 2, A( 1, 1 ), LDA, A( 2, 1 ), LDA, CSL, SNL ) + CALL DROT( 2, B( 1, 1 ), LDB, B( 2, 1 ), LDB, CSL, SNL ) + CALL DROT( 2, A( 1, 1 ), 1, A( 1, 2 ), 1, CSR, SNR ) + CALL DROT( 2, B( 1, 1 ), 1, B( 1, 2 ), 1, CSR, SNR ) +* + B( 2, 1 ) = ZERO + B( 1, 2 ) = ZERO +* + END IF +* + END IF +* +* Unscaling +* + A( 1, 1 ) = ANORM*A( 1, 1 ) + A( 2, 1 ) = ANORM*A( 2, 1 ) + A( 1, 2 ) = ANORM*A( 1, 2 ) + A( 2, 2 ) = ANORM*A( 2, 2 ) + B( 1, 1 ) = BNORM*B( 1, 1 ) + B( 2, 1 ) = BNORM*B( 2, 1 ) + B( 1, 2 ) = BNORM*B( 1, 2 ) + B( 2, 2 ) = BNORM*B( 2, 2 ) +* + IF( WI.EQ.ZERO ) THEN + ALPHAR( 1 ) = A( 1, 1 ) + ALPHAR( 2 ) = A( 2, 2 ) + ALPHAI( 1 ) = ZERO + ALPHAI( 2 ) = ZERO + BETA( 1 ) = B( 1, 1 ) + BETA( 2 ) = B( 2, 2 ) + ELSE + ALPHAR( 1 ) = ANORM*WR1 / SCALE1 / BNORM + ALPHAI( 1 ) = ANORM*WI / SCALE1 / BNORM + ALPHAR( 2 ) = ALPHAR( 1 ) + ALPHAI( 2 ) = -ALPHAI( 1 ) + BETA( 1 ) = ONE + BETA( 2 ) = ONE + END IF +* + RETURN +* +* End of DLAGV2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlahqr.f b/2.3-1/src/fortran/lapack/dlahqr.f new file mode 100644 index 00000000..449a3770 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlahqr.f @@ -0,0 +1,501 @@ + SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, + $ ILOZ, IHIZ, Z, LDZ, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DLAHQR is an auxiliary routine called by DHSEQR to update the +* eigenvalues and Schur decomposition already computed by DHSEQR, by +* dealing with the Hessenberg submatrix in rows and columns ILO to +* IHI. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper quasi-triangular in +* rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless +* ILO = 1). DLAHQR works primarily with the Hessenberg +* submatrix in rows and columns ILO to IHI, but applies +* transformations to all of H if WANTT is .TRUE.. +* 1 <= ILO <= max(1,IHI); IHI <= N. +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO is zero and if WANTT is .TRUE., H is upper +* quasi-triangular in rows and columns ILO:IHI, with any +* 2-by-2 diagonal blocks in standard form. If INFO is zero +* and WANTT is .FALSE., the contents of H are unspecified on +* exit. The output state of H if INFO is nonzero is given +* below under the description of INFO. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH >= max(1,N). +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* The real and imaginary parts, respectively, of the computed +* eigenvalues ILO to IHI are stored in the corresponding +* elements of WR and WI. If two eigenvalues are computed as a +* complex conjugate pair, they are stored in consecutive +* elements of WR and WI, say the i-th and (i+1)th, with +* WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the +* eigenvalues are stored in the same order as on the diagonal +* of the Schur form returned in H, with WR(i) = H(i,i), and, if +* H(i:i+1,i:i+1) is a 2-by-2 diagonal block, +* WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. +* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* If WANTZ is .TRUE., on entry Z must contain the current +* matrix Z of transformations accumulated by DHSEQR, and on +* exit Z has been updated; transformations are applied only to +* the submatrix Z(ILOZ:IHIZ,ILO:IHI). +* If WANTZ is .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: If INFO = i, DLAHQR failed to compute all the +* eigenvalues ILO to IHI in a total of 30 iterations +* per eigenvalue; elements i+1:ihi of WR and WI +* contain those eigenvalues which have been +* successfully computed. +* +* If INFO .GT. 0 and WANTT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the +* eigenvalues of the upper Hessenberg matrix rows +* and columns ILO thorugh INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* (*) (initial value of H)*U = U*(final value of H) +* where U is an orthognal matrix. The final +* value of H is upper Hessenberg and triangular in +* rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* (final value of Z) = (initial value of Z)*U +* where U is the orthogonal matrix in (*) +* (regardless of the value of WANTT.) +* +* Further Details +* =============== +* +* 02-96 Based on modifications by +* David Day, Sandia National Laboratory, USA +* +* 12-04 Further modifications by +* Ralph Byers, University of Kansas, USA +* +* This is a modified version of DLAHQR from LAPACK version 3.0. +* It is (1) more robust against overflow and underflow and +* (2) adopts the more conservative Ahues & Tisseur stopping +* criterion (LAWN 122, 1997). +* +* ========================================================= +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 30 ) + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0, TWO = 2.0d0 ) + DOUBLE PRECISION DAT1, DAT2 + PARAMETER ( DAT1 = 3.0d0 / 4.0d0, DAT2 = -0.4375d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, AB, BA, BB, CS, DET, H11, H12, H21, H21S, + $ H22, RT1I, RT1R, RT2I, RT2R, RTDISC, S, SAFMAX, + $ SAFMIN, SMLNUM, SN, SUM, T1, T2, T3, TR, TST, + $ ULP, V2, V3 + INTEGER I, I1, I2, ITS, J, K, L, M, NH, NR, NZ +* .. +* .. Local Arrays .. + DOUBLE PRECISION V( 3 ) +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DLABAD, DLANV2, DLARFG, DROT +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( ILO.EQ.IHI ) THEN + WR( ILO ) = H( ILO, ILO ) + WI( ILO ) = ZERO + RETURN + END IF +* +* ==== clear out the trash ==== + DO 10 J = ILO, IHI - 3 + H( J+2, J ) = ZERO + H( J+3, J ) = ZERO + 10 CONTINUE + IF( ILO.LE.IHI-2 ) + $ H( IHI, IHI-2 ) = ZERO +* + NH = IHI - ILO + 1 + NZ = IHIZ - ILOZ + 1 +* +* Set machine-dependent constants for the stopping criterion. +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = ONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( NH ) / ULP ) +* +* I1 and I2 are the indices of the first row and last column of H +* to which transformations must be applied. If eigenvalues only are +* being computed, I1 and I2 are set inside the main loop. +* + IF( WANTT ) THEN + I1 = 1 + I2 = N + END IF +* +* The main loop begins here. I is the loop index and decreases from +* IHI to ILO in steps of 1 or 2. Each iteration of the loop works +* with the active submatrix in rows and columns L to I. +* Eigenvalues I+1 to IHI have already converged. Either L = ILO or +* H(L,L-1) is negligible so that the matrix splits. +* + I = IHI + 20 CONTINUE + L = ILO + IF( I.LT.ILO ) + $ GO TO 160 +* +* Perform QR iterations on rows and columns ILO to I until a +* submatrix of order 1 or 2 splits off at the bottom because a +* subdiagonal element has become negligible. +* + DO 140 ITS = 0, ITMAX +* +* Look for a single small subdiagonal element. +* + DO 30 K = I, L + 1, -1 + IF( ABS( H( K, K-1 ) ).LE.SMLNUM ) + $ GO TO 40 + TST = ABS( H( K-1, K-1 ) ) + ABS( H( K, K ) ) + IF( TST.EQ.ZERO ) THEN + IF( K-2.GE.ILO ) + $ TST = TST + ABS( H( K-1, K-2 ) ) + IF( K+1.LE.IHI ) + $ TST = TST + ABS( H( K+1, K ) ) + END IF +* ==== The following is a conservative small subdiagonal +* . deflation criterion due to Ahues & Tisseur (LAWN 122, +* . 1997). It has better mathematical foundation and +* . improves accuracy in some cases. ==== + IF( ABS( H( K, K-1 ) ).LE.ULP*TST ) THEN + AB = MAX( ABS( H( K, K-1 ) ), ABS( H( K-1, K ) ) ) + BA = MIN( ABS( H( K, K-1 ) ), ABS( H( K-1, K ) ) ) + AA = MAX( ABS( H( K, K ) ), + $ ABS( H( K-1, K-1 )-H( K, K ) ) ) + BB = MIN( ABS( H( K, K ) ), + $ ABS( H( K-1, K-1 )-H( K, K ) ) ) + S = AA + AB + IF( BA*( AB / S ).LE.MAX( SMLNUM, + $ ULP*( BB*( AA / S ) ) ) )GO TO 40 + END IF + 30 CONTINUE + 40 CONTINUE + L = K + IF( L.GT.ILO ) THEN +* +* H(L,L-1) is negligible +* + H( L, L-1 ) = ZERO + END IF +* +* Exit from loop if a submatrix of order 1 or 2 has split off. +* + IF( L.GE.I-1 ) + $ GO TO 150 +* +* Now the active submatrix is in rows and columns L to I. If +* eigenvalues only are being computed, only the active submatrix +* need be transformed. +* + IF( .NOT.WANTT ) THEN + I1 = L + I2 = I + END IF +* + IF( ITS.EQ.10 .OR. ITS.EQ.20 ) THEN +* +* Exceptional shift. +* + H11 = DAT1*S + H( I, I ) + H12 = DAT2*S + H21 = S + H22 = H11 + ELSE +* +* Prepare to use Francis' double shift +* (i.e. 2nd degree generalized Rayleigh quotient) +* + H11 = H( I-1, I-1 ) + H21 = H( I, I-1 ) + H12 = H( I-1, I ) + H22 = H( I, I ) + END IF + S = ABS( H11 ) + ABS( H12 ) + ABS( H21 ) + ABS( H22 ) + IF( S.EQ.ZERO ) THEN + RT1R = ZERO + RT1I = ZERO + RT2R = ZERO + RT2I = ZERO + ELSE + H11 = H11 / S + H21 = H21 / S + H12 = H12 / S + H22 = H22 / S + TR = ( H11+H22 ) / TWO + DET = ( H11-TR )*( H22-TR ) - H12*H21 + RTDISC = SQRT( ABS( DET ) ) + IF( DET.GE.ZERO ) THEN +* +* ==== complex conjugate shifts ==== +* + RT1R = TR*S + RT2R = RT1R + RT1I = RTDISC*S + RT2I = -RT1I + ELSE +* +* ==== real shifts (use only one of them) ==== +* + RT1R = TR + RTDISC + RT2R = TR - RTDISC + IF( ABS( RT1R-H22 ).LE.ABS( RT2R-H22 ) ) THEN + RT1R = RT1R*S + RT2R = RT1R + ELSE + RT2R = RT2R*S + RT1R = RT2R + END IF + RT1I = ZERO + RT2I = ZERO + END IF + END IF +* +* Look for two consecutive small subdiagonal elements. +* + DO 50 M = I - 2, L, -1 +* Determine the effect of starting the double-shift QR +* iteration at row M, and see if this would make H(M,M-1) +* negligible. (The following uses scaling to avoid +* overflows and most underflows.) +* + H21S = H( M+1, M ) + S = ABS( H( M, M )-RT2R ) + ABS( RT2I ) + ABS( H21S ) + H21S = H( M+1, M ) / S + V( 1 ) = H21S*H( M, M+1 ) + ( H( M, M )-RT1R )* + $ ( ( H( M, M )-RT2R ) / S ) - RT1I*( RT2I / S ) + V( 2 ) = H21S*( H( M, M )+H( M+1, M+1 )-RT1R-RT2R ) + V( 3 ) = H21S*H( M+2, M+1 ) + S = ABS( V( 1 ) ) + ABS( V( 2 ) ) + ABS( V( 3 ) ) + V( 1 ) = V( 1 ) / S + V( 2 ) = V( 2 ) / S + V( 3 ) = V( 3 ) / S + IF( M.EQ.L ) + $ GO TO 60 + IF( ABS( H( M, M-1 ) )*( ABS( V( 2 ) )+ABS( V( 3 ) ) ).LE. + $ ULP*ABS( V( 1 ) )*( ABS( H( M-1, M-1 ) )+ABS( H( M, + $ M ) )+ABS( H( M+1, M+1 ) ) ) )GO TO 60 + 50 CONTINUE + 60 CONTINUE +* +* Double-shift QR step +* + DO 130 K = M, I - 1 +* +* The first iteration of this loop determines a reflection G +* from the vector V and applies it from left and right to H, +* thus creating a nonzero bulge below the subdiagonal. +* +* Each subsequent iteration determines a reflection G to +* restore the Hessenberg form in the (K-1)th column, and thus +* chases the bulge one step toward the bottom of the active +* submatrix. NR is the order of G. +* + NR = MIN( 3, I-K+1 ) + IF( K.GT.M ) + $ CALL DCOPY( NR, H( K, K-1 ), 1, V, 1 ) + CALL DLARFG( NR, V( 1 ), V( 2 ), 1, T1 ) + IF( K.GT.M ) THEN + H( K, K-1 ) = V( 1 ) + H( K+1, K-1 ) = ZERO + IF( K.LT.I-1 ) + $ H( K+2, K-1 ) = ZERO + ELSE IF( M.GT.L ) THEN + H( K, K-1 ) = -H( K, K-1 ) + END IF + V2 = V( 2 ) + T2 = T1*V2 + IF( NR.EQ.3 ) THEN + V3 = V( 3 ) + T3 = T1*V3 +* +* Apply G from the left to transform the rows of the matrix +* in columns K to I2. +* + DO 70 J = K, I2 + SUM = H( K, J ) + V2*H( K+1, J ) + V3*H( K+2, J ) + H( K, J ) = H( K, J ) - SUM*T1 + H( K+1, J ) = H( K+1, J ) - SUM*T2 + H( K+2, J ) = H( K+2, J ) - SUM*T3 + 70 CONTINUE +* +* Apply G from the right to transform the columns of the +* matrix in rows I1 to min(K+3,I). +* + DO 80 J = I1, MIN( K+3, I ) + SUM = H( J, K ) + V2*H( J, K+1 ) + V3*H( J, K+2 ) + H( J, K ) = H( J, K ) - SUM*T1 + H( J, K+1 ) = H( J, K+1 ) - SUM*T2 + H( J, K+2 ) = H( J, K+2 ) - SUM*T3 + 80 CONTINUE +* + IF( WANTZ ) THEN +* +* Accumulate transformations in the matrix Z +* + DO 90 J = ILOZ, IHIZ + SUM = Z( J, K ) + V2*Z( J, K+1 ) + V3*Z( J, K+2 ) + Z( J, K ) = Z( J, K ) - SUM*T1 + Z( J, K+1 ) = Z( J, K+1 ) - SUM*T2 + Z( J, K+2 ) = Z( J, K+2 ) - SUM*T3 + 90 CONTINUE + END IF + ELSE IF( NR.EQ.2 ) THEN +* +* Apply G from the left to transform the rows of the matrix +* in columns K to I2. +* + DO 100 J = K, I2 + SUM = H( K, J ) + V2*H( K+1, J ) + H( K, J ) = H( K, J ) - SUM*T1 + H( K+1, J ) = H( K+1, J ) - SUM*T2 + 100 CONTINUE +* +* Apply G from the right to transform the columns of the +* matrix in rows I1 to min(K+3,I). +* + DO 110 J = I1, I + SUM = H( J, K ) + V2*H( J, K+1 ) + H( J, K ) = H( J, K ) - SUM*T1 + H( J, K+1 ) = H( J, K+1 ) - SUM*T2 + 110 CONTINUE +* + IF( WANTZ ) THEN +* +* Accumulate transformations in the matrix Z +* + DO 120 J = ILOZ, IHIZ + SUM = Z( J, K ) + V2*Z( J, K+1 ) + Z( J, K ) = Z( J, K ) - SUM*T1 + Z( J, K+1 ) = Z( J, K+1 ) - SUM*T2 + 120 CONTINUE + END IF + END IF + 130 CONTINUE +* + 140 CONTINUE +* +* Failure to converge in remaining number of iterations +* + INFO = I + RETURN +* + 150 CONTINUE +* + IF( L.EQ.I ) THEN +* +* H(I,I-1) is negligible: one eigenvalue has converged. +* + WR( I ) = H( I, I ) + WI( I ) = ZERO + ELSE IF( L.EQ.I-1 ) THEN +* +* H(I-1,I-2) is negligible: a pair of eigenvalues have converged. +* +* Transform the 2-by-2 submatrix to standard Schur form, +* and compute and store the eigenvalues. +* + CALL DLANV2( H( I-1, I-1 ), H( I-1, I ), H( I, I-1 ), + $ H( I, I ), WR( I-1 ), WI( I-1 ), WR( I ), WI( I ), + $ CS, SN ) +* + IF( WANTT ) THEN +* +* Apply the transformation to the rest of H. +* + IF( I2.GT.I ) + $ CALL DROT( I2-I, H( I-1, I+1 ), LDH, H( I, I+1 ), LDH, + $ CS, SN ) + CALL DROT( I-I1-1, H( I1, I-1 ), 1, H( I1, I ), 1, CS, SN ) + END IF + IF( WANTZ ) THEN +* +* Apply the transformation to Z. +* + CALL DROT( NZ, Z( ILOZ, I-1 ), 1, Z( ILOZ, I ), 1, CS, SN ) + END IF + END IF +* +* return to start of the main loop with new value of I. +* + I = L - 1 + GO TO 20 +* + 160 CONTINUE + RETURN +* +* End of DLAHQR +* + END diff --git a/2.3-1/src/fortran/lapack/dlahr2.f b/2.3-1/src/fortran/lapack/dlahr2.f new file mode 100644 index 00000000..6af74977 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlahr2.f @@ -0,0 +1,238 @@ + SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER K, LDA, LDT, LDY, N, NB +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ), + $ Y( LDY, NB ) +* .. +* +* Purpose +* ======= +* +* DLAHR2 reduces the first NB columns of A real general n-BY-(n-k+1) +* matrix A so that elements below the k-th subdiagonal are zero. The +* reduction is performed by an orthogonal similarity transformation +* Q' * A * Q. The routine returns the matrices V and T which determine +* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. +* +* This is an auxiliary routine called by DGEHRD. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. +* +* K (input) INTEGER +* The offset for the reduction. Elements below the k-th +* subdiagonal in the first NB columns are reduced to zero. +* K < N. +* +* NB (input) INTEGER +* The number of columns to be reduced. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1) +* On entry, the n-by-(n-k+1) general matrix A. +* On exit, the elements on and above the k-th subdiagonal in +* the first NB columns are overwritten with the corresponding +* elements of the reduced matrix; the elements below the k-th +* subdiagonal, with the array TAU, represent the matrix Q as a +* product of elementary reflectors. The other columns of A are +* unchanged. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) DOUBLE PRECISION array, dimension (NB) +* The scalar factors of the elementary reflectors. See Further +* Details. +* +* T (output) DOUBLE PRECISION array, dimension (LDT,NB) +* The upper triangular matrix T. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= NB. +* +* Y (output) DOUBLE PRECISION array, dimension (LDY,NB) +* The n-by-nb matrix Y. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= N. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of nb elementary reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in +* A(i+k+1:n,i), and tau in TAU(i). +* +* The elements of the vectors v together form the (n-k+1)-by-nb matrix +* V which is needed, with T and Y, to apply the transformation to the +* unreduced part of the matrix, using an update of the form: +* A := (I - V*T*V') * (A - Y*V'). +* +* The contents of A on exit are illustrated by the following example +* with n = 7, k = 3 and nb = 2: +* +* ( a a a a a ) +* ( a a a a a ) +* ( a a a a a ) +* ( h h a a a ) +* ( v1 h a a a ) +* ( v1 v2 a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* This file is a slight modification of LAPACK-3.0's DLAHRD +* incorporating improvements proposed by Quintana-Orti and Van de +* Gejin. Note that the entries of A(1:K,2:NB) differ from those +* returned by the original LAPACK routine. This function is +* not backward compatible with LAPACK3.0. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, + $ ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I + DOUBLE PRECISION EI +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMM, DGEMV, DLACPY, + $ DLARFG, DSCAL, DTRMM, DTRMV +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + DO 10 I = 1, NB + IF( I.GT.1 ) THEN +* +* Update A(K+1:N,I) +* +* Update I-th column of A - Y * V' +* + CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY, + $ A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 ) +* +* Apply I - V * T' * V' to this column (call it b) from the +* left, using the last column of T as workspace +* +* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) +* ( V2 ) ( b2 ) +* +* where V1 is unit lower triangular +* +* w := V1' * b1 +* + CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) + CALL DTRMV( 'Lower', 'Transpose', 'UNIT', + $ I-1, A( K+1, 1 ), + $ LDA, T( 1, NB ), 1 ) +* +* w := w + V2'*b2 +* + CALL DGEMV( 'Transpose', N-K-I+1, I-1, + $ ONE, A( K+I, 1 ), + $ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) +* +* w := T'*w +* + CALL DTRMV( 'Upper', 'Transpose', 'NON-UNIT', + $ I-1, T, LDT, + $ T( 1, NB ), 1 ) +* +* b2 := b2 - V2*w +* + CALL DGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, + $ A( K+I, 1 ), + $ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) +* +* b1 := b1 - V1*w +* + CALL DTRMV( 'Lower', 'NO TRANSPOSE', + $ 'UNIT', I-1, + $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) + CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) +* + A( K+I-1, I-1 ) = EI + END IF +* +* Generate the elementary reflector H(I) to annihilate +* A(K+I+1:N,I) +* + CALL DLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1, + $ TAU( I ) ) + EI = A( K+I, I ) + A( K+I, I ) = ONE +* +* Compute Y(K+1:N,I) +* + CALL DGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, + $ ONE, A( K+1, I+1 ), + $ LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 ) + CALL DGEMV( 'Transpose', N-K-I+1, I-1, + $ ONE, A( K+I, 1 ), LDA, + $ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) + CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, + $ Y( K+1, 1 ), LDY, + $ T( 1, I ), 1, ONE, Y( K+1, I ), 1 ) + CALL DSCAL( N-K, TAU( I ), Y( K+1, I ), 1 ) +* +* Compute T(1:I,I) +* + CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) + CALL DTRMV( 'Upper', 'No Transpose', 'NON-UNIT', + $ I-1, T, LDT, + $ T( 1, I ), 1 ) + T( I, I ) = TAU( I ) +* + 10 CONTINUE + A( K+NB, NB ) = EI +* +* Compute Y(1:K,1:NB) +* + CALL DLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY ) + CALL DTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', + $ 'UNIT', K, NB, + $ ONE, A( K+1, 1 ), LDA, Y, LDY ) + IF( N.GT.K+NB ) + $ CALL DGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, + $ NB, N-K-NB, ONE, + $ A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y, + $ LDY ) + CALL DTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', + $ 'NON-UNIT', K, NB, + $ ONE, T, LDT, Y, LDY ) +* + RETURN +* +* End of DLAHR2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlahrd.f b/2.3-1/src/fortran/lapack/dlahrd.f new file mode 100644 index 00000000..a04133d1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlahrd.f @@ -0,0 +1,207 @@ + SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER K, LDA, LDT, LDY, N, NB +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), T( LDT, NB ), TAU( NB ), + $ Y( LDY, NB ) +* .. +* +* Purpose +* ======= +* +* DLAHRD reduces the first NB columns of a real general n-by-(n-k+1) +* matrix A so that elements below the k-th subdiagonal are zero. The +* reduction is performed by an orthogonal similarity transformation +* Q' * A * Q. The routine returns the matrices V and T which determine +* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. +* +* This is an OBSOLETE auxiliary routine. +* This routine will be 'deprecated' in a future release. +* Please use the new routine DLAHR2 instead. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. +* +* K (input) INTEGER +* The offset for the reduction. Elements below the k-th +* subdiagonal in the first NB columns are reduced to zero. +* +* NB (input) INTEGER +* The number of columns to be reduced. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1) +* On entry, the n-by-(n-k+1) general matrix A. +* On exit, the elements on and above the k-th subdiagonal in +* the first NB columns are overwritten with the corresponding +* elements of the reduced matrix; the elements below the k-th +* subdiagonal, with the array TAU, represent the matrix Q as a +* product of elementary reflectors. The other columns of A are +* unchanged. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) DOUBLE PRECISION array, dimension (NB) +* The scalar factors of the elementary reflectors. See Further +* Details. +* +* T (output) DOUBLE PRECISION array, dimension (LDT,NB) +* The upper triangular matrix T. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= NB. +* +* Y (output) DOUBLE PRECISION array, dimension (LDY,NB) +* The n-by-nb matrix Y. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= N. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of nb elementary reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in +* A(i+k+1:n,i), and tau in TAU(i). +* +* The elements of the vectors v together form the (n-k+1)-by-nb matrix +* V which is needed, with T and Y, to apply the transformation to the +* unreduced part of the matrix, using an update of the form: +* A := (I - V*T*V') * (A - Y*V'). +* +* The contents of A on exit are illustrated by the following example +* with n = 7, k = 3 and nb = 2: +* +* ( a h a a a ) +* ( a h a a a ) +* ( a h a a a ) +* ( h h a a a ) +* ( v1 h a a a ) +* ( v1 v2 a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I + DOUBLE PRECISION EI +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DLARFG, DSCAL, DTRMV +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + DO 10 I = 1, NB + IF( I.GT.1 ) THEN +* +* Update A(1:n,i) +* +* Compute i-th column of A - Y * V' +* + CALL DGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, + $ A( K+I-1, 1 ), LDA, ONE, A( 1, I ), 1 ) +* +* Apply I - V * T' * V' to this column (call it b) from the +* left, using the last column of T as workspace +* +* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) +* ( V2 ) ( b2 ) +* +* where V1 is unit lower triangular +* +* w := V1' * b1 +* + CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) + CALL DTRMV( 'Lower', 'Transpose', 'Unit', I-1, A( K+1, 1 ), + $ LDA, T( 1, NB ), 1 ) +* +* w := w + V2'*b2 +* + CALL DGEMV( 'Transpose', N-K-I+1, I-1, ONE, A( K+I, 1 ), + $ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) +* +* w := T'*w +* + CALL DTRMV( 'Upper', 'Transpose', 'Non-unit', I-1, T, LDT, + $ T( 1, NB ), 1 ) +* +* b2 := b2 - V2*w +* + CALL DGEMV( 'No transpose', N-K-I+1, I-1, -ONE, A( K+I, 1 ), + $ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) +* +* b1 := b1 - V1*w +* + CALL DTRMV( 'Lower', 'No transpose', 'Unit', I-1, + $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) + CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) +* + A( K+I-1, I-1 ) = EI + END IF +* +* Generate the elementary reflector H(i) to annihilate +* A(k+i+1:n,i) +* + CALL DLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1, + $ TAU( I ) ) + EI = A( K+I, I ) + A( K+I, I ) = ONE +* +* Compute Y(1:n,i) +* + CALL DGEMV( 'No transpose', N, N-K-I+1, ONE, A( 1, I+1 ), LDA, + $ A( K+I, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL DGEMV( 'Transpose', N-K-I+1, I-1, ONE, A( K+I, 1 ), LDA, + $ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) + CALL DGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, T( 1, I ), 1, + $ ONE, Y( 1, I ), 1 ) + CALL DSCAL( N, TAU( I ), Y( 1, I ), 1 ) +* +* Compute T(1:i,i) +* + CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) + CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, LDT, + $ T( 1, I ), 1 ) + T( I, I ) = TAU( I ) +* + 10 CONTINUE + A( K+NB, NB ) = EI +* + RETURN +* +* End of DLAHRD +* + END diff --git a/2.3-1/src/fortran/lapack/dlaic1.f b/2.3-1/src/fortran/lapack/dlaic1.f new file mode 100644 index 00000000..44baece1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaic1.f @@ -0,0 +1,292 @@ + SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER J, JOB + DOUBLE PRECISION C, GAMMA, S, SEST, SESTPR +* .. +* .. Array Arguments .. + DOUBLE PRECISION W( J ), X( J ) +* .. +* +* Purpose +* ======= +* +* DLAIC1 applies one step of incremental condition estimation in +* its simplest version: +* +* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j +* lower triangular matrix L, such that +* twonorm(L*x) = sest +* Then DLAIC1 computes sestpr, s, c such that +* the vector +* [ s*x ] +* xhat = [ c ] +* is an approximate singular vector of +* [ L 0 ] +* Lhat = [ w' gamma ] +* in the sense that +* twonorm(Lhat*xhat) = sestpr. +* +* Depending on JOB, an estimate for the largest or smallest singular +* value is computed. +* +* Note that [s c]' and sestpr**2 is an eigenpair of the system +* +* diag(sest*sest, 0) + [alpha gamma] * [ alpha ] +* [ gamma ] +* +* where alpha = x'*w. +* +* Arguments +* ========= +* +* JOB (input) INTEGER +* = 1: an estimate for the largest singular value is computed. +* = 2: an estimate for the smallest singular value is computed. +* +* J (input) INTEGER +* Length of X and W +* +* X (input) DOUBLE PRECISION array, dimension (J) +* The j-vector x. +* +* SEST (input) DOUBLE PRECISION +* Estimated singular value of j by j matrix L +* +* W (input) DOUBLE PRECISION array, dimension (J) +* The j-vector w. +* +* GAMMA (input) DOUBLE PRECISION +* The diagonal element gamma. +* +* SESTPR (output) DOUBLE PRECISION +* Estimated singular value of (j+1) by (j+1) matrix Lhat. +* +* S (output) DOUBLE PRECISION +* Sine needed in forming xhat. +* +* C (output) DOUBLE PRECISION +* Cosine needed in forming xhat. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 ) + DOUBLE PRECISION HALF, FOUR + PARAMETER ( HALF = 0.5D0, FOUR = 4.0D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION ABSALP, ABSEST, ABSGAM, ALPHA, B, COSINE, EPS, + $ NORMA, S1, S2, SINE, T, TEST, TMP, ZETA1, ZETA2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SIGN, SQRT +* .. +* .. External Functions .. + DOUBLE PRECISION DDOT, DLAMCH + EXTERNAL DDOT, DLAMCH +* .. +* .. Executable Statements .. +* + EPS = DLAMCH( 'Epsilon' ) + ALPHA = DDOT( J, X, 1, W, 1 ) +* + ABSALP = ABS( ALPHA ) + ABSGAM = ABS( GAMMA ) + ABSEST = ABS( SEST ) +* + IF( JOB.EQ.1 ) THEN +* +* Estimating largest singular value +* +* special cases +* + IF( SEST.EQ.ZERO ) THEN + S1 = MAX( ABSGAM, ABSALP ) + IF( S1.EQ.ZERO ) THEN + S = ZERO + C = ONE + SESTPR = ZERO + ELSE + S = ALPHA / S1 + C = GAMMA / S1 + TMP = SQRT( S*S+C*C ) + S = S / TMP + C = C / TMP + SESTPR = S1*TMP + END IF + RETURN + ELSE IF( ABSGAM.LE.EPS*ABSEST ) THEN + S = ONE + C = ZERO + TMP = MAX( ABSEST, ABSALP ) + S1 = ABSEST / TMP + S2 = ABSALP / TMP + SESTPR = TMP*SQRT( S1*S1+S2*S2 ) + RETURN + ELSE IF( ABSALP.LE.EPS*ABSEST ) THEN + S1 = ABSGAM + S2 = ABSEST + IF( S1.LE.S2 ) THEN + S = ONE + C = ZERO + SESTPR = S2 + ELSE + S = ZERO + C = ONE + SESTPR = S1 + END IF + RETURN + ELSE IF( ABSEST.LE.EPS*ABSALP .OR. ABSEST.LE.EPS*ABSGAM ) THEN + S1 = ABSGAM + S2 = ABSALP + IF( S1.LE.S2 ) THEN + TMP = S1 / S2 + S = SQRT( ONE+TMP*TMP ) + SESTPR = S2*S + C = ( GAMMA / S2 ) / S + S = SIGN( ONE, ALPHA ) / S + ELSE + TMP = S2 / S1 + C = SQRT( ONE+TMP*TMP ) + SESTPR = S1*C + S = ( ALPHA / S1 ) / C + C = SIGN( ONE, GAMMA ) / C + END IF + RETURN + ELSE +* +* normal case +* + ZETA1 = ALPHA / ABSEST + ZETA2 = GAMMA / ABSEST +* + B = ( ONE-ZETA1*ZETA1-ZETA2*ZETA2 )*HALF + C = ZETA1*ZETA1 + IF( B.GT.ZERO ) THEN + T = C / ( B+SQRT( B*B+C ) ) + ELSE + T = SQRT( B*B+C ) - B + END IF +* + SINE = -ZETA1 / T + COSINE = -ZETA2 / ( ONE+T ) + TMP = SQRT( SINE*SINE+COSINE*COSINE ) + S = SINE / TMP + C = COSINE / TMP + SESTPR = SQRT( T+ONE )*ABSEST + RETURN + END IF +* + ELSE IF( JOB.EQ.2 ) THEN +* +* Estimating smallest singular value +* +* special cases +* + IF( SEST.EQ.ZERO ) THEN + SESTPR = ZERO + IF( MAX( ABSGAM, ABSALP ).EQ.ZERO ) THEN + SINE = ONE + COSINE = ZERO + ELSE + SINE = -GAMMA + COSINE = ALPHA + END IF + S1 = MAX( ABS( SINE ), ABS( COSINE ) ) + S = SINE / S1 + C = COSINE / S1 + TMP = SQRT( S*S+C*C ) + S = S / TMP + C = C / TMP + RETURN + ELSE IF( ABSGAM.LE.EPS*ABSEST ) THEN + S = ZERO + C = ONE + SESTPR = ABSGAM + RETURN + ELSE IF( ABSALP.LE.EPS*ABSEST ) THEN + S1 = ABSGAM + S2 = ABSEST + IF( S1.LE.S2 ) THEN + S = ZERO + C = ONE + SESTPR = S1 + ELSE + S = ONE + C = ZERO + SESTPR = S2 + END IF + RETURN + ELSE IF( ABSEST.LE.EPS*ABSALP .OR. ABSEST.LE.EPS*ABSGAM ) THEN + S1 = ABSGAM + S2 = ABSALP + IF( S1.LE.S2 ) THEN + TMP = S1 / S2 + C = SQRT( ONE+TMP*TMP ) + SESTPR = ABSEST*( TMP / C ) + S = -( GAMMA / S2 ) / C + C = SIGN( ONE, ALPHA ) / C + ELSE + TMP = S2 / S1 + S = SQRT( ONE+TMP*TMP ) + SESTPR = ABSEST / S + C = ( ALPHA / S1 ) / S + S = -SIGN( ONE, GAMMA ) / S + END IF + RETURN + ELSE +* +* normal case +* + ZETA1 = ALPHA / ABSEST + ZETA2 = GAMMA / ABSEST +* + NORMA = MAX( ONE+ZETA1*ZETA1+ABS( ZETA1*ZETA2 ), + $ ABS( ZETA1*ZETA2 )+ZETA2*ZETA2 ) +* +* See if root is closer to zero or to ONE +* + TEST = ONE + TWO*( ZETA1-ZETA2 )*( ZETA1+ZETA2 ) + IF( TEST.GE.ZERO ) THEN +* +* root is close to zero, compute directly +* + B = ( ZETA1*ZETA1+ZETA2*ZETA2+ONE )*HALF + C = ZETA2*ZETA2 + T = C / ( B+SQRT( ABS( B*B-C ) ) ) + SINE = ZETA1 / ( ONE-T ) + COSINE = -ZETA2 / T + SESTPR = SQRT( T+FOUR*EPS*EPS*NORMA )*ABSEST + ELSE +* +* root is closer to ONE, shift by that amount +* + B = ( ZETA2*ZETA2+ZETA1*ZETA1-ONE )*HALF + C = ZETA1*ZETA1 + IF( B.GE.ZERO ) THEN + T = -C / ( B+SQRT( B*B+C ) ) + ELSE + T = B - SQRT( B*B+C ) + END IF + SINE = -ZETA1 / T + COSINE = -ZETA2 / ( ONE+T ) + SESTPR = SQRT( ONE+T+FOUR*EPS*EPS*NORMA )*ABSEST + END IF + TMP = SQRT( SINE*SINE+COSINE*COSINE ) + S = SINE / TMP + C = COSINE / TMP + RETURN +* + END IF + END IF + RETURN +* +* End of DLAIC1 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaisnan.f b/2.3-1/src/fortran/lapack/dlaisnan.f new file mode 100644 index 00000000..96350a27 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaisnan.f @@ -0,0 +1,41 @@ + LOGICAL FUNCTION DLAISNAN(DIN1,DIN2) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION DIN1,DIN2 +* .. +* +* Purpose +* ======= +* +* This routine is not for general use. It exists solely to avoid +* over-optimization in DISNAN. +* +* DLAISNAN checks for NaNs by comparing its two arguments for +* inequality. NaN is the only floating-point value where NaN != NaN +* returns .TRUE. To check for NaNs, pass the same variable as both +* arguments. +* +* Strictly speaking, Fortran does not allow aliasing of function +* arguments. So a compiler must assume that the two arguments are +* not the same variable, and the test will not be optimized away. +* Interprocedural or whole-program optimization may delete this +* test. The ISNAN functions will be replaced by the correct +* Fortran 03 intrinsic once the intrinsic is widely available. +* +* Arguments +* ========= +* +* DIN1 (input) DOUBLE PRECISION +* DIN2 (input) DOUBLE PRECISION +* Two numbers to compare for inequality. +* +* ===================================================================== +* +* .. Executable Statements .. + DLAISNAN = (DIN1.NE.DIN2) + RETURN + END diff --git a/2.3-1/src/fortran/lapack/dlaln2.f b/2.3-1/src/fortran/lapack/dlaln2.f new file mode 100644 index 00000000..7c99bdbe --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaln2.f @@ -0,0 +1,507 @@ + SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B, + $ LDB, WR, WI, X, LDX, SCALE, XNORM, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL LTRANS + INTEGER INFO, LDA, LDB, LDX, NA, NW + DOUBLE PRECISION CA, D1, D2, SCALE, SMIN, WI, WR, XNORM +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), X( LDX, * ) +* .. +* +* Purpose +* ======= +* +* DLALN2 solves a system of the form (ca A - w D ) X = s B +* or (ca A' - w D) X = s B with possible scaling ("s") and +* perturbation of A. (A' means A-transpose.) +* +* A is an NA x NA real matrix, ca is a real scalar, D is an NA x NA +* real diagonal matrix, w is a real or complex value, and X and B are +* NA x 1 matrices -- real if w is real, complex if w is complex. NA +* may be 1 or 2. +* +* If w is complex, X and B are represented as NA x 2 matrices, +* the first column of each being the real part and the second +* being the imaginary part. +* +* "s" is a scaling factor (.LE. 1), computed by DLALN2, which is +* so chosen that X can be computed without overflow. X is further +* scaled if necessary to assure that norm(ca A - w D)*norm(X) is less +* than overflow. +* +* If both singular values of (ca A - w D) are less than SMIN, +* SMIN*identity will be used instead of (ca A - w D). If only one +* singular value is less than SMIN, one element of (ca A - w D) will be +* perturbed enough to make the smallest singular value roughly SMIN. +* If both singular values are at least SMIN, (ca A - w D) will not be +* perturbed. In any case, the perturbation will be at most some small +* multiple of max( SMIN, ulp*norm(ca A - w D) ). The singular values +* are computed by infinity-norm approximations, and thus will only be +* correct to a factor of 2 or so. +* +* Note: all input quantities are assumed to be smaller than overflow +* by a reasonable factor. (See BIGNUM.) +* +* Arguments +* ========== +* +* LTRANS (input) LOGICAL +* =.TRUE.: A-transpose will be used. +* =.FALSE.: A will be used (not transposed.) +* +* NA (input) INTEGER +* The size of the matrix A. It may (only) be 1 or 2. +* +* NW (input) INTEGER +* 1 if "w" is real, 2 if "w" is complex. It may only be 1 +* or 2. +* +* SMIN (input) DOUBLE PRECISION +* The desired lower bound on the singular values of A. This +* should be a safe distance away from underflow or overflow, +* say, between (underflow/machine precision) and (machine +* precision * overflow ). (See BIGNUM and ULP.) +* +* CA (input) DOUBLE PRECISION +* The coefficient c, which A is multiplied by. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,NA) +* The NA x NA matrix A. +* +* LDA (input) INTEGER +* The leading dimension of A. It must be at least NA. +* +* D1 (input) DOUBLE PRECISION +* The 1,1 element in the diagonal matrix D. +* +* D2 (input) DOUBLE PRECISION +* The 2,2 element in the diagonal matrix D. Not used if NW=1. +* +* B (input) DOUBLE PRECISION array, dimension (LDB,NW) +* The NA x NW matrix B (right-hand side). If NW=2 ("w" is +* complex), column 1 contains the real part of B and column 2 +* contains the imaginary part. +* +* LDB (input) INTEGER +* The leading dimension of B. It must be at least NA. +* +* WR (input) DOUBLE PRECISION +* The real part of the scalar "w". +* +* WI (input) DOUBLE PRECISION +* The imaginary part of the scalar "w". Not used if NW=1. +* +* X (output) DOUBLE PRECISION array, dimension (LDX,NW) +* The NA x NW matrix X (unknowns), as computed by DLALN2. +* If NW=2 ("w" is complex), on exit, column 1 will contain +* the real part of X and column 2 will contain the imaginary +* part. +* +* LDX (input) INTEGER +* The leading dimension of X. It must be at least NA. +* +* SCALE (output) DOUBLE PRECISION +* The scale factor that B must be multiplied by to insure +* that overflow does not occur when computing X. Thus, +* (ca A - w D) X will be SCALE*B, not B (ignoring +* perturbations of A.) It will be at most 1. +* +* XNORM (output) DOUBLE PRECISION +* The infinity-norm of X, when X is regarded as an NA x NW +* real matrix. +* +* INFO (output) INTEGER +* An error flag. It will be set to zero if no error occurs, +* a negative number if an argument is in error, or a positive +* number if ca A - w D had to be perturbed. +* The possible values are: +* = 0: No error occurred, and (ca A - w D) did not have to be +* perturbed. +* = 1: (ca A - w D) had to be perturbed to make its smallest +* (or only) singular value greater than SMIN. +* NOTE: In the interests of speed, this routine does not +* check the inputs for errors. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) +* .. +* .. Local Scalars .. + INTEGER ICMAX, J + DOUBLE PRECISION BBND, BI1, BI2, BIGNUM, BNORM, BR1, BR2, CI21, + $ CI22, CMAX, CNORM, CR21, CR22, CSI, CSR, LI21, + $ LR21, SMINI, SMLNUM, TEMP, U22ABS, UI11, UI11R, + $ UI12, UI12S, UI22, UR11, UR11R, UR12, UR12S, + $ UR22, XI1, XI2, XR1, XR2 +* .. +* .. Local Arrays .. + LOGICAL RSWAP( 4 ), ZSWAP( 4 ) + INTEGER IPIVOT( 4, 4 ) + DOUBLE PRECISION CI( 2, 2 ), CIV( 4 ), CR( 2, 2 ), CRV( 4 ) +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLADIV +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Equivalences .. + EQUIVALENCE ( CI( 1, 1 ), CIV( 1 ) ), + $ ( CR( 1, 1 ), CRV( 1 ) ) +* .. +* .. Data statements .. + DATA ZSWAP / .FALSE., .FALSE., .TRUE., .TRUE. / + DATA RSWAP / .FALSE., .TRUE., .FALSE., .TRUE. / + DATA IPIVOT / 1, 2, 3, 4, 2, 1, 4, 3, 3, 4, 1, 2, 4, + $ 3, 2, 1 / +* .. +* .. Executable Statements .. +* +* Compute BIGNUM +* + SMLNUM = TWO*DLAMCH( 'Safe minimum' ) + BIGNUM = ONE / SMLNUM + SMINI = MAX( SMIN, SMLNUM ) +* +* Don't check for input errors +* + INFO = 0 +* +* Standard Initializations +* + SCALE = ONE +* + IF( NA.EQ.1 ) THEN +* +* 1 x 1 (i.e., scalar) system C X = B +* + IF( NW.EQ.1 ) THEN +* +* Real 1x1 system. +* +* C = ca A - w D +* + CSR = CA*A( 1, 1 ) - WR*D1 + CNORM = ABS( CSR ) +* +* If | C | < SMINI, use C = SMINI +* + IF( CNORM.LT.SMINI ) THEN + CSR = SMINI + CNORM = SMINI + INFO = 1 + END IF +* +* Check scaling for X = B / C +* + BNORM = ABS( B( 1, 1 ) ) + IF( CNORM.LT.ONE .AND. BNORM.GT.ONE ) THEN + IF( BNORM.GT.BIGNUM*CNORM ) + $ SCALE = ONE / BNORM + END IF +* +* Compute X +* + X( 1, 1 ) = ( B( 1, 1 )*SCALE ) / CSR + XNORM = ABS( X( 1, 1 ) ) + ELSE +* +* Complex 1x1 system (w is complex) +* +* C = ca A - w D +* + CSR = CA*A( 1, 1 ) - WR*D1 + CSI = -WI*D1 + CNORM = ABS( CSR ) + ABS( CSI ) +* +* If | C | < SMINI, use C = SMINI +* + IF( CNORM.LT.SMINI ) THEN + CSR = SMINI + CSI = ZERO + CNORM = SMINI + INFO = 1 + END IF +* +* Check scaling for X = B / C +* + BNORM = ABS( B( 1, 1 ) ) + ABS( B( 1, 2 ) ) + IF( CNORM.LT.ONE .AND. BNORM.GT.ONE ) THEN + IF( BNORM.GT.BIGNUM*CNORM ) + $ SCALE = ONE / BNORM + END IF +* +* Compute X +* + CALL DLADIV( SCALE*B( 1, 1 ), SCALE*B( 1, 2 ), CSR, CSI, + $ X( 1, 1 ), X( 1, 2 ) ) + XNORM = ABS( X( 1, 1 ) ) + ABS( X( 1, 2 ) ) + END IF +* + ELSE +* +* 2x2 System +* +* Compute the real part of C = ca A - w D (or ca A' - w D ) +* + CR( 1, 1 ) = CA*A( 1, 1 ) - WR*D1 + CR( 2, 2 ) = CA*A( 2, 2 ) - WR*D2 + IF( LTRANS ) THEN + CR( 1, 2 ) = CA*A( 2, 1 ) + CR( 2, 1 ) = CA*A( 1, 2 ) + ELSE + CR( 2, 1 ) = CA*A( 2, 1 ) + CR( 1, 2 ) = CA*A( 1, 2 ) + END IF +* + IF( NW.EQ.1 ) THEN +* +* Real 2x2 system (w is real) +* +* Find the largest element in C +* + CMAX = ZERO + ICMAX = 0 +* + DO 10 J = 1, 4 + IF( ABS( CRV( J ) ).GT.CMAX ) THEN + CMAX = ABS( CRV( J ) ) + ICMAX = J + END IF + 10 CONTINUE +* +* If norm(C) < SMINI, use SMINI*identity. +* + IF( CMAX.LT.SMINI ) THEN + BNORM = MAX( ABS( B( 1, 1 ) ), ABS( B( 2, 1 ) ) ) + IF( SMINI.LT.ONE .AND. BNORM.GT.ONE ) THEN + IF( BNORM.GT.BIGNUM*SMINI ) + $ SCALE = ONE / BNORM + END IF + TEMP = SCALE / SMINI + X( 1, 1 ) = TEMP*B( 1, 1 ) + X( 2, 1 ) = TEMP*B( 2, 1 ) + XNORM = TEMP*BNORM + INFO = 1 + RETURN + END IF +* +* Gaussian elimination with complete pivoting. +* + UR11 = CRV( ICMAX ) + CR21 = CRV( IPIVOT( 2, ICMAX ) ) + UR12 = CRV( IPIVOT( 3, ICMAX ) ) + CR22 = CRV( IPIVOT( 4, ICMAX ) ) + UR11R = ONE / UR11 + LR21 = UR11R*CR21 + UR22 = CR22 - UR12*LR21 +* +* If smaller pivot < SMINI, use SMINI +* + IF( ABS( UR22 ).LT.SMINI ) THEN + UR22 = SMINI + INFO = 1 + END IF + IF( RSWAP( ICMAX ) ) THEN + BR1 = B( 2, 1 ) + BR2 = B( 1, 1 ) + ELSE + BR1 = B( 1, 1 ) + BR2 = B( 2, 1 ) + END IF + BR2 = BR2 - LR21*BR1 + BBND = MAX( ABS( BR1*( UR22*UR11R ) ), ABS( BR2 ) ) + IF( BBND.GT.ONE .AND. ABS( UR22 ).LT.ONE ) THEN + IF( BBND.GE.BIGNUM*ABS( UR22 ) ) + $ SCALE = ONE / BBND + END IF +* + XR2 = ( BR2*SCALE ) / UR22 + XR1 = ( SCALE*BR1 )*UR11R - XR2*( UR11R*UR12 ) + IF( ZSWAP( ICMAX ) ) THEN + X( 1, 1 ) = XR2 + X( 2, 1 ) = XR1 + ELSE + X( 1, 1 ) = XR1 + X( 2, 1 ) = XR2 + END IF + XNORM = MAX( ABS( XR1 ), ABS( XR2 ) ) +* +* Further scaling if norm(A) norm(X) > overflow +* + IF( XNORM.GT.ONE .AND. CMAX.GT.ONE ) THEN + IF( XNORM.GT.BIGNUM / CMAX ) THEN + TEMP = CMAX / BIGNUM + X( 1, 1 ) = TEMP*X( 1, 1 ) + X( 2, 1 ) = TEMP*X( 2, 1 ) + XNORM = TEMP*XNORM + SCALE = TEMP*SCALE + END IF + END IF + ELSE +* +* Complex 2x2 system (w is complex) +* +* Find the largest element in C +* + CI( 1, 1 ) = -WI*D1 + CI( 2, 1 ) = ZERO + CI( 1, 2 ) = ZERO + CI( 2, 2 ) = -WI*D2 + CMAX = ZERO + ICMAX = 0 +* + DO 20 J = 1, 4 + IF( ABS( CRV( J ) )+ABS( CIV( J ) ).GT.CMAX ) THEN + CMAX = ABS( CRV( J ) ) + ABS( CIV( J ) ) + ICMAX = J + END IF + 20 CONTINUE +* +* If norm(C) < SMINI, use SMINI*identity. +* + IF( CMAX.LT.SMINI ) THEN + BNORM = MAX( ABS( B( 1, 1 ) )+ABS( B( 1, 2 ) ), + $ ABS( B( 2, 1 ) )+ABS( B( 2, 2 ) ) ) + IF( SMINI.LT.ONE .AND. BNORM.GT.ONE ) THEN + IF( BNORM.GT.BIGNUM*SMINI ) + $ SCALE = ONE / BNORM + END IF + TEMP = SCALE / SMINI + X( 1, 1 ) = TEMP*B( 1, 1 ) + X( 2, 1 ) = TEMP*B( 2, 1 ) + X( 1, 2 ) = TEMP*B( 1, 2 ) + X( 2, 2 ) = TEMP*B( 2, 2 ) + XNORM = TEMP*BNORM + INFO = 1 + RETURN + END IF +* +* Gaussian elimination with complete pivoting. +* + UR11 = CRV( ICMAX ) + UI11 = CIV( ICMAX ) + CR21 = CRV( IPIVOT( 2, ICMAX ) ) + CI21 = CIV( IPIVOT( 2, ICMAX ) ) + UR12 = CRV( IPIVOT( 3, ICMAX ) ) + UI12 = CIV( IPIVOT( 3, ICMAX ) ) + CR22 = CRV( IPIVOT( 4, ICMAX ) ) + CI22 = CIV( IPIVOT( 4, ICMAX ) ) + IF( ICMAX.EQ.1 .OR. ICMAX.EQ.4 ) THEN +* +* Code when off-diagonals of pivoted C are real +* + IF( ABS( UR11 ).GT.ABS( UI11 ) ) THEN + TEMP = UI11 / UR11 + UR11R = ONE / ( UR11*( ONE+TEMP**2 ) ) + UI11R = -TEMP*UR11R + ELSE + TEMP = UR11 / UI11 + UI11R = -ONE / ( UI11*( ONE+TEMP**2 ) ) + UR11R = -TEMP*UI11R + END IF + LR21 = CR21*UR11R + LI21 = CR21*UI11R + UR12S = UR12*UR11R + UI12S = UR12*UI11R + UR22 = CR22 - UR12*LR21 + UI22 = CI22 - UR12*LI21 + ELSE +* +* Code when diagonals of pivoted C are real +* + UR11R = ONE / UR11 + UI11R = ZERO + LR21 = CR21*UR11R + LI21 = CI21*UR11R + UR12S = UR12*UR11R + UI12S = UI12*UR11R + UR22 = CR22 - UR12*LR21 + UI12*LI21 + UI22 = -UR12*LI21 - UI12*LR21 + END IF + U22ABS = ABS( UR22 ) + ABS( UI22 ) +* +* If smaller pivot < SMINI, use SMINI +* + IF( U22ABS.LT.SMINI ) THEN + UR22 = SMINI + UI22 = ZERO + INFO = 1 + END IF + IF( RSWAP( ICMAX ) ) THEN + BR2 = B( 1, 1 ) + BR1 = B( 2, 1 ) + BI2 = B( 1, 2 ) + BI1 = B( 2, 2 ) + ELSE + BR1 = B( 1, 1 ) + BR2 = B( 2, 1 ) + BI1 = B( 1, 2 ) + BI2 = B( 2, 2 ) + END IF + BR2 = BR2 - LR21*BR1 + LI21*BI1 + BI2 = BI2 - LI21*BR1 - LR21*BI1 + BBND = MAX( ( ABS( BR1 )+ABS( BI1 ) )* + $ ( U22ABS*( ABS( UR11R )+ABS( UI11R ) ) ), + $ ABS( BR2 )+ABS( BI2 ) ) + IF( BBND.GT.ONE .AND. U22ABS.LT.ONE ) THEN + IF( BBND.GE.BIGNUM*U22ABS ) THEN + SCALE = ONE / BBND + BR1 = SCALE*BR1 + BI1 = SCALE*BI1 + BR2 = SCALE*BR2 + BI2 = SCALE*BI2 + END IF + END IF +* + CALL DLADIV( BR2, BI2, UR22, UI22, XR2, XI2 ) + XR1 = UR11R*BR1 - UI11R*BI1 - UR12S*XR2 + UI12S*XI2 + XI1 = UI11R*BR1 + UR11R*BI1 - UI12S*XR2 - UR12S*XI2 + IF( ZSWAP( ICMAX ) ) THEN + X( 1, 1 ) = XR2 + X( 2, 1 ) = XR1 + X( 1, 2 ) = XI2 + X( 2, 2 ) = XI1 + ELSE + X( 1, 1 ) = XR1 + X( 2, 1 ) = XR2 + X( 1, 2 ) = XI1 + X( 2, 2 ) = XI2 + END IF + XNORM = MAX( ABS( XR1 )+ABS( XI1 ), ABS( XR2 )+ABS( XI2 ) ) +* +* Further scaling if norm(A) norm(X) > overflow +* + IF( XNORM.GT.ONE .AND. CMAX.GT.ONE ) THEN + IF( XNORM.GT.BIGNUM / CMAX ) THEN + TEMP = CMAX / BIGNUM + X( 1, 1 ) = TEMP*X( 1, 1 ) + X( 2, 1 ) = TEMP*X( 2, 1 ) + X( 1, 2 ) = TEMP*X( 1, 2 ) + X( 2, 2 ) = TEMP*X( 2, 2 ) + XNORM = TEMP*XNORM + SCALE = TEMP*SCALE + END IF + END IF + END IF + END IF +* + RETURN +* +* End of DLALN2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlamch.f b/2.3-1/src/fortran/lapack/dlamch.f new file mode 100644 index 00000000..64ac3bec --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlamch.f @@ -0,0 +1,857 @@ + DOUBLE PRECISION FUNCTION DLAMCH( CMACH ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + CHARACTER CMACH +* .. +* +* Purpose +* ======= +* +* DLAMCH determines double precision machine parameters. +* +* Arguments +* ========= +* +* CMACH (input) CHARACTER*1 +* Specifies the value to be returned by DLAMCH: +* = 'E' or 'e', DLAMCH := eps +* = 'S' or 's , DLAMCH := sfmin +* = 'B' or 'b', DLAMCH := base +* = 'P' or 'p', DLAMCH := eps*base +* = 'N' or 'n', DLAMCH := t +* = 'R' or 'r', DLAMCH := rnd +* = 'M' or 'm', DLAMCH := emin +* = 'U' or 'u', DLAMCH := rmin +* = 'L' or 'l', DLAMCH := emax +* = 'O' or 'o', DLAMCH := rmax +* +* where +* +* eps = relative machine precision +* sfmin = safe minimum, such that 1/sfmin does not overflow +* base = base of the machine +* prec = eps*base +* t = number of (base) digits in the mantissa +* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise +* emin = minimum exponent before (gradual) underflow +* rmin = underflow threshold - base**(emin-1) +* emax = largest exponent before overflow +* rmax = overflow threshold - (base**emax)*(1-eps) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL FIRST, LRND + INTEGER BETA, IMAX, IMIN, IT + DOUBLE PRECISION BASE, EMAX, EMIN, EPS, PREC, RMACH, RMAX, RMIN, + $ RND, SFMIN, SMALL, T +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLAMC2 +* .. +* .. Save statement .. + SAVE FIRST, EPS, SFMIN, BASE, T, RND, EMIN, RMIN, + $ EMAX, RMAX, PREC +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + CALL DLAMC2( BETA, IT, LRND, EPS, IMIN, RMIN, IMAX, RMAX ) + BASE = BETA + T = IT + IF( LRND ) THEN + RND = ONE + EPS = ( BASE**( 1-IT ) ) / 2 + ELSE + RND = ZERO + EPS = BASE**( 1-IT ) + END IF + PREC = EPS*BASE + EMIN = IMIN + EMAX = IMAX + SFMIN = RMIN + SMALL = ONE / RMAX + IF( SMALL.GE.SFMIN ) THEN +* +* Use SMALL plus a bit, to avoid the possibility of rounding +* causing overflow when computing 1/sfmin. +* + SFMIN = SMALL*( ONE+EPS ) + END IF + END IF +* + IF( LSAME( CMACH, 'E' ) ) THEN + RMACH = EPS + ELSE IF( LSAME( CMACH, 'S' ) ) THEN + RMACH = SFMIN + ELSE IF( LSAME( CMACH, 'B' ) ) THEN + RMACH = BASE + ELSE IF( LSAME( CMACH, 'P' ) ) THEN + RMACH = PREC + ELSE IF( LSAME( CMACH, 'N' ) ) THEN + RMACH = T + ELSE IF( LSAME( CMACH, 'R' ) ) THEN + RMACH = RND + ELSE IF( LSAME( CMACH, 'M' ) ) THEN + RMACH = EMIN + ELSE IF( LSAME( CMACH, 'U' ) ) THEN + RMACH = RMIN + ELSE IF( LSAME( CMACH, 'L' ) ) THEN + RMACH = EMAX + ELSE IF( LSAME( CMACH, 'O' ) ) THEN + RMACH = RMAX + END IF +* + DLAMCH = RMACH + RETURN +* +* End of DLAMCH +* + END +* +************************************************************************ +* + SUBROUTINE DLAMC1( BETA, T, RND, IEEE1 ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL IEEE1, RND + INTEGER BETA, T +* .. +* +* Purpose +* ======= +* +* DLAMC1 determines the machine parameters given by BETA, T, RND, and +* IEEE1. +* +* Arguments +* ========= +* +* BETA (output) INTEGER +* The base of the machine. +* +* T (output) INTEGER +* The number of ( BETA ) digits in the mantissa. +* +* RND (output) LOGICAL +* Specifies whether proper rounding ( RND = .TRUE. ) or +* chopping ( RND = .FALSE. ) occurs in addition. This may not +* be a reliable guide to the way in which the machine performs +* its arithmetic. +* +* IEEE1 (output) LOGICAL +* Specifies whether rounding appears to be done in the IEEE +* 'round to nearest' style. +* +* Further Details +* =============== +* +* The routine is based on the routine ENVRON by Malcolm and +* incorporates suggestions by Gentleman and Marovich. See +* +* Malcolm M. A. (1972) Algorithms to reveal properties of +* floating-point arithmetic. Comms. of the ACM, 15, 949-951. +* +* Gentleman W. M. and Marovich S. B. (1974) More on algorithms +* that reveal properties of floating point arithmetic units. +* Comms. of the ACM, 17, 276-277. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL FIRST, LIEEE1, LRND + INTEGER LBETA, LT + DOUBLE PRECISION A, B, C, F, ONE, QTR, SAVEC, T1, T2 +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMC3 + EXTERNAL DLAMC3 +* .. +* .. Save statement .. + SAVE FIRST, LIEEE1, LBETA, LRND, LT +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + ONE = 1 +* +* LBETA, LIEEE1, LT and LRND are the local values of BETA, +* IEEE1, T and RND. +* +* Throughout this routine we use the function DLAMC3 to ensure +* that relevant values are stored and not held in registers, or +* are not affected by optimizers. +* +* Compute a = 2.0**m with the smallest positive integer m such +* that +* +* fl( a + 1.0 ) = a. +* + A = 1 + C = 1 +* +*+ WHILE( C.EQ.ONE )LOOP + 10 CONTINUE + IF( C.EQ.ONE ) THEN + A = 2*A + C = DLAMC3( A, ONE ) + C = DLAMC3( C, -A ) + GO TO 10 + END IF +*+ END WHILE +* +* Now compute b = 2.0**m with the smallest positive integer m +* such that +* +* fl( a + b ) .gt. a. +* + B = 1 + C = DLAMC3( A, B ) +* +*+ WHILE( C.EQ.A )LOOP + 20 CONTINUE + IF( C.EQ.A ) THEN + B = 2*B + C = DLAMC3( A, B ) + GO TO 20 + END IF +*+ END WHILE +* +* Now compute the base. a and c are neighbouring floating point +* numbers in the interval ( beta**t, beta**( t + 1 ) ) and so +* their difference is beta. Adding 0.25 to c is to ensure that it +* is truncated to beta and not ( beta - 1 ). +* + QTR = ONE / 4 + SAVEC = C + C = DLAMC3( C, -A ) + LBETA = C + QTR +* +* Now determine whether rounding or chopping occurs, by adding a +* bit less than beta/2 and a bit more than beta/2 to a. +* + B = LBETA + F = DLAMC3( B / 2, -B / 100 ) + C = DLAMC3( F, A ) + IF( C.EQ.A ) THEN + LRND = .TRUE. + ELSE + LRND = .FALSE. + END IF + F = DLAMC3( B / 2, B / 100 ) + C = DLAMC3( F, A ) + IF( ( LRND ) .AND. ( C.EQ.A ) ) + $ LRND = .FALSE. +* +* Try and decide whether rounding is done in the IEEE 'round to +* nearest' style. B/2 is half a unit in the last place of the two +* numbers A and SAVEC. Furthermore, A is even, i.e. has last bit +* zero, and SAVEC is odd. Thus adding B/2 to A should not change +* A, but adding B/2 to SAVEC should change SAVEC. +* + T1 = DLAMC3( B / 2, A ) + T2 = DLAMC3( B / 2, SAVEC ) + LIEEE1 = ( T1.EQ.A ) .AND. ( T2.GT.SAVEC ) .AND. LRND +* +* Now find the mantissa, t. It should be the integer part of +* log to the base beta of a, however it is safer to determine t +* by powering. So we find t as the smallest positive integer for +* which +* +* fl( beta**t + 1.0 ) = 1.0. +* + LT = 0 + A = 1 + C = 1 +* +*+ WHILE( C.EQ.ONE )LOOP + 30 CONTINUE + IF( C.EQ.ONE ) THEN + LT = LT + 1 + A = A*LBETA + C = DLAMC3( A, ONE ) + C = DLAMC3( C, -A ) + GO TO 30 + END IF +*+ END WHILE +* + END IF +* + BETA = LBETA + T = LT + RND = LRND + IEEE1 = LIEEE1 + RETURN +* +* End of DLAMC1 +* + END +* +************************************************************************ +* + SUBROUTINE DLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL RND + INTEGER BETA, EMAX, EMIN, T + DOUBLE PRECISION EPS, RMAX, RMIN +* .. +* +* Purpose +* ======= +* +* DLAMC2 determines the machine parameters specified in its argument +* list. +* +* Arguments +* ========= +* +* BETA (output) INTEGER +* The base of the machine. +* +* T (output) INTEGER +* The number of ( BETA ) digits in the mantissa. +* +* RND (output) LOGICAL +* Specifies whether proper rounding ( RND = .TRUE. ) or +* chopping ( RND = .FALSE. ) occurs in addition. This may not +* be a reliable guide to the way in which the machine performs +* its arithmetic. +* +* EPS (output) DOUBLE PRECISION +* The smallest positive number such that +* +* fl( 1.0 - EPS ) .LT. 1.0, +* +* where fl denotes the computed value. +* +* EMIN (output) INTEGER +* The minimum exponent before (gradual) underflow occurs. +* +* RMIN (output) DOUBLE PRECISION +* The smallest normalized number for the machine, given by +* BASE**( EMIN - 1 ), where BASE is the floating point value +* of BETA. +* +* EMAX (output) INTEGER +* The maximum exponent before overflow occurs. +* +* RMAX (output) DOUBLE PRECISION +* The largest positive number for the machine, given by +* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point +* value of BETA. +* +* Further Details +* =============== +* +* The computation of EPS is based on a routine PARANOIA by +* W. Kahan of the University of California at Berkeley. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL FIRST, IEEE, IWARN, LIEEE1, LRND + INTEGER GNMIN, GPMIN, I, LBETA, LEMAX, LEMIN, LT, + $ NGNMIN, NGPMIN + DOUBLE PRECISION A, B, C, HALF, LEPS, LRMAX, LRMIN, ONE, RBASE, + $ SIXTH, SMALL, THIRD, TWO, ZERO +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMC3 + EXTERNAL DLAMC3 +* .. +* .. External Subroutines .. + EXTERNAL DLAMC1, DLAMC4, DLAMC5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Save statement .. + SAVE FIRST, IWARN, LBETA, LEMAX, LEMIN, LEPS, LRMAX, + $ LRMIN, LT +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / , IWARN / .FALSE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + ZERO = 0 + ONE = 1 + TWO = 2 +* +* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values of +* BETA, T, RND, EPS, EMIN and RMIN. +* +* Throughout this routine we use the function DLAMC3 to ensure +* that relevant values are stored and not held in registers, or +* are not affected by optimizers. +* +* DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1. +* + CALL DLAMC1( LBETA, LT, LRND, LIEEE1 ) +* +* Start to find EPS. +* + B = LBETA + A = B**( -LT ) + LEPS = A +* +* Try some tricks to see whether or not this is the correct EPS. +* + B = TWO / 3 + HALF = ONE / 2 + SIXTH = DLAMC3( B, -HALF ) + THIRD = DLAMC3( SIXTH, SIXTH ) + B = DLAMC3( THIRD, -HALF ) + B = DLAMC3( B, SIXTH ) + B = ABS( B ) + IF( B.LT.LEPS ) + $ B = LEPS +* + LEPS = 1 +* +*+ WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP + 10 CONTINUE + IF( ( LEPS.GT.B ) .AND. ( B.GT.ZERO ) ) THEN + LEPS = B + C = DLAMC3( HALF*LEPS, ( TWO**5 )*( LEPS**2 ) ) + C = DLAMC3( HALF, -C ) + B = DLAMC3( HALF, C ) + C = DLAMC3( HALF, -B ) + B = DLAMC3( HALF, C ) + GO TO 10 + END IF +*+ END WHILE +* + IF( A.LT.LEPS ) + $ LEPS = A +* +* Computation of EPS complete. +* +* Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3)). +* Keep dividing A by BETA until (gradual) underflow occurs. This +* is detected when we cannot recover the previous A. +* + RBASE = ONE / LBETA + SMALL = ONE + DO 20 I = 1, 3 + SMALL = DLAMC3( SMALL*RBASE, ZERO ) + 20 CONTINUE + A = DLAMC3( ONE, SMALL ) + CALL DLAMC4( NGPMIN, ONE, LBETA ) + CALL DLAMC4( NGNMIN, -ONE, LBETA ) + CALL DLAMC4( GPMIN, A, LBETA ) + CALL DLAMC4( GNMIN, -A, LBETA ) + IEEE = .FALSE. +* + IF( ( NGPMIN.EQ.NGNMIN ) .AND. ( GPMIN.EQ.GNMIN ) ) THEN + IF( NGPMIN.EQ.GPMIN ) THEN + LEMIN = NGPMIN +* ( Non twos-complement machines, no gradual underflow; +* e.g., VAX ) + ELSE IF( ( GPMIN-NGPMIN ).EQ.3 ) THEN + LEMIN = NGPMIN - 1 + LT + IEEE = .TRUE. +* ( Non twos-complement machines, with gradual underflow; +* e.g., IEEE standard followers ) + ELSE + LEMIN = MIN( NGPMIN, GPMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE IF( ( NGPMIN.EQ.GPMIN ) .AND. ( NGNMIN.EQ.GNMIN ) ) THEN + IF( ABS( NGPMIN-NGNMIN ).EQ.1 ) THEN + LEMIN = MAX( NGPMIN, NGNMIN ) +* ( Twos-complement machines, no gradual underflow; +* e.g., CYBER 205 ) + ELSE + LEMIN = MIN( NGPMIN, NGNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE IF( ( ABS( NGPMIN-NGNMIN ).EQ.1 ) .AND. + $ ( GPMIN.EQ.GNMIN ) ) THEN + IF( ( GPMIN-MIN( NGPMIN, NGNMIN ) ).EQ.3 ) THEN + LEMIN = MAX( NGPMIN, NGNMIN ) - 1 + LT +* ( Twos-complement machines with gradual underflow; +* no known machine ) + ELSE + LEMIN = MIN( NGPMIN, NGNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE + LEMIN = MIN( NGPMIN, NGNMIN, GPMIN, GNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +*** +* Comment out this if block if EMIN is ok + IF( IWARN ) THEN + FIRST = .TRUE. + WRITE( 6, FMT = 9999 )LEMIN + END IF +*** +* +* Assume IEEE arithmetic if we found denormalised numbers above, +* or if arithmetic seems to round in the IEEE style, determined +* in routine DLAMC1. A true IEEE machine should have both things +* true; however, faulty machines may have one or the other. +* + IEEE = IEEE .OR. LIEEE1 +* +* Compute RMIN by successive division by BETA. We could compute +* RMIN as BASE**( EMIN - 1 ), but some machines underflow during +* this computation. +* + LRMIN = 1 + DO 30 I = 1, 1 - LEMIN + LRMIN = DLAMC3( LRMIN*RBASE, ZERO ) + 30 CONTINUE +* +* Finally, call DLAMC5 to compute EMAX and RMAX. +* + CALL DLAMC5( LBETA, LT, LEMIN, IEEE, LEMAX, LRMAX ) + END IF +* + BETA = LBETA + T = LT + RND = LRND + EPS = LEPS + EMIN = LEMIN + RMIN = LRMIN + EMAX = LEMAX + RMAX = LRMAX +* + RETURN +* + 9999 FORMAT( / / ' WARNING. The value EMIN may be incorrect:-', + $ ' EMIN = ', I8, / + $ ' If, after inspection, the value EMIN looks', + $ ' acceptable please comment out ', + $ / ' the IF block as marked within the code of routine', + $ ' DLAMC2,', / ' otherwise supply EMIN explicitly.', / ) +* +* End of DLAMC2 +* + END +* +************************************************************************ +* + DOUBLE PRECISION FUNCTION DLAMC3( A, B ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + DOUBLE PRECISION A, B +* .. +* +* Purpose +* ======= +* +* DLAMC3 is intended to force A and B to be stored prior to doing +* the addition of A and B , for use in situations where optimizers +* might hold one of these in a register. +* +* Arguments +* ========= +* +* A, B (input) DOUBLE PRECISION +* The values A and B. +* +* ===================================================================== +* +* .. Executable Statements .. +* + DLAMC3 = A + B +* + RETURN +* +* End of DLAMC3 +* + END +* +************************************************************************ +* + SUBROUTINE DLAMC4( EMIN, START, BASE ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + INTEGER BASE, EMIN + DOUBLE PRECISION START +* .. +* +* Purpose +* ======= +* +* DLAMC4 is a service routine for DLAMC2. +* +* Arguments +* ========= +* +* EMIN (output) EMIN +* The minimum exponent before (gradual) underflow, computed by +* setting A = START and dividing by BASE until the previous A +* can not be recovered. +* +* START (input) DOUBLE PRECISION +* The starting point for determining EMIN. +* +* BASE (input) INTEGER +* The base of the machine. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I + DOUBLE PRECISION A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMC3 + EXTERNAL DLAMC3 +* .. +* .. Executable Statements .. +* + A = START + ONE = 1 + RBASE = ONE / BASE + ZERO = 0 + EMIN = 1 + B1 = DLAMC3( A*RBASE, ZERO ) + C1 = A + C2 = A + D1 = A + D2 = A +*+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. +* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP + 10 CONTINUE + IF( ( C1.EQ.A ) .AND. ( C2.EQ.A ) .AND. ( D1.EQ.A ) .AND. + $ ( D2.EQ.A ) ) THEN + EMIN = EMIN - 1 + A = B1 + B1 = DLAMC3( A / BASE, ZERO ) + C1 = DLAMC3( B1*BASE, ZERO ) + D1 = ZERO + DO 20 I = 1, BASE + D1 = D1 + B1 + 20 CONTINUE + B2 = DLAMC3( A*RBASE, ZERO ) + C2 = DLAMC3( B2 / RBASE, ZERO ) + D2 = ZERO + DO 30 I = 1, BASE + D2 = D2 + B2 + 30 CONTINUE + GO TO 10 + END IF +*+ END WHILE +* + RETURN +* +* End of DLAMC4 +* + END +* +************************************************************************ +* + SUBROUTINE DLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL IEEE + INTEGER BETA, EMAX, EMIN, P + DOUBLE PRECISION RMAX +* .. +* +* Purpose +* ======= +* +* DLAMC5 attempts to compute RMAX, the largest machine floating-point +* number, without overflow. It assumes that EMAX + abs(EMIN) sum +* approximately to a power of 2. It will fail on machines where this +* assumption does not hold, for example, the Cyber 205 (EMIN = -28625, +* EMAX = 28718). It will also fail if the value supplied for EMIN is +* too large (i.e. too close to zero), probably with overflow. +* +* Arguments +* ========= +* +* BETA (input) INTEGER +* The base of floating-point arithmetic. +* +* P (input) INTEGER +* The number of base BETA digits in the mantissa of a +* floating-point value. +* +* EMIN (input) INTEGER +* The minimum exponent before (gradual) underflow. +* +* IEEE (input) LOGICAL +* A logical flag specifying whether or not the arithmetic +* system is thought to comply with the IEEE standard. +* +* EMAX (output) INTEGER +* The largest exponent before overflow +* +* RMAX (output) DOUBLE PRECISION +* The largest machine floating-point number. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + INTEGER EXBITS, EXPSUM, I, LEXP, NBITS, TRY, UEXP + DOUBLE PRECISION OLDY, RECBAS, Y, Z +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMC3 + EXTERNAL DLAMC3 +* .. +* .. Intrinsic Functions .. + INTRINSIC MOD +* .. +* .. Executable Statements .. +* +* First compute LEXP and UEXP, two powers of 2 that bound +* abs(EMIN). We then assume that EMAX + abs(EMIN) will sum +* approximately to the bound that is closest to abs(EMIN). +* (EMAX is the exponent of the required number RMAX). +* + LEXP = 1 + EXBITS = 1 + 10 CONTINUE + TRY = LEXP*2 + IF( TRY.LE.( -EMIN ) ) THEN + LEXP = TRY + EXBITS = EXBITS + 1 + GO TO 10 + END IF + IF( LEXP.EQ.-EMIN ) THEN + UEXP = LEXP + ELSE + UEXP = TRY + EXBITS = EXBITS + 1 + END IF +* +* Now -LEXP is less than or equal to EMIN, and -UEXP is greater +* than or equal to EMIN. EXBITS is the number of bits needed to +* store the exponent. +* + IF( ( UEXP+EMIN ).GT.( -LEXP-EMIN ) ) THEN + EXPSUM = 2*LEXP + ELSE + EXPSUM = 2*UEXP + END IF +* +* EXPSUM is the exponent range, approximately equal to +* EMAX - EMIN + 1 . +* + EMAX = EXPSUM + EMIN - 1 + NBITS = 1 + EXBITS + P +* +* NBITS is the total number of bits needed to store a +* floating-point number. +* + IF( ( MOD( NBITS, 2 ).EQ.1 ) .AND. ( BETA.EQ.2 ) ) THEN +* +* Either there are an odd number of bits used to store a +* floating-point number, which is unlikely, or some bits are +* not used in the representation of numbers, which is possible, +* (e.g. Cray machines) or the mantissa has an implicit bit, +* (e.g. IEEE machines, Dec Vax machines), which is perhaps the +* most likely. We have to assume the last alternative. +* If this is true, then we need to reduce EMAX by one because +* there must be some way of representing zero in an implicit-bit +* system. On machines like Cray, we are reducing EMAX by one +* unnecessarily. +* + EMAX = EMAX - 1 + END IF +* + IF( IEEE ) THEN +* +* Assume we are on an IEEE machine which reserves one exponent +* for infinity and NaN. +* + EMAX = EMAX - 1 + END IF +* +* Now create RMAX, the largest machine number, which should +* be equal to (1.0 - BETA**(-P)) * BETA**EMAX . +* +* First compute 1.0 - BETA**(-P), being careful that the +* result is less than 1.0 . +* + RECBAS = ONE / BETA + Z = BETA - ONE + Y = ZERO + DO 20 I = 1, P + Z = Z*RECBAS + IF( Y.LT.ONE ) + $ OLDY = Y + Y = DLAMC3( Y, Z ) + 20 CONTINUE + IF( Y.GE.ONE ) + $ Y = OLDY +* +* Now multiply by BETA**EMAX to get RMAX. +* + DO 30 I = 1, EMAX + Y = DLAMC3( Y*BETA, ZERO ) + 30 CONTINUE +* + RMAX = Y + RETURN +* +* End of DLAMC5 +* + END diff --git a/2.3-1/src/fortran/lapack/dlange.f b/2.3-1/src/fortran/lapack/dlange.f new file mode 100644 index 00000000..fec96ac7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlange.f @@ -0,0 +1,144 @@ + DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLANGE returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* real matrix A. +* +* Description +* =========== +* +* DLANGE returns the value +* +* DLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANGE as described +* above. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. When M = 0, +* DLANGE is set to zero. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. When N = 0, +* DLANGE is set to zero. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The m by n matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(M,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= M when NORM = 'I'; otherwise, WORK is not +* referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION SCALE, SUM, VALUE +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + IF( MIN( M, N ).EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + DO 20 J = 1, N + DO 10 I = 1, M + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN +* +* Find norm1(A). +* + VALUE = ZERO + DO 40 J = 1, N + SUM = ZERO + DO 30 I = 1, M + SUM = SUM + ABS( A( I, J ) ) + 30 CONTINUE + VALUE = MAX( VALUE, SUM ) + 40 CONTINUE + ELSE IF( LSAME( NORM, 'I' ) ) THEN +* +* Find normI(A). +* + DO 50 I = 1, M + WORK( I ) = ZERO + 50 CONTINUE + DO 70 J = 1, N + DO 60 I = 1, M + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 60 CONTINUE + 70 CONTINUE + VALUE = ZERO + DO 80 I = 1, M + VALUE = MAX( VALUE, WORK( I ) ) + 80 CONTINUE + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + DO 90 J = 1, N + CALL DLASSQ( M, A( 1, J ), 1, SCALE, SUM ) + 90 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + DLANGE = VALUE + RETURN +* +* End of DLANGE +* + END diff --git a/2.3-1/src/fortran/lapack/dlanhs.f b/2.3-1/src/fortran/lapack/dlanhs.f new file mode 100644 index 00000000..76b87eeb --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlanhs.f @@ -0,0 +1,141 @@ + DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLANHS returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* Hessenberg matrix A. +* +* Description +* =========== +* +* DLANHS returns the value +* +* DLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANHS as described +* above. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, DLANHS is +* set to zero. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The n by n upper Hessenberg matrix A; the part of A below the +* first sub-diagonal is not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(N,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= N when NORM = 'I'; otherwise, WORK is not +* referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION SCALE, SUM, VALUE +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + IF( N.EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + DO 20 J = 1, N + DO 10 I = 1, MIN( N, J+1 ) + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN +* +* Find norm1(A). +* + VALUE = ZERO + DO 40 J = 1, N + SUM = ZERO + DO 30 I = 1, MIN( N, J+1 ) + SUM = SUM + ABS( A( I, J ) ) + 30 CONTINUE + VALUE = MAX( VALUE, SUM ) + 40 CONTINUE + ELSE IF( LSAME( NORM, 'I' ) ) THEN +* +* Find normI(A). +* + DO 50 I = 1, N + WORK( I ) = ZERO + 50 CONTINUE + DO 70 J = 1, N + DO 60 I = 1, MIN( N, J+1 ) + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 60 CONTINUE + 70 CONTINUE + VALUE = ZERO + DO 80 I = 1, N + VALUE = MAX( VALUE, WORK( I ) ) + 80 CONTINUE + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + DO 90 J = 1, N + CALL DLASSQ( MIN( N, J+1 ), A( 1, J ), 1, SCALE, SUM ) + 90 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + DLANHS = VALUE + RETURN +* +* End of DLANHS +* + END diff --git a/2.3-1/src/fortran/lapack/dlansp.f b/2.3-1/src/fortran/lapack/dlansp.f new file mode 100644 index 00000000..ab221006 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlansp.f @@ -0,0 +1,196 @@ + DOUBLE PRECISION FUNCTION DLANSP( NORM, UPLO, N, AP, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM, UPLO + INTEGER N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLANSP returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* real symmetric matrix A, supplied in packed form. +* +* Description +* =========== +* +* DLANSP returns the value +* +* DLANSP = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANSP as described +* above. +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is supplied. +* = 'U': Upper triangular part of A is supplied +* = 'L': Lower triangular part of A is supplied +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, DLANSP is +* set to zero. +* +* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* The upper or lower triangle of the symmetric matrix A, packed +* columnwise in a linear array. The j-th column of A is stored +* in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, +* WORK is not referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J, K + DOUBLE PRECISION ABSA, SCALE, SUM, VALUE +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + IF( N.EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + K = 1 + DO 20 J = 1, N + DO 10 I = K, K + J - 1 + VALUE = MAX( VALUE, ABS( AP( I ) ) ) + 10 CONTINUE + K = K + J + 20 CONTINUE + ELSE + K = 1 + DO 40 J = 1, N + DO 30 I = K, K + N - J + VALUE = MAX( VALUE, ABS( AP( I ) ) ) + 30 CONTINUE + K = K + N - J + 1 + 40 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR. + $ ( NORM.EQ.'1' ) ) THEN +* +* Find normI(A) ( = norm1(A), since A is symmetric). +* + VALUE = ZERO + K = 1 + IF( LSAME( UPLO, 'U' ) ) THEN + DO 60 J = 1, N + SUM = ZERO + DO 50 I = 1, J - 1 + ABSA = ABS( AP( K ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + K = K + 1 + 50 CONTINUE + WORK( J ) = SUM + ABS( AP( K ) ) + K = K + 1 + 60 CONTINUE + DO 70 I = 1, N + VALUE = MAX( VALUE, WORK( I ) ) + 70 CONTINUE + ELSE + DO 80 I = 1, N + WORK( I ) = ZERO + 80 CONTINUE + DO 100 J = 1, N + SUM = WORK( J ) + ABS( AP( K ) ) + K = K + 1 + DO 90 I = J + 1, N + ABSA = ABS( AP( K ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + K = K + 1 + 90 CONTINUE + VALUE = MAX( VALUE, SUM ) + 100 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + K = 2 + IF( LSAME( UPLO, 'U' ) ) THEN + DO 110 J = 2, N + CALL DLASSQ( J-1, AP( K ), 1, SCALE, SUM ) + K = K + J + 110 CONTINUE + ELSE + DO 120 J = 1, N - 1 + CALL DLASSQ( N-J, AP( K ), 1, SCALE, SUM ) + K = K + N - J + 1 + 120 CONTINUE + END IF + SUM = 2*SUM + K = 1 + DO 130 I = 1, N + IF( AP( K ).NE.ZERO ) THEN + ABSA = ABS( AP( K ) ) + IF( SCALE.LT.ABSA ) THEN + SUM = ONE + SUM*( SCALE / ABSA )**2 + SCALE = ABSA + ELSE + SUM = SUM + ( ABSA / SCALE )**2 + END IF + END IF + IF( LSAME( UPLO, 'U' ) ) THEN + K = K + I + 1 + ELSE + K = K + N - I + 1 + END IF + 130 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + DLANSP = VALUE + RETURN +* +* End of DLANSP +* + END diff --git a/2.3-1/src/fortran/lapack/dlanst.f b/2.3-1/src/fortran/lapack/dlanst.f new file mode 100644 index 00000000..2b12091a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlanst.f @@ -0,0 +1,124 @@ + DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) +* .. +* +* Purpose +* ======= +* +* DLANST returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* real symmetric tridiagonal matrix A. +* +* Description +* =========== +* +* DLANST returns the value +* +* DLANST = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANST as described +* above. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, DLANST is +* set to zero. +* +* D (input) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of A. +* +* E (input) DOUBLE PRECISION array, dimension (N-1) +* The (n-1) sub-diagonal or super-diagonal elements of A. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I + DOUBLE PRECISION ANORM, SCALE, SUM +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + IF( N.LE.0 ) THEN + ANORM = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + ANORM = ABS( D( N ) ) + DO 10 I = 1, N - 1 + ANORM = MAX( ANORM, ABS( D( I ) ) ) + ANORM = MAX( ANORM, ABS( E( I ) ) ) + 10 CONTINUE + ELSE IF( LSAME( NORM, 'O' ) .OR. NORM.EQ.'1' .OR. + $ LSAME( NORM, 'I' ) ) THEN +* +* Find norm1(A). +* + IF( N.EQ.1 ) THEN + ANORM = ABS( D( 1 ) ) + ELSE + ANORM = MAX( ABS( D( 1 ) )+ABS( E( 1 ) ), + $ ABS( E( N-1 ) )+ABS( D( N ) ) ) + DO 20 I = 2, N - 1 + ANORM = MAX( ANORM, ABS( D( I ) )+ABS( E( I ) )+ + $ ABS( E( I-1 ) ) ) + 20 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + IF( N.GT.1 ) THEN + CALL DLASSQ( N-1, E, 1, SCALE, SUM ) + SUM = 2*SUM + END IF + CALL DLASSQ( N, D, 1, SCALE, SUM ) + ANORM = SCALE*SQRT( SUM ) + END IF +* + DLANST = ANORM + RETURN +* +* End of DLANST +* + END diff --git a/2.3-1/src/fortran/lapack/dlansy.f b/2.3-1/src/fortran/lapack/dlansy.f new file mode 100644 index 00000000..b6c727c0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlansy.f @@ -0,0 +1,173 @@ + DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM, UPLO + INTEGER LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLANSY returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* real symmetric matrix A. +* +* Description +* =========== +* +* DLANSY returns the value +* +* DLANSY = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANSY as described +* above. +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is to be referenced. +* = 'U': Upper triangular part of A is referenced +* = 'L': Lower triangular part of A is referenced +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, DLANSY is +* set to zero. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The symmetric matrix A. If UPLO = 'U', the leading n by n +* upper triangular part of A contains the upper triangular part +* of the matrix A, and the strictly lower triangular part of A +* is not referenced. If UPLO = 'L', the leading n by n lower +* triangular part of A contains the lower triangular part of +* the matrix A, and the strictly upper triangular part of A is +* not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(N,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, +* WORK is not referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION ABSA, SCALE, SUM, VALUE +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + IF( N.EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, J + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40 J = 1, N + DO 30 I = J, N + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR. + $ ( NORM.EQ.'1' ) ) THEN +* +* Find normI(A) ( = norm1(A), since A is symmetric). +* + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + DO 60 J = 1, N + SUM = ZERO + DO 50 I = 1, J - 1 + ABSA = ABS( A( I, J ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + 50 CONTINUE + WORK( J ) = SUM + ABS( A( J, J ) ) + 60 CONTINUE + DO 70 I = 1, N + VALUE = MAX( VALUE, WORK( I ) ) + 70 CONTINUE + ELSE + DO 80 I = 1, N + WORK( I ) = ZERO + 80 CONTINUE + DO 100 J = 1, N + SUM = WORK( J ) + ABS( A( J, J ) ) + DO 90 I = J + 1, N + ABSA = ABS( A( I, J ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + 90 CONTINUE + VALUE = MAX( VALUE, SUM ) + 100 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + IF( LSAME( UPLO, 'U' ) ) THEN + DO 110 J = 2, N + CALL DLASSQ( J-1, A( 1, J ), 1, SCALE, SUM ) + 110 CONTINUE + ELSE + DO 120 J = 1, N - 1 + CALL DLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM ) + 120 CONTINUE + END IF + SUM = 2*SUM + CALL DLASSQ( N, A, LDA+1, SCALE, SUM ) + VALUE = SCALE*SQRT( SUM ) + END IF +* + DLANSY = VALUE + RETURN +* +* End of DLANSY +* + END diff --git a/2.3-1/src/fortran/lapack/dlantr.f b/2.3-1/src/fortran/lapack/dlantr.f new file mode 100644 index 00000000..92debd3d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlantr.f @@ -0,0 +1,276 @@ + DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA, + $ WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, NORM, UPLO + INTEGER LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLANTR returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* trapezoidal or triangular matrix A. +* +* Description +* =========== +* +* DLANTR returns the value +* +* DLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in DLANTR as described +* above. +* +* UPLO (input) CHARACTER*1 +* Specifies whether the matrix A is upper or lower trapezoidal. +* = 'U': Upper trapezoidal +* = 'L': Lower trapezoidal +* Note that A is triangular instead of trapezoidal if M = N. +* +* DIAG (input) CHARACTER*1 +* Specifies whether or not the matrix A has unit diagonal. +* = 'N': Non-unit diagonal +* = 'U': Unit diagonal +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0, and if +* UPLO = 'U', M <= N. When M = 0, DLANTR is set to zero. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0, and if +* UPLO = 'L', N <= M. When N = 0, DLANTR is set to zero. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The trapezoidal matrix A (A is triangular if M = N). +* If UPLO = 'U', the leading m by n upper trapezoidal part of +* the array A contains the upper trapezoidal matrix, and the +* strictly lower triangular part of A is not referenced. +* If UPLO = 'L', the leading m by n lower trapezoidal part of +* the array A contains the lower trapezoidal matrix, and the +* strictly upper triangular part of A is not referenced. Note +* that when DIAG = 'U', the diagonal elements of A are not +* referenced and are assumed to be one. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(M,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= M when NORM = 'I'; otherwise, WORK is not +* referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UDIAG + INTEGER I, J + DOUBLE PRECISION SCALE, SUM, VALUE +* .. +* .. External Subroutines .. + EXTERNAL DLASSQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + IF( MIN( M, N ).EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + IF( LSAME( DIAG, 'U' ) ) THEN + VALUE = ONE + IF( LSAME( UPLO, 'U' ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, MIN( M, J-1 ) + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE + DO 40 J = 1, N + DO 30 I = J + 1, M + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + DO 60 J = 1, N + DO 50 I = 1, MIN( M, J ) + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 50 CONTINUE + 60 CONTINUE + ELSE + DO 80 J = 1, N + DO 70 I = J, M + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 70 CONTINUE + 80 CONTINUE + END IF + END IF + ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN +* +* Find norm1(A). +* + VALUE = ZERO + UDIAG = LSAME( DIAG, 'U' ) + IF( LSAME( UPLO, 'U' ) ) THEN + DO 110 J = 1, N + IF( ( UDIAG ) .AND. ( J.LE.M ) ) THEN + SUM = ONE + DO 90 I = 1, J - 1 + SUM = SUM + ABS( A( I, J ) ) + 90 CONTINUE + ELSE + SUM = ZERO + DO 100 I = 1, MIN( M, J ) + SUM = SUM + ABS( A( I, J ) ) + 100 CONTINUE + END IF + VALUE = MAX( VALUE, SUM ) + 110 CONTINUE + ELSE + DO 140 J = 1, N + IF( UDIAG ) THEN + SUM = ONE + DO 120 I = J + 1, M + SUM = SUM + ABS( A( I, J ) ) + 120 CONTINUE + ELSE + SUM = ZERO + DO 130 I = J, M + SUM = SUM + ABS( A( I, J ) ) + 130 CONTINUE + END IF + VALUE = MAX( VALUE, SUM ) + 140 CONTINUE + END IF + ELSE IF( LSAME( NORM, 'I' ) ) THEN +* +* Find normI(A). +* + IF( LSAME( UPLO, 'U' ) ) THEN + IF( LSAME( DIAG, 'U' ) ) THEN + DO 150 I = 1, M + WORK( I ) = ONE + 150 CONTINUE + DO 170 J = 1, N + DO 160 I = 1, MIN( M, J-1 ) + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 160 CONTINUE + 170 CONTINUE + ELSE + DO 180 I = 1, M + WORK( I ) = ZERO + 180 CONTINUE + DO 200 J = 1, N + DO 190 I = 1, MIN( M, J ) + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 190 CONTINUE + 200 CONTINUE + END IF + ELSE + IF( LSAME( DIAG, 'U' ) ) THEN + DO 210 I = 1, N + WORK( I ) = ONE + 210 CONTINUE + DO 220 I = N + 1, M + WORK( I ) = ZERO + 220 CONTINUE + DO 240 J = 1, N + DO 230 I = J + 1, M + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 230 CONTINUE + 240 CONTINUE + ELSE + DO 250 I = 1, M + WORK( I ) = ZERO + 250 CONTINUE + DO 270 J = 1, N + DO 260 I = J, M + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 260 CONTINUE + 270 CONTINUE + END IF + END IF + VALUE = ZERO + DO 280 I = 1, M + VALUE = MAX( VALUE, WORK( I ) ) + 280 CONTINUE + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + IF( LSAME( UPLO, 'U' ) ) THEN + IF( LSAME( DIAG, 'U' ) ) THEN + SCALE = ONE + SUM = MIN( M, N ) + DO 290 J = 2, N + CALL DLASSQ( MIN( M, J-1 ), A( 1, J ), 1, SCALE, SUM ) + 290 CONTINUE + ELSE + SCALE = ZERO + SUM = ONE + DO 300 J = 1, N + CALL DLASSQ( MIN( M, J ), A( 1, J ), 1, SCALE, SUM ) + 300 CONTINUE + END IF + ELSE + IF( LSAME( DIAG, 'U' ) ) THEN + SCALE = ONE + SUM = MIN( M, N ) + DO 310 J = 1, N + CALL DLASSQ( M-J, A( MIN( M, J+1 ), J ), 1, SCALE, + $ SUM ) + 310 CONTINUE + ELSE + SCALE = ZERO + SUM = ONE + DO 320 J = 1, N + CALL DLASSQ( M-J+1, A( J, J ), 1, SCALE, SUM ) + 320 CONTINUE + END IF + END IF + VALUE = SCALE*SQRT( SUM ) + END IF +* + DLANTR = VALUE + RETURN +* +* End of DLANTR +* + END diff --git a/2.3-1/src/fortran/lapack/dlanv2.f b/2.3-1/src/fortran/lapack/dlanv2.f new file mode 100644 index 00000000..cef3f472 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlanv2.f @@ -0,0 +1,205 @@ + SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN +* .. +* +* Purpose +* ======= +* +* DLANV2 computes the Schur factorization of a real 2-by-2 nonsymmetric +* matrix in standard form: +* +* [ A B ] = [ CS -SN ] [ AA BB ] [ CS SN ] +* [ C D ] [ SN CS ] [ CC DD ] [-SN CS ] +* +* where either +* 1) CC = 0 so that AA and DD are real eigenvalues of the matrix, or +* 2) AA = DD and BB*CC < 0, so that AA + or - sqrt(BB*CC) are complex +* conjugate eigenvalues. +* +* Arguments +* ========= +* +* A (input/output) DOUBLE PRECISION +* B (input/output) DOUBLE PRECISION +* C (input/output) DOUBLE PRECISION +* D (input/output) DOUBLE PRECISION +* On entry, the elements of the input matrix. +* On exit, they are overwritten by the elements of the +* standardised Schur form. +* +* RT1R (output) DOUBLE PRECISION +* RT1I (output) DOUBLE PRECISION +* RT2R (output) DOUBLE PRECISION +* RT2I (output) DOUBLE PRECISION +* The real and imaginary parts of the eigenvalues. If the +* eigenvalues are a complex conjugate pair, RT1I > 0. +* +* CS (output) DOUBLE PRECISION +* SN (output) DOUBLE PRECISION +* Parameters of the rotation matrix. +* +* Further Details +* =============== +* +* Modified by V. Sima, Research Institute for Informatics, Bucharest, +* Romania, to reduce the risk of cancellation errors, +* when computing real eigenvalues, and to ensure, if possible, that +* abs(RT1R) >= abs(RT2R). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, HALF, ONE + PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION MULTPL + PARAMETER ( MULTPL = 4.0D+0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, BB, BCMAX, BCMIS, CC, CS1, DD, EPS, P, SAB, + $ SAC, SCALE, SIGMA, SN1, TAU, TEMP, Z +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLAPY2 + EXTERNAL DLAMCH, DLAPY2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SIGN, SQRT +* .. +* .. Executable Statements .. +* + EPS = DLAMCH( 'P' ) + IF( C.EQ.ZERO ) THEN + CS = ONE + SN = ZERO + GO TO 10 +* + ELSE IF( B.EQ.ZERO ) THEN +* +* Swap rows and columns +* + CS = ZERO + SN = ONE + TEMP = D + D = A + A = TEMP + B = -C + C = ZERO + GO TO 10 + ELSE IF( ( A-D ).EQ.ZERO .AND. SIGN( ONE, B ).NE.SIGN( ONE, C ) ) + $ THEN + CS = ONE + SN = ZERO + GO TO 10 + ELSE +* + TEMP = A - D + P = HALF*TEMP + BCMAX = MAX( ABS( B ), ABS( C ) ) + BCMIS = MIN( ABS( B ), ABS( C ) )*SIGN( ONE, B )*SIGN( ONE, C ) + SCALE = MAX( ABS( P ), BCMAX ) + Z = ( P / SCALE )*P + ( BCMAX / SCALE )*BCMIS +* +* If Z is of the order of the machine accuracy, postpone the +* decision on the nature of eigenvalues +* + IF( Z.GE.MULTPL*EPS ) THEN +* +* Real eigenvalues. Compute A and D. +* + Z = P + SIGN( SQRT( SCALE )*SQRT( Z ), P ) + A = D + Z + D = D - ( BCMAX / Z )*BCMIS +* +* Compute B and the rotation matrix +* + TAU = DLAPY2( C, Z ) + CS = Z / TAU + SN = C / TAU + B = B - C + C = ZERO + ELSE +* +* Complex eigenvalues, or real (almost) equal eigenvalues. +* Make diagonal elements equal. +* + SIGMA = B + C + TAU = DLAPY2( SIGMA, TEMP ) + CS = SQRT( HALF*( ONE+ABS( SIGMA ) / TAU ) ) + SN = -( P / ( TAU*CS ) )*SIGN( ONE, SIGMA ) +* +* Compute [ AA BB ] = [ A B ] [ CS -SN ] +* [ CC DD ] [ C D ] [ SN CS ] +* + AA = A*CS + B*SN + BB = -A*SN + B*CS + CC = C*CS + D*SN + DD = -C*SN + D*CS +* +* Compute [ A B ] = [ CS SN ] [ AA BB ] +* [ C D ] [-SN CS ] [ CC DD ] +* + A = AA*CS + CC*SN + B = BB*CS + DD*SN + C = -AA*SN + CC*CS + D = -BB*SN + DD*CS +* + TEMP = HALF*( A+D ) + A = TEMP + D = TEMP +* + IF( C.NE.ZERO ) THEN + IF( B.NE.ZERO ) THEN + IF( SIGN( ONE, B ).EQ.SIGN( ONE, C ) ) THEN +* +* Real eigenvalues: reduce to upper triangular form +* + SAB = SQRT( ABS( B ) ) + SAC = SQRT( ABS( C ) ) + P = SIGN( SAB*SAC, C ) + TAU = ONE / SQRT( ABS( B+C ) ) + A = TEMP + P + D = TEMP - P + B = B - C + C = ZERO + CS1 = SAB*TAU + SN1 = SAC*TAU + TEMP = CS*CS1 - SN*SN1 + SN = CS*SN1 + SN*CS1 + CS = TEMP + END IF + ELSE + B = -C + C = ZERO + TEMP = CS + CS = -SN + SN = TEMP + END IF + END IF + END IF +* + END IF +* + 10 CONTINUE +* +* Store eigenvalues in (RT1R,RT1I) and (RT2R,RT2I). +* + RT1R = A + RT2R = D + IF( C.EQ.ZERO ) THEN + RT1I = ZERO + RT2I = ZERO + ELSE + RT1I = SQRT( ABS( B ) )*SQRT( ABS( C ) ) + RT2I = -RT1I + END IF + RETURN +* +* End of DLANV2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlapmt.f b/2.3-1/src/fortran/lapack/dlapmt.f new file mode 100644 index 00000000..325774c0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlapmt.f @@ -0,0 +1,136 @@ + SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL FORWRD + INTEGER LDX, M, N +* .. +* .. Array Arguments .. + INTEGER K( * ) + DOUBLE PRECISION X( LDX, * ) +* .. +* +* Purpose +* ======= +* +* DLAPMT rearranges the columns of the M by N matrix X as specified +* by the permutation K(1),K(2),...,K(N) of the integers 1,...,N. +* If FORWRD = .TRUE., forward permutation: +* +* X(*,K(J)) is moved X(*,J) for J = 1,2,...,N. +* +* If FORWRD = .FALSE., backward permutation: +* +* X(*,J) is moved to X(*,K(J)) for J = 1,2,...,N. +* +* Arguments +* ========= +* +* FORWRD (input) LOGICAL +* = .TRUE., forward permutation +* = .FALSE., backward permutation +* +* M (input) INTEGER +* The number of rows of the matrix X. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix X. N >= 0. +* +* X (input/output) DOUBLE PRECISION array, dimension (LDX,N) +* On entry, the M by N matrix X. +* On exit, X contains the permuted matrix X. +* +* LDX (input) INTEGER +* The leading dimension of the array X, LDX >= MAX(1,M). +* +* K (input/output) INTEGER array, dimension (N) +* On entry, K contains the permutation vector. K is used as +* internal workspace, but reset to its original value on +* output. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, II, IN, J + DOUBLE PRECISION TEMP +* .. +* .. Executable Statements .. +* + IF( N.LE.1 ) + $ RETURN +* + DO 10 I = 1, N + K( I ) = -K( I ) + 10 CONTINUE +* + IF( FORWRD ) THEN +* +* Forward permutation +* + DO 50 I = 1, N +* + IF( K( I ).GT.0 ) + $ GO TO 40 +* + J = I + K( J ) = -K( J ) + IN = K( J ) +* + 20 CONTINUE + IF( K( IN ).GT.0 ) + $ GO TO 40 +* + DO 30 II = 1, M + TEMP = X( II, J ) + X( II, J ) = X( II, IN ) + X( II, IN ) = TEMP + 30 CONTINUE +* + K( IN ) = -K( IN ) + J = IN + IN = K( IN ) + GO TO 20 +* + 40 CONTINUE +* + 50 CONTINUE +* + ELSE +* +* Backward permutation +* + DO 90 I = 1, N +* + IF( K( I ).GT.0 ) + $ GO TO 80 +* + K( I ) = -K( I ) + J = K( I ) + 60 CONTINUE + IF( J.EQ.I ) + $ GO TO 80 +* + DO 70 II = 1, M + TEMP = X( II, I ) + X( II, I ) = X( II, J ) + X( II, J ) = TEMP + 70 CONTINUE +* + K( J ) = -K( J ) + J = K( J ) + GO TO 60 +* + 80 CONTINUE +* + 90 CONTINUE +* + END IF +* + RETURN +* +* End of DLAPMT +* + END diff --git a/2.3-1/src/fortran/lapack/dlapy2.f b/2.3-1/src/fortran/lapack/dlapy2.f new file mode 100644 index 00000000..98ef81b6 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlapy2.f @@ -0,0 +1,53 @@ + DOUBLE PRECISION FUNCTION DLAPY2( X, Y ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION X, Y +* .. +* +* Purpose +* ======= +* +* DLAPY2 returns sqrt(x**2+y**2), taking care not to cause unnecessary +* overflow. +* +* Arguments +* ========= +* +* X (input) DOUBLE PRECISION +* Y (input) DOUBLE PRECISION +* X and Y specify the values x and y. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION W, XABS, YABS, Z +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + XABS = ABS( X ) + YABS = ABS( Y ) + W = MAX( XABS, YABS ) + Z = MIN( XABS, YABS ) + IF( Z.EQ.ZERO ) THEN + DLAPY2 = W + ELSE + DLAPY2 = W*SQRT( ONE+( Z / W )**2 ) + END IF + RETURN +* +* End of DLAPY2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlapy3.f b/2.3-1/src/fortran/lapack/dlapy3.f new file mode 100644 index 00000000..2b47bb47 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlapy3.f @@ -0,0 +1,56 @@ + DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION X, Y, Z +* .. +* +* Purpose +* ======= +* +* DLAPY3 returns sqrt(x**2+y**2+z**2), taking care not to cause +* unnecessary overflow. +* +* Arguments +* ========= +* +* X (input) DOUBLE PRECISION +* Y (input) DOUBLE PRECISION +* Z (input) DOUBLE PRECISION +* X, Y and Z specify the values x, y and z. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION W, XABS, YABS, ZABS +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + XABS = ABS( X ) + YABS = ABS( Y ) + ZABS = ABS( Z ) + W = MAX( XABS, YABS, ZABS ) + IF( W.EQ.ZERO ) THEN +* W can be zero for max(0,nan,0) +* adding all three entries together will make sure +* NaN will not disappear. + DLAPY3 = XABS + YABS + ZABS + ELSE + DLAPY3 = W*SQRT( ( XABS / W )**2+( YABS / W )**2+ + $ ( ZABS / W )**2 ) + END IF + RETURN +* +* End of DLAPY3 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqge.f b/2.3-1/src/fortran/lapack/dlaqge.f new file mode 100644 index 00000000..9feb927c --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqge.f @@ -0,0 +1,154 @@ + SUBROUTINE DLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, + $ EQUED ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER EQUED + INTEGER LDA, M, N + DOUBLE PRECISION AMAX, COLCND, ROWCND +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( * ), R( * ) +* .. +* +* Purpose +* ======= +* +* DLAQGE equilibrates a general M by N matrix A using the row and +* column scaling factors in the vectors R and C. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M by N matrix A. +* On exit, the equilibrated matrix. See EQUED for the form of +* the equilibrated matrix. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(M,1). +* +* R (input) DOUBLE PRECISION array, dimension (M) +* The row scale factors for A. +* +* C (input) DOUBLE PRECISION array, dimension (N) +* The column scale factors for A. +* +* ROWCND (input) DOUBLE PRECISION +* Ratio of the smallest R(i) to the largest R(i). +* +* COLCND (input) DOUBLE PRECISION +* Ratio of the smallest C(i) to the largest C(i). +* +* AMAX (input) DOUBLE PRECISION +* Absolute value of largest matrix entry. +* +* EQUED (output) CHARACTER*1 +* Specifies the form of equilibration that was done. +* = 'N': No equilibration +* = 'R': Row equilibration, i.e., A has been premultiplied by +* diag(R). +* = 'C': Column equilibration, i.e., A has been postmultiplied +* by diag(C). +* = 'B': Both row and column equilibration, i.e., A has been +* replaced by diag(R) * A * diag(C). +* +* Internal Parameters +* =================== +* +* THRESH is a threshold value used to decide if row or column scaling +* should be done based on the ratio of the row or column scaling +* factors. If ROWCND < THRESH, row scaling is done, and if +* COLCND < THRESH, column scaling is done. +* +* LARGE and SMALL are threshold values used to decide if row scaling +* should be done based on the absolute size of the largest matrix +* element. If AMAX > LARGE or AMAX < SMALL, row scaling is done. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, THRESH + PARAMETER ( ONE = 1.0D+0, THRESH = 0.1D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION CJ, LARGE, SMALL +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) THEN + EQUED = 'N' + RETURN + END IF +* +* Initialize LARGE and SMALL. +* + SMALL = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' ) + LARGE = ONE / SMALL +* + IF( ROWCND.GE.THRESH .AND. AMAX.GE.SMALL .AND. AMAX.LE.LARGE ) + $ THEN +* +* No row scaling +* + IF( COLCND.GE.THRESH ) THEN +* +* No column scaling +* + EQUED = 'N' + ELSE +* +* Column scaling +* + DO 20 J = 1, N + CJ = C( J ) + DO 10 I = 1, M + A( I, J ) = CJ*A( I, J ) + 10 CONTINUE + 20 CONTINUE + EQUED = 'C' + END IF + ELSE IF( COLCND.GE.THRESH ) THEN +* +* Row scaling, no column scaling +* + DO 40 J = 1, N + DO 30 I = 1, M + A( I, J ) = R( I )*A( I, J ) + 30 CONTINUE + 40 CONTINUE + EQUED = 'R' + ELSE +* +* Row and column scaling +* + DO 60 J = 1, N + CJ = C( J ) + DO 50 I = 1, M + A( I, J ) = CJ*R( I )*A( I, J ) + 50 CONTINUE + 60 CONTINUE + EQUED = 'B' + END IF +* + RETURN +* +* End of DLAQGE +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqp2.f b/2.3-1/src/fortran/lapack/dlaqp2.f new file mode 100644 index 00000000..5ce3b162 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqp2.f @@ -0,0 +1,175 @@ + SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2, + $ WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, M, N, OFFSET +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), TAU( * ), VN1( * ), VN2( * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLAQP2 computes a QR factorization with column pivoting of +* the block A(OFFSET+1:M,1:N). +* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* OFFSET (input) INTEGER +* The number of rows of the matrix A that must be pivoted +* but no factorized. OFFSET >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is +* the triangular factor obtained; the elements in block +* A(OFFSET+1:M,1:N) below the diagonal, together with the +* array TAU, represent the orthogonal matrix Q as a product of +* elementary reflectors. Block A(1:OFFSET,1:N) has been +* accordingly pivoted, but no factorized. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(i) = 0, +* the i-th column of A is a free column. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* TAU (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* VN1 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the partial column norms. +* +* VN2 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the exact column norms. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* Further Details +* =============== +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* Partial column norm updating strategy modified by +* Z. Drmac and Z. Bujanovic, Dept. of Mathematics, +* University of Zagreb, Croatia. +* June 2006. +* For more details see LAPACK Working Note 176. +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, ITEMP, J, MN, OFFPI, PVT + DOUBLE PRECISION AII, TEMP, TEMP2, TOL3Z +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DLARFG, DSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DNRM2 + EXTERNAL IDAMAX, DLAMCH, DNRM2 +* .. +* .. Executable Statements .. +* + MN = MIN( M-OFFSET, N ) + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Compute factorization. +* + DO 20 I = 1, MN +* + OFFPI = OFFSET + I +* +* Determine ith pivot column and swap if necessary. +* + PVT = ( I-1 ) + IDAMAX( N-I+1, VN1( I ), 1 ) +* + IF( PVT.NE.I ) THEN + CALL DSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( I ) + JPVT( I ) = ITEMP + VN1( PVT ) = VN1( I ) + VN2( PVT ) = VN2( I ) + END IF +* +* Generate elementary reflector H(i). +* + IF( OFFPI.LT.M ) THEN + CALL DLARFG( M-OFFPI+1, A( OFFPI, I ), A( OFFPI+1, I ), 1, + $ TAU( I ) ) + ELSE + CALL DLARFG( 1, A( M, I ), A( M, I ), 1, TAU( I ) ) + END IF +* + IF( I.LT.N ) THEN +* +* Apply H(i)' to A(offset+i:m,i+1:n) from the left. +* + AII = A( OFFPI, I ) + A( OFFPI, I ) = ONE + CALL DLARF( 'Left', M-OFFPI+1, N-I, A( OFFPI, I ), 1, + $ TAU( I ), A( OFFPI, I+1 ), LDA, WORK( 1 ) ) + A( OFFPI, I ) = AII + END IF +* +* Update partial column norms. +* + DO 10 J = I + 1, N + IF( VN1( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ONE - ( ABS( A( OFFPI, J ) ) / VN1( J ) )**2 + TEMP = MAX( TEMP, ZERO ) + TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + IF( OFFPI.LT.M ) THEN + VN1( J ) = DNRM2( M-OFFPI, A( OFFPI+1, J ), 1 ) + VN2( J ) = VN1( J ) + ELSE + VN1( J ) = ZERO + VN2( J ) = ZERO + END IF + ELSE + VN1( J ) = VN1( J )*SQRT( TEMP ) + END IF + END IF + 10 CONTINUE +* + 20 CONTINUE +* + RETURN +* +* End of DLAQP2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqps.f b/2.3-1/src/fortran/lapack/dlaqps.f new file mode 100644 index 00000000..94658d27 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqps.f @@ -0,0 +1,259 @@ + SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1, + $ VN2, AUXV, F, LDF ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KB, LDA, LDF, M, N, NB, OFFSET +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ), + $ VN1( * ), VN2( * ) +* .. +* +* Purpose +* ======= +* +* DLAQPS computes a step of QR factorization with column pivoting +* of a real M-by-N matrix A by using Blas-3. It tries to factorize +* NB columns from A starting from the row OFFSET+1, and updates all +* of the matrix with Blas-3 xGEMM. +* +* In some cases, due to catastrophic cancellations, it cannot +* factorize NB columns. Hence, the actual number of factorized +* columns is returned in KB. +* +* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0 +* +* OFFSET (input) INTEGER +* The number of rows of A that have been factorized in +* previous steps. +* +* NB (input) INTEGER +* The number of columns to factorize. +* +* KB (output) INTEGER +* The number of columns actually factorized. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, block A(OFFSET+1:M,1:KB) is the triangular +* factor obtained and block A(1:OFFSET,1:N) has been +* accordingly pivoted, but no factorized. +* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has +* been updated. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* JPVT(I) = K <==> Column K of the full matrix A has been +* permuted into position I in AP. +* +* TAU (output) DOUBLE PRECISION array, dimension (KB) +* The scalar factors of the elementary reflectors. +* +* VN1 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the partial column norms. +* +* VN2 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the exact column norms. +* +* AUXV (input/output) DOUBLE PRECISION array, dimension (NB) +* Auxiliar vector. +* +* F (input/output) DOUBLE PRECISION array, dimension (LDF,NB) +* Matrix F' = L*Y'*A. +* +* LDF (input) INTEGER +* The leading dimension of the array F. LDF >= max(1,N). +* +* Further Details +* =============== +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* Partial column norm updating strategy modified by +* Z. Drmac and Z. Bujanovic, Dept. of Mathematics, +* University of Zagreb, Croatia. +* June 2006. +* For more details see LAPACK Working Note 176. +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER ITEMP, J, K, LASTRK, LSTICC, PVT, RK + DOUBLE PRECISION AKK, TEMP, TEMP2, TOL3Z +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DGEMV, DLARFG, DSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, NINT, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DNRM2 + EXTERNAL IDAMAX, DLAMCH, DNRM2 +* .. +* .. Executable Statements .. +* + LASTRK = MIN( M, N+OFFSET ) + LSTICC = 0 + K = 0 + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Beginning of while loop. +* + 10 CONTINUE + IF( ( K.LT.NB ) .AND. ( LSTICC.EQ.0 ) ) THEN + K = K + 1 + RK = OFFSET + K +* +* Determine ith pivot column and swap if necessary +* + PVT = ( K-1 ) + IDAMAX( N-K+1, VN1( K ), 1 ) + IF( PVT.NE.K ) THEN + CALL DSWAP( M, A( 1, PVT ), 1, A( 1, K ), 1 ) + CALL DSWAP( K-1, F( PVT, 1 ), LDF, F( K, 1 ), LDF ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( K ) + JPVT( K ) = ITEMP + VN1( PVT ) = VN1( K ) + VN2( PVT ) = VN2( K ) + END IF +* +* Apply previous Householder reflectors to column K: +* A(RK:M,K) := A(RK:M,K) - A(RK:M,1:K-1)*F(K,1:K-1)'. +* + IF( K.GT.1 ) THEN + CALL DGEMV( 'No transpose', M-RK+1, K-1, -ONE, A( RK, 1 ), + $ LDA, F( K, 1 ), LDF, ONE, A( RK, K ), 1 ) + END IF +* +* Generate elementary reflector H(k). +* + IF( RK.LT.M ) THEN + CALL DLARFG( M-RK+1, A( RK, K ), A( RK+1, K ), 1, TAU( K ) ) + ELSE + CALL DLARFG( 1, A( RK, K ), A( RK, K ), 1, TAU( K ) ) + END IF +* + AKK = A( RK, K ) + A( RK, K ) = ONE +* +* Compute Kth column of F: +* +* Compute F(K+1:N,K) := tau(K)*A(RK:M,K+1:N)'*A(RK:M,K). +* + IF( K.LT.N ) THEN + CALL DGEMV( 'Transpose', M-RK+1, N-K, TAU( K ), + $ A( RK, K+1 ), LDA, A( RK, K ), 1, ZERO, + $ F( K+1, K ), 1 ) + END IF +* +* Padding F(1:K,K) with zeros. +* + DO 20 J = 1, K + F( J, K ) = ZERO + 20 CONTINUE +* +* Incremental updating of F: +* F(1:N,K) := F(1:N,K) - tau(K)*F(1:N,1:K-1)*A(RK:M,1:K-1)' +* *A(RK:M,K). +* + IF( K.GT.1 ) THEN + CALL DGEMV( 'Transpose', M-RK+1, K-1, -TAU( K ), A( RK, 1 ), + $ LDA, A( RK, K ), 1, ZERO, AUXV( 1 ), 1 ) +* + CALL DGEMV( 'No transpose', N, K-1, ONE, F( 1, 1 ), LDF, + $ AUXV( 1 ), 1, ONE, F( 1, K ), 1 ) + END IF +* +* Update the current row of A: +* A(RK,K+1:N) := A(RK,K+1:N) - A(RK,1:K)*F(K+1:N,1:K)'. +* + IF( K.LT.N ) THEN + CALL DGEMV( 'No transpose', N-K, K, -ONE, F( K+1, 1 ), LDF, + $ A( RK, 1 ), LDA, ONE, A( RK, K+1 ), LDA ) + END IF +* +* Update partial column norms. +* + IF( RK.LT.LASTRK ) THEN + DO 30 J = K + 1, N + IF( VN1( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ABS( A( RK, J ) ) / VN1( J ) + TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) ) + TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + VN2( J ) = DBLE( LSTICC ) + LSTICC = J + ELSE + VN1( J ) = VN1( J )*SQRT( TEMP ) + END IF + END IF + 30 CONTINUE + END IF +* + A( RK, K ) = AKK +* +* End of while loop. +* + GO TO 10 + END IF + KB = K + RK = OFFSET + KB +* +* Apply the block reflector to the rest of the matrix: +* A(OFFSET+KB+1:M,KB+1:N) := A(OFFSET+KB+1:M,KB+1:N) - +* A(OFFSET+KB+1:M,1:KB)*F(KB+1:N,1:KB)'. +* + IF( KB.LT.MIN( N, M-OFFSET ) ) THEN + CALL DGEMM( 'No transpose', 'Transpose', M-RK, N-KB, KB, -ONE, + $ A( RK+1, 1 ), LDA, F( KB+1, 1 ), LDF, ONE, + $ A( RK+1, KB+1 ), LDA ) + END IF +* +* Recomputation of difficult columns. +* + 40 CONTINUE + IF( LSTICC.GT.0 ) THEN + ITEMP = NINT( VN2( LSTICC ) ) + VN1( LSTICC ) = DNRM2( M-RK, A( RK+1, LSTICC ), 1 ) +* +* NOTE: The computation of VN1( LSTICC ) relies on the fact that +* SNRM2 does not fail on vectors with norm below the value of +* SQRT(DLAMCH('S')) +* + VN2( LSTICC ) = VN1( LSTICC ) + LSTICC = ITEMP + GO TO 40 + END IF +* + RETURN +* +* End of DLAQPS +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqr0.f b/2.3-1/src/fortran/lapack/dlaqr0.f new file mode 100644 index 00000000..479da53d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr0.f @@ -0,0 +1,642 @@ + SUBROUTINE DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, + $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DLAQR0 computes the eigenvalues of a Hessenberg matrix H +* and, optionally, the matrices T and Z from the Schur decomposition +* H = Z T Z**T, where T is an upper quasi-triangular matrix (the +* Schur form), and Z is the orthogonal matrix of Schur vectors. +* +* Optionally Z may be postmultiplied into an input orthogonal +* matrix Q so that this routine can give the Schur factorization +* of a matrix A which has been reduced to the Hessenberg form H +* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N .GE. 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1, +* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a +* previous call to DGEBAL, and then passed to DGEHRD when the +* matrix output by DGEBAL is reduced to Hessenberg form. +* Otherwise, ILO and IHI should be set to 1 and N, +* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. +* If N = 0, then ILO = 1 and IHI = 0. +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO = 0 and WANTT is .TRUE., then H contains +* the upper quasi-triangular matrix T from the Schur +* decomposition (the Schur form); 2-by-2 diagonal blocks +* (corresponding to complex conjugate pairs of eigenvalues) +* are returned in standard form, with H(i,i) = H(i+1,i+1) +* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is +* .FALSE., then the contents of H are unspecified on exit. +* (The output value of H when INFO.GT.0 is given under the +* description of INFO below.) +* +* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and +* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH .GE. max(1,N). +* +* WR (output) DOUBLE PRECISION array, dimension (IHI) +* WI (output) DOUBLE PRECISION array, dimension (IHI) +* The real and imaginary parts, respectively, of the computed +* eigenvalues of H(ILO:IHI,ILO:IHI) are stored WR(ILO:IHI) +* and WI(ILO:IHI). If two eigenvalues are computed as a +* complex conjugate pair, they are stored in consecutive +* elements of WR and WI, say the i-th and (i+1)th, with +* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then +* the eigenvalues are stored in the same order as on the +* diagonal of the Schur form returned in H, with +* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal +* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and +* WI(i+1) = -WI(i). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. +* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI) +* If WANTZ is .FALSE., then Z is not referenced. +* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is +* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the +* orthogonal Schur factor of H(ILO:IHI,ILO:IHI). +* (The output value of Z when INFO.GT.0 is given under +* the description of INFO below.) +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. if WANTZ is .TRUE. +* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension LWORK +* On exit, if LWORK = -1, WORK(1) returns an estimate of +* the optimal value for LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK .GE. max(1,N) +* is sufficient, but LWORK typically as large as 6*N may +* be required for optimal performance. A workspace query +* to determine the optimal workspace size is recommended. +* +* If LWORK = -1, then DLAQR0 does a workspace query. +* In this case, DLAQR0 checks the input parameters and +* estimates the optimal workspace size for the given +* values of N, ILO and IHI. The estimate is returned +* in WORK(1). No error message related to LWORK is +* issued by XERBLA. Neither H nor Z are accessed. +* +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: if INFO = i, DLAQR0 failed to compute all of +* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR +* and WI contain those eigenvalues which have been +* successfully computed. (Failures are rare.) +* +* If INFO .GT. 0 and WANT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the eigen- +* values of the upper Hessenberg matrix rows and +* columns ILO through INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* +* (*) (initial value of H)*U = U*(final value of H) +* +* where U is an orthogonal matrix. The final +* value of H is upper Hessenberg and quasi-triangular +* in rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* +* (final value of Z(ILO:IHI,ILOZ:IHIZ) +* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U +* +* where U is the orthogonal matrix in (*) (regard- +* less of the value of WANTT.) +* +* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not +* accessed. +* +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* +* References: +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 +* Performance, SIAM Journal of Matrix Analysis, volume 23, pages +* 929--947, 2002. +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part II: Aggressive Early Deflation, SIAM Journal +* of Matrix Analysis, volume 23, pages 948--973, 2002. +* +* ================================================================ +* .. Parameters .. +* +* ==== Matrices of order NTINY or smaller must be processed by +* . DLAHQR because of insufficient subdiagonal scratch space. +* . (This is a hard limit.) ==== +* +* ==== Exceptional deflation windows: try to cure rare +* . slow convergence by increasing the size of the +* . deflation window after KEXNW iterations. ===== +* +* ==== Exceptional shifts: try to cure rare slow convergence +* . with ad-hoc exceptional shifts every KEXSH iterations. +* . The constants WILK1 and WILK2 are used to form the +* . exceptional shifts. ==== +* + INTEGER NTINY + PARAMETER ( NTINY = 11 ) + INTEGER KEXNW, KEXSH + PARAMETER ( KEXNW = 5, KEXSH = 6 ) + DOUBLE PRECISION WILK1, WILK2 + PARAMETER ( WILK1 = 0.75d0, WILK2 = -0.4375d0 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, BB, CC, CS, DD, SN, SS, SWAP + INTEGER I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS, + $ KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS, + $ LWKOPT, NDFL, NH, NHO, NIBBLE, NMIN, NS, NSMAX, + $ NSR, NVE, NW, NWMAX, NWR + LOGICAL NWINC, SORTED + CHARACTER JBCMPZ*2 +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Local Arrays .. + DOUBLE PRECISION ZDUM( 1, 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLACPY, DLAHQR, DLANV2, DLAQR3, DLAQR4, DLAQR5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, INT, MAX, MIN, MOD +* .. +* .. Executable Statements .. + INFO = 0 +* +* ==== Quick return for N = 0: nothing to do. ==== +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = ONE + RETURN + END IF +* +* ==== Set up job flags for ILAENV. ==== +* + IF( WANTT ) THEN + JBCMPZ( 1: 1 ) = 'S' + ELSE + JBCMPZ( 1: 1 ) = 'E' + END IF + IF( WANTZ ) THEN + JBCMPZ( 2: 2 ) = 'V' + ELSE + JBCMPZ( 2: 2 ) = 'N' + END IF +* +* ==== Tiny matrices must use DLAHQR. ==== +* + IF( N.LE.NTINY ) THEN +* +* ==== Estimate optimal workspace. ==== +* + LWKOPT = 1 + IF( LWORK.NE.-1 ) + $ CALL DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, + $ ILOZ, IHIZ, Z, LDZ, INFO ) + ELSE +* +* ==== Use small bulge multi-shift QR with aggressive early +* . deflation on larger-than-tiny matrices. ==== +* +* ==== Hope for the best. ==== +* + INFO = 0 +* +* ==== NWR = recommended deflation window size. At this +* . point, N .GT. NTINY = 11, so there is enough +* . subdiagonal workspace for NWR.GE.2 as required. +* . (In fact, there is enough subdiagonal space for +* . NWR.GE.3.) ==== +* + NWR = ILAENV( 13, 'DLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NWR = MAX( 2, NWR ) + NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) + NW = NWR +* +* ==== NSR = recommended number of simultaneous shifts. +* . At this point N .GT. NTINY = 11, so there is at +* . enough subdiagonal workspace for NSR to be even +* . and greater than or equal to two as required. ==== +* + NSR = ILAENV( 15, 'DLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO ) + NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) +* +* ==== Estimate optimal workspace ==== +* +* ==== Workspace query call to DLAQR3 ==== +* + CALL DLAQR3( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, WR, WI, H, LDH, N, H, LDH, + $ N, H, LDH, WORK, -1 ) +* +* ==== Optimal workspace = MAX(DLAQR5, DLAQR3) ==== +* + LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) ) +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DBLE( LWKOPT ) + RETURN + END IF +* +* ==== DLAHQR/DLAQR0 crossover point ==== +* + NMIN = ILAENV( 12, 'DLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NMIN = MAX( NTINY, NMIN ) +* +* ==== Nibble crossover point ==== +* + NIBBLE = ILAENV( 14, 'DLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NIBBLE = MAX( 0, NIBBLE ) +* +* ==== Accumulate reflections during ttswp? Use block +* . 2-by-2 structure during matrix-matrix multiply? ==== +* + KACC22 = ILAENV( 16, 'DLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + KACC22 = MAX( 0, KACC22 ) + KACC22 = MIN( 2, KACC22 ) +* +* ==== NWMAX = the largest possible deflation window for +* . which there is sufficient workspace. ==== +* + NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 ) +* +* ==== NSMAX = the Largest number of simultaneous shifts +* . for which there is sufficient workspace. ==== +* + NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 ) + NSMAX = NSMAX - MOD( NSMAX, 2 ) +* +* ==== NDFL: an iteration count restarted at deflation. ==== +* + NDFL = 1 +* +* ==== ITMAX = iteration limit ==== +* + ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) ) +* +* ==== Last row and column in the active block ==== +* + KBOT = IHI +* +* ==== Main Loop ==== +* + DO 80 IT = 1, ITMAX +* +* ==== Done when KBOT falls below ILO ==== +* + IF( KBOT.LT.ILO ) + $ GO TO 90 +* +* ==== Locate active block ==== +* + DO 10 K = KBOT, ILO + 1, -1 + IF( H( K, K-1 ).EQ.ZERO ) + $ GO TO 20 + 10 CONTINUE + K = ILO + 20 CONTINUE + KTOP = K +* +* ==== Select deflation window size ==== +* + NH = KBOT - KTOP + 1 + IF( NDFL.LT.KEXNW .OR. NH.LT.NW ) THEN +* +* ==== Typical deflation window. If possible and +* . advisable, nibble the entire active block. +* . If not, use size NWR or NWR+1 depending upon +* . which has the smaller corresponding subdiagonal +* . entry (a heuristic). ==== +* + NWINC = .TRUE. + IF( NH.LE.MIN( NMIN, NWMAX ) ) THEN + NW = NH + ELSE + NW = MIN( NWR, NH, NWMAX ) + IF( NW.LT.NWMAX ) THEN + IF( NW.GE.NH-1 ) THEN + NW = NH + ELSE + KWTOP = KBOT - NW + 1 + IF( ABS( H( KWTOP, KWTOP-1 ) ).GT. + $ ABS( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1 + END IF + END IF + END IF + ELSE +* +* ==== Exceptional deflation window. If there have +* . been no deflations in KEXNW or more iterations, +* . then vary the deflation window size. At first, +* . because, larger windows are, in general, more +* . powerful than smaller ones, rapidly increase the +* . window up to the maximum reasonable and possible. +* . Then maybe try a slightly smaller window. ==== +* + IF( NWINC .AND. NW.LT.MIN( NWMAX, NH ) ) THEN + NW = MIN( NWMAX, NH, 2*NW ) + ELSE + NWINC = .FALSE. + IF( NW.EQ.NH .AND. NH.GT.2 ) + $ NW = NH - 1 + END IF + END IF +* +* ==== Aggressive early deflation: +* . split workspace under the subdiagonal into +* . - an nw-by-nw work array V in the lower +* . left-hand-corner, +* . - an NW-by-at-least-NW-but-more-is-better +* . (NW-by-NHO) horizontal work array along +* . the bottom edge, +* . - an at-least-NW-but-more-is-better (NHV-by-NW) +* . vertical work array along the left-hand-edge. +* . ==== +* + KV = N - NW + 1 + KT = NW + 1 + NHO = ( N-NW-1 ) - KT + 1 + KWV = NW + 2 + NVE = ( N-NW ) - KWV + 1 +* +* ==== Aggressive early deflation ==== +* + CALL DLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, WR, WI, H( KV, 1 ), LDH, + $ NHO, H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, + $ WORK, LWORK ) +* +* ==== Adjust KBOT accounting for new deflations. ==== +* + KBOT = KBOT - LD +* +* ==== KS points to the shifts. ==== +* + KS = KBOT - LS + 1 +* +* ==== Skip an expensive QR sweep if there is a (partly +* . heuristic) reason to expect that many eigenvalues +* . will deflate without it. Here, the QR sweep is +* . skipped if many eigenvalues have just been deflated +* . or if the remaining active block is small. +* + IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT- + $ KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN +* +* ==== NS = nominal number of simultaneous shifts. +* . This may be lowered (slightly) if DLAQR3 +* . did not provide that many shifts. ==== +* + NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) ) + NS = NS - MOD( NS, 2 ) +* +* ==== If there have been no deflations +* . in a multiple of KEXSH iterations, +* . then try exceptional shifts. +* . Otherwise use shifts provided by +* . DLAQR3 above or from the eigenvalues +* . of a trailing principal submatrix. ==== +* + IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN + KS = KBOT - NS + 1 + DO 30 I = KBOT, MAX( KS+1, KTOP+2 ), -2 + SS = ABS( H( I, I-1 ) ) + ABS( H( I-1, I-2 ) ) + AA = WILK1*SS + H( I, I ) + BB = SS + CC = WILK2*SS + DD = AA + CALL DLANV2( AA, BB, CC, DD, WR( I-1 ), WI( I-1 ), + $ WR( I ), WI( I ), CS, SN ) + 30 CONTINUE + IF( KS.EQ.KTOP ) THEN + WR( KS+1 ) = H( KS+1, KS+1 ) + WI( KS+1 ) = ZERO + WR( KS ) = WR( KS+1 ) + WI( KS ) = WI( KS+1 ) + END IF + ELSE +* +* ==== Got NS/2 or fewer shifts? Use DLAQR4 or +* . DLAHQR on a trailing principal submatrix to +* . get more. (Since NS.LE.NSMAX.LE.(N+6)/9, +* . there is enough space below the subdiagonal +* . to fit an NS-by-NS scratch array.) ==== +* + IF( KBOT-KS+1.LE.NS / 2 ) THEN + KS = KBOT - NS + 1 + KT = N - NS + 1 + CALL DLACPY( 'A', NS, NS, H( KS, KS ), LDH, + $ H( KT, 1 ), LDH ) + IF( NS.GT.NMIN ) THEN + CALL DLAQR4( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, WR( KS ), + $ WI( KS ), 1, 1, ZDUM, 1, WORK, + $ LWORK, INF ) + ELSE + CALL DLAHQR( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, WR( KS ), + $ WI( KS ), 1, 1, ZDUM, 1, INF ) + END IF + KS = KS + INF +* +* ==== In case of a rare QR failure use +* . eigenvalues of the trailing 2-by-2 +* . principal submatrix. ==== +* + IF( KS.GE.KBOT ) THEN + AA = H( KBOT-1, KBOT-1 ) + CC = H( KBOT, KBOT-1 ) + BB = H( KBOT-1, KBOT ) + DD = H( KBOT, KBOT ) + CALL DLANV2( AA, BB, CC, DD, WR( KBOT-1 ), + $ WI( KBOT-1 ), WR( KBOT ), + $ WI( KBOT ), CS, SN ) + KS = KBOT - 1 + END IF + END IF +* + IF( KBOT-KS+1.GT.NS ) THEN +* +* ==== Sort the shifts (Helps a little) +* . Bubble sort keeps complex conjugate +* . pairs together. ==== +* + SORTED = .false. + DO 50 K = KBOT, KS + 1, -1 + IF( SORTED ) + $ GO TO 60 + SORTED = .true. + DO 40 I = KS, K - 1 + IF( ABS( WR( I ) )+ABS( WI( I ) ).LT. + $ ABS( WR( I+1 ) )+ABS( WI( I+1 ) ) ) THEN + SORTED = .false. +* + SWAP = WR( I ) + WR( I ) = WR( I+1 ) + WR( I+1 ) = SWAP +* + SWAP = WI( I ) + WI( I ) = WI( I+1 ) + WI( I+1 ) = SWAP + END IF + 40 CONTINUE + 50 CONTINUE + 60 CONTINUE + END IF +* +* ==== Shuffle shifts into pairs of real shifts +* . and pairs of complex conjugate shifts +* . assuming complex conjugate shifts are +* . already adjacent to one another. (Yes, +* . they are.) ==== +* + DO 70 I = KBOT, KS + 2, -2 + IF( WI( I ).NE.-WI( I-1 ) ) THEN +* + SWAP = WR( I ) + WR( I ) = WR( I-1 ) + WR( I-1 ) = WR( I-2 ) + WR( I-2 ) = SWAP +* + SWAP = WI( I ) + WI( I ) = WI( I-1 ) + WI( I-1 ) = WI( I-2 ) + WI( I-2 ) = SWAP + END IF + 70 CONTINUE + END IF +* +* ==== If there are only two shifts and both are +* . real, then use only one. ==== +* + IF( KBOT-KS+1.EQ.2 ) THEN + IF( WI( KBOT ).EQ.ZERO ) THEN + IF( ABS( WR( KBOT )-H( KBOT, KBOT ) ).LT. + $ ABS( WR( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN + WR( KBOT-1 ) = WR( KBOT ) + ELSE + WR( KBOT ) = WR( KBOT-1 ) + END IF + END IF + END IF +* +* ==== Use up to NS of the the smallest magnatiude +* . shifts. If there aren't NS shifts available, +* . then use them all, possibly dropping one to +* . make the number of shifts even. ==== +* + NS = MIN( NS, KBOT-KS+1 ) + NS = NS - MOD( NS, 2 ) + KS = KBOT - NS + 1 +* +* ==== Small-bulge multi-shift QR sweep: +* . split workspace under the subdiagonal into +* . - a KDU-by-KDU work array U in the lower +* . left-hand-corner, +* . - a KDU-by-at-least-KDU-but-more-is-better +* . (KDU-by-NHo) horizontal work array WH along +* . the bottom edge, +* . - and an at-least-KDU-but-more-is-better-by-KDU +* . (NVE-by-KDU) vertical work WV arrow along +* . the left-hand-edge. ==== +* + KDU = 3*NS - 3 + KU = N - KDU + 1 + KWH = KDU + 1 + NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 + KWV = KDU + 4 + NVE = N - KDU - KWV + 1 +* +* ==== Small-bulge multi-shift QR sweep ==== +* + CALL DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS, + $ WR( KS ), WI( KS ), H, LDH, ILOZ, IHIZ, Z, + $ LDZ, WORK, 3, H( KU, 1 ), LDH, NVE, + $ H( KWV, 1 ), LDH, NHO, H( KU, KWH ), LDH ) + END IF +* +* ==== Note progress (or the lack of it). ==== +* + IF( LD.GT.0 ) THEN + NDFL = 1 + ELSE + NDFL = NDFL + 1 + END IF +* +* ==== End of main loop ==== + 80 CONTINUE +* +* ==== Iteration limit exceeded. Set INFO to show where +* . the problem occurred and exit. ==== +* + INFO = KBOT + 90 CONTINUE + END IF +* +* ==== Return the optimal value of LWORK. ==== +* + WORK( 1 ) = DBLE( LWKOPT ) +* +* ==== End of DLAQR0 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqr1.f b/2.3-1/src/fortran/lapack/dlaqr1.f new file mode 100644 index 00000000..c80fe668 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr1.f @@ -0,0 +1,97 @@ + SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION SI1, SI2, SR1, SR2 + INTEGER LDH, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), V( * ) +* .. +* +* Given a 2-by-2 or 3-by-3 matrix H, DLAQR1 sets v to a +* scalar multiple of the first column of the product +* +* (*) K = (H - (sr1 + i*si1)*I)*(H - (sr2 + i*si2)*I) +* +* scaling to avoid overflows and most underflows. It +* is assumed that either +* +* 1) sr1 = sr2 and si1 = -si2 +* or +* 2) si1 = si2 = 0. +* +* This is useful for starting double implicit shift bulges +* in the QR algorithm. +* +* +* N (input) integer +* Order of the matrix H. N must be either 2 or 3. +* +* H (input) DOUBLE PRECISION array of dimension (LDH,N) +* The 2-by-2 or 3-by-3 matrix H in (*). +* +* LDH (input) integer +* The leading dimension of H as declared in +* the calling procedure. LDH.GE.N +* +* SR1 (input) DOUBLE PRECISION +* SI1 The shifts in (*). +* SR2 +* SI2 +* +* V (output) DOUBLE PRECISION array of dimension N +* A scalar multiple of the first column of the +* matrix K in (*). +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION H21S, H31S, S +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. + IF( N.EQ.2 ) THEN + S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) ) + IF( S.EQ.ZERO ) THEN + V( 1 ) = ZERO + V( 2 ) = ZERO + ELSE + H21S = H( 2, 1 ) / S + V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-SR1 )* + $ ( ( H( 1, 1 )-SR2 ) / S ) - SI1*( SI2 / S ) + V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-SR1-SR2 ) + END IF + ELSE + S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 ) ) + + $ ABS( H( 3, 1 ) ) + IF( S.EQ.ZERO ) THEN + V( 1 ) = ZERO + V( 2 ) = ZERO + V( 3 ) = ZERO + ELSE + H21S = H( 2, 1 ) / S + H31S = H( 3, 1 ) / S + V( 1 ) = ( H( 1, 1 )-SR1 )*( ( H( 1, 1 )-SR2 ) / S ) - + $ SI1*( SI2 / S ) + H( 1, 2 )*H21S + H( 1, 3 )*H31S + V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-SR1-SR2 ) + + $ H( 2, 3 )*H31S + V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-SR1-SR2 ) + + $ H21S*H( 3, 2 ) + END IF + END IF + END diff --git a/2.3-1/src/fortran/lapack/dlaqr2.f b/2.3-1/src/fortran/lapack/dlaqr2.f new file mode 100644 index 00000000..6ddb3309 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr2.f @@ -0,0 +1,551 @@ + SUBROUTINE DLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, + $ LDT, NV, WV, LDWV, WORK, LWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, + $ LDZ, LWORK, N, ND, NH, NS, NV, NW + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), T( LDT, * ), + $ V( LDV, * ), WORK( * ), WV( LDWV, * ), + $ Z( LDZ, * ) +* .. +* +* This subroutine is identical to DLAQR3 except that it avoids +* recursion by calling DLAHQR instead of DLAQR4. +* +* +* ****************************************************************** +* Aggressive early deflation: +* +* This subroutine accepts as input an upper Hessenberg matrix +* H and performs an orthogonal similarity transformation +* designed to detect and deflate fully converged eigenvalues from +* a trailing principal submatrix. On output H has been over- +* written by a new Hessenberg matrix that is a perturbation of +* an orthogonal similarity transformation of H. It is to be +* hoped that the final version of H has many zero subdiagonal +* entries. +* +* ****************************************************************** +* WANTT (input) LOGICAL +* If .TRUE., then the Hessenberg matrix H is fully updated +* so that the quasi-triangular Schur factor may be +* computed (in cooperation with the calling subroutine). +* If .FALSE., then only enough of H is updated to preserve +* the eigenvalues. +* +* WANTZ (input) LOGICAL +* If .TRUE., then the orthogonal matrix Z is updated so +* so that the orthogonal Schur factor may be computed +* (in cooperation with the calling subroutine). +* If .FALSE., then Z is not referenced. +* +* N (input) INTEGER +* The order of the matrix H and (if WANTZ is .TRUE.) the +* order of the orthogonal matrix Z. +* +* KTOP (input) INTEGER +* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0. +* KBOT and KTOP together determine an isolated block +* along the diagonal of the Hessenberg matrix. +* +* KBOT (input) INTEGER +* It is assumed without a check that either +* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together +* determine an isolated block along the diagonal of the +* Hessenberg matrix. +* +* NW (input) INTEGER +* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1). +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On input the initial N-by-N section of H stores the +* Hessenberg matrix undergoing aggressive early deflation. +* On output H has been transformed by an orthogonal +* similarity transformation, perturbed, and the returned +* to Hessenberg form that (it is to be hoped) has some +* zero subdiagonal entries. +* +* LDH (input) integer +* Leading dimension of H just as declared in the calling +* subroutine. N .LE. LDH +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI) +* IF WANTZ is .TRUE., then on output, the orthogonal +* similarity transformation mentioned above has been +* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ is .FALSE., then Z is unreferenced. +* +* LDZ (input) integer +* The leading dimension of Z just as declared in the +* calling subroutine. 1 .LE. LDZ. +* +* NS (output) integer +* The number of unconverged (ie approximate) eigenvalues +* returned in SR and SI that may be used as shifts by the +* calling subroutine. +* +* ND (output) integer +* The number of converged eigenvalues uncovered by this +* subroutine. +* +* SR (output) DOUBLE PRECISION array, dimension KBOT +* SI (output) DOUBLE PRECISION array, dimension KBOT +* On output, the real and imaginary parts of approximate +* eigenvalues that may be used for shifts are stored in +* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and +* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively. +* The real and imaginary parts of converged eigenvalues +* are stored in SR(KBOT-ND+1) through SR(KBOT) and +* SI(KBOT-ND+1) through SI(KBOT), respectively. +* +* V (workspace) DOUBLE PRECISION array, dimension (LDV,NW) +* An NW-by-NW work array. +* +* LDV (input) integer scalar +* The leading dimension of V just as declared in the +* calling subroutine. NW .LE. LDV +* +* NH (input) integer scalar +* The number of columns of T. NH.GE.NW. +* +* T (workspace) DOUBLE PRECISION array, dimension (LDT,NW) +* +* LDT (input) integer +* The leading dimension of T just as declared in the +* calling subroutine. NW .LE. LDT +* +* NV (input) integer +* The number of rows of work array WV available for +* workspace. NV.GE.NW. +* +* WV (workspace) DOUBLE PRECISION array, dimension (LDWV,NW) +* +* LDWV (input) integer +* The leading dimension of W just as declared in the +* calling subroutine. NW .LE. LDV +* +* WORK (workspace) DOUBLE PRECISION array, dimension LWORK. +* On exit, WORK(1) is set to an estimate of the optimal value +* of LWORK for the given values of N, NW, KTOP and KBOT. +* +* LWORK (input) integer +* The dimension of the work array WORK. LWORK = 2*NW +* suffices, but greater efficiency may result from larger +* values of LWORK. +* +* If LWORK = -1, then a workspace query is assumed; DLAQR2 +* only estimates the optimal workspace size for the given +* values of N, NW, KTOP and KBOT. The estimate is returned +* in WORK(1). No error message related to LWORK is issued +* by XERBLA. Neither H nor Z are accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, BB, BETA, CC, CS, DD, EVI, EVK, FOO, S, + $ SAFMAX, SAFMIN, SMLNUM, SN, TAU, ULP + INTEGER I, IFST, ILST, INFO, INFQR, J, JW, K, KCOL, + $ KEND, KLN, KROW, KWTOP, LTOP, LWK1, LWK2, + $ LWKOPT + LOGICAL BULGE, SORTED +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEHRD, DGEMM, DLABAD, DLACPY, DLAHQR, + $ DLANV2, DLARF, DLARFG, DLASET, DORGHR, DTREXC +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, INT, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* ==== Estimate optimal workspace. ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + IF( JW.LE.2 ) THEN + LWKOPT = 1 + ELSE +* +* ==== Workspace query call to DGEHRD ==== +* + CALL DGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK1 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to DORGHR ==== +* + CALL DORGHR( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK2 = INT( WORK( 1 ) ) +* +* ==== Optimal workspace ==== +* + LWKOPT = JW + MAX( LWK1, LWK2 ) + END IF +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DBLE( LWKOPT ) + RETURN + END IF +* +* ==== Nothing to do ... +* ... for an empty active block ... ==== + NS = 0 + ND = 0 + IF( KTOP.GT.KBOT ) + $ RETURN +* ... nor for an empty deflation window. ==== + IF( NW.LT.1 ) + $ RETURN +* +* ==== Machine constants ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = ONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Setup deflation window ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + KWTOP = KBOT - JW + 1 + IF( KWTOP.EQ.KTOP ) THEN + S = ZERO + ELSE + S = H( KWTOP, KWTOP-1 ) + END IF +* + IF( KBOT.EQ.KWTOP ) THEN +* +* ==== 1-by-1 deflation window: not much to do ==== +* + SR( KWTOP ) = H( KWTOP, KWTOP ) + SI( KWTOP ) = ZERO + NS = 1 + ND = 0 + IF( ABS( S ).LE.MAX( SMLNUM, ULP*ABS( H( KWTOP, KWTOP ) ) ) ) + $ THEN + NS = 0 + ND = 1 + IF( KWTOP.GT.KTOP ) + $ H( KWTOP, KWTOP-1 ) = ZERO + END IF + RETURN + END IF +* +* ==== Convert to spike-triangular form. (In case of a +* . rare QR failure, this routine continues to do +* . aggressive early deflation using that part of +* . the deflation window that converged using INFQR +* . here and there to keep track.) ==== +* + CALL DLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT ) + CALL DCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 ) +* + CALL DLASET( 'A', JW, JW, ZERO, ONE, V, LDV ) + CALL DLAHQR( .true., .true., JW, 1, JW, T, LDT, SR( KWTOP ), + $ SI( KWTOP ), 1, JW, V, LDV, INFQR ) +* +* ==== DTREXC needs a clean margin near the diagonal ==== +* + DO 10 J = 1, JW - 3 + T( J+2, J ) = ZERO + T( J+3, J ) = ZERO + 10 CONTINUE + IF( JW.GT.2 ) + $ T( JW, JW-2 ) = ZERO +* +* ==== Deflation detection loop ==== +* + NS = JW + ILST = INFQR + 1 + 20 CONTINUE + IF( ILST.LE.NS ) THEN + IF( NS.EQ.1 ) THEN + BULGE = .FALSE. + ELSE + BULGE = T( NS, NS-1 ).NE.ZERO + END IF +* +* ==== Small spike tip test for deflation ==== +* + IF( .NOT.BULGE ) THEN +* +* ==== Real eigenvalue ==== +* + FOO = ABS( T( NS, NS ) ) + IF( FOO.EQ.ZERO ) + $ FOO = ABS( S ) + IF( ABS( S*V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) ) THEN +* +* ==== Deflatable ==== +* + NS = NS - 1 + ELSE +* +* ==== Undeflatable. Move it up out of the way. +* . (DTREXC can not fail in this case.) ==== +* + IFST = NS + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + ILST = ILST + 1 + END IF + ELSE +* +* ==== Complex conjugate pair ==== +* + FOO = ABS( T( NS, NS ) ) + SQRT( ABS( T( NS, NS-1 ) ) )* + $ SQRT( ABS( T( NS-1, NS ) ) ) + IF( FOO.EQ.ZERO ) + $ FOO = ABS( S ) + IF( MAX( ABS( S*V( 1, NS ) ), ABS( S*V( 1, NS-1 ) ) ).LE. + $ MAX( SMLNUM, ULP*FOO ) ) THEN +* +* ==== Deflatable ==== +* + NS = NS - 2 + ELSE +* +* ==== Undflatable. Move them up out of the way. +* . Fortunately, DTREXC does the right thing with +* . ILST in case of a rare exchange failure. ==== +* + IFST = NS + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + ILST = ILST + 2 + END IF + END IF +* +* ==== End deflation detection loop ==== +* + GO TO 20 + END IF +* +* ==== Return to Hessenberg form ==== +* + IF( NS.EQ.0 ) + $ S = ZERO +* + IF( NS.LT.JW ) THEN +* +* ==== sorting diagonal blocks of T improves accuracy for +* . graded matrices. Bubble sort deals well with +* . exchange failures. ==== +* + SORTED = .false. + I = NS + 1 + 30 CONTINUE + IF( SORTED ) + $ GO TO 50 + SORTED = .true. +* + KEND = I - 1 + I = INFQR + 1 + IF( I.EQ.NS ) THEN + K = I + 1 + ELSE IF( T( I+1, I ).EQ.ZERO ) THEN + K = I + 1 + ELSE + K = I + 2 + END IF + 40 CONTINUE + IF( K.LE.KEND ) THEN + IF( K.EQ.I+1 ) THEN + EVI = ABS( T( I, I ) ) + ELSE + EVI = ABS( T( I, I ) ) + SQRT( ABS( T( I+1, I ) ) )* + $ SQRT( ABS( T( I, I+1 ) ) ) + END IF +* + IF( K.EQ.KEND ) THEN + EVK = ABS( T( K, K ) ) + ELSE IF( T( K+1, K ).EQ.ZERO ) THEN + EVK = ABS( T( K, K ) ) + ELSE + EVK = ABS( T( K, K ) ) + SQRT( ABS( T( K+1, K ) ) )* + $ SQRT( ABS( T( K, K+1 ) ) ) + END IF +* + IF( EVI.GE.EVK ) THEN + I = K + ELSE + SORTED = .false. + IFST = I + ILST = K + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + IF( INFO.EQ.0 ) THEN + I = ILST + ELSE + I = K + END IF + END IF + IF( I.EQ.KEND ) THEN + K = I + 1 + ELSE IF( T( I+1, I ).EQ.ZERO ) THEN + K = I + 1 + ELSE + K = I + 2 + END IF + GO TO 40 + END IF + GO TO 30 + 50 CONTINUE + END IF +* +* ==== Restore shift/eigenvalue array from T ==== +* + I = JW + 60 CONTINUE + IF( I.GE.INFQR+1 ) THEN + IF( I.EQ.INFQR+1 ) THEN + SR( KWTOP+I-1 ) = T( I, I ) + SI( KWTOP+I-1 ) = ZERO + I = I - 1 + ELSE IF( T( I, I-1 ).EQ.ZERO ) THEN + SR( KWTOP+I-1 ) = T( I, I ) + SI( KWTOP+I-1 ) = ZERO + I = I - 1 + ELSE + AA = T( I-1, I-1 ) + CC = T( I, I-1 ) + BB = T( I-1, I ) + DD = T( I, I ) + CALL DLANV2( AA, BB, CC, DD, SR( KWTOP+I-2 ), + $ SI( KWTOP+I-2 ), SR( KWTOP+I-1 ), + $ SI( KWTOP+I-1 ), CS, SN ) + I = I - 2 + END IF + GO TO 60 + END IF +* + IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN +* +* ==== Reflect spike back into lower triangle ==== +* + CALL DCOPY( NS, V, LDV, WORK, 1 ) + BETA = WORK( 1 ) + CALL DLARFG( NS, BETA, WORK( 2 ), 1, TAU ) + WORK( 1 ) = ONE +* + CALL DLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT ) +* + CALL DLARF( 'L', NS, JW, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL DLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL DLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV, + $ WORK( JW+1 ) ) +* + CALL DGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + END IF +* +* ==== Copy updated reduced window into place ==== +* + IF( KWTOP.GT.1 ) + $ H( KWTOP, KWTOP-1 ) = S*V( 1, 1 ) + CALL DLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH ) + CALL DCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ), + $ LDH+1 ) +* +* ==== Accumulate orthogonal matrix in order update +* . H and Z, if requested. (A modified version +* . of DORGHR that accumulates block Householder +* . transformations into V directly might be +* . marginally more efficient than the following.) ==== +* + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN + CALL DORGHR( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + CALL DGEMM( 'N', 'N', JW, NS, NS, ONE, V, LDV, T, LDT, ZERO, + $ WV, LDWV ) + CALL DLACPY( 'A', JW, NS, WV, LDWV, V, LDV ) + END IF +* +* ==== Update vertical slab in H ==== +* + IF( WANTT ) THEN + LTOP = 1 + ELSE + LTOP = KTOP + END IF + DO 70 KROW = LTOP, KWTOP - 1, NV + KLN = MIN( NV, KWTOP-KROW ) + CALL DGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ), + $ LDH, V, LDV, ZERO, WV, LDWV ) + CALL DLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH ) + 70 CONTINUE +* +* ==== Update horizontal slab in H ==== +* + IF( WANTT ) THEN + DO 80 KCOL = KBOT + 1, N, NH + KLN = MIN( NH, N-KCOL+1 ) + CALL DGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV, + $ H( KWTOP, KCOL ), LDH, ZERO, T, LDT ) + CALL DLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ), + $ LDH ) + 80 CONTINUE + END IF +* +* ==== Update vertical slab in Z ==== +* + IF( WANTZ ) THEN + DO 90 KROW = ILOZ, IHIZ, NV + KLN = MIN( NV, IHIZ-KROW+1 ) + CALL DGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ), + $ LDZ, V, LDV, ZERO, WV, LDWV ) + CALL DLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ), + $ LDZ ) + 90 CONTINUE + END IF + END IF +* +* ==== Return the number of deflations ... ==== +* + ND = JW - NS +* +* ==== ... and the number of shifts. (Subtracting +* . INFQR from the spike length takes care +* . of the case of a rare QR failure while +* . calculating eigenvalues of the deflation +* . window.) ==== +* + NS = NS - INFQR +* +* ==== Return optimal workspace. ==== +* + WORK( 1 ) = DBLE( LWKOPT ) +* +* ==== End of DLAQR2 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqr3.f b/2.3-1/src/fortran/lapack/dlaqr3.f new file mode 100644 index 00000000..877b267a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr3.f @@ -0,0 +1,561 @@ + SUBROUTINE DLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T, + $ LDT, NV, WV, LDWV, WORK, LWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, + $ LDZ, LWORK, N, ND, NH, NS, NV, NW + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), T( LDT, * ), + $ V( LDV, * ), WORK( * ), WV( LDWV, * ), + $ Z( LDZ, * ) +* .. +* +* ****************************************************************** +* Aggressive early deflation: +* +* This subroutine accepts as input an upper Hessenberg matrix +* H and performs an orthogonal similarity transformation +* designed to detect and deflate fully converged eigenvalues from +* a trailing principal submatrix. On output H has been over- +* written by a new Hessenberg matrix that is a perturbation of +* an orthogonal similarity transformation of H. It is to be +* hoped that the final version of H has many zero subdiagonal +* entries. +* +* ****************************************************************** +* WANTT (input) LOGICAL +* If .TRUE., then the Hessenberg matrix H is fully updated +* so that the quasi-triangular Schur factor may be +* computed (in cooperation with the calling subroutine). +* If .FALSE., then only enough of H is updated to preserve +* the eigenvalues. +* +* WANTZ (input) LOGICAL +* If .TRUE., then the orthogonal matrix Z is updated so +* so that the orthogonal Schur factor may be computed +* (in cooperation with the calling subroutine). +* If .FALSE., then Z is not referenced. +* +* N (input) INTEGER +* The order of the matrix H and (if WANTZ is .TRUE.) the +* order of the orthogonal matrix Z. +* +* KTOP (input) INTEGER +* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0. +* KBOT and KTOP together determine an isolated block +* along the diagonal of the Hessenberg matrix. +* +* KBOT (input) INTEGER +* It is assumed without a check that either +* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together +* determine an isolated block along the diagonal of the +* Hessenberg matrix. +* +* NW (input) INTEGER +* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1). +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On input the initial N-by-N section of H stores the +* Hessenberg matrix undergoing aggressive early deflation. +* On output H has been transformed by an orthogonal +* similarity transformation, perturbed, and the returned +* to Hessenberg form that (it is to be hoped) has some +* zero subdiagonal entries. +* +* LDH (input) integer +* Leading dimension of H just as declared in the calling +* subroutine. N .LE. LDH +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI) +* IF WANTZ is .TRUE., then on output, the orthogonal +* similarity transformation mentioned above has been +* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ is .FALSE., then Z is unreferenced. +* +* LDZ (input) integer +* The leading dimension of Z just as declared in the +* calling subroutine. 1 .LE. LDZ. +* +* NS (output) integer +* The number of unconverged (ie approximate) eigenvalues +* returned in SR and SI that may be used as shifts by the +* calling subroutine. +* +* ND (output) integer +* The number of converged eigenvalues uncovered by this +* subroutine. +* +* SR (output) DOUBLE PRECISION array, dimension KBOT +* SI (output) DOUBLE PRECISION array, dimension KBOT +* On output, the real and imaginary parts of approximate +* eigenvalues that may be used for shifts are stored in +* SR(KBOT-ND-NS+1) through SR(KBOT-ND) and +* SI(KBOT-ND-NS+1) through SI(KBOT-ND), respectively. +* The real and imaginary parts of converged eigenvalues +* are stored in SR(KBOT-ND+1) through SR(KBOT) and +* SI(KBOT-ND+1) through SI(KBOT), respectively. +* +* V (workspace) DOUBLE PRECISION array, dimension (LDV,NW) +* An NW-by-NW work array. +* +* LDV (input) integer scalar +* The leading dimension of V just as declared in the +* calling subroutine. NW .LE. LDV +* +* NH (input) integer scalar +* The number of columns of T. NH.GE.NW. +* +* T (workspace) DOUBLE PRECISION array, dimension (LDT,NW) +* +* LDT (input) integer +* The leading dimension of T just as declared in the +* calling subroutine. NW .LE. LDT +* +* NV (input) integer +* The number of rows of work array WV available for +* workspace. NV.GE.NW. +* +* WV (workspace) DOUBLE PRECISION array, dimension (LDWV,NW) +* +* LDWV (input) integer +* The leading dimension of W just as declared in the +* calling subroutine. NW .LE. LDV +* +* WORK (workspace) DOUBLE PRECISION array, dimension LWORK. +* On exit, WORK(1) is set to an estimate of the optimal value +* of LWORK for the given values of N, NW, KTOP and KBOT. +* +* LWORK (input) integer +* The dimension of the work array WORK. LWORK = 2*NW +* suffices, but greater efficiency may result from larger +* values of LWORK. +* +* If LWORK = -1, then a workspace query is assumed; DLAQR3 +* only estimates the optimal workspace size for the given +* values of N, NW, KTOP and KBOT. The estimate is returned +* in WORK(1). No error message related to LWORK is issued +* by XERBLA. Neither H nor Z are accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================== +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, BB, BETA, CC, CS, DD, EVI, EVK, FOO, S, + $ SAFMAX, SAFMIN, SMLNUM, SN, TAU, ULP + INTEGER I, IFST, ILST, INFO, INFQR, J, JW, K, KCOL, + $ KEND, KLN, KROW, KWTOP, LTOP, LWK1, LWK2, LWK3, + $ LWKOPT, NMIN + LOGICAL BULGE, SORTED +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + INTEGER ILAENV + EXTERNAL DLAMCH, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEHRD, DGEMM, DLABAD, DLACPY, DLAHQR, + $ DLANV2, DLAQR4, DLARF, DLARFG, DLASET, DORGHR, + $ DTREXC +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, INT, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* ==== Estimate optimal workspace. ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + IF( JW.LE.2 ) THEN + LWKOPT = 1 + ELSE +* +* ==== Workspace query call to DGEHRD ==== +* + CALL DGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK1 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to DORGHR ==== +* + CALL DORGHR( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK2 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to DLAQR4 ==== +* + CALL DLAQR4( .true., .true., JW, 1, JW, T, LDT, SR, SI, 1, JW, + $ V, LDV, WORK, -1, INFQR ) + LWK3 = INT( WORK( 1 ) ) +* +* ==== Optimal workspace ==== +* + LWKOPT = MAX( JW+MAX( LWK1, LWK2 ), LWK3 ) + END IF +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DBLE( LWKOPT ) + RETURN + END IF +* +* ==== Nothing to do ... +* ... for an empty active block ... ==== + NS = 0 + ND = 0 + IF( KTOP.GT.KBOT ) + $ RETURN +* ... nor for an empty deflation window. ==== + IF( NW.LT.1 ) + $ RETURN +* +* ==== Machine constants ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = ONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Setup deflation window ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + KWTOP = KBOT - JW + 1 + IF( KWTOP.EQ.KTOP ) THEN + S = ZERO + ELSE + S = H( KWTOP, KWTOP-1 ) + END IF +* + IF( KBOT.EQ.KWTOP ) THEN +* +* ==== 1-by-1 deflation window: not much to do ==== +* + SR( KWTOP ) = H( KWTOP, KWTOP ) + SI( KWTOP ) = ZERO + NS = 1 + ND = 0 + IF( ABS( S ).LE.MAX( SMLNUM, ULP*ABS( H( KWTOP, KWTOP ) ) ) ) + $ THEN + NS = 0 + ND = 1 + IF( KWTOP.GT.KTOP ) + $ H( KWTOP, KWTOP-1 ) = ZERO + END IF + RETURN + END IF +* +* ==== Convert to spike-triangular form. (In case of a +* . rare QR failure, this routine continues to do +* . aggressive early deflation using that part of +* . the deflation window that converged using INFQR +* . here and there to keep track.) ==== +* + CALL DLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT ) + CALL DCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 ) +* + CALL DLASET( 'A', JW, JW, ZERO, ONE, V, LDV ) + NMIN = ILAENV( 12, 'DLAQR3', 'SV', JW, 1, JW, LWORK ) + IF( JW.GT.NMIN ) THEN + CALL DLAQR4( .true., .true., JW, 1, JW, T, LDT, SR( KWTOP ), + $ SI( KWTOP ), 1, JW, V, LDV, WORK, LWORK, INFQR ) + ELSE + CALL DLAHQR( .true., .true., JW, 1, JW, T, LDT, SR( KWTOP ), + $ SI( KWTOP ), 1, JW, V, LDV, INFQR ) + END IF +* +* ==== DTREXC needs a clean margin near the diagonal ==== +* + DO 10 J = 1, JW - 3 + T( J+2, J ) = ZERO + T( J+3, J ) = ZERO + 10 CONTINUE + IF( JW.GT.2 ) + $ T( JW, JW-2 ) = ZERO +* +* ==== Deflation detection loop ==== +* + NS = JW + ILST = INFQR + 1 + 20 CONTINUE + IF( ILST.LE.NS ) THEN + IF( NS.EQ.1 ) THEN + BULGE = .FALSE. + ELSE + BULGE = T( NS, NS-1 ).NE.ZERO + END IF +* +* ==== Small spike tip test for deflation ==== +* + IF( .NOT.BULGE ) THEN +* +* ==== Real eigenvalue ==== +* + FOO = ABS( T( NS, NS ) ) + IF( FOO.EQ.ZERO ) + $ FOO = ABS( S ) + IF( ABS( S*V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) ) THEN +* +* ==== Deflatable ==== +* + NS = NS - 1 + ELSE +* +* ==== Undeflatable. Move it up out of the way. +* . (DTREXC can not fail in this case.) ==== +* + IFST = NS + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + ILST = ILST + 1 + END IF + ELSE +* +* ==== Complex conjugate pair ==== +* + FOO = ABS( T( NS, NS ) ) + SQRT( ABS( T( NS, NS-1 ) ) )* + $ SQRT( ABS( T( NS-1, NS ) ) ) + IF( FOO.EQ.ZERO ) + $ FOO = ABS( S ) + IF( MAX( ABS( S*V( 1, NS ) ), ABS( S*V( 1, NS-1 ) ) ).LE. + $ MAX( SMLNUM, ULP*FOO ) ) THEN +* +* ==== Deflatable ==== +* + NS = NS - 2 + ELSE +* +* ==== Undflatable. Move them up out of the way. +* . Fortunately, DTREXC does the right thing with +* . ILST in case of a rare exchange failure. ==== +* + IFST = NS + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + ILST = ILST + 2 + END IF + END IF +* +* ==== End deflation detection loop ==== +* + GO TO 20 + END IF +* +* ==== Return to Hessenberg form ==== +* + IF( NS.EQ.0 ) + $ S = ZERO +* + IF( NS.LT.JW ) THEN +* +* ==== sorting diagonal blocks of T improves accuracy for +* . graded matrices. Bubble sort deals well with +* . exchange failures. ==== +* + SORTED = .false. + I = NS + 1 + 30 CONTINUE + IF( SORTED ) + $ GO TO 50 + SORTED = .true. +* + KEND = I - 1 + I = INFQR + 1 + IF( I.EQ.NS ) THEN + K = I + 1 + ELSE IF( T( I+1, I ).EQ.ZERO ) THEN + K = I + 1 + ELSE + K = I + 2 + END IF + 40 CONTINUE + IF( K.LE.KEND ) THEN + IF( K.EQ.I+1 ) THEN + EVI = ABS( T( I, I ) ) + ELSE + EVI = ABS( T( I, I ) ) + SQRT( ABS( T( I+1, I ) ) )* + $ SQRT( ABS( T( I, I+1 ) ) ) + END IF +* + IF( K.EQ.KEND ) THEN + EVK = ABS( T( K, K ) ) + ELSE IF( T( K+1, K ).EQ.ZERO ) THEN + EVK = ABS( T( K, K ) ) + ELSE + EVK = ABS( T( K, K ) ) + SQRT( ABS( T( K+1, K ) ) )* + $ SQRT( ABS( T( K, K+1 ) ) ) + END IF +* + IF( EVI.GE.EVK ) THEN + I = K + ELSE + SORTED = .false. + IFST = I + ILST = K + CALL DTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, WORK, + $ INFO ) + IF( INFO.EQ.0 ) THEN + I = ILST + ELSE + I = K + END IF + END IF + IF( I.EQ.KEND ) THEN + K = I + 1 + ELSE IF( T( I+1, I ).EQ.ZERO ) THEN + K = I + 1 + ELSE + K = I + 2 + END IF + GO TO 40 + END IF + GO TO 30 + 50 CONTINUE + END IF +* +* ==== Restore shift/eigenvalue array from T ==== +* + I = JW + 60 CONTINUE + IF( I.GE.INFQR+1 ) THEN + IF( I.EQ.INFQR+1 ) THEN + SR( KWTOP+I-1 ) = T( I, I ) + SI( KWTOP+I-1 ) = ZERO + I = I - 1 + ELSE IF( T( I, I-1 ).EQ.ZERO ) THEN + SR( KWTOP+I-1 ) = T( I, I ) + SI( KWTOP+I-1 ) = ZERO + I = I - 1 + ELSE + AA = T( I-1, I-1 ) + CC = T( I, I-1 ) + BB = T( I-1, I ) + DD = T( I, I ) + CALL DLANV2( AA, BB, CC, DD, SR( KWTOP+I-2 ), + $ SI( KWTOP+I-2 ), SR( KWTOP+I-1 ), + $ SI( KWTOP+I-1 ), CS, SN ) + I = I - 2 + END IF + GO TO 60 + END IF +* + IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN +* +* ==== Reflect spike back into lower triangle ==== +* + CALL DCOPY( NS, V, LDV, WORK, 1 ) + BETA = WORK( 1 ) + CALL DLARFG( NS, BETA, WORK( 2 ), 1, TAU ) + WORK( 1 ) = ONE +* + CALL DLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT ) +* + CALL DLARF( 'L', NS, JW, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL DLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL DLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV, + $ WORK( JW+1 ) ) +* + CALL DGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + END IF +* +* ==== Copy updated reduced window into place ==== +* + IF( KWTOP.GT.1 ) + $ H( KWTOP, KWTOP-1 ) = S*V( 1, 1 ) + CALL DLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH ) + CALL DCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ), + $ LDH+1 ) +* +* ==== Accumulate orthogonal matrix in order update +* . H and Z, if requested. (A modified version +* . of DORGHR that accumulates block Householder +* . transformations into V directly might be +* . marginally more efficient than the following.) ==== +* + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN + CALL DORGHR( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + CALL DGEMM( 'N', 'N', JW, NS, NS, ONE, V, LDV, T, LDT, ZERO, + $ WV, LDWV ) + CALL DLACPY( 'A', JW, NS, WV, LDWV, V, LDV ) + END IF +* +* ==== Update vertical slab in H ==== +* + IF( WANTT ) THEN + LTOP = 1 + ELSE + LTOP = KTOP + END IF + DO 70 KROW = LTOP, KWTOP - 1, NV + KLN = MIN( NV, KWTOP-KROW ) + CALL DGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ), + $ LDH, V, LDV, ZERO, WV, LDWV ) + CALL DLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH ) + 70 CONTINUE +* +* ==== Update horizontal slab in H ==== +* + IF( WANTT ) THEN + DO 80 KCOL = KBOT + 1, N, NH + KLN = MIN( NH, N-KCOL+1 ) + CALL DGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV, + $ H( KWTOP, KCOL ), LDH, ZERO, T, LDT ) + CALL DLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ), + $ LDH ) + 80 CONTINUE + END IF +* +* ==== Update vertical slab in Z ==== +* + IF( WANTZ ) THEN + DO 90 KROW = ILOZ, IHIZ, NV + KLN = MIN( NV, IHIZ-KROW+1 ) + CALL DGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ), + $ LDZ, V, LDV, ZERO, WV, LDWV ) + CALL DLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ), + $ LDZ ) + 90 CONTINUE + END IF + END IF +* +* ==== Return the number of deflations ... ==== +* + ND = JW - NS +* +* ==== ... and the number of shifts. (Subtracting +* . INFQR from the spike length takes care +* . of the case of a rare QR failure while +* . calculating eigenvalues of the deflation +* . window.) ==== +* + NS = NS - INFQR +* +* ==== Return optimal workspace. ==== +* + WORK( 1 ) = DBLE( LWKOPT ) +* +* ==== End of DLAQR3 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqr4.f b/2.3-1/src/fortran/lapack/dlaqr4.f new file mode 100644 index 00000000..8692e7f9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr4.f @@ -0,0 +1,640 @@ + SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, + $ ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ), + $ Z( LDZ, * ) +* .. +* +* This subroutine implements one level of recursion for DLAQR0. +* It is a complete implementation of the small bulge multi-shift +* QR algorithm. It may be called by DLAQR0 and, for large enough +* deflation window size, it may be called by DLAQR3. This +* subroutine is identical to DLAQR0 except that it calls DLAQR2 +* instead of DLAQR3. +* +* Purpose +* ======= +* +* DLAQR4 computes the eigenvalues of a Hessenberg matrix H +* and, optionally, the matrices T and Z from the Schur decomposition +* H = Z T Z**T, where T is an upper quasi-triangular matrix (the +* Schur form), and Z is the orthogonal matrix of Schur vectors. +* +* Optionally Z may be postmultiplied into an input orthogonal +* matrix Q so that this routine can give the Schur factorization +* of a matrix A which has been reduced to the Hessenberg form H +* by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N .GE. 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1, +* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a +* previous call to DGEBAL, and then passed to DGEHRD when the +* matrix output by DGEBAL is reduced to Hessenberg form. +* Otherwise, ILO and IHI should be set to 1 and N, +* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. +* If N = 0, then ILO = 1 and IHI = 0. +* +* H (input/output) DOUBLE PRECISION array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO = 0 and WANTT is .TRUE., then H contains +* the upper quasi-triangular matrix T from the Schur +* decomposition (the Schur form); 2-by-2 diagonal blocks +* (corresponding to complex conjugate pairs of eigenvalues) +* are returned in standard form, with H(i,i) = H(i+1,i+1) +* and H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and WANTT is +* .FALSE., then the contents of H are unspecified on exit. +* (The output value of H when INFO.GT.0 is given under the +* description of INFO below.) +* +* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and +* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH .GE. max(1,N). +* +* WR (output) DOUBLE PRECISION array, dimension (IHI) +* WI (output) DOUBLE PRECISION array, dimension (IHI) +* The real and imaginary parts, respectively, of the computed +* eigenvalues of H(ILO:IHI,ILO:IHI) are stored WR(ILO:IHI) +* and WI(ILO:IHI). If two eigenvalues are computed as a +* complex conjugate pair, they are stored in consecutive +* elements of WR and WI, say the i-th and (i+1)th, with +* WI(i) .GT. 0 and WI(i+1) .LT. 0. If WANTT is .TRUE., then +* the eigenvalues are stored in the same order as on the +* diagonal of the Schur form returned in H, with +* WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal +* block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and +* WI(i+1) = -WI(i). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. +* 1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,IHI) +* If WANTZ is .FALSE., then Z is not referenced. +* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is +* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the +* orthogonal Schur factor of H(ILO:IHI,ILO:IHI). +* (The output value of Z when INFO.GT.0 is given under +* the description of INFO below.) +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. if WANTZ is .TRUE. +* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension LWORK +* On exit, if LWORK = -1, WORK(1) returns an estimate of +* the optimal value for LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK .GE. max(1,N) +* is sufficient, but LWORK typically as large as 6*N may +* be required for optimal performance. A workspace query +* to determine the optimal workspace size is recommended. +* +* If LWORK = -1, then DLAQR4 does a workspace query. +* In this case, DLAQR4 checks the input parameters and +* estimates the optimal workspace size for the given +* values of N, ILO and IHI. The estimate is returned +* in WORK(1). No error message related to LWORK is +* issued by XERBLA. Neither H nor Z are accessed. +* +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: if INFO = i, DLAQR4 failed to compute all of +* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR +* and WI contain those eigenvalues which have been +* successfully computed. (Failures are rare.) +* +* If INFO .GT. 0 and WANT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the eigen- +* values of the upper Hessenberg matrix rows and +* columns ILO through INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* +* (*) (initial value of H)*U = U*(final value of H) +* +* where U is an orthogonal matrix. The final +* value of H is upper Hessenberg and quasi-triangular +* in rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* +* (final value of Z(ILO:IHI,ILOZ:IHIZ) +* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U +* +* where U is the orthogonal matrix in (*) (regard- +* less of the value of WANTT.) +* +* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not +* accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* References: +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 +* Performance, SIAM Journal of Matrix Analysis, volume 23, pages +* 929--947, 2002. +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part II: Aggressive Early Deflation, SIAM Journal +* of Matrix Analysis, volume 23, pages 948--973, 2002. +* +* ================================================================ +* .. Parameters .. +* +* ==== Matrices of order NTINY or smaller must be processed by +* . DLAHQR because of insufficient subdiagonal scratch space. +* . (This is a hard limit.) ==== +* +* ==== Exceptional deflation windows: try to cure rare +* . slow convergence by increasing the size of the +* . deflation window after KEXNW iterations. ===== +* +* ==== Exceptional shifts: try to cure rare slow convergence +* . with ad-hoc exceptional shifts every KEXSH iterations. +* . The constants WILK1 and WILK2 are used to form the +* . exceptional shifts. ==== +* + INTEGER NTINY + PARAMETER ( NTINY = 11 ) + INTEGER KEXNW, KEXSH + PARAMETER ( KEXNW = 5, KEXSH = 6 ) + DOUBLE PRECISION WILK1, WILK2 + PARAMETER ( WILK1 = 0.75d0, WILK2 = -0.4375d0 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AA, BB, CC, CS, DD, SN, SS, SWAP + INTEGER I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS, + $ KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS, + $ LWKOPT, NDFL, NH, NHO, NIBBLE, NMIN, NS, NSMAX, + $ NSR, NVE, NW, NWMAX, NWR + LOGICAL NWINC, SORTED + CHARACTER JBCMPZ*2 +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Local Arrays .. + DOUBLE PRECISION ZDUM( 1, 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLACPY, DLAHQR, DLANV2, DLAQR2, DLAQR5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, INT, MAX, MIN, MOD +* .. +* .. Executable Statements .. + INFO = 0 +* +* ==== Quick return for N = 0: nothing to do. ==== +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = ONE + RETURN + END IF +* +* ==== Set up job flags for ILAENV. ==== +* + IF( WANTT ) THEN + JBCMPZ( 1: 1 ) = 'S' + ELSE + JBCMPZ( 1: 1 ) = 'E' + END IF + IF( WANTZ ) THEN + JBCMPZ( 2: 2 ) = 'V' + ELSE + JBCMPZ( 2: 2 ) = 'N' + END IF +* +* ==== Tiny matrices must use DLAHQR. ==== +* + IF( N.LE.NTINY ) THEN +* +* ==== Estimate optimal workspace. ==== +* + LWKOPT = 1 + IF( LWORK.NE.-1 ) + $ CALL DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI, + $ ILOZ, IHIZ, Z, LDZ, INFO ) + ELSE +* +* ==== Use small bulge multi-shift QR with aggressive early +* . deflation on larger-than-tiny matrices. ==== +* +* ==== Hope for the best. ==== +* + INFO = 0 +* +* ==== NWR = recommended deflation window size. At this +* . point, N .GT. NTINY = 11, so there is enough +* . subdiagonal workspace for NWR.GE.2 as required. +* . (In fact, there is enough subdiagonal space for +* . NWR.GE.3.) ==== +* + NWR = ILAENV( 13, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NWR = MAX( 2, NWR ) + NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) + NW = NWR +* +* ==== NSR = recommended number of simultaneous shifts. +* . At this point N .GT. NTINY = 11, so there is at +* . enough subdiagonal workspace for NSR to be even +* . and greater than or equal to two as required. ==== +* + NSR = ILAENV( 15, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO ) + NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) +* +* ==== Estimate optimal workspace ==== +* +* ==== Workspace query call to DLAQR2 ==== +* + CALL DLAQR2( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, WR, WI, H, LDH, N, H, LDH, + $ N, H, LDH, WORK, -1 ) +* +* ==== Optimal workspace = MAX(DLAQR5, DLAQR2) ==== +* + LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) ) +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DBLE( LWKOPT ) + RETURN + END IF +* +* ==== DLAHQR/DLAQR0 crossover point ==== +* + NMIN = ILAENV( 12, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NMIN = MAX( NTINY, NMIN ) +* +* ==== Nibble crossover point ==== +* + NIBBLE = ILAENV( 14, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NIBBLE = MAX( 0, NIBBLE ) +* +* ==== Accumulate reflections during ttswp? Use block +* . 2-by-2 structure during matrix-matrix multiply? ==== +* + KACC22 = ILAENV( 16, 'DLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + KACC22 = MAX( 0, KACC22 ) + KACC22 = MIN( 2, KACC22 ) +* +* ==== NWMAX = the largest possible deflation window for +* . which there is sufficient workspace. ==== +* + NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 ) +* +* ==== NSMAX = the Largest number of simultaneous shifts +* . for which there is sufficient workspace. ==== +* + NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 ) + NSMAX = NSMAX - MOD( NSMAX, 2 ) +* +* ==== NDFL: an iteration count restarted at deflation. ==== +* + NDFL = 1 +* +* ==== ITMAX = iteration limit ==== +* + ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) ) +* +* ==== Last row and column in the active block ==== +* + KBOT = IHI +* +* ==== Main Loop ==== +* + DO 80 IT = 1, ITMAX +* +* ==== Done when KBOT falls below ILO ==== +* + IF( KBOT.LT.ILO ) + $ GO TO 90 +* +* ==== Locate active block ==== +* + DO 10 K = KBOT, ILO + 1, -1 + IF( H( K, K-1 ).EQ.ZERO ) + $ GO TO 20 + 10 CONTINUE + K = ILO + 20 CONTINUE + KTOP = K +* +* ==== Select deflation window size ==== +* + NH = KBOT - KTOP + 1 + IF( NDFL.LT.KEXNW .OR. NH.LT.NW ) THEN +* +* ==== Typical deflation window. If possible and +* . advisable, nibble the entire active block. +* . If not, use size NWR or NWR+1 depending upon +* . which has the smaller corresponding subdiagonal +* . entry (a heuristic). ==== +* + NWINC = .TRUE. + IF( NH.LE.MIN( NMIN, NWMAX ) ) THEN + NW = NH + ELSE + NW = MIN( NWR, NH, NWMAX ) + IF( NW.LT.NWMAX ) THEN + IF( NW.GE.NH-1 ) THEN + NW = NH + ELSE + KWTOP = KBOT - NW + 1 + IF( ABS( H( KWTOP, KWTOP-1 ) ).GT. + $ ABS( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1 + END IF + END IF + END IF + ELSE +* +* ==== Exceptional deflation window. If there have +* . been no deflations in KEXNW or more iterations, +* . then vary the deflation window size. At first, +* . because, larger windows are, in general, more +* . powerful than smaller ones, rapidly increase the +* . window up to the maximum reasonable and possible. +* . Then maybe try a slightly smaller window. ==== +* + IF( NWINC .AND. NW.LT.MIN( NWMAX, NH ) ) THEN + NW = MIN( NWMAX, NH, 2*NW ) + ELSE + NWINC = .FALSE. + IF( NW.EQ.NH .AND. NH.GT.2 ) + $ NW = NH - 1 + END IF + END IF +* +* ==== Aggressive early deflation: +* . split workspace under the subdiagonal into +* . - an nw-by-nw work array V in the lower +* . left-hand-corner, +* . - an NW-by-at-least-NW-but-more-is-better +* . (NW-by-NHO) horizontal work array along +* . the bottom edge, +* . - an at-least-NW-but-more-is-better (NHV-by-NW) +* . vertical work array along the left-hand-edge. +* . ==== +* + KV = N - NW + 1 + KT = NW + 1 + NHO = ( N-NW-1 ) - KT + 1 + KWV = NW + 2 + NVE = ( N-NW ) - KWV + 1 +* +* ==== Aggressive early deflation ==== +* + CALL DLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, WR, WI, H( KV, 1 ), LDH, + $ NHO, H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, + $ WORK, LWORK ) +* +* ==== Adjust KBOT accounting for new deflations. ==== +* + KBOT = KBOT - LD +* +* ==== KS points to the shifts. ==== +* + KS = KBOT - LS + 1 +* +* ==== Skip an expensive QR sweep if there is a (partly +* . heuristic) reason to expect that many eigenvalues +* . will deflate without it. Here, the QR sweep is +* . skipped if many eigenvalues have just been deflated +* . or if the remaining active block is small. +* + IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT- + $ KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN +* +* ==== NS = nominal number of simultaneous shifts. +* . This may be lowered (slightly) if DLAQR2 +* . did not provide that many shifts. ==== +* + NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) ) + NS = NS - MOD( NS, 2 ) +* +* ==== If there have been no deflations +* . in a multiple of KEXSH iterations, +* . then try exceptional shifts. +* . Otherwise use shifts provided by +* . DLAQR2 above or from the eigenvalues +* . of a trailing principal submatrix. ==== +* + IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN + KS = KBOT - NS + 1 + DO 30 I = KBOT, MAX( KS+1, KTOP+2 ), -2 + SS = ABS( H( I, I-1 ) ) + ABS( H( I-1, I-2 ) ) + AA = WILK1*SS + H( I, I ) + BB = SS + CC = WILK2*SS + DD = AA + CALL DLANV2( AA, BB, CC, DD, WR( I-1 ), WI( I-1 ), + $ WR( I ), WI( I ), CS, SN ) + 30 CONTINUE + IF( KS.EQ.KTOP ) THEN + WR( KS+1 ) = H( KS+1, KS+1 ) + WI( KS+1 ) = ZERO + WR( KS ) = WR( KS+1 ) + WI( KS ) = WI( KS+1 ) + END IF + ELSE +* +* ==== Got NS/2 or fewer shifts? Use DLAHQR +* . on a trailing principal submatrix to +* . get more. (Since NS.LE.NSMAX.LE.(N+6)/9, +* . there is enough space below the subdiagonal +* . to fit an NS-by-NS scratch array.) ==== +* + IF( KBOT-KS+1.LE.NS / 2 ) THEN + KS = KBOT - NS + 1 + KT = N - NS + 1 + CALL DLACPY( 'A', NS, NS, H( KS, KS ), LDH, + $ H( KT, 1 ), LDH ) + CALL DLAHQR( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, WR( KS ), WI( KS ), + $ 1, 1, ZDUM, 1, INF ) + KS = KS + INF +* +* ==== In case of a rare QR failure use +* . eigenvalues of the trailing 2-by-2 +* . principal submatrix. ==== +* + IF( KS.GE.KBOT ) THEN + AA = H( KBOT-1, KBOT-1 ) + CC = H( KBOT, KBOT-1 ) + BB = H( KBOT-1, KBOT ) + DD = H( KBOT, KBOT ) + CALL DLANV2( AA, BB, CC, DD, WR( KBOT-1 ), + $ WI( KBOT-1 ), WR( KBOT ), + $ WI( KBOT ), CS, SN ) + KS = KBOT - 1 + END IF + END IF +* + IF( KBOT-KS+1.GT.NS ) THEN +* +* ==== Sort the shifts (Helps a little) +* . Bubble sort keeps complex conjugate +* . pairs together. ==== +* + SORTED = .false. + DO 50 K = KBOT, KS + 1, -1 + IF( SORTED ) + $ GO TO 60 + SORTED = .true. + DO 40 I = KS, K - 1 + IF( ABS( WR( I ) )+ABS( WI( I ) ).LT. + $ ABS( WR( I+1 ) )+ABS( WI( I+1 ) ) ) THEN + SORTED = .false. +* + SWAP = WR( I ) + WR( I ) = WR( I+1 ) + WR( I+1 ) = SWAP +* + SWAP = WI( I ) + WI( I ) = WI( I+1 ) + WI( I+1 ) = SWAP + END IF + 40 CONTINUE + 50 CONTINUE + 60 CONTINUE + END IF +* +* ==== Shuffle shifts into pairs of real shifts +* . and pairs of complex conjugate shifts +* . assuming complex conjugate shifts are +* . already adjacent to one another. (Yes, +* . they are.) ==== +* + DO 70 I = KBOT, KS + 2, -2 + IF( WI( I ).NE.-WI( I-1 ) ) THEN +* + SWAP = WR( I ) + WR( I ) = WR( I-1 ) + WR( I-1 ) = WR( I-2 ) + WR( I-2 ) = SWAP +* + SWAP = WI( I ) + WI( I ) = WI( I-1 ) + WI( I-1 ) = WI( I-2 ) + WI( I-2 ) = SWAP + END IF + 70 CONTINUE + END IF +* +* ==== If there are only two shifts and both are +* . real, then use only one. ==== +* + IF( KBOT-KS+1.EQ.2 ) THEN + IF( WI( KBOT ).EQ.ZERO ) THEN + IF( ABS( WR( KBOT )-H( KBOT, KBOT ) ).LT. + $ ABS( WR( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN + WR( KBOT-1 ) = WR( KBOT ) + ELSE + WR( KBOT ) = WR( KBOT-1 ) + END IF + END IF + END IF +* +* ==== Use up to NS of the the smallest magnatiude +* . shifts. If there aren't NS shifts available, +* . then use them all, possibly dropping one to +* . make the number of shifts even. ==== +* + NS = MIN( NS, KBOT-KS+1 ) + NS = NS - MOD( NS, 2 ) + KS = KBOT - NS + 1 +* +* ==== Small-bulge multi-shift QR sweep: +* . split workspace under the subdiagonal into +* . - a KDU-by-KDU work array U in the lower +* . left-hand-corner, +* . - a KDU-by-at-least-KDU-but-more-is-better +* . (KDU-by-NHo) horizontal work array WH along +* . the bottom edge, +* . - and an at-least-KDU-but-more-is-better-by-KDU +* . (NVE-by-KDU) vertical work WV arrow along +* . the left-hand-edge. ==== +* + KDU = 3*NS - 3 + KU = N - KDU + 1 + KWH = KDU + 1 + NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 + KWV = KDU + 4 + NVE = N - KDU - KWV + 1 +* +* ==== Small-bulge multi-shift QR sweep ==== +* + CALL DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS, + $ WR( KS ), WI( KS ), H, LDH, ILOZ, IHIZ, Z, + $ LDZ, WORK, 3, H( KU, 1 ), LDH, NVE, + $ H( KWV, 1 ), LDH, NHO, H( KU, KWH ), LDH ) + END IF +* +* ==== Note progress (or the lack of it). ==== +* + IF( LD.GT.0 ) THEN + NDFL = 1 + ELSE + NDFL = NDFL + 1 + END IF +* +* ==== End of main loop ==== + 80 CONTINUE +* +* ==== Iteration limit exceeded. Set INFO to show where +* . the problem occurred and exit. ==== +* + INFO = KBOT + 90 CONTINUE + END IF +* +* ==== Return the optimal value of LWORK. ==== +* + WORK( 1 ) = DBLE( LWKOPT ) +* +* ==== End of DLAQR4 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/dlaqr5.f b/2.3-1/src/fortran/lapack/dlaqr5.f new file mode 100644 index 00000000..17857572 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaqr5.f @@ -0,0 +1,812 @@ + SUBROUTINE DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, + $ SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, + $ LDU, NV, WV, LDWV, NH, WH, LDWH ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV, + $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + DOUBLE PRECISION H( LDH, * ), SI( * ), SR( * ), U( LDU, * ), + $ V( LDV, * ), WH( LDWH, * ), WV( LDWV, * ), + $ Z( LDZ, * ) +* .. +* +* This auxiliary subroutine called by DLAQR0 performs a +* single small-bulge multi-shift QR sweep. +* +* WANTT (input) logical scalar +* WANTT = .true. if the quasi-triangular Schur factor +* is being computed. WANTT is set to .false. otherwise. +* +* WANTZ (input) logical scalar +* WANTZ = .true. if the orthogonal Schur factor is being +* computed. WANTZ is set to .false. otherwise. +* +* KACC22 (input) integer with value 0, 1, or 2. +* Specifies the computation mode of far-from-diagonal +* orthogonal updates. +* = 0: DLAQR5 does not accumulate reflections and does not +* use matrix-matrix multiply to update far-from-diagonal +* matrix entries. +* = 1: DLAQR5 accumulates reflections and uses matrix-matrix +* multiply to update the far-from-diagonal matrix entries. +* = 2: DLAQR5 accumulates reflections, uses matrix-matrix +* multiply to update the far-from-diagonal matrix entries, +* and takes advantage of 2-by-2 block structure during +* matrix multiplies. +* +* N (input) integer scalar +* N is the order of the Hessenberg matrix H upon which this +* subroutine operates. +* +* KTOP (input) integer scalar +* KBOT (input) integer scalar +* These are the first and last rows and columns of an +* isolated diagonal block upon which the QR sweep is to be +* applied. It is assumed without a check that +* either KTOP = 1 or H(KTOP,KTOP-1) = 0 +* and +* either KBOT = N or H(KBOT+1,KBOT) = 0. +* +* NSHFTS (input) integer scalar +* NSHFTS gives the number of simultaneous shifts. NSHFTS +* must be positive and even. +* +* SR (input) DOUBLE PRECISION array of size (NSHFTS) +* SI (input) DOUBLE PRECISION array of size (NSHFTS) +* SR contains the real parts and SI contains the imaginary +* parts of the NSHFTS shifts of origin that define the +* multi-shift QR sweep. +* +* H (input/output) DOUBLE PRECISION array of size (LDH,N) +* On input H contains a Hessenberg matrix. On output a +* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied +* to the isolated diagonal block in rows and columns KTOP +* through KBOT. +* +* LDH (input) integer scalar +* LDH is the leading dimension of H just as declared in the +* calling procedure. LDH.GE.MAX(1,N). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N +* +* Z (input/output) DOUBLE PRECISION array of size (LDZ,IHI) +* If WANTZ = .TRUE., then the QR Sweep orthogonal +* similarity transformation is accumulated into +* Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ = .FALSE., then Z is unreferenced. +* +* LDZ (input) integer scalar +* LDA is the leading dimension of Z just as declared in +* the calling procedure. LDZ.GE.N. +* +* V (workspace) DOUBLE PRECISION array of size (LDV,NSHFTS/2) +* +* LDV (input) integer scalar +* LDV is the leading dimension of V as declared in the +* calling procedure. LDV.GE.3. +* +* U (workspace) DOUBLE PRECISION array of size +* (LDU,3*NSHFTS-3) +* +* LDU (input) integer scalar +* LDU is the leading dimension of U just as declared in the +* in the calling subroutine. LDU.GE.3*NSHFTS-3. +* +* NH (input) integer scalar +* NH is the number of columns in array WH available for +* workspace. NH.GE.1. +* +* WH (workspace) DOUBLE PRECISION array of size (LDWH,NH) +* +* LDWH (input) integer scalar +* Leading dimension of WH just as declared in the +* calling procedure. LDWH.GE.3*NSHFTS-3. +* +* NV (input) integer scalar +* NV is the number of rows in WV agailable for workspace. +* NV.GE.1. +* +* WV (workspace) DOUBLE PRECISION array of size +* (LDWV,3*NSHFTS-3) +* +* LDWV (input) integer scalar +* LDWV is the leading dimension of WV as declared in the +* in the calling subroutine. LDWV.GE.NV. +* +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ============================================================ +* Reference: +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and +* Level 3 Performance, SIAM Journal of Matrix Analysis, +* volume 23, pages 929--947, 2002. +* +* ============================================================ +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0d0, ONE = 1.0d0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION ALPHA, BETA, H11, H12, H21, H22, REFSUM, + $ SAFMAX, SAFMIN, SCL, SMLNUM, SWAP, TST1, TST2, + $ ULP + INTEGER I, I2, I4, INCOL, J, J2, J4, JBOT, JCOL, JLEN, + $ JROW, JTOP, K, K1, KDU, KMS, KNZ, KRCOL, KZS, + $ M, M22, MBOT, MEND, MSTART, MTOP, NBMPS, NDCOL, + $ NS, NU + LOGICAL ACCUM, BLK22, BMP22 +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. +* + INTRINSIC ABS, DBLE, MAX, MIN, MOD +* .. +* .. Local Arrays .. + DOUBLE PRECISION VT( 3 ) +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DLABAD, DLACPY, DLAQR1, DLARFG, DLASET, + $ DTRMM +* .. +* .. Executable Statements .. +* +* ==== If there are no shifts, then there is nothing to do. ==== +* + IF( NSHFTS.LT.2 ) + $ RETURN +* +* ==== If the active block is empty or 1-by-1, then there +* . is nothing to do. ==== +* + IF( KTOP.GE.KBOT ) + $ RETURN +* +* ==== Shuffle shifts into pairs of real shifts and pairs +* . of complex conjugate shifts assuming complex +* . conjugate shifts are already adjacent to one +* . another. ==== +* + DO 10 I = 1, NSHFTS - 2, 2 + IF( SI( I ).NE.-SI( I+1 ) ) THEN +* + SWAP = SR( I ) + SR( I ) = SR( I+1 ) + SR( I+1 ) = SR( I+2 ) + SR( I+2 ) = SWAP +* + SWAP = SI( I ) + SI( I ) = SI( I+1 ) + SI( I+1 ) = SI( I+2 ) + SI( I+2 ) = SWAP + END IF + 10 CONTINUE +* +* ==== NSHFTS is supposed to be even, but if is odd, +* . then simply reduce it by one. The shuffle above +* . ensures that the dropped shift is real and that +* . the remaining shifts are paired. ==== +* + NS = NSHFTS - MOD( NSHFTS, 2 ) +* +* ==== Machine constants for deflation ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = ONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Use accumulated reflections to update far-from-diagonal +* . entries ? ==== +* + ACCUM = ( KACC22.EQ.1 ) .OR. ( KACC22.EQ.2 ) +* +* ==== If so, exploit the 2-by-2 block structure? ==== +* + BLK22 = ( NS.GT.2 ) .AND. ( KACC22.EQ.2 ) +* +* ==== clear trash ==== +* + IF( KTOP+2.LE.KBOT ) + $ H( KTOP+2, KTOP ) = ZERO +* +* ==== NBMPS = number of 2-shift bulges in the chain ==== +* + NBMPS = NS / 2 +* +* ==== KDU = width of slab ==== +* + KDU = 6*NBMPS - 3 +* +* ==== Create and chase chains of NBMPS bulges ==== +* + DO 220 INCOL = 3*( 1-NBMPS ) + KTOP - 1, KBOT - 2, 3*NBMPS - 2 + NDCOL = INCOL + KDU + IF( ACCUM ) + $ CALL DLASET( 'ALL', KDU, KDU, ZERO, ONE, U, LDU ) +* +* ==== Near-the-diagonal bulge chase. The following loop +* . performs the near-the-diagonal part of a small bulge +* . multi-shift QR sweep. Each 6*NBMPS-2 column diagonal +* . chunk extends from column INCOL to column NDCOL +* . (including both column INCOL and column NDCOL). The +* . following loop chases a 3*NBMPS column long chain of +* . NBMPS bulges 3*NBMPS-2 columns to the right. (INCOL +* . may be less than KTOP and and NDCOL may be greater than +* . KBOT indicating phantom columns from which to chase +* . bulges before they are actually introduced or to which +* . to chase bulges beyond column KBOT.) ==== +* + DO 150 KRCOL = INCOL, MIN( INCOL+3*NBMPS-3, KBOT-2 ) +* +* ==== Bulges number MTOP to MBOT are active double implicit +* . shift bulges. There may or may not also be small +* . 2-by-2 bulge, if there is room. The inactive bulges +* . (if any) must wait until the active bulges have moved +* . down the diagonal to make room. The phantom matrix +* . paradigm described above helps keep track. ==== +* + MTOP = MAX( 1, ( ( KTOP-1 )-KRCOL+2 ) / 3+1 ) + MBOT = MIN( NBMPS, ( KBOT-KRCOL ) / 3 ) + M22 = MBOT + 1 + BMP22 = ( MBOT.LT.NBMPS ) .AND. ( KRCOL+3*( M22-1 ) ).EQ. + $ ( KBOT-2 ) +* +* ==== Generate reflections to chase the chain right +* . one column. (The minimum value of K is KTOP-1.) ==== +* + DO 20 M = MTOP, MBOT + K = KRCOL + 3*( M-1 ) + IF( K.EQ.KTOP-1 ) THEN + CALL DLAQR1( 3, H( KTOP, KTOP ), LDH, SR( 2*M-1 ), + $ SI( 2*M-1 ), SR( 2*M ), SI( 2*M ), + $ V( 1, M ) ) + ALPHA = V( 1, M ) + CALL DLARFG( 3, ALPHA, V( 2, M ), 1, V( 1, M ) ) + ELSE + BETA = H( K+1, K ) + V( 2, M ) = H( K+2, K ) + V( 3, M ) = H( K+3, K ) + CALL DLARFG( 3, BETA, V( 2, M ), 1, V( 1, M ) ) +* +* ==== A Bulge may collapse because of vigilant +* . deflation or destructive underflow. (The +* . initial bulge is always collapsed.) Use +* . the two-small-subdiagonals trick to try +* . to get it started again. If V(2,M).NE.0 and +* . V(3,M) = H(K+3,K+1) = H(K+3,K+2) = 0, then +* . this bulge is collapsing into a zero +* . subdiagonal. It will be restarted next +* . trip through the loop.) +* + IF( V( 1, M ).NE.ZERO .AND. + $ ( V( 3, M ).NE.ZERO .OR. ( H( K+3, + $ K+1 ).EQ.ZERO .AND. H( K+3, K+2 ).EQ.ZERO ) ) ) + $ THEN +* +* ==== Typical case: not collapsed (yet). ==== +* + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + ELSE +* +* ==== Atypical case: collapsed. Attempt to +* . reintroduce ignoring H(K+1,K). If the +* . fill resulting from the new reflector +* . is too large, then abandon it. +* . Otherwise, use the new one. ==== +* + CALL DLAQR1( 3, H( K+1, K+1 ), LDH, SR( 2*M-1 ), + $ SI( 2*M-1 ), SR( 2*M ), SI( 2*M ), + $ VT ) + SCL = ABS( VT( 1 ) ) + ABS( VT( 2 ) ) + + $ ABS( VT( 3 ) ) + IF( SCL.NE.ZERO ) THEN + VT( 1 ) = VT( 1 ) / SCL + VT( 2 ) = VT( 2 ) / SCL + VT( 3 ) = VT( 3 ) / SCL + END IF +* +* ==== The following is the traditional and +* . conservative two-small-subdiagonals +* . test. ==== +* . + IF( ABS( H( K+1, K ) )*( ABS( VT( 2 ) )+ + $ ABS( VT( 3 ) ) ).GT.ULP*ABS( VT( 1 ) )* + $ ( ABS( H( K, K ) )+ABS( H( K+1, + $ K+1 ) )+ABS( H( K+2, K+2 ) ) ) ) THEN +* +* ==== Starting a new bulge here would +* . create non-negligible fill. If +* . the old reflector is diagonal (only +* . possible with underflows), then +* . change it to I. Otherwise, use +* . it with trepidation. ==== +* + IF( V( 2, M ).EQ.ZERO .AND. V( 3, M ).EQ.ZERO ) + $ THEN + V( 1, M ) = ZERO + ELSE + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + END IF + ELSE +* +* ==== Stating a new bulge here would +* . create only negligible fill. +* . Replace the old reflector with +* . the new one. ==== +* + ALPHA = VT( 1 ) + CALL DLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) ) + REFSUM = H( K+1, K ) + H( K+2, K )*VT( 2 ) + + $ H( K+3, K )*VT( 3 ) + H( K+1, K ) = H( K+1, K ) - VT( 1 )*REFSUM + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + V( 1, M ) = VT( 1 ) + V( 2, M ) = VT( 2 ) + V( 3, M ) = VT( 3 ) + END IF + END IF + END IF + 20 CONTINUE +* +* ==== Generate a 2-by-2 reflection, if needed. ==== +* + K = KRCOL + 3*( M22-1 ) + IF( BMP22 ) THEN + IF( K.EQ.KTOP-1 ) THEN + CALL DLAQR1( 2, H( K+1, K+1 ), LDH, SR( 2*M22-1 ), + $ SI( 2*M22-1 ), SR( 2*M22 ), SI( 2*M22 ), + $ V( 1, M22 ) ) + BETA = V( 1, M22 ) + CALL DLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) ) + ELSE + BETA = H( K+1, K ) + V( 2, M22 ) = H( K+2, K ) + CALL DLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) ) + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + END IF + ELSE +* +* ==== Initialize V(1,M22) here to avoid possible undefined +* . variable problems later. ==== +* + V( 1, M22 ) = ZERO + END IF +* +* ==== Multiply H by reflections from the left ==== +* + IF( ACCUM ) THEN + JBOT = MIN( NDCOL, KBOT ) + ELSE IF( WANTT ) THEN + JBOT = N + ELSE + JBOT = KBOT + END IF + DO 40 J = MAX( KTOP, KRCOL ), JBOT + MEND = MIN( MBOT, ( J-KRCOL+2 ) / 3 ) + DO 30 M = MTOP, MEND + K = KRCOL + 3*( M-1 ) + REFSUM = V( 1, M )*( H( K+1, J )+V( 2, M )* + $ H( K+2, J )+V( 3, M )*H( K+3, J ) ) + H( K+1, J ) = H( K+1, J ) - REFSUM + H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M ) + H( K+3, J ) = H( K+3, J ) - REFSUM*V( 3, M ) + 30 CONTINUE + 40 CONTINUE + IF( BMP22 ) THEN + K = KRCOL + 3*( M22-1 ) + DO 50 J = MAX( K+1, KTOP ), JBOT + REFSUM = V( 1, M22 )*( H( K+1, J )+V( 2, M22 )* + $ H( K+2, J ) ) + H( K+1, J ) = H( K+1, J ) - REFSUM + H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M22 ) + 50 CONTINUE + END IF +* +* ==== Multiply H by reflections from the right. +* . Delay filling in the last row until the +* . vigilant deflation check is complete. ==== +* + IF( ACCUM ) THEN + JTOP = MAX( KTOP, INCOL ) + ELSE IF( WANTT ) THEN + JTOP = 1 + ELSE + JTOP = KTOP + END IF + DO 90 M = MTOP, MBOT + IF( V( 1, M ).NE.ZERO ) THEN + K = KRCOL + 3*( M-1 ) + DO 60 J = JTOP, MIN( KBOT, K+3 ) + REFSUM = V( 1, M )*( H( J, K+1 )+V( 2, M )* + $ H( J, K+2 )+V( 3, M )*H( J, K+3 ) ) + H( J, K+1 ) = H( J, K+1 ) - REFSUM + H( J, K+2 ) = H( J, K+2 ) - REFSUM*V( 2, M ) + H( J, K+3 ) = H( J, K+3 ) - REFSUM*V( 3, M ) + 60 CONTINUE +* + IF( ACCUM ) THEN +* +* ==== Accumulate U. (If necessary, update Z later +* . with with an efficient matrix-matrix +* . multiply.) ==== +* + KMS = K - INCOL + DO 70 J = MAX( 1, KTOP-INCOL ), KDU + REFSUM = V( 1, M )*( U( J, KMS+1 )+V( 2, M )* + $ U( J, KMS+2 )+V( 3, M )*U( J, KMS+3 ) ) + U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM + U( J, KMS+2 ) = U( J, KMS+2 ) - REFSUM*V( 2, M ) + U( J, KMS+3 ) = U( J, KMS+3 ) - REFSUM*V( 3, M ) + 70 CONTINUE + ELSE IF( WANTZ ) THEN +* +* ==== U is not accumulated, so update Z +* . now by multiplying by reflections +* . from the right. ==== +* + DO 80 J = ILOZ, IHIZ + REFSUM = V( 1, M )*( Z( J, K+1 )+V( 2, M )* + $ Z( J, K+2 )+V( 3, M )*Z( J, K+3 ) ) + Z( J, K+1 ) = Z( J, K+1 ) - REFSUM + Z( J, K+2 ) = Z( J, K+2 ) - REFSUM*V( 2, M ) + Z( J, K+3 ) = Z( J, K+3 ) - REFSUM*V( 3, M ) + 80 CONTINUE + END IF + END IF + 90 CONTINUE +* +* ==== Special case: 2-by-2 reflection (if needed) ==== +* + K = KRCOL + 3*( M22-1 ) + IF( BMP22 .AND. ( V( 1, M22 ).NE.ZERO ) ) THEN + DO 100 J = JTOP, MIN( KBOT, K+3 ) + REFSUM = V( 1, M22 )*( H( J, K+1 )+V( 2, M22 )* + $ H( J, K+2 ) ) + H( J, K+1 ) = H( J, K+1 ) - REFSUM + H( J, K+2 ) = H( J, K+2 ) - REFSUM*V( 2, M22 ) + 100 CONTINUE +* + IF( ACCUM ) THEN + KMS = K - INCOL + DO 110 J = MAX( 1, KTOP-INCOL ), KDU + REFSUM = V( 1, M22 )*( U( J, KMS+1 )+V( 2, M22 )* + $ U( J, KMS+2 ) ) + U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM + U( J, KMS+2 ) = U( J, KMS+2 ) - REFSUM*V( 2, M22 ) + 110 CONTINUE + ELSE IF( WANTZ ) THEN + DO 120 J = ILOZ, IHIZ + REFSUM = V( 1, M22 )*( Z( J, K+1 )+V( 2, M22 )* + $ Z( J, K+2 ) ) + Z( J, K+1 ) = Z( J, K+1 ) - REFSUM + Z( J, K+2 ) = Z( J, K+2 ) - REFSUM*V( 2, M22 ) + 120 CONTINUE + END IF + END IF +* +* ==== Vigilant deflation check ==== +* + MSTART = MTOP + IF( KRCOL+3*( MSTART-1 ).LT.KTOP ) + $ MSTART = MSTART + 1 + MEND = MBOT + IF( BMP22 ) + $ MEND = MEND + 1 + IF( KRCOL.EQ.KBOT-2 ) + $ MEND = MEND + 1 + DO 130 M = MSTART, MEND + K = MIN( KBOT-1, KRCOL+3*( M-1 ) ) +* +* ==== The following convergence test requires that +* . the tradition small-compared-to-nearby-diagonals +* . criterion and the Ahues & Tisseur (LAWN 122, 1997) +* . criteria both be satisfied. The latter improves +* . accuracy in some examples. Falling back on an +* . alternate convergence criterion when TST1 or TST2 +* . is zero (as done here) is traditional but probably +* . unnecessary. ==== +* + IF( H( K+1, K ).NE.ZERO ) THEN + TST1 = ABS( H( K, K ) ) + ABS( H( K+1, K+1 ) ) + IF( TST1.EQ.ZERO ) THEN + IF( K.GE.KTOP+1 ) + $ TST1 = TST1 + ABS( H( K, K-1 ) ) + IF( K.GE.KTOP+2 ) + $ TST1 = TST1 + ABS( H( K, K-2 ) ) + IF( K.GE.KTOP+3 ) + $ TST1 = TST1 + ABS( H( K, K-3 ) ) + IF( K.LE.KBOT-2 ) + $ TST1 = TST1 + ABS( H( K+2, K+1 ) ) + IF( K.LE.KBOT-3 ) + $ TST1 = TST1 + ABS( H( K+3, K+1 ) ) + IF( K.LE.KBOT-4 ) + $ TST1 = TST1 + ABS( H( K+4, K+1 ) ) + END IF + IF( ABS( H( K+1, K ) ).LE.MAX( SMLNUM, ULP*TST1 ) ) + $ THEN + H12 = MAX( ABS( H( K+1, K ) ), ABS( H( K, K+1 ) ) ) + H21 = MIN( ABS( H( K+1, K ) ), ABS( H( K, K+1 ) ) ) + H11 = MAX( ABS( H( K+1, K+1 ) ), + $ ABS( H( K, K )-H( K+1, K+1 ) ) ) + H22 = MIN( ABS( H( K+1, K+1 ) ), + $ ABS( H( K, K )-H( K+1, K+1 ) ) ) + SCL = H11 + H12 + TST2 = H22*( H11 / SCL ) +* + IF( TST2.EQ.ZERO .OR. H21*( H12 / SCL ).LE. + $ MAX( SMLNUM, ULP*TST2 ) )H( K+1, K ) = ZERO + END IF + END IF + 130 CONTINUE +* +* ==== Fill in the last row of each bulge. ==== +* + MEND = MIN( NBMPS, ( KBOT-KRCOL-1 ) / 3 ) + DO 140 M = MTOP, MEND + K = KRCOL + 3*( M-1 ) + REFSUM = V( 1, M )*V( 3, M )*H( K+4, K+3 ) + H( K+4, K+1 ) = -REFSUM + H( K+4, K+2 ) = -REFSUM*V( 2, M ) + H( K+4, K+3 ) = H( K+4, K+3 ) - REFSUM*V( 3, M ) + 140 CONTINUE +* +* ==== End of near-the-diagonal bulge chase. ==== +* + 150 CONTINUE +* +* ==== Use U (if accumulated) to update far-from-diagonal +* . entries in H. If required, use U to update Z as +* . well. ==== +* + IF( ACCUM ) THEN + IF( WANTT ) THEN + JTOP = 1 + JBOT = N + ELSE + JTOP = KTOP + JBOT = KBOT + END IF + IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR. + $ ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN +* +* ==== Updates not exploiting the 2-by-2 block +* . structure of U. K1 and NU keep track of +* . the location and size of U in the special +* . cases of introducing bulges and chasing +* . bulges off the bottom. In these special +* . cases and in case the number of shifts +* . is NS = 2, there is no 2-by-2 block +* . structure to exploit. ==== +* + K1 = MAX( 1, KTOP-INCOL ) + NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1 +* +* ==== Horizontal Multiply ==== +* + DO 160 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH + JLEN = MIN( NH, JBOT-JCOL+1 ) + CALL DGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ), + $ LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH, + $ LDWH ) + CALL DLACPY( 'ALL', NU, JLEN, WH, LDWH, + $ H( INCOL+K1, JCOL ), LDH ) + 160 CONTINUE +* +* ==== Vertical multiply ==== +* + DO 170 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV + JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW ) + CALL DGEMM( 'N', 'N', JLEN, NU, NU, ONE, + $ H( JROW, INCOL+K1 ), LDH, U( K1, K1 ), + $ LDU, ZERO, WV, LDWV ) + CALL DLACPY( 'ALL', JLEN, NU, WV, LDWV, + $ H( JROW, INCOL+K1 ), LDH ) + 170 CONTINUE +* +* ==== Z multiply (also vertical) ==== +* + IF( WANTZ ) THEN + DO 180 JROW = ILOZ, IHIZ, NV + JLEN = MIN( NV, IHIZ-JROW+1 ) + CALL DGEMM( 'N', 'N', JLEN, NU, NU, ONE, + $ Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ), + $ LDU, ZERO, WV, LDWV ) + CALL DLACPY( 'ALL', JLEN, NU, WV, LDWV, + $ Z( JROW, INCOL+K1 ), LDZ ) + 180 CONTINUE + END IF + ELSE +* +* ==== Updates exploiting U's 2-by-2 block structure. +* . (I2, I4, J2, J4 are the last rows and columns +* . of the blocks.) ==== +* + I2 = ( KDU+1 ) / 2 + I4 = KDU + J2 = I4 - I2 + J4 = KDU +* +* ==== KZS and KNZ deal with the band of zeros +* . along the diagonal of one of the triangular +* . blocks. ==== +* + KZS = ( J4-J2 ) - ( NS+1 ) + KNZ = NS + 1 +* +* ==== Horizontal multiply ==== +* + DO 190 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH + JLEN = MIN( NH, JBOT-JCOL+1 ) +* +* ==== Copy bottom of H to top+KZS of scratch ==== +* (The first KZS rows get multiplied by zero.) ==== +* + CALL DLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ), + $ LDH, WH( KZS+1, 1 ), LDWH ) +* +* ==== Multiply by U21' ==== +* + CALL DLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH ) + CALL DTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE, + $ U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ), + $ LDWH ) +* +* ==== Multiply top of H by U11' ==== +* + CALL DGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU, + $ H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH ) +* +* ==== Copy top of H bottom of WH ==== +* + CALL DLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH, + $ WH( I2+1, 1 ), LDWH ) +* +* ==== Multiply by U21' ==== +* + CALL DTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE, + $ U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH ) +* +* ==== Multiply by U22 ==== +* + CALL DGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE, + $ U( J2+1, I2+1 ), LDU, + $ H( INCOL+1+J2, JCOL ), LDH, ONE, + $ WH( I2+1, 1 ), LDWH ) +* +* ==== Copy it back ==== +* + CALL DLACPY( 'ALL', KDU, JLEN, WH, LDWH, + $ H( INCOL+1, JCOL ), LDH ) + 190 CONTINUE +* +* ==== Vertical multiply ==== +* + DO 200 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV + JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW ) +* +* ==== Copy right of H to scratch (the first KZS +* . columns get multiplied by zero) ==== +* + CALL DLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ), + $ LDH, WV( 1, 1+KZS ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL DLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV ) + CALL DTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE, + $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ), + $ LDWV ) +* +* ==== Multiply by U11 ==== +* + CALL DGEMM( 'N', 'N', JLEN, I2, J2, ONE, + $ H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV, + $ LDWV ) +* +* ==== Copy left of H to right of scratch ==== +* + CALL DLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH, + $ WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL DTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE, + $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U22 ==== +* + CALL DGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE, + $ H( JROW, INCOL+1+J2 ), LDH, + $ U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ), + $ LDWV ) +* +* ==== Copy it back ==== +* + CALL DLACPY( 'ALL', JLEN, KDU, WV, LDWV, + $ H( JROW, INCOL+1 ), LDH ) + 200 CONTINUE +* +* ==== Multiply Z (also vertical) ==== +* + IF( WANTZ ) THEN + DO 210 JROW = ILOZ, IHIZ, NV + JLEN = MIN( NV, IHIZ-JROW+1 ) +* +* ==== Copy right of Z to left of scratch (first +* . KZS columns get multiplied by zero) ==== +* + CALL DLACPY( 'ALL', JLEN, KNZ, + $ Z( JROW, INCOL+1+J2 ), LDZ, + $ WV( 1, 1+KZS ), LDWV ) +* +* ==== Multiply by U12 ==== +* + CALL DLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, + $ LDWV ) + CALL DTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE, + $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ), + $ LDWV ) +* +* ==== Multiply by U11 ==== +* + CALL DGEMM( 'N', 'N', JLEN, I2, J2, ONE, + $ Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE, + $ WV, LDWV ) +* +* ==== Copy left of Z to right of scratch ==== +* + CALL DLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ), + $ LDZ, WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL DTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE, + $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), + $ LDWV ) +* +* ==== Multiply by U22 ==== +* + CALL DGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE, + $ Z( JROW, INCOL+1+J2 ), LDZ, + $ U( J2+1, I2+1 ), LDU, ONE, + $ WV( 1, 1+I2 ), LDWV ) +* +* ==== Copy the result back to Z ==== +* + CALL DLACPY( 'ALL', JLEN, KDU, WV, LDWV, + $ Z( JROW, INCOL+1 ), LDZ ) + 210 CONTINUE + END IF + END IF + END IF + 220 CONTINUE +* +* ==== End of DLAQR5 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/dlarf.f b/2.3-1/src/fortran/lapack/dlarf.f new file mode 100644 index 00000000..22edc899 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarf.f @@ -0,0 +1,115 @@ + SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER INCV, LDC, M, N + DOUBLE PRECISION TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLARF applies a real elementary reflector H to a real m by n matrix +* C, from either the left or the right. H is represented in the form +* +* H = I - tau * v * v' +* +* where tau is a real scalar and v is a real vector. +* +* If tau = 0, then H is taken to be the unit matrix. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* V (input) DOUBLE PRECISION array, dimension +* (1 + (M-1)*abs(INCV)) if SIDE = 'L' +* or (1 + (N-1)*abs(INCV)) if SIDE = 'R' +* The vector v in the representation of H. V is not used if +* TAU = 0. +* +* INCV (input) INTEGER +* The increment between elements of v. INCV <> 0. +* +* TAU (input) DOUBLE PRECISION +* The value tau in the representation of H. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DGER +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C +* + IF( TAU.NE.ZERO ) THEN +* +* w := C' * v +* + CALL DGEMV( 'Transpose', M, N, ONE, C, LDC, V, INCV, ZERO, + $ WORK, 1 ) +* +* C := C - v * w' +* + CALL DGER( M, N, -TAU, V, INCV, WORK, 1, C, LDC ) + END IF + ELSE +* +* Form C * H +* + IF( TAU.NE.ZERO ) THEN +* +* w := C * v +* + CALL DGEMV( 'No transpose', M, N, ONE, C, LDC, V, INCV, + $ ZERO, WORK, 1 ) +* +* C := C - w * v' +* + CALL DGER( M, N, -TAU, WORK, 1, V, INCV, C, LDC ) + END IF + END IF + RETURN +* +* End of DLARF +* + END diff --git a/2.3-1/src/fortran/lapack/dlarfb.f b/2.3-1/src/fortran/lapack/dlarfb.f new file mode 100644 index 00000000..d4422473 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarfb.f @@ -0,0 +1,587 @@ + SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, + $ T, LDT, C, LDC, WORK, LDWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, SIDE, STOREV, TRANS + INTEGER K, LDC, LDT, LDV, LDWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ), + $ WORK( LDWORK, * ) +* .. +* +* Purpose +* ======= +* +* DLARFB applies a real block reflector H or its transpose H' to a +* real m by n matrix C, from either the left or the right. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply H or H' from the Left +* = 'R': apply H or H' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply H (No transpose) +* = 'T': apply H' (Transpose) +* +* DIRECT (input) CHARACTER*1 +* Indicates how H is formed from a product of elementary +* reflectors +* = 'F': H = H(1) H(2) . . . H(k) (Forward) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Indicates how the vectors which define the elementary +* reflectors are stored: +* = 'C': Columnwise +* = 'R': Rowwise +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* K (input) INTEGER +* The order of the matrix T (= the number of elementary +* reflectors whose product defines the block reflector). +* +* V (input) DOUBLE PRECISION array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,M) if STOREV = 'R' and SIDE = 'L' +* (LDV,N) if STOREV = 'R' and SIDE = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M); +* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N); +* if STOREV = 'R', LDV >= K. +* +* T (input) DOUBLE PRECISION array, dimension (LDT,K) +* The triangular k by k matrix T in the representation of the +* block reflector. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by H*C or H'*C or C*H or C*H'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDA >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K) +* +* LDWORK (input) INTEGER +* The leading dimension of the array WORK. +* If SIDE = 'L', LDWORK >= max(1,N); +* if SIDE = 'R', LDWORK >= max(1,M). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + CHARACTER TRANST + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEMM, DTRMM +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* + IF( LSAME( TRANS, 'N' ) ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* + IF( LSAME( STOREV, 'C' ) ) THEN +* + IF( LSAME( DIRECT, 'F' ) ) THEN +* +* Let V = ( V1 ) (first K rows) +* ( V2 ) +* where V1 is unit lower triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) +* +* W := C1' +* + DO 10 J = 1, K + CALL DCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + 10 CONTINUE +* +* W := W * V1 +* + CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, + $ K, ONE, V, LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C2'*V2 +* + CALL DGEMM( 'Transpose', 'No transpose', N, K, M-K, + $ ONE, C( K+1, 1 ), LDC, V( K+1, 1 ), LDV, + $ ONE, WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V * W' +* + IF( M.GT.K ) THEN +* +* C2 := C2 - V2 * W' +* + CALL DGEMM( 'No transpose', 'Transpose', M-K, N, K, + $ -ONE, V( K+1, 1 ), LDV, WORK, LDWORK, ONE, + $ C( K+1, 1 ), LDC ) + END IF +* +* W := W * V1' +* + CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', N, K, + $ ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W' +* + DO 30 J = 1, K + DO 20 I = 1, N + C( J, I ) = C( J, I ) - WORK( I, J ) + 20 CONTINUE + 30 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V = (C1*V1 + C2*V2) (stored in WORK) +* +* W := C1 +* + DO 40 J = 1, K + CALL DCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 40 CONTINUE +* +* W := W * V1 +* + CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, + $ K, ONE, V, LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C2 * V2 +* + CALL DGEMM( 'No transpose', 'No transpose', M, K, N-K, + $ ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV, + $ ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V' +* + IF( N.GT.K ) THEN +* +* C2 := C2 - W * V2' +* + CALL DGEMM( 'No transpose', 'Transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V( K+1, 1 ), LDV, ONE, + $ C( 1, K+1 ), LDC ) + END IF +* +* W := W * V1' +* + CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', M, K, + $ ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 60 J = 1, K + DO 50 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 50 CONTINUE + 60 CONTINUE + END IF +* + ELSE +* +* Let V = ( V1 ) +* ( V2 ) (last K rows) +* where V2 is unit upper triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) +* +* W := C2' +* + DO 70 J = 1, K + CALL DCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) + 70 CONTINUE +* +* W := W * V2 +* + CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, + $ K, ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C1'*V1 +* + CALL DGEMM( 'Transpose', 'No transpose', N, K, M-K, + $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V * W' +* + IF( M.GT.K ) THEN +* +* C1 := C1 - V1 * W' +* + CALL DGEMM( 'No transpose', 'Transpose', M-K, N, K, + $ -ONE, V, LDV, WORK, LDWORK, ONE, C, LDC ) + END IF +* +* W := W * V2' +* + CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', N, K, + $ ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK ) +* +* C2 := C2 - W' +* + DO 90 J = 1, K + DO 80 I = 1, N + C( M-K+J, I ) = C( M-K+J, I ) - WORK( I, J ) + 80 CONTINUE + 90 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V = (C1*V1 + C2*V2) (stored in WORK) +* +* W := C2 +* + DO 100 J = 1, K + CALL DCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) + 100 CONTINUE +* +* W := W * V2 +* + CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, + $ K, ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C1 * V1 +* + CALL DGEMM( 'No transpose', 'No transpose', M, K, N-K, + $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V' +* + IF( N.GT.K ) THEN +* +* C1 := C1 - W * V1' +* + CALL DGEMM( 'No transpose', 'Transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC ) + END IF +* +* W := W * V2' +* + CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', M, K, + $ ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK ) +* +* C2 := C2 - W +* + DO 120 J = 1, K + DO 110 I = 1, M + C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) + 110 CONTINUE + 120 CONTINUE + END IF + END IF +* + ELSE IF( LSAME( STOREV, 'R' ) ) THEN +* + IF( LSAME( DIRECT, 'F' ) ) THEN +* +* Let V = ( V1 V2 ) (V1: first K columns) +* where V1 is unit upper triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) +* +* W := C1' +* + DO 130 J = 1, K + CALL DCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + 130 CONTINUE +* +* W := W * V1' +* + CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', N, K, + $ ONE, V, LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C2'*V2' +* + CALL DGEMM( 'Transpose', 'Transpose', N, K, M-K, ONE, + $ C( K+1, 1 ), LDC, V( 1, K+1 ), LDV, ONE, + $ WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL DTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V' * W' +* + IF( M.GT.K ) THEN +* +* C2 := C2 - V2' * W' +* + CALL DGEMM( 'Transpose', 'Transpose', M-K, N, K, -ONE, + $ V( 1, K+1 ), LDV, WORK, LDWORK, ONE, + $ C( K+1, 1 ), LDC ) + END IF +* +* W := W * V1 +* + CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, + $ K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W' +* + DO 150 J = 1, K + DO 140 I = 1, N + C( J, I ) = C( J, I ) - WORK( I, J ) + 140 CONTINUE + 150 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) +* +* W := C1 +* + DO 160 J = 1, K + CALL DCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 160 CONTINUE +* +* W := W * V1' +* + CALL DTRMM( 'Right', 'Upper', 'Transpose', 'Unit', M, K, + $ ONE, V, LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C2 * V2' +* + CALL DGEMM( 'No transpose', 'Transpose', M, K, N-K, + $ ONE, C( 1, K+1 ), LDC, V( 1, K+1 ), LDV, + $ ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL DTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V +* + IF( N.GT.K ) THEN +* +* C2 := C2 - W * V2 +* + CALL DGEMM( 'No transpose', 'No transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V( 1, K+1 ), LDV, ONE, + $ C( 1, K+1 ), LDC ) + END IF +* +* W := W * V1 +* + CALL DTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, + $ K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 180 J = 1, K + DO 170 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 170 CONTINUE + 180 CONTINUE +* + END IF +* + ELSE +* +* Let V = ( V1 V2 ) (V2: last K columns) +* where V2 is unit lower triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) +* +* W := C2' +* + DO 190 J = 1, K + CALL DCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) + 190 CONTINUE +* +* W := W * V2' +* + CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', N, K, + $ ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C1'*V1' +* + CALL DGEMM( 'Transpose', 'Transpose', N, K, M-K, ONE, + $ C, LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V' * W' +* + IF( M.GT.K ) THEN +* +* C1 := C1 - V1' * W' +* + CALL DGEMM( 'Transpose', 'Transpose', M-K, N, K, -ONE, + $ V, LDV, WORK, LDWORK, ONE, C, LDC ) + END IF +* +* W := W * V2 +* + CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, + $ K, ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK ) +* +* C2 := C2 - W' +* + DO 210 J = 1, K + DO 200 I = 1, N + C( M-K+J, I ) = C( M-K+J, I ) - WORK( I, J ) + 200 CONTINUE + 210 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) +* +* W := C2 +* + DO 220 J = 1, K + CALL DCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) + 220 CONTINUE +* +* W := W * V2' +* + CALL DTRMM( 'Right', 'Lower', 'Transpose', 'Unit', M, K, + $ ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C1 * V1' +* + CALL DGEMM( 'No transpose', 'Transpose', M, K, N-K, + $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V +* + IF( N.GT.K ) THEN +* +* C1 := C1 - W * V1 +* + CALL DGEMM( 'No transpose', 'No transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC ) + END IF +* +* W := W * V2 +* + CALL DTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, + $ K, ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 240 J = 1, K + DO 230 I = 1, M + C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) + 230 CONTINUE + 240 CONTINUE +* + END IF +* + END IF + END IF +* + RETURN +* +* End of DLARFB +* + END diff --git a/2.3-1/src/fortran/lapack/dlarfg.f b/2.3-1/src/fortran/lapack/dlarfg.f new file mode 100644 index 00000000..be981880 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarfg.f @@ -0,0 +1,137 @@ + SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + DOUBLE PRECISION ALPHA, TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION X( * ) +* .. +* +* Purpose +* ======= +* +* DLARFG generates a real elementary reflector H of order n, such +* that +* +* H * ( alpha ) = ( beta ), H' * H = I. +* ( x ) ( 0 ) +* +* where alpha and beta are scalars, and x is an (n-1)-element real +* vector. H is represented in the form +* +* H = I - tau * ( 1 ) * ( 1 v' ) , +* ( v ) +* +* where tau is a real scalar and v is a real (n-1)-element +* vector. +* +* If the elements of x are all zero, then tau = 0 and H is taken to be +* the unit matrix. +* +* Otherwise 1 <= tau <= 2. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the elementary reflector. +* +* ALPHA (input/output) DOUBLE PRECISION +* On entry, the value alpha. +* On exit, it is overwritten with the value beta. +* +* X (input/output) DOUBLE PRECISION array, dimension +* (1+(N-2)*abs(INCX)) +* On entry, the vector x. +* On exit, it is overwritten with the vector v. +* +* INCX (input) INTEGER +* The increment between elements of X. INCX > 0. +* +* TAU (output) DOUBLE PRECISION +* The value tau. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER J, KNT + DOUBLE PRECISION BETA, RSAFMN, SAFMIN, XNORM +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLAPY2, DNRM2 + EXTERNAL DLAMCH, DLAPY2, DNRM2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SIGN +* .. +* .. External Subroutines .. + EXTERNAL DSCAL +* .. +* .. Executable Statements .. +* + IF( N.LE.1 ) THEN + TAU = ZERO + RETURN + END IF +* + XNORM = DNRM2( N-1, X, INCX ) +* + IF( XNORM.EQ.ZERO ) THEN +* +* H = I +* + TAU = ZERO + ELSE +* +* general case +* + BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA ) + SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' ) + IF( ABS( BETA ).LT.SAFMIN ) THEN +* +* XNORM, BETA may be inaccurate; scale X and recompute them +* + RSAFMN = ONE / SAFMIN + KNT = 0 + 10 CONTINUE + KNT = KNT + 1 + CALL DSCAL( N-1, RSAFMN, X, INCX ) + BETA = BETA*RSAFMN + ALPHA = ALPHA*RSAFMN + IF( ABS( BETA ).LT.SAFMIN ) + $ GO TO 10 +* +* New BETA is at most 1, at least SAFMIN +* + XNORM = DNRM2( N-1, X, INCX ) + BETA = -SIGN( DLAPY2( ALPHA, XNORM ), ALPHA ) + TAU = ( BETA-ALPHA ) / BETA + CALL DSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX ) +* +* If ALPHA is subnormal, it may lose relative accuracy +* + ALPHA = BETA + DO 20 J = 1, KNT + ALPHA = ALPHA*SAFMIN + 20 CONTINUE + ELSE + TAU = ( BETA-ALPHA ) / BETA + CALL DSCAL( N-1, ONE / ( ALPHA-BETA ), X, INCX ) + ALPHA = BETA + END IF + END IF +* + RETURN +* +* End of DLARFG +* + END diff --git a/2.3-1/src/fortran/lapack/dlarft.f b/2.3-1/src/fortran/lapack/dlarft.f new file mode 100644 index 00000000..2cd115f4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarft.f @@ -0,0 +1,217 @@ + SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, STOREV + INTEGER K, LDT, LDV, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* DLARFT forms the triangular factor T of a real block reflector H +* of order n, which is defined as a product of k elementary reflectors. +* +* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; +* +* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. +* +* If STOREV = 'C', the vector which defines the elementary reflector +* H(i) is stored in the i-th column of the array V, and +* +* H = I - V * T * V' +* +* If STOREV = 'R', the vector which defines the elementary reflector +* H(i) is stored in the i-th row of the array V, and +* +* H = I - V' * T * V +* +* Arguments +* ========= +* +* DIRECT (input) CHARACTER*1 +* Specifies the order in which the elementary reflectors are +* multiplied to form the block reflector: +* = 'F': H = H(1) H(2) . . . H(k) (Forward) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Specifies how the vectors which define the elementary +* reflectors are stored (see also Further Details): +* = 'C': columnwise +* = 'R': rowwise +* +* N (input) INTEGER +* The order of the block reflector H. N >= 0. +* +* K (input) INTEGER +* The order of the triangular factor T (= the number of +* elementary reflectors). K >= 1. +* +* V (input/output) DOUBLE PRECISION array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,N) if STOREV = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i). +* +* T (output) DOUBLE PRECISION array, dimension (LDT,K) +* The k by k triangular factor T of the block reflector. +* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is +* lower triangular. The rest of the array is not used. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* Further Details +* =============== +* +* The shape of the matrix V and the storage of the vectors which define +* the H(i) is best illustrated by the following example with n = 5 and +* k = 3. The elements equal to 1 are not stored; the corresponding +* array elements are modified but restored on exit. The rest of the +* array is not used. +* +* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': +* +* V = ( 1 ) V = ( 1 v1 v1 v1 v1 ) +* ( v1 1 ) ( 1 v2 v2 v2 ) +* ( v1 v2 1 ) ( 1 v3 v3 ) +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* +* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': +* +* V = ( v1 v2 v3 ) V = ( v1 v1 1 ) +* ( v1 v2 v3 ) ( v2 v2 v2 1 ) +* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 ) +* ( 1 v3 ) +* ( 1 ) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION VII +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DTRMV +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 20 I = 1, K + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 10 J = 1, I + T( J, I ) = ZERO + 10 CONTINUE + ELSE +* +* general case +* + VII = V( I, I ) + V( I, I ) = ONE + IF( LSAME( STOREV, 'C' ) ) THEN +* +* T(1:i-1,i) := - tau(i) * V(i:n,1:i-1)' * V(i:n,i) +* + CALL DGEMV( 'Transpose', N-I+1, I-1, -TAU( I ), + $ V( I, 1 ), LDV, V( I, I ), 1, ZERO, + $ T( 1, I ), 1 ) + ELSE +* +* T(1:i-1,i) := - tau(i) * V(1:i-1,i:n) * V(i,i:n)' +* + CALL DGEMV( 'No transpose', I-1, N-I+1, -TAU( I ), + $ V( 1, I ), LDV, V( I, I ), LDV, ZERO, + $ T( 1, I ), 1 ) + END IF + V( I, I ) = VII +* +* T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i) +* + CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, + $ LDT, T( 1, I ), 1 ) + T( I, I ) = TAU( I ) + END IF + 20 CONTINUE + ELSE + DO 40 I = K, 1, -1 + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 30 J = I, K + T( J, I ) = ZERO + 30 CONTINUE + ELSE +* +* general case +* + IF( I.LT.K ) THEN + IF( LSAME( STOREV, 'C' ) ) THEN + VII = V( N-K+I, I ) + V( N-K+I, I ) = ONE +* +* T(i+1:k,i) := +* - tau(i) * V(1:n-k+i,i+1:k)' * V(1:n-k+i,i) +* + CALL DGEMV( 'Transpose', N-K+I, K-I, -TAU( I ), + $ V( 1, I+1 ), LDV, V( 1, I ), 1, ZERO, + $ T( I+1, I ), 1 ) + V( N-K+I, I ) = VII + ELSE + VII = V( I, N-K+I ) + V( I, N-K+I ) = ONE +* +* T(i+1:k,i) := +* - tau(i) * V(i+1:k,1:n-k+i) * V(i,1:n-k+i)' +* + CALL DGEMV( 'No transpose', K-I, N-K+I, -TAU( I ), + $ V( I+1, 1 ), LDV, V( I, 1 ), LDV, ZERO, + $ T( I+1, I ), 1 ) + V( I, N-K+I ) = VII + END IF +* +* T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i) +* + CALL DTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, + $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) + END IF + T( I, I ) = TAU( I ) + END IF + 40 CONTINUE + END IF + RETURN +* +* End of DLARFT +* + END diff --git a/2.3-1/src/fortran/lapack/dlarfx.f b/2.3-1/src/fortran/lapack/dlarfx.f new file mode 100644 index 00000000..cc4654e0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarfx.f @@ -0,0 +1,638 @@ + SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER LDC, M, N + DOUBLE PRECISION TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLARFX applies a real elementary reflector H to a real m by n +* matrix C, from either the left or the right. H is represented in the +* form +* +* H = I - tau * v * v' +* +* where tau is a real scalar and v is a real vector. +* +* If tau = 0, then H is taken to be the unit matrix +* +* This version uses inline code if H has order < 11. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* V (input) DOUBLE PRECISION array, dimension (M) if SIDE = 'L' +* or (N) if SIDE = 'R' +* The vector v in the representation of H. +* +* TAU (input) DOUBLE PRECISION +* The value tau in the representation of H. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDA >= (1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* WORK is not referenced if H has order < 11. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER J + DOUBLE PRECISION SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9, + $ V1, V10, V2, V3, V4, V5, V6, V7, V8, V9 +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DGER +* .. +* .. Executable Statements .. +* + IF( TAU.EQ.ZERO ) + $ RETURN + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C, where H has order m. +* + GO TO ( 10, 30, 50, 70, 90, 110, 130, 150, + $ 170, 190 )M +* +* Code for general M +* +* w := C'*v +* + CALL DGEMV( 'Transpose', M, N, ONE, C, LDC, V, 1, ZERO, WORK, + $ 1 ) +* +* C := C - tau * v * w' +* + CALL DGER( M, N, -TAU, V, 1, WORK, 1, C, LDC ) + GO TO 410 + 10 CONTINUE +* +* Special code for 1 x 1 Householder +* + T1 = ONE - TAU*V( 1 )*V( 1 ) + DO 20 J = 1, N + C( 1, J ) = T1*C( 1, J ) + 20 CONTINUE + GO TO 410 + 30 CONTINUE +* +* Special code for 2 x 2 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + DO 40 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + 40 CONTINUE + GO TO 410 + 50 CONTINUE +* +* Special code for 3 x 3 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + DO 60 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + 60 CONTINUE + GO TO 410 + 70 CONTINUE +* +* Special code for 4 x 4 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + DO 80 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + 80 CONTINUE + GO TO 410 + 90 CONTINUE +* +* Special code for 5 x 5 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + DO 100 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + 100 CONTINUE + GO TO 410 + 110 CONTINUE +* +* Special code for 6 x 6 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + DO 120 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + 120 CONTINUE + GO TO 410 + 130 CONTINUE +* +* Special code for 7 x 7 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + DO 140 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + 140 CONTINUE + GO TO 410 + 150 CONTINUE +* +* Special code for 8 x 8 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + DO 160 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + 160 CONTINUE + GO TO 410 + 170 CONTINUE +* +* Special code for 9 x 9 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + V9 = V( 9 ) + T9 = TAU*V9 + DO 180 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + C( 9, J ) = C( 9, J ) - SUM*T9 + 180 CONTINUE + GO TO 410 + 190 CONTINUE +* +* Special code for 10 x 10 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + V9 = V( 9 ) + T9 = TAU*V9 + V10 = V( 10 ) + T10 = TAU*V10 + DO 200 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) + + $ V10*C( 10, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + C( 9, J ) = C( 9, J ) - SUM*T9 + C( 10, J ) = C( 10, J ) - SUM*T10 + 200 CONTINUE + GO TO 410 + ELSE +* +* Form C * H, where H has order n. +* + GO TO ( 210, 230, 250, 270, 290, 310, 330, 350, + $ 370, 390 )N +* +* Code for general N +* +* w := C * v +* + CALL DGEMV( 'No transpose', M, N, ONE, C, LDC, V, 1, ZERO, + $ WORK, 1 ) +* +* C := C - tau * w * v' +* + CALL DGER( M, N, -TAU, WORK, 1, V, 1, C, LDC ) + GO TO 410 + 210 CONTINUE +* +* Special code for 1 x 1 Householder +* + T1 = ONE - TAU*V( 1 )*V( 1 ) + DO 220 J = 1, M + C( J, 1 ) = T1*C( J, 1 ) + 220 CONTINUE + GO TO 410 + 230 CONTINUE +* +* Special code for 2 x 2 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + DO 240 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + 240 CONTINUE + GO TO 410 + 250 CONTINUE +* +* Special code for 3 x 3 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + DO 260 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + 260 CONTINUE + GO TO 410 + 270 CONTINUE +* +* Special code for 4 x 4 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + DO 280 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + 280 CONTINUE + GO TO 410 + 290 CONTINUE +* +* Special code for 5 x 5 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + DO 300 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + 300 CONTINUE + GO TO 410 + 310 CONTINUE +* +* Special code for 6 x 6 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + DO 320 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + 320 CONTINUE + GO TO 410 + 330 CONTINUE +* +* Special code for 7 x 7 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + DO 340 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + 340 CONTINUE + GO TO 410 + 350 CONTINUE +* +* Special code for 8 x 8 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + DO 360 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + 360 CONTINUE + GO TO 410 + 370 CONTINUE +* +* Special code for 9 x 9 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + V9 = V( 9 ) + T9 = TAU*V9 + DO 380 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + C( J, 9 ) = C( J, 9 ) - SUM*T9 + 380 CONTINUE + GO TO 410 + 390 CONTINUE +* +* Special code for 10 x 10 Householder +* + V1 = V( 1 ) + T1 = TAU*V1 + V2 = V( 2 ) + T2 = TAU*V2 + V3 = V( 3 ) + T3 = TAU*V3 + V4 = V( 4 ) + T4 = TAU*V4 + V5 = V( 5 ) + T5 = TAU*V5 + V6 = V( 6 ) + T6 = TAU*V6 + V7 = V( 7 ) + T7 = TAU*V7 + V8 = V( 8 ) + T8 = TAU*V8 + V9 = V( 9 ) + T9 = TAU*V9 + V10 = V( 10 ) + T10 = TAU*V10 + DO 400 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) + + $ V10*C( J, 10 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + C( J, 9 ) = C( J, 9 ) - SUM*T9 + C( J, 10 ) = C( J, 10 ) - SUM*T10 + 400 CONTINUE + GO TO 410 + END IF + 410 CONTINUE + RETURN +* +* End of DLARFX +* + END diff --git a/2.3-1/src/fortran/lapack/dlartg.f b/2.3-1/src/fortran/lapack/dlartg.f new file mode 100644 index 00000000..eb807c1d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlartg.f @@ -0,0 +1,145 @@ + SUBROUTINE DLARTG( F, G, CS, SN, R ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION CS, F, G, R, SN +* .. +* +* Purpose +* ======= +* +* DLARTG generate a plane rotation so that +* +* [ CS SN ] . [ F ] = [ R ] where CS**2 + SN**2 = 1. +* [ -SN CS ] [ G ] [ 0 ] +* +* This is a slower, more accurate version of the BLAS1 routine DROTG, +* with the following other differences: +* F and G are unchanged on return. +* If G=0, then CS=1 and SN=0. +* If F=0 and (G .ne. 0), then CS=0 and SN=1 without doing any +* floating point operations (saves work in DBDSQR when +* there are zeros on the diagonal). +* +* If F exceeds G in magnitude, CS will be positive. +* +* Arguments +* ========= +* +* F (input) DOUBLE PRECISION +* The first component of vector to be rotated. +* +* G (input) DOUBLE PRECISION +* The second component of vector to be rotated. +* +* CS (output) DOUBLE PRECISION +* The cosine of the rotation. +* +* SN (output) DOUBLE PRECISION +* The sine of the rotation. +* +* R (output) DOUBLE PRECISION +* The nonzero component of the rotated vector. +* +* This version has a few statements commented out for thread safety +* (machine parameters are computed on each entry). 10 feb 03, SJH. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) +* .. +* .. Local Scalars .. +* LOGICAL FIRST + INTEGER COUNT, I + DOUBLE PRECISION EPS, F1, G1, SAFMIN, SAFMN2, SAFMX2, SCALE +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, INT, LOG, MAX, SQRT +* .. +* .. Save statement .. +* SAVE FIRST, SAFMX2, SAFMIN, SAFMN2 +* .. +* .. Data statements .. +* DATA FIRST / .TRUE. / +* .. +* .. Executable Statements .. +* +* IF( FIRST ) THEN + SAFMIN = DLAMCH( 'S' ) + EPS = DLAMCH( 'E' ) + SAFMN2 = DLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) / + $ LOG( DLAMCH( 'B' ) ) / TWO ) + SAFMX2 = ONE / SAFMN2 +* FIRST = .FALSE. +* END IF + IF( G.EQ.ZERO ) THEN + CS = ONE + SN = ZERO + R = F + ELSE IF( F.EQ.ZERO ) THEN + CS = ZERO + SN = ONE + R = G + ELSE + F1 = F + G1 = G + SCALE = MAX( ABS( F1 ), ABS( G1 ) ) + IF( SCALE.GE.SAFMX2 ) THEN + COUNT = 0 + 10 CONTINUE + COUNT = COUNT + 1 + F1 = F1*SAFMN2 + G1 = G1*SAFMN2 + SCALE = MAX( ABS( F1 ), ABS( G1 ) ) + IF( SCALE.GE.SAFMX2 ) + $ GO TO 10 + R = SQRT( F1**2+G1**2 ) + CS = F1 / R + SN = G1 / R + DO 20 I = 1, COUNT + R = R*SAFMX2 + 20 CONTINUE + ELSE IF( SCALE.LE.SAFMN2 ) THEN + COUNT = 0 + 30 CONTINUE + COUNT = COUNT + 1 + F1 = F1*SAFMX2 + G1 = G1*SAFMX2 + SCALE = MAX( ABS( F1 ), ABS( G1 ) ) + IF( SCALE.LE.SAFMN2 ) + $ GO TO 30 + R = SQRT( F1**2+G1**2 ) + CS = F1 / R + SN = G1 / R + DO 40 I = 1, COUNT + R = R*SAFMN2 + 40 CONTINUE + ELSE + R = SQRT( F1**2+G1**2 ) + CS = F1 / R + SN = G1 / R + END IF + IF( ABS( F ).GT.ABS( G ) .AND. CS.LT.ZERO ) THEN + CS = -CS + SN = -SN + R = -R + END IF + END IF + RETURN +* +* End of DLARTG +* + END diff --git a/2.3-1/src/fortran/lapack/dlarz.f b/2.3-1/src/fortran/lapack/dlarz.f new file mode 100644 index 00000000..b302fdc2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarz.f @@ -0,0 +1,152 @@ + SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER INCV, L, LDC, M, N + DOUBLE PRECISION TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLARZ applies a real elementary reflector H to a real M-by-N +* matrix C, from either the left or the right. H is represented in the +* form +* +* H = I - tau * v * v' +* +* where tau is a real scalar and v is a real vector. +* +* If tau = 0, then H is taken to be the unit matrix. +* +* +* H is a product of k elementary reflectors as returned by DTZRZF. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* L (input) INTEGER +* The number of entries of the vector V containing +* the meaningful part of the Householder vectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* V (input) DOUBLE PRECISION array, dimension (1+(L-1)*abs(INCV)) +* The vector v in the representation of H as returned by +* DTZRZF. V is not used if TAU = 0. +* +* INCV (input) INTEGER +* The increment between elements of v. INCV <> 0. +* +* TAU (input) DOUBLE PRECISION +* The value tau in the representation of H. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DGER +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C +* + IF( TAU.NE.ZERO ) THEN +* +* w( 1:n ) = C( 1, 1:n ) +* + CALL DCOPY( N, C, LDC, WORK, 1 ) +* +* w( 1:n ) = w( 1:n ) + C( m-l+1:m, 1:n )' * v( 1:l ) +* + CALL DGEMV( 'Transpose', L, N, ONE, C( M-L+1, 1 ), LDC, V, + $ INCV, ONE, WORK, 1 ) +* +* C( 1, 1:n ) = C( 1, 1:n ) - tau * w( 1:n ) +* + CALL DAXPY( N, -TAU, WORK, 1, C, LDC ) +* +* C( m-l+1:m, 1:n ) = C( m-l+1:m, 1:n ) - ... +* tau * v( 1:l ) * w( 1:n )' +* + CALL DGER( L, N, -TAU, V, INCV, WORK, 1, C( M-L+1, 1 ), + $ LDC ) + END IF +* + ELSE +* +* Form C * H +* + IF( TAU.NE.ZERO ) THEN +* +* w( 1:m ) = C( 1:m, 1 ) +* + CALL DCOPY( M, C, 1, WORK, 1 ) +* +* w( 1:m ) = w( 1:m ) + C( 1:m, n-l+1:n, 1:n ) * v( 1:l ) +* + CALL DGEMV( 'No transpose', M, L, ONE, C( 1, N-L+1 ), LDC, + $ V, INCV, ONE, WORK, 1 ) +* +* C( 1:m, 1 ) = C( 1:m, 1 ) - tau * w( 1:m ) +* + CALL DAXPY( M, -TAU, WORK, 1, C, 1 ) +* +* C( 1:m, n-l+1:n ) = C( 1:m, n-l+1:n ) - ... +* tau * w( 1:m ) * v( 1:l )' +* + CALL DGER( M, L, -TAU, WORK, 1, V, INCV, C( 1, N-L+1 ), + $ LDC ) +* + END IF +* + END IF +* + RETURN +* +* End of DLARZ +* + END diff --git a/2.3-1/src/fortran/lapack/dlarzb.f b/2.3-1/src/fortran/lapack/dlarzb.f new file mode 100644 index 00000000..ec59d8d5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarzb.f @@ -0,0 +1,220 @@ + SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V, + $ LDV, T, LDT, C, LDC, WORK, LDWORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, SIDE, STOREV, TRANS + INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ), + $ WORK( LDWORK, * ) +* .. +* +* Purpose +* ======= +* +* DLARZB applies a real block reflector H or its transpose H**T to +* a real distributed M-by-N C from the left or the right. +* +* Currently, only STOREV = 'R' and DIRECT = 'B' are supported. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply H or H' from the Left +* = 'R': apply H or H' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply H (No transpose) +* = 'C': apply H' (Transpose) +* +* DIRECT (input) CHARACTER*1 +* Indicates how H is formed from a product of elementary +* reflectors +* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Indicates how the vectors which define the elementary +* reflectors are stored: +* = 'C': Columnwise (not supported yet) +* = 'R': Rowwise +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* K (input) INTEGER +* The order of the matrix T (= the number of elementary +* reflectors whose product defines the block reflector). +* +* L (input) INTEGER +* The number of columns of the matrix V containing the +* meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* V (input) DOUBLE PRECISION array, dimension (LDV,NV). +* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K. +* +* T (input) DOUBLE PRECISION array, dimension (LDT,K) +* The triangular K-by-K matrix T in the representation of the +* block reflector. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by H*C or H'*C or C*H or C*H'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (LDWORK,K) +* +* LDWORK (input) INTEGER +* The leading dimension of the array WORK. +* If SIDE = 'L', LDWORK >= max(1,N); +* if SIDE = 'R', LDWORK >= max(1,M). +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + CHARACTER TRANST + INTEGER I, INFO, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEMM, DTRMM, XERBLA +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* +* Check for currently supported options +* + INFO = 0 + IF( .NOT.LSAME( DIRECT, 'B' ) ) THEN + INFO = -3 + ELSE IF( .NOT.LSAME( STOREV, 'R' ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLARZB', -INFO ) + RETURN + END IF +* + IF( LSAME( TRANS, 'N' ) ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C +* +* W( 1:n, 1:k ) = C( 1:k, 1:n )' +* + DO 10 J = 1, K + CALL DCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + 10 CONTINUE +* +* W( 1:n, 1:k ) = W( 1:n, 1:k ) + ... +* C( m-l+1:m, 1:n )' * V( 1:k, 1:l )' +* + IF( L.GT.0 ) + $ CALL DGEMM( 'Transpose', 'Transpose', N, K, L, ONE, + $ C( M-L+1, 1 ), LDC, V, LDV, ONE, WORK, LDWORK ) +* +* W( 1:n, 1:k ) = W( 1:n, 1:k ) * T' or W( 1:m, 1:k ) * T +* + CALL DTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, ONE, T, + $ LDT, WORK, LDWORK ) +* +* C( 1:k, 1:n ) = C( 1:k, 1:n ) - W( 1:n, 1:k )' +* + DO 30 J = 1, N + DO 20 I = 1, K + C( I, J ) = C( I, J ) - WORK( J, I ) + 20 CONTINUE + 30 CONTINUE +* +* C( m-l+1:m, 1:n ) = C( m-l+1:m, 1:n ) - ... +* V( 1:k, 1:l )' * W( 1:n, 1:k )' +* + IF( L.GT.0 ) + $ CALL DGEMM( 'Transpose', 'Transpose', L, N, K, -ONE, V, LDV, + $ WORK, LDWORK, ONE, C( M-L+1, 1 ), LDC ) +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' +* +* W( 1:m, 1:k ) = C( 1:m, 1:k ) +* + DO 40 J = 1, K + CALL DCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 40 CONTINUE +* +* W( 1:m, 1:k ) = W( 1:m, 1:k ) + ... +* C( 1:m, n-l+1:n ) * V( 1:k, 1:l )' +* + IF( L.GT.0 ) + $ CALL DGEMM( 'No transpose', 'Transpose', M, K, L, ONE, + $ C( 1, N-L+1 ), LDC, V, LDV, ONE, WORK, LDWORK ) +* +* W( 1:m, 1:k ) = W( 1:m, 1:k ) * T or W( 1:m, 1:k ) * T' +* + CALL DTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, ONE, T, + $ LDT, WORK, LDWORK ) +* +* C( 1:m, 1:k ) = C( 1:m, 1:k ) - W( 1:m, 1:k ) +* + DO 60 J = 1, K + DO 50 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 50 CONTINUE + 60 CONTINUE +* +* C( 1:m, n-l+1:n ) = C( 1:m, n-l+1:n ) - ... +* W( 1:m, 1:k ) * V( 1:k, 1:l ) +* + IF( L.GT.0 ) + $ CALL DGEMM( 'No transpose', 'No transpose', M, L, K, -ONE, + $ WORK, LDWORK, V, LDV, ONE, C( 1, N-L+1 ), LDC ) +* + END IF +* + RETURN +* +* End of DLARZB +* + END diff --git a/2.3-1/src/fortran/lapack/dlarzt.f b/2.3-1/src/fortran/lapack/dlarzt.f new file mode 100644 index 00000000..d79636e0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlarzt.f @@ -0,0 +1,184 @@ + SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, STOREV + INTEGER K, LDT, LDV, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* DLARZT forms the triangular factor T of a real block reflector +* H of order > n, which is defined as a product of k elementary +* reflectors. +* +* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; +* +* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. +* +* If STOREV = 'C', the vector which defines the elementary reflector +* H(i) is stored in the i-th column of the array V, and +* +* H = I - V * T * V' +* +* If STOREV = 'R', the vector which defines the elementary reflector +* H(i) is stored in the i-th row of the array V, and +* +* H = I - V' * T * V +* +* Currently, only STOREV = 'R' and DIRECT = 'B' are supported. +* +* Arguments +* ========= +* +* DIRECT (input) CHARACTER*1 +* Specifies the order in which the elementary reflectors are +* multiplied to form the block reflector: +* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Specifies how the vectors which define the elementary +* reflectors are stored (see also Further Details): +* = 'C': columnwise (not supported yet) +* = 'R': rowwise +* +* N (input) INTEGER +* The order of the block reflector H. N >= 0. +* +* K (input) INTEGER +* The order of the triangular factor T (= the number of +* elementary reflectors). K >= 1. +* +* V (input/output) DOUBLE PRECISION array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,N) if STOREV = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i). +* +* T (output) DOUBLE PRECISION array, dimension (LDT,K) +* The k by k triangular factor T of the block reflector. +* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is +* lower triangular. The rest of the array is not used. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The shape of the matrix V and the storage of the vectors which define +* the H(i) is best illustrated by the following example with n = 5 and +* k = 3. The elements equal to 1 are not stored; the corresponding +* array elements are modified but restored on exit. The rest of the +* array is not used. +* +* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': +* +* ______V_____ +* ( v1 v2 v3 ) / \ +* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 ) +* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 ) +* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 ) +* ( v1 v2 v3 ) +* . . . +* . . . +* 1 . . +* 1 . +* 1 +* +* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': +* +* ______V_____ +* 1 / \ +* . 1 ( 1 . . . . v1 v1 v1 v1 v1 ) +* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 ) +* . . . ( . . 1 . . v3 v3 v3 v3 v3 ) +* . . . +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* V = ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DTRMV, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* +* Check for currently supported options +* + INFO = 0 + IF( .NOT.LSAME( DIRECT, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LSAME( STOREV, 'R' ) ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLARZT', -INFO ) + RETURN + END IF +* + DO 20 I = K, 1, -1 + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 10 J = I, K + T( J, I ) = ZERO + 10 CONTINUE + ELSE +* +* general case +* + IF( I.LT.K ) THEN +* +* T(i+1:k,i) = - tau(i) * V(i+1:k,1:n) * V(i,1:n)' +* + CALL DGEMV( 'No transpose', K-I, N, -TAU( I ), + $ V( I+1, 1 ), LDV, V( I, 1 ), LDV, ZERO, + $ T( I+1, I ), 1 ) +* +* T(i+1:k,i) = T(i+1:k,i+1:k) * T(i+1:k,i) +* + CALL DTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, + $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) + END IF + T( I, I ) = TAU( I ) + END IF + 20 CONTINUE + RETURN +* +* End of DLARZT +* + END diff --git a/2.3-1/src/fortran/lapack/dlas2.f b/2.3-1/src/fortran/lapack/dlas2.f new file mode 100644 index 00000000..e100a4d8 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlas2.f @@ -0,0 +1,121 @@ + SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION F, G, H, SSMAX, SSMIN +* .. +* +* Purpose +* ======= +* +* DLAS2 computes the singular values of the 2-by-2 matrix +* [ F G ] +* [ 0 H ]. +* On return, SSMIN is the smaller singular value and SSMAX is the +* larger singular value. +* +* Arguments +* ========= +* +* F (input) DOUBLE PRECISION +* The (1,1) element of the 2-by-2 matrix. +* +* G (input) DOUBLE PRECISION +* The (1,2) element of the 2-by-2 matrix. +* +* H (input) DOUBLE PRECISION +* The (2,2) element of the 2-by-2 matrix. +* +* SSMIN (output) DOUBLE PRECISION +* The smaller singular value. +* +* SSMAX (output) DOUBLE PRECISION +* The larger singular value. +* +* Further Details +* =============== +* +* Barring over/underflow, all output quantities are correct to within +* a few units in the last place (ulps), even in the absence of a guard +* digit in addition/subtraction. +* +* In IEEE arithmetic, the code works correctly if one matrix element is +* infinite. +* +* Overflow will not occur unless the largest singular value itself +* overflows, or is within a few ulps of overflow. (On machines with +* partial overflow, like the Cray, overflow may occur if the largest +* singular value is within a factor of 2 of overflow.) +* +* Underflow is harmless if underflow is gradual. Otherwise, results +* may correspond to a matrix modified by perturbations of size near +* the underflow threshold. +* +* ==================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION AS, AT, AU, C, FA, FHMN, FHMX, GA, HA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + FA = ABS( F ) + GA = ABS( G ) + HA = ABS( H ) + FHMN = MIN( FA, HA ) + FHMX = MAX( FA, HA ) + IF( FHMN.EQ.ZERO ) THEN + SSMIN = ZERO + IF( FHMX.EQ.ZERO ) THEN + SSMAX = GA + ELSE + SSMAX = MAX( FHMX, GA )*SQRT( ONE+ + $ ( MIN( FHMX, GA ) / MAX( FHMX, GA ) )**2 ) + END IF + ELSE + IF( GA.LT.FHMX ) THEN + AS = ONE + FHMN / FHMX + AT = ( FHMX-FHMN ) / FHMX + AU = ( GA / FHMX )**2 + C = TWO / ( SQRT( AS*AS+AU )+SQRT( AT*AT+AU ) ) + SSMIN = FHMN*C + SSMAX = FHMX / C + ELSE + AU = FHMX / GA + IF( AU.EQ.ZERO ) THEN +* +* Avoid possible harmful underflow if exponent range +* asymmetric (true SSMIN may not underflow even if +* AU underflows) +* + SSMIN = ( FHMN*FHMX ) / GA + SSMAX = GA + ELSE + AS = ONE + FHMN / FHMX + AT = ( FHMX-FHMN ) / FHMX + C = ONE / ( SQRT( ONE+( AS*AU )**2 )+ + $ SQRT( ONE+( AT*AU )**2 ) ) + SSMIN = ( FHMN*C )*AU + SSMIN = SSMIN + SSMIN + SSMAX = GA / ( C+C ) + END IF + END IF + END IF + RETURN +* +* End of DLAS2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlascl.f b/2.3-1/src/fortran/lapack/dlascl.f new file mode 100644 index 00000000..7a7a78fd --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlascl.f @@ -0,0 +1,267 @@ + SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TYPE + INTEGER INFO, KL, KU, LDA, M, N + DOUBLE PRECISION CFROM, CTO +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DLASCL multiplies the M by N real matrix A by the real scalar +* CTO/CFROM. This is done without over/underflow as long as the final +* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that +* A may be full, upper triangular, lower triangular, upper Hessenberg, +* or banded. +* +* Arguments +* ========= +* +* TYPE (input) CHARACTER*1 +* TYPE indices the storage type of the input matrix. +* = 'G': A is a full matrix. +* = 'L': A is a lower triangular matrix. +* = 'U': A is an upper triangular matrix. +* = 'H': A is an upper Hessenberg matrix. +* = 'B': A is a symmetric band matrix with lower bandwidth KL +* and upper bandwidth KU and with the only the lower +* half stored. +* = 'Q': A is a symmetric band matrix with lower bandwidth KL +* and upper bandwidth KU and with the only the upper +* half stored. +* = 'Z': A is a band matrix with lower bandwidth KL and upper +* bandwidth KU. +* +* KL (input) INTEGER +* The lower bandwidth of A. Referenced only if TYPE = 'B', +* 'Q' or 'Z'. +* +* KU (input) INTEGER +* The upper bandwidth of A. Referenced only if TYPE = 'B', +* 'Q' or 'Z'. +* +* CFROM (input) DOUBLE PRECISION +* CTO (input) DOUBLE PRECISION +* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed +* without over/underflow if the final result CTO*A(I,J)/CFROM +* can be represented without over/underflow. CFROM must be +* nonzero. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* The matrix to be multiplied by CTO/CFROM. See TYPE for the +* storage type. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* INFO (output) INTEGER +* 0 - successful exit +* <0 - if INFO = -i, the i-th argument had an illegal value. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL DONE + INTEGER I, ITYPE, J, K1, K2, K3, K4 + DOUBLE PRECISION BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 +* + IF( LSAME( TYPE, 'G' ) ) THEN + ITYPE = 0 + ELSE IF( LSAME( TYPE, 'L' ) ) THEN + ITYPE = 1 + ELSE IF( LSAME( TYPE, 'U' ) ) THEN + ITYPE = 2 + ELSE IF( LSAME( TYPE, 'H' ) ) THEN + ITYPE = 3 + ELSE IF( LSAME( TYPE, 'B' ) ) THEN + ITYPE = 4 + ELSE IF( LSAME( TYPE, 'Q' ) ) THEN + ITYPE = 5 + ELSE IF( LSAME( TYPE, 'Z' ) ) THEN + ITYPE = 6 + ELSE + ITYPE = -1 + END IF +* + IF( ITYPE.EQ.-1 ) THEN + INFO = -1 + ELSE IF( CFROM.EQ.ZERO ) THEN + INFO = -4 + ELSE IF( M.LT.0 ) THEN + INFO = -6 + ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR. + $ ( ITYPE.EQ.5 .AND. N.NE.M ) ) THEN + INFO = -7 + ELSE IF( ITYPE.LE.3 .AND. LDA.LT.MAX( 1, M ) ) THEN + INFO = -9 + ELSE IF( ITYPE.GE.4 ) THEN + IF( KL.LT.0 .OR. KL.GT.MAX( M-1, 0 ) ) THEN + INFO = -2 + ELSE IF( KU.LT.0 .OR. KU.GT.MAX( N-1, 0 ) .OR. + $ ( ( ITYPE.EQ.4 .OR. ITYPE.EQ.5 ) .AND. KL.NE.KU ) ) + $ THEN + INFO = -3 + ELSE IF( ( ITYPE.EQ.4 .AND. LDA.LT.KL+1 ) .OR. + $ ( ITYPE.EQ.5 .AND. LDA.LT.KU+1 ) .OR. + $ ( ITYPE.EQ.6 .AND. LDA.LT.2*KL+KU+1 ) ) THEN + INFO = -9 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLASCL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. M.EQ.0 ) + $ RETURN +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM +* + CFROMC = CFROM + CTOC = CTO +* + 10 CONTINUE + CFROM1 = CFROMC*SMLNUM + CTO1 = CTOC / BIGNUM + IF( ABS( CFROM1 ).GT.ABS( CTOC ) .AND. CTOC.NE.ZERO ) THEN + MUL = SMLNUM + DONE = .FALSE. + CFROMC = CFROM1 + ELSE IF( ABS( CTO1 ).GT.ABS( CFROMC ) ) THEN + MUL = BIGNUM + DONE = .FALSE. + CTOC = CTO1 + ELSE + MUL = CTOC / CFROMC + DONE = .TRUE. + END IF +* + IF( ITYPE.EQ.0 ) THEN +* +* Full matrix +* + DO 30 J = 1, N + DO 20 I = 1, M + A( I, J ) = A( I, J )*MUL + 20 CONTINUE + 30 CONTINUE +* + ELSE IF( ITYPE.EQ.1 ) THEN +* +* Lower triangular matrix +* + DO 50 J = 1, N + DO 40 I = J, M + A( I, J ) = A( I, J )*MUL + 40 CONTINUE + 50 CONTINUE +* + ELSE IF( ITYPE.EQ.2 ) THEN +* +* Upper triangular matrix +* + DO 70 J = 1, N + DO 60 I = 1, MIN( J, M ) + A( I, J ) = A( I, J )*MUL + 60 CONTINUE + 70 CONTINUE +* + ELSE IF( ITYPE.EQ.3 ) THEN +* +* Upper Hessenberg matrix +* + DO 90 J = 1, N + DO 80 I = 1, MIN( J+1, M ) + A( I, J ) = A( I, J )*MUL + 80 CONTINUE + 90 CONTINUE +* + ELSE IF( ITYPE.EQ.4 ) THEN +* +* Lower half of a symmetric band matrix +* + K3 = KL + 1 + K4 = N + 1 + DO 110 J = 1, N + DO 100 I = 1, MIN( K3, K4-J ) + A( I, J ) = A( I, J )*MUL + 100 CONTINUE + 110 CONTINUE +* + ELSE IF( ITYPE.EQ.5 ) THEN +* +* Upper half of a symmetric band matrix +* + K1 = KU + 2 + K3 = KU + 1 + DO 130 J = 1, N + DO 120 I = MAX( K1-J, 1 ), K3 + A( I, J ) = A( I, J )*MUL + 120 CONTINUE + 130 CONTINUE +* + ELSE IF( ITYPE.EQ.6 ) THEN +* +* Band matrix +* + K1 = KL + KU + 2 + K2 = KL + 1 + K3 = 2*KL + KU + 1 + K4 = KL + KU + 1 + M + DO 150 J = 1, N + DO 140 I = MAX( K1-J, K2 ), MIN( K3, K4-J ) + A( I, J ) = A( I, J )*MUL + 140 CONTINUE + 150 CONTINUE +* + END IF +* + IF( .NOT.DONE ) + $ GO TO 10 +* + RETURN +* +* End of DLASCL +* + END diff --git a/2.3-1/src/fortran/lapack/dlaset.f b/2.3-1/src/fortran/lapack/dlaset.f new file mode 100644 index 00000000..fc7bc2f5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaset.f @@ -0,0 +1,114 @@ + SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, M, N + DOUBLE PRECISION ALPHA, BETA +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DLASET initializes an m-by-n matrix A to BETA on the diagonal and +* ALPHA on the offdiagonals. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies the part of the matrix A to be set. +* = 'U': Upper triangular part is set; the strictly lower +* triangular part of A is not changed. +* = 'L': Lower triangular part is set; the strictly upper +* triangular part of A is not changed. +* Otherwise: All of the matrix A is set. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* ALPHA (input) DOUBLE PRECISION +* The constant to which the offdiagonal elements are to be set. +* +* BETA (input) DOUBLE PRECISION +* The constant to which the diagonal elements are to be set. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On exit, the leading m-by-n submatrix of A is set as follows: +* +* if UPLO = 'U', A(i,j) = ALPHA, 1<=i<=j-1, 1<=j<=n, +* if UPLO = 'L', A(i,j) = ALPHA, j+1<=i<=m, 1<=j<=n, +* otherwise, A(i,j) = ALPHA, 1<=i<=m, 1<=j<=n, i.ne.j, +* +* and, for all UPLO, A(i,i) = BETA, 1<=i<=min(m,n). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( LSAME( UPLO, 'U' ) ) THEN +* +* Set the strictly upper triangular or trapezoidal part of the +* array to ALPHA. +* + DO 20 J = 2, N + DO 10 I = 1, MIN( J-1, M ) + A( I, J ) = ALPHA + 10 CONTINUE + 20 CONTINUE +* + ELSE IF( LSAME( UPLO, 'L' ) ) THEN +* +* Set the strictly lower triangular or trapezoidal part of the +* array to ALPHA. +* + DO 40 J = 1, MIN( M, N ) + DO 30 I = J + 1, M + A( I, J ) = ALPHA + 30 CONTINUE + 40 CONTINUE +* + ELSE +* +* Set the leading m-by-n submatrix to ALPHA. +* + DO 60 J = 1, N + DO 50 I = 1, M + A( I, J ) = ALPHA + 50 CONTINUE + 60 CONTINUE + END IF +* +* Set the first min(M,N) diagonal elements to BETA. +* + DO 70 I = 1, MIN( M, N ) + A( I, I ) = BETA + 70 CONTINUE +* + RETURN +* +* End of DLASET +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq1.f b/2.3-1/src/fortran/lapack/dlasq1.f new file mode 100644 index 00000000..6f4c3413 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq1.f @@ -0,0 +1,148 @@ + SUBROUTINE DLASQ1( N, D, E, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ1 computes the singular values of a real N-by-N bidiagonal +* matrix with diagonal D and off-diagonal E. The singular values +* are computed to high relative accuracy, in the absence of +* denormalization, underflow and overflow. The algorithm was first +* presented in +* +* "Accurate singular values and differential qd algorithms" by K. V. +* Fernando and B. N. Parlett, Numer. Math., Vol-67, No. 2, pp. 191-230, +* 1994, +* +* and the present implementation is described in "An implementation of +* the dqds Algorithm (Positive Case)", LAPACK Working Note. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of rows and columns in the matrix. N >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, D contains the diagonal elements of the +* bidiagonal matrix whose SVD is desired. On normal exit, +* D contains the singular values in decreasing order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, elements E(1:N-1) contain the off-diagonal elements +* of the bidiagonal matrix whose SVD is desired. +* On exit, E is overwritten. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm failed +* = 1, a split was marked by a positive value in E +* = 2, current block of Z not diagonalized after 30*N +* iterations (in inner while loop) +* = 3, termination criterion of outer while loop not met +* (program created more than N unreduced blocks) +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) +* .. +* .. Local Scalars .. + INTEGER I, IINFO + DOUBLE PRECISION EPS, SCALE, SAFMIN, SIGMN, SIGMX +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DLAS2, DLASCL, DLASQ2, DLASRT, XERBLA +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + INFO = 0 + IF( N.LT.0 ) THEN + INFO = -2 + CALL XERBLA( 'DLASQ1', -INFO ) + RETURN + ELSE IF( N.EQ.0 ) THEN + RETURN + ELSE IF( N.EQ.1 ) THEN + D( 1 ) = ABS( D( 1 ) ) + RETURN + ELSE IF( N.EQ.2 ) THEN + CALL DLAS2( D( 1 ), E( 1 ), D( 2 ), SIGMN, SIGMX ) + D( 1 ) = SIGMX + D( 2 ) = SIGMN + RETURN + END IF +* +* Estimate the largest singular value. +* + SIGMX = ZERO + DO 10 I = 1, N - 1 + D( I ) = ABS( D( I ) ) + SIGMX = MAX( SIGMX, ABS( E( I ) ) ) + 10 CONTINUE + D( N ) = ABS( D( N ) ) +* +* Early return if SIGMX is zero (matrix is already diagonal). +* + IF( SIGMX.EQ.ZERO ) THEN + CALL DLASRT( 'D', N, D, IINFO ) + RETURN + END IF +* + DO 20 I = 1, N + SIGMX = MAX( SIGMX, D( I ) ) + 20 CONTINUE +* +* Copy D and E into WORK (in the Z format) and scale (squaring the +* input data makes scaling by a power of the radix pointless). +* + EPS = DLAMCH( 'Precision' ) + SAFMIN = DLAMCH( 'Safe minimum' ) + SCALE = SQRT( EPS / SAFMIN ) + CALL DCOPY( N, D, 1, WORK( 1 ), 2 ) + CALL DCOPY( N-1, E, 1, WORK( 2 ), 2 ) + CALL DLASCL( 'G', 0, 0, SIGMX, SCALE, 2*N-1, 1, WORK, 2*N-1, + $ IINFO ) +* +* Compute the q's and e's. +* + DO 30 I = 1, 2*N - 1 + WORK( I ) = WORK( I )**2 + 30 CONTINUE + WORK( 2*N ) = ZERO +* + CALL DLASQ2( N, WORK, INFO ) +* + IF( INFO.EQ.0 ) THEN + DO 40 I = 1, N + D( I ) = SQRT( WORK( I ) ) + 40 CONTINUE + CALL DLASCL( 'G', 0, 0, SCALE, SIGMX, N, 1, D, N, IINFO ) + END IF +* + RETURN +* +* End of DLASQ1 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq2.f b/2.3-1/src/fortran/lapack/dlasq2.f new file mode 100644 index 00000000..b6b79aeb --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq2.f @@ -0,0 +1,448 @@ + SUBROUTINE DLASQ2( N, Z, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLAZQ3 in place of DLASQ3, 13 Feb 03, SJH. +* +* .. Scalar Arguments .. + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ2 computes all the eigenvalues of the symmetric positive +* definite tridiagonal matrix associated with the qd array Z to high +* relative accuracy are computed to high relative accuracy, in the +* absence of denormalization, underflow and overflow. +* +* To see the relation of Z to the tridiagonal matrix, let L be a +* unit lower bidiagonal matrix with subdiagonals Z(2,4,6,,..) and +* let U be an upper bidiagonal matrix with 1's above and diagonal +* Z(1,3,5,,..). The tridiagonal is L*U or, if you prefer, the +* symmetric tridiagonal to which it is similar. +* +* Note : DLASQ2 defines a logical variable, IEEE, which is true +* on machines which follow ieee-754 floating-point standard in their +* handling of infinities and NaNs, and false otherwise. This variable +* is passed to DLAZQ3. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of rows and columns in the matrix. N >= 0. +* +* Z (workspace) DOUBLE PRECISION array, dimension ( 4*N ) +* On entry Z holds the qd array. On exit, entries 1 to N hold +* the eigenvalues in decreasing order, Z( 2*N+1 ) holds the +* trace, and Z( 2*N+2 ) holds the sum of the eigenvalues. If +* N > 2, then Z( 2*N+3 ) holds the iteration count, Z( 2*N+4 ) +* holds NDIVS/NIN^2, and Z( 2*N+5 ) holds the percentage of +* shifts that failed. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if the i-th argument is a scalar and had an illegal +* value, then INFO = -i, if the i-th argument is an +* array and the j-entry had an illegal value, then +* INFO = -(i*100+j) +* > 0: the algorithm failed +* = 1, a split was marked by a positive value in E +* = 2, current block of Z not diagonalized after 30*N +* iterations (in inner while loop) +* = 3, termination criterion of outer while loop not met +* (program created more than N unreduced blocks) +* +* Further Details +* =============== +* Local Variables: I0:N0 defines a current unreduced segment of Z. +* The shifts are accumulated in SIGMA. Iteration count is in ITER. +* Ping-pong is controlled by PP (alternates between 0 and 1). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION CBIAS + PARAMETER ( CBIAS = 1.50D0 ) + DOUBLE PRECISION ZERO, HALF, ONE, TWO, FOUR, HUNDRD + PARAMETER ( ZERO = 0.0D0, HALF = 0.5D0, ONE = 1.0D0, + $ TWO = 2.0D0, FOUR = 4.0D0, HUNDRD = 100.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL IEEE + INTEGER I0, I4, IINFO, IPN4, ITER, IWHILA, IWHILB, K, + $ N0, NBIG, NDIV, NFAIL, PP, SPLT, TTYPE + DOUBLE PRECISION D, DESIG, DMIN, DMIN1, DMIN2, DN, DN1, DN2, E, + $ EMAX, EMIN, EPS, OLDEMN, QMAX, QMIN, S, SAFMIN, + $ SIGMA, T, TAU, TEMP, TOL, TOL2, TRACE, ZMAX +* .. +* .. External Subroutines .. + EXTERNAL DLAZQ3, DLASRT, XERBLA +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH, ILAENV +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments. +* (in case DLASQ2 is not called by DLASQ1) +* + INFO = 0 + EPS = DLAMCH( 'Precision' ) + SAFMIN = DLAMCH( 'Safe minimum' ) + TOL = EPS*HUNDRD + TOL2 = TOL**2 +* + IF( N.LT.0 ) THEN + INFO = -1 + CALL XERBLA( 'DLASQ2', 1 ) + RETURN + ELSE IF( N.EQ.0 ) THEN + RETURN + ELSE IF( N.EQ.1 ) THEN +* +* 1-by-1 case. +* + IF( Z( 1 ).LT.ZERO ) THEN + INFO = -201 + CALL XERBLA( 'DLASQ2', 2 ) + END IF + RETURN + ELSE IF( N.EQ.2 ) THEN +* +* 2-by-2 case. +* + IF( Z( 2 ).LT.ZERO .OR. Z( 3 ).LT.ZERO ) THEN + INFO = -2 + CALL XERBLA( 'DLASQ2', 2 ) + RETURN + ELSE IF( Z( 3 ).GT.Z( 1 ) ) THEN + D = Z( 3 ) + Z( 3 ) = Z( 1 ) + Z( 1 ) = D + END IF + Z( 5 ) = Z( 1 ) + Z( 2 ) + Z( 3 ) + IF( Z( 2 ).GT.Z( 3 )*TOL2 ) THEN + T = HALF*( ( Z( 1 )-Z( 3 ) )+Z( 2 ) ) + S = Z( 3 )*( Z( 2 ) / T ) + IF( S.LE.T ) THEN + S = Z( 3 )*( Z( 2 ) / ( T*( ONE+SQRT( ONE+S / T ) ) ) ) + ELSE + S = Z( 3 )*( Z( 2 ) / ( T+SQRT( T )*SQRT( T+S ) ) ) + END IF + T = Z( 1 ) + ( S+Z( 2 ) ) + Z( 3 ) = Z( 3 )*( Z( 1 ) / T ) + Z( 1 ) = T + END IF + Z( 2 ) = Z( 3 ) + Z( 6 ) = Z( 2 ) + Z( 1 ) + RETURN + END IF +* +* Check for negative data and compute sums of q's and e's. +* + Z( 2*N ) = ZERO + EMIN = Z( 2 ) + QMAX = ZERO + ZMAX = ZERO + D = ZERO + E = ZERO +* + DO 10 K = 1, 2*( N-1 ), 2 + IF( Z( K ).LT.ZERO ) THEN + INFO = -( 200+K ) + CALL XERBLA( 'DLASQ2', 2 ) + RETURN + ELSE IF( Z( K+1 ).LT.ZERO ) THEN + INFO = -( 200+K+1 ) + CALL XERBLA( 'DLASQ2', 2 ) + RETURN + END IF + D = D + Z( K ) + E = E + Z( K+1 ) + QMAX = MAX( QMAX, Z( K ) ) + EMIN = MIN( EMIN, Z( K+1 ) ) + ZMAX = MAX( QMAX, ZMAX, Z( K+1 ) ) + 10 CONTINUE + IF( Z( 2*N-1 ).LT.ZERO ) THEN + INFO = -( 200+2*N-1 ) + CALL XERBLA( 'DLASQ2', 2 ) + RETURN + END IF + D = D + Z( 2*N-1 ) + QMAX = MAX( QMAX, Z( 2*N-1 ) ) + ZMAX = MAX( QMAX, ZMAX ) +* +* Check for diagonality. +* + IF( E.EQ.ZERO ) THEN + DO 20 K = 2, N + Z( K ) = Z( 2*K-1 ) + 20 CONTINUE + CALL DLASRT( 'D', N, Z, IINFO ) + Z( 2*N-1 ) = D + RETURN + END IF +* + TRACE = D + E +* +* Check for zero data. +* + IF( TRACE.EQ.ZERO ) THEN + Z( 2*N-1 ) = ZERO + RETURN + END IF +* +* Check whether the machine is IEEE conformable. +* + IEEE = ILAENV( 10, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 .AND. + $ ILAENV( 11, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 +* +* Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...). +* + DO 30 K = 2*N, 2, -2 + Z( 2*K ) = ZERO + Z( 2*K-1 ) = Z( K ) + Z( 2*K-2 ) = ZERO + Z( 2*K-3 ) = Z( K-1 ) + 30 CONTINUE +* + I0 = 1 + N0 = N +* +* Reverse the qd-array, if warranted. +* + IF( CBIAS*Z( 4*I0-3 ).LT.Z( 4*N0-3 ) ) THEN + IPN4 = 4*( I0+N0 ) + DO 40 I4 = 4*I0, 2*( I0+N0-1 ), 4 + TEMP = Z( I4-3 ) + Z( I4-3 ) = Z( IPN4-I4-3 ) + Z( IPN4-I4-3 ) = TEMP + TEMP = Z( I4-1 ) + Z( I4-1 ) = Z( IPN4-I4-5 ) + Z( IPN4-I4-5 ) = TEMP + 40 CONTINUE + END IF +* +* Initial split checking via dqd and Li's test. +* + PP = 0 +* + DO 80 K = 1, 2 +* + D = Z( 4*N0+PP-3 ) + DO 50 I4 = 4*( N0-1 ) + PP, 4*I0 + PP, -4 + IF( Z( I4-1 ).LE.TOL2*D ) THEN + Z( I4-1 ) = -ZERO + D = Z( I4-3 ) + ELSE + D = Z( I4-3 )*( D / ( D+Z( I4-1 ) ) ) + END IF + 50 CONTINUE +* +* dqd maps Z to ZZ plus Li's test. +* + EMIN = Z( 4*I0+PP+1 ) + D = Z( 4*I0+PP-3 ) + DO 60 I4 = 4*I0 + PP, 4*( N0-1 ) + PP, 4 + Z( I4-2*PP-2 ) = D + Z( I4-1 ) + IF( Z( I4-1 ).LE.TOL2*D ) THEN + Z( I4-1 ) = -ZERO + Z( I4-2*PP-2 ) = D + Z( I4-2*PP ) = ZERO + D = Z( I4+1 ) + ELSE IF( SAFMIN*Z( I4+1 ).LT.Z( I4-2*PP-2 ) .AND. + $ SAFMIN*Z( I4-2*PP-2 ).LT.Z( I4+1 ) ) THEN + TEMP = Z( I4+1 ) / Z( I4-2*PP-2 ) + Z( I4-2*PP ) = Z( I4-1 )*TEMP + D = D*TEMP + ELSE + Z( I4-2*PP ) = Z( I4+1 )*( Z( I4-1 ) / Z( I4-2*PP-2 ) ) + D = Z( I4+1 )*( D / Z( I4-2*PP-2 ) ) + END IF + EMIN = MIN( EMIN, Z( I4-2*PP ) ) + 60 CONTINUE + Z( 4*N0-PP-2 ) = D +* +* Now find qmax. +* + QMAX = Z( 4*I0-PP-2 ) + DO 70 I4 = 4*I0 - PP + 2, 4*N0 - PP - 2, 4 + QMAX = MAX( QMAX, Z( I4 ) ) + 70 CONTINUE +* +* Prepare for the next iteration on K. +* + PP = 1 - PP + 80 CONTINUE +* +* Initialise variables to pass to DLAZQ3 +* + TTYPE = 0 + DMIN1 = ZERO + DMIN2 = ZERO + DN = ZERO + DN1 = ZERO + DN2 = ZERO + TAU = ZERO +* + ITER = 2 + NFAIL = 0 + NDIV = 2*( N0-I0 ) +* + DO 140 IWHILA = 1, N + 1 + IF( N0.LT.1 ) + $ GO TO 150 +* +* While array unfinished do +* +* E(N0) holds the value of SIGMA when submatrix in I0:N0 +* splits from the rest of the array, but is negated. +* + DESIG = ZERO + IF( N0.EQ.N ) THEN + SIGMA = ZERO + ELSE + SIGMA = -Z( 4*N0-1 ) + END IF + IF( SIGMA.LT.ZERO ) THEN + INFO = 1 + RETURN + END IF +* +* Find last unreduced submatrix's top index I0, find QMAX and +* EMIN. Find Gershgorin-type bound if Q's much greater than E's. +* + EMAX = ZERO + IF( N0.GT.I0 ) THEN + EMIN = ABS( Z( 4*N0-5 ) ) + ELSE + EMIN = ZERO + END IF + QMIN = Z( 4*N0-3 ) + QMAX = QMIN + DO 90 I4 = 4*N0, 8, -4 + IF( Z( I4-5 ).LE.ZERO ) + $ GO TO 100 + IF( QMIN.GE.FOUR*EMAX ) THEN + QMIN = MIN( QMIN, Z( I4-3 ) ) + EMAX = MAX( EMAX, Z( I4-5 ) ) + END IF + QMAX = MAX( QMAX, Z( I4-7 )+Z( I4-5 ) ) + EMIN = MIN( EMIN, Z( I4-5 ) ) + 90 CONTINUE + I4 = 4 +* + 100 CONTINUE + I0 = I4 / 4 +* +* Store EMIN for passing to DLAZQ3. +* + Z( 4*N0-1 ) = EMIN +* +* Put -(initial shift) into DMIN. +* + DMIN = -MAX( ZERO, QMIN-TWO*SQRT( QMIN )*SQRT( EMAX ) ) +* +* Now I0:N0 is unreduced. PP = 0 for ping, PP = 1 for pong. +* + PP = 0 +* + NBIG = 30*( N0-I0+1 ) + DO 120 IWHILB = 1, NBIG + IF( I0.GT.N0 ) + $ GO TO 130 +* +* While submatrix unfinished take a good dqds step. +* + CALL DLAZQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL, + $ ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1, + $ DN2, TAU ) +* + PP = 1 - PP +* +* When EMIN is very small check for splits. +* + IF( PP.EQ.0 .AND. N0-I0.GE.3 ) THEN + IF( Z( 4*N0 ).LE.TOL2*QMAX .OR. + $ Z( 4*N0-1 ).LE.TOL2*SIGMA ) THEN + SPLT = I0 - 1 + QMAX = Z( 4*I0-3 ) + EMIN = Z( 4*I0-1 ) + OLDEMN = Z( 4*I0 ) + DO 110 I4 = 4*I0, 4*( N0-3 ), 4 + IF( Z( I4 ).LE.TOL2*Z( I4-3 ) .OR. + $ Z( I4-1 ).LE.TOL2*SIGMA ) THEN + Z( I4-1 ) = -SIGMA + SPLT = I4 / 4 + QMAX = ZERO + EMIN = Z( I4+3 ) + OLDEMN = Z( I4+4 ) + ELSE + QMAX = MAX( QMAX, Z( I4+1 ) ) + EMIN = MIN( EMIN, Z( I4-1 ) ) + OLDEMN = MIN( OLDEMN, Z( I4 ) ) + END IF + 110 CONTINUE + Z( 4*N0-1 ) = EMIN + Z( 4*N0 ) = OLDEMN + I0 = SPLT + 1 + END IF + END IF +* + 120 CONTINUE +* + INFO = 2 + RETURN +* +* end IWHILB +* + 130 CONTINUE +* + 140 CONTINUE +* + INFO = 3 + RETURN +* +* end IWHILA +* + 150 CONTINUE +* +* Move q's to the front. +* + DO 160 K = 2, N + Z( K ) = Z( 4*K-3 ) + 160 CONTINUE +* +* Sort and compute sum of eigenvalues. +* + CALL DLASRT( 'D', N, Z, IINFO ) +* + E = ZERO + DO 170 K = N, 1, -1 + E = E + Z( K ) + 170 CONTINUE +* +* Store trace, sum(eigenvalues) and information on performance. +* + Z( 2*N+1 ) = TRACE + Z( 2*N+2 ) = E + Z( 2*N+3 ) = DBLE( ITER ) + Z( 2*N+4 ) = DBLE( NDIV ) / DBLE( N**2 ) + Z( 2*N+5 ) = HUNDRD*NFAIL / DBLE( ITER ) + RETURN +* +* End of DLASQ2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq3.f b/2.3-1/src/fortran/lapack/dlasq3.f new file mode 100644 index 00000000..ce4055d8 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq3.f @@ -0,0 +1,295 @@ + SUBROUTINE DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL, + $ ITER, NDIV, IEEE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL IEEE + INTEGER I0, ITER, N0, NDIV, NFAIL, PP + DOUBLE PRECISION DESIG, DMIN, QMAX, SIGMA +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ3 checks for deflation, computes a shift (TAU) and calls dqds. +* In case of failure it changes shifts, and tries again until output +* is positive. +* +* Arguments +* ========= +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* DMIN (output) DOUBLE PRECISION +* Minimum value of d. +* +* SIGMA (output) DOUBLE PRECISION +* Sum of shifts used in current segment. +* +* DESIG (input/output) DOUBLE PRECISION +* Lower order part of SIGMA +* +* QMAX (input) DOUBLE PRECISION +* Maximum value of q. +* +* NFAIL (output) INTEGER +* Number of times shift was too big. +* +* ITER (output) INTEGER +* Number of iterations. +* +* NDIV (output) INTEGER +* Number of divisions. +* +* TTYPE (output) INTEGER +* Shift type. +* +* IEEE (input) LOGICAL +* Flag for IEEE or non IEEE arithmetic (passed to DLASQ5). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION CBIAS + PARAMETER ( CBIAS = 1.50D0 ) + DOUBLE PRECISION ZERO, QURTR, HALF, ONE, TWO, HUNDRD + PARAMETER ( ZERO = 0.0D0, QURTR = 0.250D0, HALF = 0.5D0, + $ ONE = 1.0D0, TWO = 2.0D0, HUNDRD = 100.0D0 ) +* .. +* .. Local Scalars .. + INTEGER IPN4, J4, N0IN, NN, TTYPE + DOUBLE PRECISION DMIN1, DMIN2, DN, DN1, DN2, EPS, S, SAFMIN, T, + $ TAU, TEMP, TOL, TOL2 +* .. +* .. External Subroutines .. + EXTERNAL DLASQ4, DLASQ5, DLASQ6 +* .. +* .. External Function .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Save statement .. + SAVE TTYPE + SAVE DMIN1, DMIN2, DN, DN1, DN2, TAU +* .. +* .. Data statement .. + DATA TTYPE / 0 / + DATA DMIN1 / ZERO /, DMIN2 / ZERO /, DN / ZERO /, + $ DN1 / ZERO /, DN2 / ZERO /, TAU / ZERO / +* .. +* .. Executable Statements .. +* + N0IN = N0 + EPS = DLAMCH( 'Precision' ) + SAFMIN = DLAMCH( 'Safe minimum' ) + TOL = EPS*HUNDRD + TOL2 = TOL**2 +* +* Check for deflation. +* + 10 CONTINUE +* + IF( N0.LT.I0 ) + $ RETURN + IF( N0.EQ.I0 ) + $ GO TO 20 + NN = 4*N0 + PP + IF( N0.EQ.( I0+1 ) ) + $ GO TO 40 +* +* Check whether E(N0-1) is negligible, 1 eigenvalue. +* + IF( Z( NN-5 ).GT.TOL2*( SIGMA+Z( NN-3 ) ) .AND. + $ Z( NN-2*PP-4 ).GT.TOL2*Z( NN-7 ) ) + $ GO TO 30 +* + 20 CONTINUE +* + Z( 4*N0-3 ) = Z( 4*N0+PP-3 ) + SIGMA + N0 = N0 - 1 + GO TO 10 +* +* Check whether E(N0-2) is negligible, 2 eigenvalues. +* + 30 CONTINUE +* + IF( Z( NN-9 ).GT.TOL2*SIGMA .AND. + $ Z( NN-2*PP-8 ).GT.TOL2*Z( NN-11 ) ) + $ GO TO 50 +* + 40 CONTINUE +* + IF( Z( NN-3 ).GT.Z( NN-7 ) ) THEN + S = Z( NN-3 ) + Z( NN-3 ) = Z( NN-7 ) + Z( NN-7 ) = S + END IF + IF( Z( NN-5 ).GT.Z( NN-3 )*TOL2 ) THEN + T = HALF*( ( Z( NN-7 )-Z( NN-3 ) )+Z( NN-5 ) ) + S = Z( NN-3 )*( Z( NN-5 ) / T ) + IF( S.LE.T ) THEN + S = Z( NN-3 )*( Z( NN-5 ) / + $ ( T*( ONE+SQRT( ONE+S / T ) ) ) ) + ELSE + S = Z( NN-3 )*( Z( NN-5 ) / ( T+SQRT( T )*SQRT( T+S ) ) ) + END IF + T = Z( NN-7 ) + ( S+Z( NN-5 ) ) + Z( NN-3 ) = Z( NN-3 )*( Z( NN-7 ) / T ) + Z( NN-7 ) = T + END IF + Z( 4*N0-7 ) = Z( NN-7 ) + SIGMA + Z( 4*N0-3 ) = Z( NN-3 ) + SIGMA + N0 = N0 - 2 + GO TO 10 +* + 50 CONTINUE +* +* Reverse the qd-array, if warranted. +* + IF( DMIN.LE.ZERO .OR. N0.LT.N0IN ) THEN + IF( CBIAS*Z( 4*I0+PP-3 ).LT.Z( 4*N0+PP-3 ) ) THEN + IPN4 = 4*( I0+N0 ) + DO 60 J4 = 4*I0, 2*( I0+N0-1 ), 4 + TEMP = Z( J4-3 ) + Z( J4-3 ) = Z( IPN4-J4-3 ) + Z( IPN4-J4-3 ) = TEMP + TEMP = Z( J4-2 ) + Z( J4-2 ) = Z( IPN4-J4-2 ) + Z( IPN4-J4-2 ) = TEMP + TEMP = Z( J4-1 ) + Z( J4-1 ) = Z( IPN4-J4-5 ) + Z( IPN4-J4-5 ) = TEMP + TEMP = Z( J4 ) + Z( J4 ) = Z( IPN4-J4-4 ) + Z( IPN4-J4-4 ) = TEMP + 60 CONTINUE + IF( N0-I0.LE.4 ) THEN + Z( 4*N0+PP-1 ) = Z( 4*I0+PP-1 ) + Z( 4*N0-PP ) = Z( 4*I0-PP ) + END IF + DMIN2 = MIN( DMIN2, Z( 4*N0+PP-1 ) ) + Z( 4*N0+PP-1 ) = MIN( Z( 4*N0+PP-1 ), Z( 4*I0+PP-1 ), + $ Z( 4*I0+PP+3 ) ) + Z( 4*N0-PP ) = MIN( Z( 4*N0-PP ), Z( 4*I0-PP ), + $ Z( 4*I0-PP+4 ) ) + QMAX = MAX( QMAX, Z( 4*I0+PP-3 ), Z( 4*I0+PP+1 ) ) + DMIN = -ZERO + END IF + END IF +* + IF( DMIN.LT.ZERO .OR. SAFMIN*QMAX.LT.MIN( Z( 4*N0+PP-1 ), + $ Z( 4*N0+PP-9 ), DMIN2+Z( 4*N0-PP ) ) ) THEN +* +* Choose a shift. +* + CALL DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, DN1, + $ DN2, TAU, TTYPE ) +* +* Call dqds until DMIN > 0. +* + 80 CONTINUE +* + CALL DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN, + $ DN1, DN2, IEEE ) +* + NDIV = NDIV + ( N0-I0+2 ) + ITER = ITER + 1 +* +* Check status. +* + IF( DMIN.GE.ZERO .AND. DMIN1.GT.ZERO ) THEN +* +* Success. +* + GO TO 100 +* + ELSE IF( DMIN.LT.ZERO .AND. DMIN1.GT.ZERO .AND. + $ Z( 4*( N0-1 )-PP ).LT.TOL*( SIGMA+DN1 ) .AND. + $ ABS( DN ).LT.TOL*SIGMA ) THEN +* +* Convergence hidden by negative DN. +* + Z( 4*( N0-1 )-PP+2 ) = ZERO + DMIN = ZERO + GO TO 100 + ELSE IF( DMIN.LT.ZERO ) THEN +* +* TAU too big. Select new TAU and try again. +* + NFAIL = NFAIL + 1 + IF( TTYPE.LT.-22 ) THEN +* +* Failed twice. Play it safe. +* + TAU = ZERO + ELSE IF( DMIN1.GT.ZERO ) THEN +* +* Late failure. Gives excellent shift. +* + TAU = ( TAU+DMIN )*( ONE-TWO*EPS ) + TTYPE = TTYPE - 11 + ELSE +* +* Early failure. Divide by 4. +* + TAU = QURTR*TAU + TTYPE = TTYPE - 12 + END IF + GO TO 80 + ELSE IF( DMIN.NE.DMIN ) THEN +* +* NaN. +* + TAU = ZERO + GO TO 80 + ELSE +* +* Possible underflow. Play it safe. +* + GO TO 90 + END IF + END IF +* +* Risk of underflow. +* + 90 CONTINUE + CALL DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN, DN1, DN2 ) + NDIV = NDIV + ( N0-I0+2 ) + ITER = ITER + 1 + TAU = ZERO +* + 100 CONTINUE + IF( TAU.LT.SIGMA ) THEN + DESIG = DESIG + TAU + T = SIGMA + DESIG + DESIG = DESIG - ( T-SIGMA ) + ELSE + T = SIGMA + TAU + DESIG = SIGMA - ( T-TAU ) + DESIG + END IF + SIGMA = T +* + RETURN +* +* End of DLASQ3 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq4.f b/2.3-1/src/fortran/lapack/dlasq4.f new file mode 100644 index 00000000..db2b6fe5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq4.f @@ -0,0 +1,329 @@ + SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, + $ DN1, DN2, TAU, TTYPE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER I0, N0, N0IN, PP, TTYPE + DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ4 computes an approximation TAU to the smallest eigenvalue +* using values of d from the previous transform. +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* N0IN (input) INTEGER +* The value of N0 at start of EIGTEST. +* +* DMIN (input) DOUBLE PRECISION +* Minimum value of d. +* +* DMIN1 (input) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ). +* +* DMIN2 (input) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ) and D( N0-1 ). +* +* DN (input) DOUBLE PRECISION +* d(N) +* +* DN1 (input) DOUBLE PRECISION +* d(N-1) +* +* DN2 (input) DOUBLE PRECISION +* d(N-2) +* +* TAU (output) DOUBLE PRECISION +* This is the shift. +* +* TTYPE (output) INTEGER +* Shift type. +* +* Further Details +* =============== +* CNST1 = 9/16 +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION CNST1, CNST2, CNST3 + PARAMETER ( CNST1 = 0.5630D0, CNST2 = 1.010D0, + $ CNST3 = 1.050D0 ) + DOUBLE PRECISION QURTR, THIRD, HALF, ZERO, ONE, TWO, HUNDRD + PARAMETER ( QURTR = 0.250D0, THIRD = 0.3330D0, + $ HALF = 0.50D0, ZERO = 0.0D0, ONE = 1.0D0, + $ TWO = 2.0D0, HUNDRD = 100.0D0 ) +* .. +* .. Local Scalars .. + INTEGER I4, NN, NP + DOUBLE PRECISION A2, B1, B2, G, GAM, GAP1, GAP2, S +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN, SQRT +* .. +* .. Save statement .. + SAVE G +* .. +* .. Data statement .. + DATA G / ZERO / +* .. +* .. Executable Statements .. +* +* A negative DMIN forces the shift to take that absolute value +* TTYPE records the type of shift. +* + IF( DMIN.LE.ZERO ) THEN + TAU = -DMIN + TTYPE = -1 + RETURN + END IF +* + NN = 4*N0 + PP + IF( N0IN.EQ.N0 ) THEN +* +* No eigenvalues deflated. +* + IF( DMIN.EQ.DN .OR. DMIN.EQ.DN1 ) THEN +* + B1 = SQRT( Z( NN-3 ) )*SQRT( Z( NN-5 ) ) + B2 = SQRT( Z( NN-7 ) )*SQRT( Z( NN-9 ) ) + A2 = Z( NN-7 ) + Z( NN-5 ) +* +* Cases 2 and 3. +* + IF( DMIN.EQ.DN .AND. DMIN1.EQ.DN1 ) THEN + GAP2 = DMIN2 - A2 - DMIN2*QURTR + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2 ) THEN + GAP1 = A2 - DN - ( B2 / GAP2 )*B2 + ELSE + GAP1 = A2 - DN - ( B1+B2 ) + END IF + IF( GAP1.GT.ZERO .AND. GAP1.GT.B1 ) THEN + S = MAX( DN-( B1 / GAP1 )*B1, HALF*DMIN ) + TTYPE = -2 + ELSE + S = ZERO + IF( DN.GT.B1 ) + $ S = DN - B1 + IF( A2.GT.( B1+B2 ) ) + $ S = MIN( S, A2-( B1+B2 ) ) + S = MAX( S, THIRD*DMIN ) + TTYPE = -3 + END IF + ELSE +* +* Case 4. +* + TTYPE = -4 + S = QURTR*DMIN + IF( DMIN.EQ.DN ) THEN + GAM = DN + A2 = ZERO + IF( Z( NN-5 ) .GT. Z( NN-7 ) ) + $ RETURN + B2 = Z( NN-5 ) / Z( NN-7 ) + NP = NN - 9 + ELSE + NP = NN - 2*PP + B2 = Z( NP-2 ) + GAM = DN1 + IF( Z( NP-4 ) .GT. Z( NP-2 ) ) + $ RETURN + A2 = Z( NP-4 ) / Z( NP-2 ) + IF( Z( NN-9 ) .GT. Z( NN-11 ) ) + $ RETURN + B2 = Z( NN-9 ) / Z( NN-11 ) + NP = NN - 13 + END IF +* +* Approximate contribution to norm squared from I < NN-1. +* + A2 = A2 + B2 + DO 10 I4 = NP, 4*I0 - 1 + PP, -4 + IF( B2.EQ.ZERO ) + $ GO TO 20 + B1 = B2 + IF( Z( I4 ) .GT. Z( I4-2 ) ) + $ RETURN + B2 = B2*( Z( I4 ) / Z( I4-2 ) ) + A2 = A2 + B2 + IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) + $ GO TO 20 + 10 CONTINUE + 20 CONTINUE + A2 = CNST3*A2 +* +* Rayleigh quotient residual bound. +* + IF( A2.LT.CNST1 ) + $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) + END IF + ELSE IF( DMIN.EQ.DN2 ) THEN +* +* Case 5. +* + TTYPE = -5 + S = QURTR*DMIN +* +* Compute contribution to norm squared from I > NN-2. +* + NP = NN - 2*PP + B1 = Z( NP-2 ) + B2 = Z( NP-6 ) + GAM = DN2 + IF( Z( NP-8 ).GT.B2 .OR. Z( NP-4 ).GT.B1 ) + $ RETURN + A2 = ( Z( NP-8 ) / B2 )*( ONE+Z( NP-4 ) / B1 ) +* +* Approximate contribution to norm squared from I < NN-2. +* + IF( N0-I0.GT.2 ) THEN + B2 = Z( NN-13 ) / Z( NN-15 ) + A2 = A2 + B2 + DO 30 I4 = NN - 17, 4*I0 - 1 + PP, -4 + IF( B2.EQ.ZERO ) + $ GO TO 40 + B1 = B2 + IF( Z( I4 ) .GT. Z( I4-2 ) ) + $ RETURN + B2 = B2*( Z( I4 ) / Z( I4-2 ) ) + A2 = A2 + B2 + IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) + $ GO TO 40 + 30 CONTINUE + 40 CONTINUE + A2 = CNST3*A2 + END IF +* + IF( A2.LT.CNST1 ) + $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) + ELSE +* +* Case 6, no information to guide us. +* + IF( TTYPE.EQ.-6 ) THEN + G = G + THIRD*( ONE-G ) + ELSE IF( TTYPE.EQ.-18 ) THEN + G = QURTR*THIRD + ELSE + G = QURTR + END IF + S = G*DMIN + TTYPE = -6 + END IF +* + ELSE IF( N0IN.EQ.( N0+1 ) ) THEN +* +* One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN. +* + IF( DMIN1.EQ.DN1 .AND. DMIN2.EQ.DN2 ) THEN +* +* Cases 7 and 8. +* + TTYPE = -7 + S = THIRD*DMIN1 + IF( Z( NN-5 ).GT.Z( NN-7 ) ) + $ RETURN + B1 = Z( NN-5 ) / Z( NN-7 ) + B2 = B1 + IF( B2.EQ.ZERO ) + $ GO TO 60 + DO 50 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 + A2 = B1 + IF( Z( I4 ).GT.Z( I4-2 ) ) + $ RETURN + B1 = B1*( Z( I4 ) / Z( I4-2 ) ) + B2 = B2 + B1 + IF( HUNDRD*MAX( B1, A2 ).LT.B2 ) + $ GO TO 60 + 50 CONTINUE + 60 CONTINUE + B2 = SQRT( CNST3*B2 ) + A2 = DMIN1 / ( ONE+B2**2 ) + GAP2 = HALF*DMIN2 - A2 + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN + S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) + ELSE + S = MAX( S, A2*( ONE-CNST2*B2 ) ) + TTYPE = -8 + END IF + ELSE +* +* Case 9. +* + S = QURTR*DMIN1 + IF( DMIN1.EQ.DN1 ) + $ S = HALF*DMIN1 + TTYPE = -9 + END IF +* + ELSE IF( N0IN.EQ.( N0+2 ) ) THEN +* +* Two eigenvalues deflated. Use DMIN2, DN2 for DMIN and DN. +* +* Cases 10 and 11. +* + IF( DMIN2.EQ.DN2 .AND. TWO*Z( NN-5 ).LT.Z( NN-7 ) ) THEN + TTYPE = -10 + S = THIRD*DMIN2 + IF( Z( NN-5 ).GT.Z( NN-7 ) ) + $ RETURN + B1 = Z( NN-5 ) / Z( NN-7 ) + B2 = B1 + IF( B2.EQ.ZERO ) + $ GO TO 80 + DO 70 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 + IF( Z( I4 ).GT.Z( I4-2 ) ) + $ RETURN + B1 = B1*( Z( I4 ) / Z( I4-2 ) ) + B2 = B2 + B1 + IF( HUNDRD*B1.LT.B2 ) + $ GO TO 80 + 70 CONTINUE + 80 CONTINUE + B2 = SQRT( CNST3*B2 ) + A2 = DMIN2 / ( ONE+B2**2 ) + GAP2 = Z( NN-7 ) + Z( NN-9 ) - + $ SQRT( Z( NN-11 ) )*SQRT( Z( NN-9 ) ) - A2 + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN + S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) + ELSE + S = MAX( S, A2*( ONE-CNST2*B2 ) ) + END IF + ELSE + S = QURTR*DMIN2 + TTYPE = -11 + END IF + ELSE IF( N0IN.GT.( N0+2 ) ) THEN +* +* Case 12, more than two eigenvalues deflated. No information. +* + S = ZERO + TTYPE = -12 + END IF +* + TAU = S + RETURN +* +* End of DLASQ4 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq5.f b/2.3-1/src/fortran/lapack/dlasq5.f new file mode 100644 index 00000000..a006c99e --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq5.f @@ -0,0 +1,195 @@ + SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN, + $ DNM1, DNM2, IEEE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL IEEE + INTEGER I0, N0, PP + DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2, TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ5 computes one dqds transform in ping-pong form, one +* version for IEEE machines another for non IEEE machines. +* +* Arguments +* ========= +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid +* an extra argument. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* TAU (input) DOUBLE PRECISION +* This is the shift. +* +* DMIN (output) DOUBLE PRECISION +* Minimum value of d. +* +* DMIN1 (output) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ). +* +* DMIN2 (output) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ) and D( N0-1 ). +* +* DN (output) DOUBLE PRECISION +* d(N0), the last value of d. +* +* DNM1 (output) DOUBLE PRECISION +* d(N0-1). +* +* DNM2 (output) DOUBLE PRECISION +* d(N0-2). +* +* IEEE (input) LOGICAL +* Flag for IEEE or non IEEE arithmetic. +* +* ===================================================================== +* +* .. Parameter .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) +* .. +* .. Local Scalars .. + INTEGER J4, J4P2 + DOUBLE PRECISION D, EMIN, TEMP +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( ( N0-I0-1 ).LE.0 ) + $ RETURN +* + J4 = 4*I0 + PP - 3 + EMIN = Z( J4+4 ) + D = Z( J4 ) - TAU + DMIN = D + DMIN1 = -Z( J4 ) +* + IF( IEEE ) THEN +* +* Code for IEEE arithmetic. +* + IF( PP.EQ.0 ) THEN + DO 10 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-2 ) = D + Z( J4-1 ) + TEMP = Z( J4+1 ) / Z( J4-2 ) + D = D*TEMP - TAU + DMIN = MIN( DMIN, D ) + Z( J4 ) = Z( J4-1 )*TEMP + EMIN = MIN( Z( J4 ), EMIN ) + 10 CONTINUE + ELSE + DO 20 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-3 ) = D + Z( J4 ) + TEMP = Z( J4+2 ) / Z( J4-3 ) + D = D*TEMP - TAU + DMIN = MIN( DMIN, D ) + Z( J4-1 ) = Z( J4 )*TEMP + EMIN = MIN( Z( J4-1 ), EMIN ) + 20 CONTINUE + END IF +* +* Unroll last two steps. +* + DNM2 = D + DMIN2 = DMIN + J4 = 4*( N0-2 ) - PP + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM2 + Z( J4P2 ) + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU + DMIN = MIN( DMIN, DNM1 ) +* + DMIN1 = DMIN + J4 = J4 + 4 + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM1 + Z( J4P2 ) + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU + DMIN = MIN( DMIN, DN ) +* + ELSE +* +* Code for non IEEE arithmetic. +* + IF( PP.EQ.0 ) THEN + DO 30 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-2 ) = D + Z( J4-1 ) + IF( D.LT.ZERO ) THEN + RETURN + ELSE + Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) ) + D = Z( J4+1 )*( D / Z( J4-2 ) ) - TAU + END IF + DMIN = MIN( DMIN, D ) + EMIN = MIN( EMIN, Z( J4 ) ) + 30 CONTINUE + ELSE + DO 40 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-3 ) = D + Z( J4 ) + IF( D.LT.ZERO ) THEN + RETURN + ELSE + Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) ) + D = Z( J4+2 )*( D / Z( J4-3 ) ) - TAU + END IF + DMIN = MIN( DMIN, D ) + EMIN = MIN( EMIN, Z( J4-1 ) ) + 40 CONTINUE + END IF +* +* Unroll last two steps. +* + DNM2 = D + DMIN2 = DMIN + J4 = 4*( N0-2 ) - PP + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM2 + Z( J4P2 ) + IF( DNM2.LT.ZERO ) THEN + RETURN + ELSE + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU + END IF + DMIN = MIN( DMIN, DNM1 ) +* + DMIN1 = DMIN + J4 = J4 + 4 + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM1 + Z( J4P2 ) + IF( DNM1.LT.ZERO ) THEN + RETURN + ELSE + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU + END IF + DMIN = MIN( DMIN, DN ) +* + END IF +* + Z( J4+2 ) = DN + Z( 4*N0-PP ) = EMIN + RETURN +* +* End of DLASQ5 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasq6.f b/2.3-1/src/fortran/lapack/dlasq6.f new file mode 100644 index 00000000..e7eb7d0a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasq6.f @@ -0,0 +1,175 @@ + SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN, + $ DNM1, DNM2 ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER I0, N0, PP + DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DNM1, DNM2 +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLASQ6 computes one dqd (shift equal to zero) transform in +* ping-pong form, with protection against underflow and overflow. +* +* Arguments +* ========= +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. EMIN is stored in Z(4*N0) to avoid +* an extra argument. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* DMIN (output) DOUBLE PRECISION +* Minimum value of d. +* +* DMIN1 (output) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ). +* +* DMIN2 (output) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ) and D( N0-1 ). +* +* DN (output) DOUBLE PRECISION +* d(N0), the last value of d. +* +* DNM1 (output) DOUBLE PRECISION +* d(N0-1). +* +* DNM2 (output) DOUBLE PRECISION +* d(N0-2). +* +* ===================================================================== +* +* .. Parameter .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) +* .. +* .. Local Scalars .. + INTEGER J4, J4P2 + DOUBLE PRECISION D, EMIN, SAFMIN, TEMP +* .. +* .. External Function .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( ( N0-I0-1 ).LE.0 ) + $ RETURN +* + SAFMIN = DLAMCH( 'Safe minimum' ) + J4 = 4*I0 + PP - 3 + EMIN = Z( J4+4 ) + D = Z( J4 ) + DMIN = D +* + IF( PP.EQ.0 ) THEN + DO 10 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-2 ) = D + Z( J4-1 ) + IF( Z( J4-2 ).EQ.ZERO ) THEN + Z( J4 ) = ZERO + D = Z( J4+1 ) + DMIN = D + EMIN = ZERO + ELSE IF( SAFMIN*Z( J4+1 ).LT.Z( J4-2 ) .AND. + $ SAFMIN*Z( J4-2 ).LT.Z( J4+1 ) ) THEN + TEMP = Z( J4+1 ) / Z( J4-2 ) + Z( J4 ) = Z( J4-1 )*TEMP + D = D*TEMP + ELSE + Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) ) + D = Z( J4+1 )*( D / Z( J4-2 ) ) + END IF + DMIN = MIN( DMIN, D ) + EMIN = MIN( EMIN, Z( J4 ) ) + 10 CONTINUE + ELSE + DO 20 J4 = 4*I0, 4*( N0-3 ), 4 + Z( J4-3 ) = D + Z( J4 ) + IF( Z( J4-3 ).EQ.ZERO ) THEN + Z( J4-1 ) = ZERO + D = Z( J4+2 ) + DMIN = D + EMIN = ZERO + ELSE IF( SAFMIN*Z( J4+2 ).LT.Z( J4-3 ) .AND. + $ SAFMIN*Z( J4-3 ).LT.Z( J4+2 ) ) THEN + TEMP = Z( J4+2 ) / Z( J4-3 ) + Z( J4-1 ) = Z( J4 )*TEMP + D = D*TEMP + ELSE + Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) ) + D = Z( J4+2 )*( D / Z( J4-3 ) ) + END IF + DMIN = MIN( DMIN, D ) + EMIN = MIN( EMIN, Z( J4-1 ) ) + 20 CONTINUE + END IF +* +* Unroll last two steps. +* + DNM2 = D + DMIN2 = DMIN + J4 = 4*( N0-2 ) - PP + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM2 + Z( J4P2 ) + IF( Z( J4-2 ).EQ.ZERO ) THEN + Z( J4 ) = ZERO + DNM1 = Z( J4P2+2 ) + DMIN = DNM1 + EMIN = ZERO + ELSE IF( SAFMIN*Z( J4P2+2 ).LT.Z( J4-2 ) .AND. + $ SAFMIN*Z( J4-2 ).LT.Z( J4P2+2 ) ) THEN + TEMP = Z( J4P2+2 ) / Z( J4-2 ) + Z( J4 ) = Z( J4P2 )*TEMP + DNM1 = DNM2*TEMP + ELSE + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) + END IF + DMIN = MIN( DMIN, DNM1 ) +* + DMIN1 = DMIN + J4 = J4 + 4 + J4P2 = J4 + 2*PP - 1 + Z( J4-2 ) = DNM1 + Z( J4P2 ) + IF( Z( J4-2 ).EQ.ZERO ) THEN + Z( J4 ) = ZERO + DN = Z( J4P2+2 ) + DMIN = DN + EMIN = ZERO + ELSE IF( SAFMIN*Z( J4P2+2 ).LT.Z( J4-2 ) .AND. + $ SAFMIN*Z( J4-2 ).LT.Z( J4P2+2 ) ) THEN + TEMP = Z( J4P2+2 ) / Z( J4-2 ) + Z( J4 ) = Z( J4P2 )*TEMP + DN = DNM1*TEMP + ELSE + Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) ) + DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) + END IF + DMIN = MIN( DMIN, DN ) +* + Z( J4+2 ) = DN + Z( 4*N0-PP ) = EMIN + RETURN +* +* End of DLASQ6 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasr.f b/2.3-1/src/fortran/lapack/dlasr.f new file mode 100644 index 00000000..7e54bfc7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasr.f @@ -0,0 +1,361 @@ + SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, PIVOT, SIDE + INTEGER LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( * ), S( * ) +* .. +* +* Purpose +* ======= +* +* DLASR applies a sequence of plane rotations to a real matrix A, +* from either the left or the right. +* +* When SIDE = 'L', the transformation takes the form +* +* A := P*A +* +* and when SIDE = 'R', the transformation takes the form +* +* A := A*P**T +* +* where P is an orthogonal matrix consisting of a sequence of z plane +* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R', +* and P**T is the transpose of P. +* +* When DIRECT = 'F' (Forward sequence), then +* +* P = P(z-1) * ... * P(2) * P(1) +* +* and when DIRECT = 'B' (Backward sequence), then +* +* P = P(1) * P(2) * ... * P(z-1) +* +* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation +* +* R(k) = ( c(k) s(k) ) +* = ( -s(k) c(k) ). +* +* When PIVOT = 'V' (Variable pivot), the rotation is performed +* for the plane (k,k+1), i.e., P(k) has the form +* +* P(k) = ( 1 ) +* ( ... ) +* ( 1 ) +* ( c(k) s(k) ) +* ( -s(k) c(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* +* where R(k) appears as a rank-2 modification to the identity matrix in +* rows and columns k and k+1. +* +* When PIVOT = 'T' (Top pivot), the rotation is performed for the +* plane (1,k+1), so P(k) has the form +* +* P(k) = ( c(k) s(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* ( -s(k) c(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* +* where R(k) appears in rows and columns 1 and k+1. +* +* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is +* performed for the plane (k,z), giving P(k) the form +* +* P(k) = ( 1 ) +* ( ... ) +* ( 1 ) +* ( c(k) s(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* ( -s(k) c(k) ) +* +* where R(k) appears in rows and columns k and z. The rotations are +* performed without ever forming P(k) explicitly. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* Specifies whether the plane rotation matrix P is applied to +* A on the left or the right. +* = 'L': Left, compute A := P*A +* = 'R': Right, compute A:= A*P**T +* +* PIVOT (input) CHARACTER*1 +* Specifies the plane for which P(k) is a plane rotation +* matrix. +* = 'V': Variable pivot, the plane (k,k+1) +* = 'T': Top pivot, the plane (1,k+1) +* = 'B': Bottom pivot, the plane (k,z) +* +* DIRECT (input) CHARACTER*1 +* Specifies whether P is a forward or backward sequence of +* plane rotations. +* = 'F': Forward, P = P(z-1)*...*P(2)*P(1) +* = 'B': Backward, P = P(1)*P(2)*...*P(z-1) +* +* M (input) INTEGER +* The number of rows of the matrix A. If m <= 1, an immediate +* return is effected. +* +* N (input) INTEGER +* The number of columns of the matrix A. If n <= 1, an +* immediate return is effected. +* +* C (input) DOUBLE PRECISION array, dimension +* (M-1) if SIDE = 'L' +* (N-1) if SIDE = 'R' +* The cosines c(k) of the plane rotations. +* +* S (input) DOUBLE PRECISION array, dimension +* (M-1) if SIDE = 'L' +* (N-1) if SIDE = 'R' +* The sines s(k) of the plane rotations. The 2-by-2 plane +* rotation part of the matrix P(k), R(k), has the form +* R(k) = ( c(k) s(k) ) +* ( -s(k) c(k) ). +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* The M-by-N matrix A. On exit, A is overwritten by P*A if +* SIDE = 'R' or by A*P**T if SIDE = 'L'. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J + DOUBLE PRECISION CTEMP, STEMP, TEMP +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.( LSAME( SIDE, 'L' ) .OR. LSAME( SIDE, 'R' ) ) ) THEN + INFO = 1 + ELSE IF( .NOT.( LSAME( PIVOT, 'V' ) .OR. LSAME( PIVOT, + $ 'T' ) .OR. LSAME( PIVOT, 'B' ) ) ) THEN + INFO = 2 + ELSE IF( .NOT.( LSAME( DIRECT, 'F' ) .OR. LSAME( DIRECT, 'B' ) ) ) + $ THEN + INFO = 3 + ELSE IF( M.LT.0 ) THEN + INFO = 4 + ELSE IF( N.LT.0 ) THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = 9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLASR ', INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) ) + $ RETURN + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form P * A +* + IF( LSAME( PIVOT, 'V' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 20 J = 1, M - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 10 I = 1, N + TEMP = A( J+1, I ) + A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) + A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 40 J = M - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 30 I = 1, N + TEMP = A( J+1, I ) + A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) + A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) + 30 CONTINUE + END IF + 40 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'T' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 60 J = 2, M + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 50 I = 1, N + TEMP = A( J, I ) + A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) + A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 80 J = M, 2, -1 + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 70 I = 1, N + TEMP = A( J, I ) + A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) + A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) + 70 CONTINUE + END IF + 80 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'B' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 100 J = 1, M - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 90 I = 1, N + TEMP = A( J, I ) + A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP + A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP + 90 CONTINUE + END IF + 100 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 120 J = M - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 110 I = 1, N + TEMP = A( J, I ) + A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP + A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP + 110 CONTINUE + END IF + 120 CONTINUE + END IF + END IF + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form A * P' +* + IF( LSAME( PIVOT, 'V' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 140 J = 1, N - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 130 I = 1, M + TEMP = A( I, J+1 ) + A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) + A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) + 130 CONTINUE + END IF + 140 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 160 J = N - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 150 I = 1, M + TEMP = A( I, J+1 ) + A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) + A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) + 150 CONTINUE + END IF + 160 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'T' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 180 J = 2, N + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 170 I = 1, M + TEMP = A( I, J ) + A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) + A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) + 170 CONTINUE + END IF + 180 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 200 J = N, 2, -1 + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 190 I = 1, M + TEMP = A( I, J ) + A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) + A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) + 190 CONTINUE + END IF + 200 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'B' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 220 J = 1, N - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 210 I = 1, M + TEMP = A( I, J ) + A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP + A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP + 210 CONTINUE + END IF + 220 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 240 J = N - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 230 I = 1, M + TEMP = A( I, J ) + A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP + A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP + 230 CONTINUE + END IF + 240 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of DLASR +* + END diff --git a/2.3-1/src/fortran/lapack/dlasrt.f b/2.3-1/src/fortran/lapack/dlasrt.f new file mode 100644 index 00000000..37e02178 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasrt.f @@ -0,0 +1,243 @@ + SUBROUTINE DLASRT( ID, N, D, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER ID + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ) +* .. +* +* Purpose +* ======= +* +* Sort the numbers in D in increasing order (if ID = 'I') or +* in decreasing order (if ID = 'D' ). +* +* Use Quick Sort, reverting to Insertion sort on arrays of +* size <= 20. Dimension of STACK limits N to about 2**32. +* +* Arguments +* ========= +* +* ID (input) CHARACTER*1 +* = 'I': sort D in increasing order; +* = 'D': sort D in decreasing order. +* +* N (input) INTEGER +* The length of the array D. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the array to be sorted. +* On exit, D has been sorted into increasing order +* (D(1) <= ... <= D(N) ) or into decreasing order +* (D(1) >= ... >= D(N) ), depending on ID. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER SELECT + PARAMETER ( SELECT = 20 ) +* .. +* .. Local Scalars .. + INTEGER DIR, ENDD, I, J, START, STKPNT + DOUBLE PRECISION D1, D2, D3, DMNMX, TMP +* .. +* .. Local Arrays .. + INTEGER STACK( 2, 32 ) +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input paramters. +* + INFO = 0 + DIR = -1 + IF( LSAME( ID, 'D' ) ) THEN + DIR = 0 + ELSE IF( LSAME( ID, 'I' ) ) THEN + DIR = 1 + END IF + IF( DIR.EQ.-1 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLASRT', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + STKPNT = 1 + STACK( 1, 1 ) = 1 + STACK( 2, 1 ) = N + 10 CONTINUE + START = STACK( 1, STKPNT ) + ENDD = STACK( 2, STKPNT ) + STKPNT = STKPNT - 1 + IF( ENDD-START.LE.SELECT .AND. ENDD-START.GT.0 ) THEN +* +* Do Insertion sort on D( START:ENDD ) +* + IF( DIR.EQ.0 ) THEN +* +* Sort into decreasing order +* + DO 30 I = START + 1, ENDD + DO 20 J = I, START + 1, -1 + IF( D( J ).GT.D( J-1 ) ) THEN + DMNMX = D( J ) + D( J ) = D( J-1 ) + D( J-1 ) = DMNMX + ELSE + GO TO 30 + END IF + 20 CONTINUE + 30 CONTINUE +* + ELSE +* +* Sort into increasing order +* + DO 50 I = START + 1, ENDD + DO 40 J = I, START + 1, -1 + IF( D( J ).LT.D( J-1 ) ) THEN + DMNMX = D( J ) + D( J ) = D( J-1 ) + D( J-1 ) = DMNMX + ELSE + GO TO 50 + END IF + 40 CONTINUE + 50 CONTINUE +* + END IF +* + ELSE IF( ENDD-START.GT.SELECT ) THEN +* +* Partition D( START:ENDD ) and stack parts, largest one first +* +* Choose partition entry as median of 3 +* + D1 = D( START ) + D2 = D( ENDD ) + I = ( START+ENDD ) / 2 + D3 = D( I ) + IF( D1.LT.D2 ) THEN + IF( D3.LT.D1 ) THEN + DMNMX = D1 + ELSE IF( D3.LT.D2 ) THEN + DMNMX = D3 + ELSE + DMNMX = D2 + END IF + ELSE + IF( D3.LT.D2 ) THEN + DMNMX = D2 + ELSE IF( D3.LT.D1 ) THEN + DMNMX = D3 + ELSE + DMNMX = D1 + END IF + END IF +* + IF( DIR.EQ.0 ) THEN +* +* Sort into decreasing order +* + I = START - 1 + J = ENDD + 1 + 60 CONTINUE + 70 CONTINUE + J = J - 1 + IF( D( J ).LT.DMNMX ) + $ GO TO 70 + 80 CONTINUE + I = I + 1 + IF( D( I ).GT.DMNMX ) + $ GO TO 80 + IF( I.LT.J ) THEN + TMP = D( I ) + D( I ) = D( J ) + D( J ) = TMP + GO TO 60 + END IF + IF( J-START.GT.ENDD-J-1 ) THEN + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = START + STACK( 2, STKPNT ) = J + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = J + 1 + STACK( 2, STKPNT ) = ENDD + ELSE + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = J + 1 + STACK( 2, STKPNT ) = ENDD + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = START + STACK( 2, STKPNT ) = J + END IF + ELSE +* +* Sort into increasing order +* + I = START - 1 + J = ENDD + 1 + 90 CONTINUE + 100 CONTINUE + J = J - 1 + IF( D( J ).GT.DMNMX ) + $ GO TO 100 + 110 CONTINUE + I = I + 1 + IF( D( I ).LT.DMNMX ) + $ GO TO 110 + IF( I.LT.J ) THEN + TMP = D( I ) + D( I ) = D( J ) + D( J ) = TMP + GO TO 90 + END IF + IF( J-START.GT.ENDD-J-1 ) THEN + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = START + STACK( 2, STKPNT ) = J + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = J + 1 + STACK( 2, STKPNT ) = ENDD + ELSE + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = J + 1 + STACK( 2, STKPNT ) = ENDD + STKPNT = STKPNT + 1 + STACK( 1, STKPNT ) = START + STACK( 2, STKPNT ) = J + END IF + END IF + END IF + IF( STKPNT.GT.0 ) + $ GO TO 10 + RETURN +* +* End of DLASRT +* + END diff --git a/2.3-1/src/fortran/lapack/dlassq.f b/2.3-1/src/fortran/lapack/dlassq.f new file mode 100644 index 00000000..217e794d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlassq.f @@ -0,0 +1,88 @@ + SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + DOUBLE PRECISION SCALE, SUMSQ +* .. +* .. Array Arguments .. + DOUBLE PRECISION X( * ) +* .. +* +* Purpose +* ======= +* +* DLASSQ returns the values scl and smsq such that +* +* ( scl**2 )*smsq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, +* +* where x( i ) = X( 1 + ( i - 1 )*INCX ). The value of sumsq is +* assumed to be non-negative and scl returns the value +* +* scl = max( scale, abs( x( i ) ) ). +* +* scale and sumsq must be supplied in SCALE and SUMSQ and +* scl and smsq are overwritten on SCALE and SUMSQ respectively. +* +* The routine makes only one pass through the vector x. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of elements to be used from the vector X. +* +* X (input) DOUBLE PRECISION array, dimension (N) +* The vector for which a scaled sum of squares is computed. +* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. +* +* INCX (input) INTEGER +* The increment between successive values of the vector X. +* INCX > 0. +* +* SCALE (input/output) DOUBLE PRECISION +* On entry, the value scale in the equation above. +* On exit, SCALE is overwritten with scl , the scaling factor +* for the sum of squares. +* +* SUMSQ (input/output) DOUBLE PRECISION +* On entry, the value sumsq in the equation above. +* On exit, SUMSQ is overwritten with smsq , the basic sum of +* squares from which scl has been factored out. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER IX + DOUBLE PRECISION ABSXI +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* + IF( N.GT.0 ) THEN + DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX + IF( X( IX ).NE.ZERO ) THEN + ABSXI = ABS( X( IX ) ) + IF( SCALE.LT.ABSXI ) THEN + SUMSQ = 1 + SUMSQ*( SCALE / ABSXI )**2 + SCALE = ABSXI + ELSE + SUMSQ = SUMSQ + ( ABSXI / SCALE )**2 + END IF + END IF + 10 CONTINUE + END IF + RETURN +* +* End of DLASSQ +* + END diff --git a/2.3-1/src/fortran/lapack/dlasv2.f b/2.3-1/src/fortran/lapack/dlasv2.f new file mode 100644 index 00000000..4a00b25d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasv2.f @@ -0,0 +1,249 @@ + SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN +* .. +* +* Purpose +* ======= +* +* DLASV2 computes the singular value decomposition of a 2-by-2 +* triangular matrix +* [ F G ] +* [ 0 H ]. +* On return, abs(SSMAX) is the larger singular value, abs(SSMIN) is the +* smaller singular value, and (CSL,SNL) and (CSR,SNR) are the left and +* right singular vectors for abs(SSMAX), giving the decomposition +* +* [ CSL SNL ] [ F G ] [ CSR -SNR ] = [ SSMAX 0 ] +* [-SNL CSL ] [ 0 H ] [ SNR CSR ] [ 0 SSMIN ]. +* +* Arguments +* ========= +* +* F (input) DOUBLE PRECISION +* The (1,1) element of the 2-by-2 matrix. +* +* G (input) DOUBLE PRECISION +* The (1,2) element of the 2-by-2 matrix. +* +* H (input) DOUBLE PRECISION +* The (2,2) element of the 2-by-2 matrix. +* +* SSMIN (output) DOUBLE PRECISION +* abs(SSMIN) is the smaller singular value. +* +* SSMAX (output) DOUBLE PRECISION +* abs(SSMAX) is the larger singular value. +* +* SNL (output) DOUBLE PRECISION +* CSL (output) DOUBLE PRECISION +* The vector (CSL, SNL) is a unit left singular vector for the +* singular value abs(SSMAX). +* +* SNR (output) DOUBLE PRECISION +* CSR (output) DOUBLE PRECISION +* The vector (CSR, SNR) is a unit right singular vector for the +* singular value abs(SSMAX). +* +* Further Details +* =============== +* +* Any input parameter may be aliased with any output parameter. +* +* Barring over/underflow and assuming a guard digit in subtraction, all +* output quantities are correct to within a few units in the last +* place (ulps). +* +* In IEEE arithmetic, the code works correctly if one matrix element is +* infinite. +* +* Overflow will not occur unless the largest singular value itself +* overflows or is within a few ulps of overflow. (On machines with +* partial overflow, like the Cray, overflow may occur if the largest +* singular value is within a factor of 2 of overflow.) +* +* Underflow is harmless if underflow is gradual. Otherwise, results +* may correspond to a matrix modified by perturbations of size near +* the underflow threshold. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION HALF + PARAMETER ( HALF = 0.5D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0D0 ) + DOUBLE PRECISION FOUR + PARAMETER ( FOUR = 4.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL GASMAL, SWAP + INTEGER PMAX + DOUBLE PRECISION A, CLT, CRT, D, FA, FT, GA, GT, HA, HT, L, M, + $ MM, R, S, SLT, SRT, T, TEMP, TSIGN, TT +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SIGN, SQRT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Executable Statements .. +* + FT = F + FA = ABS( FT ) + HT = H + HA = ABS( H ) +* +* PMAX points to the maximum absolute element of matrix +* PMAX = 1 if F largest in absolute values +* PMAX = 2 if G largest in absolute values +* PMAX = 3 if H largest in absolute values +* + PMAX = 1 + SWAP = ( HA.GT.FA ) + IF( SWAP ) THEN + PMAX = 3 + TEMP = FT + FT = HT + HT = TEMP + TEMP = FA + FA = HA + HA = TEMP +* +* Now FA .ge. HA +* + END IF + GT = G + GA = ABS( GT ) + IF( GA.EQ.ZERO ) THEN +* +* Diagonal matrix +* + SSMIN = HA + SSMAX = FA + CLT = ONE + CRT = ONE + SLT = ZERO + SRT = ZERO + ELSE + GASMAL = .TRUE. + IF( GA.GT.FA ) THEN + PMAX = 2 + IF( ( FA / GA ).LT.DLAMCH( 'EPS' ) ) THEN +* +* Case of very large GA +* + GASMAL = .FALSE. + SSMAX = GA + IF( HA.GT.ONE ) THEN + SSMIN = FA / ( GA / HA ) + ELSE + SSMIN = ( FA / GA )*HA + END IF + CLT = ONE + SLT = HT / GT + SRT = ONE + CRT = FT / GT + END IF + END IF + IF( GASMAL ) THEN +* +* Normal case +* + D = FA - HA + IF( D.EQ.FA ) THEN +* +* Copes with infinite F or H +* + L = ONE + ELSE + L = D / FA + END IF +* +* Note that 0 .le. L .le. 1 +* + M = GT / FT +* +* Note that abs(M) .le. 1/macheps +* + T = TWO - L +* +* Note that T .ge. 1 +* + MM = M*M + TT = T*T + S = SQRT( TT+MM ) +* +* Note that 1 .le. S .le. 1 + 1/macheps +* + IF( L.EQ.ZERO ) THEN + R = ABS( M ) + ELSE + R = SQRT( L*L+MM ) + END IF +* +* Note that 0 .le. R .le. 1 + 1/macheps +* + A = HALF*( S+R ) +* +* Note that 1 .le. A .le. 1 + abs(M) +* + SSMIN = HA / A + SSMAX = FA*A + IF( MM.EQ.ZERO ) THEN +* +* Note that M is very tiny +* + IF( L.EQ.ZERO ) THEN + T = SIGN( TWO, FT )*SIGN( ONE, GT ) + ELSE + T = GT / SIGN( D, FT ) + M / T + END IF + ELSE + T = ( M / ( S+T )+M / ( R+L ) )*( ONE+A ) + END IF + L = SQRT( T*T+FOUR ) + CRT = TWO / L + SRT = T / L + CLT = ( CRT+SRT*M ) / A + SLT = ( HT / FT )*SRT / A + END IF + END IF + IF( SWAP ) THEN + CSL = SRT + SNL = CRT + CSR = SLT + SNR = CLT + ELSE + CSL = CLT + SNL = SLT + CSR = CRT + SNR = SRT + END IF +* +* Correct signs of SSMAX and SSMIN +* + IF( PMAX.EQ.1 ) + $ TSIGN = SIGN( ONE, CSR )*SIGN( ONE, CSL )*SIGN( ONE, F ) + IF( PMAX.EQ.2 ) + $ TSIGN = SIGN( ONE, SNR )*SIGN( ONE, CSL )*SIGN( ONE, G ) + IF( PMAX.EQ.3 ) + $ TSIGN = SIGN( ONE, SNR )*SIGN( ONE, SNL )*SIGN( ONE, H ) + SSMAX = SIGN( SSMAX, TSIGN ) + SSMIN = SIGN( SSMIN, TSIGN*SIGN( ONE, F )*SIGN( ONE, H ) ) + RETURN +* +* End of DLASV2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlaswp.f b/2.3-1/src/fortran/lapack/dlaswp.f new file mode 100644 index 00000000..a11a87e9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlaswp.f @@ -0,0 +1,119 @@ + SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, K1, K2, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DLASWP performs a series of row interchanges on the matrix A. +* One row interchange is initiated for each of rows K1 through K2 of A. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of columns of the matrix A. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the matrix of column dimension N to which the row +* interchanges will be applied. +* On exit, the permuted matrix. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* +* K1 (input) INTEGER +* The first element of IPIV for which a row interchange will +* be done. +* +* K2 (input) INTEGER +* The last element of IPIV for which a row interchange will +* be done. +* +* IPIV (input) INTEGER array, dimension (K2*abs(INCX)) +* The vector of pivot indices. Only the elements in positions +* K1 through K2 of IPIV are accessed. +* IPIV(K) = L implies rows K and L are to be interchanged. +* +* INCX (input) INTEGER +* The increment between successive values of IPIV. If IPIV +* is negative, the pivots are applied in reverse order. +* +* Further Details +* =============== +* +* Modified by +* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, I1, I2, INC, IP, IX, IX0, J, K, N32 + DOUBLE PRECISION TEMP +* .. +* .. Executable Statements .. +* +* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* + IF( INCX.GT.0 ) THEN + IX0 = K1 + I1 = K1 + I2 = K2 + INC = 1 + ELSE IF( INCX.LT.0 ) THEN + IX0 = 1 + ( 1-K2 )*INCX + I1 = K2 + I2 = K1 + INC = -1 + ELSE + RETURN + END IF +* + N32 = ( N / 32 )*32 + IF( N32.NE.0 ) THEN + DO 30 J = 1, N32, 32 + IX = IX0 + DO 20 I = I1, I2, INC + IP = IPIV( IX ) + IF( IP.NE.I ) THEN + DO 10 K = J, J + 31 + TEMP = A( I, K ) + A( I, K ) = A( IP, K ) + A( IP, K ) = TEMP + 10 CONTINUE + END IF + IX = IX + INCX + 20 CONTINUE + 30 CONTINUE + END IF + IF( N32.NE.N ) THEN + N32 = N32 + 1 + IX = IX0 + DO 50 I = I1, I2, INC + IP = IPIV( IX ) + IF( IP.NE.I ) THEN + DO 40 K = N32, N + TEMP = A( I, K ) + A( I, K ) = A( IP, K ) + A( IP, K ) = TEMP + 40 CONTINUE + END IF + IX = IX + INCX + 50 CONTINUE + END IF +* + RETURN +* +* End of DLASWP +* + END diff --git a/2.3-1/src/fortran/lapack/dlasy2.f b/2.3-1/src/fortran/lapack/dlasy2.f new file mode 100644 index 00000000..3ff12070 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasy2.f @@ -0,0 +1,381 @@ + SUBROUTINE DLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR, + $ LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL LTRANL, LTRANR + INTEGER INFO, ISGN, LDB, LDTL, LDTR, LDX, N1, N2 + DOUBLE PRECISION SCALE, XNORM +* .. +* .. Array Arguments .. + DOUBLE PRECISION B( LDB, * ), TL( LDTL, * ), TR( LDTR, * ), + $ X( LDX, * ) +* .. +* +* Purpose +* ======= +* +* DLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in +* +* op(TL)*X + ISGN*X*op(TR) = SCALE*B, +* +* where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or +* -1. op(T) = T or T', where T' denotes the transpose of T. +* +* Arguments +* ========= +* +* LTRANL (input) LOGICAL +* On entry, LTRANL specifies the op(TL): +* = .FALSE., op(TL) = TL, +* = .TRUE., op(TL) = TL'. +* +* LTRANR (input) LOGICAL +* On entry, LTRANR specifies the op(TR): +* = .FALSE., op(TR) = TR, +* = .TRUE., op(TR) = TR'. +* +* ISGN (input) INTEGER +* On entry, ISGN specifies the sign of the equation +* as described before. ISGN may only be 1 or -1. +* +* N1 (input) INTEGER +* On entry, N1 specifies the order of matrix TL. +* N1 may only be 0, 1 or 2. +* +* N2 (input) INTEGER +* On entry, N2 specifies the order of matrix TR. +* N2 may only be 0, 1 or 2. +* +* TL (input) DOUBLE PRECISION array, dimension (LDTL,2) +* On entry, TL contains an N1 by N1 matrix. +* +* LDTL (input) INTEGER +* The leading dimension of the matrix TL. LDTL >= max(1,N1). +* +* TR (input) DOUBLE PRECISION array, dimension (LDTR,2) +* On entry, TR contains an N2 by N2 matrix. +* +* LDTR (input) INTEGER +* The leading dimension of the matrix TR. LDTR >= max(1,N2). +* +* B (input) DOUBLE PRECISION array, dimension (LDB,2) +* On entry, the N1 by N2 matrix B contains the right-hand +* side of the equation. +* +* LDB (input) INTEGER +* The leading dimension of the matrix B. LDB >= max(1,N1). +* +* SCALE (output) DOUBLE PRECISION +* On exit, SCALE contains the scale factor. SCALE is chosen +* less than or equal to 1 to prevent the solution overflowing. +* +* X (output) DOUBLE PRECISION array, dimension (LDX,2) +* On exit, X contains the N1 by N2 solution. +* +* LDX (input) INTEGER +* The leading dimension of the matrix X. LDX >= max(1,N1). +* +* XNORM (output) DOUBLE PRECISION +* On exit, XNORM is the infinity-norm of the solution. +* +* INFO (output) INTEGER +* On exit, INFO is set to +* 0: successful exit. +* 1: TL and TR have too close eigenvalues, so TL or +* TR is perturbed to get a nonsingular equation. +* NOTE: In the interests of speed, this routine does not +* check the inputs for errors. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION TWO, HALF, EIGHT + PARAMETER ( TWO = 2.0D+0, HALF = 0.5D+0, EIGHT = 8.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL BSWAP, XSWAP + INTEGER I, IP, IPIV, IPSV, J, JP, JPSV, K + DOUBLE PRECISION BET, EPS, GAM, L21, SGN, SMIN, SMLNUM, TAU1, + $ TEMP, U11, U12, U22, XMAX +* .. +* .. Local Arrays .. + LOGICAL BSWPIV( 4 ), XSWPIV( 4 ) + INTEGER JPIV( 4 ), LOCL21( 4 ), LOCU12( 4 ), + $ LOCU22( 4 ) + DOUBLE PRECISION BTMP( 4 ), T16( 4, 4 ), TMP( 4 ), X2( 2 ) +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL IDAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Data statements .. + DATA LOCU12 / 3, 4, 1, 2 / , LOCL21 / 2, 1, 4, 3 / , + $ LOCU22 / 4, 3, 2, 1 / + DATA XSWPIV / .FALSE., .FALSE., .TRUE., .TRUE. / + DATA BSWPIV / .FALSE., .TRUE., .FALSE., .TRUE. / +* .. +* .. Executable Statements .. +* +* Do not check the input parameters for errors +* + INFO = 0 +* +* Quick return if possible +* + IF( N1.EQ.0 .OR. N2.EQ.0 ) + $ RETURN +* +* Set constants to control overflow +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + SGN = ISGN +* + K = N1 + N1 + N2 - 2 + GO TO ( 10, 20, 30, 50 )K +* +* 1 by 1: TL11*X + SGN*X*TR11 = B11 +* + 10 CONTINUE + TAU1 = TL( 1, 1 ) + SGN*TR( 1, 1 ) + BET = ABS( TAU1 ) + IF( BET.LE.SMLNUM ) THEN + TAU1 = SMLNUM + BET = SMLNUM + INFO = 1 + END IF +* + SCALE = ONE + GAM = ABS( B( 1, 1 ) ) + IF( SMLNUM*GAM.GT.BET ) + $ SCALE = ONE / GAM +* + X( 1, 1 ) = ( B( 1, 1 )*SCALE ) / TAU1 + XNORM = ABS( X( 1, 1 ) ) + RETURN +* +* 1 by 2: +* TL11*[X11 X12] + ISGN*[X11 X12]*op[TR11 TR12] = [B11 B12] +* [TR21 TR22] +* + 20 CONTINUE +* + SMIN = MAX( EPS*MAX( ABS( TL( 1, 1 ) ), ABS( TR( 1, 1 ) ), + $ ABS( TR( 1, 2 ) ), ABS( TR( 2, 1 ) ), ABS( TR( 2, 2 ) ) ), + $ SMLNUM ) + TMP( 1 ) = TL( 1, 1 ) + SGN*TR( 1, 1 ) + TMP( 4 ) = TL( 1, 1 ) + SGN*TR( 2, 2 ) + IF( LTRANR ) THEN + TMP( 2 ) = SGN*TR( 2, 1 ) + TMP( 3 ) = SGN*TR( 1, 2 ) + ELSE + TMP( 2 ) = SGN*TR( 1, 2 ) + TMP( 3 ) = SGN*TR( 2, 1 ) + END IF + BTMP( 1 ) = B( 1, 1 ) + BTMP( 2 ) = B( 1, 2 ) + GO TO 40 +* +* 2 by 1: +* op[TL11 TL12]*[X11] + ISGN* [X11]*TR11 = [B11] +* [TL21 TL22] [X21] [X21] [B21] +* + 30 CONTINUE + SMIN = MAX( EPS*MAX( ABS( TR( 1, 1 ) ), ABS( TL( 1, 1 ) ), + $ ABS( TL( 1, 2 ) ), ABS( TL( 2, 1 ) ), ABS( TL( 2, 2 ) ) ), + $ SMLNUM ) + TMP( 1 ) = TL( 1, 1 ) + SGN*TR( 1, 1 ) + TMP( 4 ) = TL( 2, 2 ) + SGN*TR( 1, 1 ) + IF( LTRANL ) THEN + TMP( 2 ) = TL( 1, 2 ) + TMP( 3 ) = TL( 2, 1 ) + ELSE + TMP( 2 ) = TL( 2, 1 ) + TMP( 3 ) = TL( 1, 2 ) + END IF + BTMP( 1 ) = B( 1, 1 ) + BTMP( 2 ) = B( 2, 1 ) + 40 CONTINUE +* +* Solve 2 by 2 system using complete pivoting. +* Set pivots less than SMIN to SMIN. +* + IPIV = IDAMAX( 4, TMP, 1 ) + U11 = TMP( IPIV ) + IF( ABS( U11 ).LE.SMIN ) THEN + INFO = 1 + U11 = SMIN + END IF + U12 = TMP( LOCU12( IPIV ) ) + L21 = TMP( LOCL21( IPIV ) ) / U11 + U22 = TMP( LOCU22( IPIV ) ) - U12*L21 + XSWAP = XSWPIV( IPIV ) + BSWAP = BSWPIV( IPIV ) + IF( ABS( U22 ).LE.SMIN ) THEN + INFO = 1 + U22 = SMIN + END IF + IF( BSWAP ) THEN + TEMP = BTMP( 2 ) + BTMP( 2 ) = BTMP( 1 ) - L21*TEMP + BTMP( 1 ) = TEMP + ELSE + BTMP( 2 ) = BTMP( 2 ) - L21*BTMP( 1 ) + END IF + SCALE = ONE + IF( ( TWO*SMLNUM )*ABS( BTMP( 2 ) ).GT.ABS( U22 ) .OR. + $ ( TWO*SMLNUM )*ABS( BTMP( 1 ) ).GT.ABS( U11 ) ) THEN + SCALE = HALF / MAX( ABS( BTMP( 1 ) ), ABS( BTMP( 2 ) ) ) + BTMP( 1 ) = BTMP( 1 )*SCALE + BTMP( 2 ) = BTMP( 2 )*SCALE + END IF + X2( 2 ) = BTMP( 2 ) / U22 + X2( 1 ) = BTMP( 1 ) / U11 - ( U12 / U11 )*X2( 2 ) + IF( XSWAP ) THEN + TEMP = X2( 2 ) + X2( 2 ) = X2( 1 ) + X2( 1 ) = TEMP + END IF + X( 1, 1 ) = X2( 1 ) + IF( N1.EQ.1 ) THEN + X( 1, 2 ) = X2( 2 ) + XNORM = ABS( X( 1, 1 ) ) + ABS( X( 1, 2 ) ) + ELSE + X( 2, 1 ) = X2( 2 ) + XNORM = MAX( ABS( X( 1, 1 ) ), ABS( X( 2, 1 ) ) ) + END IF + RETURN +* +* 2 by 2: +* op[TL11 TL12]*[X11 X12] +ISGN* [X11 X12]*op[TR11 TR12] = [B11 B12] +* [TL21 TL22] [X21 X22] [X21 X22] [TR21 TR22] [B21 B22] +* +* Solve equivalent 4 by 4 system using complete pivoting. +* Set pivots less than SMIN to SMIN. +* + 50 CONTINUE + SMIN = MAX( ABS( TR( 1, 1 ) ), ABS( TR( 1, 2 ) ), + $ ABS( TR( 2, 1 ) ), ABS( TR( 2, 2 ) ) ) + SMIN = MAX( SMIN, ABS( TL( 1, 1 ) ), ABS( TL( 1, 2 ) ), + $ ABS( TL( 2, 1 ) ), ABS( TL( 2, 2 ) ) ) + SMIN = MAX( EPS*SMIN, SMLNUM ) + BTMP( 1 ) = ZERO + CALL DCOPY( 16, BTMP, 0, T16, 1 ) + T16( 1, 1 ) = TL( 1, 1 ) + SGN*TR( 1, 1 ) + T16( 2, 2 ) = TL( 2, 2 ) + SGN*TR( 1, 1 ) + T16( 3, 3 ) = TL( 1, 1 ) + SGN*TR( 2, 2 ) + T16( 4, 4 ) = TL( 2, 2 ) + SGN*TR( 2, 2 ) + IF( LTRANL ) THEN + T16( 1, 2 ) = TL( 2, 1 ) + T16( 2, 1 ) = TL( 1, 2 ) + T16( 3, 4 ) = TL( 2, 1 ) + T16( 4, 3 ) = TL( 1, 2 ) + ELSE + T16( 1, 2 ) = TL( 1, 2 ) + T16( 2, 1 ) = TL( 2, 1 ) + T16( 3, 4 ) = TL( 1, 2 ) + T16( 4, 3 ) = TL( 2, 1 ) + END IF + IF( LTRANR ) THEN + T16( 1, 3 ) = SGN*TR( 1, 2 ) + T16( 2, 4 ) = SGN*TR( 1, 2 ) + T16( 3, 1 ) = SGN*TR( 2, 1 ) + T16( 4, 2 ) = SGN*TR( 2, 1 ) + ELSE + T16( 1, 3 ) = SGN*TR( 2, 1 ) + T16( 2, 4 ) = SGN*TR( 2, 1 ) + T16( 3, 1 ) = SGN*TR( 1, 2 ) + T16( 4, 2 ) = SGN*TR( 1, 2 ) + END IF + BTMP( 1 ) = B( 1, 1 ) + BTMP( 2 ) = B( 2, 1 ) + BTMP( 3 ) = B( 1, 2 ) + BTMP( 4 ) = B( 2, 2 ) +* +* Perform elimination +* + DO 100 I = 1, 3 + XMAX = ZERO + DO 70 IP = I, 4 + DO 60 JP = I, 4 + IF( ABS( T16( IP, JP ) ).GE.XMAX ) THEN + XMAX = ABS( T16( IP, JP ) ) + IPSV = IP + JPSV = JP + END IF + 60 CONTINUE + 70 CONTINUE + IF( IPSV.NE.I ) THEN + CALL DSWAP( 4, T16( IPSV, 1 ), 4, T16( I, 1 ), 4 ) + TEMP = BTMP( I ) + BTMP( I ) = BTMP( IPSV ) + BTMP( IPSV ) = TEMP + END IF + IF( JPSV.NE.I ) + $ CALL DSWAP( 4, T16( 1, JPSV ), 1, T16( 1, I ), 1 ) + JPIV( I ) = JPSV + IF( ABS( T16( I, I ) ).LT.SMIN ) THEN + INFO = 1 + T16( I, I ) = SMIN + END IF + DO 90 J = I + 1, 4 + T16( J, I ) = T16( J, I ) / T16( I, I ) + BTMP( J ) = BTMP( J ) - T16( J, I )*BTMP( I ) + DO 80 K = I + 1, 4 + T16( J, K ) = T16( J, K ) - T16( J, I )*T16( I, K ) + 80 CONTINUE + 90 CONTINUE + 100 CONTINUE + IF( ABS( T16( 4, 4 ) ).LT.SMIN ) + $ T16( 4, 4 ) = SMIN + SCALE = ONE + IF( ( EIGHT*SMLNUM )*ABS( BTMP( 1 ) ).GT.ABS( T16( 1, 1 ) ) .OR. + $ ( EIGHT*SMLNUM )*ABS( BTMP( 2 ) ).GT.ABS( T16( 2, 2 ) ) .OR. + $ ( EIGHT*SMLNUM )*ABS( BTMP( 3 ) ).GT.ABS( T16( 3, 3 ) ) .OR. + $ ( EIGHT*SMLNUM )*ABS( BTMP( 4 ) ).GT.ABS( T16( 4, 4 ) ) ) THEN + SCALE = ( ONE / EIGHT ) / MAX( ABS( BTMP( 1 ) ), + $ ABS( BTMP( 2 ) ), ABS( BTMP( 3 ) ), ABS( BTMP( 4 ) ) ) + BTMP( 1 ) = BTMP( 1 )*SCALE + BTMP( 2 ) = BTMP( 2 )*SCALE + BTMP( 3 ) = BTMP( 3 )*SCALE + BTMP( 4 ) = BTMP( 4 )*SCALE + END IF + DO 120 I = 1, 4 + K = 5 - I + TEMP = ONE / T16( K, K ) + TMP( K ) = BTMP( K )*TEMP + DO 110 J = K + 1, 4 + TMP( K ) = TMP( K ) - ( TEMP*T16( K, J ) )*TMP( J ) + 110 CONTINUE + 120 CONTINUE + DO 130 I = 1, 3 + IF( JPIV( 4-I ).NE.4-I ) THEN + TEMP = TMP( 4-I ) + TMP( 4-I ) = TMP( JPIV( 4-I ) ) + TMP( JPIV( 4-I ) ) = TEMP + END IF + 130 CONTINUE + X( 1, 1 ) = TMP( 1 ) + X( 2, 1 ) = TMP( 2 ) + X( 1, 2 ) = TMP( 3 ) + X( 2, 2 ) = TMP( 4 ) + XNORM = MAX( ABS( TMP( 1 ) )+ABS( TMP( 3 ) ), + $ ABS( TMP( 2 ) )+ABS( TMP( 4 ) ) ) + RETURN +* +* End of DLASY2 +* + END diff --git a/2.3-1/src/fortran/lapack/dlasyf.f b/2.3-1/src/fortran/lapack/dlasyf.f new file mode 100644 index 00000000..67b9c147 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlasyf.f @@ -0,0 +1,587 @@ + SUBROUTINE DLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, KB, LDA, LDW, N, NB +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), W( LDW, * ) +* .. +* +* Purpose +* ======= +* +* DLASYF computes a partial factorization of a real symmetric matrix A +* using the Bunch-Kaufman diagonal pivoting method. The partial +* factorization has the form: +* +* A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or: +* ( 0 U22 ) ( 0 D ) ( U12' U22' ) +* +* A = ( L11 0 ) ( D 0 ) ( L11' L21' ) if UPLO = 'L' +* ( L21 I ) ( 0 A22 ) ( 0 I ) +* +* where the order of D is at most NB. The actual order is returned in +* the argument KB, and is either NB or NB-1, or N if N <= NB. +* +* DLASYF is an auxiliary routine called by DSYTRF. It uses blocked code +* (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or +* A22 (if UPLO = 'L'). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NB (input) INTEGER +* The maximum number of columns of the matrix A that should be +* factored. NB should be at least 2 to allow for 2-by-2 pivot +* blocks. +* +* KB (output) INTEGER +* The number of columns of A that were actually factored. +* KB is either NB-1 or NB, or N if N <= NB. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit, A contains details of the partial factorization. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D. +* If UPLO = 'U', only the last KB elements of IPIV are set; +* if UPLO = 'L', only the first KB elements are set. +* +* If IPIV(k) > 0, then rows and columns k and IPIV(k) were +* interchanged and D(k,k) is a 1-by-1 diagonal block. +* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and +* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) +* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = +* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were +* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. +* +* W (workspace) DOUBLE PRECISION array, dimension (LDW,NB) +* +* LDW (input) INTEGER +* The leading dimension of the array W. LDW >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* > 0: if INFO = k, D(k,k) is exactly zero. The factorization +* has been completed, but the block diagonal matrix D is +* exactly singular. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION EIGHT, SEVTEN + PARAMETER ( EIGHT = 8.0D+0, SEVTEN = 17.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER IMAX, J, JB, JJ, JMAX, JP, K, KK, KKW, KP, + $ KSTEP, KW + DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, D11, D21, D22, R1, + $ ROWMAX, T +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + EXTERNAL LSAME, IDAMAX +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DGEMM, DGEMV, DSCAL, DSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Initialize ALPHA for use in choosing pivot block size. +* + ALPHA = ( ONE+SQRT( SEVTEN ) ) / EIGHT +* + IF( LSAME( UPLO, 'U' ) ) THEN +* +* Factorize the trailing columns of A using the upper triangle +* of A and working backwards, and compute the matrix W = U12*D +* for use in updating A11 +* +* K is the main loop index, decreasing from N in steps of 1 or 2 +* +* KW is the column of W which corresponds to column K of A +* + K = N + 10 CONTINUE + KW = NB + K - N +* +* Exit from loop +* + IF( ( K.LE.N-NB+1 .AND. NB.LT.N ) .OR. K.LT.1 ) + $ GO TO 30 +* +* Copy column K of A to column KW of W and update it +* + CALL DCOPY( K, A( 1, K ), 1, W( 1, KW ), 1 ) + IF( K.LT.N ) + $ CALL DGEMV( 'No transpose', K, N-K, -ONE, A( 1, K+1 ), LDA, + $ W( K, KW+1 ), LDW, ONE, W( 1, KW ), 1 ) +* + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( W( K, KW ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.GT.1 ) THEN + IMAX = IDAMAX( K-1, W( 1, KW ), 1 ) + COLMAX = ABS( W( IMAX, KW ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN +* +* Column K is zero: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* Copy column IMAX to column KW-1 of W and update it +* + CALL DCOPY( IMAX, A( 1, IMAX ), 1, W( 1, KW-1 ), 1 ) + CALL DCOPY( K-IMAX, A( IMAX, IMAX+1 ), LDA, + $ W( IMAX+1, KW-1 ), 1 ) + IF( K.LT.N ) + $ CALL DGEMV( 'No transpose', K, N-K, -ONE, A( 1, K+1 ), + $ LDA, W( IMAX, KW+1 ), LDW, ONE, + $ W( 1, KW-1 ), 1 ) +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + JMAX = IMAX + IDAMAX( K-IMAX, W( IMAX+1, KW-1 ), 1 ) + ROWMAX = ABS( W( JMAX, KW-1 ) ) + IF( IMAX.GT.1 ) THEN + JMAX = IDAMAX( IMAX-1, W( 1, KW-1 ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( W( JMAX, KW-1 ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( W( IMAX, KW-1 ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX +* +* copy column KW-1 of W to column KW +* + CALL DCOPY( K, W( 1, KW-1 ), 1, W( 1, KW ), 1 ) + ELSE +* +* interchange rows and columns K-1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K - KSTEP + 1 + KKW = NB + KK - N +* +* Updated column KP is already stored in column KKW of W +* + IF( KP.NE.KK ) THEN +* +* Copy non-updated column KK to column KP +* + A( KP, K ) = A( KK, K ) + CALL DCOPY( K-1-KP, A( KP+1, KK ), 1, A( KP, KP+1 ), + $ LDA ) + CALL DCOPY( KP, A( 1, KK ), 1, A( 1, KP ), 1 ) +* +* Interchange rows KK and KP in last KK columns of A and W +* + CALL DSWAP( N-KK+1, A( KK, KK ), LDA, A( KP, KK ), LDA ) + CALL DSWAP( N-KK+1, W( KK, KKW ), LDW, W( KP, KKW ), + $ LDW ) + END IF +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column KW of W now holds +* +* W(k) = U(k)*D(k) +* +* where U(k) is the k-th column of U +* +* Store U(k) in column k of A +* + CALL DCOPY( K, W( 1, KW ), 1, A( 1, K ), 1 ) + R1 = ONE / A( K, K ) + CALL DSCAL( K-1, R1, A( 1, K ), 1 ) + ELSE +* +* 2-by-2 pivot block D(k): columns KW and KW-1 of W now +* hold +* +* ( W(k-1) W(k) ) = ( U(k-1) U(k) )*D(k) +* +* where U(k) and U(k-1) are the k-th and (k-1)-th columns +* of U +* + IF( K.GT.2 ) THEN +* +* Store U(k) and U(k-1) in columns k and k-1 of A +* + D21 = W( K-1, KW ) + D11 = W( K, KW ) / D21 + D22 = W( K-1, KW-1 ) / D21 + T = ONE / ( D11*D22-ONE ) + D21 = T / D21 + DO 20 J = 1, K - 2 + A( J, K-1 ) = D21*( D11*W( J, KW-1 )-W( J, KW ) ) + A( J, K ) = D21*( D22*W( J, KW )-W( J, KW-1 ) ) + 20 CONTINUE + END IF +* +* Copy D(k) to A +* + A( K-1, K-1 ) = W( K-1, KW-1 ) + A( K-1, K ) = W( K-1, KW ) + A( K, K ) = W( K, KW ) + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K-1 ) = -KP + END IF +* +* Decrease K and return to the start of the main loop +* + K = K - KSTEP + GO TO 10 +* + 30 CONTINUE +* +* Update the upper triangle of A11 (= A(1:k,1:k)) as +* +* A11 := A11 - U12*D*U12' = A11 - U12*W' +* +* computing blocks of NB columns at a time +* + DO 50 J = ( ( K-1 ) / NB )*NB + 1, 1, -NB + JB = MIN( NB, K-J+1 ) +* +* Update the upper triangle of the diagonal block +* + DO 40 JJ = J, J + JB - 1 + CALL DGEMV( 'No transpose', JJ-J+1, N-K, -ONE, + $ A( J, K+1 ), LDA, W( JJ, KW+1 ), LDW, ONE, + $ A( J, JJ ), 1 ) + 40 CONTINUE +* +* Update the rectangular superdiagonal block +* + CALL DGEMM( 'No transpose', 'Transpose', J-1, JB, N-K, -ONE, + $ A( 1, K+1 ), LDA, W( J, KW+1 ), LDW, ONE, + $ A( 1, J ), LDA ) + 50 CONTINUE +* +* Put U12 in standard form by partially undoing the interchanges +* in columns k+1:n +* + J = K + 1 + 60 CONTINUE + JJ = J + JP = IPIV( J ) + IF( JP.LT.0 ) THEN + JP = -JP + J = J + 1 + END IF + J = J + 1 + IF( JP.NE.JJ .AND. J.LE.N ) + $ CALL DSWAP( N-J+1, A( JP, J ), LDA, A( JJ, J ), LDA ) + IF( J.LE.N ) + $ GO TO 60 +* +* Set KB to the number of columns factorized +* + KB = N - K +* + ELSE +* +* Factorize the leading columns of A using the lower triangle +* of A and working forwards, and compute the matrix W = L21*D +* for use in updating A22 +* +* K is the main loop index, increasing from 1 in steps of 1 or 2 +* + K = 1 + 70 CONTINUE +* +* Exit from loop +* + IF( ( K.GE.NB .AND. NB.LT.N ) .OR. K.GT.N ) + $ GO TO 90 +* +* Copy column K of A to column K of W and update it +* + CALL DCOPY( N-K+1, A( K, K ), 1, W( K, K ), 1 ) + CALL DGEMV( 'No transpose', N-K+1, K-1, -ONE, A( K, 1 ), LDA, + $ W( K, 1 ), LDW, ONE, W( K, K ), 1 ) +* + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( W( K, K ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.LT.N ) THEN + IMAX = K + IDAMAX( N-K, W( K+1, K ), 1 ) + COLMAX = ABS( W( IMAX, K ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN +* +* Column K is zero: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* Copy column IMAX to column K+1 of W and update it +* + CALL DCOPY( IMAX-K, A( IMAX, K ), LDA, W( K, K+1 ), 1 ) + CALL DCOPY( N-IMAX+1, A( IMAX, IMAX ), 1, W( IMAX, K+1 ), + $ 1 ) + CALL DGEMV( 'No transpose', N-K+1, K-1, -ONE, A( K, 1 ), + $ LDA, W( IMAX, 1 ), LDW, ONE, W( K, K+1 ), 1 ) +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + JMAX = K - 1 + IDAMAX( IMAX-K, W( K, K+1 ), 1 ) + ROWMAX = ABS( W( JMAX, K+1 ) ) + IF( IMAX.LT.N ) THEN + JMAX = IMAX + IDAMAX( N-IMAX, W( IMAX+1, K+1 ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( W( JMAX, K+1 ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( W( IMAX, K+1 ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX +* +* copy column K+1 of W to column K +* + CALL DCOPY( N-K+1, W( K, K+1 ), 1, W( K, K ), 1 ) + ELSE +* +* interchange rows and columns K+1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K + KSTEP - 1 +* +* Updated column KP is already stored in column KK of W +* + IF( KP.NE.KK ) THEN +* +* Copy non-updated column KK to column KP +* + A( KP, K ) = A( KK, K ) + CALL DCOPY( KP-K-1, A( K+1, KK ), 1, A( KP, K+1 ), LDA ) + CALL DCOPY( N-KP+1, A( KP, KK ), 1, A( KP, KP ), 1 ) +* +* Interchange rows KK and KP in first KK columns of A and W +* + CALL DSWAP( KK, A( KK, 1 ), LDA, A( KP, 1 ), LDA ) + CALL DSWAP( KK, W( KK, 1 ), LDW, W( KP, 1 ), LDW ) + END IF +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column k of W now holds +* +* W(k) = L(k)*D(k) +* +* where L(k) is the k-th column of L +* +* Store L(k) in column k of A +* + CALL DCOPY( N-K+1, W( K, K ), 1, A( K, K ), 1 ) + IF( K.LT.N ) THEN + R1 = ONE / A( K, K ) + CALL DSCAL( N-K, R1, A( K+1, K ), 1 ) + END IF + ELSE +* +* 2-by-2 pivot block D(k): columns k and k+1 of W now hold +* +* ( W(k) W(k+1) ) = ( L(k) L(k+1) )*D(k) +* +* where L(k) and L(k+1) are the k-th and (k+1)-th columns +* of L +* + IF( K.LT.N-1 ) THEN +* +* Store L(k) and L(k+1) in columns k and k+1 of A +* + D21 = W( K+1, K ) + D11 = W( K+1, K+1 ) / D21 + D22 = W( K, K ) / D21 + T = ONE / ( D11*D22-ONE ) + D21 = T / D21 + DO 80 J = K + 2, N + A( J, K ) = D21*( D11*W( J, K )-W( J, K+1 ) ) + A( J, K+1 ) = D21*( D22*W( J, K+1 )-W( J, K ) ) + 80 CONTINUE + END IF +* +* Copy D(k) to A +* + A( K, K ) = W( K, K ) + A( K+1, K ) = W( K+1, K ) + A( K+1, K+1 ) = W( K+1, K+1 ) + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K+1 ) = -KP + END IF +* +* Increase K and return to the start of the main loop +* + K = K + KSTEP + GO TO 70 +* + 90 CONTINUE +* +* Update the lower triangle of A22 (= A(k:n,k:n)) as +* +* A22 := A22 - L21*D*L21' = A22 - L21*W' +* +* computing blocks of NB columns at a time +* + DO 110 J = K, N, NB + JB = MIN( NB, N-J+1 ) +* +* Update the lower triangle of the diagonal block +* + DO 100 JJ = J, J + JB - 1 + CALL DGEMV( 'No transpose', J+JB-JJ, K-1, -ONE, + $ A( JJ, 1 ), LDA, W( JJ, 1 ), LDW, ONE, + $ A( JJ, JJ ), 1 ) + 100 CONTINUE +* +* Update the rectangular subdiagonal block +* + IF( J+JB.LE.N ) + $ CALL DGEMM( 'No transpose', 'Transpose', N-J-JB+1, JB, + $ K-1, -ONE, A( J+JB, 1 ), LDA, W( J, 1 ), LDW, + $ ONE, A( J+JB, J ), LDA ) + 110 CONTINUE +* +* Put L21 in standard form by partially undoing the interchanges +* in columns 1:k-1 +* + J = K - 1 + 120 CONTINUE + JJ = J + JP = IPIV( J ) + IF( JP.LT.0 ) THEN + JP = -JP + J = J - 1 + END IF + J = J - 1 + IF( JP.NE.JJ .AND. J.GE.1 ) + $ CALL DSWAP( J, A( JP, 1 ), LDA, A( JJ, 1 ), LDA ) + IF( J.GE.1 ) + $ GO TO 120 +* +* Set KB to the number of columns factorized +* + KB = K - 1 +* + END IF + RETURN +* +* End of DLASYF +* + END diff --git a/2.3-1/src/fortran/lapack/dlatdf.f b/2.3-1/src/fortran/lapack/dlatdf.f new file mode 100644 index 00000000..91fa46e3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlatdf.f @@ -0,0 +1,237 @@ + SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, + $ JPIV ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IJOB, LDZ, N + DOUBLE PRECISION RDSCAL, RDSUM +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + DOUBLE PRECISION RHS( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DLATDF uses the LU factorization of the n-by-n matrix Z computed by +* DGETC2 and computes a contribution to the reciprocal Dif-estimate +* by solving Z * x = b for x, and choosing the r.h.s. b such that +* the norm of x is as large as possible. On entry RHS = b holds the +* contribution from earlier solved sub-systems, and on return RHS = x. +* +* The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q, +* where P and Q are permutation matrices. L is lower triangular with +* unit diagonal elements and U is upper triangular. +* +* Arguments +* ========= +* +* IJOB (input) INTEGER +* IJOB = 2: First compute an approximative null-vector e +* of Z using DGECON, e is normalized and solve for +* Zx = +-e - f with the sign giving the greater value +* of 2-norm(x). About 5 times as expensive as Default. +* IJOB .ne. 2: Local look ahead strategy where all entries of +* the r.h.s. b is choosen as either +1 or -1 (Default). +* +* N (input) INTEGER +* The number of columns of the matrix Z. +* +* Z (input) DOUBLE PRECISION array, dimension (LDZ, N) +* On entry, the LU part of the factorization of the n-by-n +* matrix Z computed by DGETC2: Z = P * L * U * Q +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDA >= max(1, N). +* +* RHS (input/output) DOUBLE PRECISION array, dimension N. +* On entry, RHS contains contributions from other subsystems. +* On exit, RHS contains the solution of the subsystem with +* entries acoording to the value of IJOB (see above). +* +* RDSUM (input/output) DOUBLE PRECISION +* On entry, the sum of squares of computed contributions to +* the Dif-estimate under computation by DTGSYL, where the +* scaling factor RDSCAL (see below) has been factored out. +* On exit, the corresponding sum of squares updated with the +* contributions from the current sub-system. +* If TRANS = 'T' RDSUM is not touched. +* NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL. +* +* RDSCAL (input/output) DOUBLE PRECISION +* On entry, scaling factor used to prevent overflow in RDSUM. +* On exit, RDSCAL is updated w.r.t. the current contributions +* in RDSUM. +* If TRANS = 'T', RDSCAL is not touched. +* NOTE: RDSCAL only makes sense when DTGSY2 is called by +* DTGSYL. +* +* IPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* This routine is a further developed implementation of algorithm +* BSOLVE in [1] using complete pivoting in the LU factorization. +* +* [1] Bo Kagstrom and Lars Westin, +* Generalized Schur Methods with Condition Estimators for +* Solving the Generalized Sylvester Equation, IEEE Transactions +* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751. +* +* [2] Peter Poromaa, +* On Efficient and Robust Estimators for the Separation +* between two Regular Matrix Pairs with Applications in +* Condition Estimation. Report IMINF-95.05, Departement of +* Computing Science, Umea University, S-901 87 Umea, Sweden, 1995. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER MAXDIM + PARAMETER ( MAXDIM = 8 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J, K + DOUBLE PRECISION BM, BP, PMONE, SMINU, SPLUS, TEMP +* .. +* .. Local Arrays .. + INTEGER IWORK( MAXDIM ) + DOUBLE PRECISION WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM ) +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGECON, DGESC2, DLASSQ, DLASWP, + $ DSCAL +* .. +* .. External Functions .. + DOUBLE PRECISION DASUM, DDOT + EXTERNAL DASUM, DDOT +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SQRT +* .. +* .. Executable Statements .. +* + IF( IJOB.NE.2 ) THEN +* +* Apply permutations IPIV to RHS +* + CALL DLASWP( 1, RHS, LDZ, 1, N-1, IPIV, 1 ) +* +* Solve for L-part choosing RHS either to +1 or -1. +* + PMONE = -ONE +* + DO 10 J = 1, N - 1 + BP = RHS( J ) + ONE + BM = RHS( J ) - ONE + SPLUS = ONE +* +* Look-ahead for L-part RHS(1:N-1) = + or -1, SPLUS and +* SMIN computed more efficiently than in BSOLVE [1]. +* + SPLUS = SPLUS + DDOT( N-J, Z( J+1, J ), 1, Z( J+1, J ), 1 ) + SMINU = DDOT( N-J, Z( J+1, J ), 1, RHS( J+1 ), 1 ) + SPLUS = SPLUS*RHS( J ) + IF( SPLUS.GT.SMINU ) THEN + RHS( J ) = BP + ELSE IF( SMINU.GT.SPLUS ) THEN + RHS( J ) = BM + ELSE +* +* In this case the updating sums are equal and we can +* choose RHS(J) +1 or -1. The first time this happens +* we choose -1, thereafter +1. This is a simple way to +* get good estimates of matrices like Byers well-known +* example (see [1]). (Not done in BSOLVE.) +* + RHS( J ) = RHS( J ) + PMONE + PMONE = ONE + END IF +* +* Compute the remaining r.h.s. +* + TEMP = -RHS( J ) + CALL DAXPY( N-J, TEMP, Z( J+1, J ), 1, RHS( J+1 ), 1 ) +* + 10 CONTINUE +* +* Solve for U-part, look-ahead for RHS(N) = +-1. This is not done +* in BSOLVE and will hopefully give us a better estimate because +* any ill-conditioning of the original matrix is transfered to U +* and not to L. U(N, N) is an approximation to sigma_min(LU). +* + CALL DCOPY( N-1, RHS, 1, XP, 1 ) + XP( N ) = RHS( N ) + ONE + RHS( N ) = RHS( N ) - ONE + SPLUS = ZERO + SMINU = ZERO + DO 30 I = N, 1, -1 + TEMP = ONE / Z( I, I ) + XP( I ) = XP( I )*TEMP + RHS( I ) = RHS( I )*TEMP + DO 20 K = I + 1, N + XP( I ) = XP( I ) - XP( K )*( Z( I, K )*TEMP ) + RHS( I ) = RHS( I ) - RHS( K )*( Z( I, K )*TEMP ) + 20 CONTINUE + SPLUS = SPLUS + ABS( XP( I ) ) + SMINU = SMINU + ABS( RHS( I ) ) + 30 CONTINUE + IF( SPLUS.GT.SMINU ) + $ CALL DCOPY( N, XP, 1, RHS, 1 ) +* +* Apply the permutations JPIV to the computed solution (RHS) +* + CALL DLASWP( 1, RHS, LDZ, 1, N-1, JPIV, -1 ) +* +* Compute the sum of squares +* + CALL DLASSQ( N, RHS, 1, RDSCAL, RDSUM ) +* + ELSE +* +* IJOB = 2, Compute approximate nullvector XM of Z +* + CALL DGECON( 'I', N, Z, LDZ, ONE, TEMP, WORK, IWORK, INFO ) + CALL DCOPY( N, WORK( N+1 ), 1, XM, 1 ) +* +* Compute RHS +* + CALL DLASWP( 1, XM, LDZ, 1, N-1, IPIV, -1 ) + TEMP = ONE / SQRT( DDOT( N, XM, 1, XM, 1 ) ) + CALL DSCAL( N, TEMP, XM, 1 ) + CALL DCOPY( N, XM, 1, XP, 1 ) + CALL DAXPY( N, ONE, RHS, 1, XP, 1 ) + CALL DAXPY( N, -ONE, XM, 1, RHS, 1 ) + CALL DGESC2( N, Z, LDZ, RHS, IPIV, JPIV, TEMP ) + CALL DGESC2( N, Z, LDZ, XP, IPIV, JPIV, TEMP ) + IF( DASUM( N, XP, 1 ).GT.DASUM( N, RHS, 1 ) ) + $ CALL DCOPY( N, XP, 1, RHS, 1 ) +* +* Compute the sum of squares +* + CALL DLASSQ( N, RHS, 1, RDSCAL, RDSUM ) +* + END IF +* + RETURN +* +* End of DLATDF +* + END diff --git a/2.3-1/src/fortran/lapack/dlatrd.f b/2.3-1/src/fortran/lapack/dlatrd.f new file mode 100644 index 00000000..27bf9b98 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlatrd.f @@ -0,0 +1,258 @@ + SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, LDW, N, NB +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), E( * ), TAU( * ), W( LDW, * ) +* .. +* +* Purpose +* ======= +* +* DLATRD reduces NB rows and columns of a real symmetric matrix A to +* symmetric tridiagonal form by an orthogonal similarity +* transformation Q' * A * Q, and returns the matrices V and W which are +* needed to apply the transformation to the unreduced part of A. +* +* If UPLO = 'U', DLATRD reduces the last NB rows and columns of a +* matrix, of which the upper triangle is supplied; +* if UPLO = 'L', DLATRD reduces the first NB rows and columns of a +* matrix, of which the lower triangle is supplied. +* +* This is an auxiliary routine called by DSYTRD. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. +* +* NB (input) INTEGER +* The number of rows and columns to be reduced. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit: +* if UPLO = 'U', the last NB columns have been reduced to +* tridiagonal form, with the diagonal elements overwriting +* the diagonal elements of A; the elements above the diagonal +* with the array TAU, represent the orthogonal matrix Q as a +* product of elementary reflectors; +* if UPLO = 'L', the first NB columns have been reduced to +* tridiagonal form, with the diagonal elements overwriting +* the diagonal elements of A; the elements below the diagonal +* with the array TAU, represent the orthogonal matrix Q as a +* product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= (1,N). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal +* elements of the last NB columns of the reduced matrix; +* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of +* the first NB columns of the reduced matrix. +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors, stored in +* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. +* See Further Details. +* +* W (output) DOUBLE PRECISION array, dimension (LDW,NB) +* The n-by-nb matrix W required to update the unreduced part +* of A. +* +* LDW (input) INTEGER +* The leading dimension of the array W. LDW >= max(1,N). +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n) H(n-1) . . . H(n-nb+1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), +* and tau in TAU(i-1). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), +* and tau in TAU(i). +* +* The elements of the vectors v together form the n-by-nb matrix V +* which is needed, with W, to apply the transformation to the unreduced +* part of the matrix, using a symmetric rank-2k update of the form: +* A := A - V*W' - W*V'. +* +* The contents of A on exit are illustrated by the following examples +* with n = 5 and nb = 2: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( a a a v4 v5 ) ( d ) +* ( a a v4 v5 ) ( 1 d ) +* ( a 1 v5 ) ( v1 1 a ) +* ( d 1 ) ( v1 v2 a a ) +* ( d ) ( v1 v2 a a a ) +* +* where d denotes a diagonal element of the reduced matrix, a denotes +* an element of the original matrix that is unchanged, and vi denotes +* an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, HALF + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, HALF = 0.5D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, IW + DOUBLE PRECISION ALPHA +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DGEMV, DLARFG, DSCAL, DSYMV +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* + IF( LSAME( UPLO, 'U' ) ) THEN +* +* Reduce last NB columns of upper triangle +* + DO 10 I = N, N - NB + 1, -1 + IW = I - N + NB + IF( I.LT.N ) THEN +* +* Update A(1:i,i) +* + CALL DGEMV( 'No transpose', I, N-I, -ONE, A( 1, I+1 ), + $ LDA, W( I, IW+1 ), LDW, ONE, A( 1, I ), 1 ) + CALL DGEMV( 'No transpose', I, N-I, -ONE, W( 1, IW+1 ), + $ LDW, A( I, I+1 ), LDA, ONE, A( 1, I ), 1 ) + END IF + IF( I.GT.1 ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(1:i-2,i) +* + CALL DLARFG( I-1, A( I-1, I ), A( 1, I ), 1, TAU( I-1 ) ) + E( I-1 ) = A( I-1, I ) + A( I-1, I ) = ONE +* +* Compute W(1:i-1,i) +* + CALL DSYMV( 'Upper', I-1, ONE, A, LDA, A( 1, I ), 1, + $ ZERO, W( 1, IW ), 1 ) + IF( I.LT.N ) THEN + CALL DGEMV( 'Transpose', I-1, N-I, ONE, W( 1, IW+1 ), + $ LDW, A( 1, I ), 1, ZERO, W( I+1, IW ), 1 ) + CALL DGEMV( 'No transpose', I-1, N-I, -ONE, + $ A( 1, I+1 ), LDA, W( I+1, IW ), 1, ONE, + $ W( 1, IW ), 1 ) + CALL DGEMV( 'Transpose', I-1, N-I, ONE, A( 1, I+1 ), + $ LDA, A( 1, I ), 1, ZERO, W( I+1, IW ), 1 ) + CALL DGEMV( 'No transpose', I-1, N-I, -ONE, + $ W( 1, IW+1 ), LDW, W( I+1, IW ), 1, ONE, + $ W( 1, IW ), 1 ) + END IF + CALL DSCAL( I-1, TAU( I-1 ), W( 1, IW ), 1 ) + ALPHA = -HALF*TAU( I-1 )*DDOT( I-1, W( 1, IW ), 1, + $ A( 1, I ), 1 ) + CALL DAXPY( I-1, ALPHA, A( 1, I ), 1, W( 1, IW ), 1 ) + END IF +* + 10 CONTINUE + ELSE +* +* Reduce first NB columns of lower triangle +* + DO 20 I = 1, NB +* +* Update A(i:n,i) +* + CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, A( I, 1 ), + $ LDA, W( I, 1 ), LDW, ONE, A( I, I ), 1 ) + CALL DGEMV( 'No transpose', N-I+1, I-1, -ONE, W( I, 1 ), + $ LDW, A( I, 1 ), LDA, ONE, A( I, I ), 1 ) + IF( I.LT.N ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(i+2:n,i) +* + CALL DLARFG( N-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, + $ TAU( I ) ) + E( I ) = A( I+1, I ) + A( I+1, I ) = ONE +* +* Compute W(i+1:n,i) +* + CALL DSYMV( 'Lower', N-I, ONE, A( I+1, I+1 ), LDA, + $ A( I+1, I ), 1, ZERO, W( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', N-I, I-1, ONE, W( I+1, 1 ), LDW, + $ A( I+1, I ), 1, ZERO, W( 1, I ), 1 ) + CALL DGEMV( 'No transpose', N-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) + CALL DGEMV( 'Transpose', N-I, I-1, ONE, A( I+1, 1 ), LDA, + $ A( I+1, I ), 1, ZERO, W( 1, I ), 1 ) + CALL DGEMV( 'No transpose', N-I, I-1, -ONE, W( I+1, 1 ), + $ LDW, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) + CALL DSCAL( N-I, TAU( I ), W( I+1, I ), 1 ) + ALPHA = -HALF*TAU( I )*DDOT( N-I, W( I+1, I ), 1, + $ A( I+1, I ), 1 ) + CALL DAXPY( N-I, ALPHA, A( I+1, I ), 1, W( I+1, I ), 1 ) + END IF +* + 20 CONTINUE + END IF +* + RETURN +* +* End of DLATRD +* + END diff --git a/2.3-1/src/fortran/lapack/dlatrs.f b/2.3-1/src/fortran/lapack/dlatrs.f new file mode 100644 index 00000000..bbd3a9e4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlatrs.f @@ -0,0 +1,701 @@ + SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, + $ CNORM, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, NORMIN, TRANS, UPLO + INTEGER INFO, LDA, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), CNORM( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* DLATRS solves one of the triangular systems +* +* A *x = s*b or A'*x = s*b +* +* with scaling to prevent overflow. Here A is an upper or lower +* triangular matrix, A' denotes the transpose of A, x and b are +* n-element vectors, and s is a scaling factor, usually less than +* or equal to 1, chosen so that the components of x will be less than +* the overflow threshold. If the unscaled problem will not cause +* overflow, the Level 2 BLAS routine DTRSV is called. If the matrix A +* is singular (A(j,j) = 0 for some j), then s is set to 0 and a +* non-trivial solution to A*x = 0 is returned. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the matrix A is upper or lower triangular. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* TRANS (input) CHARACTER*1 +* Specifies the operation applied to A. +* = 'N': Solve A * x = s*b (No transpose) +* = 'T': Solve A'* x = s*b (Transpose) +* = 'C': Solve A'* x = s*b (Conjugate transpose = Transpose) +* +* DIAG (input) CHARACTER*1 +* Specifies whether or not the matrix A is unit triangular. +* = 'N': Non-unit triangular +* = 'U': Unit triangular +* +* NORMIN (input) CHARACTER*1 +* Specifies whether CNORM has been set or not. +* = 'Y': CNORM contains the column norms on entry +* = 'N': CNORM is not set on entry. On exit, the norms will +* be computed and stored in CNORM. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The triangular matrix A. If UPLO = 'U', the leading n by n +* upper triangular part of the array A contains the upper +* triangular matrix, and the strictly lower triangular part of +* A is not referenced. If UPLO = 'L', the leading n by n lower +* triangular part of the array A contains the lower triangular +* matrix, and the strictly upper triangular part of A is not +* referenced. If DIAG = 'U', the diagonal elements of A are +* also not referenced and are assumed to be 1. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max (1,N). +* +* X (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the right hand side b of the triangular system. +* On exit, X is overwritten by the solution vector x. +* +* SCALE (output) DOUBLE PRECISION +* The scaling factor s for the triangular system +* A * x = s*b or A'* x = s*b. +* If SCALE = 0, the matrix A is singular or badly scaled, and +* the vector x is an exact or approximate solution to A*x = 0. +* +* CNORM (input or output) DOUBLE PRECISION array, dimension (N) +* +* If NORMIN = 'Y', CNORM is an input argument and CNORM(j) +* contains the norm of the off-diagonal part of the j-th column +* of A. If TRANS = 'N', CNORM(j) must be greater than or equal +* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) +* must be greater than or equal to the 1-norm. +* +* If NORMIN = 'N', CNORM is an output argument and CNORM(j) +* returns the 1-norm of the offdiagonal part of the j-th column +* of A. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* +* Further Details +* ======= ======= +* +* A rough bound on x is computed; if that is less than overflow, DTRSV +* is called, otherwise, specific code is used which checks for possible +* overflow or divide-by-zero at every operation. +* +* A columnwise scheme is used for solving A*x = b. The basic algorithm +* if A is lower triangular is +* +* x[1:n] := b[1:n] +* for j = 1, ..., n +* x(j) := x(j) / A(j,j) +* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] +* end +* +* Define bounds on the components of x after j iterations of the loop: +* M(j) = bound on x[1:j] +* G(j) = bound on x[j+1:n] +* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. +* +* Then for iteration j+1 we have +* M(j+1) <= G(j) / | A(j+1,j+1) | +* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] | +* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | ) +* +* where CNORM(j+1) is greater than or equal to the infinity-norm of +* column j+1 of A, not counting the diagonal. Hence +* +* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | ) +* 1<=i<=j +* and +* +* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| ) +* 1<=i< j +* +* Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTRSV if the +* reciprocal of the largest M(j), j=1,..,n, is larger than +* max(underflow, 1/overflow). +* +* The bound on x(j) is also used to determine when a step in the +* columnwise method can be performed without fear of overflow. If +* the computed bound is greater than a large constant, x is scaled to +* prevent overflow, but if the bound overflows, x is set to 0, x(j) to +* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found. +* +* Similarly, a row-wise scheme is used to solve A'*x = b. The basic +* algorithm for A upper triangular is +* +* for j = 1, ..., n +* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j) +* end +* +* We simultaneously compute two bounds +* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j +* M(j) = bound on x(i), 1<=i<=j +* +* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we +* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. +* Then the bound on x(j) is +* +* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) | +* +* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| ) +* 1<=i<=j +* +* and we can safely call DTRSV if 1/M(n) and 1/G(n) are both greater +* than max(underflow, 1/overflow). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, HALF, ONE + PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN, NOUNIT, UPPER + INTEGER I, IMAX, J, JFIRST, JINC, JLAST + DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, SUMJ, TJJ, TJJS, + $ TMAX, TSCAL, USCAL, XBND, XJ, XMAX +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DASUM, DDOT, DLAMCH + EXTERNAL LSAME, IDAMAX, DASUM, DDOT, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DSCAL, DTRSV, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOTRAN = LSAME( TRANS, 'N' ) + NOUNIT = LSAME( DIAG, 'N' ) +* +* Test the input parameters. +* + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -3 + ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT. + $ LSAME( NORMIN, 'N' ) ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DLATRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Determine machine dependent parameters to control overflow. +* + SMLNUM = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' ) + BIGNUM = ONE / SMLNUM + SCALE = ONE +* + IF( LSAME( NORMIN, 'N' ) ) THEN +* +* Compute the 1-norm of each column, not including the diagonal. +* + IF( UPPER ) THEN +* +* A is upper triangular. +* + DO 10 J = 1, N + CNORM( J ) = DASUM( J-1, A( 1, J ), 1 ) + 10 CONTINUE + ELSE +* +* A is lower triangular. +* + DO 20 J = 1, N - 1 + CNORM( J ) = DASUM( N-J, A( J+1, J ), 1 ) + 20 CONTINUE + CNORM( N ) = ZERO + END IF + END IF +* +* Scale the column norms by TSCAL if the maximum element in CNORM is +* greater than BIGNUM. +* + IMAX = IDAMAX( N, CNORM, 1 ) + TMAX = CNORM( IMAX ) + IF( TMAX.LE.BIGNUM ) THEN + TSCAL = ONE + ELSE + TSCAL = ONE / ( SMLNUM*TMAX ) + CALL DSCAL( N, TSCAL, CNORM, 1 ) + END IF +* +* Compute a bound on the computed solution vector to see if the +* Level 2 BLAS routine DTRSV can be used. +* + J = IDAMAX( N, X, 1 ) + XMAX = ABS( X( J ) ) + XBND = XMAX + IF( NOTRAN ) THEN +* +* Compute the growth in A * x = b. +* + IF( UPPER ) THEN + JFIRST = N + JLAST = 1 + JINC = -1 + ELSE + JFIRST = 1 + JLAST = N + JINC = 1 + END IF +* + IF( TSCAL.NE.ONE ) THEN + GROW = ZERO + GO TO 50 + END IF +* + IF( NOUNIT ) THEN +* +* A is non-unit triangular. +* +* Compute GROW = 1/G(j) and XBND = 1/M(j). +* Initially, G(0) = max{x(i), i=1,...,n}. +* + GROW = ONE / MAX( XBND, SMLNUM ) + XBND = GROW + DO 30 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 50 +* +* M(j) = G(j-1) / abs(A(j,j)) +* + TJJ = ABS( A( J, J ) ) + XBND = MIN( XBND, MIN( ONE, TJJ )*GROW ) + IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN +* +* G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) ) +* + GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) ) + ELSE +* +* G(j) could overflow, set GROW to 0. +* + GROW = ZERO + END IF + 30 CONTINUE + GROW = XBND + ELSE +* +* A is unit triangular. +* +* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. +* + GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) + DO 40 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 50 +* +* G(j) = G(j-1)*( 1 + CNORM(j) ) +* + GROW = GROW*( ONE / ( ONE+CNORM( J ) ) ) + 40 CONTINUE + END IF + 50 CONTINUE +* + ELSE +* +* Compute the growth in A' * x = b. +* + IF( UPPER ) THEN + JFIRST = 1 + JLAST = N + JINC = 1 + ELSE + JFIRST = N + JLAST = 1 + JINC = -1 + END IF +* + IF( TSCAL.NE.ONE ) THEN + GROW = ZERO + GO TO 80 + END IF +* + IF( NOUNIT ) THEN +* +* A is non-unit triangular. +* +* Compute GROW = 1/G(j) and XBND = 1/M(j). +* Initially, M(0) = max{x(i), i=1,...,n}. +* + GROW = ONE / MAX( XBND, SMLNUM ) + XBND = GROW + DO 60 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 80 +* +* G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) ) +* + XJ = ONE + CNORM( J ) + GROW = MIN( GROW, XBND / XJ ) +* +* M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j)) +* + TJJ = ABS( A( J, J ) ) + IF( XJ.GT.TJJ ) + $ XBND = XBND*( TJJ / XJ ) + 60 CONTINUE + GROW = MIN( GROW, XBND ) + ELSE +* +* A is unit triangular. +* +* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. +* + GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) + DO 70 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 80 +* +* G(j) = ( 1 + CNORM(j) )*G(j-1) +* + XJ = ONE + CNORM( J ) + GROW = GROW / XJ + 70 CONTINUE + END IF + 80 CONTINUE + END IF +* + IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN +* +* Use the Level 2 BLAS solve if the reciprocal of the bound on +* elements of X is not too small. +* + CALL DTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 ) + ELSE +* +* Use a Level 1 BLAS solve, scaling intermediate results. +* + IF( XMAX.GT.BIGNUM ) THEN +* +* Scale X so that its components are less than or equal to +* BIGNUM in absolute value. +* + SCALE = BIGNUM / XMAX + CALL DSCAL( N, SCALE, X, 1 ) + XMAX = BIGNUM + END IF +* + IF( NOTRAN ) THEN +* +* Solve A * x = b +* + DO 110 J = JFIRST, JLAST, JINC +* +* Compute x(j) = b(j) / A(j,j), scaling x if necessary. +* + XJ = ABS( X( J ) ) + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + IF( TSCAL.EQ.ONE ) + $ GO TO 100 + END IF + TJJ = ABS( TJJS ) + IF( TJJ.GT.SMLNUM ) THEN +* +* abs(A(j,j)) > SMLNUM: +* + IF( TJJ.LT.ONE ) THEN + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by 1/b(j). +* + REC = ONE / XJ + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF + X( J ) = X( J ) / TJJS + XJ = ABS( X( J ) ) + ELSE IF( TJJ.GT.ZERO ) THEN +* +* 0 < abs(A(j,j)) <= SMLNUM: +* + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM +* to avoid overflow when dividing by A(j,j). +* + REC = ( TJJ*BIGNUM ) / XJ + IF( CNORM( J ).GT.ONE ) THEN +* +* Scale by 1/CNORM(j) to avoid overflow when +* multiplying x(j) times column j. +* + REC = REC / CNORM( J ) + END IF + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + X( J ) = X( J ) / TJJS + XJ = ABS( X( J ) ) + ELSE +* +* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and +* scale = 0, and compute a solution to A*x = 0. +* + DO 90 I = 1, N + X( I ) = ZERO + 90 CONTINUE + X( J ) = ONE + XJ = ONE + SCALE = ZERO + XMAX = ZERO + END IF + 100 CONTINUE +* +* Scale x if necessary to avoid overflow when adding a +* multiple of column j of A. +* + IF( XJ.GT.ONE ) THEN + REC = ONE / XJ + IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN +* +* Scale x by 1/(2*abs(x(j))). +* + REC = REC*HALF + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + END IF + ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN +* +* Scale x by 1/2. +* + CALL DSCAL( N, HALF, X, 1 ) + SCALE = SCALE*HALF + END IF +* + IF( UPPER ) THEN + IF( J.GT.1 ) THEN +* +* Compute the update +* x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j) +* + CALL DAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X, + $ 1 ) + I = IDAMAX( J-1, X, 1 ) + XMAX = ABS( X( I ) ) + END IF + ELSE + IF( J.LT.N ) THEN +* +* Compute the update +* x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j) +* + CALL DAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1, + $ X( J+1 ), 1 ) + I = J + IDAMAX( N-J, X( J+1 ), 1 ) + XMAX = ABS( X( I ) ) + END IF + END IF + 110 CONTINUE +* + ELSE +* +* Solve A' * x = b +* + DO 160 J = JFIRST, JLAST, JINC +* +* Compute x(j) = b(j) - sum A(k,j)*x(k). +* k<>j +* + XJ = ABS( X( J ) ) + USCAL = TSCAL + REC = ONE / MAX( XMAX, ONE ) + IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN +* +* If x(j) could overflow, scale x by 1/(2*XMAX). +* + REC = REC*HALF + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + END IF + TJJ = ABS( TJJS ) + IF( TJJ.GT.ONE ) THEN +* +* Divide by A(j,j) when scaling x if A(j,j) > 1. +* + REC = MIN( ONE, REC*TJJ ) + USCAL = USCAL / TJJS + END IF + IF( REC.LT.ONE ) THEN + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF +* + SUMJ = ZERO + IF( USCAL.EQ.ONE ) THEN +* +* If the scaling needed for A in the dot product is 1, +* call DDOT to perform the dot product. +* + IF( UPPER ) THEN + SUMJ = DDOT( J-1, A( 1, J ), 1, X, 1 ) + ELSE IF( J.LT.N ) THEN + SUMJ = DDOT( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) + END IF + ELSE +* +* Otherwise, use in-line code for the dot product. +* + IF( UPPER ) THEN + DO 120 I = 1, J - 1 + SUMJ = SUMJ + ( A( I, J )*USCAL )*X( I ) + 120 CONTINUE + ELSE IF( J.LT.N ) THEN + DO 130 I = J + 1, N + SUMJ = SUMJ + ( A( I, J )*USCAL )*X( I ) + 130 CONTINUE + END IF + END IF +* + IF( USCAL.EQ.TSCAL ) THEN +* +* Compute x(j) := ( x(j) - sumj ) / A(j,j) if 1/A(j,j) +* was not used to scale the dotproduct. +* + X( J ) = X( J ) - SUMJ + XJ = ABS( X( J ) ) + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + IF( TSCAL.EQ.ONE ) + $ GO TO 150 + END IF +* +* Compute x(j) = x(j) / A(j,j), scaling if necessary. +* + TJJ = ABS( TJJS ) + IF( TJJ.GT.SMLNUM ) THEN +* +* abs(A(j,j)) > SMLNUM: +* + IF( TJJ.LT.ONE ) THEN + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale X by 1/abs(x(j)). +* + REC = ONE / XJ + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF + X( J ) = X( J ) / TJJS + ELSE IF( TJJ.GT.ZERO ) THEN +* +* 0 < abs(A(j,j)) <= SMLNUM: +* + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. +* + REC = ( TJJ*BIGNUM ) / XJ + CALL DSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + X( J ) = X( J ) / TJJS + ELSE +* +* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and +* scale = 0, and compute a solution to A'*x = 0. +* + DO 140 I = 1, N + X( I ) = ZERO + 140 CONTINUE + X( J ) = ONE + SCALE = ZERO + XMAX = ZERO + END IF + 150 CONTINUE + ELSE +* +* Compute x(j) := x(j) / A(j,j) - sumj if the dot +* product has already been divided by 1/A(j,j). +* + X( J ) = X( J ) / TJJS - SUMJ + END IF + XMAX = MAX( XMAX, ABS( X( J ) ) ) + 160 CONTINUE + END IF + SCALE = SCALE / TSCAL + END IF +* +* Scale the column norms by 1/TSCAL for return. +* + IF( TSCAL.NE.ONE ) THEN + CALL DSCAL( N, ONE / TSCAL, CNORM, 1 ) + END IF +* + RETURN +* +* End of DLATRS +* + END diff --git a/2.3-1/src/fortran/lapack/dlatrz.f b/2.3-1/src/fortran/lapack/dlatrz.f new file mode 100644 index 00000000..e1a2cf97 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlatrz.f @@ -0,0 +1,127 @@ + SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER L, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DLATRZ factors the M-by-(M+L) real upper trapezoidal matrix +* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z, by means +* of orthogonal transformations. Z is an (M+L)-by-(M+L) orthogonal +* matrix and, R and A1 are M-by-M upper triangular matrices. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing the +* meaningful part of the Householder vectors. N-M >= L >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the leading M-by-N upper trapezoidal part of the +* array A must contain the matrix to be factorized. +* On exit, the leading M-by-M upper triangular part of A +* contains the upper triangular matrix R, and elements N-L+1 to +* N of the first M rows of A, with the array TAU, represent the +* orthogonal matrix Z as a product of M elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (M) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (M) +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The factorization is obtained by Householder's method. The kth +* transformation matrix, Z( k ), which is used to introduce zeros into +* the ( m - k + 1 )th row of A, is given in the form +* +* Z( k ) = ( I 0 ), +* ( 0 T( k ) ) +* +* where +* +* T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ), +* ( 0 ) +* ( z( k ) ) +* +* tau is a scalar and z( k ) is an l element vector. tau and z( k ) +* are chosen to annihilate the elements of the kth row of A2. +* +* The scalar tau is returned in the kth element of TAU and the vector +* u( k ) in the kth row of A2, such that the elements of z( k ) are +* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in +* the upper triangular part of A1. +* +* Z is given by +* +* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I +* .. +* .. External Subroutines .. + EXTERNAL DLARFG, DLARZ +* .. +* .. Executable Statements .. +* +* Test the input arguments +* +* Quick return if possible +* + IF( M.EQ.0 ) THEN + RETURN + ELSE IF( M.EQ.N ) THEN + DO 10 I = 1, N + TAU( I ) = ZERO + 10 CONTINUE + RETURN + END IF +* + DO 20 I = M, 1, -1 +* +* Generate elementary reflector H(i) to annihilate +* [ A(i,i) A(i,n-l+1:n) ] +* + CALL DLARFG( L+1, A( I, I ), A( I, N-L+1 ), LDA, TAU( I ) ) +* +* Apply H(i) to A(1:i-1,i:n) from the right +* + CALL DLARZ( 'Right', I-1, N-I+1, L, A( I, N-L+1 ), LDA, + $ TAU( I ), A( 1, I ), LDA, WORK ) +* + 20 CONTINUE +* + RETURN +* +* End of DLATRZ +* + END diff --git a/2.3-1/src/fortran/lapack/dlatzm.f b/2.3-1/src/fortran/lapack/dlatzm.f new file mode 100644 index 00000000..2467ab60 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlatzm.f @@ -0,0 +1,142 @@ + SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER INCV, LDC, M, N + DOUBLE PRECISION TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine DORMRZ. +* +* DLATZM applies a Householder matrix generated by DTZRQF to a matrix. +* +* Let P = I - tau*u*u', u = ( 1 ), +* ( v ) +* where v is an (m-1) vector if SIDE = 'L', or a (n-1) vector if +* SIDE = 'R'. +* +* If SIDE equals 'L', let +* C = [ C1 ] 1 +* [ C2 ] m-1 +* n +* Then C is overwritten by P*C. +* +* If SIDE equals 'R', let +* C = [ C1, C2 ] m +* 1 n-1 +* Then C is overwritten by C*P. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form P * C +* = 'R': form C * P +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* V (input) DOUBLE PRECISION array, dimension +* (1 + (M-1)*abs(INCV)) if SIDE = 'L' +* (1 + (N-1)*abs(INCV)) if SIDE = 'R' +* The vector v in the representation of P. V is not used +* if TAU = 0. +* +* INCV (input) INTEGER +* The increment between elements of v. INCV <> 0 +* +* TAU (input) DOUBLE PRECISION +* The value tau in the representation of P. +* +* C1 (input/output) DOUBLE PRECISION array, dimension +* (LDC,N) if SIDE = 'L' +* (M,1) if SIDE = 'R' +* On entry, the n-vector C1 if SIDE = 'L', or the m-vector C1 +* if SIDE = 'R'. +* +* On exit, the first row of P*C if SIDE = 'L', or the first +* column of C*P if SIDE = 'R'. +* +* C2 (input/output) DOUBLE PRECISION array, dimension +* (LDC, N) if SIDE = 'L' +* (LDC, N-1) if SIDE = 'R' +* On entry, the (m - 1) x n matrix C2 if SIDE = 'L', or the +* m x (n - 1) matrix C2 if SIDE = 'R'. +* +* On exit, rows 2:m of P*C if SIDE = 'L', or columns 2:m of C*P +* if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the arrays C1 and C2. LDC >= (1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L' +* (M) if SIDE = 'R' +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DGER +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( ( MIN( M, N ).EQ.0 ) .OR. ( TAU.EQ.ZERO ) ) + $ RETURN +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* w := C1 + v' * C2 +* + CALL DCOPY( N, C1, LDC, WORK, 1 ) + CALL DGEMV( 'Transpose', M-1, N, ONE, C2, LDC, V, INCV, ONE, + $ WORK, 1 ) +* +* [ C1 ] := [ C1 ] - tau* [ 1 ] * w' +* [ C2 ] [ C2 ] [ v ] +* + CALL DAXPY( N, -TAU, WORK, 1, C1, LDC ) + CALL DGER( M-1, N, -TAU, V, INCV, WORK, 1, C2, LDC ) +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* w := C1 + C2 * v +* + CALL DCOPY( M, C1, 1, WORK, 1 ) + CALL DGEMV( 'No transpose', M, N-1, ONE, C2, LDC, V, INCV, ONE, + $ WORK, 1 ) +* +* [ C1, C2 ] := [ C1, C2 ] - tau* w * [ 1 , v'] +* + CALL DAXPY( M, -TAU, WORK, 1, C1, 1 ) + CALL DGER( M, N-1, -TAU, WORK, 1, V, INCV, C2, LDC ) + END IF +* + RETURN +* +* End of DLATZM +* + END diff --git a/2.3-1/src/fortran/lapack/dlazq3.f b/2.3-1/src/fortran/lapack/dlazq3.f new file mode 100644 index 00000000..784248f7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlazq3.f @@ -0,0 +1,302 @@ + SUBROUTINE DLAZQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL, + $ ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1, + $ DN2, TAU ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL IEEE + INTEGER I0, ITER, N0, NDIV, NFAIL, PP, TTYPE + DOUBLE PRECISION DESIG, DMIN, DMIN1, DMIN2, DN, DN1, DN2, QMAX, + $ SIGMA, TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLAZQ3 checks for deflation, computes a shift (TAU) and calls dqds. +* In case of failure it changes shifts, and tries again until output +* is positive. +* +* Arguments +* ========= +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* DMIN (output) DOUBLE PRECISION +* Minimum value of d. +* +* SIGMA (output) DOUBLE PRECISION +* Sum of shifts used in current segment. +* +* DESIG (input/output) DOUBLE PRECISION +* Lower order part of SIGMA +* +* QMAX (input) DOUBLE PRECISION +* Maximum value of q. +* +* NFAIL (output) INTEGER +* Number of times shift was too big. +* +* ITER (output) INTEGER +* Number of iterations. +* +* NDIV (output) INTEGER +* Number of divisions. +* +* IEEE (input) LOGICAL +* Flag for IEEE or non IEEE arithmetic (passed to DLASQ5). +* +* TTYPE (input/output) INTEGER +* Shift type. TTYPE is passed as an argument in order to save +* its value between calls to DLAZQ3 +* +* DMIN1 (input/output) REAL +* DMIN2 (input/output) REAL +* DN (input/output) REAL +* DN1 (input/output) REAL +* DN2 (input/output) REAL +* TAU (input/output) REAL +* These are passed as arguments in order to save their values +* between calls to DLAZQ3 +* +* This is a thread safe version of DLASQ3, which passes TTYPE, DMIN1, +* DMIN2, DN, DN1. DN2 and TAU through the argument list in place of +* declaring them in a SAVE statment. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION CBIAS + PARAMETER ( CBIAS = 1.50D0 ) + DOUBLE PRECISION ZERO, QURTR, HALF, ONE, TWO, HUNDRD + PARAMETER ( ZERO = 0.0D0, QURTR = 0.250D0, HALF = 0.5D0, + $ ONE = 1.0D0, TWO = 2.0D0, HUNDRD = 100.0D0 ) +* .. +* .. Local Scalars .. + INTEGER IPN4, J4, N0IN, NN + DOUBLE PRECISION EPS, G, S, SAFMIN, T, TEMP, TOL, TOL2 +* .. +* .. External Subroutines .. + EXTERNAL DLASQ5, DLASQ6, DLAZQ4 +* .. +* .. External Function .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MIN, SQRT +* .. +* .. Executable Statements .. +* + N0IN = N0 + EPS = DLAMCH( 'Precision' ) + SAFMIN = DLAMCH( 'Safe minimum' ) + TOL = EPS*HUNDRD + TOL2 = TOL**2 + G = ZERO +* +* Check for deflation. +* + 10 CONTINUE +* + IF( N0.LT.I0 ) + $ RETURN + IF( N0.EQ.I0 ) + $ GO TO 20 + NN = 4*N0 + PP + IF( N0.EQ.( I0+1 ) ) + $ GO TO 40 +* +* Check whether E(N0-1) is negligible, 1 eigenvalue. +* + IF( Z( NN-5 ).GT.TOL2*( SIGMA+Z( NN-3 ) ) .AND. + $ Z( NN-2*PP-4 ).GT.TOL2*Z( NN-7 ) ) + $ GO TO 30 +* + 20 CONTINUE +* + Z( 4*N0-3 ) = Z( 4*N0+PP-3 ) + SIGMA + N0 = N0 - 1 + GO TO 10 +* +* Check whether E(N0-2) is negligible, 2 eigenvalues. +* + 30 CONTINUE +* + IF( Z( NN-9 ).GT.TOL2*SIGMA .AND. + $ Z( NN-2*PP-8 ).GT.TOL2*Z( NN-11 ) ) + $ GO TO 50 +* + 40 CONTINUE +* + IF( Z( NN-3 ).GT.Z( NN-7 ) ) THEN + S = Z( NN-3 ) + Z( NN-3 ) = Z( NN-7 ) + Z( NN-7 ) = S + END IF + IF( Z( NN-5 ).GT.Z( NN-3 )*TOL2 ) THEN + T = HALF*( ( Z( NN-7 )-Z( NN-3 ) )+Z( NN-5 ) ) + S = Z( NN-3 )*( Z( NN-5 ) / T ) + IF( S.LE.T ) THEN + S = Z( NN-3 )*( Z( NN-5 ) / + $ ( T*( ONE+SQRT( ONE+S / T ) ) ) ) + ELSE + S = Z( NN-3 )*( Z( NN-5 ) / ( T+SQRT( T )*SQRT( T+S ) ) ) + END IF + T = Z( NN-7 ) + ( S+Z( NN-5 ) ) + Z( NN-3 ) = Z( NN-3 )*( Z( NN-7 ) / T ) + Z( NN-7 ) = T + END IF + Z( 4*N0-7 ) = Z( NN-7 ) + SIGMA + Z( 4*N0-3 ) = Z( NN-3 ) + SIGMA + N0 = N0 - 2 + GO TO 10 +* + 50 CONTINUE +* +* Reverse the qd-array, if warranted. +* + IF( DMIN.LE.ZERO .OR. N0.LT.N0IN ) THEN + IF( CBIAS*Z( 4*I0+PP-3 ).LT.Z( 4*N0+PP-3 ) ) THEN + IPN4 = 4*( I0+N0 ) + DO 60 J4 = 4*I0, 2*( I0+N0-1 ), 4 + TEMP = Z( J4-3 ) + Z( J4-3 ) = Z( IPN4-J4-3 ) + Z( IPN4-J4-3 ) = TEMP + TEMP = Z( J4-2 ) + Z( J4-2 ) = Z( IPN4-J4-2 ) + Z( IPN4-J4-2 ) = TEMP + TEMP = Z( J4-1 ) + Z( J4-1 ) = Z( IPN4-J4-5 ) + Z( IPN4-J4-5 ) = TEMP + TEMP = Z( J4 ) + Z( J4 ) = Z( IPN4-J4-4 ) + Z( IPN4-J4-4 ) = TEMP + 60 CONTINUE + IF( N0-I0.LE.4 ) THEN + Z( 4*N0+PP-1 ) = Z( 4*I0+PP-1 ) + Z( 4*N0-PP ) = Z( 4*I0-PP ) + END IF + DMIN2 = MIN( DMIN2, Z( 4*N0+PP-1 ) ) + Z( 4*N0+PP-1 ) = MIN( Z( 4*N0+PP-1 ), Z( 4*I0+PP-1 ), + $ Z( 4*I0+PP+3 ) ) + Z( 4*N0-PP ) = MIN( Z( 4*N0-PP ), Z( 4*I0-PP ), + $ Z( 4*I0-PP+4 ) ) + QMAX = MAX( QMAX, Z( 4*I0+PP-3 ), Z( 4*I0+PP+1 ) ) + DMIN = -ZERO + END IF + END IF +* + IF( DMIN.LT.ZERO .OR. SAFMIN*QMAX.LT.MIN( Z( 4*N0+PP-1 ), + $ Z( 4*N0+PP-9 ), DMIN2+Z( 4*N0-PP ) ) ) THEN +* +* Choose a shift. +* + CALL DLAZQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, DN1, + $ DN2, TAU, TTYPE, G ) +* +* Call dqds until DMIN > 0. +* + 80 CONTINUE +* + CALL DLASQ5( I0, N0, Z, PP, TAU, DMIN, DMIN1, DMIN2, DN, + $ DN1, DN2, IEEE ) +* + NDIV = NDIV + ( N0-I0+2 ) + ITER = ITER + 1 +* +* Check status. +* + IF( DMIN.GE.ZERO .AND. DMIN1.GT.ZERO ) THEN +* +* Success. +* + GO TO 100 +* + ELSE IF( DMIN.LT.ZERO .AND. DMIN1.GT.ZERO .AND. + $ Z( 4*( N0-1 )-PP ).LT.TOL*( SIGMA+DN1 ) .AND. + $ ABS( DN ).LT.TOL*SIGMA ) THEN +* +* Convergence hidden by negative DN. +* + Z( 4*( N0-1 )-PP+2 ) = ZERO + DMIN = ZERO + GO TO 100 + ELSE IF( DMIN.LT.ZERO ) THEN +* +* TAU too big. Select new TAU and try again. +* + NFAIL = NFAIL + 1 + IF( TTYPE.LT.-22 ) THEN +* +* Failed twice. Play it safe. +* + TAU = ZERO + ELSE IF( DMIN1.GT.ZERO ) THEN +* +* Late failure. Gives excellent shift. +* + TAU = ( TAU+DMIN )*( ONE-TWO*EPS ) + TTYPE = TTYPE - 11 + ELSE +* +* Early failure. Divide by 4. +* + TAU = QURTR*TAU + TTYPE = TTYPE - 12 + END IF + GO TO 80 + ELSE IF( DMIN.NE.DMIN ) THEN +* +* NaN. +* + TAU = ZERO + GO TO 80 + ELSE +* +* Possible underflow. Play it safe. +* + GO TO 90 + END IF + END IF +* +* Risk of underflow. +* + 90 CONTINUE + CALL DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN, DN1, DN2 ) + NDIV = NDIV + ( N0-I0+2 ) + ITER = ITER + 1 + TAU = ZERO +* + 100 CONTINUE + IF( TAU.LT.SIGMA ) THEN + DESIG = DESIG + TAU + T = SIGMA + DESIG + DESIG = DESIG - ( T-SIGMA ) + ELSE + T = SIGMA + TAU + DESIG = SIGMA - ( T-TAU ) + DESIG + END IF + SIGMA = T +* + RETURN +* +* End of DLAZQ3 +* + END diff --git a/2.3-1/src/fortran/lapack/dlazq4.f b/2.3-1/src/fortran/lapack/dlazq4.f new file mode 100644 index 00000000..7c257f8d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dlazq4.f @@ -0,0 +1,330 @@ + SUBROUTINE DLAZQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN, + $ DN1, DN2, TAU, TTYPE, G ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER I0, N0, N0IN, PP, TTYPE + DOUBLE PRECISION DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU +* .. +* .. Array Arguments .. + DOUBLE PRECISION Z( * ) +* .. +* +* Purpose +* ======= +* +* DLAZQ4 computes an approximation TAU to the smallest eigenvalue +* using values of d from the previous transform. +* +* I0 (input) INTEGER +* First index. +* +* N0 (input) INTEGER +* Last index. +* +* Z (input) DOUBLE PRECISION array, dimension ( 4*N ) +* Z holds the qd array. +* +* PP (input) INTEGER +* PP=0 for ping, PP=1 for pong. +* +* N0IN (input) INTEGER +* The value of N0 at start of EIGTEST. +* +* DMIN (input) DOUBLE PRECISION +* Minimum value of d. +* +* DMIN1 (input) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ). +* +* DMIN2 (input) DOUBLE PRECISION +* Minimum value of d, excluding D( N0 ) and D( N0-1 ). +* +* DN (input) DOUBLE PRECISION +* d(N) +* +* DN1 (input) DOUBLE PRECISION +* d(N-1) +* +* DN2 (input) DOUBLE PRECISION +* d(N-2) +* +* TAU (output) DOUBLE PRECISION +* This is the shift. +* +* TTYPE (output) INTEGER +* Shift type. +* +* G (input/output) DOUBLE PRECISION +* G is passed as an argument in order to save its value between +* calls to DLAZQ4 +* +* Further Details +* =============== +* CNST1 = 9/16 +* +* This is a thread safe version of DLASQ4, which passes G through the +* argument list in place of declaring G in a SAVE statment. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION CNST1, CNST2, CNST3 + PARAMETER ( CNST1 = 0.5630D0, CNST2 = 1.010D0, + $ CNST3 = 1.050D0 ) + DOUBLE PRECISION QURTR, THIRD, HALF, ZERO, ONE, TWO, HUNDRD + PARAMETER ( QURTR = 0.250D0, THIRD = 0.3330D0, + $ HALF = 0.50D0, ZERO = 0.0D0, ONE = 1.0D0, + $ TWO = 2.0D0, HUNDRD = 100.0D0 ) +* .. +* .. Local Scalars .. + INTEGER I4, NN, NP + DOUBLE PRECISION A2, B1, B2, GAM, GAP1, GAP2, S +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* A negative DMIN forces the shift to take that absolute value +* TTYPE records the type of shift. +* + IF( DMIN.LE.ZERO ) THEN + TAU = -DMIN + TTYPE = -1 + RETURN + END IF +* + NN = 4*N0 + PP + IF( N0IN.EQ.N0 ) THEN +* +* No eigenvalues deflated. +* + IF( DMIN.EQ.DN .OR. DMIN.EQ.DN1 ) THEN +* + B1 = SQRT( Z( NN-3 ) )*SQRT( Z( NN-5 ) ) + B2 = SQRT( Z( NN-7 ) )*SQRT( Z( NN-9 ) ) + A2 = Z( NN-7 ) + Z( NN-5 ) +* +* Cases 2 and 3. +* + IF( DMIN.EQ.DN .AND. DMIN1.EQ.DN1 ) THEN + GAP2 = DMIN2 - A2 - DMIN2*QURTR + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2 ) THEN + GAP1 = A2 - DN - ( B2 / GAP2 )*B2 + ELSE + GAP1 = A2 - DN - ( B1+B2 ) + END IF + IF( GAP1.GT.ZERO .AND. GAP1.GT.B1 ) THEN + S = MAX( DN-( B1 / GAP1 )*B1, HALF*DMIN ) + TTYPE = -2 + ELSE + S = ZERO + IF( DN.GT.B1 ) + $ S = DN - B1 + IF( A2.GT.( B1+B2 ) ) + $ S = MIN( S, A2-( B1+B2 ) ) + S = MAX( S, THIRD*DMIN ) + TTYPE = -3 + END IF + ELSE +* +* Case 4. +* + TTYPE = -4 + S = QURTR*DMIN + IF( DMIN.EQ.DN ) THEN + GAM = DN + A2 = ZERO + IF( Z( NN-5 ) .GT. Z( NN-7 ) ) + $ RETURN + B2 = Z( NN-5 ) / Z( NN-7 ) + NP = NN - 9 + ELSE + NP = NN - 2*PP + B2 = Z( NP-2 ) + GAM = DN1 + IF( Z( NP-4 ) .GT. Z( NP-2 ) ) + $ RETURN + A2 = Z( NP-4 ) / Z( NP-2 ) + IF( Z( NN-9 ) .GT. Z( NN-11 ) ) + $ RETURN + B2 = Z( NN-9 ) / Z( NN-11 ) + NP = NN - 13 + END IF +* +* Approximate contribution to norm squared from I < NN-1. +* + A2 = A2 + B2 + DO 10 I4 = NP, 4*I0 - 1 + PP, -4 + IF( B2.EQ.ZERO ) + $ GO TO 20 + B1 = B2 + IF( Z( I4 ) .GT. Z( I4-2 ) ) + $ RETURN + B2 = B2*( Z( I4 ) / Z( I4-2 ) ) + A2 = A2 + B2 + IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) + $ GO TO 20 + 10 CONTINUE + 20 CONTINUE + A2 = CNST3*A2 +* +* Rayleigh quotient residual bound. +* + IF( A2.LT.CNST1 ) + $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) + END IF + ELSE IF( DMIN.EQ.DN2 ) THEN +* +* Case 5. +* + TTYPE = -5 + S = QURTR*DMIN +* +* Compute contribution to norm squared from I > NN-2. +* + NP = NN - 2*PP + B1 = Z( NP-2 ) + B2 = Z( NP-6 ) + GAM = DN2 + IF( Z( NP-8 ).GT.B2 .OR. Z( NP-4 ).GT.B1 ) + $ RETURN + A2 = ( Z( NP-8 ) / B2 )*( ONE+Z( NP-4 ) / B1 ) +* +* Approximate contribution to norm squared from I < NN-2. +* + IF( N0-I0.GT.2 ) THEN + B2 = Z( NN-13 ) / Z( NN-15 ) + A2 = A2 + B2 + DO 30 I4 = NN - 17, 4*I0 - 1 + PP, -4 + IF( B2.EQ.ZERO ) + $ GO TO 40 + B1 = B2 + IF( Z( I4 ) .GT. Z( I4-2 ) ) + $ RETURN + B2 = B2*( Z( I4 ) / Z( I4-2 ) ) + A2 = A2 + B2 + IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) + $ GO TO 40 + 30 CONTINUE + 40 CONTINUE + A2 = CNST3*A2 + END IF +* + IF( A2.LT.CNST1 ) + $ S = GAM*( ONE-SQRT( A2 ) ) / ( ONE+A2 ) + ELSE +* +* Case 6, no information to guide us. +* + IF( TTYPE.EQ.-6 ) THEN + G = G + THIRD*( ONE-G ) + ELSE IF( TTYPE.EQ.-18 ) THEN + G = QURTR*THIRD + ELSE + G = QURTR + END IF + S = G*DMIN + TTYPE = -6 + END IF +* + ELSE IF( N0IN.EQ.( N0+1 ) ) THEN +* +* One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN. +* + IF( DMIN1.EQ.DN1 .AND. DMIN2.EQ.DN2 ) THEN +* +* Cases 7 and 8. +* + TTYPE = -7 + S = THIRD*DMIN1 + IF( Z( NN-5 ).GT.Z( NN-7 ) ) + $ RETURN + B1 = Z( NN-5 ) / Z( NN-7 ) + B2 = B1 + IF( B2.EQ.ZERO ) + $ GO TO 60 + DO 50 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 + A2 = B1 + IF( Z( I4 ).GT.Z( I4-2 ) ) + $ RETURN + B1 = B1*( Z( I4 ) / Z( I4-2 ) ) + B2 = B2 + B1 + IF( HUNDRD*MAX( B1, A2 ).LT.B2 ) + $ GO TO 60 + 50 CONTINUE + 60 CONTINUE + B2 = SQRT( CNST3*B2 ) + A2 = DMIN1 / ( ONE+B2**2 ) + GAP2 = HALF*DMIN2 - A2 + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN + S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) + ELSE + S = MAX( S, A2*( ONE-CNST2*B2 ) ) + TTYPE = -8 + END IF + ELSE +* +* Case 9. +* + S = QURTR*DMIN1 + IF( DMIN1.EQ.DN1 ) + $ S = HALF*DMIN1 + TTYPE = -9 + END IF +* + ELSE IF( N0IN.EQ.( N0+2 ) ) THEN +* +* Two eigenvalues deflated. Use DMIN2, DN2 for DMIN and DN. +* +* Cases 10 and 11. +* + IF( DMIN2.EQ.DN2 .AND. TWO*Z( NN-5 ).LT.Z( NN-7 ) ) THEN + TTYPE = -10 + S = THIRD*DMIN2 + IF( Z( NN-5 ).GT.Z( NN-7 ) ) + $ RETURN + B1 = Z( NN-5 ) / Z( NN-7 ) + B2 = B1 + IF( B2.EQ.ZERO ) + $ GO TO 80 + DO 70 I4 = 4*N0 - 9 + PP, 4*I0 - 1 + PP, -4 + IF( Z( I4 ).GT.Z( I4-2 ) ) + $ RETURN + B1 = B1*( Z( I4 ) / Z( I4-2 ) ) + B2 = B2 + B1 + IF( HUNDRD*B1.LT.B2 ) + $ GO TO 80 + 70 CONTINUE + 80 CONTINUE + B2 = SQRT( CNST3*B2 ) + A2 = DMIN2 / ( ONE+B2**2 ) + GAP2 = Z( NN-7 ) + Z( NN-9 ) - + $ SQRT( Z( NN-11 ) )*SQRT( Z( NN-9 ) ) - A2 + IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN + S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) ) + ELSE + S = MAX( S, A2*( ONE-CNST2*B2 ) ) + END IF + ELSE + S = QURTR*DMIN2 + TTYPE = -11 + END IF + ELSE IF( N0IN.GT.( N0+2 ) ) THEN +* +* Case 12, more than two eigenvalues deflated. No information. +* + S = ZERO + TTYPE = -12 + END IF +* + TAU = S + RETURN +* +* End of DLAZQ4 +* + END diff --git a/2.3-1/src/fortran/lapack/dopgtr.f b/2.3-1/src/fortran/lapack/dopgtr.f new file mode 100644 index 00000000..cf0901ff --- /dev/null +++ b/2.3-1/src/fortran/lapack/dopgtr.f @@ -0,0 +1,160 @@ + SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDQ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), Q( LDQ, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DOPGTR generates a real orthogonal matrix Q which is defined as the +* product of n-1 elementary reflectors H(i) of order n, as returned by +* DSPTRD using packed storage: +* +* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1), +* +* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangular packed storage used in previous +* call to DSPTRD; +* = 'L': Lower triangular packed storage used in previous +* call to DSPTRD. +* +* N (input) INTEGER +* The order of the matrix Q. N >= 0. +* +* AP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* The vectors which define the elementary reflectors, as +* returned by DSPTRD. +* +* TAU (input) DOUBLE PRECISION array, dimension (N-1) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DSPTRD. +* +* Q (output) DOUBLE PRECISION array, dimension (LDQ,N) +* The N-by-N orthogonal matrix Q. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= max(1,N). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N-1) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, IINFO, IJ, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DORG2L, DORG2R, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDQ.LT.MAX( 1, N ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DOPGTR', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Q was determined by a call to DSPTRD with UPLO = 'U' +* +* Unpack the vectors which define the elementary reflectors and +* set the last row and column of Q equal to those of the unit +* matrix +* + IJ = 2 + DO 20 J = 1, N - 1 + DO 10 I = 1, J - 1 + Q( I, J ) = AP( IJ ) + IJ = IJ + 1 + 10 CONTINUE + IJ = IJ + 2 + Q( N, J ) = ZERO + 20 CONTINUE + DO 30 I = 1, N - 1 + Q( I, N ) = ZERO + 30 CONTINUE + Q( N, N ) = ONE +* +* Generate Q(1:n-1,1:n-1) +* + CALL DORG2L( N-1, N-1, N-1, Q, LDQ, TAU, WORK, IINFO ) +* + ELSE +* +* Q was determined by a call to DSPTRD with UPLO = 'L'. +* +* Unpack the vectors which define the elementary reflectors and +* set the first row and column of Q equal to those of the unit +* matrix +* + Q( 1, 1 ) = ONE + DO 40 I = 2, N + Q( I, 1 ) = ZERO + 40 CONTINUE + IJ = 3 + DO 60 J = 2, N + Q( 1, J ) = ZERO + DO 50 I = J + 1, N + Q( I, J ) = AP( IJ ) + IJ = IJ + 1 + 50 CONTINUE + IJ = IJ + 2 + 60 CONTINUE + IF( N.GT.1 ) THEN +* +* Generate Q(2:n,2:n) +* + CALL DORG2R( N-1, N-1, N-1, Q( 2, 2 ), LDQ, TAU, WORK, + $ IINFO ) + END IF + END IF + RETURN +* +* End of DOPGTR +* + END diff --git a/2.3-1/src/fortran/lapack/dorg2l.f b/2.3-1/src/fortran/lapack/dorg2l.f new file mode 100644 index 00000000..a20965fd --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorg2l.f @@ -0,0 +1,127 @@ + SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORG2L generates an m by n real matrix Q with orthonormal columns, +* which is defined as the last n columns of a product of k elementary +* reflectors of order m +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGEQLF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the (n-k+i)-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGEQLF in the last k columns of its array +* argument A. +* On exit, the m by n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQLF. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, II, J, L +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORG2L', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Initialise columns 1:n-k to columns of the unit matrix +* + DO 20 J = 1, N - K + DO 10 L = 1, M + A( L, J ) = ZERO + 10 CONTINUE + A( M-N+J, J ) = ONE + 20 CONTINUE +* + DO 40 I = 1, K + II = N - K + I +* +* Apply H(i) to A(1:m-k+i,1:n-k+i) from the left +* + A( M-N+II, II ) = ONE + CALL DLARF( 'Left', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A, + $ LDA, WORK ) + CALL DSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 ) + A( M-N+II, II ) = ONE - TAU( I ) +* +* Set A(m-k+i+1:m,n-k+i) to zero +* + DO 30 L = M - N + II + 1, M + A( L, II ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of DORG2L +* + END diff --git a/2.3-1/src/fortran/lapack/dorg2r.f b/2.3-1/src/fortran/lapack/dorg2r.f new file mode 100644 index 00000000..476e9f70 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorg2r.f @@ -0,0 +1,129 @@ + SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORG2R generates an m by n real matrix Q with orthonormal columns, +* which is defined as the first n columns of a product of k elementary +* reflectors of order m +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGEQRF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the i-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGEQRF in the first k columns of its array +* argument A. +* On exit, the m-by-n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQRF. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J, L +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORG2R', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Initialise columns k+1:n to columns of the unit matrix +* + DO 20 J = K + 1, N + DO 10 L = 1, M + A( L, J ) = ZERO + 10 CONTINUE + A( J, J ) = ONE + 20 CONTINUE +* + DO 40 I = K, 1, -1 +* +* Apply H(i) to A(i:m,i:n) from the left +* + IF( I.LT.N ) THEN + A( I, I ) = ONE + CALL DLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ), + $ A( I, I+1 ), LDA, WORK ) + END IF + IF( I.LT.M ) + $ CALL DSCAL( M-I, -TAU( I ), A( I+1, I ), 1 ) + A( I, I ) = ONE - TAU( I ) +* +* Set A(1:i-1,i) to zero +* + DO 30 L = 1, I - 1 + A( L, I ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of DORG2R +* + END diff --git a/2.3-1/src/fortran/lapack/dorgbr.f b/2.3-1/src/fortran/lapack/dorgbr.f new file mode 100644 index 00000000..dc882990 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgbr.f @@ -0,0 +1,244 @@ + SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER VECT + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGBR generates one of the real orthogonal matrices Q or P**T +* determined by DGEBRD when reducing a real matrix A to bidiagonal +* form: A = Q * B * P**T. Q and P**T are defined as products of +* elementary reflectors H(i) or G(i) respectively. +* +* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q +* is of order M: +* if m >= k, Q = H(1) H(2) . . . H(k) and DORGBR returns the first n +* columns of Q, where m >= n >= k; +* if m < k, Q = H(1) H(2) . . . H(m-1) and DORGBR returns Q as an +* M-by-M matrix. +* +* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**T +* is of order N: +* if k < n, P**T = G(k) . . . G(2) G(1) and DORGBR returns the first m +* rows of P**T, where n >= m >= k; +* if k >= n, P**T = G(n-1) . . . G(2) G(1) and DORGBR returns P**T as +* an N-by-N matrix. +* +* Arguments +* ========= +* +* VECT (input) CHARACTER*1 +* Specifies whether the matrix Q or the matrix P**T is +* required, as defined in the transformation applied by DGEBRD: +* = 'Q': generate Q; +* = 'P': generate P**T. +* +* M (input) INTEGER +* The number of rows of the matrix Q or P**T to be returned. +* M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q or P**T to be returned. +* N >= 0. +* If VECT = 'Q', M >= N >= min(M,K); +* if VECT = 'P', N >= M >= min(N,K). +* +* K (input) INTEGER +* If VECT = 'Q', the number of columns in the original M-by-K +* matrix reduced by DGEBRD. +* If VECT = 'P', the number of rows in the original K-by-N +* matrix reduced by DGEBRD. +* K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by DGEBRD. +* On exit, the M-by-N matrix Q or P**T. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension +* (min(M,K)) if VECT = 'Q' +* (min(N,K)) if VECT = 'P' +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i) or G(i), which determines Q or P**T, as +* returned by DGEBRD in its array argument TAUQ or TAUP. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,min(M,N)). +* For optimum performance LWORK >= min(M,N)*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, WANTQ + INTEGER I, IINFO, J, LWKOPT, MN, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DORGLQ, DORGQR, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + WANTQ = LSAME( VECT, 'Q' ) + MN = MIN( M, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.WANTQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN + INFO = -1 + ELSE IF( M.LT.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 .OR. ( WANTQ .AND. ( N.GT.M .OR. N.LT.MIN( M, + $ K ) ) ) .OR. ( .NOT.WANTQ .AND. ( M.GT.N .OR. M.LT. + $ MIN( N, K ) ) ) ) THEN + INFO = -3 + ELSE IF( K.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LWORK.LT.MAX( 1, MN ) .AND. .NOT.LQUERY ) THEN + INFO = -9 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( WANTQ ) THEN + NB = ILAENV( 1, 'DORGQR', ' ', M, N, K, -1 ) + ELSE + NB = ILAENV( 1, 'DORGLQ', ' ', M, N, K, -1 ) + END IF + LWKOPT = MAX( 1, MN )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGBR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + IF( WANTQ ) THEN +* +* Form Q, determined by a call to DGEBRD to reduce an m-by-k +* matrix +* + IF( M.GE.K ) THEN +* +* If m >= k, assume m >= n >= k +* + CALL DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* If m < k, assume m = n +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first row and column of Q +* to those of the unit matrix +* + DO 20 J = M, 2, -1 + A( 1, J ) = ZERO + DO 10 I = J + 1, M + A( I, J ) = A( I, J-1 ) + 10 CONTINUE + 20 CONTINUE + A( 1, 1 ) = ONE + DO 30 I = 2, M + A( I, 1 ) = ZERO + 30 CONTINUE + IF( M.GT.1 ) THEN +* +* Form Q(2:m,2:m) +* + CALL DORGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + ELSE +* +* Form P', determined by a call to DGEBRD to reduce a k-by-n +* matrix +* + IF( K.LT.N ) THEN +* +* If k < n, assume k <= m <= n +* + CALL DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* If k >= n, assume m = n +* +* Shift the vectors which define the elementary reflectors one +* row downward, and set the first row and column of P' to +* those of the unit matrix +* + A( 1, 1 ) = ONE + DO 40 I = 2, N + A( I, 1 ) = ZERO + 40 CONTINUE + DO 60 J = 2, N + DO 50 I = J - 1, 2, -1 + A( I, J ) = A( I-1, J ) + 50 CONTINUE + A( 1, J ) = ZERO + 60 CONTINUE + IF( N.GT.1 ) THEN +* +* Form P'(2:n,2:n) +* + CALL DORGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORGBR +* + END diff --git a/2.3-1/src/fortran/lapack/dorghr.f b/2.3-1/src/fortran/lapack/dorghr.f new file mode 100644 index 00000000..1283aece --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorghr.f @@ -0,0 +1,164 @@ + SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGHR generates a real orthogonal matrix Q which is defined as the +* product of IHI-ILO elementary reflectors of order N, as returned by +* DGEHRD: +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix Q. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI must have the same values as in the previous call +* of DGEHRD. Q is equal to the unit matrix except in the +* submatrix Q(ilo+1:ihi,ilo+1:ihi). +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by DGEHRD. +* On exit, the N-by-N orthogonal matrix Q. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (N-1) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEHRD. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= IHI-ILO. +* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IINFO, J, LWKOPT, NB, NH +* .. +* .. External Subroutines .. + EXTERNAL DORGQR, XERBLA +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NH = IHI - ILO + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, NH ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF +* + IF( INFO.EQ.0 ) THEN + NB = ILAENV( 1, 'DORGQR', ' ', NH, NH, NH, -1 ) + LWKOPT = MAX( 1, NH )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGHR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first ilo and the last n-ihi +* rows and columns to those of the unit matrix +* + DO 40 J = IHI, ILO + 1, -1 + DO 10 I = 1, J - 1 + A( I, J ) = ZERO + 10 CONTINUE + DO 20 I = J + 1, IHI + A( I, J ) = A( I, J-1 ) + 20 CONTINUE + DO 30 I = IHI + 1, N + A( I, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + DO 60 J = 1, ILO + DO 50 I = 1, N + A( I, J ) = ZERO + 50 CONTINUE + A( J, J ) = ONE + 60 CONTINUE + DO 80 J = IHI + 1, N + DO 70 I = 1, N + A( I, J ) = ZERO + 70 CONTINUE + A( J, J ) = ONE + 80 CONTINUE +* + IF( NH.GT.0 ) THEN +* +* Generate Q(ilo+1:ihi,ilo+1:ihi) +* + CALL DORGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ), + $ WORK, LWORK, IINFO ) + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORGHR +* + END diff --git a/2.3-1/src/fortran/lapack/dorgl2.f b/2.3-1/src/fortran/lapack/dorgl2.f new file mode 100644 index 00000000..1e08344d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgl2.f @@ -0,0 +1,133 @@ + SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGL2 generates an m by n real matrix Q with orthonormal rows, +* which is defined as the first m rows of a product of k elementary +* reflectors of order n +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGELQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the i-th row must contain the vector which defines +* the elementary reflector H(i), for i = 1,2,...,k, as returned +* by DGELQF in the first k rows of its array argument A. +* On exit, the m-by-n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGELQF. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J, L +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGL2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) + $ RETURN +* + IF( K.LT.M ) THEN +* +* Initialise rows k+1:m to rows of the unit matrix +* + DO 20 J = 1, N + DO 10 L = K + 1, M + A( L, J ) = ZERO + 10 CONTINUE + IF( J.GT.K .AND. J.LE.M ) + $ A( J, J ) = ONE + 20 CONTINUE + END IF +* + DO 40 I = K, 1, -1 +* +* Apply H(i) to A(i:m,i:n) from the right +* + IF( I.LT.N ) THEN + IF( I.LT.M ) THEN + A( I, I ) = ONE + CALL DLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, + $ TAU( I ), A( I+1, I ), LDA, WORK ) + END IF + CALL DSCAL( N-I, -TAU( I ), A( I, I+1 ), LDA ) + END IF + A( I, I ) = ONE - TAU( I ) +* +* Set A(i,1:i-1) to zero +* + DO 30 L = 1, I - 1 + A( I, L ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of DORGL2 +* + END diff --git a/2.3-1/src/fortran/lapack/dorglq.f b/2.3-1/src/fortran/lapack/dorglq.f new file mode 100644 index 00000000..e4f58c96 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorglq.f @@ -0,0 +1,215 @@ + SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGLQ generates an M-by-N real matrix Q with orthonormal rows, +* which is defined as the first M rows of a product of K elementary +* reflectors of order N +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGELQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the i-th row must contain the vector which defines +* the elementary reflector H(i), for i = 1,2,...,k, as returned +* by DGELQF in the first k rows of its array argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGELQF. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, + $ LWKOPT, NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORGL2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'DORGLQ', ' ', M, N, K, -1 ) + LWKOPT = MAX( 1, M )*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGLQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DORGLQ', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORGLQ', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the last block. +* The first kk rows are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* +* Set A(kk+1:m,1:kk) to zero. +* + DO 20 J = 1, KK + DO 10 I = KK + 1, M + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the last or only block. +* + IF( KK.LT.M ) + $ CALL DORGL2( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, + $ TAU( KK+1 ), WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = KI + 1, 1, -NB + IB = MIN( NB, K-I+1 ) + IF( I+IB.LE.M ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(i+ib:m,i:n) from the right +* + CALL DLARFB( 'Right', 'Transpose', 'Forward', 'Rowwise', + $ M-I-IB+1, N-I+1, IB, A( I, I ), LDA, WORK, + $ LDWORK, A( I+IB, I ), LDA, WORK( IB+1 ), + $ LDWORK ) + END IF +* +* Apply H' to columns i:n of current block +* + CALL DORGL2( IB, N-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* +* Set columns 1:i-1 of current block to zero +* + DO 40 J = 1, I - 1 + DO 30 L = I, I + IB - 1 + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of DORGLQ +* + END diff --git a/2.3-1/src/fortran/lapack/dorgql.f b/2.3-1/src/fortran/lapack/dorgql.f new file mode 100644 index 00000000..1c4896e9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgql.f @@ -0,0 +1,222 @@ + SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGQL generates an M-by-N real matrix Q with orthonormal columns, +* which is defined as the last N columns of a product of K elementary +* reflectors of order M +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGEQLF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the (n-k+i)-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGEQLF in the last k columns of its array +* argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQLF. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT, + $ NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORG2L, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'DORGQL', ' ', M, N, K, -1 ) + LWKOPT = N*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGQL', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DORGQL', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORGQL', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the first block. +* The last kk columns are handled by the block method. +* + KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB ) +* +* Set A(m-kk+1:m,1:n-kk) to zero. +* + DO 20 J = 1, N - KK + DO 10 I = M - KK + 1, M + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the first or only block. +* + CALL DORG2L( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = K - KK + 1, K, NB + IB = MIN( NB, K-I+1 ) + IF( N-K+I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB, + $ A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(1:m-k+i+ib-1,1:n-k+i-1) from the left +* + CALL DLARFB( 'Left', 'No transpose', 'Backward', + $ 'Columnwise', M-K+I+IB-1, N-K+I-1, IB, + $ A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA, + $ WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H to rows 1:m-k+i+ib-1 of current block +* + CALL DORG2L( M-K+I+IB-1, IB, IB, A( 1, N-K+I ), LDA, + $ TAU( I ), WORK, IINFO ) +* +* Set rows m-k+i+ib:m of current block to zero +* + DO 40 J = N - K + I, N - K + I + IB - 1 + DO 30 L = M - K + I + IB, M + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of DORGQL +* + END diff --git a/2.3-1/src/fortran/lapack/dorgqr.f b/2.3-1/src/fortran/lapack/dorgqr.f new file mode 100644 index 00000000..4db0ef5a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgqr.f @@ -0,0 +1,216 @@ + SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGQR generates an M-by-N real matrix Q with orthonormal columns, +* which is defined as the first N columns of a product of K elementary +* reflectors of order M +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGEQRF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the i-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGEQRF in the first k columns of its array +* argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQRF. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, + $ LWKOPT, NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORG2R, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'DORGQR', ' ', M, N, K, -1 ) + LWKOPT = MAX( 1, N )*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGQR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DORGQR', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORGQR', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the last block. +* The first kk columns are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* +* Set A(1:kk,kk+1:n) to zero. +* + DO 20 J = KK + 1, N + DO 10 I = 1, KK + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the last or only block. +* + IF( KK.LT.N ) + $ CALL DORG2R( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, + $ TAU( KK+1 ), WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = KI + 1, 1, -NB + IB = MIN( NB, K-I+1 ) + IF( I+IB.LE.N ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Columnwise', M-I+1, IB, + $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(i:m,i+ib:n) from the left +* + CALL DLARFB( 'Left', 'No transpose', 'Forward', + $ 'Columnwise', M-I+1, N-I-IB+1, IB, + $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), + $ LDA, WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H to rows i:m of current block +* + CALL DORG2R( M-I+1, IB, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* +* Set rows 1:i-1 of current block to zero +* + DO 40 J = I, I + IB - 1 + DO 30 L = 1, I - 1 + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of DORGQR +* + END diff --git a/2.3-1/src/fortran/lapack/dorgr2.f b/2.3-1/src/fortran/lapack/dorgr2.f new file mode 100644 index 00000000..9da45c5f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgr2.f @@ -0,0 +1,131 @@ + SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGR2 generates an m by n real matrix Q with orthonormal rows, +* which is defined as the last m rows of a product of k elementary +* reflectors of order n +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGERQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the (m-k+i)-th row must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGERQF in the last k rows of its array argument +* A. +* On exit, the m by n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGERQF. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, II, J, L +* .. +* .. External Subroutines .. + EXTERNAL DLARF, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGR2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) + $ RETURN +* + IF( K.LT.M ) THEN +* +* Initialise rows 1:m-k to rows of the unit matrix +* + DO 20 J = 1, N + DO 10 L = 1, M - K + A( L, J ) = ZERO + 10 CONTINUE + IF( J.GT.N-M .AND. J.LE.N-K ) + $ A( M-N+J, J ) = ONE + 20 CONTINUE + END IF +* + DO 40 I = 1, K + II = M - K + I +* +* Apply H(i) to A(1:m-k+i,1:n-k+i) from the right +* + A( II, N-M+II ) = ONE + CALL DLARF( 'Right', II-1, N-M+II, A( II, 1 ), LDA, TAU( I ), + $ A, LDA, WORK ) + CALL DSCAL( N-M+II-1, -TAU( I ), A( II, 1 ), LDA ) + A( II, N-M+II ) = ONE - TAU( I ) +* +* Set A(m-k+i,n-k+i+1:n) to zero +* + DO 30 L = N - M + II + 1, N + A( II, L ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of DORGR2 +* + END diff --git a/2.3-1/src/fortran/lapack/dorgrq.f b/2.3-1/src/fortran/lapack/dorgrq.f new file mode 100644 index 00000000..11633403 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgrq.f @@ -0,0 +1,222 @@ + SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGRQ generates an M-by-N real matrix Q with orthonormal rows, +* which is defined as the last M rows of a product of K elementary +* reflectors of order N +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGERQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the (m-k+i)-th row must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by DGERQF in the last k rows of its array argument +* A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGERQF. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, II, IINFO, IWS, J, KK, L, LDWORK, + $ LWKOPT, NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORGR2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.LE.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'DORGRQ', ' ', M, N, K, -1 ) + LWKOPT = M*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGRQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DORGRQ', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORGRQ', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the first block. +* The last kk rows are handled by the block method. +* + KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB ) +* +* Set A(1:m-kk,n-kk+1:n) to zero. +* + DO 20 J = N - KK + 1, N + DO 10 I = 1, M - KK + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the first or only block. +* + CALL DORGR2( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = K - KK + 1, K, NB + IB = MIN( NB, K-I+1 ) + II = M - K + I + IF( II.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Rowwise', N-K+I+IB-1, IB, + $ A( II, 1 ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(1:m-k+i-1,1:n-k+i+ib-1) from the right +* + CALL DLARFB( 'Right', 'Transpose', 'Backward', 'Rowwise', + $ II-1, N-K+I+IB-1, IB, A( II, 1 ), LDA, WORK, + $ LDWORK, A, LDA, WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H' to columns 1:n-k+i+ib-1 of current block +* + CALL DORGR2( IB, N-K+I+IB-1, IB, A( II, 1 ), LDA, TAU( I ), + $ WORK, IINFO ) +* +* Set columns n-k+i+ib:n of current block to zero +* + DO 40 L = N - K + I + IB, N + DO 30 J = II, II + IB - 1 + A( J, L ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of DORGRQ +* + END diff --git a/2.3-1/src/fortran/lapack/dorgtr.f b/2.3-1/src/fortran/lapack/dorgtr.f new file mode 100644 index 00000000..4c72d031 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorgtr.f @@ -0,0 +1,183 @@ + SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORGTR generates a real orthogonal matrix Q which is defined as the +* product of n-1 elementary reflectors of order N, as returned by +* DSYTRD: +* +* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1), +* +* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A contains elementary reflectors +* from DSYTRD; +* = 'L': Lower triangle of A contains elementary reflectors +* from DSYTRD. +* +* N (input) INTEGER +* The order of the matrix Q. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by DSYTRD. +* On exit, the N-by-N orthogonal matrix Q. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (N-1) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DSYTRD. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N-1). +* For optimum performance LWORK >= (N-1)*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, UPPER + INTEGER I, IINFO, J, LWKOPT, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DORGQL, DORGQR, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, N-1 ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( UPPER ) THEN + NB = ILAENV( 1, 'DORGQL', ' ', N-1, N-1, N-1, -1 ) + ELSE + NB = ILAENV( 1, 'DORGQR', ' ', N-1, N-1, N-1, -1 ) + END IF + LWKOPT = MAX( 1, N-1 )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORGTR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + IF( UPPER ) THEN +* +* Q was determined by a call to DSYTRD with UPLO = 'U' +* +* Shift the vectors which define the elementary reflectors one +* column to the left, and set the last row and column of Q to +* those of the unit matrix +* + DO 20 J = 1, N - 1 + DO 10 I = 1, J - 1 + A( I, J ) = A( I, J+1 ) + 10 CONTINUE + A( N, J ) = ZERO + 20 CONTINUE + DO 30 I = 1, N - 1 + A( I, N ) = ZERO + 30 CONTINUE + A( N, N ) = ONE +* +* Generate Q(1:n-1,1:n-1) +* + CALL DORGQL( N-1, N-1, N-1, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* Q was determined by a call to DSYTRD with UPLO = 'L'. +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first row and column of Q to +* those of the unit matrix +* + DO 50 J = N, 2, -1 + A( 1, J ) = ZERO + DO 40 I = J + 1, N + A( I, J ) = A( I, J-1 ) + 40 CONTINUE + 50 CONTINUE + A( 1, 1 ) = ONE + DO 60 I = 2, N + A( I, 1 ) = ZERO + 60 CONTINUE + IF( N.GT.1 ) THEN +* +* Generate Q(2:n,2:n) +* + CALL DORGQR( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORGTR +* + END diff --git a/2.3-1/src/fortran/lapack/dorm2l.f b/2.3-1/src/fortran/lapack/dorm2l.f new file mode 100644 index 00000000..27120075 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorm2l.f @@ -0,0 +1,193 @@ + SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORM2L overwrites the general real m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'T', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'T', +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGEQLF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'T': apply Q' (Transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGEQLF in the last k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQLF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, MI, NI, NQ + DOUBLE PRECISION AII +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORM2L', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. NOTRAN ) .OR. ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) + $ THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + ELSE + MI = M + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) is applied to C(1:m-k+i,1:n) +* + MI = M - K + I + ELSE +* +* H(i) is applied to C(1:m,1:n-k+i) +* + NI = N - K + I + END IF +* +* Apply H(i) +* + AII = A( NQ-K+I, I ) + A( NQ-K+I, I ) = ONE + CALL DLARF( SIDE, MI, NI, A( 1, I ), 1, TAU( I ), C, LDC, + $ WORK ) + A( NQ-K+I, I ) = AII + 10 CONTINUE + RETURN +* +* End of DORM2L +* + END diff --git a/2.3-1/src/fortran/lapack/dorm2r.f b/2.3-1/src/fortran/lapack/dorm2r.f new file mode 100644 index 00000000..79c9ef35 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorm2r.f @@ -0,0 +1,197 @@ + SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORM2R overwrites the general real m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'T', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'T', +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGEQRF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'T': apply Q' (Transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGEQRF in the first k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQRF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ + DOUBLE PRECISION AII +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORM2R', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. ( .NOT.LEFT .AND. NOTRAN ) ) + $ THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) +* + AII = A( I, I ) + A( I, I ) = ONE + CALL DLARF( SIDE, MI, NI, A( I, I ), 1, TAU( I ), C( IC, JC ), + $ LDC, WORK ) + A( I, I ) = AII + 10 CONTINUE + RETURN +* +* End of DORM2R +* + END diff --git a/2.3-1/src/fortran/lapack/dormbr.f b/2.3-1/src/fortran/lapack/dormbr.f new file mode 100644 index 00000000..8066b893 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormbr.f @@ -0,0 +1,281 @@ + SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, + $ LDC, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS, VECT + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* If VECT = 'Q', DORMBR overwrites the general real M-by-N matrix C +* with +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* If VECT = 'P', DORMBR overwrites the general real M-by-N matrix C +* with +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': P * C C * P +* TRANS = 'T': P**T * C C * P**T +* +* Here Q and P**T are the orthogonal matrices determined by DGEBRD when +* reducing a real matrix A to bidiagonal form: A = Q * B * P**T. Q and +* P**T are defined as products of elementary reflectors H(i) and G(i) +* respectively. +* +* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the +* order of the orthogonal matrix Q or P**T that is applied. +* +* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix: +* if nq >= k, Q = H(1) H(2) . . . H(k); +* if nq < k, Q = H(1) H(2) . . . H(nq-1). +* +* If VECT = 'P', A is assumed to have been a K-by-NQ matrix: +* if k < nq, P = G(1) G(2) . . . G(k); +* if k >= nq, P = G(1) G(2) . . . G(nq-1). +* +* Arguments +* ========= +* +* VECT (input) CHARACTER*1 +* = 'Q': apply Q or Q**T; +* = 'P': apply P or P**T. +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q, Q**T, P or P**T from the Left; +* = 'R': apply Q, Q**T, P or P**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q or P; +* = 'T': Transpose, apply Q**T or P**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* If VECT = 'Q', the number of columns in the original +* matrix reduced by DGEBRD. +* If VECT = 'P', the number of rows in the original +* matrix reduced by DGEBRD. +* K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,min(nq,K)) if VECT = 'Q' +* (LDA,nq) if VECT = 'P' +* The vectors which define the elementary reflectors H(i) and +* G(i), whose products determine the matrices Q and P, as +* returned by DGEBRD. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If VECT = 'Q', LDA >= max(1,nq); +* if VECT = 'P', LDA >= max(1,min(nq,K)). +* +* TAU (input) DOUBLE PRECISION array, dimension (min(nq,K)) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i) or G(i) which determines Q or P, as returned +* by DGEBRD in the array argument TAUQ or TAUP. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q +* or P*C or P**T*C or C*P or C*P**T. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DORMLQ, DORMQR, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + APPLYQ = LSAME( VECT, 'Q' ) + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q or P and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.APPLYQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -3 + ELSE IF( M.LT.0 ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( K.LT.0 ) THEN + INFO = -6 + ELSE IF( ( APPLYQ .AND. LDA.LT.MAX( 1, NQ ) ) .OR. + $ ( .NOT.APPLYQ .AND. LDA.LT.MAX( 1, MIN( NQ, K ) ) ) ) + $ THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( APPLYQ ) THEN + IF( LEFT ) THEN + NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, M-1, N, M-1, + $ -1 ) + ELSE + NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, M, N-1, N-1, + $ -1 ) + END IF + ELSE + IF( LEFT ) THEN + NB = ILAENV( 1, 'DORMLQ', SIDE // TRANS, M-1, N, M-1, + $ -1 ) + ELSE + NB = ILAENV( 1, 'DORMLQ', SIDE // TRANS, M, N-1, N-1, + $ -1 ) + END IF + END IF + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMBR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + WORK( 1 ) = 1 + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* + IF( APPLYQ ) THEN +* +* Apply Q +* + IF( NQ.GE.K ) THEN +* +* Q was determined by a call to DGEBRD with nq >= k +* + CALL DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, IINFO ) + ELSE IF( NQ.GT.1 ) THEN +* +* Q was determined by a call to DGEBRD with nq < k +* + IF( LEFT ) THEN + MI = M - 1 + NI = N + I1 = 2 + I2 = 1 + ELSE + MI = M + NI = N - 1 + I1 = 1 + I2 = 2 + END IF + CALL DORMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU, + $ C( I1, I2 ), LDC, WORK, LWORK, IINFO ) + END IF + ELSE +* +* Apply P +* + IF( NOTRAN ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF + IF( NQ.GT.K ) THEN +* +* P was determined by a call to DGEBRD with nq > k +* + CALL DORMLQ( SIDE, TRANST, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, IINFO ) + ELSE IF( NQ.GT.1 ) THEN +* +* P was determined by a call to DGEBRD with nq <= k +* + IF( LEFT ) THEN + MI = M - 1 + NI = N + I1 = 2 + I2 = 1 + ELSE + MI = M + NI = N - 1 + I1 = 1 + I2 = 2 + END IF + CALL DORMLQ( SIDE, TRANST, MI, NI, NQ-1, A( 1, 2 ), LDA, + $ TAU, C( I1, I2 ), LDC, WORK, LWORK, IINFO ) + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMBR +* + END diff --git a/2.3-1/src/fortran/lapack/dormhr.f b/2.3-1/src/fortran/lapack/dormhr.f new file mode 100644 index 00000000..5862538e --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormhr.f @@ -0,0 +1,201 @@ + SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C, + $ LDC, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER IHI, ILO, INFO, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMHR overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix of order nq, with nq = m if +* SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of +* IHI-ILO elementary reflectors, as returned by DGEHRD: +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI must have the same values as in the previous call +* of DGEHRD. Q is equal to the unit matrix except in the +* submatrix Q(ilo+1:ihi,ilo+1:ihi). +* If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and +* ILO = 1 and IHI = 0, if M = 0; +* if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and +* ILO = 1 and IHI = 0, if N = 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L' +* (LDA,N) if SIDE = 'R' +* The vectors which define the elementary reflectors, as +* returned by DGEHRD. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'. +* +* TAU (input) DOUBLE PRECISION array, dimension +* (M-1) if SIDE = 'L' +* (N-1) if SIDE = 'R' +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEHRD. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LEFT, LQUERY + INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NH, NI, NQ, NW +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DORMQR, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NH = IHI - ILO + LEFT = LSAME( SIDE, 'L' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.LSAME( TRANS, 'T' ) ) + $ THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, NQ ) ) THEN + INFO = -5 + ELSE IF( IHI.LT.MIN( ILO, NQ ) .OR. IHI.GT.NQ ) THEN + INFO = -6 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( LEFT ) THEN + NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, NH, N, NH, -1 ) + ELSE + NB = ILAENV( 1, 'DORMQR', SIDE // TRANS, M, NH, NH, -1 ) + END IF + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMHR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. NH.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + IF( LEFT ) THEN + MI = NH + NI = N + I1 = ILO + 1 + I2 = 1 + ELSE + MI = M + NI = NH + I1 = 1 + I2 = ILO + 1 + END IF +* + CALL DORMQR( SIDE, TRANS, MI, NI, NH, A( ILO+1, ILO ), LDA, + $ TAU( ILO ), C( I1, I2 ), LDC, WORK, LWORK, IINFO ) +* + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMHR +* + END diff --git a/2.3-1/src/fortran/lapack/dorml2.f b/2.3-1/src/fortran/lapack/dorml2.f new file mode 100644 index 00000000..d3941c9a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dorml2.f @@ -0,0 +1,197 @@ + SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORML2 overwrites the general real m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'T', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'T', +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGELQF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'T': apply Q' (Transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGELQF in the first k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGELQF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ + DOUBLE PRECISION AII +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORML2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. NOTRAN ) .OR. ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) + $ THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) +* + AII = A( I, I ) + A( I, I ) = ONE + CALL DLARF( SIDE, MI, NI, A( I, I ), LDA, TAU( I ), + $ C( IC, JC ), LDC, WORK ) + A( I, I ) = AII + 10 CONTINUE + RETURN +* +* End of DORML2 +* + END diff --git a/2.3-1/src/fortran/lapack/dormlq.f b/2.3-1/src/fortran/lapack/dormlq.f new file mode 100644 index 00000000..f0c68ef2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormlq.f @@ -0,0 +1,267 @@ + SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMLQ overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGELQF in the first k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGELQF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, + $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORML2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. NB may be at most NBMAX, where NBMAX +* is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'DORMLQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMLQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORMLQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + IF( NOTRAN ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ), + $ LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL DLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB, + $ A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, WORK, + $ LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMLQ +* + END diff --git a/2.3-1/src/fortran/lapack/dormql.f b/2.3-1/src/fortran/lapack/dormql.f new file mode 100644 index 00000000..f3370f10 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormql.f @@ -0,0 +1,261 @@ + SUBROUTINE DORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMQL overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by DGEQLF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGEQLF in the last k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQLF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + INTEGER I, I1, I2, I3, IB, IINFO, IWS, LDWORK, LWKOPT, + $ MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORM2L, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = MAX( 1, N ) + ELSE + NQ = N + NW = MAX( 1, M ) + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + LWKOPT = 1 + ELSE +* +* Determine the block size. NB may be at most NBMAX, where +* NBMAX is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'DORMQL', SIDE // TRANS, M, N, + $ K, -1 ) ) + LWKOPT = NW*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMQL', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORMQL', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + ELSE + MI = M + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Columnwise', NQ-K+I+IB-1, IB, + $ A( 1, I ), LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(1:m-k+i+ib-1,1:n) +* + MI = M - K + I + IB - 1 + ELSE +* +* H or H' is applied to C(1:m,1:n-k+i+ib-1) +* + NI = N - K + I + IB - 1 + END IF +* +* Apply H or H' +* + CALL DLARFB( SIDE, TRANS, 'Backward', 'Columnwise', MI, NI, + $ IB, A( 1, I ), LDA, T, LDT, C, LDC, WORK, + $ LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMQL +* + END diff --git a/2.3-1/src/fortran/lapack/dormqr.f b/2.3-1/src/fortran/lapack/dormqr.f new file mode 100644 index 00000000..ee372695 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormqr.f @@ -0,0 +1,260 @@ + SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMQR overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGEQRF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGEQRF in the first k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGEQRF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, + $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORM2R, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. NB may be at most NBMAX, where NBMAX +* is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'DORMQR', SIDE // TRANS, M, N, K, + $ -1 ) ) + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMQR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORMQR', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL DLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ), + $ LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL DLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI, + $ IB, A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, + $ WORK, LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMQR +* + END diff --git a/2.3-1/src/fortran/lapack/dormr2.f b/2.3-1/src/fortran/lapack/dormr2.f new file mode 100644 index 00000000..994552fb --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormr2.f @@ -0,0 +1,193 @@ + SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMR2 overwrites the general real m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'T', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'T', +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGERQF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'T': apply Q' (Transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGERQF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGERQF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, MI, NI, NQ + DOUBLE PRECISION AII +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMR2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. ( .NOT.LEFT .AND. NOTRAN ) ) + $ THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + ELSE + MI = M + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) is applied to C(1:m-k+i,1:n) +* + MI = M - K + I + ELSE +* +* H(i) is applied to C(1:m,1:n-k+i) +* + NI = N - K + I + END IF +* +* Apply H(i) +* + AII = A( I, NQ-K+I ) + A( I, NQ-K+I ) = ONE + CALL DLARF( SIDE, MI, NI, A( I, 1 ), LDA, TAU( I ), C, LDC, + $ WORK ) + A( I, NQ-K+I ) = AII + 10 CONTINUE + RETURN +* +* End of DORMR2 +* + END diff --git a/2.3-1/src/fortran/lapack/dormr3.f b/2.3-1/src/fortran/lapack/dormr3.f new file mode 100644 index 00000000..7bdcb856 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormr3.f @@ -0,0 +1,206 @@ + SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, L, LDA, LDC, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMR3 overwrites the general real m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'T', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'T', +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DTZRZF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'T': apply Q' (Transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing +* the meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DTZRZF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DTZRZF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the m-by-n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) DOUBLE PRECISION array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JA, JC, MI, NI, NQ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLARZ, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( L.LT.0 .OR. ( LEFT .AND. ( L.GT.M ) ) .OR. + $ ( .NOT.LEFT .AND. ( L.GT.N ) ) ) THEN + INFO = -6 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMR3', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JA = M - L + 1 + JC = 1 + ELSE + MI = M + JA = N - L + 1 + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) or H(i)' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) or H(i)' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) or H(i)' +* + CALL DLARZ( SIDE, MI, NI, L, A( I, JA ), LDA, TAU( I ), + $ C( IC, JC ), LDC, WORK ) +* + 10 CONTINUE +* + RETURN +* +* End of DORMR3 +* + END diff --git a/2.3-1/src/fortran/lapack/dormrq.f b/2.3-1/src/fortran/lapack/dormrq.f new file mode 100644 index 00000000..522c1392 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormrq.f @@ -0,0 +1,268 @@ + SUBROUTINE DORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMRQ overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DGERQF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DGERQF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DGERQF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I, I1, I2, I3, IB, IINFO, IWS, LDWORK, LWKOPT, + $ MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLARFB, DLARFT, DORMR2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = MAX( 1, N ) + ELSE + NQ = N + NW = MAX( 1, M ) + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + LWKOPT = 1 + ELSE +* +* Determine the block size. NB may be at most NBMAX, where +* NBMAX is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'DORMRQ', SIDE // TRANS, M, N, + $ K, -1 ) ) + LWKOPT = NW*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMRQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORMRQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + ELSE + MI = M + END IF +* + IF( NOTRAN ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARFT( 'Backward', 'Rowwise', NQ-K+I+IB-1, IB, + $ A( I, 1 ), LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(1:m-k+i+ib-1,1:n) +* + MI = M - K + I + IB - 1 + ELSE +* +* H or H' is applied to C(1:m,1:n-k+i+ib-1) +* + NI = N - K + I + IB - 1 + END IF +* +* Apply H or H' +* + CALL DLARFB( SIDE, TRANST, 'Backward', 'Rowwise', MI, NI, + $ IB, A( I, 1 ), LDA, T, LDT, C, LDC, WORK, + $ LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of DORMRQ +* + END diff --git a/2.3-1/src/fortran/lapack/dormrz.f b/2.3-1/src/fortran/lapack/dormrz.f new file mode 100644 index 00000000..9e14acce --- /dev/null +++ b/2.3-1/src/fortran/lapack/dormrz.f @@ -0,0 +1,292 @@ + SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, L, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DORMRZ overwrites the general real M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'T': Q**T * C C * Q**T +* +* where Q is a real orthogonal matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by DTZRZF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**T from the Left; +* = 'R': apply Q or Q**T from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'T': Transpose, apply Q**T. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing +* the meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* A (input) DOUBLE PRECISION array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* DTZRZF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) DOUBLE PRECISION array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by DTZRZF. +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JA, JC, + $ LDWORK, LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + DOUBLE PRECISION T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLARZB, DLARZT, DORMR3, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = MAX( 1, N ) + ELSE + NQ = N + NW = MAX( 1, M ) + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( L.LT.0 .OR. ( LEFT .AND. ( L.GT.M ) ) .OR. + $ ( .NOT.LEFT .AND. ( L.GT.N ) ) ) THEN + INFO = -6 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + LWKOPT = 1 +* +* Determine the block size. NB may be at most NBMAX, where +* NBMAX is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'DORMRQ', SIDE // TRANS, M, N, + $ K, -1 ) ) + LWKOPT = NW*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DORMRZ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DORMRQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + JA = M - L + 1 + ELSE + MI = M + IC = 1 + JA = N - L + 1 + END IF +* + IF( NOTRAN ) THEN + TRANST = 'T' + ELSE + TRANST = 'N' + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARZT( 'Backward', 'Rowwise', L, IB, A( I, JA ), LDA, + $ TAU( I ), T, LDT ) +* + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL DLARZB( SIDE, TRANST, 'Backward', 'Rowwise', MI, NI, + $ IB, L, A( I, JA ), LDA, T, LDT, C( IC, JC ), + $ LDC, WORK, LDWORK ) + 10 CONTINUE +* + END IF +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DORMRZ +* + END diff --git a/2.3-1/src/fortran/lapack/dpocon.f b/2.3-1/src/fortran/lapack/dpocon.f new file mode 100644 index 00000000..c28af374 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dpocon.f @@ -0,0 +1,177 @@ + SUBROUTINE DPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N + DOUBLE PRECISION ANORM, RCOND +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DPOCON estimates the reciprocal of the condition number (in the +* 1-norm) of a real symmetric positive definite matrix using the +* Cholesky factorization A = U**T*U or A = L*L**T computed by DPOTRF. +* +* An estimate is obtained for norm(inv(A)), and the reciprocal of the +* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The triangular factor U or L from the Cholesky factorization +* A = U**T*U or A = L*L**T, as computed by DPOTRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* ANORM (input) DOUBLE PRECISION +* The 1-norm (or infinity-norm) of the symmetric matrix A. +* +* RCOND (output) DOUBLE PRECISION +* The reciprocal of the condition number of the matrix A, +* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an +* estimate of the 1-norm of inv(A) computed in this routine. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* IWORK (workspace) INTEGER array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + CHARACTER NORMIN + INTEGER IX, KASE + DOUBLE PRECISION AINVNM, SCALE, SCALEL, SCALEU, SMLNUM +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, IDAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DLATRS, DRSCL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( ANORM.LT.ZERO ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DPOCON', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + RCOND = ZERO + IF( N.EQ.0 ) THEN + RCOND = ONE + RETURN + ELSE IF( ANORM.EQ.ZERO ) THEN + RETURN + END IF +* + SMLNUM = DLAMCH( 'Safe minimum' ) +* +* Estimate the 1-norm of inv(A). +* + KASE = 0 + NORMIN = 'N' + 10 CONTINUE + CALL DLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( UPPER ) THEN +* +* Multiply by inv(U'). +* + CALL DLATRS( 'Upper', 'Transpose', 'Non-unit', NORMIN, N, A, + $ LDA, WORK, SCALEL, WORK( 2*N+1 ), INFO ) + NORMIN = 'Y' +* +* Multiply by inv(U). +* + CALL DLATRS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, + $ A, LDA, WORK, SCALEU, WORK( 2*N+1 ), INFO ) + ELSE +* +* Multiply by inv(L). +* + CALL DLATRS( 'Lower', 'No transpose', 'Non-unit', NORMIN, N, + $ A, LDA, WORK, SCALEL, WORK( 2*N+1 ), INFO ) + NORMIN = 'Y' +* +* Multiply by inv(L'). +* + CALL DLATRS( 'Lower', 'Transpose', 'Non-unit', NORMIN, N, A, + $ LDA, WORK, SCALEU, WORK( 2*N+1 ), INFO ) + END IF +* +* Multiply by 1/SCALE if doing so will not cause overflow. +* + SCALE = SCALEL*SCALEU + IF( SCALE.NE.ONE ) THEN + IX = IDAMAX( N, WORK, 1 ) + IF( SCALE.LT.ABS( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) + $ GO TO 20 + CALL DRSCL( N, SCALE, WORK, 1 ) + END IF + GO TO 10 + END IF +* +* Compute the estimate of the reciprocal condition number. +* + IF( AINVNM.NE.ZERO ) + $ RCOND = ( ONE / AINVNM ) / ANORM +* + 20 CONTINUE + RETURN +* +* End of DPOCON +* + END diff --git a/2.3-1/src/fortran/lapack/dpotf2.f b/2.3-1/src/fortran/lapack/dpotf2.f new file mode 100644 index 00000000..b7d65e91 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dpotf2.f @@ -0,0 +1,167 @@ + SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DPOTF2 computes the Cholesky factorization of a real symmetric +* positive definite matrix A. +* +* The factorization has the form +* A = U' * U , if UPLO = 'U', or +* A = L * L', if UPLO = 'L', +* where U is an upper triangular matrix and L is lower triangular. +* +* This is the unblocked version of the algorithm, calling Level 2 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is stored. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* n by n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n by n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, if INFO = 0, the factor U or L from the Cholesky +* factorization A = U'*U or A = L*L'. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* > 0: if INFO = k, the leading minor of order k is not +* positive definite, and the factorization could not be +* completed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J + DOUBLE PRECISION AJJ +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DPOTF2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Compute the Cholesky factorization A = U'*U. +* + DO 10 J = 1, N +* +* Compute U(J,J) and test for non-positive-definiteness. +* + AJJ = A( J, J ) - DDOT( J-1, A( 1, J ), 1, A( 1, J ), 1 ) + IF( AJJ.LE.ZERO ) THEN + A( J, J ) = AJJ + GO TO 30 + END IF + AJJ = SQRT( AJJ ) + A( J, J ) = AJJ +* +* Compute elements J+1:N of row J. +* + IF( J.LT.N ) THEN + CALL DGEMV( 'Transpose', J-1, N-J, -ONE, A( 1, J+1 ), + $ LDA, A( 1, J ), 1, ONE, A( J, J+1 ), LDA ) + CALL DSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA ) + END IF + 10 CONTINUE + ELSE +* +* Compute the Cholesky factorization A = L*L'. +* + DO 20 J = 1, N +* +* Compute L(J,J) and test for non-positive-definiteness. +* + AJJ = A( J, J ) - DDOT( J-1, A( J, 1 ), LDA, A( J, 1 ), + $ LDA ) + IF( AJJ.LE.ZERO ) THEN + A( J, J ) = AJJ + GO TO 30 + END IF + AJJ = SQRT( AJJ ) + A( J, J ) = AJJ +* +* Compute elements J+1:N of column J. +* + IF( J.LT.N ) THEN + CALL DGEMV( 'No transpose', N-J, J-1, -ONE, A( J+1, 1 ), + $ LDA, A( J, 1 ), LDA, ONE, A( J+1, J ), 1 ) + CALL DSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 ) + END IF + 20 CONTINUE + END IF + GO TO 40 +* + 30 CONTINUE + INFO = J +* + 40 CONTINUE + RETURN +* +* End of DPOTF2 +* + END diff --git a/2.3-1/src/fortran/lapack/dpotrf.f b/2.3-1/src/fortran/lapack/dpotrf.f new file mode 100644 index 00000000..8449df6d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dpotrf.f @@ -0,0 +1,183 @@ + SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DPOTRF computes the Cholesky factorization of a real symmetric +* positive definite matrix A. +* +* The factorization has the form +* A = U**T * U, if UPLO = 'U', or +* A = L * L**T, if UPLO = 'L', +* where U is an upper triangular matrix and L is lower triangular. +* +* This is the block version of the algorithm, calling Level 3 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, if INFO = 0, the factor U or L from the Cholesky +* factorization A = U**T*U or A = L*L**T. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the leading minor of order i is not +* positive definite, and the factorization could not be +* completed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J, JB, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DPOTF2, DSYRK, DTRSM, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DPOTRF', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'DPOTRF', UPLO, N, -1, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.N ) THEN +* +* Use unblocked code. +* + CALL DPOTF2( UPLO, N, A, LDA, INFO ) + ELSE +* +* Use blocked code. +* + IF( UPPER ) THEN +* +* Compute the Cholesky factorization A = U'*U. +* + DO 10 J = 1, N, NB +* +* Update and factorize the current diagonal block and test +* for non-positive-definiteness. +* + JB = MIN( NB, N-J+1 ) + CALL DSYRK( 'Upper', 'Transpose', JB, J-1, -ONE, + $ A( 1, J ), LDA, ONE, A( J, J ), LDA ) + CALL DPOTF2( 'Upper', JB, A( J, J ), LDA, INFO ) + IF( INFO.NE.0 ) + $ GO TO 30 + IF( J+JB.LE.N ) THEN +* +* Compute the current block row. +* + CALL DGEMM( 'Transpose', 'No transpose', JB, N-J-JB+1, + $ J-1, -ONE, A( 1, J ), LDA, A( 1, J+JB ), + $ LDA, ONE, A( J, J+JB ), LDA ) + CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', + $ JB, N-J-JB+1, ONE, A( J, J ), LDA, + $ A( J, J+JB ), LDA ) + END IF + 10 CONTINUE +* + ELSE +* +* Compute the Cholesky factorization A = L*L'. +* + DO 20 J = 1, N, NB +* +* Update and factorize the current diagonal block and test +* for non-positive-definiteness. +* + JB = MIN( NB, N-J+1 ) + CALL DSYRK( 'Lower', 'No transpose', JB, J-1, -ONE, + $ A( J, 1 ), LDA, ONE, A( J, J ), LDA ) + CALL DPOTF2( 'Lower', JB, A( J, J ), LDA, INFO ) + IF( INFO.NE.0 ) + $ GO TO 30 + IF( J+JB.LE.N ) THEN +* +* Compute the current block column. +* + CALL DGEMM( 'No transpose', 'Transpose', N-J-JB+1, JB, + $ J-1, -ONE, A( J+JB, 1 ), LDA, A( J, 1 ), + $ LDA, ONE, A( J+JB, J ), LDA ) + CALL DTRSM( 'Right', 'Lower', 'Transpose', 'Non-unit', + $ N-J-JB+1, JB, ONE, A( J, J ), LDA, + $ A( J+JB, J ), LDA ) + END IF + 20 CONTINUE + END IF + END IF + GO TO 40 +* + 30 CONTINUE + INFO = INFO + J - 1 +* + 40 CONTINUE + RETURN +* +* End of DPOTRF +* + END diff --git a/2.3-1/src/fortran/lapack/dpotrs.f b/2.3-1/src/fortran/lapack/dpotrs.f new file mode 100644 index 00000000..0273655e --- /dev/null +++ b/2.3-1/src/fortran/lapack/dpotrs.f @@ -0,0 +1,132 @@ + SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DPOTRS solves a system of linear equations A*X = B with a symmetric +* positive definite matrix A using the Cholesky factorization +* A = U**T*U or A = L*L**T computed by DPOTRF. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The triangular factor U or L from the Cholesky factorization +* A = U**T*U or A = L*L**T, as computed by DPOTRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the right hand side matrix B. +* On exit, the solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DTRSM, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DPOTRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. NRHS.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Solve A*X = B where A = U'*U. +* +* Solve U'*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Upper', 'Transpose', 'Non-unit', N, NRHS, + $ ONE, A, LDA, B, LDB ) +* +* Solve U*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N, + $ NRHS, ONE, A, LDA, B, LDB ) + ELSE +* +* Solve A*X = B where A = L*L'. +* +* Solve L*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Lower', 'No transpose', 'Non-unit', N, + $ NRHS, ONE, A, LDA, B, LDB ) +* +* Solve L'*X = B, overwriting B with X. +* + CALL DTRSM( 'Left', 'Lower', 'Transpose', 'Non-unit', N, NRHS, + $ ONE, A, LDA, B, LDB ) + END IF +* + RETURN +* +* End of DPOTRS +* + END diff --git a/2.3-1/src/fortran/lapack/dpptrf.f b/2.3-1/src/fortran/lapack/dpptrf.f new file mode 100644 index 00000000..a5e2a596 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dpptrf.f @@ -0,0 +1,177 @@ + SUBROUTINE DPPTRF( UPLO, N, AP, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ) +* .. +* +* Purpose +* ======= +* +* DPPTRF computes the Cholesky factorization of a real symmetric +* positive definite matrix A stored in packed format. +* +* The factorization has the form +* A = U**T * U, if UPLO = 'U', or +* A = L * L**T, if UPLO = 'L', +* where U is an upper triangular matrix and L is lower triangular. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. +* See below for further details. +* +* On exit, if INFO = 0, the triangular factor U or L from the +* Cholesky factorization A = U**T*U or A = L*L**T, in the same +* storage format as A. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the leading minor of order i is not +* positive definite, and the factorization could not be +* completed. +* +* Further Details +* ======= ======= +* +* The packed storage scheme is illustrated by the following example +* when N = 4, UPLO = 'U': +* +* Two-dimensional storage of the symmetric matrix A: +* +* a11 a12 a13 a14 +* a22 a23 a24 +* a33 a34 (aij = aji) +* a44 +* +* Packed storage of the upper triangle of A: +* +* AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ] +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J, JC, JJ + DOUBLE PRECISION AJJ +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSPR, DTPSV, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DPPTRF', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Compute the Cholesky factorization A = U'*U. +* + JJ = 0 + DO 10 J = 1, N + JC = JJ + 1 + JJ = JJ + J +* +* Compute elements 1:J-1 of column J. +* + IF( J.GT.1 ) + $ CALL DTPSV( 'Upper', 'Transpose', 'Non-unit', J-1, AP, + $ AP( JC ), 1 ) +* +* Compute U(J,J) and test for non-positive-definiteness. +* + AJJ = AP( JJ ) - DDOT( J-1, AP( JC ), 1, AP( JC ), 1 ) + IF( AJJ.LE.ZERO ) THEN + AP( JJ ) = AJJ + GO TO 30 + END IF + AP( JJ ) = SQRT( AJJ ) + 10 CONTINUE + ELSE +* +* Compute the Cholesky factorization A = L*L'. +* + JJ = 1 + DO 20 J = 1, N +* +* Compute L(J,J) and test for non-positive-definiteness. +* + AJJ = AP( JJ ) + IF( AJJ.LE.ZERO ) THEN + AP( JJ ) = AJJ + GO TO 30 + END IF + AJJ = SQRT( AJJ ) + AP( JJ ) = AJJ +* +* Compute elements J+1:N of column J and update the trailing +* submatrix. +* + IF( J.LT.N ) THEN + CALL DSCAL( N-J, ONE / AJJ, AP( JJ+1 ), 1 ) + CALL DSPR( 'Lower', N-J, -ONE, AP( JJ+1 ), 1, + $ AP( JJ+N-J+1 ) ) + JJ = JJ + N - J + 1 + END IF + 20 CONTINUE + END IF + GO TO 40 +* + 30 CONTINUE + INFO = J +* + 40 CONTINUE + RETURN +* +* End of DPPTRF +* + END diff --git a/2.3-1/src/fortran/lapack/drscl.f b/2.3-1/src/fortran/lapack/drscl.f new file mode 100644 index 00000000..a13e96d8 --- /dev/null +++ b/2.3-1/src/fortran/lapack/drscl.f @@ -0,0 +1,114 @@ + SUBROUTINE DRSCL( N, SA, SX, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + DOUBLE PRECISION SA +* .. +* .. Array Arguments .. + DOUBLE PRECISION SX( * ) +* .. +* +* Purpose +* ======= +* +* DRSCL multiplies an n-element real vector x by the real scalar 1/a. +* This is done without overflow or underflow as long as +* the final result x/a does not overflow or underflow. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of components of the vector x. +* +* SA (input) DOUBLE PRECISION +* The scalar a which is used to divide each component of x. +* SA must be >= 0, or the subroutine will divide by zero. +* +* SX (input/output) DOUBLE PRECISION array, dimension +* (1+(N-1)*abs(INCX)) +* The n-element vector x. +* +* INCX (input) INTEGER +* The increment between successive values of the vector SX. +* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL DONE + DOUBLE PRECISION BIGNUM, CDEN, CDEN1, CNUM, CNUM1, MUL, SMLNUM +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Initialize the denominator to SA and the numerator to 1. +* + CDEN = SA + CNUM = ONE +* + 10 CONTINUE + CDEN1 = CDEN*SMLNUM + CNUM1 = CNUM / BIGNUM + IF( ABS( CDEN1 ).GT.ABS( CNUM ) .AND. CNUM.NE.ZERO ) THEN +* +* Pre-multiply X by SMLNUM if CDEN is large compared to CNUM. +* + MUL = SMLNUM + DONE = .FALSE. + CDEN = CDEN1 + ELSE IF( ABS( CNUM1 ).GT.ABS( CDEN ) ) THEN +* +* Pre-multiply X by BIGNUM if CDEN is small compared to CNUM. +* + MUL = BIGNUM + DONE = .FALSE. + CNUM = CNUM1 + ELSE +* +* Multiply X by CNUM / CDEN and return. +* + MUL = CNUM / CDEN + DONE = .TRUE. + END IF +* +* Scale the vector X by MUL +* + CALL DSCAL( N, MUL, SX, INCX ) +* + IF( .NOT.DONE ) + $ GO TO 10 +* + RETURN +* +* End of DRSCL +* + END diff --git a/2.3-1/src/fortran/lapack/dspev.f b/2.3-1/src/fortran/lapack/dspev.f new file mode 100644 index 00000000..64582c99 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dspev.f @@ -0,0 +1,187 @@ + SUBROUTINE DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBZ, UPLO + INTEGER INFO, LDZ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), W( * ), WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DSPEV computes all the eigenvalues and, optionally, eigenvectors of a +* real symmetric matrix A in packed storage. +* +* Arguments +* ========= +* +* JOBZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only; +* = 'V': Compute eigenvalues and eigenvectors. +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +* +* On exit, AP is overwritten by values generated during the +* reduction to tridiagonal form. If UPLO = 'U', the diagonal +* and first superdiagonal of the tridiagonal matrix T overwrite +* the corresponding elements of A, and if UPLO = 'L', the +* diagonal and first subdiagonal of T overwrite the +* corresponding elements of A. +* +* W (output) DOUBLE PRECISION array, dimension (N) +* If INFO = 0, the eigenvalues in ascending order. +* +* Z (output) DOUBLE PRECISION array, dimension (LDZ, N) +* If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal +* eigenvectors of the matrix A, with the i-th column of Z +* holding the eigenvector associated with W(i). +* If JOBZ = 'N', then Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1, and if +* JOBZ = 'V', LDZ >= max(1,N). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, the algorithm failed to converge; i +* off-diagonal elements of an intermediate tridiagonal +* form did not converge to zero. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL WANTZ + INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE + DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, + $ SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, DLANSP + EXTERNAL LSAME, DLAMCH, DLANSP +* .. +* .. External Subroutines .. + EXTERNAL DOPGTR, DSCAL, DSPTRD, DSTEQR, DSTERF, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + WANTZ = LSAME( JOBZ, 'V' ) +* + INFO = 0 + IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( .NOT.( LSAME( UPLO, 'U' ) .OR. LSAME( UPLO, 'L' ) ) ) + $ THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN + INFO = -7 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSPEV ', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( N.EQ.1 ) THEN + W( 1 ) = AP( 1 ) + IF( WANTZ ) + $ Z( 1, 1 ) = ONE + RETURN + END IF +* +* Get machine constants. +* + SAFMIN = DLAMCH( 'Safe minimum' ) + EPS = DLAMCH( 'Precision' ) + SMLNUM = SAFMIN / EPS + BIGNUM = ONE / SMLNUM + RMIN = SQRT( SMLNUM ) + RMAX = SQRT( BIGNUM ) +* +* Scale matrix to allowable range, if necessary. +* + ANRM = DLANSP( 'M', UPLO, N, AP, WORK ) + ISCALE = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN + ISCALE = 1 + SIGMA = RMIN / ANRM + ELSE IF( ANRM.GT.RMAX ) THEN + ISCALE = 1 + SIGMA = RMAX / ANRM + END IF + IF( ISCALE.EQ.1 ) THEN + CALL DSCAL( ( N*( N+1 ) ) / 2, SIGMA, AP, 1 ) + END IF +* +* Call DSPTRD to reduce symmetric packed matrix to tridiagonal form. +* + INDE = 1 + INDTAU = INDE + N + CALL DSPTRD( UPLO, N, AP, W, WORK( INDE ), WORK( INDTAU ), IINFO ) +* +* For eigenvalues only, call DSTERF. For eigenvectors, first call +* DOPGTR to generate the orthogonal matrix, then call DSTEQR. +* + IF( .NOT.WANTZ ) THEN + CALL DSTERF( N, W, WORK( INDE ), INFO ) + ELSE + INDWRK = INDTAU + N + CALL DOPGTR( UPLO, N, AP, WORK( INDTAU ), Z, LDZ, + $ WORK( INDWRK ), IINFO ) + CALL DSTEQR( JOBZ, N, W, WORK( INDE ), Z, LDZ, WORK( INDTAU ), + $ INFO ) + END IF +* +* If matrix was scaled, then rescale eigenvalues appropriately. +* + IF( ISCALE.EQ.1 ) THEN + IF( INFO.EQ.0 ) THEN + IMAX = N + ELSE + IMAX = INFO - 1 + END IF + CALL DSCAL( IMAX, ONE / SIGMA, W, 1 ) + END IF +* + RETURN +* +* End of DSPEV +* + END diff --git a/2.3-1/src/fortran/lapack/dspgst.f b/2.3-1/src/fortran/lapack/dspgst.f new file mode 100644 index 00000000..8e121a94 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dspgst.f @@ -0,0 +1,208 @@ + SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, ITYPE, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), BP( * ) +* .. +* +* Purpose +* ======= +* +* DSPGST reduces a real symmetric-definite generalized eigenproblem +* to standard form, using packed storage. +* +* If ITYPE = 1, the problem is A*x = lambda*B*x, +* and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T) +* +* If ITYPE = 2 or 3, the problem is A*B*x = lambda*x or +* B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L. +* +* B must have been previously factorized as U**T*U or L*L**T by DPPTRF. +* +* Arguments +* ========= +* +* ITYPE (input) INTEGER +* = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T); +* = 2 or 3: compute U*A*U**T or L**T*A*L. +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored and B is factored as +* U**T*U; +* = 'L': Lower triangle of A is stored and B is factored as +* L*L**T. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. +* +* On exit, if INFO = 0, the transformed matrix, stored in the +* same format as A. +* +* BP (input) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* The triangular factor from the Cholesky factorization of B, +* stored in the same format as A, as returned by DPPTRF. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, HALF + PARAMETER ( ONE = 1.0D0, HALF = 0.5D0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J, J1, J1J1, JJ, K, K1, K1K1, KK + DOUBLE PRECISION AJJ, AKK, BJJ, BKK, CT +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DSCAL, DSPMV, DSPR2, DTPMV, DTPSV, + $ XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( ITYPE.LT.1 .OR. ITYPE.GT.3 ) THEN + INFO = -1 + ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSPGST', -INFO ) + RETURN + END IF +* + IF( ITYPE.EQ.1 ) THEN + IF( UPPER ) THEN +* +* Compute inv(U')*A*inv(U) +* +* J1 and JJ are the indices of A(1,j) and A(j,j) +* + JJ = 0 + DO 10 J = 1, N + J1 = JJ + 1 + JJ = JJ + J +* +* Compute the j-th column of the upper triangle of A +* + BJJ = BP( JJ ) + CALL DTPSV( UPLO, 'Transpose', 'Nonunit', J, BP, + $ AP( J1 ), 1 ) + CALL DSPMV( UPLO, J-1, -ONE, AP, BP( J1 ), 1, ONE, + $ AP( J1 ), 1 ) + CALL DSCAL( J-1, ONE / BJJ, AP( J1 ), 1 ) + AP( JJ ) = ( AP( JJ )-DDOT( J-1, AP( J1 ), 1, BP( J1 ), + $ 1 ) ) / BJJ + 10 CONTINUE + ELSE +* +* Compute inv(L)*A*inv(L') +* +* KK and K1K1 are the indices of A(k,k) and A(k+1,k+1) +* + KK = 1 + DO 20 K = 1, N + K1K1 = KK + N - K + 1 +* +* Update the lower triangle of A(k:n,k:n) +* + AKK = AP( KK ) + BKK = BP( KK ) + AKK = AKK / BKK**2 + AP( KK ) = AKK + IF( K.LT.N ) THEN + CALL DSCAL( N-K, ONE / BKK, AP( KK+1 ), 1 ) + CT = -HALF*AKK + CALL DAXPY( N-K, CT, BP( KK+1 ), 1, AP( KK+1 ), 1 ) + CALL DSPR2( UPLO, N-K, -ONE, AP( KK+1 ), 1, + $ BP( KK+1 ), 1, AP( K1K1 ) ) + CALL DAXPY( N-K, CT, BP( KK+1 ), 1, AP( KK+1 ), 1 ) + CALL DTPSV( UPLO, 'No transpose', 'Non-unit', N-K, + $ BP( K1K1 ), AP( KK+1 ), 1 ) + END IF + KK = K1K1 + 20 CONTINUE + END IF + ELSE + IF( UPPER ) THEN +* +* Compute U*A*U' +* +* K1 and KK are the indices of A(1,k) and A(k,k) +* + KK = 0 + DO 30 K = 1, N + K1 = KK + 1 + KK = KK + K +* +* Update the upper triangle of A(1:k,1:k) +* + AKK = AP( KK ) + BKK = BP( KK ) + CALL DTPMV( UPLO, 'No transpose', 'Non-unit', K-1, BP, + $ AP( K1 ), 1 ) + CT = HALF*AKK + CALL DAXPY( K-1, CT, BP( K1 ), 1, AP( K1 ), 1 ) + CALL DSPR2( UPLO, K-1, ONE, AP( K1 ), 1, BP( K1 ), 1, + $ AP ) + CALL DAXPY( K-1, CT, BP( K1 ), 1, AP( K1 ), 1 ) + CALL DSCAL( K-1, BKK, AP( K1 ), 1 ) + AP( KK ) = AKK*BKK**2 + 30 CONTINUE + ELSE +* +* Compute L'*A*L +* +* JJ and J1J1 are the indices of A(j,j) and A(j+1,j+1) +* + JJ = 1 + DO 40 J = 1, N + J1J1 = JJ + N - J + 1 +* +* Compute the j-th column of the lower triangle of A +* + AJJ = AP( JJ ) + BJJ = BP( JJ ) + AP( JJ ) = AJJ*BJJ + DDOT( N-J, AP( JJ+1 ), 1, + $ BP( JJ+1 ), 1 ) + CALL DSCAL( N-J, BJJ, AP( JJ+1 ), 1 ) + CALL DSPMV( UPLO, N-J, ONE, AP( J1J1 ), BP( JJ+1 ), 1, + $ ONE, AP( JJ+1 ), 1 ) + CALL DTPMV( UPLO, 'Transpose', 'Non-unit', N-J+1, + $ BP( JJ ), AP( JJ ), 1 ) + JJ = J1J1 + 40 CONTINUE + END IF + END IF + RETURN +* +* End of DSPGST +* + END diff --git a/2.3-1/src/fortran/lapack/dspgv.f b/2.3-1/src/fortran/lapack/dspgv.f new file mode 100644 index 00000000..737a1ee3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dspgv.f @@ -0,0 +1,195 @@ + SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK, + $ INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBZ, UPLO + INTEGER INFO, ITYPE, LDZ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), BP( * ), W( * ), WORK( * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DSPGV computes all the eigenvalues and, optionally, the eigenvectors +* of a real generalized symmetric-definite eigenproblem, of the form +* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. +* Here A and B are assumed to be symmetric, stored in packed format, +* and B is also positive definite. +* +* Arguments +* ========= +* +* ITYPE (input) INTEGER +* Specifies the problem type to be solved: +* = 1: A*x = (lambda)*B*x +* = 2: A*B*x = (lambda)*x +* = 3: B*A*x = (lambda)*x +* +* JOBZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only; +* = 'V': Compute eigenvalues and eigenvectors. +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangles of A and B are stored; +* = 'L': Lower triangles of A and B are stored. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension +* (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +* +* On exit, the contents of AP are destroyed. +* +* BP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* B, packed columnwise in a linear array. The j-th column of B +* is stored in the array BP as follows: +* if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j; +* if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n. +* +* On exit, the triangular factor U or L from the Cholesky +* factorization B = U**T*U or B = L*L**T, in the same storage +* format as B. +* +* W (output) DOUBLE PRECISION array, dimension (N) +* If INFO = 0, the eigenvalues in ascending order. +* +* Z (output) DOUBLE PRECISION array, dimension (LDZ, N) +* If JOBZ = 'V', then if INFO = 0, Z contains the matrix Z of +* eigenvectors. The eigenvectors are normalized as follows: +* if ITYPE = 1 or 2, Z**T*B*Z = I; +* if ITYPE = 3, Z**T*inv(B)*Z = I. +* If JOBZ = 'N', then Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1, and if +* JOBZ = 'V', LDZ >= max(1,N). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: DPPTRF or DSPEV returned an error code: +* <= N: if INFO = i, DSPEV failed to converge; +* i off-diagonal elements of an intermediate +* tridiagonal form did not converge to zero. +* > N: if INFO = n + i, for 1 <= i <= n, then the leading +* minor of order i of B is not positive definite. +* The factorization of B could not be completed and +* no eigenvalues or eigenvectors were computed. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL UPPER, WANTZ + CHARACTER TRANS + INTEGER J, NEIG +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DPPTRF, DSPEV, DSPGST, DTPMV, DTPSV, XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + WANTZ = LSAME( JOBZ, 'V' ) + UPPER = LSAME( UPLO, 'U' ) +* + INFO = 0 + IF( ITYPE.LT.1 .OR. ITYPE.GT.3 ) THEN + INFO = -1 + ELSE IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( .NOT.( UPPER .OR. LSAME( UPLO, 'L' ) ) ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN + INFO = -9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSPGV ', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Form a Cholesky factorization of B. +* + CALL DPPTRF( UPLO, N, BP, INFO ) + IF( INFO.NE.0 ) THEN + INFO = N + INFO + RETURN + END IF +* +* Transform problem to standard eigenvalue problem and solve. +* + CALL DSPGST( ITYPE, UPLO, N, AP, BP, INFO ) + CALL DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO ) +* + IF( WANTZ ) THEN +* +* Backtransform eigenvectors to the original problem. +* + NEIG = N + IF( INFO.GT.0 ) + $ NEIG = INFO - 1 + IF( ITYPE.EQ.1 .OR. ITYPE.EQ.2 ) THEN +* +* For A*x=(lambda)*B*x and A*B*x=(lambda)*x; +* backtransform eigenvectors: x = inv(L)'*y or inv(U)*y +* + IF( UPPER ) THEN + TRANS = 'N' + ELSE + TRANS = 'T' + END IF +* + DO 10 J = 1, NEIG + CALL DTPSV( UPLO, TRANS, 'Non-unit', N, BP, Z( 1, J ), + $ 1 ) + 10 CONTINUE +* + ELSE IF( ITYPE.EQ.3 ) THEN +* +* For B*A*x=(lambda)*x; +* backtransform eigenvectors: x = L*y or U'*y +* + IF( UPPER ) THEN + TRANS = 'T' + ELSE + TRANS = 'N' + END IF +* + DO 20 J = 1, NEIG + CALL DTPMV( UPLO, TRANS, 'Non-unit', N, BP, Z( 1, J ), + $ 1 ) + 20 CONTINUE + END IF + END IF + RETURN +* +* End of DSPGV +* + END diff --git a/2.3-1/src/fortran/lapack/dsptrd.f b/2.3-1/src/fortran/lapack/dsptrd.f new file mode 100644 index 00000000..6d3390e3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsptrd.f @@ -0,0 +1,228 @@ + SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION AP( * ), D( * ), E( * ), TAU( * ) +* .. +* +* Purpose +* ======= +* +* DSPTRD reduces a real symmetric matrix A stored in packed form to +* symmetric tridiagonal form T by an orthogonal similarity +* transformation: Q**T * A * Q = T. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. +* On exit, if UPLO = 'U', the diagonal and first superdiagonal +* of A are overwritten by the corresponding elements of the +* tridiagonal matrix T, and the elements above the first +* superdiagonal, with the array TAU, represent the orthogonal +* matrix Q as a product of elementary reflectors; if UPLO +* = 'L', the diagonal and first subdiagonal of A are over- +* written by the corresponding elements of the tridiagonal +* matrix T, and the elements below the first subdiagonal, with +* the array TAU, represent the orthogonal matrix Q as a product +* of elementary reflectors. See Further Details. +* +* D (output) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of the tridiagonal matrix T: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* The off-diagonal elements of the tridiagonal matrix T: +* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n-1) . . . H(2) H(1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP, +* overwriting A(1:i-1,i+1), and tau is stored in TAU(i). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(n-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP, +* overwriting A(i+2:n,i), and tau is stored in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO, HALF + PARAMETER ( ONE = 1.0D0, ZERO = 0.0D0, + $ HALF = 1.0D0 / 2.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, I1, I1I1, II + DOUBLE PRECISION ALPHA, TAUI +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DLARFG, DSPMV, DSPR2, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSPTRD', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Reduce the upper triangle of A. +* I1 is the index in AP of A(1,I+1). +* + I1 = N*( N-1 ) / 2 + 1 + DO 10 I = N - 1, 1, -1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(1:i-1,i+1) +* + CALL DLARFG( I, AP( I1+I-1 ), AP( I1 ), 1, TAUI ) + E( I ) = AP( I1+I-1 ) +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(1:i,1:i) +* + AP( I1+I-1 ) = ONE +* +* Compute y := tau * A * v storing y in TAU(1:i) +* + CALL DSPMV( UPLO, I, TAUI, AP, AP( I1 ), 1, ZERO, TAU, + $ 1 ) +* +* Compute w := y - 1/2 * tau * (y'*v) * v +* + ALPHA = -HALF*TAUI*DDOT( I, TAU, 1, AP( I1 ), 1 ) + CALL DAXPY( I, ALPHA, AP( I1 ), 1, TAU, 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL DSPR2( UPLO, I, -ONE, AP( I1 ), 1, TAU, 1, AP ) +* + AP( I1+I-1 ) = E( I ) + END IF + D( I+1 ) = AP( I1+I ) + TAU( I ) = TAUI + I1 = I1 - I + 10 CONTINUE + D( 1 ) = AP( 1 ) + ELSE +* +* Reduce the lower triangle of A. II is the index in AP of +* A(i,i) and I1I1 is the index of A(i+1,i+1). +* + II = 1 + DO 20 I = 1, N - 1 + I1I1 = II + N - I + 1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(i+2:n,i) +* + CALL DLARFG( N-I, AP( II+1 ), AP( II+2 ), 1, TAUI ) + E( I ) = AP( II+1 ) +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(i+1:n,i+1:n) +* + AP( II+1 ) = ONE +* +* Compute y := tau * A * v storing y in TAU(i:n-1) +* + CALL DSPMV( UPLO, N-I, TAUI, AP( I1I1 ), AP( II+1 ), 1, + $ ZERO, TAU( I ), 1 ) +* +* Compute w := y - 1/2 * tau * (y'*v) * v +* + ALPHA = -HALF*TAUI*DDOT( N-I, TAU( I ), 1, AP( II+1 ), + $ 1 ) + CALL DAXPY( N-I, ALPHA, AP( II+1 ), 1, TAU( I ), 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL DSPR2( UPLO, N-I, -ONE, AP( II+1 ), 1, TAU( I ), 1, + $ AP( I1I1 ) ) +* + AP( II+1 ) = E( I ) + END IF + D( I ) = AP( II ) + TAU( I ) = TAUI + II = I1I1 + 20 CONTINUE + D( N ) = AP( II ) + END IF +* + RETURN +* +* End of DSPTRD +* + END diff --git a/2.3-1/src/fortran/lapack/dsptrf.f b/2.3-1/src/fortran/lapack/dsptrf.f new file mode 100644 index 00000000..8b8a9185 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsptrf.f @@ -0,0 +1,547 @@ + SUBROUTINE DSPTRF( UPLO, N, AP, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION AP( * ) +* .. +* +* Purpose +* ======= +* +* DSPTRF computes the factorization of a real symmetric matrix A stored +* in packed format using the Bunch-Kaufman diagonal pivoting method: +* +* A = U*D*U**T or A = L*D*L**T +* +* where U (or L) is a product of permutation and unit upper (lower) +* triangular matrices, and D is symmetric and block diagonal with +* 1-by-1 and 2-by-2 diagonal blocks. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2) +* On entry, the upper or lower triangle of the symmetric matrix +* A, packed columnwise in a linear array. The j-th column of A +* is stored in the array AP as follows: +* if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; +* if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. +* +* On exit, the block diagonal matrix D and the multipliers used +* to obtain the factor U or L, stored as a packed triangular +* matrix overwriting A (see below for further details). +* +* IPIV (output) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D. +* If IPIV(k) > 0, then rows and columns k and IPIV(k) were +* interchanged and D(k,k) is a 1-by-1 diagonal block. +* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and +* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) +* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = +* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were +* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, D(i,i) is exactly zero. The factorization +* has been completed, but the block diagonal matrix D is +* exactly singular, and division by zero will occur if it +* is used to solve a system of equations. +* +* Further Details +* =============== +* +* 5-96 - Based on modifications by J. Lewis, Boeing Computer Services +* Company +* +* If UPLO = 'U', then A = U*D*U', where +* U = P(n)*U(n)* ... *P(k)U(k)* ..., +* i.e., U is a product of terms P(k)*U(k), where k decreases from n to +* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I v 0 ) k-s +* U(k) = ( 0 I 0 ) s +* ( 0 0 I ) n-k +* k-s s n-k +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). +* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), +* and A(k,k), and v overwrites A(1:k-2,k-1:k). +* +* If UPLO = 'L', then A = L*D*L', where +* L = P(1)*L(1)* ... *P(k)*L(k)* ..., +* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to +* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I 0 0 ) k-1 +* L(k) = ( 0 I 0 ) s +* ( 0 v I ) n-k-s+1 +* k-1 s n-k-s+1 +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). +* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), +* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION EIGHT, SEVTEN + PARAMETER ( EIGHT = 8.0D+0, SEVTEN = 17.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, IMAX, J, JMAX, K, KC, KK, KNC, KP, KPC, + $ KSTEP, KX, NPP + DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, D11, D12, D21, D22, R1, + $ ROWMAX, T, WK, WKM1, WKP1 +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + EXTERNAL LSAME, IDAMAX +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSPR, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSPTRF', -INFO ) + RETURN + END IF +* +* Initialize ALPHA for use in choosing pivot block size. +* + ALPHA = ( ONE+SQRT( SEVTEN ) ) / EIGHT +* + IF( UPPER ) THEN +* +* Factorize A as U*D*U' using the upper triangle of A +* +* K is the main loop index, decreasing from N to 1 in steps of +* 1 or 2 +* + K = N + KC = ( N-1 )*N / 2 + 1 + 10 CONTINUE + KNC = KC +* +* If K < 1, exit from loop +* + IF( K.LT.1 ) + $ GO TO 110 + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( AP( KC+K-1 ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.GT.1 ) THEN + IMAX = IDAMAX( K-1, AP( KC ), 1 ) + COLMAX = ABS( AP( KC+IMAX-1 ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN +* +* Column K is zero: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + ROWMAX = ZERO + JMAX = IMAX + KX = IMAX*( IMAX+1 ) / 2 + IMAX + DO 20 J = IMAX + 1, K + IF( ABS( AP( KX ) ).GT.ROWMAX ) THEN + ROWMAX = ABS( AP( KX ) ) + JMAX = J + END IF + KX = KX + J + 20 CONTINUE + KPC = ( IMAX-1 )*IMAX / 2 + 1 + IF( IMAX.GT.1 ) THEN + JMAX = IDAMAX( IMAX-1, AP( KPC ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( AP( KPC+JMAX-1 ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( AP( KPC+IMAX-1 ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX + ELSE +* +* interchange rows and columns K-1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K - KSTEP + 1 + IF( KSTEP.EQ.2 ) + $ KNC = KNC - K + 1 + IF( KP.NE.KK ) THEN +* +* Interchange rows and columns KK and KP in the leading +* submatrix A(1:k,1:k) +* + CALL DSWAP( KP-1, AP( KNC ), 1, AP( KPC ), 1 ) + KX = KPC + KP - 1 + DO 30 J = KP + 1, KK - 1 + KX = KX + J - 1 + T = AP( KNC+J-1 ) + AP( KNC+J-1 ) = AP( KX ) + AP( KX ) = T + 30 CONTINUE + T = AP( KNC+KK-1 ) + AP( KNC+KK-1 ) = AP( KPC+KP-1 ) + AP( KPC+KP-1 ) = T + IF( KSTEP.EQ.2 ) THEN + T = AP( KC+K-2 ) + AP( KC+K-2 ) = AP( KC+KP-1 ) + AP( KC+KP-1 ) = T + END IF + END IF +* +* Update the leading submatrix +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column k now holds +* +* W(k) = U(k)*D(k) +* +* where U(k) is the k-th column of U +* +* Perform a rank-1 update of A(1:k-1,1:k-1) as +* +* A := A - U(k)*D(k)*U(k)' = A - W(k)*1/D(k)*W(k)' +* + R1 = ONE / AP( KC+K-1 ) + CALL DSPR( UPLO, K-1, -R1, AP( KC ), 1, AP ) +* +* Store U(k) in column k +* + CALL DSCAL( K-1, R1, AP( KC ), 1 ) + ELSE +* +* 2-by-2 pivot block D(k): columns k and k-1 now hold +* +* ( W(k-1) W(k) ) = ( U(k-1) U(k) )*D(k) +* +* where U(k) and U(k-1) are the k-th and (k-1)-th columns +* of U +* +* Perform a rank-2 update of A(1:k-2,1:k-2) as +* +* A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )' +* = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )' +* + IF( K.GT.2 ) THEN +* + D12 = AP( K-1+( K-1 )*K / 2 ) + D22 = AP( K-1+( K-2 )*( K-1 ) / 2 ) / D12 + D11 = AP( K+( K-1 )*K / 2 ) / D12 + T = ONE / ( D11*D22-ONE ) + D12 = T / D12 +* + DO 50 J = K - 2, 1, -1 + WKM1 = D12*( D11*AP( J+( K-2 )*( K-1 ) / 2 )- + $ AP( J+( K-1 )*K / 2 ) ) + WK = D12*( D22*AP( J+( K-1 )*K / 2 )- + $ AP( J+( K-2 )*( K-1 ) / 2 ) ) + DO 40 I = J, 1, -1 + AP( I+( J-1 )*J / 2 ) = AP( I+( J-1 )*J / 2 ) - + $ AP( I+( K-1 )*K / 2 )*WK - + $ AP( I+( K-2 )*( K-1 ) / 2 )*WKM1 + 40 CONTINUE + AP( J+( K-1 )*K / 2 ) = WK + AP( J+( K-2 )*( K-1 ) / 2 ) = WKM1 + 50 CONTINUE +* + END IF +* + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K-1 ) = -KP + END IF +* +* Decrease K and return to the start of the main loop +* + K = K - KSTEP + KC = KNC - K + GO TO 10 +* + ELSE +* +* Factorize A as L*D*L' using the lower triangle of A +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2 +* + K = 1 + KC = 1 + NPP = N*( N+1 ) / 2 + 60 CONTINUE + KNC = KC +* +* If K > N, exit from loop +* + IF( K.GT.N ) + $ GO TO 110 + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( AP( KC ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.LT.N ) THEN + IMAX = K + IDAMAX( N-K, AP( KC+1 ), 1 ) + COLMAX = ABS( AP( KC+IMAX-K ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN +* +* Column K is zero: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + ROWMAX = ZERO + KX = KC + IMAX - K + DO 70 J = K, IMAX - 1 + IF( ABS( AP( KX ) ).GT.ROWMAX ) THEN + ROWMAX = ABS( AP( KX ) ) + JMAX = J + END IF + KX = KX + N - J + 70 CONTINUE + KPC = NPP - ( N-IMAX+1 )*( N-IMAX+2 ) / 2 + 1 + IF( IMAX.LT.N ) THEN + JMAX = IMAX + IDAMAX( N-IMAX, AP( KPC+1 ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( AP( KPC+JMAX-IMAX ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( AP( KPC ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX + ELSE +* +* interchange rows and columns K+1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K + KSTEP - 1 + IF( KSTEP.EQ.2 ) + $ KNC = KNC + N - K + 1 + IF( KP.NE.KK ) THEN +* +* Interchange rows and columns KK and KP in the trailing +* submatrix A(k:n,k:n) +* + IF( KP.LT.N ) + $ CALL DSWAP( N-KP, AP( KNC+KP-KK+1 ), 1, AP( KPC+1 ), + $ 1 ) + KX = KNC + KP - KK + DO 80 J = KK + 1, KP - 1 + KX = KX + N - J + 1 + T = AP( KNC+J-KK ) + AP( KNC+J-KK ) = AP( KX ) + AP( KX ) = T + 80 CONTINUE + T = AP( KNC ) + AP( KNC ) = AP( KPC ) + AP( KPC ) = T + IF( KSTEP.EQ.2 ) THEN + T = AP( KC+1 ) + AP( KC+1 ) = AP( KC+KP-K ) + AP( KC+KP-K ) = T + END IF + END IF +* +* Update the trailing submatrix +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column k now holds +* +* W(k) = L(k)*D(k) +* +* where L(k) is the k-th column of L +* + IF( K.LT.N ) THEN +* +* Perform a rank-1 update of A(k+1:n,k+1:n) as +* +* A := A - L(k)*D(k)*L(k)' = A - W(k)*(1/D(k))*W(k)' +* + R1 = ONE / AP( KC ) + CALL DSPR( UPLO, N-K, -R1, AP( KC+1 ), 1, + $ AP( KC+N-K+1 ) ) +* +* Store L(k) in column K +* + CALL DSCAL( N-K, R1, AP( KC+1 ), 1 ) + END IF + ELSE +* +* 2-by-2 pivot block D(k): columns K and K+1 now hold +* +* ( W(k) W(k+1) ) = ( L(k) L(k+1) )*D(k) +* +* where L(k) and L(k+1) are the k-th and (k+1)-th columns +* of L +* + IF( K.LT.N-1 ) THEN +* +* Perform a rank-2 update of A(k+2:n,k+2:n) as +* +* A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )' +* = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )' +* + D21 = AP( K+1+( K-1 )*( 2*N-K ) / 2 ) + D11 = AP( K+1+K*( 2*N-K-1 ) / 2 ) / D21 + D22 = AP( K+( K-1 )*( 2*N-K ) / 2 ) / D21 + T = ONE / ( D11*D22-ONE ) + D21 = T / D21 +* + DO 100 J = K + 2, N + WK = D21*( D11*AP( J+( K-1 )*( 2*N-K ) / 2 )- + $ AP( J+K*( 2*N-K-1 ) / 2 ) ) + WKP1 = D21*( D22*AP( J+K*( 2*N-K-1 ) / 2 )- + $ AP( J+( K-1 )*( 2*N-K ) / 2 ) ) +* + DO 90 I = J, N + AP( I+( J-1 )*( 2*N-J ) / 2 ) = AP( I+( J-1 )* + $ ( 2*N-J ) / 2 ) - AP( I+( K-1 )*( 2*N-K ) / + $ 2 )*WK - AP( I+K*( 2*N-K-1 ) / 2 )*WKP1 + 90 CONTINUE +* + AP( J+( K-1 )*( 2*N-K ) / 2 ) = WK + AP( J+K*( 2*N-K-1 ) / 2 ) = WKP1 +* + 100 CONTINUE + END IF + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K+1 ) = -KP + END IF +* +* Increase K and return to the start of the main loop +* + K = K + KSTEP + KC = KNC + N - K + 2 + GO TO 60 +* + END IF +* + 110 CONTINUE + RETURN +* +* End of DSPTRF +* + END diff --git a/2.3-1/src/fortran/lapack/dsteqr.f b/2.3-1/src/fortran/lapack/dsteqr.f new file mode 100644 index 00000000..0afd7957 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsteqr.f @@ -0,0 +1,500 @@ + SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPZ + INTEGER INFO, LDZ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DSTEQR computes all eigenvalues and, optionally, eigenvectors of a +* symmetric tridiagonal matrix using the implicit QL or QR method. +* The eigenvectors of a full or band symmetric matrix can also be found +* if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to +* tridiagonal form. +* +* Arguments +* ========= +* +* COMPZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only. +* = 'V': Compute eigenvalues and eigenvectors of the original +* symmetric matrix. On entry, Z must contain the +* orthogonal matrix used to reduce the original matrix +* to tridiagonal form. +* = 'I': Compute eigenvalues and eigenvectors of the +* tridiagonal matrix. Z is initialized to the identity +* matrix. +* +* N (input) INTEGER +* The order of the matrix. N >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the diagonal elements of the tridiagonal matrix. +* On exit, if INFO = 0, the eigenvalues in ascending order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N-1) +* On entry, the (n-1) subdiagonal elements of the tridiagonal +* matrix. +* On exit, E has been destroyed. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', then Z contains the orthogonal +* matrix used in the reduction to tridiagonal form. +* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the +* orthonormal eigenvectors of the original symmetric matrix, +* and if COMPZ = 'I', Z contains the orthonormal eigenvectors +* of the symmetric tridiagonal matrix. +* If COMPZ = 'N', then Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1, and if +* eigenvectors are desired, then LDZ >= max(1,N). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) +* If COMPZ = 'N', then WORK is not referenced. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm has failed to find all the eigenvalues in +* a total of 30*N iterations; if INFO = i, then i +* elements of E have not converged to zero; on exit, D +* and E contain the elements of a symmetric tridiagonal +* matrix which is orthogonally similar to the original +* matrix. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO, THREE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, + $ THREE = 3.0D0 ) + INTEGER MAXIT + PARAMETER ( MAXIT = 30 ) +* .. +* .. Local Scalars .. + INTEGER I, ICOMPZ, II, ISCALE, J, JTOT, K, L, L1, LEND, + $ LENDM1, LENDP1, LENDSV, LM1, LSV, M, MM, MM1, + $ NM1, NMAXIT + DOUBLE PRECISION ANORM, B, C, EPS, EPS2, F, G, P, R, RT1, RT2, + $ S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 + EXTERNAL LSAME, DLAMCH, DLANST, DLAPY2 +* .. +* .. External Subroutines .. + EXTERNAL DLAE2, DLAEV2, DLARTG, DLASCL, DLASET, DLASR, + $ DLASRT, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ICOMPZ = 0 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ICOMPZ = 2 + ELSE + ICOMPZ = -1 + END IF + IF( ICOMPZ.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1, + $ N ) ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSTEQR', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( N.EQ.1 ) THEN + IF( ICOMPZ.EQ.2 ) + $ Z( 1, 1 ) = ONE + RETURN + END IF +* +* Determine the unit roundoff and over/underflow thresholds. +* + EPS = DLAMCH( 'E' ) + EPS2 = EPS**2 + SAFMIN = DLAMCH( 'S' ) + SAFMAX = ONE / SAFMIN + SSFMAX = SQRT( SAFMAX ) / THREE + SSFMIN = SQRT( SAFMIN ) / EPS2 +* +* Compute the eigenvalues and eigenvectors of the tridiagonal +* matrix. +* + IF( ICOMPZ.EQ.2 ) + $ CALL DLASET( 'Full', N, N, ZERO, ONE, Z, LDZ ) +* + NMAXIT = N*MAXIT + JTOT = 0 +* +* Determine where the matrix splits and choose QL or QR iteration +* for each block, according to whether top or bottom diagonal +* element is smaller. +* + L1 = 1 + NM1 = N - 1 +* + 10 CONTINUE + IF( L1.GT.N ) + $ GO TO 160 + IF( L1.GT.1 ) + $ E( L1-1 ) = ZERO + IF( L1.LE.NM1 ) THEN + DO 20 M = L1, NM1 + TST = ABS( E( M ) ) + IF( TST.EQ.ZERO ) + $ GO TO 30 + IF( TST.LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+ + $ 1 ) ) ) )*EPS ) THEN + E( M ) = ZERO + GO TO 30 + END IF + 20 CONTINUE + END IF + M = N +* + 30 CONTINUE + L = L1 + LSV = L + LEND = M + LENDSV = LEND + L1 = M + 1 + IF( LEND.EQ.L ) + $ GO TO 10 +* +* Scale submatrix in rows and columns L to LEND +* + ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) + ISCALE = 0 + IF( ANORM.EQ.ZERO ) + $ GO TO 10 + IF( ANORM.GT.SSFMAX ) THEN + ISCALE = 1 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N, + $ INFO ) + ELSE IF( ANORM.LT.SSFMIN ) THEN + ISCALE = 2 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N, + $ INFO ) + END IF +* +* Choose between QL and QR iteration +* + IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN + LEND = LSV + L = LENDSV + END IF +* + IF( LEND.GT.L ) THEN +* +* QL Iteration +* +* Look for small subdiagonal element. +* + 40 CONTINUE + IF( L.NE.LEND ) THEN + LENDM1 = LEND - 1 + DO 50 M = L, LENDM1 + TST = ABS( E( M ) )**2 + IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M+1 ) )+ + $ SAFMIN )GO TO 60 + 50 CONTINUE + END IF +* + M = LEND +* + 60 CONTINUE + IF( M.LT.LEND ) + $ E( M ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 80 +* +* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 +* to compute its eigensystem. +* + IF( M.EQ.L+1 ) THEN + IF( ICOMPZ.GT.0 ) THEN + CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S ) + WORK( L ) = C + WORK( N-1+L ) = S + CALL DLASR( 'R', 'V', 'B', N, 2, WORK( L ), + $ WORK( N-1+L ), Z( 1, L ), LDZ ) + ELSE + CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 ) + END IF + D( L ) = RT1 + D( L+1 ) = RT2 + E( L ) = ZERO + L = L + 2 + IF( L.LE.LEND ) + $ GO TO 40 + GO TO 140 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 140 + JTOT = JTOT + 1 +* +* Form shift. +* + G = ( D( L+1 )-P ) / ( TWO*E( L ) ) + R = DLAPY2( G, ONE ) + G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) ) +* + S = ONE + C = ONE + P = ZERO +* +* Inner loop +* + MM1 = M - 1 + DO 70 I = MM1, L, -1 + F = S*E( I ) + B = C*E( I ) + CALL DLARTG( G, F, C, S, R ) + IF( I.NE.M-1 ) + $ E( I+1 ) = R + G = D( I+1 ) - P + R = ( D( I )-G )*S + TWO*C*B + P = S*R + D( I+1 ) = G + P + G = C*R - B +* +* If eigenvectors are desired, then save rotations. +* + IF( ICOMPZ.GT.0 ) THEN + WORK( I ) = C + WORK( N-1+I ) = -S + END IF +* + 70 CONTINUE +* +* If eigenvectors are desired, then apply saved rotations. +* + IF( ICOMPZ.GT.0 ) THEN + MM = M - L + 1 + CALL DLASR( 'R', 'V', 'B', N, MM, WORK( L ), WORK( N-1+L ), + $ Z( 1, L ), LDZ ) + END IF +* + D( L ) = D( L ) - P + E( L ) = G + GO TO 40 +* +* Eigenvalue found. +* + 80 CONTINUE + D( L ) = P +* + L = L + 1 + IF( L.LE.LEND ) + $ GO TO 40 + GO TO 140 +* + ELSE +* +* QR Iteration +* +* Look for small superdiagonal element. +* + 90 CONTINUE + IF( L.NE.LEND ) THEN + LENDP1 = LEND + 1 + DO 100 M = L, LENDP1, -1 + TST = ABS( E( M-1 ) )**2 + IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M-1 ) )+ + $ SAFMIN )GO TO 110 + 100 CONTINUE + END IF +* + M = LEND +* + 110 CONTINUE + IF( M.GT.LEND ) + $ E( M-1 ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 130 +* +* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 +* to compute its eigensystem. +* + IF( M.EQ.L-1 ) THEN + IF( ICOMPZ.GT.0 ) THEN + CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S ) + WORK( M ) = C + WORK( N-1+M ) = S + CALL DLASR( 'R', 'V', 'F', N, 2, WORK( M ), + $ WORK( N-1+M ), Z( 1, L-1 ), LDZ ) + ELSE + CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 ) + END IF + D( L-1 ) = RT1 + D( L ) = RT2 + E( L-1 ) = ZERO + L = L - 2 + IF( L.GE.LEND ) + $ GO TO 90 + GO TO 140 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 140 + JTOT = JTOT + 1 +* +* Form shift. +* + G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) ) + R = DLAPY2( G, ONE ) + G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) ) +* + S = ONE + C = ONE + P = ZERO +* +* Inner loop +* + LM1 = L - 1 + DO 120 I = M, LM1 + F = S*E( I ) + B = C*E( I ) + CALL DLARTG( G, F, C, S, R ) + IF( I.NE.M ) + $ E( I-1 ) = R + G = D( I ) - P + R = ( D( I+1 )-G )*S + TWO*C*B + P = S*R + D( I ) = G + P + G = C*R - B +* +* If eigenvectors are desired, then save rotations. +* + IF( ICOMPZ.GT.0 ) THEN + WORK( I ) = C + WORK( N-1+I ) = S + END IF +* + 120 CONTINUE +* +* If eigenvectors are desired, then apply saved rotations. +* + IF( ICOMPZ.GT.0 ) THEN + MM = L - M + 1 + CALL DLASR( 'R', 'V', 'F', N, MM, WORK( M ), WORK( N-1+M ), + $ Z( 1, M ), LDZ ) + END IF +* + D( L ) = D( L ) - P + E( LM1 ) = G + GO TO 90 +* +* Eigenvalue found. +* + 130 CONTINUE + D( L ) = P +* + L = L - 1 + IF( L.GE.LEND ) + $ GO TO 90 + GO TO 140 +* + END IF +* +* Undo scaling if necessary +* + 140 CONTINUE + IF( ISCALE.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) + CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV, 1, E( LSV ), + $ N, INFO ) + ELSE IF( ISCALE.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) + CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV, 1, E( LSV ), + $ N, INFO ) + END IF +* +* Check for no convergence to an eigenvalue after a total +* of N*MAXIT iterations. +* + IF( JTOT.LT.NMAXIT ) + $ GO TO 10 + DO 150 I = 1, N - 1 + IF( E( I ).NE.ZERO ) + $ INFO = INFO + 1 + 150 CONTINUE + GO TO 190 +* +* Order eigenvalues and eigenvectors. +* + 160 CONTINUE + IF( ICOMPZ.EQ.0 ) THEN +* +* Use Quick Sort +* + CALL DLASRT( 'I', N, D, INFO ) +* + ELSE +* +* Use Selection Sort to minimize swaps of eigenvectors +* + DO 180 II = 2, N + I = II - 1 + K = I + P = D( I ) + DO 170 J = II, N + IF( D( J ).LT.P ) THEN + K = J + P = D( J ) + END IF + 170 CONTINUE + IF( K.NE.I ) THEN + D( K ) = D( I ) + D( I ) = P + CALL DSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 ) + END IF + 180 CONTINUE + END IF +* + 190 CONTINUE + RETURN +* +* End of DSTEQR +* + END diff --git a/2.3-1/src/fortran/lapack/dsterf.f b/2.3-1/src/fortran/lapack/dsterf.f new file mode 100644 index 00000000..c17ea23a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsterf.f @@ -0,0 +1,364 @@ + SUBROUTINE DSTERF( N, D, E, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) +* .. +* +* Purpose +* ======= +* +* DSTERF computes all eigenvalues of a symmetric tridiagonal matrix +* using the Pal-Walker-Kahan variant of the QL or QR algorithm. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix. N >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the n diagonal elements of the tridiagonal matrix. +* On exit, if INFO = 0, the eigenvalues in ascending order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N-1) +* On entry, the (n-1) subdiagonal elements of the tridiagonal +* matrix. +* On exit, E has been destroyed. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm failed to find all of the eigenvalues in +* a total of 30*N iterations; if INFO = i, then i +* elements of E have not converged to zero. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO, THREE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, + $ THREE = 3.0D0 ) + INTEGER MAXIT + PARAMETER ( MAXIT = 30 ) +* .. +* .. Local Scalars .. + INTEGER I, ISCALE, JTOT, L, L1, LEND, LENDSV, LSV, M, + $ NMAXIT + DOUBLE PRECISION ALPHA, ANORM, BB, C, EPS, EPS2, GAMMA, OLDC, + $ OLDGAM, P, R, RT1, RT2, RTE, S, SAFMAX, SAFMIN, + $ SIGMA, SSFMAX, SSFMIN +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 + EXTERNAL DLAMCH, DLANST, DLAPY2 +* .. +* .. External Subroutines .. + EXTERNAL DLAE2, DLASCL, DLASRT, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.LT.0 ) THEN + INFO = -1 + CALL XERBLA( 'DSTERF', -INFO ) + RETURN + END IF + IF( N.LE.1 ) + $ RETURN +* +* Determine the unit roundoff for this environment. +* + EPS = DLAMCH( 'E' ) + EPS2 = EPS**2 + SAFMIN = DLAMCH( 'S' ) + SAFMAX = ONE / SAFMIN + SSFMAX = SQRT( SAFMAX ) / THREE + SSFMIN = SQRT( SAFMIN ) / EPS2 +* +* Compute the eigenvalues of the tridiagonal matrix. +* + NMAXIT = N*MAXIT + SIGMA = ZERO + JTOT = 0 +* +* Determine where the matrix splits and choose QL or QR iteration +* for each block, according to whether top or bottom diagonal +* element is smaller. +* + L1 = 1 +* + 10 CONTINUE + IF( L1.GT.N ) + $ GO TO 170 + IF( L1.GT.1 ) + $ E( L1-1 ) = ZERO + DO 20 M = L1, N - 1 + IF( ABS( E( M ) ).LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+ + $ 1 ) ) ) )*EPS ) THEN + E( M ) = ZERO + GO TO 30 + END IF + 20 CONTINUE + M = N +* + 30 CONTINUE + L = L1 + LSV = L + LEND = M + LENDSV = LEND + L1 = M + 1 + IF( LEND.EQ.L ) + $ GO TO 10 +* +* Scale submatrix in rows and columns L to LEND +* + ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) + ISCALE = 0 + IF( ANORM.GT.SSFMAX ) THEN + ISCALE = 1 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N, + $ INFO ) + ELSE IF( ANORM.LT.SSFMIN ) THEN + ISCALE = 2 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N, + $ INFO ) + END IF +* + DO 40 I = L, LEND - 1 + E( I ) = E( I )**2 + 40 CONTINUE +* +* Choose between QL and QR iteration +* + IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN + LEND = LSV + L = LENDSV + END IF +* + IF( LEND.GE.L ) THEN +* +* QL Iteration +* +* Look for small subdiagonal element. +* + 50 CONTINUE + IF( L.NE.LEND ) THEN + DO 60 M = L, LEND - 1 + IF( ABS( E( M ) ).LE.EPS2*ABS( D( M )*D( M+1 ) ) ) + $ GO TO 70 + 60 CONTINUE + END IF + M = LEND +* + 70 CONTINUE + IF( M.LT.LEND ) + $ E( M ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 90 +* +* If remaining matrix is 2 by 2, use DLAE2 to compute its +* eigenvalues. +* + IF( M.EQ.L+1 ) THEN + RTE = SQRT( E( L ) ) + CALL DLAE2( D( L ), RTE, D( L+1 ), RT1, RT2 ) + D( L ) = RT1 + D( L+1 ) = RT2 + E( L ) = ZERO + L = L + 2 + IF( L.LE.LEND ) + $ GO TO 50 + GO TO 150 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 150 + JTOT = JTOT + 1 +* +* Form shift. +* + RTE = SQRT( E( L ) ) + SIGMA = ( D( L+1 )-P ) / ( TWO*RTE ) + R = DLAPY2( SIGMA, ONE ) + SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) ) +* + C = ONE + S = ZERO + GAMMA = D( M ) - SIGMA + P = GAMMA*GAMMA +* +* Inner loop +* + DO 80 I = M - 1, L, -1 + BB = E( I ) + R = P + BB + IF( I.NE.M-1 ) + $ E( I+1 ) = S*R + OLDC = C + C = P / R + S = BB / R + OLDGAM = GAMMA + ALPHA = D( I ) + GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM + D( I+1 ) = OLDGAM + ( ALPHA-GAMMA ) + IF( C.NE.ZERO ) THEN + P = ( GAMMA*GAMMA ) / C + ELSE + P = OLDC*BB + END IF + 80 CONTINUE +* + E( L ) = S*P + D( L ) = SIGMA + GAMMA + GO TO 50 +* +* Eigenvalue found. +* + 90 CONTINUE + D( L ) = P +* + L = L + 1 + IF( L.LE.LEND ) + $ GO TO 50 + GO TO 150 +* + ELSE +* +* QR Iteration +* +* Look for small superdiagonal element. +* + 100 CONTINUE + DO 110 M = L, LEND + 1, -1 + IF( ABS( E( M-1 ) ).LE.EPS2*ABS( D( M )*D( M-1 ) ) ) + $ GO TO 120 + 110 CONTINUE + M = LEND +* + 120 CONTINUE + IF( M.GT.LEND ) + $ E( M-1 ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 140 +* +* If remaining matrix is 2 by 2, use DLAE2 to compute its +* eigenvalues. +* + IF( M.EQ.L-1 ) THEN + RTE = SQRT( E( L-1 ) ) + CALL DLAE2( D( L ), RTE, D( L-1 ), RT1, RT2 ) + D( L ) = RT1 + D( L-1 ) = RT2 + E( L-1 ) = ZERO + L = L - 2 + IF( L.GE.LEND ) + $ GO TO 100 + GO TO 150 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 150 + JTOT = JTOT + 1 +* +* Form shift. +* + RTE = SQRT( E( L-1 ) ) + SIGMA = ( D( L-1 )-P ) / ( TWO*RTE ) + R = DLAPY2( SIGMA, ONE ) + SIGMA = P - ( RTE / ( SIGMA+SIGN( R, SIGMA ) ) ) +* + C = ONE + S = ZERO + GAMMA = D( M ) - SIGMA + P = GAMMA*GAMMA +* +* Inner loop +* + DO 130 I = M, L - 1 + BB = E( I ) + R = P + BB + IF( I.NE.M ) + $ E( I-1 ) = S*R + OLDC = C + C = P / R + S = BB / R + OLDGAM = GAMMA + ALPHA = D( I+1 ) + GAMMA = C*( ALPHA-SIGMA ) - S*OLDGAM + D( I ) = OLDGAM + ( ALPHA-GAMMA ) + IF( C.NE.ZERO ) THEN + P = ( GAMMA*GAMMA ) / C + ELSE + P = OLDC*BB + END IF + 130 CONTINUE +* + E( L-1 ) = S*P + D( L ) = SIGMA + GAMMA + GO TO 100 +* +* Eigenvalue found. +* + 140 CONTINUE + D( L ) = P +* + L = L - 1 + IF( L.GE.LEND ) + $ GO TO 100 + GO TO 150 +* + END IF +* +* Undo scaling if necessary +* + 150 CONTINUE + IF( ISCALE.EQ.1 ) + $ CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) + IF( ISCALE.EQ.2 ) + $ CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) +* +* Check for no convergence to an eigenvalue after a total +* of N*MAXIT iterations. +* + IF( JTOT.LT.NMAXIT ) + $ GO TO 10 + DO 160 I = 1, N - 1 + IF( E( I ).NE.ZERO ) + $ INFO = INFO + 1 + 160 CONTINUE + GO TO 180 +* +* Sort eigenvalues in increasing order. +* + 170 CONTINUE + CALL DLASRT( 'I', N, D, INFO ) +* + 180 CONTINUE + RETURN +* +* End of DSTERF +* + END diff --git a/2.3-1/src/fortran/lapack/dsycon.f b/2.3-1/src/fortran/lapack/dsycon.f new file mode 100644 index 00000000..711b48ca --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsycon.f @@ -0,0 +1,165 @@ + SUBROUTINE DSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, + $ IWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N + DOUBLE PRECISION ANORM, RCOND +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), IWORK( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYCON estimates the reciprocal of the condition number (in the +* 1-norm) of a real symmetric matrix A using the factorization +* A = U*D*U**T or A = L*D*L**T computed by DSYTRF. +* +* An estimate is obtained for norm(inv(A)), and the reciprocal of the +* condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the details of the factorization are stored +* as an upper or lower triangular matrix. +* = 'U': Upper triangular, form is A = U*D*U**T; +* = 'L': Lower triangular, form is A = L*D*L**T. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The block diagonal matrix D and the multipliers used to +* obtain the factor U or L as computed by DSYTRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D +* as determined by DSYTRF. +* +* ANORM (input) DOUBLE PRECISION +* The 1-norm of the original matrix A. +* +* RCOND (output) DOUBLE PRECISION +* The reciprocal of the condition number of the matrix A, +* computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an +* estimate of the 1-norm of inv(A) computed in this routine. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* IWORK (workspace) INTEGER array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, KASE + DOUBLE PRECISION AINVNM +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DSYTRS, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( ANORM.LT.ZERO ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYCON', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + RCOND = ZERO + IF( N.EQ.0 ) THEN + RCOND = ONE + RETURN + ELSE IF( ANORM.LE.ZERO ) THEN + RETURN + END IF +* +* Check that the diagonal matrix D is nonsingular. +* + IF( UPPER ) THEN +* +* Upper triangular storage: examine D from bottom to top +* + DO 10 I = N, 1, -1 + IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO ) + $ RETURN + 10 CONTINUE + ELSE +* +* Lower triangular storage: examine D from top to bottom. +* + DO 20 I = 1, N + IF( IPIV( I ).GT.0 .AND. A( I, I ).EQ.ZERO ) + $ RETURN + 20 CONTINUE + END IF +* +* Estimate the 1-norm of the inverse. +* + KASE = 0 + 30 CONTINUE + CALL DLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN +* +* Multiply by inv(L*D*L') or inv(U*D*U'). +* + CALL DSYTRS( UPLO, N, 1, A, LDA, IPIV, WORK, N, INFO ) + GO TO 30 + END IF +* +* Compute the estimate of the reciprocal condition number. +* + IF( AINVNM.NE.ZERO ) + $ RCOND = ( ONE / AINVNM ) / ANORM +* + RETURN +* +* End of DSYCON +* + END diff --git a/2.3-1/src/fortran/lapack/dsyev.f b/2.3-1/src/fortran/lapack/dsyev.f new file mode 100644 index 00000000..d73600a2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsyev.f @@ -0,0 +1,211 @@ + SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBZ, UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYEV computes all eigenvalues and, optionally, eigenvectors of a +* real symmetric matrix A. +* +* Arguments +* ========= +* +* JOBZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only; +* = 'V': Compute eigenvalues and eigenvectors. +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA, N) +* On entry, the symmetric matrix A. If UPLO = 'U', the +* leading N-by-N upper triangular part of A contains the +* upper triangular part of the matrix A. If UPLO = 'L', +* the leading N-by-N lower triangular part of A contains +* the lower triangular part of the matrix A. +* On exit, if JOBZ = 'V', then if INFO = 0, A contains the +* orthonormal eigenvectors of the matrix A. +* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') +* or the upper triangle (if UPLO='U') of A, including the +* diagonal, is destroyed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* W (output) DOUBLE PRECISION array, dimension (N) +* If INFO = 0, the eigenvalues in ascending order. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,3*N-1). +* For optimal efficiency, LWORK >= (NB+2)*N, +* where NB is the blocksize for DSYTRD returned by ILAENV. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the algorithm failed to converge; i +* off-diagonal elements of an intermediate tridiagonal +* form did not converge to zero. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LOWER, LQUERY, WANTZ + INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE, + $ LLWORK, LWKOPT, NB + DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, + $ SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, DLANSY + EXTERNAL LSAME, ILAENV, DLAMCH, DLANSY +* .. +* .. External Subroutines .. + EXTERNAL DLASCL, DORGTR, DSCAL, DSTEQR, DSTERF, DSYTRD, + $ XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + WANTZ = LSAME( JOBZ, 'V' ) + LOWER = LSAME( UPLO, 'L' ) + LQUERY = ( LWORK.EQ.-1 ) +* + INFO = 0 + IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF +* + IF( INFO.EQ.0 ) THEN + NB = ILAENV( 1, 'DSYTRD', UPLO, N, -1, -1, -1 ) + LWKOPT = MAX( 1, ( NB+2 )*N ) + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, 3*N-1 ) .AND. .NOT.LQUERY ) + $ INFO = -8 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + RETURN + END IF +* + IF( N.EQ.1 ) THEN + W( 1 ) = A( 1, 1 ) + WORK( 1 ) = 2 + IF( WANTZ ) + $ A( 1, 1 ) = ONE + RETURN + END IF +* +* Get machine constants. +* + SAFMIN = DLAMCH( 'Safe minimum' ) + EPS = DLAMCH( 'Precision' ) + SMLNUM = SAFMIN / EPS + BIGNUM = ONE / SMLNUM + RMIN = SQRT( SMLNUM ) + RMAX = SQRT( BIGNUM ) +* +* Scale matrix to allowable range, if necessary. +* + ANRM = DLANSY( 'M', UPLO, N, A, LDA, WORK ) + ISCALE = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN + ISCALE = 1 + SIGMA = RMIN / ANRM + ELSE IF( ANRM.GT.RMAX ) THEN + ISCALE = 1 + SIGMA = RMAX / ANRM + END IF + IF( ISCALE.EQ.1 ) + $ CALL DLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO ) +* +* Call DSYTRD to reduce symmetric matrix to tridiagonal form. +* + INDE = 1 + INDTAU = INDE + N + INDWRK = INDTAU + N + LLWORK = LWORK - INDWRK + 1 + CALL DSYTRD( UPLO, N, A, LDA, W, WORK( INDE ), WORK( INDTAU ), + $ WORK( INDWRK ), LLWORK, IINFO ) +* +* For eigenvalues only, call DSTERF. For eigenvectors, first call +* DORGTR to generate the orthogonal matrix, then call DSTEQR. +* + IF( .NOT.WANTZ ) THEN + CALL DSTERF( N, W, WORK( INDE ), INFO ) + ELSE + CALL DORGTR( UPLO, N, A, LDA, WORK( INDTAU ), WORK( INDWRK ), + $ LLWORK, IINFO ) + CALL DSTEQR( JOBZ, N, W, WORK( INDE ), A, LDA, WORK( INDTAU ), + $ INFO ) + END IF +* +* If matrix was scaled, then rescale eigenvalues appropriately. +* + IF( ISCALE.EQ.1 ) THEN + IF( INFO.EQ.0 ) THEN + IMAX = N + ELSE + IMAX = INFO - 1 + END IF + CALL DSCAL( IMAX, ONE / SIGMA, W, 1 ) + END IF +* +* Set WORK(1) to optimal workspace size. +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DSYEV +* + END diff --git a/2.3-1/src/fortran/lapack/dsysv.f b/2.3-1/src/fortran/lapack/dsysv.f new file mode 100644 index 00000000..add53850 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsysv.f @@ -0,0 +1,174 @@ + SUBROUTINE DSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK, + $ LWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LDB, LWORK, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYSV computes the solution to a real system of linear equations +* A * X = B, +* where A is an N-by-N symmetric matrix and X and B are N-by-NRHS +* matrices. +* +* The diagonal pivoting method is used to factor A as +* A = U * D * U**T, if UPLO = 'U', or +* A = L * D * L**T, if UPLO = 'L', +* where U (or L) is a product of permutation and unit upper (lower) +* triangular matrices, and D is symmetric and block diagonal with +* 1-by-1 and 2-by-2 diagonal blocks. The factored form of A is then +* used to solve the system of equations A * X = B. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The number of linear equations, i.e., the order of the +* matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, if INFO = 0, the block diagonal matrix D and the +* multipliers used to obtain the factor U or L from the +* factorization A = U*D*U**T or A = L*D*L**T as computed by +* DSYTRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D, as +* determined by DSYTRF. If IPIV(k) > 0, then rows and columns +* k and IPIV(k) were interchanged, and D(k,k) is a 1-by-1 +* diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, +* then rows and columns k-1 and -IPIV(k) were interchanged and +* D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and +* IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and +* -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 +* diagonal block. +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the N-by-NRHS right hand side matrix B. +* On exit, if INFO = 0, the N-by-NRHS solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of WORK. LWORK >= 1, and for best performance +* LWORK >= max(1,N*NB), where NB is the optimal blocksize for +* DSYTRF. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, D(i,i) is exactly zero. The factorization +* has been completed, but the block diagonal matrix D is +* exactly singular, so the solution could not be computed. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER LWKOPT, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DSYTRF, DSYTRS, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN + INFO = -10 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 ) + LWKOPT = N*NB + END IF + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYSV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Compute the factorization A = U*D*U' or A = L*D*L'. +* + CALL DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO ) + IF( INFO.EQ.0 ) THEN +* +* Solve the system A*X = B, overwriting B with X. +* + CALL DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +* + END IF +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DSYSV +* + END diff --git a/2.3-1/src/fortran/lapack/dsytd2.f b/2.3-1/src/fortran/lapack/dsytd2.f new file mode 100644 index 00000000..c696818e --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytd2.f @@ -0,0 +1,248 @@ + SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ) +* .. +* +* Purpose +* ======= +* +* DSYTD2 reduces a real symmetric matrix A to symmetric tridiagonal +* form T by an orthogonal similarity transformation: Q' * A * Q = T. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit, if UPLO = 'U', the diagonal and first superdiagonal +* of A are overwritten by the corresponding elements of the +* tridiagonal matrix T, and the elements above the first +* superdiagonal, with the array TAU, represent the orthogonal +* matrix Q as a product of elementary reflectors; if UPLO +* = 'L', the diagonal and first subdiagonal of A are over- +* written by the corresponding elements of the tridiagonal +* matrix T, and the elements below the first subdiagonal, with +* the array TAU, represent the orthogonal matrix Q as a product +* of elementary reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* D (output) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of the tridiagonal matrix T: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* The off-diagonal elements of the tridiagonal matrix T: +* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n-1) . . . H(2) H(1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in +* A(1:i-1,i+1), and tau in TAU(i). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(n-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), +* and tau in TAU(i). +* +* The contents of A on exit are illustrated by the following examples +* with n = 5: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( d e v2 v3 v4 ) ( d ) +* ( d e v3 v4 ) ( e d ) +* ( d e v4 ) ( v1 e d ) +* ( d e ) ( v1 v2 e d ) +* ( d ) ( v1 v2 v3 e d ) +* +* where d and e denote diagonal and off-diagonal elements of T, and vi +* denotes an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO, HALF + PARAMETER ( ONE = 1.0D0, ZERO = 0.0D0, + $ HALF = 1.0D0 / 2.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I + DOUBLE PRECISION ALPHA, TAUI +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DLARFG, DSYMV, DSYR2, XERBLA +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTD2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Reduce the upper triangle of A +* + DO 10 I = N - 1, 1, -1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(1:i-1,i+1) +* + CALL DLARFG( I, A( I, I+1 ), A( 1, I+1 ), 1, TAUI ) + E( I ) = A( I, I+1 ) +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(1:i,1:i) +* + A( I, I+1 ) = ONE +* +* Compute x := tau * A * v storing x in TAU(1:i) +* + CALL DSYMV( UPLO, I, TAUI, A, LDA, A( 1, I+1 ), 1, ZERO, + $ TAU, 1 ) +* +* Compute w := x - 1/2 * tau * (x'*v) * v +* + ALPHA = -HALF*TAUI*DDOT( I, TAU, 1, A( 1, I+1 ), 1 ) + CALL DAXPY( I, ALPHA, A( 1, I+1 ), 1, TAU, 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL DSYR2( UPLO, I, -ONE, A( 1, I+1 ), 1, TAU, 1, A, + $ LDA ) +* + A( I, I+1 ) = E( I ) + END IF + D( I+1 ) = A( I+1, I+1 ) + TAU( I ) = TAUI + 10 CONTINUE + D( 1 ) = A( 1, 1 ) + ELSE +* +* Reduce the lower triangle of A +* + DO 20 I = 1, N - 1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(i+2:n,i) +* + CALL DLARFG( N-I, A( I+1, I ), A( MIN( I+2, N ), I ), 1, + $ TAUI ) + E( I ) = A( I+1, I ) +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(i+1:n,i+1:n) +* + A( I+1, I ) = ONE +* +* Compute x := tau * A * v storing y in TAU(i:n-1) +* + CALL DSYMV( UPLO, N-I, TAUI, A( I+1, I+1 ), LDA, + $ A( I+1, I ), 1, ZERO, TAU( I ), 1 ) +* +* Compute w := x - 1/2 * tau * (x'*v) * v +* + ALPHA = -HALF*TAUI*DDOT( N-I, TAU( I ), 1, A( I+1, I ), + $ 1 ) + CALL DAXPY( N-I, ALPHA, A( I+1, I ), 1, TAU( I ), 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL DSYR2( UPLO, N-I, -ONE, A( I+1, I ), 1, TAU( I ), 1, + $ A( I+1, I+1 ), LDA ) +* + A( I+1, I ) = E( I ) + END IF + D( I ) = A( I, I ) + TAU( I ) = TAUI + 20 CONTINUE + D( N ) = A( N, N ) + END IF +* + RETURN +* +* End of DSYTD2 +* + END diff --git a/2.3-1/src/fortran/lapack/dsytf2.f b/2.3-1/src/fortran/lapack/dsytf2.f new file mode 100644 index 00000000..d5234625 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytf2.f @@ -0,0 +1,521 @@ + SUBROUTINE DSYTF2( UPLO, N, A, LDA, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DSYTF2 computes the factorization of a real symmetric matrix A using +* the Bunch-Kaufman diagonal pivoting method: +* +* A = U*D*U' or A = L*D*L' +* +* where U (or L) is a product of permutation and unit upper (lower) +* triangular matrices, U' is the transpose of U, and D is symmetric and +* block diagonal with 1-by-1 and 2-by-2 diagonal blocks. +* +* This is the unblocked version of the algorithm, calling Level 2 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* symmetric matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, the block diagonal matrix D and the multipliers used +* to obtain the factor U or L (see below for further details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D. +* If IPIV(k) > 0, then rows and columns k and IPIV(k) were +* interchanged and D(k,k) is a 1-by-1 diagonal block. +* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and +* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) +* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = +* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were +* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* > 0: if INFO = k, D(k,k) is exactly zero. The factorization +* has been completed, but the block diagonal matrix D is +* exactly singular, and division by zero will occur if it +* is used to solve a system of equations. +* +* Further Details +* =============== +* +* 09-29-06 - patch from +* Bobby Cheng, MathWorks +* +* Replace l.204 and l.372 +* IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN +* by +* IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN +* +* 01-01-96 - Based on modifications by +* J. Lewis, Boeing Computer Services Company +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* 1-96 - Based on modifications by J. Lewis, Boeing Computer Services +* Company +* +* If UPLO = 'U', then A = U*D*U', where +* U = P(n)*U(n)* ... *P(k)U(k)* ..., +* i.e., U is a product of terms P(k)*U(k), where k decreases from n to +* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I v 0 ) k-s +* U(k) = ( 0 I 0 ) s +* ( 0 0 I ) n-k +* k-s s n-k +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). +* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), +* and A(k,k), and v overwrites A(1:k-2,k-1:k). +* +* If UPLO = 'L', then A = L*D*L', where +* L = P(1)*L(1)* ... *P(k)*L(k)* ..., +* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to +* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I 0 0 ) k-1 +* L(k) = ( 0 I 0 ) s +* ( 0 v I ) n-k-s+1 +* k-1 s n-k-s+1 +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). +* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), +* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION EIGHT, SEVTEN + PARAMETER ( EIGHT = 8.0D+0, SEVTEN = 17.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I, IMAX, J, JMAX, K, KK, KP, KSTEP + DOUBLE PRECISION ABSAKK, ALPHA, COLMAX, D11, D12, D21, D22, R1, + $ ROWMAX, T, WK, WKM1, WKP1 +* .. +* .. External Functions .. + LOGICAL LSAME, DISNAN + INTEGER IDAMAX + EXTERNAL LSAME, IDAMAX, DISNAN +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSWAP, DSYR, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTF2', -INFO ) + RETURN + END IF +* +* Initialize ALPHA for use in choosing pivot block size. +* + ALPHA = ( ONE+SQRT( SEVTEN ) ) / EIGHT +* + IF( UPPER ) THEN +* +* Factorize A as U*D*U' using the upper triangle of A +* +* K is the main loop index, decreasing from N to 1 in steps of +* 1 or 2 +* + K = N + 10 CONTINUE +* +* If K < 1, exit from loop +* + IF( K.LT.1 ) + $ GO TO 70 + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( A( K, K ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.GT.1 ) THEN + IMAX = IDAMAX( K-1, A( 1, K ), 1 ) + COLMAX = ABS( A( IMAX, K ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN +* +* Column K is zero or contains a NaN: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + JMAX = IMAX + IDAMAX( K-IMAX, A( IMAX, IMAX+1 ), LDA ) + ROWMAX = ABS( A( IMAX, JMAX ) ) + IF( IMAX.GT.1 ) THEN + JMAX = IDAMAX( IMAX-1, A( 1, IMAX ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( A( JMAX, IMAX ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( A( IMAX, IMAX ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX + ELSE +* +* interchange rows and columns K-1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K - KSTEP + 1 + IF( KP.NE.KK ) THEN +* +* Interchange rows and columns KK and KP in the leading +* submatrix A(1:k,1:k) +* + CALL DSWAP( KP-1, A( 1, KK ), 1, A( 1, KP ), 1 ) + CALL DSWAP( KK-KP-1, A( KP+1, KK ), 1, A( KP, KP+1 ), + $ LDA ) + T = A( KK, KK ) + A( KK, KK ) = A( KP, KP ) + A( KP, KP ) = T + IF( KSTEP.EQ.2 ) THEN + T = A( K-1, K ) + A( K-1, K ) = A( KP, K ) + A( KP, K ) = T + END IF + END IF +* +* Update the leading submatrix +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column k now holds +* +* W(k) = U(k)*D(k) +* +* where U(k) is the k-th column of U +* +* Perform a rank-1 update of A(1:k-1,1:k-1) as +* +* A := A - U(k)*D(k)*U(k)' = A - W(k)*1/D(k)*W(k)' +* + R1 = ONE / A( K, K ) + CALL DSYR( UPLO, K-1, -R1, A( 1, K ), 1, A, LDA ) +* +* Store U(k) in column k +* + CALL DSCAL( K-1, R1, A( 1, K ), 1 ) + ELSE +* +* 2-by-2 pivot block D(k): columns k and k-1 now hold +* +* ( W(k-1) W(k) ) = ( U(k-1) U(k) )*D(k) +* +* where U(k) and U(k-1) are the k-th and (k-1)-th columns +* of U +* +* Perform a rank-2 update of A(1:k-2,1:k-2) as +* +* A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )' +* = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )' +* + IF( K.GT.2 ) THEN +* + D12 = A( K-1, K ) + D22 = A( K-1, K-1 ) / D12 + D11 = A( K, K ) / D12 + T = ONE / ( D11*D22-ONE ) + D12 = T / D12 +* + DO 30 J = K - 2, 1, -1 + WKM1 = D12*( D11*A( J, K-1 )-A( J, K ) ) + WK = D12*( D22*A( J, K )-A( J, K-1 ) ) + DO 20 I = J, 1, -1 + A( I, J ) = A( I, J ) - A( I, K )*WK - + $ A( I, K-1 )*WKM1 + 20 CONTINUE + A( J, K ) = WK + A( J, K-1 ) = WKM1 + 30 CONTINUE +* + END IF +* + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K-1 ) = -KP + END IF +* +* Decrease K and return to the start of the main loop +* + K = K - KSTEP + GO TO 10 +* + ELSE +* +* Factorize A as L*D*L' using the lower triangle of A +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2 +* + K = 1 + 40 CONTINUE +* +* If K > N, exit from loop +* + IF( K.GT.N ) + $ GO TO 70 + KSTEP = 1 +* +* Determine rows and columns to be interchanged and whether +* a 1-by-1 or 2-by-2 pivot block will be used +* + ABSAKK = ABS( A( K, K ) ) +* +* IMAX is the row-index of the largest off-diagonal element in +* column K, and COLMAX is its absolute value +* + IF( K.LT.N ) THEN + IMAX = K + IDAMAX( N-K, A( K+1, K ), 1 ) + COLMAX = ABS( A( IMAX, K ) ) + ELSE + COLMAX = ZERO + END IF +* + IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN +* +* Column K is zero or contains a NaN: set INFO and continue +* + IF( INFO.EQ.0 ) + $ INFO = K + KP = K + ELSE + IF( ABSAKK.GE.ALPHA*COLMAX ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE +* +* JMAX is the column-index of the largest off-diagonal +* element in row IMAX, and ROWMAX is its absolute value +* + JMAX = K - 1 + IDAMAX( IMAX-K, A( IMAX, K ), LDA ) + ROWMAX = ABS( A( IMAX, JMAX ) ) + IF( IMAX.LT.N ) THEN + JMAX = IMAX + IDAMAX( N-IMAX, A( IMAX+1, IMAX ), 1 ) + ROWMAX = MAX( ROWMAX, ABS( A( JMAX, IMAX ) ) ) + END IF +* + IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN +* +* no interchange, use 1-by-1 pivot block +* + KP = K + ELSE IF( ABS( A( IMAX, IMAX ) ).GE.ALPHA*ROWMAX ) THEN +* +* interchange rows and columns K and IMAX, use 1-by-1 +* pivot block +* + KP = IMAX + ELSE +* +* interchange rows and columns K+1 and IMAX, use 2-by-2 +* pivot block +* + KP = IMAX + KSTEP = 2 + END IF + END IF +* + KK = K + KSTEP - 1 + IF( KP.NE.KK ) THEN +* +* Interchange rows and columns KK and KP in the trailing +* submatrix A(k:n,k:n) +* + IF( KP.LT.N ) + $ CALL DSWAP( N-KP, A( KP+1, KK ), 1, A( KP+1, KP ), 1 ) + CALL DSWAP( KP-KK-1, A( KK+1, KK ), 1, A( KP, KK+1 ), + $ LDA ) + T = A( KK, KK ) + A( KK, KK ) = A( KP, KP ) + A( KP, KP ) = T + IF( KSTEP.EQ.2 ) THEN + T = A( K+1, K ) + A( K+1, K ) = A( KP, K ) + A( KP, K ) = T + END IF + END IF +* +* Update the trailing submatrix +* + IF( KSTEP.EQ.1 ) THEN +* +* 1-by-1 pivot block D(k): column k now holds +* +* W(k) = L(k)*D(k) +* +* where L(k) is the k-th column of L +* + IF( K.LT.N ) THEN +* +* Perform a rank-1 update of A(k+1:n,k+1:n) as +* +* A := A - L(k)*D(k)*L(k)' = A - W(k)*(1/D(k))*W(k)' +* + D11 = ONE / A( K, K ) + CALL DSYR( UPLO, N-K, -D11, A( K+1, K ), 1, + $ A( K+1, K+1 ), LDA ) +* +* Store L(k) in column K +* + CALL DSCAL( N-K, D11, A( K+1, K ), 1 ) + END IF + ELSE +* +* 2-by-2 pivot block D(k) +* + IF( K.LT.N-1 ) THEN +* +* Perform a rank-2 update of A(k+2:n,k+2:n) as +* +* A := A - ( (A(k) A(k+1))*D(k)**(-1) ) * (A(k) A(k+1))' +* +* where L(k) and L(k+1) are the k-th and (k+1)-th +* columns of L +* + D21 = A( K+1, K ) + D11 = A( K+1, K+1 ) / D21 + D22 = A( K, K ) / D21 + T = ONE / ( D11*D22-ONE ) + D21 = T / D21 +* + DO 60 J = K + 2, N +* + WK = D21*( D11*A( J, K )-A( J, K+1 ) ) + WKP1 = D21*( D22*A( J, K+1 )-A( J, K ) ) +* + DO 50 I = J, N + A( I, J ) = A( I, J ) - A( I, K )*WK - + $ A( I, K+1 )*WKP1 + 50 CONTINUE +* + A( J, K ) = WK + A( J, K+1 ) = WKP1 +* + 60 CONTINUE + END IF + END IF + END IF +* +* Store details of the interchanges in IPIV +* + IF( KSTEP.EQ.1 ) THEN + IPIV( K ) = KP + ELSE + IPIV( K ) = -KP + IPIV( K+1 ) = -KP + END IF +* +* Increase K and return to the start of the main loop +* + K = K + KSTEP + GO TO 40 +* + END IF +* + 70 CONTINUE +* + RETURN +* +* End of DSYTF2 +* + END diff --git a/2.3-1/src/fortran/lapack/dsytrd.f b/2.3-1/src/fortran/lapack/dsytrd.f new file mode 100644 index 00000000..569ee35b --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytrd.f @@ -0,0 +1,294 @@ + SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYTRD reduces a real symmetric matrix A to real symmetric +* tridiagonal form T by an orthogonal similarity transformation: +* Q**T * A * Q = T. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit, if UPLO = 'U', the diagonal and first superdiagonal +* of A are overwritten by the corresponding elements of the +* tridiagonal matrix T, and the elements above the first +* superdiagonal, with the array TAU, represent the orthogonal +* matrix Q as a product of elementary reflectors; if UPLO +* = 'L', the diagonal and first subdiagonal of A are over- +* written by the corresponding elements of the tridiagonal +* matrix T, and the elements below the first subdiagonal, with +* the array TAU, represent the orthogonal matrix Q as a product +* of elementary reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* D (output) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of the tridiagonal matrix T: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* The off-diagonal elements of the tridiagonal matrix T: +* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. +* +* TAU (output) DOUBLE PRECISION array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 1. +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n-1) . . . H(2) H(1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in +* A(1:i-1,i+1), and tau in TAU(i). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(n-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real scalar, and v is a real vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), +* and tau in TAU(i). +* +* The contents of A on exit are illustrated by the following examples +* with n = 5: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( d e v2 v3 v4 ) ( d ) +* ( d e v3 v4 ) ( e d ) +* ( d e v4 ) ( v1 e d ) +* ( d e ) ( v1 v2 e d ) +* ( d ) ( v1 v2 v3 e d ) +* +* where d and e denote diagonal and off-diagonal elements of T, and vi +* denotes an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, UPPER + INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLATRD, DSYR2K, DSYTD2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN + INFO = -9 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. +* + NB = ILAENV( 1, 'DSYTRD', UPLO, N, -1, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NX = N + IWS = 1 + IF( NB.GT.1 .AND. NB.LT.N ) THEN +* +* Determine when to cross over from blocked to unblocked code +* (last block is always handled by unblocked code). +* + NX = MAX( NB, ILAENV( 3, 'DSYTRD', UPLO, N, -1, -1, -1 ) ) + IF( NX.LT.N ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: determine the +* minimum value of NB, and reduce NB or force use of +* unblocked code by setting NX = N. +* + NB = MAX( LWORK / LDWORK, 1 ) + NBMIN = ILAENV( 2, 'DSYTRD', UPLO, N, -1, -1, -1 ) + IF( NB.LT.NBMIN ) + $ NX = N + END IF + ELSE + NX = N + END IF + ELSE + NB = 1 + END IF +* + IF( UPPER ) THEN +* +* Reduce the upper triangle of A. +* Columns 1:kk are handled by the unblocked method. +* + KK = N - ( ( N-NX+NB-1 ) / NB )*NB + DO 20 I = N - NB + 1, KK + 1, -NB +* +* Reduce columns i:i+nb-1 to tridiagonal form and form the +* matrix W which is needed to update the unreduced part of +* the matrix +* + CALL DLATRD( UPLO, I+NB-1, NB, A, LDA, E, TAU, WORK, + $ LDWORK ) +* +* Update the unreduced submatrix A(1:i-1,1:i-1), using an +* update of the form: A := A - V*W' - W*V' +* + CALL DSYR2K( UPLO, 'No transpose', I-1, NB, -ONE, A( 1, I ), + $ LDA, WORK, LDWORK, ONE, A, LDA ) +* +* Copy superdiagonal elements back into A, and diagonal +* elements into D +* + DO 10 J = I, I + NB - 1 + A( J-1, J ) = E( J-1 ) + D( J ) = A( J, J ) + 10 CONTINUE + 20 CONTINUE +* +* Use unblocked code to reduce the last or only block +* + CALL DSYTD2( UPLO, KK, A, LDA, D, E, TAU, IINFO ) + ELSE +* +* Reduce the lower triangle of A +* + DO 40 I = 1, N - NX, NB +* +* Reduce columns i:i+nb-1 to tridiagonal form and form the +* matrix W which is needed to update the unreduced part of +* the matrix +* + CALL DLATRD( UPLO, N-I+1, NB, A( I, I ), LDA, E( I ), + $ TAU( I ), WORK, LDWORK ) +* +* Update the unreduced submatrix A(i+ib:n,i+ib:n), using +* an update of the form: A := A - V*W' - W*V' +* + CALL DSYR2K( UPLO, 'No transpose', N-I-NB+1, NB, -ONE, + $ A( I+NB, I ), LDA, WORK( NB+1 ), LDWORK, ONE, + $ A( I+NB, I+NB ), LDA ) +* +* Copy subdiagonal elements back into A, and diagonal +* elements into D +* + DO 30 J = I, I + NB - 1 + A( J+1, J ) = E( J ) + D( J ) = A( J, J ) + 30 CONTINUE + 40 CONTINUE +* +* Use unblocked code to reduce the last or only block +* + CALL DSYTD2( UPLO, N-I+1, A( I, I ), LDA, D( I ), E( I ), + $ TAU( I ), IINFO ) + END IF +* + WORK( 1 ) = LWKOPT + RETURN +* +* End of DSYTRD +* + END diff --git a/2.3-1/src/fortran/lapack/dsytrf.f b/2.3-1/src/fortran/lapack/dsytrf.f new file mode 100644 index 00000000..43a31248 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytrf.f @@ -0,0 +1,287 @@ + SUBROUTINE DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYTRF computes the factorization of a real symmetric matrix A using +* the Bunch-Kaufman diagonal pivoting method. The form of the +* factorization is +* +* A = U*D*U**T or A = L*D*L**T +* +* where U (or L) is a product of permutation and unit upper (lower) +* triangular matrices, and D is symmetric and block diagonal with +* 1-by-1 and 2-by-2 diagonal blocks. +* +* This is the blocked version of the algorithm, calling Level 3 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the symmetric matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, the block diagonal matrix D and the multipliers used +* to obtain the factor U or L (see below for further details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (output) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D. +* If IPIV(k) > 0, then rows and columns k and IPIV(k) were +* interchanged and D(k,k) is a 1-by-1 diagonal block. +* If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and +* columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) +* is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = +* IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were +* interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of WORK. LWORK >=1. For best performance +* LWORK >= N*NB, where NB is the block size returned by ILAENV. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, D(i,i) is exactly zero. The factorization +* has been completed, but the block diagonal matrix D is +* exactly singular, and division by zero will occur if it +* is used to solve a system of equations. +* +* Further Details +* =============== +* +* If UPLO = 'U', then A = U*D*U', where +* U = P(n)*U(n)* ... *P(k)U(k)* ..., +* i.e., U is a product of terms P(k)*U(k), where k decreases from n to +* 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and U(k) is a unit upper triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I v 0 ) k-s +* U(k) = ( 0 I 0 ) s +* ( 0 0 I ) n-k +* k-s s n-k +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). +* If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), +* and A(k,k), and v overwrites A(1:k-2,k-1:k). +* +* If UPLO = 'L', then A = L*D*L', where +* L = P(1)*L(1)* ... *P(k)*L(k)* ..., +* i.e., L is a product of terms P(k)*L(k), where k increases from 1 to +* n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 +* and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as +* defined by IPIV(k), and L(k) is a unit lower triangular matrix, such +* that if the diagonal block D(k) is of order s (s = 1 or 2), then +* +* ( I 0 0 ) k-1 +* L(k) = ( 0 I 0 ) s +* ( 0 v I ) n-k-s+1 +* k-1 s n-k-s+1 +* +* If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). +* If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), +* and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY, UPPER + INTEGER IINFO, IWS, J, K, KB, LDWORK, LWKOPT, NB, NBMIN +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLASYF, DSYTF2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size +* + NB = ILAENV( 1, 'DSYTRF', UPLO, N, -1, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTRF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* + NBMIN = 2 + LDWORK = N + IF( NB.GT.1 .AND. NB.LT.N ) THEN + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN + NB = MAX( LWORK / LDWORK, 1 ) + NBMIN = MAX( 2, ILAENV( 2, 'DSYTRF', UPLO, N, -1, -1, -1 ) ) + END IF + ELSE + IWS = 1 + END IF + IF( NB.LT.NBMIN ) + $ NB = N +* + IF( UPPER ) THEN +* +* Factorize A as U*D*U' using the upper triangle of A +* +* K is the main loop index, decreasing from N to 1 in steps of +* KB, where KB is the number of columns factorized by DLASYF; +* KB is either NB or NB-1, or K for the last block +* + K = N + 10 CONTINUE +* +* If K < 1, exit from loop +* + IF( K.LT.1 ) + $ GO TO 40 +* + IF( K.GT.NB ) THEN +* +* Factorize columns k-kb+1:k of A and use blocked code to +* update columns 1:k-kb +* + CALL DLASYF( UPLO, K, NB, KB, A, LDA, IPIV, WORK, LDWORK, + $ IINFO ) + ELSE +* +* Use unblocked code to factorize columns 1:k of A +* + CALL DSYTF2( UPLO, K, A, LDA, IPIV, IINFO ) + KB = K + END IF +* +* Set INFO on the first occurrence of a zero pivot +* + IF( INFO.EQ.0 .AND. IINFO.GT.0 ) + $ INFO = IINFO +* +* Decrease K and return to the start of the main loop +* + K = K - KB + GO TO 10 +* + ELSE +* +* Factorize A as L*D*L' using the lower triangle of A +* +* K is the main loop index, increasing from 1 to N in steps of +* KB, where KB is the number of columns factorized by DLASYF; +* KB is either NB or NB-1, or N-K+1 for the last block +* + K = 1 + 20 CONTINUE +* +* If K > N, exit from loop +* + IF( K.GT.N ) + $ GO TO 40 +* + IF( K.LE.N-NB ) THEN +* +* Factorize columns k:k+kb-1 of A and use blocked code to +* update columns k+kb:n +* + CALL DLASYF( UPLO, N-K+1, NB, KB, A( K, K ), LDA, IPIV( K ), + $ WORK, LDWORK, IINFO ) + ELSE +* +* Use unblocked code to factorize columns k:n of A +* + CALL DSYTF2( UPLO, N-K+1, A( K, K ), LDA, IPIV( K ), IINFO ) + KB = N - K + 1 + END IF +* +* Set INFO on the first occurrence of a zero pivot +* + IF( INFO.EQ.0 .AND. IINFO.GT.0 ) + $ INFO = IINFO + K - 1 +* +* Adjust IPIV +* + DO 30 J = K, K + KB - 1 + IF( IPIV( J ).GT.0 ) THEN + IPIV( J ) = IPIV( J ) + K - 1 + ELSE + IPIV( J ) = IPIV( J ) - K + 1 + END IF + 30 CONTINUE +* +* Increase K and return to the start of the main loop +* + K = K + KB + GO TO 20 +* + END IF +* + 40 CONTINUE + WORK( 1 ) = LWKOPT + RETURN +* +* End of DSYTRF +* + END diff --git a/2.3-1/src/fortran/lapack/dsytri.f b/2.3-1/src/fortran/lapack/dsytri.f new file mode 100644 index 00000000..361de9a3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytri.f @@ -0,0 +1,312 @@ + SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DSYTRI computes the inverse of a real symmetric indefinite matrix +* A using the factorization A = U*D*U**T or A = L*D*L**T computed by +* DSYTRF. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the details of the factorization are stored +* as an upper or lower triangular matrix. +* = 'U': Upper triangular, form is A = U*D*U**T; +* = 'L': Lower triangular, form is A = L*D*L**T. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the block diagonal matrix D and the multipliers +* used to obtain the factor U or L as computed by DSYTRF. +* +* On exit, if INFO = 0, the (symmetric) inverse of the original +* matrix. If UPLO = 'U', the upper triangular part of the +* inverse is formed and the part of A below the diagonal is not +* referenced; if UPLO = 'L' the lower triangular part of the +* inverse is formed and the part of A above the diagonal is +* not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D +* as determined by DSYTRF. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its +* inverse could not be computed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER K, KP, KSTEP + DOUBLE PRECISION AK, AKKP1, AKP1, D, T, TEMP +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT + EXTERNAL LSAME, DDOT +* .. +* .. External Subroutines .. + EXTERNAL DCOPY, DSWAP, DSYMV, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTRI', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Check that the diagonal matrix D is nonsingular. +* + IF( UPPER ) THEN +* +* Upper triangular storage: examine D from bottom to top +* + DO 10 INFO = N, 1, -1 + IF( IPIV( INFO ).GT.0 .AND. A( INFO, INFO ).EQ.ZERO ) + $ RETURN + 10 CONTINUE + ELSE +* +* Lower triangular storage: examine D from top to bottom. +* + DO 20 INFO = 1, N + IF( IPIV( INFO ).GT.0 .AND. A( INFO, INFO ).EQ.ZERO ) + $ RETURN + 20 CONTINUE + END IF + INFO = 0 +* + IF( UPPER ) THEN +* +* Compute inv(A) from the factorization A = U*D*U'. +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = 1 + 30 CONTINUE +* +* If K > N, exit from loop. +* + IF( K.GT.N ) + $ GO TO 40 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Invert the diagonal block. +* + A( K, K ) = ONE / A( K, K ) +* +* Compute column K of the inverse. +* + IF( K.GT.1 ) THEN + CALL DCOPY( K-1, A( 1, K ), 1, WORK, 1 ) + CALL DSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO, + $ A( 1, K ), 1 ) + A( K, K ) = A( K, K ) - DDOT( K-1, WORK, 1, A( 1, K ), + $ 1 ) + END IF + KSTEP = 1 + ELSE +* +* 2 x 2 diagonal block +* +* Invert the diagonal block. +* + T = ABS( A( K, K+1 ) ) + AK = A( K, K ) / T + AKP1 = A( K+1, K+1 ) / T + AKKP1 = A( K, K+1 ) / T + D = T*( AK*AKP1-ONE ) + A( K, K ) = AKP1 / D + A( K+1, K+1 ) = AK / D + A( K, K+1 ) = -AKKP1 / D +* +* Compute columns K and K+1 of the inverse. +* + IF( K.GT.1 ) THEN + CALL DCOPY( K-1, A( 1, K ), 1, WORK, 1 ) + CALL DSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO, + $ A( 1, K ), 1 ) + A( K, K ) = A( K, K ) - DDOT( K-1, WORK, 1, A( 1, K ), + $ 1 ) + A( K, K+1 ) = A( K, K+1 ) - + $ DDOT( K-1, A( 1, K ), 1, A( 1, K+1 ), 1 ) + CALL DCOPY( K-1, A( 1, K+1 ), 1, WORK, 1 ) + CALL DSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO, + $ A( 1, K+1 ), 1 ) + A( K+1, K+1 ) = A( K+1, K+1 ) - + $ DDOT( K-1, WORK, 1, A( 1, K+1 ), 1 ) + END IF + KSTEP = 2 + END IF +* + KP = ABS( IPIV( K ) ) + IF( KP.NE.K ) THEN +* +* Interchange rows and columns K and KP in the leading +* submatrix A(1:k+1,1:k+1) +* + CALL DSWAP( KP-1, A( 1, K ), 1, A( 1, KP ), 1 ) + CALL DSWAP( K-KP-1, A( KP+1, K ), 1, A( KP, KP+1 ), LDA ) + TEMP = A( K, K ) + A( K, K ) = A( KP, KP ) + A( KP, KP ) = TEMP + IF( KSTEP.EQ.2 ) THEN + TEMP = A( K, K+1 ) + A( K, K+1 ) = A( KP, K+1 ) + A( KP, K+1 ) = TEMP + END IF + END IF +* + K = K + KSTEP + GO TO 30 + 40 CONTINUE +* + ELSE +* +* Compute inv(A) from the factorization A = L*D*L'. +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = N + 50 CONTINUE +* +* If K < 1, exit from loop. +* + IF( K.LT.1 ) + $ GO TO 60 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Invert the diagonal block. +* + A( K, K ) = ONE / A( K, K ) +* +* Compute column K of the inverse. +* + IF( K.LT.N ) THEN + CALL DCOPY( N-K, A( K+1, K ), 1, WORK, 1 ) + CALL DSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1, + $ ZERO, A( K+1, K ), 1 ) + A( K, K ) = A( K, K ) - DDOT( N-K, WORK, 1, A( K+1, K ), + $ 1 ) + END IF + KSTEP = 1 + ELSE +* +* 2 x 2 diagonal block +* +* Invert the diagonal block. +* + T = ABS( A( K, K-1 ) ) + AK = A( K-1, K-1 ) / T + AKP1 = A( K, K ) / T + AKKP1 = A( K, K-1 ) / T + D = T*( AK*AKP1-ONE ) + A( K-1, K-1 ) = AKP1 / D + A( K, K ) = AK / D + A( K, K-1 ) = -AKKP1 / D +* +* Compute columns K-1 and K of the inverse. +* + IF( K.LT.N ) THEN + CALL DCOPY( N-K, A( K+1, K ), 1, WORK, 1 ) + CALL DSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1, + $ ZERO, A( K+1, K ), 1 ) + A( K, K ) = A( K, K ) - DDOT( N-K, WORK, 1, A( K+1, K ), + $ 1 ) + A( K, K-1 ) = A( K, K-1 ) - + $ DDOT( N-K, A( K+1, K ), 1, A( K+1, K-1 ), + $ 1 ) + CALL DCOPY( N-K, A( K+1, K-1 ), 1, WORK, 1 ) + CALL DSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1, + $ ZERO, A( K+1, K-1 ), 1 ) + A( K-1, K-1 ) = A( K-1, K-1 ) - + $ DDOT( N-K, WORK, 1, A( K+1, K-1 ), 1 ) + END IF + KSTEP = 2 + END IF +* + KP = ABS( IPIV( K ) ) + IF( KP.NE.K ) THEN +* +* Interchange rows and columns K and KP in the trailing +* submatrix A(k-1:n,k-1:n) +* + IF( KP.LT.N ) + $ CALL DSWAP( N-KP, A( KP+1, K ), 1, A( KP+1, KP ), 1 ) + CALL DSWAP( KP-K-1, A( K+1, K ), 1, A( KP, K+1 ), LDA ) + TEMP = A( K, K ) + A( K, K ) = A( KP, KP ) + A( KP, KP ) = TEMP + IF( KSTEP.EQ.2 ) THEN + TEMP = A( K, K-1 ) + A( K, K-1 ) = A( KP, K-1 ) + A( KP, K-1 ) = TEMP + END IF + END IF +* + K = K - KSTEP + GO TO 50 + 60 CONTINUE + END IF +* + RETURN +* +* End of DSYTRI +* + END diff --git a/2.3-1/src/fortran/lapack/dsytrs.f b/2.3-1/src/fortran/lapack/dsytrs.f new file mode 100644 index 00000000..163ed5b9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dsytrs.f @@ -0,0 +1,369 @@ + SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DSYTRS solves a system of linear equations A*X = B with a real +* symmetric matrix A using the factorization A = U*D*U**T or +* A = L*D*L**T computed by DSYTRF. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the details of the factorization are stored +* as an upper or lower triangular matrix. +* = 'U': Upper triangular, form is A = U*D*U**T; +* = 'L': Lower triangular, form is A = L*D*L**T. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The block diagonal matrix D and the multipliers used to +* obtain the factor U or L as computed by DSYTRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* Details of the interchanges and the block structure of D +* as determined by DSYTRF. +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the right hand side matrix B. +* On exit, the solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J, K, KP + DOUBLE PRECISION AK, AKM1, AKM1K, BK, BKM1, DENOM +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DGER, DSCAL, DSWAP, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DSYTRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. NRHS.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Solve A*X = B, where A = U*D*U'. +* +* First solve U*D*X = B, overwriting B with X. +* +* K is the main loop index, decreasing from N to 1 in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = N + 10 CONTINUE +* +* If K < 1, exit from loop. +* + IF( K.LT.1 ) + $ GO TO 30 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Interchange rows K and IPIV(K). +* + KP = IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) +* +* Multiply by inv(U(K)), where U(K) is the transformation +* stored in column K of A. +* + CALL DGER( K-1, NRHS, -ONE, A( 1, K ), 1, B( K, 1 ), LDB, + $ B( 1, 1 ), LDB ) +* +* Multiply by the inverse of the diagonal block. +* + CALL DSCAL( NRHS, ONE / A( K, K ), B( K, 1 ), LDB ) + K = K - 1 + ELSE +* +* 2 x 2 diagonal block +* +* Interchange rows K-1 and -IPIV(K). +* + KP = -IPIV( K ) + IF( KP.NE.K-1 ) + $ CALL DSWAP( NRHS, B( K-1, 1 ), LDB, B( KP, 1 ), LDB ) +* +* Multiply by inv(U(K)), where U(K) is the transformation +* stored in columns K-1 and K of A. +* + CALL DGER( K-2, NRHS, -ONE, A( 1, K ), 1, B( K, 1 ), LDB, + $ B( 1, 1 ), LDB ) + CALL DGER( K-2, NRHS, -ONE, A( 1, K-1 ), 1, B( K-1, 1 ), + $ LDB, B( 1, 1 ), LDB ) +* +* Multiply by the inverse of the diagonal block. +* + AKM1K = A( K-1, K ) + AKM1 = A( K-1, K-1 ) / AKM1K + AK = A( K, K ) / AKM1K + DENOM = AKM1*AK - ONE + DO 20 J = 1, NRHS + BKM1 = B( K-1, J ) / AKM1K + BK = B( K, J ) / AKM1K + B( K-1, J ) = ( AK*BKM1-BK ) / DENOM + B( K, J ) = ( AKM1*BK-BKM1 ) / DENOM + 20 CONTINUE + K = K - 2 + END IF +* + GO TO 10 + 30 CONTINUE +* +* Next solve U'*X = B, overwriting B with X. +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = 1 + 40 CONTINUE +* +* If K > N, exit from loop. +* + IF( K.GT.N ) + $ GO TO 50 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Multiply by inv(U'(K)), where U(K) is the transformation +* stored in column K of A. +* + CALL DGEMV( 'Transpose', K-1, NRHS, -ONE, B, LDB, A( 1, K ), + $ 1, ONE, B( K, 1 ), LDB ) +* +* Interchange rows K and IPIV(K). +* + KP = IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) + K = K + 1 + ELSE +* +* 2 x 2 diagonal block +* +* Multiply by inv(U'(K+1)), where U(K+1) is the transformation +* stored in columns K and K+1 of A. +* + CALL DGEMV( 'Transpose', K-1, NRHS, -ONE, B, LDB, A( 1, K ), + $ 1, ONE, B( K, 1 ), LDB ) + CALL DGEMV( 'Transpose', K-1, NRHS, -ONE, B, LDB, + $ A( 1, K+1 ), 1, ONE, B( K+1, 1 ), LDB ) +* +* Interchange rows K and -IPIV(K). +* + KP = -IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) + K = K + 2 + END IF +* + GO TO 40 + 50 CONTINUE +* + ELSE +* +* Solve A*X = B, where A = L*D*L'. +* +* First solve L*D*X = B, overwriting B with X. +* +* K is the main loop index, increasing from 1 to N in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = 1 + 60 CONTINUE +* +* If K > N, exit from loop. +* + IF( K.GT.N ) + $ GO TO 80 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Interchange rows K and IPIV(K). +* + KP = IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) +* +* Multiply by inv(L(K)), where L(K) is the transformation +* stored in column K of A. +* + IF( K.LT.N ) + $ CALL DGER( N-K, NRHS, -ONE, A( K+1, K ), 1, B( K, 1 ), + $ LDB, B( K+1, 1 ), LDB ) +* +* Multiply by the inverse of the diagonal block. +* + CALL DSCAL( NRHS, ONE / A( K, K ), B( K, 1 ), LDB ) + K = K + 1 + ELSE +* +* 2 x 2 diagonal block +* +* Interchange rows K+1 and -IPIV(K). +* + KP = -IPIV( K ) + IF( KP.NE.K+1 ) + $ CALL DSWAP( NRHS, B( K+1, 1 ), LDB, B( KP, 1 ), LDB ) +* +* Multiply by inv(L(K)), where L(K) is the transformation +* stored in columns K and K+1 of A. +* + IF( K.LT.N-1 ) THEN + CALL DGER( N-K-1, NRHS, -ONE, A( K+2, K ), 1, B( K, 1 ), + $ LDB, B( K+2, 1 ), LDB ) + CALL DGER( N-K-1, NRHS, -ONE, A( K+2, K+1 ), 1, + $ B( K+1, 1 ), LDB, B( K+2, 1 ), LDB ) + END IF +* +* Multiply by the inverse of the diagonal block. +* + AKM1K = A( K+1, K ) + AKM1 = A( K, K ) / AKM1K + AK = A( K+1, K+1 ) / AKM1K + DENOM = AKM1*AK - ONE + DO 70 J = 1, NRHS + BKM1 = B( K, J ) / AKM1K + BK = B( K+1, J ) / AKM1K + B( K, J ) = ( AK*BKM1-BK ) / DENOM + B( K+1, J ) = ( AKM1*BK-BKM1 ) / DENOM + 70 CONTINUE + K = K + 2 + END IF +* + GO TO 60 + 80 CONTINUE +* +* Next solve L'*X = B, overwriting B with X. +* +* K is the main loop index, decreasing from N to 1 in steps of +* 1 or 2, depending on the size of the diagonal blocks. +* + K = N + 90 CONTINUE +* +* If K < 1, exit from loop. +* + IF( K.LT.1 ) + $ GO TO 100 +* + IF( IPIV( K ).GT.0 ) THEN +* +* 1 x 1 diagonal block +* +* Multiply by inv(L'(K)), where L(K) is the transformation +* stored in column K of A. +* + IF( K.LT.N ) + $ CALL DGEMV( 'Transpose', N-K, NRHS, -ONE, B( K+1, 1 ), + $ LDB, A( K+1, K ), 1, ONE, B( K, 1 ), LDB ) +* +* Interchange rows K and IPIV(K). +* + KP = IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) + K = K - 1 + ELSE +* +* 2 x 2 diagonal block +* +* Multiply by inv(L'(K-1)), where L(K-1) is the transformation +* stored in columns K-1 and K of A. +* + IF( K.LT.N ) THEN + CALL DGEMV( 'Transpose', N-K, NRHS, -ONE, B( K+1, 1 ), + $ LDB, A( K+1, K ), 1, ONE, B( K, 1 ), LDB ) + CALL DGEMV( 'Transpose', N-K, NRHS, -ONE, B( K+1, 1 ), + $ LDB, A( K+1, K-1 ), 1, ONE, B( K-1, 1 ), + $ LDB ) + END IF +* +* Interchange rows K and -IPIV(K). +* + KP = -IPIV( K ) + IF( KP.NE.K ) + $ CALL DSWAP( NRHS, B( K, 1 ), LDB, B( KP, 1 ), LDB ) + K = K - 2 + END IF +* + GO TO 90 + 100 CONTINUE + END IF +* + RETURN +* +* End of DSYTRS +* + END diff --git a/2.3-1/src/fortran/lapack/dtgevc.f b/2.3-1/src/fortran/lapack/dtgevc.f new file mode 100644 index 00000000..091c3f65 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgevc.f @@ -0,0 +1,1147 @@ + SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL, + $ LDVL, VR, LDVR, MM, M, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER HOWMNY, SIDE + INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + DOUBLE PRECISION P( LDP, * ), S( LDS, * ), VL( LDVL, * ), + $ VR( LDVR, * ), WORK( * ) +* .. +* +* +* Purpose +* ======= +* +* DTGEVC computes some or all of the right and/or left eigenvectors of +* a pair of real matrices (S,P), where S is a quasi-triangular matrix +* and P is upper triangular. Matrix pairs of this type are produced by +* the generalized Schur factorization of a matrix pair (A,B): +* +* A = Q*S*Z**T, B = Q*P*Z**T +* +* as computed by DGGHRD + DHGEQZ. +* +* The right eigenvector x and the left eigenvector y of (S,P) +* corresponding to an eigenvalue w are defined by: +* +* S*x = w*P*x, (y**H)*S = w*(y**H)*P, +* +* where y**H denotes the conjugate tranpose of y. +* The eigenvalues are not input to this routine, but are computed +* directly from the diagonal blocks of S and P. +* +* This routine returns the matrices X and/or Y of right and left +* eigenvectors of (S,P), or the products Z*X and/or Q*Y, +* where Z and Q are input matrices. +* If Q and Z are the orthogonal factors from the generalized Schur +* factorization of a matrix pair (A,B), then Z*X and Q*Y +* are the matrices of right and left eigenvectors of (A,B). +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'R': compute right eigenvectors only; +* = 'L': compute left eigenvectors only; +* = 'B': compute both right and left eigenvectors. +* +* HOWMNY (input) CHARACTER*1 +* = 'A': compute all right and/or left eigenvectors; +* = 'B': compute all right and/or left eigenvectors, +* backtransformed by the matrices in VR and/or VL; +* = 'S': compute selected right and/or left eigenvectors, +* specified by the logical array SELECT. +* +* SELECT (input) LOGICAL array, dimension (N) +* If HOWMNY='S', SELECT specifies the eigenvectors to be +* computed. If w(j) is a real eigenvalue, the corresponding +* real eigenvector is computed if SELECT(j) is .TRUE.. +* If w(j) and w(j+1) are the real and imaginary parts of a +* complex eigenvalue, the corresponding complex eigenvector +* is computed if either SELECT(j) or SELECT(j+1) is .TRUE., +* and on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is +* set to .FALSE.. +* Not referenced if HOWMNY = 'A' or 'B'. +* +* N (input) INTEGER +* The order of the matrices S and P. N >= 0. +* +* S (input) DOUBLE PRECISION array, dimension (LDS,N) +* The upper quasi-triangular matrix S from a generalized Schur +* factorization, as computed by DHGEQZ. +* +* LDS (input) INTEGER +* The leading dimension of array S. LDS >= max(1,N). +* +* P (input) DOUBLE PRECISION array, dimension (LDP,N) +* The upper triangular matrix P from a generalized Schur +* factorization, as computed by DHGEQZ. +* 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks +* of S must be in positive diagonal form. +* +* LDP (input) INTEGER +* The leading dimension of array P. LDP >= max(1,N). +* +* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM) +* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must +* contain an N-by-N matrix Q (usually the orthogonal matrix Q +* of left Schur vectors returned by DHGEQZ). +* On exit, if SIDE = 'L' or 'B', VL contains: +* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P); +* if HOWMNY = 'B', the matrix Q*Y; +* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by +* SELECT, stored consecutively in the columns of +* VL, in the same order as their eigenvalues. +* +* A complex eigenvector corresponding to a complex eigenvalue +* is stored in two consecutive columns, the first holding the +* real part, and the second the imaginary part. +* +* Not referenced if SIDE = 'R'. +* +* LDVL (input) INTEGER +* The leading dimension of array VL. LDVL >= 1, and if +* SIDE = 'L' or 'B', LDVL >= N. +* +* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM) +* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must +* contain an N-by-N matrix Z (usually the orthogonal matrix Z +* of right Schur vectors returned by DHGEQZ). +* +* On exit, if SIDE = 'R' or 'B', VR contains: +* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P); +* if HOWMNY = 'B' or 'b', the matrix Z*X; +* if HOWMNY = 'S' or 's', the right eigenvectors of (S,P) +* specified by SELECT, stored consecutively in the +* columns of VR, in the same order as their +* eigenvalues. +* +* A complex eigenvector corresponding to a complex eigenvalue +* is stored in two consecutive columns, the first holding the +* real part and the second the imaginary part. +* +* Not referenced if SIDE = 'L'. +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1, and if +* SIDE = 'R' or 'B', LDVR >= N. +* +* MM (input) INTEGER +* The number of columns in the arrays VL and/or VR. MM >= M. +* +* M (output) INTEGER +* The number of columns in the arrays VL and/or VR actually +* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M +* is set to N. Each selected real eigenvector occupies one +* column and each selected complex eigenvector occupies two +* columns. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (6*N) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: the 2-by-2 block (INFO:INFO+1) does not have a complex +* eigenvalue. +* +* Further Details +* =============== +* +* Allocation of workspace: +* ---------- -- --------- +* +* WORK( j ) = 1-norm of j-th column of A, above the diagonal +* WORK( N+j ) = 1-norm of j-th column of B, above the diagonal +* WORK( 2*N+1:3*N ) = real part of eigenvector +* WORK( 3*N+1:4*N ) = imaginary part of eigenvector +* WORK( 4*N+1:5*N ) = real part of back-transformed eigenvector +* WORK( 5*N+1:6*N ) = imaginary part of back-transformed eigenvector +* +* Rowwise vs. columnwise solution methods: +* ------- -- ---------- -------- ------- +* +* Finding a generalized eigenvector consists basically of solving the +* singular triangular system +* +* (A - w B) x = 0 (for right) or: (A - w B)**H y = 0 (for left) +* +* Consider finding the i-th right eigenvector (assume all eigenvalues +* are real). The equation to be solved is: +* n i +* 0 = sum C(j,k) v(k) = sum C(j,k) v(k) for j = i,. . .,1 +* k=j k=j +* +* where C = (A - w B) (The components v(i+1:n) are 0.) +* +* The "rowwise" method is: +* +* (1) v(i) := 1 +* for j = i-1,. . .,1: +* i +* (2) compute s = - sum C(j,k) v(k) and +* k=j+1 +* +* (3) v(j) := s / C(j,j) +* +* Step 2 is sometimes called the "dot product" step, since it is an +* inner product between the j-th row and the portion of the eigenvector +* that has been computed so far. +* +* The "columnwise" method consists basically in doing the sums +* for all the rows in parallel. As each v(j) is computed, the +* contribution of v(j) times the j-th column of C is added to the +* partial sums. Since FORTRAN arrays are stored columnwise, this has +* the advantage that at each step, the elements of C that are accessed +* are adjacent to one another, whereas with the rowwise method, the +* elements accessed at a step are spaced LDS (and LDP) words apart. +* +* When finding left eigenvectors, the matrix in question is the +* transpose of the one in storage, so the rowwise method then +* actually accesses columns of A and B at each step, and so is the +* preferred method. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, SAFETY + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, + $ SAFETY = 1.0D+2 ) +* .. +* .. Local Scalars .. + LOGICAL COMPL, COMPR, IL2BY2, ILABAD, ILALL, ILBACK, + $ ILBBAD, ILCOMP, ILCPLX, LSA, LSB + INTEGER I, IBEG, IEIG, IEND, IHWMNY, IINFO, IM, ISIDE, + $ J, JA, JC, JE, JR, JW, NA, NW + DOUBLE PRECISION ACOEF, ACOEFA, ANORM, ASCALE, BCOEFA, BCOEFI, + $ BCOEFR, BIG, BIGNUM, BNORM, BSCALE, CIM2A, + $ CIM2B, CIMAGA, CIMAGB, CRE2A, CRE2B, CREALA, + $ CREALB, DMIN, SAFMIN, SALFAR, SBETA, SCALE, + $ SMALL, TEMP, TEMP2, TEMP2I, TEMP2R, ULP, XMAX, + $ XSCALE +* .. +* .. Local Arrays .. + DOUBLE PRECISION BDIAG( 2 ), SUM( 2, 2 ), SUMS( 2, 2 ), + $ SUMP( 2, 2 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DGEMV, DLABAD, DLACPY, DLAG2, DLALN2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Executable Statements .. +* +* Decode and Test the input parameters +* + IF( LSAME( HOWMNY, 'A' ) ) THEN + IHWMNY = 1 + ILALL = .TRUE. + ILBACK = .FALSE. + ELSE IF( LSAME( HOWMNY, 'S' ) ) THEN + IHWMNY = 2 + ILALL = .FALSE. + ILBACK = .FALSE. + ELSE IF( LSAME( HOWMNY, 'B' ) ) THEN + IHWMNY = 3 + ILALL = .TRUE. + ILBACK = .TRUE. + ELSE + IHWMNY = -1 + ILALL = .TRUE. + END IF +* + IF( LSAME( SIDE, 'R' ) ) THEN + ISIDE = 1 + COMPL = .FALSE. + COMPR = .TRUE. + ELSE IF( LSAME( SIDE, 'L' ) ) THEN + ISIDE = 2 + COMPL = .TRUE. + COMPR = .FALSE. + ELSE IF( LSAME( SIDE, 'B' ) ) THEN + ISIDE = 3 + COMPL = .TRUE. + COMPR = .TRUE. + ELSE + ISIDE = -1 + END IF +* + INFO = 0 + IF( ISIDE.LT.0 ) THEN + INFO = -1 + ELSE IF( IHWMNY.LT.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDS.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDP.LT.MAX( 1, N ) ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGEVC', -INFO ) + RETURN + END IF +* +* Count the number of eigenvectors to be computed +* + IF( .NOT.ILALL ) THEN + IM = 0 + ILCPLX = .FALSE. + DO 10 J = 1, N + IF( ILCPLX ) THEN + ILCPLX = .FALSE. + GO TO 10 + END IF + IF( J.LT.N ) THEN + IF( S( J+1, J ).NE.ZERO ) + $ ILCPLX = .TRUE. + END IF + IF( ILCPLX ) THEN + IF( SELECT( J ) .OR. SELECT( J+1 ) ) + $ IM = IM + 2 + ELSE + IF( SELECT( J ) ) + $ IM = IM + 1 + END IF + 10 CONTINUE + ELSE + IM = N + END IF +* +* Check 2-by-2 diagonal blocks of A, B +* + ILABAD = .FALSE. + ILBBAD = .FALSE. + DO 20 J = 1, N - 1 + IF( S( J+1, J ).NE.ZERO ) THEN + IF( P( J, J ).EQ.ZERO .OR. P( J+1, J+1 ).EQ.ZERO .OR. + $ P( J, J+1 ).NE.ZERO )ILBBAD = .TRUE. + IF( J.LT.N-1 ) THEN + IF( S( J+2, J+1 ).NE.ZERO ) + $ ILABAD = .TRUE. + END IF + END IF + 20 CONTINUE +* + IF( ILABAD ) THEN + INFO = -5 + ELSE IF( ILBBAD ) THEN + INFO = -7 + ELSE IF( COMPL .AND. LDVL.LT.N .OR. LDVL.LT.1 ) THEN + INFO = -10 + ELSE IF( COMPR .AND. LDVR.LT.N .OR. LDVR.LT.1 ) THEN + INFO = -12 + ELSE IF( MM.LT.IM ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGEVC', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + M = IM + IF( N.EQ.0 ) + $ RETURN +* +* Machine Constants +* + SAFMIN = DLAMCH( 'Safe minimum' ) + BIG = ONE / SAFMIN + CALL DLABAD( SAFMIN, BIG ) + ULP = DLAMCH( 'Epsilon' )*DLAMCH( 'Base' ) + SMALL = SAFMIN*N / ULP + BIG = ONE / SMALL + BIGNUM = ONE / ( SAFMIN*N ) +* +* Compute the 1-norm of each column of the strictly upper triangular +* part (i.e., excluding all elements belonging to the diagonal +* blocks) of A and B to check for possible overflow in the +* triangular solver. +* + ANORM = ABS( S( 1, 1 ) ) + IF( N.GT.1 ) + $ ANORM = ANORM + ABS( S( 2, 1 ) ) + BNORM = ABS( P( 1, 1 ) ) + WORK( 1 ) = ZERO + WORK( N+1 ) = ZERO +* + DO 50 J = 2, N + TEMP = ZERO + TEMP2 = ZERO + IF( S( J, J-1 ).EQ.ZERO ) THEN + IEND = J - 1 + ELSE + IEND = J - 2 + END IF + DO 30 I = 1, IEND + TEMP = TEMP + ABS( S( I, J ) ) + TEMP2 = TEMP2 + ABS( P( I, J ) ) + 30 CONTINUE + WORK( J ) = TEMP + WORK( N+J ) = TEMP2 + DO 40 I = IEND + 1, MIN( J+1, N ) + TEMP = TEMP + ABS( S( I, J ) ) + TEMP2 = TEMP2 + ABS( P( I, J ) ) + 40 CONTINUE + ANORM = MAX( ANORM, TEMP ) + BNORM = MAX( BNORM, TEMP2 ) + 50 CONTINUE +* + ASCALE = ONE / MAX( ANORM, SAFMIN ) + BSCALE = ONE / MAX( BNORM, SAFMIN ) +* +* Left eigenvectors +* + IF( COMPL ) THEN + IEIG = 0 +* +* Main loop over eigenvalues +* + ILCPLX = .FALSE. + DO 220 JE = 1, N +* +* Skip this iteration if (a) HOWMNY='S' and SELECT=.FALSE., or +* (b) this would be the second of a complex pair. +* Check for complex eigenvalue, so as to be sure of which +* entry(-ies) of SELECT to look at. +* + IF( ILCPLX ) THEN + ILCPLX = .FALSE. + GO TO 220 + END IF + NW = 1 + IF( JE.LT.N ) THEN + IF( S( JE+1, JE ).NE.ZERO ) THEN + ILCPLX = .TRUE. + NW = 2 + END IF + END IF + IF( ILALL ) THEN + ILCOMP = .TRUE. + ELSE IF( ILCPLX ) THEN + ILCOMP = SELECT( JE ) .OR. SELECT( JE+1 ) + ELSE + ILCOMP = SELECT( JE ) + END IF + IF( .NOT.ILCOMP ) + $ GO TO 220 +* +* Decide if (a) singular pencil, (b) real eigenvalue, or +* (c) complex eigenvalue. +* + IF( .NOT.ILCPLX ) THEN + IF( ABS( S( JE, JE ) ).LE.SAFMIN .AND. + $ ABS( P( JE, JE ) ).LE.SAFMIN ) THEN +* +* Singular matrix pencil -- return unit eigenvector +* + IEIG = IEIG + 1 + DO 60 JR = 1, N + VL( JR, IEIG ) = ZERO + 60 CONTINUE + VL( IEIG, IEIG ) = ONE + GO TO 220 + END IF + END IF +* +* Clear vector +* + DO 70 JR = 1, NW*N + WORK( 2*N+JR ) = ZERO + 70 CONTINUE +* T +* Compute coefficients in ( a A - b B ) y = 0 +* a is ACOEF +* b is BCOEFR + i*BCOEFI +* + IF( .NOT.ILCPLX ) THEN +* +* Real eigenvalue +* + TEMP = ONE / MAX( ABS( S( JE, JE ) )*ASCALE, + $ ABS( P( JE, JE ) )*BSCALE, SAFMIN ) + SALFAR = ( TEMP*S( JE, JE ) )*ASCALE + SBETA = ( TEMP*P( JE, JE ) )*BSCALE + ACOEF = SBETA*ASCALE + BCOEFR = SALFAR*BSCALE + BCOEFI = ZERO +* +* Scale to avoid underflow +* + SCALE = ONE + LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEF ).LT.SMALL + LSB = ABS( SALFAR ).GE.SAFMIN .AND. ABS( BCOEFR ).LT. + $ SMALL + IF( LSA ) + $ SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG ) + IF( LSB ) + $ SCALE = MAX( SCALE, ( SMALL / ABS( SALFAR ) )* + $ MIN( BNORM, BIG ) ) + IF( LSA .OR. LSB ) THEN + SCALE = MIN( SCALE, ONE / + $ ( SAFMIN*MAX( ONE, ABS( ACOEF ), + $ ABS( BCOEFR ) ) ) ) + IF( LSA ) THEN + ACOEF = ASCALE*( SCALE*SBETA ) + ELSE + ACOEF = SCALE*ACOEF + END IF + IF( LSB ) THEN + BCOEFR = BSCALE*( SCALE*SALFAR ) + ELSE + BCOEFR = SCALE*BCOEFR + END IF + END IF + ACOEFA = ABS( ACOEF ) + BCOEFA = ABS( BCOEFR ) +* +* First component is 1 +* + WORK( 2*N+JE ) = ONE + XMAX = ONE + ELSE +* +* Complex eigenvalue +* + CALL DLAG2( S( JE, JE ), LDS, P( JE, JE ), LDP, + $ SAFMIN*SAFETY, ACOEF, TEMP, BCOEFR, TEMP2, + $ BCOEFI ) + BCOEFI = -BCOEFI + IF( BCOEFI.EQ.ZERO ) THEN + INFO = JE + RETURN + END IF +* +* Scale to avoid over/underflow +* + ACOEFA = ABS( ACOEF ) + BCOEFA = ABS( BCOEFR ) + ABS( BCOEFI ) + SCALE = ONE + IF( ACOEFA*ULP.LT.SAFMIN .AND. ACOEFA.GE.SAFMIN ) + $ SCALE = ( SAFMIN / ULP ) / ACOEFA + IF( BCOEFA*ULP.LT.SAFMIN .AND. BCOEFA.GE.SAFMIN ) + $ SCALE = MAX( SCALE, ( SAFMIN / ULP ) / BCOEFA ) + IF( SAFMIN*ACOEFA.GT.ASCALE ) + $ SCALE = ASCALE / ( SAFMIN*ACOEFA ) + IF( SAFMIN*BCOEFA.GT.BSCALE ) + $ SCALE = MIN( SCALE, BSCALE / ( SAFMIN*BCOEFA ) ) + IF( SCALE.NE.ONE ) THEN + ACOEF = SCALE*ACOEF + ACOEFA = ABS( ACOEF ) + BCOEFR = SCALE*BCOEFR + BCOEFI = SCALE*BCOEFI + BCOEFA = ABS( BCOEFR ) + ABS( BCOEFI ) + END IF +* +* Compute first two components of eigenvector +* + TEMP = ACOEF*S( JE+1, JE ) + TEMP2R = ACOEF*S( JE, JE ) - BCOEFR*P( JE, JE ) + TEMP2I = -BCOEFI*P( JE, JE ) + IF( ABS( TEMP ).GT.ABS( TEMP2R )+ABS( TEMP2I ) ) THEN + WORK( 2*N+JE ) = ONE + WORK( 3*N+JE ) = ZERO + WORK( 2*N+JE+1 ) = -TEMP2R / TEMP + WORK( 3*N+JE+1 ) = -TEMP2I / TEMP + ELSE + WORK( 2*N+JE+1 ) = ONE + WORK( 3*N+JE+1 ) = ZERO + TEMP = ACOEF*S( JE, JE+1 ) + WORK( 2*N+JE ) = ( BCOEFR*P( JE+1, JE+1 )-ACOEF* + $ S( JE+1, JE+1 ) ) / TEMP + WORK( 3*N+JE ) = BCOEFI*P( JE+1, JE+1 ) / TEMP + END IF + XMAX = MAX( ABS( WORK( 2*N+JE ) )+ABS( WORK( 3*N+JE ) ), + $ ABS( WORK( 2*N+JE+1 ) )+ABS( WORK( 3*N+JE+1 ) ) ) + END IF +* + DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN ) +* +* T +* Triangular solve of (a A - b B) y = 0 +* +* T +* (rowwise in (a A - b B) , or columnwise in (a A - b B) ) +* + IL2BY2 = .FALSE. +* + DO 160 J = JE + NW, N + IF( IL2BY2 ) THEN + IL2BY2 = .FALSE. + GO TO 160 + END IF +* + NA = 1 + BDIAG( 1 ) = P( J, J ) + IF( J.LT.N ) THEN + IF( S( J+1, J ).NE.ZERO ) THEN + IL2BY2 = .TRUE. + BDIAG( 2 ) = P( J+1, J+1 ) + NA = 2 + END IF + END IF +* +* Check whether scaling is necessary for dot products +* + XSCALE = ONE / MAX( ONE, XMAX ) + TEMP = MAX( WORK( J ), WORK( N+J ), + $ ACOEFA*WORK( J )+BCOEFA*WORK( N+J ) ) + IF( IL2BY2 ) + $ TEMP = MAX( TEMP, WORK( J+1 ), WORK( N+J+1 ), + $ ACOEFA*WORK( J+1 )+BCOEFA*WORK( N+J+1 ) ) + IF( TEMP.GT.BIGNUM*XSCALE ) THEN + DO 90 JW = 0, NW - 1 + DO 80 JR = JE, J - 1 + WORK( ( JW+2 )*N+JR ) = XSCALE* + $ WORK( ( JW+2 )*N+JR ) + 80 CONTINUE + 90 CONTINUE + XMAX = XMAX*XSCALE + END IF +* +* Compute dot products +* +* j-1 +* SUM = sum conjg( a*S(k,j) - b*P(k,j) )*x(k) +* k=je +* +* To reduce the op count, this is done as +* +* _ j-1 _ j-1 +* a*conjg( sum S(k,j)*x(k) ) - b*conjg( sum P(k,j)*x(k) ) +* k=je k=je +* +* which may cause underflow problems if A or B are close +* to underflow. (E.g., less than SMALL.) +* +* +* A series of compiler directives to defeat vectorization +* for the next loop +* +*$PL$ CMCHAR=' ' +CDIR$ NEXTSCALAR +C$DIR SCALAR +CDIR$ NEXT SCALAR +CVD$L NOVECTOR +CDEC$ NOVECTOR +CVD$ NOVECTOR +*VDIR NOVECTOR +*VOCL LOOP,SCALAR +CIBM PREFER SCALAR +*$PL$ CMCHAR='*' +* + DO 120 JW = 1, NW +* +*$PL$ CMCHAR=' ' +CDIR$ NEXTSCALAR +C$DIR SCALAR +CDIR$ NEXT SCALAR +CVD$L NOVECTOR +CDEC$ NOVECTOR +CVD$ NOVECTOR +*VDIR NOVECTOR +*VOCL LOOP,SCALAR +CIBM PREFER SCALAR +*$PL$ CMCHAR='*' +* + DO 110 JA = 1, NA + SUMS( JA, JW ) = ZERO + SUMP( JA, JW ) = ZERO +* + DO 100 JR = JE, J - 1 + SUMS( JA, JW ) = SUMS( JA, JW ) + + $ S( JR, J+JA-1 )* + $ WORK( ( JW+1 )*N+JR ) + SUMP( JA, JW ) = SUMP( JA, JW ) + + $ P( JR, J+JA-1 )* + $ WORK( ( JW+1 )*N+JR ) + 100 CONTINUE + 110 CONTINUE + 120 CONTINUE +* +*$PL$ CMCHAR=' ' +CDIR$ NEXTSCALAR +C$DIR SCALAR +CDIR$ NEXT SCALAR +CVD$L NOVECTOR +CDEC$ NOVECTOR +CVD$ NOVECTOR +*VDIR NOVECTOR +*VOCL LOOP,SCALAR +CIBM PREFER SCALAR +*$PL$ CMCHAR='*' +* + DO 130 JA = 1, NA + IF( ILCPLX ) THEN + SUM( JA, 1 ) = -ACOEF*SUMS( JA, 1 ) + + $ BCOEFR*SUMP( JA, 1 ) - + $ BCOEFI*SUMP( JA, 2 ) + SUM( JA, 2 ) = -ACOEF*SUMS( JA, 2 ) + + $ BCOEFR*SUMP( JA, 2 ) + + $ BCOEFI*SUMP( JA, 1 ) + ELSE + SUM( JA, 1 ) = -ACOEF*SUMS( JA, 1 ) + + $ BCOEFR*SUMP( JA, 1 ) + END IF + 130 CONTINUE +* +* T +* Solve ( a A - b B ) y = SUM(,) +* with scaling and perturbation of the denominator +* + CALL DLALN2( .TRUE., NA, NW, DMIN, ACOEF, S( J, J ), LDS, + $ BDIAG( 1 ), BDIAG( 2 ), SUM, 2, BCOEFR, + $ BCOEFI, WORK( 2*N+J ), N, SCALE, TEMP, + $ IINFO ) + IF( SCALE.LT.ONE ) THEN + DO 150 JW = 0, NW - 1 + DO 140 JR = JE, J - 1 + WORK( ( JW+2 )*N+JR ) = SCALE* + $ WORK( ( JW+2 )*N+JR ) + 140 CONTINUE + 150 CONTINUE + XMAX = SCALE*XMAX + END IF + XMAX = MAX( XMAX, TEMP ) + 160 CONTINUE +* +* Copy eigenvector to VL, back transforming if +* HOWMNY='B'. +* + IEIG = IEIG + 1 + IF( ILBACK ) THEN + DO 170 JW = 0, NW - 1 + CALL DGEMV( 'N', N, N+1-JE, ONE, VL( 1, JE ), LDVL, + $ WORK( ( JW+2 )*N+JE ), 1, ZERO, + $ WORK( ( JW+4 )*N+1 ), 1 ) + 170 CONTINUE + CALL DLACPY( ' ', N, NW, WORK( 4*N+1 ), N, VL( 1, JE ), + $ LDVL ) + IBEG = 1 + ELSE + CALL DLACPY( ' ', N, NW, WORK( 2*N+1 ), N, VL( 1, IEIG ), + $ LDVL ) + IBEG = JE + END IF +* +* Scale eigenvector +* + XMAX = ZERO + IF( ILCPLX ) THEN + DO 180 J = IBEG, N + XMAX = MAX( XMAX, ABS( VL( J, IEIG ) )+ + $ ABS( VL( J, IEIG+1 ) ) ) + 180 CONTINUE + ELSE + DO 190 J = IBEG, N + XMAX = MAX( XMAX, ABS( VL( J, IEIG ) ) ) + 190 CONTINUE + END IF +* + IF( XMAX.GT.SAFMIN ) THEN + XSCALE = ONE / XMAX +* + DO 210 JW = 0, NW - 1 + DO 200 JR = IBEG, N + VL( JR, IEIG+JW ) = XSCALE*VL( JR, IEIG+JW ) + 200 CONTINUE + 210 CONTINUE + END IF + IEIG = IEIG + NW - 1 +* + 220 CONTINUE + END IF +* +* Right eigenvectors +* + IF( COMPR ) THEN + IEIG = IM + 1 +* +* Main loop over eigenvalues +* + ILCPLX = .FALSE. + DO 500 JE = N, 1, -1 +* +* Skip this iteration if (a) HOWMNY='S' and SELECT=.FALSE., or +* (b) this would be the second of a complex pair. +* Check for complex eigenvalue, so as to be sure of which +* entry(-ies) of SELECT to look at -- if complex, SELECT(JE) +* or SELECT(JE-1). +* If this is a complex pair, the 2-by-2 diagonal block +* corresponding to the eigenvalue is in rows/columns JE-1:JE +* + IF( ILCPLX ) THEN + ILCPLX = .FALSE. + GO TO 500 + END IF + NW = 1 + IF( JE.GT.1 ) THEN + IF( S( JE, JE-1 ).NE.ZERO ) THEN + ILCPLX = .TRUE. + NW = 2 + END IF + END IF + IF( ILALL ) THEN + ILCOMP = .TRUE. + ELSE IF( ILCPLX ) THEN + ILCOMP = SELECT( JE ) .OR. SELECT( JE-1 ) + ELSE + ILCOMP = SELECT( JE ) + END IF + IF( .NOT.ILCOMP ) + $ GO TO 500 +* +* Decide if (a) singular pencil, (b) real eigenvalue, or +* (c) complex eigenvalue. +* + IF( .NOT.ILCPLX ) THEN + IF( ABS( S( JE, JE ) ).LE.SAFMIN .AND. + $ ABS( P( JE, JE ) ).LE.SAFMIN ) THEN +* +* Singular matrix pencil -- unit eigenvector +* + IEIG = IEIG - 1 + DO 230 JR = 1, N + VR( JR, IEIG ) = ZERO + 230 CONTINUE + VR( IEIG, IEIG ) = ONE + GO TO 500 + END IF + END IF +* +* Clear vector +* + DO 250 JW = 0, NW - 1 + DO 240 JR = 1, N + WORK( ( JW+2 )*N+JR ) = ZERO + 240 CONTINUE + 250 CONTINUE +* +* Compute coefficients in ( a A - b B ) x = 0 +* a is ACOEF +* b is BCOEFR + i*BCOEFI +* + IF( .NOT.ILCPLX ) THEN +* +* Real eigenvalue +* + TEMP = ONE / MAX( ABS( S( JE, JE ) )*ASCALE, + $ ABS( P( JE, JE ) )*BSCALE, SAFMIN ) + SALFAR = ( TEMP*S( JE, JE ) )*ASCALE + SBETA = ( TEMP*P( JE, JE ) )*BSCALE + ACOEF = SBETA*ASCALE + BCOEFR = SALFAR*BSCALE + BCOEFI = ZERO +* +* Scale to avoid underflow +* + SCALE = ONE + LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEF ).LT.SMALL + LSB = ABS( SALFAR ).GE.SAFMIN .AND. ABS( BCOEFR ).LT. + $ SMALL + IF( LSA ) + $ SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG ) + IF( LSB ) + $ SCALE = MAX( SCALE, ( SMALL / ABS( SALFAR ) )* + $ MIN( BNORM, BIG ) ) + IF( LSA .OR. LSB ) THEN + SCALE = MIN( SCALE, ONE / + $ ( SAFMIN*MAX( ONE, ABS( ACOEF ), + $ ABS( BCOEFR ) ) ) ) + IF( LSA ) THEN + ACOEF = ASCALE*( SCALE*SBETA ) + ELSE + ACOEF = SCALE*ACOEF + END IF + IF( LSB ) THEN + BCOEFR = BSCALE*( SCALE*SALFAR ) + ELSE + BCOEFR = SCALE*BCOEFR + END IF + END IF + ACOEFA = ABS( ACOEF ) + BCOEFA = ABS( BCOEFR ) +* +* First component is 1 +* + WORK( 2*N+JE ) = ONE + XMAX = ONE +* +* Compute contribution from column JE of A and B to sum +* (See "Further Details", above.) +* + DO 260 JR = 1, JE - 1 + WORK( 2*N+JR ) = BCOEFR*P( JR, JE ) - + $ ACOEF*S( JR, JE ) + 260 CONTINUE + ELSE +* +* Complex eigenvalue +* + CALL DLAG2( S( JE-1, JE-1 ), LDS, P( JE-1, JE-1 ), LDP, + $ SAFMIN*SAFETY, ACOEF, TEMP, BCOEFR, TEMP2, + $ BCOEFI ) + IF( BCOEFI.EQ.ZERO ) THEN + INFO = JE - 1 + RETURN + END IF +* +* Scale to avoid over/underflow +* + ACOEFA = ABS( ACOEF ) + BCOEFA = ABS( BCOEFR ) + ABS( BCOEFI ) + SCALE = ONE + IF( ACOEFA*ULP.LT.SAFMIN .AND. ACOEFA.GE.SAFMIN ) + $ SCALE = ( SAFMIN / ULP ) / ACOEFA + IF( BCOEFA*ULP.LT.SAFMIN .AND. BCOEFA.GE.SAFMIN ) + $ SCALE = MAX( SCALE, ( SAFMIN / ULP ) / BCOEFA ) + IF( SAFMIN*ACOEFA.GT.ASCALE ) + $ SCALE = ASCALE / ( SAFMIN*ACOEFA ) + IF( SAFMIN*BCOEFA.GT.BSCALE ) + $ SCALE = MIN( SCALE, BSCALE / ( SAFMIN*BCOEFA ) ) + IF( SCALE.NE.ONE ) THEN + ACOEF = SCALE*ACOEF + ACOEFA = ABS( ACOEF ) + BCOEFR = SCALE*BCOEFR + BCOEFI = SCALE*BCOEFI + BCOEFA = ABS( BCOEFR ) + ABS( BCOEFI ) + END IF +* +* Compute first two components of eigenvector +* and contribution to sums +* + TEMP = ACOEF*S( JE, JE-1 ) + TEMP2R = ACOEF*S( JE, JE ) - BCOEFR*P( JE, JE ) + TEMP2I = -BCOEFI*P( JE, JE ) + IF( ABS( TEMP ).GE.ABS( TEMP2R )+ABS( TEMP2I ) ) THEN + WORK( 2*N+JE ) = ONE + WORK( 3*N+JE ) = ZERO + WORK( 2*N+JE-1 ) = -TEMP2R / TEMP + WORK( 3*N+JE-1 ) = -TEMP2I / TEMP + ELSE + WORK( 2*N+JE-1 ) = ONE + WORK( 3*N+JE-1 ) = ZERO + TEMP = ACOEF*S( JE-1, JE ) + WORK( 2*N+JE ) = ( BCOEFR*P( JE-1, JE-1 )-ACOEF* + $ S( JE-1, JE-1 ) ) / TEMP + WORK( 3*N+JE ) = BCOEFI*P( JE-1, JE-1 ) / TEMP + END IF +* + XMAX = MAX( ABS( WORK( 2*N+JE ) )+ABS( WORK( 3*N+JE ) ), + $ ABS( WORK( 2*N+JE-1 ) )+ABS( WORK( 3*N+JE-1 ) ) ) +* +* Compute contribution from columns JE and JE-1 +* of A and B to the sums. +* + CREALA = ACOEF*WORK( 2*N+JE-1 ) + CIMAGA = ACOEF*WORK( 3*N+JE-1 ) + CREALB = BCOEFR*WORK( 2*N+JE-1 ) - + $ BCOEFI*WORK( 3*N+JE-1 ) + CIMAGB = BCOEFI*WORK( 2*N+JE-1 ) + + $ BCOEFR*WORK( 3*N+JE-1 ) + CRE2A = ACOEF*WORK( 2*N+JE ) + CIM2A = ACOEF*WORK( 3*N+JE ) + CRE2B = BCOEFR*WORK( 2*N+JE ) - BCOEFI*WORK( 3*N+JE ) + CIM2B = BCOEFI*WORK( 2*N+JE ) + BCOEFR*WORK( 3*N+JE ) + DO 270 JR = 1, JE - 2 + WORK( 2*N+JR ) = -CREALA*S( JR, JE-1 ) + + $ CREALB*P( JR, JE-1 ) - + $ CRE2A*S( JR, JE ) + CRE2B*P( JR, JE ) + WORK( 3*N+JR ) = -CIMAGA*S( JR, JE-1 ) + + $ CIMAGB*P( JR, JE-1 ) - + $ CIM2A*S( JR, JE ) + CIM2B*P( JR, JE ) + 270 CONTINUE + END IF +* + DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN ) +* +* Columnwise triangular solve of (a A - b B) x = 0 +* + IL2BY2 = .FALSE. + DO 370 J = JE - NW, 1, -1 +* +* If a 2-by-2 block, is in position j-1:j, wait until +* next iteration to process it (when it will be j:j+1) +* + IF( .NOT.IL2BY2 .AND. J.GT.1 ) THEN + IF( S( J, J-1 ).NE.ZERO ) THEN + IL2BY2 = .TRUE. + GO TO 370 + END IF + END IF + BDIAG( 1 ) = P( J, J ) + IF( IL2BY2 ) THEN + NA = 2 + BDIAG( 2 ) = P( J+1, J+1 ) + ELSE + NA = 1 + END IF +* +* Compute x(j) (and x(j+1), if 2-by-2 block) +* + CALL DLALN2( .FALSE., NA, NW, DMIN, ACOEF, S( J, J ), + $ LDS, BDIAG( 1 ), BDIAG( 2 ), WORK( 2*N+J ), + $ N, BCOEFR, BCOEFI, SUM, 2, SCALE, TEMP, + $ IINFO ) + IF( SCALE.LT.ONE ) THEN +* + DO 290 JW = 0, NW - 1 + DO 280 JR = 1, JE + WORK( ( JW+2 )*N+JR ) = SCALE* + $ WORK( ( JW+2 )*N+JR ) + 280 CONTINUE + 290 CONTINUE + END IF + XMAX = MAX( SCALE*XMAX, TEMP ) +* + DO 310 JW = 1, NW + DO 300 JA = 1, NA + WORK( ( JW+1 )*N+J+JA-1 ) = SUM( JA, JW ) + 300 CONTINUE + 310 CONTINUE +* +* w = w + x(j)*(a S(*,j) - b P(*,j) ) with scaling +* + IF( J.GT.1 ) THEN +* +* Check whether scaling is necessary for sum. +* + XSCALE = ONE / MAX( ONE, XMAX ) + TEMP = ACOEFA*WORK( J ) + BCOEFA*WORK( N+J ) + IF( IL2BY2 ) + $ TEMP = MAX( TEMP, ACOEFA*WORK( J+1 )+BCOEFA* + $ WORK( N+J+1 ) ) + TEMP = MAX( TEMP, ACOEFA, BCOEFA ) + IF( TEMP.GT.BIGNUM*XSCALE ) THEN +* + DO 330 JW = 0, NW - 1 + DO 320 JR = 1, JE + WORK( ( JW+2 )*N+JR ) = XSCALE* + $ WORK( ( JW+2 )*N+JR ) + 320 CONTINUE + 330 CONTINUE + XMAX = XMAX*XSCALE + END IF +* +* Compute the contributions of the off-diagonals of +* column j (and j+1, if 2-by-2 block) of A and B to the +* sums. +* +* + DO 360 JA = 1, NA + IF( ILCPLX ) THEN + CREALA = ACOEF*WORK( 2*N+J+JA-1 ) + CIMAGA = ACOEF*WORK( 3*N+J+JA-1 ) + CREALB = BCOEFR*WORK( 2*N+J+JA-1 ) - + $ BCOEFI*WORK( 3*N+J+JA-1 ) + CIMAGB = BCOEFI*WORK( 2*N+J+JA-1 ) + + $ BCOEFR*WORK( 3*N+J+JA-1 ) + DO 340 JR = 1, J - 1 + WORK( 2*N+JR ) = WORK( 2*N+JR ) - + $ CREALA*S( JR, J+JA-1 ) + + $ CREALB*P( JR, J+JA-1 ) + WORK( 3*N+JR ) = WORK( 3*N+JR ) - + $ CIMAGA*S( JR, J+JA-1 ) + + $ CIMAGB*P( JR, J+JA-1 ) + 340 CONTINUE + ELSE + CREALA = ACOEF*WORK( 2*N+J+JA-1 ) + CREALB = BCOEFR*WORK( 2*N+J+JA-1 ) + DO 350 JR = 1, J - 1 + WORK( 2*N+JR ) = WORK( 2*N+JR ) - + $ CREALA*S( JR, J+JA-1 ) + + $ CREALB*P( JR, J+JA-1 ) + 350 CONTINUE + END IF + 360 CONTINUE + END IF +* + IL2BY2 = .FALSE. + 370 CONTINUE +* +* Copy eigenvector to VR, back transforming if +* HOWMNY='B'. +* + IEIG = IEIG - NW + IF( ILBACK ) THEN +* + DO 410 JW = 0, NW - 1 + DO 380 JR = 1, N + WORK( ( JW+4 )*N+JR ) = WORK( ( JW+2 )*N+1 )* + $ VR( JR, 1 ) + 380 CONTINUE +* +* A series of compiler directives to defeat +* vectorization for the next loop +* +* + DO 400 JC = 2, JE + DO 390 JR = 1, N + WORK( ( JW+4 )*N+JR ) = WORK( ( JW+4 )*N+JR ) + + $ WORK( ( JW+2 )*N+JC )*VR( JR, JC ) + 390 CONTINUE + 400 CONTINUE + 410 CONTINUE +* + DO 430 JW = 0, NW - 1 + DO 420 JR = 1, N + VR( JR, IEIG+JW ) = WORK( ( JW+4 )*N+JR ) + 420 CONTINUE + 430 CONTINUE +* + IEND = N + ELSE + DO 450 JW = 0, NW - 1 + DO 440 JR = 1, N + VR( JR, IEIG+JW ) = WORK( ( JW+2 )*N+JR ) + 440 CONTINUE + 450 CONTINUE +* + IEND = JE + END IF +* +* Scale eigenvector +* + XMAX = ZERO + IF( ILCPLX ) THEN + DO 460 J = 1, IEND + XMAX = MAX( XMAX, ABS( VR( J, IEIG ) )+ + $ ABS( VR( J, IEIG+1 ) ) ) + 460 CONTINUE + ELSE + DO 470 J = 1, IEND + XMAX = MAX( XMAX, ABS( VR( J, IEIG ) ) ) + 470 CONTINUE + END IF +* + IF( XMAX.GT.SAFMIN ) THEN + XSCALE = ONE / XMAX + DO 490 JW = 0, NW - 1 + DO 480 JR = 1, IEND + VR( JR, IEIG+JW ) = XSCALE*VR( JR, IEIG+JW ) + 480 CONTINUE + 490 CONTINUE + END IF + 500 CONTINUE + END IF +* + RETURN +* +* End of DTGEVC +* + END diff --git a/2.3-1/src/fortran/lapack/dtgex2.f b/2.3-1/src/fortran/lapack/dtgex2.f new file mode 100644 index 00000000..8351b7fd --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgex2.f @@ -0,0 +1,581 @@ + SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, J1, N1, N2, WORK, LWORK, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2 +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22) +* of size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair +* (A, B) by an orthogonal equivalence transformation. +* +* (A, B) must be in generalized real Schur canonical form (as returned +* by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2 +* diagonal blocks. B is upper triangular. +* +* Optionally, the matrices Q and Z of generalized Schur vectors are +* updated. +* +* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)' +* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)' +* +* +* Arguments +* ========= +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) DOUBLE PRECISION arrays, dimensions (LDA,N) +* On entry, the matrix A in the pair (A, B). +* On exit, the updated matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION arrays, dimensions (LDB,N) +* On entry, the matrix B in the pair (A, B). +* On exit, the updated matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* On entry, if WANTQ = .TRUE., the orthogonal matrix Q. +* On exit, the updated matrix Q. +* Not referenced if WANTQ = .FALSE.. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1. +* If WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* On entry, if WANTZ =.TRUE., the orthogonal matrix Z. +* On exit, the updated matrix Z. +* Not referenced if WANTZ = .FALSE.. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1. +* If WANTZ = .TRUE., LDZ >= N. +* +* J1 (input) INTEGER +* The index to the first block (A11, B11). 1 <= J1 <= N. +* +* N1 (input) INTEGER +* The order of the first block (A11, B11). N1 = 0, 1 or 2. +* +* N2 (input) INTEGER +* The order of the second block (A22, B22). N2 = 0, 1 or 2. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)). +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* LWORK >= MAX( 1, N*(N2+N1), (N2+N1)*(N2+N1)*2 ) +* +* INFO (output) INTEGER +* =0: Successful exit +* >0: If INFO = 1, the transformed matrix (A, B) would be +* too far from generalized Schur form; the blocks are +* not swapped and (A, B) and (Q, Z) are unchanged. +* The problem of swapping is too ill-conditioned. +* <0: If INFO = -16: LWORK is too small. Appropriate value +* for LWORK is returned in WORK(1). +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* In the current code both weak and strong stability tests are +* performed. The user can omit the strong stability test by changing +* the internal logical parameter WANDS to .FALSE.. See ref. [2] for +* details. +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified +* Eigenvalues of a Regular Matrix Pair (A, B) and Condition +* Estimation: Theory, Algorithms and Software, +* Report UMINF - 94.04, Department of Computing Science, Umea +* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working +* Note 87. To appear in Numerical Algorithms, 1996. +* +* ===================================================================== +* Replaced various illegal calls to DCOPY by calls to DLASET, or by DO +* loops. Sven Hammarling, 1/5/02. +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION TEN + PARAMETER ( TEN = 1.0D+01 ) + INTEGER LDST + PARAMETER ( LDST = 4 ) + LOGICAL WANDS + PARAMETER ( WANDS = .TRUE. ) +* .. +* .. Local Scalars .. + LOGICAL DTRONG, WEAK + INTEGER I, IDUM, LINFO, M + DOUBLE PRECISION BQRA21, BRQA21, DDUM, DNORM, DSCALE, DSUM, EPS, + $ F, G, SA, SB, SCALE, SMLNUM, SS, THRESH, WS +* .. +* .. Local Arrays .. + INTEGER IWORK( LDST ) + DOUBLE PRECISION AI( 2 ), AR( 2 ), BE( 2 ), IR( LDST, LDST ), + $ IRCOP( LDST, LDST ), LI( LDST, LDST ), + $ LICOP( LDST, LDST ), S( LDST, LDST ), + $ SCPY( LDST, LDST ), T( LDST, LDST ), + $ TAUL( LDST ), TAUR( LDST ), TCPY( LDST, LDST ) +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DGEQR2, DGERQ2, DLACPY, DLAGV2, DLARTG, + $ DLASET, DLASSQ, DORG2R, DORGR2, DORM2R, DORMR2, + $ DROT, DSCAL, DTGSY2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.LE.1 .OR. N1.LE.0 .OR. N2.LE.0 ) + $ RETURN + IF( N1.GT.N .OR. ( J1+N1 ).GT.N ) + $ RETURN + M = N1 + N2 + IF( LWORK.LT.MAX( 1, N*M, M*M*2 ) ) THEN + INFO = -16 + WORK( 1 ) = MAX( 1, N*M, M*M*2 ) + RETURN + END IF +* + WEAK = .FALSE. + DTRONG = .FALSE. +* +* Make a local copy of selected block +* + CALL DLASET( 'Full', LDST, LDST, ZERO, ZERO, LI, LDST ) + CALL DLASET( 'Full', LDST, LDST, ZERO, ZERO, IR, LDST ) + CALL DLACPY( 'Full', M, M, A( J1, J1 ), LDA, S, LDST ) + CALL DLACPY( 'Full', M, M, B( J1, J1 ), LDB, T, LDST ) +* +* Compute threshold for testing acceptance of swapping. +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + DSCALE = ZERO + DSUM = ONE + CALL DLACPY( 'Full', M, M, S, LDST, WORK, M ) + CALL DLASSQ( M*M, WORK, 1, DSCALE, DSUM ) + CALL DLACPY( 'Full', M, M, T, LDST, WORK, M ) + CALL DLASSQ( M*M, WORK, 1, DSCALE, DSUM ) + DNORM = DSCALE*SQRT( DSUM ) + THRESH = MAX( TEN*EPS*DNORM, SMLNUM ) +* + IF( M.EQ.2 ) THEN +* +* CASE 1: Swap 1-by-1 and 1-by-1 blocks. +* +* Compute orthogonal QL and RQ that swap 1-by-1 and 1-by-1 blocks +* using Givens rotations and perform the swap tentatively. +* + F = S( 2, 2 )*T( 1, 1 ) - T( 2, 2 )*S( 1, 1 ) + G = S( 2, 2 )*T( 1, 2 ) - T( 2, 2 )*S( 1, 2 ) + SB = ABS( T( 2, 2 ) ) + SA = ABS( S( 2, 2 ) ) + CALL DLARTG( F, G, IR( 1, 2 ), IR( 1, 1 ), DDUM ) + IR( 2, 1 ) = -IR( 1, 2 ) + IR( 2, 2 ) = IR( 1, 1 ) + CALL DROT( 2, S( 1, 1 ), 1, S( 1, 2 ), 1, IR( 1, 1 ), + $ IR( 2, 1 ) ) + CALL DROT( 2, T( 1, 1 ), 1, T( 1, 2 ), 1, IR( 1, 1 ), + $ IR( 2, 1 ) ) + IF( SA.GE.SB ) THEN + CALL DLARTG( S( 1, 1 ), S( 2, 1 ), LI( 1, 1 ), LI( 2, 1 ), + $ DDUM ) + ELSE + CALL DLARTG( T( 1, 1 ), T( 2, 1 ), LI( 1, 1 ), LI( 2, 1 ), + $ DDUM ) + END IF + CALL DROT( 2, S( 1, 1 ), LDST, S( 2, 1 ), LDST, LI( 1, 1 ), + $ LI( 2, 1 ) ) + CALL DROT( 2, T( 1, 1 ), LDST, T( 2, 1 ), LDST, LI( 1, 1 ), + $ LI( 2, 1 ) ) + LI( 2, 2 ) = LI( 1, 1 ) + LI( 1, 2 ) = -LI( 2, 1 ) +* +* Weak stability test: +* |S21| + |T21| <= O(EPS * F-norm((S, T))) +* + WS = ABS( S( 2, 1 ) ) + ABS( T( 2, 1 ) ) + WEAK = WS.LE.THRESH + IF( .NOT.WEAK ) + $ GO TO 70 +* + IF( WANDS ) THEN +* +* Strong stability test: +* F-norm((A-QL'*S*QR, B-QL'*T*QR)) <= O(EPS*F-norm((A,B))) +* + CALL DLACPY( 'Full', M, M, A( J1, J1 ), LDA, WORK( M*M+1 ), + $ M ) + CALL DGEMM( 'N', 'N', M, M, M, ONE, LI, LDST, S, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'T', M, M, M, -ONE, WORK, M, IR, LDST, ONE, + $ WORK( M*M+1 ), M ) + DSCALE = ZERO + DSUM = ONE + CALL DLASSQ( M*M, WORK( M*M+1 ), 1, DSCALE, DSUM ) +* + CALL DLACPY( 'Full', M, M, B( J1, J1 ), LDB, WORK( M*M+1 ), + $ M ) + CALL DGEMM( 'N', 'N', M, M, M, ONE, LI, LDST, T, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'T', M, M, M, -ONE, WORK, M, IR, LDST, ONE, + $ WORK( M*M+1 ), M ) + CALL DLASSQ( M*M, WORK( M*M+1 ), 1, DSCALE, DSUM ) + SS = DSCALE*SQRT( DSUM ) + DTRONG = SS.LE.THRESH + IF( .NOT.DTRONG ) + $ GO TO 70 + END IF +* +* Update (A(J1:J1+M-1, M+J1:N), B(J1:J1+M-1, M+J1:N)) and +* (A(1:J1-1, J1:J1+M), B(1:J1-1, J1:J1+M)). +* + CALL DROT( J1+1, A( 1, J1 ), 1, A( 1, J1+1 ), 1, IR( 1, 1 ), + $ IR( 2, 1 ) ) + CALL DROT( J1+1, B( 1, J1 ), 1, B( 1, J1+1 ), 1, IR( 1, 1 ), + $ IR( 2, 1 ) ) + CALL DROT( N-J1+1, A( J1, J1 ), LDA, A( J1+1, J1 ), LDA, + $ LI( 1, 1 ), LI( 2, 1 ) ) + CALL DROT( N-J1+1, B( J1, J1 ), LDB, B( J1+1, J1 ), LDB, + $ LI( 1, 1 ), LI( 2, 1 ) ) +* +* Set N1-by-N2 (2,1) - blocks to ZERO. +* + A( J1+1, J1 ) = ZERO + B( J1+1, J1 ) = ZERO +* +* Accumulate transformations into Q and Z if requested. +* + IF( WANTZ ) + $ CALL DROT( N, Z( 1, J1 ), 1, Z( 1, J1+1 ), 1, IR( 1, 1 ), + $ IR( 2, 1 ) ) + IF( WANTQ ) + $ CALL DROT( N, Q( 1, J1 ), 1, Q( 1, J1+1 ), 1, LI( 1, 1 ), + $ LI( 2, 1 ) ) +* +* Exit with INFO = 0 if swap was successfully performed. +* + RETURN +* + ELSE +* +* CASE 2: Swap 1-by-1 and 2-by-2 blocks, or 2-by-2 +* and 2-by-2 blocks. +* +* Solve the generalized Sylvester equation +* S11 * R - L * S22 = SCALE * S12 +* T11 * R - L * T22 = SCALE * T12 +* for R and L. Solutions in LI and IR. +* + CALL DLACPY( 'Full', N1, N2, T( 1, N1+1 ), LDST, LI, LDST ) + CALL DLACPY( 'Full', N1, N2, S( 1, N1+1 ), LDST, + $ IR( N2+1, N1+1 ), LDST ) + CALL DTGSY2( 'N', 0, N1, N2, S, LDST, S( N1+1, N1+1 ), LDST, + $ IR( N2+1, N1+1 ), LDST, T, LDST, T( N1+1, N1+1 ), + $ LDST, LI, LDST, SCALE, DSUM, DSCALE, IWORK, IDUM, + $ LINFO ) +* +* Compute orthogonal matrix QL: +* +* QL' * LI = [ TL ] +* [ 0 ] +* where +* LI = [ -L ] +* [ SCALE * identity(N2) ] +* + DO 10 I = 1, N2 + CALL DSCAL( N1, -ONE, LI( 1, I ), 1 ) + LI( N1+I, I ) = SCALE + 10 CONTINUE + CALL DGEQR2( M, N2, LI, LDST, TAUL, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 + CALL DORG2R( M, M, N2, LI, LDST, TAUL, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 +* +* Compute orthogonal matrix RQ: +* +* IR * RQ' = [ 0 TR], +* +* where IR = [ SCALE * identity(N1), R ] +* + DO 20 I = 1, N1 + IR( N2+I, I ) = SCALE + 20 CONTINUE + CALL DGERQ2( N1, M, IR( N2+1, 1 ), LDST, TAUR, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 + CALL DORGR2( M, M, N1, IR, LDST, TAUR, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 +* +* Perform the swapping tentatively: +* + CALL DGEMM( 'T', 'N', M, M, M, ONE, LI, LDST, S, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'T', M, M, M, ONE, WORK, M, IR, LDST, ZERO, S, + $ LDST ) + CALL DGEMM( 'T', 'N', M, M, M, ONE, LI, LDST, T, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'T', M, M, M, ONE, WORK, M, IR, LDST, ZERO, T, + $ LDST ) + CALL DLACPY( 'F', M, M, S, LDST, SCPY, LDST ) + CALL DLACPY( 'F', M, M, T, LDST, TCPY, LDST ) + CALL DLACPY( 'F', M, M, IR, LDST, IRCOP, LDST ) + CALL DLACPY( 'F', M, M, LI, LDST, LICOP, LDST ) +* +* Triangularize the B-part by an RQ factorization. +* Apply transformation (from left) to A-part, giving S. +* + CALL DGERQ2( M, M, T, LDST, TAUR, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 + CALL DORMR2( 'R', 'T', M, M, M, T, LDST, TAUR, S, LDST, WORK, + $ LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 + CALL DORMR2( 'L', 'N', M, M, M, T, LDST, TAUR, IR, LDST, WORK, + $ LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 +* +* Compute F-norm(S21) in BRQA21. (T21 is 0.) +* + DSCALE = ZERO + DSUM = ONE + DO 30 I = 1, N2 + CALL DLASSQ( N1, S( N2+1, I ), 1, DSCALE, DSUM ) + 30 CONTINUE + BRQA21 = DSCALE*SQRT( DSUM ) +* +* Triangularize the B-part by a QR factorization. +* Apply transformation (from right) to A-part, giving S. +* + CALL DGEQR2( M, M, TCPY, LDST, TAUL, WORK, LINFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 + CALL DORM2R( 'L', 'T', M, M, M, TCPY, LDST, TAUL, SCPY, LDST, + $ WORK, INFO ) + CALL DORM2R( 'R', 'N', M, M, M, TCPY, LDST, TAUL, LICOP, LDST, + $ WORK, INFO ) + IF( LINFO.NE.0 ) + $ GO TO 70 +* +* Compute F-norm(S21) in BQRA21. (T21 is 0.) +* + DSCALE = ZERO + DSUM = ONE + DO 40 I = 1, N2 + CALL DLASSQ( N1, SCPY( N2+1, I ), 1, DSCALE, DSUM ) + 40 CONTINUE + BQRA21 = DSCALE*SQRT( DSUM ) +* +* Decide which method to use. +* Weak stability test: +* F-norm(S21) <= O(EPS * F-norm((S, T))) +* + IF( BQRA21.LE.BRQA21 .AND. BQRA21.LE.THRESH ) THEN + CALL DLACPY( 'F', M, M, SCPY, LDST, S, LDST ) + CALL DLACPY( 'F', M, M, TCPY, LDST, T, LDST ) + CALL DLACPY( 'F', M, M, IRCOP, LDST, IR, LDST ) + CALL DLACPY( 'F', M, M, LICOP, LDST, LI, LDST ) + ELSE IF( BRQA21.GE.THRESH ) THEN + GO TO 70 + END IF +* +* Set lower triangle of B-part to zero +* + CALL DLASET( 'Lower', M-1, M-1, ZERO, ZERO, T(2,1), LDST ) +* + IF( WANDS ) THEN +* +* Strong stability test: +* F-norm((A-QL*S*QR', B-QL*T*QR')) <= O(EPS*F-norm((A,B))) +* + CALL DLACPY( 'Full', M, M, A( J1, J1 ), LDA, WORK( M*M+1 ), + $ M ) + CALL DGEMM( 'N', 'N', M, M, M, ONE, LI, LDST, S, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'N', M, M, M, -ONE, WORK, M, IR, LDST, ONE, + $ WORK( M*M+1 ), M ) + DSCALE = ZERO + DSUM = ONE + CALL DLASSQ( M*M, WORK( M*M+1 ), 1, DSCALE, DSUM ) +* + CALL DLACPY( 'Full', M, M, B( J1, J1 ), LDB, WORK( M*M+1 ), + $ M ) + CALL DGEMM( 'N', 'N', M, M, M, ONE, LI, LDST, T, LDST, ZERO, + $ WORK, M ) + CALL DGEMM( 'N', 'N', M, M, M, -ONE, WORK, M, IR, LDST, ONE, + $ WORK( M*M+1 ), M ) + CALL DLASSQ( M*M, WORK( M*M+1 ), 1, DSCALE, DSUM ) + SS = DSCALE*SQRT( DSUM ) + DTRONG = ( SS.LE.THRESH ) + IF( .NOT.DTRONG ) + $ GO TO 70 +* + END IF +* +* If the swap is accepted ("weakly" and "strongly"), apply the +* transformations and set N1-by-N2 (2,1)-block to zero. +* + CALL DLASET( 'Full', N1, N2, ZERO, ZERO, S(N2+1,1), LDST ) +* +* copy back M-by-M diagonal block starting at index J1 of (A, B) +* + CALL DLACPY( 'F', M, M, S, LDST, A( J1, J1 ), LDA ) + CALL DLACPY( 'F', M, M, T, LDST, B( J1, J1 ), LDB ) + CALL DLASET( 'Full', LDST, LDST, ZERO, ZERO, T, LDST ) +* +* Standardize existing 2-by-2 blocks. +* + DO 50 I = 1, M*M + WORK(I) = ZERO + 50 CONTINUE + WORK( 1 ) = ONE + T( 1, 1 ) = ONE + IDUM = LWORK - M*M - 2 + IF( N2.GT.1 ) THEN + CALL DLAGV2( A( J1, J1 ), LDA, B( J1, J1 ), LDB, AR, AI, BE, + $ WORK( 1 ), WORK( 2 ), T( 1, 1 ), T( 2, 1 ) ) + WORK( M+1 ) = -WORK( 2 ) + WORK( M+2 ) = WORK( 1 ) + T( N2, N2 ) = T( 1, 1 ) + T( 1, 2 ) = -T( 2, 1 ) + END IF + WORK( M*M ) = ONE + T( M, M ) = ONE +* + IF( N1.GT.1 ) THEN + CALL DLAGV2( A( J1+N2, J1+N2 ), LDA, B( J1+N2, J1+N2 ), LDB, + $ TAUR, TAUL, WORK( M*M+1 ), WORK( N2*M+N2+1 ), + $ WORK( N2*M+N2+2 ), T( N2+1, N2+1 ), + $ T( M, M-1 ) ) + WORK( M*M ) = WORK( N2*M+N2+1 ) + WORK( M*M-1 ) = -WORK( N2*M+N2+2 ) + T( M, M ) = T( N2+1, N2+1 ) + T( M-1, M ) = -T( M, M-1 ) + END IF + CALL DGEMM( 'T', 'N', N2, N1, N2, ONE, WORK, M, A( J1, J1+N2 ), + $ LDA, ZERO, WORK( M*M+1 ), N2 ) + CALL DLACPY( 'Full', N2, N1, WORK( M*M+1 ), N2, A( J1, J1+N2 ), + $ LDA ) + CALL DGEMM( 'T', 'N', N2, N1, N2, ONE, WORK, M, B( J1, J1+N2 ), + $ LDB, ZERO, WORK( M*M+1 ), N2 ) + CALL DLACPY( 'Full', N2, N1, WORK( M*M+1 ), N2, B( J1, J1+N2 ), + $ LDB ) + CALL DGEMM( 'N', 'N', M, M, M, ONE, LI, LDST, WORK, M, ZERO, + $ WORK( M*M+1 ), M ) + CALL DLACPY( 'Full', M, M, WORK( M*M+1 ), M, LI, LDST ) + CALL DGEMM( 'N', 'N', N2, N1, N1, ONE, A( J1, J1+N2 ), LDA, + $ T( N2+1, N2+1 ), LDST, ZERO, WORK, N2 ) + CALL DLACPY( 'Full', N2, N1, WORK, N2, A( J1, J1+N2 ), LDA ) + CALL DGEMM( 'N', 'N', N2, N1, N1, ONE, B( J1, J1+N2 ), LDB, + $ T( N2+1, N2+1 ), LDST, ZERO, WORK, N2 ) + CALL DLACPY( 'Full', N2, N1, WORK, N2, B( J1, J1+N2 ), LDB ) + CALL DGEMM( 'T', 'N', M, M, M, ONE, IR, LDST, T, LDST, ZERO, + $ WORK, M ) + CALL DLACPY( 'Full', M, M, WORK, M, IR, LDST ) +* +* Accumulate transformations into Q and Z if requested. +* + IF( WANTQ ) THEN + CALL DGEMM( 'N', 'N', N, M, M, ONE, Q( 1, J1 ), LDQ, LI, + $ LDST, ZERO, WORK, N ) + CALL DLACPY( 'Full', N, M, WORK, N, Q( 1, J1 ), LDQ ) +* + END IF +* + IF( WANTZ ) THEN + CALL DGEMM( 'N', 'N', N, M, M, ONE, Z( 1, J1 ), LDZ, IR, + $ LDST, ZERO, WORK, N ) + CALL DLACPY( 'Full', N, M, WORK, N, Z( 1, J1 ), LDZ ) +* + END IF +* +* Update (A(J1:J1+M-1, M+J1:N), B(J1:J1+M-1, M+J1:N)) and +* (A(1:J1-1, J1:J1+M), B(1:J1-1, J1:J1+M)). +* + I = J1 + M + IF( I.LE.N ) THEN + CALL DGEMM( 'T', 'N', M, N-I+1, M, ONE, LI, LDST, + $ A( J1, I ), LDA, ZERO, WORK, M ) + CALL DLACPY( 'Full', M, N-I+1, WORK, M, A( J1, I ), LDA ) + CALL DGEMM( 'T', 'N', M, N-I+1, M, ONE, LI, LDST, + $ B( J1, I ), LDA, ZERO, WORK, M ) + CALL DLACPY( 'Full', M, N-I+1, WORK, M, B( J1, I ), LDB ) + END IF + I = J1 - 1 + IF( I.GT.0 ) THEN + CALL DGEMM( 'N', 'N', I, M, M, ONE, A( 1, J1 ), LDA, IR, + $ LDST, ZERO, WORK, I ) + CALL DLACPY( 'Full', I, M, WORK, I, A( 1, J1 ), LDA ) + CALL DGEMM( 'N', 'N', I, M, M, ONE, B( 1, J1 ), LDB, IR, + $ LDST, ZERO, WORK, I ) + CALL DLACPY( 'Full', I, M, WORK, I, B( 1, J1 ), LDB ) + END IF +* +* Exit with INFO = 0 if swap was successfully performed. +* + RETURN +* + END IF +* +* Exit with INFO = 1 if swap was rejected. +* + 70 CONTINUE +* + INFO = 1 + RETURN +* +* End of DTGEX2 +* + END diff --git a/2.3-1/src/fortran/lapack/dtgexc.f b/2.3-1/src/fortran/lapack/dtgexc.f new file mode 100644 index 00000000..bafefea2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgexc.f @@ -0,0 +1,440 @@ + SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, IFST, ILST, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DTGEXC reorders the generalized real Schur decomposition of a real +* matrix pair (A,B) using an orthogonal equivalence transformation +* +* (A, B) = Q * (A, B) * Z', +* +* so that the diagonal block of (A, B) with row index IFST is moved +* to row ILST. +* +* (A, B) must be in generalized real Schur canonical form (as returned +* by DGGES), i.e. A is block upper triangular with 1-by-1 and 2-by-2 +* diagonal blocks. B is upper triangular. +* +* Optionally, the matrices Q and Z of generalized Schur vectors are +* updated. +* +* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)' +* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)' +* +* +* Arguments +* ========= +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the matrix A in generalized real Schur canonical +* form. +* On exit, the updated matrix A, again in generalized +* real Schur canonical form. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,N) +* On entry, the matrix B in generalized real Schur canonical +* form (A,B). +* On exit, the updated matrix B, again in generalized +* real Schur canonical form (A,B). +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* On entry, if WANTQ = .TRUE., the orthogonal matrix Q. +* On exit, the updated matrix Q. +* If WANTQ = .FALSE., Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1. +* If WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* On entry, if WANTZ = .TRUE., the orthogonal matrix Z. +* On exit, the updated matrix Z. +* If WANTZ = .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1. +* If WANTZ = .TRUE., LDZ >= N. +* +* IFST (input/output) INTEGER +* ILST (input/output) INTEGER +* Specify the reordering of the diagonal blocks of (A, B). +* The block with row index IFST is moved to row ILST, by a +* sequence of swapping between adjacent blocks. +* On exit, if IFST pointed on entry to the second row of +* a 2-by-2 block, it is changed to point to the first row; +* ILST always points to the first row of the block in its +* final position (which may differ from its input value by +* +1 or -1). 1 <= IFST, ILST <= N. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* LWORK >= 1 when N <= 1, otherwise LWORK >= 4*N + 16. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* =0: successful exit. +* <0: if INFO = -i, the i-th argument had an illegal value. +* =1: The transformed matrix pair (A, B) would be too far +* from generalized Schur form; the problem is ill- +* conditioned. (A, B) may have been partially reordered, +* and ILST points to the first row of the current +* position of the block being moved. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER HERE, LWMIN, NBF, NBL, NBNEXT +* .. +* .. External Subroutines .. + EXTERNAL DTGEX2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Decode and test input arguments. +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDQ.LT.1 .OR. WANTQ .AND. ( LDQ.LT.MAX( 1, N ) ) ) THEN + INFO = -9 + ELSE IF( LDZ.LT.1 .OR. WANTZ .AND. ( LDZ.LT.MAX( 1, N ) ) ) THEN + INFO = -11 + ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN + INFO = -12 + ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN + INFO = -13 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( N.LE.1 ) THEN + LWMIN = 1 + ELSE + LWMIN = 4*N + 16 + END IF + WORK(1) = LWMIN +* + IF (LWORK.LT.LWMIN .AND. .NOT.LQUERY) THEN + INFO = -15 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGEXC', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* +* Determine the first row of the specified block and find out +* if it is 1-by-1 or 2-by-2. +* + IF( IFST.GT.1 ) THEN + IF( A( IFST, IFST-1 ).NE.ZERO ) + $ IFST = IFST - 1 + END IF + NBF = 1 + IF( IFST.LT.N ) THEN + IF( A( IFST+1, IFST ).NE.ZERO ) + $ NBF = 2 + END IF +* +* Determine the first row of the final block +* and find out if it is 1-by-1 or 2-by-2. +* + IF( ILST.GT.1 ) THEN + IF( A( ILST, ILST-1 ).NE.ZERO ) + $ ILST = ILST - 1 + END IF + NBL = 1 + IF( ILST.LT.N ) THEN + IF( A( ILST+1, ILST ).NE.ZERO ) + $ NBL = 2 + END IF + IF( IFST.EQ.ILST ) + $ RETURN +* + IF( IFST.LT.ILST ) THEN +* +* Update ILST. +* + IF( NBF.EQ.2 .AND. NBL.EQ.1 ) + $ ILST = ILST - 1 + IF( NBF.EQ.1 .AND. NBL.EQ.2 ) + $ ILST = ILST + 1 +* + HERE = IFST +* + 10 CONTINUE +* +* Swap with next one below. +* + IF( NBF.EQ.1 .OR. NBF.EQ.2 ) THEN +* +* Current block either 1-by-1 or 2-by-2. +* + NBNEXT = 1 + IF( HERE+NBF+1.LE.N ) THEN + IF( A( HERE+NBF+1, HERE+NBF ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE, NBF, NBNEXT, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + NBNEXT +* +* Test if 2-by-2 block breaks into two 1-by-1 blocks. +* + IF( NBF.EQ.2 ) THEN + IF( A( HERE+1, HERE ).EQ.ZERO ) + $ NBF = 3 + END IF +* + ELSE +* +* Current block consists of two 1-by-1 blocks, each of which +* must be swapped individually. +* + NBNEXT = 1 + IF( HERE+3.LE.N ) THEN + IF( A( HERE+3, HERE+2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE+1, 1, NBNEXT, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + IF( NBNEXT.EQ.1 ) THEN +* +* Swap two 1-by-1 blocks. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE, 1, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 1 +* + ELSE +* +* Recompute NBNEXT in case of 2-by-2 split. +* + IF( A( HERE+2, HERE+1 ).EQ.ZERO ) + $ NBNEXT = 1 + IF( NBNEXT.EQ.2 ) THEN +* +* 2-by-2 block did not split. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE, 1, NBNEXT, WORK, LWORK, + $ INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 2 + ELSE +* +* 2-by-2 block did split. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE, 1, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 1 + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE, 1, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 1 + END IF +* + END IF + END IF + IF( HERE.LT.ILST ) + $ GO TO 10 + ELSE + HERE = IFST +* + 20 CONTINUE +* +* Swap with next one below. +* + IF( NBF.EQ.1 .OR. NBF.EQ.2 ) THEN +* +* Current block either 1-by-1 or 2-by-2. +* + NBNEXT = 1 + IF( HERE.GE.3 ) THEN + IF( A( HERE-1, HERE-2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE-NBNEXT, NBNEXT, NBF, WORK, LWORK, + $ INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - NBNEXT +* +* Test if 2-by-2 block breaks into two 1-by-1 blocks. +* + IF( NBF.EQ.2 ) THEN + IF( A( HERE+1, HERE ).EQ.ZERO ) + $ NBF = 3 + END IF +* + ELSE +* +* Current block consists of two 1-by-1 blocks, each of which +* must be swapped individually. +* + NBNEXT = 1 + IF( HERE.GE.3 ) THEN + IF( A( HERE-1, HERE-2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE-NBNEXT, NBNEXT, 1, WORK, LWORK, + $ INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + IF( NBNEXT.EQ.1 ) THEN +* +* Swap two 1-by-1 blocks. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, HERE, NBNEXT, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 1 + ELSE +* +* Recompute NBNEXT in case of 2-by-2 split. +* + IF( A( HERE, HERE-1 ).EQ.ZERO ) + $ NBNEXT = 1 + IF( NBNEXT.EQ.2 ) THEN +* +* 2-by-2 block did not split. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE-1, 2, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 2 + ELSE +* +* 2-by-2 block did split. +* + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE, 1, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 1 + CALL DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, HERE, 1, 1, WORK, LWORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 1 + END IF + END IF + END IF + IF( HERE.GT.ILST ) + $ GO TO 20 + END IF + ILST = HERE + WORK( 1 ) = LWMIN + RETURN +* +* End of DTGEXC +* + END diff --git a/2.3-1/src/fortran/lapack/dtgsen.f b/2.3-1/src/fortran/lapack/dtgsen.f new file mode 100644 index 00000000..917a7b0f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgsen.f @@ -0,0 +1,723 @@ + SUBROUTINE DTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB, + $ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL, + $ PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK, + $ M, N + DOUBLE PRECISION PL, PR +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ), + $ B( LDB, * ), BETA( * ), DIF( * ), Q( LDQ, * ), + $ WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* DTGSEN reorders the generalized real Schur decomposition of a real +* matrix pair (A, B) (in terms of an orthonormal equivalence trans- +* formation Q' * (A, B) * Z), so that a selected cluster of eigenvalues +* appears in the leading diagonal blocks of the upper quasi-triangular +* matrix A and the upper triangular B. The leading columns of Q and +* Z form orthonormal bases of the corresponding left and right eigen- +* spaces (deflating subspaces). (A, B) must be in generalized real +* Schur canonical form (as returned by DGGES), i.e. A is block upper +* triangular with 1-by-1 and 2-by-2 diagonal blocks. B is upper +* triangular. +* +* DTGSEN also computes the generalized eigenvalues +* +* w(j) = (ALPHAR(j) + i*ALPHAI(j))/BETA(j) +* +* of the reordered matrix pair (A, B). +* +* Optionally, DTGSEN computes the estimates of reciprocal condition +* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11), +* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s) +* between the matrix pairs (A11, B11) and (A22,B22) that correspond to +* the selected cluster and the eigenvalues outside the cluster, resp., +* and norms of "projections" onto left and right eigenspaces w.r.t. +* the selected cluster in the (1,1)-block. +* +* Arguments +* ========= +* +* IJOB (input) INTEGER +* Specifies whether condition numbers are required for the +* cluster of eigenvalues (PL and PR) or the deflating subspaces +* (Difu and Difl): +* =0: Only reorder w.r.t. SELECT. No extras. +* =1: Reciprocal of norms of "projections" onto left and right +* eigenspaces w.r.t. the selected cluster (PL and PR). +* =2: Upper bounds on Difu and Difl. F-norm-based estimate +* (DIF(1:2)). +* =3: Estimate of Difu and Difl. 1-norm-based estimate +* (DIF(1:2)). +* About 5 times as expensive as IJOB = 2. +* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic +* version to get it all. +* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above) +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* SELECT (input) LOGICAL array, dimension (N) +* SELECT specifies the eigenvalues in the selected cluster. +* To select a real eigenvalue w(j), SELECT(j) must be set to +* .TRUE.. To select a complex conjugate pair of eigenvalues +* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block, +* either SELECT(j) or SELECT(j+1) or both must be set to +* .TRUE.; a complex conjugate pair of eigenvalues must be +* either both included in the cluster or both excluded. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension(LDA,N) +* On entry, the upper quasi-triangular matrix A, with (A, B) in +* generalized real Schur canonical form. +* On exit, A is overwritten by the reordered matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension(LDB,N) +* On entry, the upper triangular matrix B, with (A, B) in +* generalized real Schur canonical form. +* On exit, B is overwritten by the reordered matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* ALPHAR (output) DOUBLE PRECISION array, dimension (N) +* ALPHAI (output) DOUBLE PRECISION array, dimension (N) +* BETA (output) DOUBLE PRECISION array, dimension (N) +* On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will +* be the generalized eigenvalues. ALPHAR(j) + ALPHAI(j)*i +* and BETA(j),j=1,...,N are the diagonals of the complex Schur +* form (S,T) that would result if the 2-by-2 diagonal blocks of +* the real generalized Schur form of (A,B) were further reduced +* to triangular form using complex unitary transformations. +* If ALPHAI(j) is zero, then the j-th eigenvalue is real; if +* positive, then the j-th and (j+1)-st eigenvalues are a +* complex conjugate pair, with ALPHAI(j+1) negative. +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N) +* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix. +* On exit, Q has been postmultiplied by the left orthogonal +* transformation matrix which reorder (A, B); The leading M +* columns of Q form orthonormal bases for the specified pair of +* left eigenspaces (deflating subspaces). +* If WANTQ = .FALSE., Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1; +* and if WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N) +* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix. +* On exit, Z has been postmultiplied by the left orthogonal +* transformation matrix which reorder (A, B); The leading M +* columns of Z form orthonormal bases for the specified pair of +* left eigenspaces (deflating subspaces). +* If WANTZ = .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1; +* If WANTZ = .TRUE., LDZ >= N. +* +* M (output) INTEGER +* The dimension of the specified pair of left and right eigen- +* spaces (deflating subspaces). 0 <= M <= N. +* +* PL (output) DOUBLE PRECISION +* PR (output) DOUBLE PRECISION +* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the +* reciprocal of the norm of "projections" onto left and right +* eigenspaces with respect to the selected cluster. +* 0 < PL, PR <= 1. +* If M = 0 or M = N, PL = PR = 1. +* If IJOB = 0, 2 or 3, PL and PR are not referenced. +* +* DIF (output) DOUBLE PRECISION array, dimension (2). +* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl. +* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on +* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based +* estimates of Difu and Difl. +* If M = 0 or N, DIF(1:2) = F-norm([A, B]). +* If IJOB = 0 or 1, DIF is not referenced. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* IF IJOB = 0, WORK is not referenced. Otherwise, +* on exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 4*N+16. +* If IJOB = 1, 2 or 4, LWORK >= MAX(4*N+16, 2*M*(N-M)). +* If IJOB = 3 or 5, LWORK >= MAX(4*N+16, 4*M*(N-M)). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK)) +* IF IJOB = 0, IWORK is not referenced. Otherwise, +* on exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. +* +* LIWORK (input) INTEGER +* The dimension of the array IWORK. LIWORK >= 1. +* If IJOB = 1, 2 or 4, LIWORK >= N+6. +* If IJOB = 3 or 5, LIWORK >= MAX(2*M*(N-M), N+6). +* +* If LIWORK = -1, then a workspace query is assumed; the +* routine only calculates the optimal size of the IWORK array, +* returns this value as the first entry of the IWORK array, and +* no error message related to LIWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* =0: Successful exit. +* <0: If INFO = -i, the i-th argument had an illegal value. +* =1: Reordering of (A, B) failed because the transformed +* matrix pair (A, B) would be too far from generalized +* Schur form; the problem is very ill-conditioned. +* (A, B) may have been partially reordered. +* If requested, 0 is returned in DIF(*), PL and PR. +* +* Further Details +* =============== +* +* DTGSEN first collects the selected eigenvalues by computing +* orthogonal U and W that move them to the top left corner of (A, B). +* In other words, the selected eigenvalues are the eigenvalues of +* (A11, B11) in: +* +* U'*(A, B)*W = (A11 A12) (B11 B12) n1 +* ( 0 A22),( 0 B22) n2 +* n1 n2 n1 n2 +* +* where N = n1+n2 and U' means the transpose of U. The first n1 columns +* of U and W span the specified pair of left and right eigenspaces +* (deflating subspaces) of (A, B). +* +* If (A, B) has been obtained from the generalized real Schur +* decomposition of a matrix pair (C, D) = Q*(A, B)*Z', then the +* reordered generalized real Schur form of (C, D) is given by +* +* (C, D) = (Q*U)*(U'*(A, B)*W)*(Z*W)', +* +* and the first n1 columns of Q*U and Z*W span the corresponding +* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.). +* +* Note that if the selected eigenvalue is sufficiently ill-conditioned, +* then its value may differ significantly from its value before +* reordering. +* +* The reciprocal condition numbers of the left and right eigenspaces +* spanned by the first n1 columns of U and W (or Q*U and Z*W) may +* be returned in DIF(1:2), corresponding to Difu and Difl, resp. +* +* The Difu and Difl are defined as: +* +* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu ) +* and +* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)], +* +* where sigma-min(Zu) is the smallest singular value of the +* (2*n1*n2)-by-(2*n1*n2) matrix +* +* Zu = [ kron(In2, A11) -kron(A22', In1) ] +* [ kron(In2, B11) -kron(B22', In1) ]. +* +* Here, Inx is the identity matrix of size nx and A22' is the +* transpose of A22. kron(X, Y) is the Kronecker product between +* the matrices X and Y. +* +* When DIF(2) is small, small changes in (A, B) can cause large changes +* in the deflating subspace. An approximate (asymptotic) bound on the +* maximum angular error in the computed deflating subspaces is +* +* EPS * norm((A, B)) / DIF(2), +* +* where EPS is the machine precision. +* +* The reciprocal norm of the projectors on the left and right +* eigenspaces associated with (A11, B11) may be returned in PL and PR. +* They are computed as follows. First we compute L and R so that +* P*(A, B)*Q is block diagonal, where +* +* P = ( I -L ) n1 Q = ( I R ) n1 +* ( 0 I ) n2 and ( 0 I ) n2 +* n1 n2 n1 n2 +* +* and (L, R) is the solution to the generalized Sylvester equation +* +* A11*R - L*A22 = -A12 +* B11*R - L*B22 = -B12 +* +* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2). +* An approximate (asymptotic) bound on the average absolute error of +* the selected eigenvalues is +* +* EPS * norm((A, B)) / PL. +* +* There are also global error bounds which valid for perturbations up +* to a certain restriction: A lower bound (x) on the smallest +* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and +* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F), +* (i.e. (A + E, B + F), is +* +* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)). +* +* An approximate bound on x can be computed from DIF(1:2), PL and PR. +* +* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed +* (L', R') and unperturbed (L, R) left and right deflating subspaces +* associated with the selected cluster in the (1,1)-blocks can be +* bounded as +* +* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2)) +* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2)) +* +* See LAPACK User's Guide section 4.11 or the following references +* for more information. +* +* Note that if the default method for computing the Frobenius-norm- +* based estimate DIF is not wanted (see DLATDF), then the parameter +* IDIFJB (see below) should be changed from 3 to 4 (routine DLATDF +* (IJOB = 2 will be used)). See DTGSYL for more details. +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* References +* ========== +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified +* Eigenvalues of a Regular Matrix Pair (A, B) and Condition +* Estimation: Theory, Algorithms and Software, +* Report UMINF - 94.04, Department of Computing Science, Umea +* University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working +* Note 87. To appear in Numerical Algorithms, 1996. +* +* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software +* for Solving the Generalized Sylvester Equation and Estimating the +* Separation between Regular Matrix Pairs, Report UMINF - 93.23, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, December 1993, Revised April 1994, Also as LAPACK Working +* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, +* 1996. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER IDIFJB + PARAMETER ( IDIFJB = 3 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, PAIR, SWAP, WANTD, WANTD1, WANTD2, + $ WANTP + INTEGER I, IERR, IJB, K, KASE, KK, KS, LIWMIN, LWMIN, + $ MN2, N1, N2 + DOUBLE PRECISION DSCALE, DSUM, EPS, RDSCAL, SMLNUM +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DLACPY, DLAG2, DLASSQ, DTGEXC, DTGSYL, + $ XERBLA +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 .OR. LIWORK.EQ.-1 ) +* + IF( IJOB.LT.0 .OR. IJOB.GT.5 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN + INFO = -14 + ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN + INFO = -16 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGSEN', -INFO ) + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + IERR = 0 +* + WANTP = IJOB.EQ.1 .OR. IJOB.GE.4 + WANTD1 = IJOB.EQ.2 .OR. IJOB.EQ.4 + WANTD2 = IJOB.EQ.3 .OR. IJOB.EQ.5 + WANTD = WANTD1 .OR. WANTD2 +* +* Set M to the dimension of the specified pair of deflating +* subspaces. +* + M = 0 + PAIR = .FALSE. + DO 10 K = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + ELSE + IF( K.LT.N ) THEN + IF( A( K+1, K ).EQ.ZERO ) THEN + IF( SELECT( K ) ) + $ M = M + 1 + ELSE + PAIR = .TRUE. + IF( SELECT( K ) .OR. SELECT( K+1 ) ) + $ M = M + 2 + END IF + ELSE + IF( SELECT( N ) ) + $ M = M + 1 + END IF + END IF + 10 CONTINUE +* + IF( IJOB.EQ.1 .OR. IJOB.EQ.2 .OR. IJOB.EQ.4 ) THEN + LWMIN = MAX( 1, 4*N+16, 2*M*( N-M ) ) + LIWMIN = MAX( 1, N+6 ) + ELSE IF( IJOB.EQ.3 .OR. IJOB.EQ.5 ) THEN + LWMIN = MAX( 1, 4*N+16, 4*M*( N-M ) ) + LIWMIN = MAX( 1, 2*M*( N-M ), N+6 ) + ELSE + LWMIN = MAX( 1, 4*N+16 ) + LIWMIN = 1 + END IF +* + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN +* + IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -22 + ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN + INFO = -24 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGSEN', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible. +* + IF( M.EQ.N .OR. M.EQ.0 ) THEN + IF( WANTP ) THEN + PL = ONE + PR = ONE + END IF + IF( WANTD ) THEN + DSCALE = ZERO + DSUM = ONE + DO 20 I = 1, N + CALL DLASSQ( N, A( 1, I ), 1, DSCALE, DSUM ) + CALL DLASSQ( N, B( 1, I ), 1, DSCALE, DSUM ) + 20 CONTINUE + DIF( 1 ) = DSCALE*SQRT( DSUM ) + DIF( 2 ) = DIF( 1 ) + END IF + GO TO 60 + END IF +* +* Collect the selected blocks at the top-left corner of (A, B). +* + KS = 0 + PAIR = .FALSE. + DO 30 K = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + ELSE +* + SWAP = SELECT( K ) + IF( K.LT.N ) THEN + IF( A( K+1, K ).NE.ZERO ) THEN + PAIR = .TRUE. + SWAP = SWAP .OR. SELECT( K+1 ) + END IF + END IF +* + IF( SWAP ) THEN + KS = KS + 1 +* +* Swap the K-th block to position KS. +* Perform the reordering of diagonal blocks in (A, B) +* by orthogonal transformation matrices and update +* Q and Z accordingly (if requested): +* + KK = K + IF( K.NE.KS ) + $ CALL DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, + $ Z, LDZ, KK, KS, WORK, LWORK, IERR ) +* + IF( IERR.GT.0 ) THEN +* +* Swap is rejected: exit. +* + INFO = 1 + IF( WANTP ) THEN + PL = ZERO + PR = ZERO + END IF + IF( WANTD ) THEN + DIF( 1 ) = ZERO + DIF( 2 ) = ZERO + END IF + GO TO 60 + END IF +* + IF( PAIR ) + $ KS = KS + 1 + END IF + END IF + 30 CONTINUE + IF( WANTP ) THEN +* +* Solve generalized Sylvester equation for R and L +* and compute PL and PR. +* + N1 = M + N2 = N - M + I = N1 + 1 + IJB = 0 + CALL DLACPY( 'Full', N1, N2, A( 1, I ), LDA, WORK, N1 ) + CALL DLACPY( 'Full', N1, N2, B( 1, I ), LDB, WORK( N1*N2+1 ), + $ N1 ) + CALL DTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK, + $ N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ), N1, + $ DSCALE, DIF( 1 ), WORK( N1*N2*2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) +* +* Estimate the reciprocal of norms of "projections" onto left +* and right eigenspaces. +* + RDSCAL = ZERO + DSUM = ONE + CALL DLASSQ( N1*N2, WORK, 1, RDSCAL, DSUM ) + PL = RDSCAL*SQRT( DSUM ) + IF( PL.EQ.ZERO ) THEN + PL = ONE + ELSE + PL = DSCALE / ( SQRT( DSCALE*DSCALE / PL+PL )*SQRT( PL ) ) + END IF + RDSCAL = ZERO + DSUM = ONE + CALL DLASSQ( N1*N2, WORK( N1*N2+1 ), 1, RDSCAL, DSUM ) + PR = RDSCAL*SQRT( DSUM ) + IF( PR.EQ.ZERO ) THEN + PR = ONE + ELSE + PR = DSCALE / ( SQRT( DSCALE*DSCALE / PR+PR )*SQRT( PR ) ) + END IF + END IF +* + IF( WANTD ) THEN +* +* Compute estimates of Difu and Difl. +* + IF( WANTD1 ) THEN + N1 = M + N2 = N - M + I = N1 + 1 + IJB = IDIFJB +* +* Frobenius norm-based Difu-estimate. +* + CALL DTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK, + $ N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ), + $ N1, DSCALE, DIF( 1 ), WORK( 2*N1*N2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) +* +* Frobenius norm-based Difl-estimate. +* + CALL DTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA, WORK, + $ N2, B( I, I ), LDB, B, LDB, WORK( N1*N2+1 ), + $ N2, DSCALE, DIF( 2 ), WORK( 2*N1*N2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) + ELSE +* +* +* Compute 1-norm-based estimates of Difu and Difl using +* reversed communication with DLACN2. In each step a +* generalized Sylvester equation or a transposed variant +* is solved. +* + KASE = 0 + N1 = M + N2 = N - M + I = N1 + 1 + IJB = 0 + MN2 = 2*N1*N2 +* +* 1-norm-based estimate of Difu. +* + 40 CONTINUE + CALL DLACN2( MN2, WORK( MN2+1 ), WORK, IWORK, DIF( 1 ), + $ KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve generalized Sylvester equation. +* + CALL DTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, + $ WORK, N1, B, LDB, B( I, I ), LDB, + $ WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ), + $ WORK( 2*N1*N2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + ELSE +* +* Solve the transposed variant. +* + CALL DTGSYL( 'T', IJB, N1, N2, A, LDA, A( I, I ), LDA, + $ WORK, N1, B, LDB, B( I, I ), LDB, + $ WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ), + $ WORK( 2*N1*N2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + END IF + GO TO 40 + END IF + DIF( 1 ) = DSCALE / DIF( 1 ) +* +* 1-norm-based estimate of Difl. +* + 50 CONTINUE + CALL DLACN2( MN2, WORK( MN2+1 ), WORK, IWORK, DIF( 2 ), + $ KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve generalized Sylvester equation. +* + CALL DTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA, + $ WORK, N2, B( I, I ), LDB, B, LDB, + $ WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ), + $ WORK( 2*N1*N2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + ELSE +* +* Solve the transposed variant. +* + CALL DTGSYL( 'T', IJB, N2, N1, A( I, I ), LDA, A, LDA, + $ WORK, N2, B( I, I ), LDB, B, LDB, + $ WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ), + $ WORK( 2*N1*N2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + END IF + GO TO 50 + END IF + DIF( 2 ) = DSCALE / DIF( 2 ) +* + END IF + END IF +* + 60 CONTINUE +* +* Compute generalized eigenvalues of reordered pair (A, B) and +* normalize the generalized Schur form. +* + PAIR = .FALSE. + DO 80 K = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + ELSE +* + IF( K.LT.N ) THEN + IF( A( K+1, K ).NE.ZERO ) THEN + PAIR = .TRUE. + END IF + END IF +* + IF( PAIR ) THEN +* +* Compute the eigenvalue(s) at position K. +* + WORK( 1 ) = A( K, K ) + WORK( 2 ) = A( K+1, K ) + WORK( 3 ) = A( K, K+1 ) + WORK( 4 ) = A( K+1, K+1 ) + WORK( 5 ) = B( K, K ) + WORK( 6 ) = B( K+1, K ) + WORK( 7 ) = B( K, K+1 ) + WORK( 8 ) = B( K+1, K+1 ) + CALL DLAG2( WORK, 2, WORK( 5 ), 2, SMLNUM*EPS, BETA( K ), + $ BETA( K+1 ), ALPHAR( K ), ALPHAR( K+1 ), + $ ALPHAI( K ) ) + ALPHAI( K+1 ) = -ALPHAI( K ) +* + ELSE +* + IF( SIGN( ONE, B( K, K ) ).LT.ZERO ) THEN +* +* If B(K,K) is negative, make it positive +* + DO 70 I = 1, N + A( K, I ) = -A( K, I ) + B( K, I ) = -B( K, I ) + Q( I, K ) = -Q( I, K ) + 70 CONTINUE + END IF +* + ALPHAR( K ) = A( K, K ) + ALPHAI( K ) = ZERO + BETA( K ) = B( K, K ) +* + END IF + END IF + 80 CONTINUE +* + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN +* + RETURN +* +* End of DTGSEN +* + END diff --git a/2.3-1/src/fortran/lapack/dtgsy2.f b/2.3-1/src/fortran/lapack/dtgsy2.f new file mode 100644 index 00000000..3ebc912f --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgsy2.f @@ -0,0 +1,956 @@ + SUBROUTINE DTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL, + $ IWORK, PQ, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N, + $ PQ + DOUBLE PRECISION RDSCAL, RDSUM, SCALE +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ), + $ D( LDD, * ), E( LDE, * ), F( LDF, * ) +* .. +* +* Purpose +* ======= +* +* DTGSY2 solves the generalized Sylvester equation: +* +* A * R - L * B = scale * C (1) +* D * R - L * E = scale * F, +* +* using Level 1 and 2 BLAS. where R and L are unknown M-by-N matrices, +* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, +* N-by-N and M-by-N, respectively, with real entries. (A, D) and (B, E) +* must be in generalized Schur canonical form, i.e. A, B are upper +* quasi triangular and D, E are upper triangular. The solution (R, L) +* overwrites (C, F). 0 <= SCALE <= 1 is an output scaling factor +* chosen to avoid overflow. +* +* In matrix notation solving equation (1) corresponds to solve +* Z*x = scale*b, where Z is defined as +* +* Z = [ kron(In, A) -kron(B', Im) ] (2) +* [ kron(In, D) -kron(E', Im) ], +* +* Ik is the identity matrix of size k and X' is the transpose of X. +* kron(X, Y) is the Kronecker product between the matrices X and Y. +* In the process of solving (1), we solve a number of such systems +* where Dim(In), Dim(In) = 1 or 2. +* +* If TRANS = 'T', solve the transposed system Z'*y = scale*b for y, +* which is equivalent to solve for R and L in +* +* A' * R + D' * L = scale * C (3) +* R * B' + L * E' = scale * -F +* +* This case is used to compute an estimate of Dif[(A, D), (B, E)] = +* sigma_min(Z) using reverse communicaton with DLACON. +* +* DTGSY2 also (IJOB >= 1) contributes to the computation in STGSYL +* of an upper bound on the separation between to matrix pairs. Then +* the input (A, D), (B, E) are sub-pencils of the matrix pair in +* DTGSYL. See STGSYL for details. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* = 'N', solve the generalized Sylvester equation (1). +* = 'T': solve the 'transposed' system (3). +* +* IJOB (input) INTEGER +* Specifies what kind of functionality to be performed. +* = 0: solve (1) only. +* = 1: A contribution from this subsystem to a Frobenius +* norm-based estimate of the separation between two matrix +* pairs is computed. (look ahead strategy is used). +* = 2: A contribution from this subsystem to a Frobenius +* norm-based estimate of the separation between two matrix +* pairs is computed. (DGECON on sub-systems is used.) +* Not referenced if TRANS = 'T'. +* +* M (input) INTEGER +* On entry, M specifies the order of A and D, and the row +* dimension of C, F, R and L. +* +* N (input) INTEGER +* On entry, N specifies the order of B and E, and the column +* dimension of C, F, R and L. +* +* A (input) DOUBLE PRECISION array, dimension (LDA, M) +* On entry, A contains an upper quasi triangular matrix. +* +* LDA (input) INTEGER +* The leading dimension of the matrix A. LDA >= max(1, M). +* +* B (input) DOUBLE PRECISION array, dimension (LDB, N) +* On entry, B contains an upper quasi triangular matrix. +* +* LDB (input) INTEGER +* The leading dimension of the matrix B. LDB >= max(1, N). +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC, N) +* On entry, C contains the right-hand-side of the first matrix +* equation in (1). +* On exit, if IJOB = 0, C has been overwritten by the +* solution R. +* +* LDC (input) INTEGER +* The leading dimension of the matrix C. LDC >= max(1, M). +* +* D (input) DOUBLE PRECISION array, dimension (LDD, M) +* On entry, D contains an upper triangular matrix. +* +* LDD (input) INTEGER +* The leading dimension of the matrix D. LDD >= max(1, M). +* +* E (input) DOUBLE PRECISION array, dimension (LDE, N) +* On entry, E contains an upper triangular matrix. +* +* LDE (input) INTEGER +* The leading dimension of the matrix E. LDE >= max(1, N). +* +* F (input/output) DOUBLE PRECISION array, dimension (LDF, N) +* On entry, F contains the right-hand-side of the second matrix +* equation in (1). +* On exit, if IJOB = 0, F has been overwritten by the +* solution L. +* +* LDF (input) INTEGER +* The leading dimension of the matrix F. LDF >= max(1, M). +* +* SCALE (output) DOUBLE PRECISION +* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions +* R and L (C and F on entry) will hold the solutions to a +* slightly perturbed system but the input matrices A, B, D and +* E have not been changed. If SCALE = 0, R and L will hold the +* solutions to the homogeneous system with C = F = 0. Normally, +* SCALE = 1. +* +* RDSUM (input/output) DOUBLE PRECISION +* On entry, the sum of squares of computed contributions to +* the Dif-estimate under computation by DTGSYL, where the +* scaling factor RDSCAL (see below) has been factored out. +* On exit, the corresponding sum of squares updated with the +* contributions from the current sub-system. +* If TRANS = 'T' RDSUM is not touched. +* NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL. +* +* RDSCAL (input/output) DOUBLE PRECISION +* On entry, scaling factor used to prevent overflow in RDSUM. +* On exit, RDSCAL is updated w.r.t. the current contributions +* in RDSUM. +* If TRANS = 'T', RDSCAL is not touched. +* NOTE: RDSCAL only makes sense when DTGSY2 is called by +* DTGSYL. +* +* IWORK (workspace) INTEGER array, dimension (M+N+2) +* +* PQ (output) INTEGER +* On exit, the number of subsystems (of size 2-by-2, 4-by-4 and +* 8-by-8) solved by this routine. +* +* INFO (output) INTEGER +* On exit, if INFO is set to +* =0: Successful exit +* <0: If INFO = -i, the i-th argument had an illegal value. +* >0: The matrix pairs (A, D) and (B, E) have common or very +* close eigenvalues. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* Replaced various illegal calls to DCOPY by calls to DLASET. +* Sven Hammarling, 27/5/02. +* +* .. Parameters .. + INTEGER LDZ + PARAMETER ( LDZ = 8 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN + INTEGER I, IE, IERR, II, IS, ISP1, J, JE, JJ, JS, JSP1, + $ K, MB, NB, P, Q, ZDIM + DOUBLE PRECISION ALPHA, SCALOC +* .. +* .. Local Arrays .. + INTEGER IPIV( LDZ ), JPIV( LDZ ) + DOUBLE PRECISION RHS( LDZ ), Z( LDZ, LDZ ) +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMM, DGEMV, DGER, DGESC2, + $ DGETC2, DLASET, DLATDF, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Decode and test input parameters +* + INFO = 0 + IERR = 0 + NOTRAN = LSAME( TRANS, 'N' ) + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -1 + ELSE IF( NOTRAN ) THEN + IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.2 ) ) THEN + INFO = -2 + END IF + END IF + IF( INFO.EQ.0 ) THEN + IF( M.LE.0 ) THEN + INFO = -3 + ELSE IF( N.LE.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LDD.LT.MAX( 1, M ) ) THEN + INFO = -12 + ELSE IF( LDE.LT.MAX( 1, N ) ) THEN + INFO = -14 + ELSE IF( LDF.LT.MAX( 1, M ) ) THEN + INFO = -16 + END IF + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGSY2', -INFO ) + RETURN + END IF +* +* Determine block structure of A +* + PQ = 0 + P = 0 + I = 1 + 10 CONTINUE + IF( I.GT.M ) + $ GO TO 20 + P = P + 1 + IWORK( P ) = I + IF( I.EQ.M ) + $ GO TO 20 + IF( A( I+1, I ).NE.ZERO ) THEN + I = I + 2 + ELSE + I = I + 1 + END IF + GO TO 10 + 20 CONTINUE + IWORK( P+1 ) = M + 1 +* +* Determine block structure of B +* + Q = P + 1 + J = 1 + 30 CONTINUE + IF( J.GT.N ) + $ GO TO 40 + Q = Q + 1 + IWORK( Q ) = J + IF( J.EQ.N ) + $ GO TO 40 + IF( B( J+1, J ).NE.ZERO ) THEN + J = J + 2 + ELSE + J = J + 1 + END IF + GO TO 30 + 40 CONTINUE + IWORK( Q+1 ) = N + 1 + PQ = P*( Q-P-1 ) +* + IF( NOTRAN ) THEN +* +* Solve (I, J) - subsystem +* A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J) +* D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J) +* for I = P, P - 1, ..., 1; J = 1, 2, ..., Q +* + SCALE = ONE + SCALOC = ONE + DO 120 J = P + 2, Q + JS = IWORK( J ) + JSP1 = JS + 1 + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + DO 110 I = P, 1, -1 +* + IS = IWORK( I ) + ISP1 = IS + 1 + IE = IWORK( I+1 ) - 1 + MB = IE - IS + 1 + ZDIM = MB*NB*2 +* + IF( ( MB.EQ.1 ) .AND. ( NB.EQ.1 ) ) THEN +* +* Build a 2-by-2 system Z * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = D( IS, IS ) + Z( 1, 2 ) = -B( JS, JS ) + Z( 2, 2 ) = -E( JS, JS ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = F( IS, JS ) +* +* Solve Z * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR +* + IF( IJOB.EQ.0 ) THEN + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, + $ SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 50 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 50 CONTINUE + SCALE = SCALE*SCALOC + END IF + ELSE + CALL DLATDF( IJOB, ZDIM, Z, LDZ, RHS, RDSUM, + $ RDSCAL, IPIV, JPIV ) + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + F( IS, JS ) = RHS( 2 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( I.GT.1 ) THEN + ALPHA = -RHS( 1 ) + CALL DAXPY( IS-1, ALPHA, A( 1, IS ), 1, C( 1, JS ), + $ 1 ) + CALL DAXPY( IS-1, ALPHA, D( 1, IS ), 1, F( 1, JS ), + $ 1 ) + END IF + IF( J.LT.Q ) THEN + CALL DAXPY( N-JE, RHS( 2 ), B( JS, JE+1 ), LDB, + $ C( IS, JE+1 ), LDC ) + CALL DAXPY( N-JE, RHS( 2 ), E( JS, JE+1 ), LDE, + $ F( IS, JE+1 ), LDF ) + END IF +* + ELSE IF( ( MB.EQ.1 ) .AND. ( NB.EQ.2 ) ) THEN +* +* Build a 4-by-4 system Z * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = ZERO + Z( 3, 1 ) = D( IS, IS ) + Z( 4, 1 ) = ZERO +* + Z( 1, 2 ) = ZERO + Z( 2, 2 ) = A( IS, IS ) + Z( 3, 2 ) = ZERO + Z( 4, 2 ) = D( IS, IS ) +* + Z( 1, 3 ) = -B( JS, JS ) + Z( 2, 3 ) = -B( JS, JSP1 ) + Z( 3, 3 ) = -E( JS, JS ) + Z( 4, 3 ) = -E( JS, JSP1 ) +* + Z( 1, 4 ) = -B( JSP1, JS ) + Z( 2, 4 ) = -B( JSP1, JSP1 ) + Z( 3, 4 ) = ZERO + Z( 4, 4 ) = -E( JSP1, JSP1 ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = C( IS, JSP1 ) + RHS( 3 ) = F( IS, JS ) + RHS( 4 ) = F( IS, JSP1 ) +* +* Solve Z * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR +* + IF( IJOB.EQ.0 ) THEN + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, + $ SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 60 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 60 CONTINUE + SCALE = SCALE*SCALOC + END IF + ELSE + CALL DLATDF( IJOB, ZDIM, Z, LDZ, RHS, RDSUM, + $ RDSCAL, IPIV, JPIV ) + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + C( IS, JSP1 ) = RHS( 2 ) + F( IS, JS ) = RHS( 3 ) + F( IS, JSP1 ) = RHS( 4 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( I.GT.1 ) THEN + CALL DGER( IS-1, NB, -ONE, A( 1, IS ), 1, RHS( 1 ), + $ 1, C( 1, JS ), LDC ) + CALL DGER( IS-1, NB, -ONE, D( 1, IS ), 1, RHS( 1 ), + $ 1, F( 1, JS ), LDF ) + END IF + IF( J.LT.Q ) THEN + CALL DAXPY( N-JE, RHS( 3 ), B( JS, JE+1 ), LDB, + $ C( IS, JE+1 ), LDC ) + CALL DAXPY( N-JE, RHS( 3 ), E( JS, JE+1 ), LDE, + $ F( IS, JE+1 ), LDF ) + CALL DAXPY( N-JE, RHS( 4 ), B( JSP1, JE+1 ), LDB, + $ C( IS, JE+1 ), LDC ) + CALL DAXPY( N-JE, RHS( 4 ), E( JSP1, JE+1 ), LDE, + $ F( IS, JE+1 ), LDF ) + END IF +* + ELSE IF( ( MB.EQ.2 ) .AND. ( NB.EQ.1 ) ) THEN +* +* Build a 4-by-4 system Z * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = A( ISP1, IS ) + Z( 3, 1 ) = D( IS, IS ) + Z( 4, 1 ) = ZERO +* + Z( 1, 2 ) = A( IS, ISP1 ) + Z( 2, 2 ) = A( ISP1, ISP1 ) + Z( 3, 2 ) = D( IS, ISP1 ) + Z( 4, 2 ) = D( ISP1, ISP1 ) +* + Z( 1, 3 ) = -B( JS, JS ) + Z( 2, 3 ) = ZERO + Z( 3, 3 ) = -E( JS, JS ) + Z( 4, 3 ) = ZERO +* + Z( 1, 4 ) = ZERO + Z( 2, 4 ) = -B( JS, JS ) + Z( 3, 4 ) = ZERO + Z( 4, 4 ) = -E( JS, JS ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = C( ISP1, JS ) + RHS( 3 ) = F( IS, JS ) + RHS( 4 ) = F( ISP1, JS ) +* +* Solve Z * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR + IF( IJOB.EQ.0 ) THEN + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, + $ SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 70 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 70 CONTINUE + SCALE = SCALE*SCALOC + END IF + ELSE + CALL DLATDF( IJOB, ZDIM, Z, LDZ, RHS, RDSUM, + $ RDSCAL, IPIV, JPIV ) + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + C( ISP1, JS ) = RHS( 2 ) + F( IS, JS ) = RHS( 3 ) + F( ISP1, JS ) = RHS( 4 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( I.GT.1 ) THEN + CALL DGEMV( 'N', IS-1, MB, -ONE, A( 1, IS ), LDA, + $ RHS( 1 ), 1, ONE, C( 1, JS ), 1 ) + CALL DGEMV( 'N', IS-1, MB, -ONE, D( 1, IS ), LDD, + $ RHS( 1 ), 1, ONE, F( 1, JS ), 1 ) + END IF + IF( J.LT.Q ) THEN + CALL DGER( MB, N-JE, ONE, RHS( 3 ), 1, + $ B( JS, JE+1 ), LDB, C( IS, JE+1 ), LDC ) + CALL DGER( MB, N-JE, ONE, RHS( 3 ), 1, + $ E( JS, JE+1 ), LDB, F( IS, JE+1 ), LDC ) + END IF +* + ELSE IF( ( MB.EQ.2 ) .AND. ( NB.EQ.2 ) ) THEN +* +* Build an 8-by-8 system Z * x = RHS +* + CALL DLASET( 'F', LDZ, LDZ, ZERO, ZERO, Z, LDZ ) +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = A( ISP1, IS ) + Z( 5, 1 ) = D( IS, IS ) +* + Z( 1, 2 ) = A( IS, ISP1 ) + Z( 2, 2 ) = A( ISP1, ISP1 ) + Z( 5, 2 ) = D( IS, ISP1 ) + Z( 6, 2 ) = D( ISP1, ISP1 ) +* + Z( 3, 3 ) = A( IS, IS ) + Z( 4, 3 ) = A( ISP1, IS ) + Z( 7, 3 ) = D( IS, IS ) +* + Z( 3, 4 ) = A( IS, ISP1 ) + Z( 4, 4 ) = A( ISP1, ISP1 ) + Z( 7, 4 ) = D( IS, ISP1 ) + Z( 8, 4 ) = D( ISP1, ISP1 ) +* + Z( 1, 5 ) = -B( JS, JS ) + Z( 3, 5 ) = -B( JS, JSP1 ) + Z( 5, 5 ) = -E( JS, JS ) + Z( 7, 5 ) = -E( JS, JSP1 ) +* + Z( 2, 6 ) = -B( JS, JS ) + Z( 4, 6 ) = -B( JS, JSP1 ) + Z( 6, 6 ) = -E( JS, JS ) + Z( 8, 6 ) = -E( JS, JSP1 ) +* + Z( 1, 7 ) = -B( JSP1, JS ) + Z( 3, 7 ) = -B( JSP1, JSP1 ) + Z( 7, 7 ) = -E( JSP1, JSP1 ) +* + Z( 2, 8 ) = -B( JSP1, JS ) + Z( 4, 8 ) = -B( JSP1, JSP1 ) + Z( 8, 8 ) = -E( JSP1, JSP1 ) +* +* Set up right hand side(s) +* + K = 1 + II = MB*NB + 1 + DO 80 JJ = 0, NB - 1 + CALL DCOPY( MB, C( IS, JS+JJ ), 1, RHS( K ), 1 ) + CALL DCOPY( MB, F( IS, JS+JJ ), 1, RHS( II ), 1 ) + K = K + MB + II = II + MB + 80 CONTINUE +* +* Solve Z * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR + IF( IJOB.EQ.0 ) THEN + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, + $ SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 90 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 90 CONTINUE + SCALE = SCALE*SCALOC + END IF + ELSE + CALL DLATDF( IJOB, ZDIM, Z, LDZ, RHS, RDSUM, + $ RDSCAL, IPIV, JPIV ) + END IF +* +* Unpack solution vector(s) +* + K = 1 + II = MB*NB + 1 + DO 100 JJ = 0, NB - 1 + CALL DCOPY( MB, RHS( K ), 1, C( IS, JS+JJ ), 1 ) + CALL DCOPY( MB, RHS( II ), 1, F( IS, JS+JJ ), 1 ) + K = K + MB + II = II + MB + 100 CONTINUE +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( I.GT.1 ) THEN + CALL DGEMM( 'N', 'N', IS-1, NB, MB, -ONE, + $ A( 1, IS ), LDA, RHS( 1 ), MB, ONE, + $ C( 1, JS ), LDC ) + CALL DGEMM( 'N', 'N', IS-1, NB, MB, -ONE, + $ D( 1, IS ), LDD, RHS( 1 ), MB, ONE, + $ F( 1, JS ), LDF ) + END IF + IF( J.LT.Q ) THEN + K = MB*NB + 1 + CALL DGEMM( 'N', 'N', MB, N-JE, NB, ONE, RHS( K ), + $ MB, B( JS, JE+1 ), LDB, ONE, + $ C( IS, JE+1 ), LDC ) + CALL DGEMM( 'N', 'N', MB, N-JE, NB, ONE, RHS( K ), + $ MB, E( JS, JE+1 ), LDE, ONE, + $ F( IS, JE+1 ), LDF ) + END IF +* + END IF +* + 110 CONTINUE + 120 CONTINUE + ELSE +* +* Solve (I, J) - subsystem +* A(I, I)' * R(I, J) + D(I, I)' * L(J, J) = C(I, J) +* R(I, I) * B(J, J) + L(I, J) * E(J, J) = -F(I, J) +* for I = 1, 2, ..., P, J = Q, Q - 1, ..., 1 +* + SCALE = ONE + SCALOC = ONE + DO 200 I = 1, P +* + IS = IWORK( I ) + ISP1 = IS + 1 + IE = ( I+1 ) - 1 + MB = IE - IS + 1 + DO 190 J = Q, P + 2, -1 +* + JS = IWORK( J ) + JSP1 = JS + 1 + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + ZDIM = MB*NB*2 + IF( ( MB.EQ.1 ) .AND. ( NB.EQ.1 ) ) THEN +* +* Build a 2-by-2 system Z' * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = -B( JS, JS ) + Z( 1, 2 ) = D( IS, IS ) + Z( 2, 2 ) = -E( JS, JS ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = F( IS, JS ) +* +* Solve Z' * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR +* + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 130 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 130 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + F( IS, JS ) = RHS( 2 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( J.GT.P+2 ) THEN + ALPHA = RHS( 1 ) + CALL DAXPY( JS-1, ALPHA, B( 1, JS ), 1, F( IS, 1 ), + $ LDF ) + ALPHA = RHS( 2 ) + CALL DAXPY( JS-1, ALPHA, E( 1, JS ), 1, F( IS, 1 ), + $ LDF ) + END IF + IF( I.LT.P ) THEN + ALPHA = -RHS( 1 ) + CALL DAXPY( M-IE, ALPHA, A( IS, IE+1 ), LDA, + $ C( IE+1, JS ), 1 ) + ALPHA = -RHS( 2 ) + CALL DAXPY( M-IE, ALPHA, D( IS, IE+1 ), LDD, + $ C( IE+1, JS ), 1 ) + END IF +* + ELSE IF( ( MB.EQ.1 ) .AND. ( NB.EQ.2 ) ) THEN +* +* Build a 4-by-4 system Z' * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = ZERO + Z( 3, 1 ) = -B( JS, JS ) + Z( 4, 1 ) = -B( JSP1, JS ) +* + Z( 1, 2 ) = ZERO + Z( 2, 2 ) = A( IS, IS ) + Z( 3, 2 ) = -B( JS, JSP1 ) + Z( 4, 2 ) = -B( JSP1, JSP1 ) +* + Z( 1, 3 ) = D( IS, IS ) + Z( 2, 3 ) = ZERO + Z( 3, 3 ) = -E( JS, JS ) + Z( 4, 3 ) = ZERO +* + Z( 1, 4 ) = ZERO + Z( 2, 4 ) = D( IS, IS ) + Z( 3, 4 ) = -E( JS, JSP1 ) + Z( 4, 4 ) = -E( JSP1, JSP1 ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = C( IS, JSP1 ) + RHS( 3 ) = F( IS, JS ) + RHS( 4 ) = F( IS, JSP1 ) +* +* Solve Z' * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 140 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 140 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + C( IS, JSP1 ) = RHS( 2 ) + F( IS, JS ) = RHS( 3 ) + F( IS, JSP1 ) = RHS( 4 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( J.GT.P+2 ) THEN + CALL DAXPY( JS-1, RHS( 1 ), B( 1, JS ), 1, + $ F( IS, 1 ), LDF ) + CALL DAXPY( JS-1, RHS( 2 ), B( 1, JSP1 ), 1, + $ F( IS, 1 ), LDF ) + CALL DAXPY( JS-1, RHS( 3 ), E( 1, JS ), 1, + $ F( IS, 1 ), LDF ) + CALL DAXPY( JS-1, RHS( 4 ), E( 1, JSP1 ), 1, + $ F( IS, 1 ), LDF ) + END IF + IF( I.LT.P ) THEN + CALL DGER( M-IE, NB, -ONE, A( IS, IE+1 ), LDA, + $ RHS( 1 ), 1, C( IE+1, JS ), LDC ) + CALL DGER( M-IE, NB, -ONE, D( IS, IE+1 ), LDD, + $ RHS( 3 ), 1, C( IE+1, JS ), LDC ) + END IF +* + ELSE IF( ( MB.EQ.2 ) .AND. ( NB.EQ.1 ) ) THEN +* +* Build a 4-by-4 system Z' * x = RHS +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = A( IS, ISP1 ) + Z( 3, 1 ) = -B( JS, JS ) + Z( 4, 1 ) = ZERO +* + Z( 1, 2 ) = A( ISP1, IS ) + Z( 2, 2 ) = A( ISP1, ISP1 ) + Z( 3, 2 ) = ZERO + Z( 4, 2 ) = -B( JS, JS ) +* + Z( 1, 3 ) = D( IS, IS ) + Z( 2, 3 ) = D( IS, ISP1 ) + Z( 3, 3 ) = -E( JS, JS ) + Z( 4, 3 ) = ZERO +* + Z( 1, 4 ) = ZERO + Z( 2, 4 ) = D( ISP1, ISP1 ) + Z( 3, 4 ) = ZERO + Z( 4, 4 ) = -E( JS, JS ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( IS, JS ) + RHS( 2 ) = C( ISP1, JS ) + RHS( 3 ) = F( IS, JS ) + RHS( 4 ) = F( ISP1, JS ) +* +* Solve Z' * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR +* + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 150 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 150 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Unpack solution vector(s) +* + C( IS, JS ) = RHS( 1 ) + C( ISP1, JS ) = RHS( 2 ) + F( IS, JS ) = RHS( 3 ) + F( ISP1, JS ) = RHS( 4 ) +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( J.GT.P+2 ) THEN + CALL DGER( MB, JS-1, ONE, RHS( 1 ), 1, B( 1, JS ), + $ 1, F( IS, 1 ), LDF ) + CALL DGER( MB, JS-1, ONE, RHS( 3 ), 1, E( 1, JS ), + $ 1, F( IS, 1 ), LDF ) + END IF + IF( I.LT.P ) THEN + CALL DGEMV( 'T', MB, M-IE, -ONE, A( IS, IE+1 ), + $ LDA, RHS( 1 ), 1, ONE, C( IE+1, JS ), + $ 1 ) + CALL DGEMV( 'T', MB, M-IE, -ONE, D( IS, IE+1 ), + $ LDD, RHS( 3 ), 1, ONE, C( IE+1, JS ), + $ 1 ) + END IF +* + ELSE IF( ( MB.EQ.2 ) .AND. ( NB.EQ.2 ) ) THEN +* +* Build an 8-by-8 system Z' * x = RHS +* + CALL DLASET( 'F', LDZ, LDZ, ZERO, ZERO, Z, LDZ ) +* + Z( 1, 1 ) = A( IS, IS ) + Z( 2, 1 ) = A( IS, ISP1 ) + Z( 5, 1 ) = -B( JS, JS ) + Z( 7, 1 ) = -B( JSP1, JS ) +* + Z( 1, 2 ) = A( ISP1, IS ) + Z( 2, 2 ) = A( ISP1, ISP1 ) + Z( 6, 2 ) = -B( JS, JS ) + Z( 8, 2 ) = -B( JSP1, JS ) +* + Z( 3, 3 ) = A( IS, IS ) + Z( 4, 3 ) = A( IS, ISP1 ) + Z( 5, 3 ) = -B( JS, JSP1 ) + Z( 7, 3 ) = -B( JSP1, JSP1 ) +* + Z( 3, 4 ) = A( ISP1, IS ) + Z( 4, 4 ) = A( ISP1, ISP1 ) + Z( 6, 4 ) = -B( JS, JSP1 ) + Z( 8, 4 ) = -B( JSP1, JSP1 ) +* + Z( 1, 5 ) = D( IS, IS ) + Z( 2, 5 ) = D( IS, ISP1 ) + Z( 5, 5 ) = -E( JS, JS ) +* + Z( 2, 6 ) = D( ISP1, ISP1 ) + Z( 6, 6 ) = -E( JS, JS ) +* + Z( 3, 7 ) = D( IS, IS ) + Z( 4, 7 ) = D( IS, ISP1 ) + Z( 5, 7 ) = -E( JS, JSP1 ) + Z( 7, 7 ) = -E( JSP1, JSP1 ) +* + Z( 4, 8 ) = D( ISP1, ISP1 ) + Z( 6, 8 ) = -E( JS, JSP1 ) + Z( 8, 8 ) = -E( JSP1, JSP1 ) +* +* Set up right hand side(s) +* + K = 1 + II = MB*NB + 1 + DO 160 JJ = 0, NB - 1 + CALL DCOPY( MB, C( IS, JS+JJ ), 1, RHS( K ), 1 ) + CALL DCOPY( MB, F( IS, JS+JJ ), 1, RHS( II ), 1 ) + K = K + MB + II = II + MB + 160 CONTINUE +* +* +* Solve Z' * x = RHS +* + CALL DGETC2( ZDIM, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR +* + CALL DGESC2( ZDIM, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 170 K = 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 170 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Unpack solution vector(s) +* + K = 1 + II = MB*NB + 1 + DO 180 JJ = 0, NB - 1 + CALL DCOPY( MB, RHS( K ), 1, C( IS, JS+JJ ), 1 ) + CALL DCOPY( MB, RHS( II ), 1, F( IS, JS+JJ ), 1 ) + K = K + MB + II = II + MB + 180 CONTINUE +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( J.GT.P+2 ) THEN + CALL DGEMM( 'N', 'T', MB, JS-1, NB, ONE, + $ C( IS, JS ), LDC, B( 1, JS ), LDB, ONE, + $ F( IS, 1 ), LDF ) + CALL DGEMM( 'N', 'T', MB, JS-1, NB, ONE, + $ F( IS, JS ), LDF, E( 1, JS ), LDE, ONE, + $ F( IS, 1 ), LDF ) + END IF + IF( I.LT.P ) THEN + CALL DGEMM( 'T', 'N', M-IE, NB, MB, -ONE, + $ A( IS, IE+1 ), LDA, C( IS, JS ), LDC, + $ ONE, C( IE+1, JS ), LDC ) + CALL DGEMM( 'T', 'N', M-IE, NB, MB, -ONE, + $ D( IS, IE+1 ), LDD, F( IS, JS ), LDF, + $ ONE, C( IE+1, JS ), LDC ) + END IF +* + END IF +* + 190 CONTINUE + 200 CONTINUE +* + END IF + RETURN +* +* End of DTGSY2 +* + END diff --git a/2.3-1/src/fortran/lapack/dtgsyl.f b/2.3-1/src/fortran/lapack/dtgsyl.f new file mode 100644 index 00000000..01866717 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtgsyl.f @@ -0,0 +1,556 @@ + SUBROUTINE DTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK, + $ IWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, + $ LWORK, M, N + DOUBLE PRECISION DIF, SCALE +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ), + $ D( LDD, * ), E( LDE, * ), F( LDF, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* DTGSYL solves the generalized Sylvester equation: +* +* A * R - L * B = scale * C (1) +* D * R - L * E = scale * F +* +* where R and L are unknown m-by-n matrices, (A, D), (B, E) and +* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n, +* respectively, with real entries. (A, D) and (B, E) must be in +* generalized (real) Schur canonical form, i.e. A, B are upper quasi +* triangular and D, E are upper triangular. +* +* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output +* scaling factor chosen to avoid overflow. +* +* In matrix notation (1) is equivalent to solve Zx = scale b, where +* Z is defined as +* +* Z = [ kron(In, A) -kron(B', Im) ] (2) +* [ kron(In, D) -kron(E', Im) ]. +* +* Here Ik is the identity matrix of size k and X' is the transpose of +* X. kron(X, Y) is the Kronecker product between the matrices X and Y. +* +* If TRANS = 'T', DTGSYL solves the transposed system Z'*y = scale*b, +* which is equivalent to solve for R and L in +* +* A' * R + D' * L = scale * C (3) +* R * B' + L * E' = scale * (-F) +* +* This case (TRANS = 'T') is used to compute an one-norm-based estimate +* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D) +* and (B,E), using DLACON. +* +* If IJOB >= 1, DTGSYL computes a Frobenius norm-based estimate +* of Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the +* reciprocal of the smallest singular value of Z. See [1-2] for more +* information. +* +* This is a level 3 BLAS algorithm. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* = 'N', solve the generalized Sylvester equation (1). +* = 'T', solve the 'transposed' system (3). +* +* IJOB (input) INTEGER +* Specifies what kind of functionality to be performed. +* =0: solve (1) only. +* =1: The functionality of 0 and 3. +* =2: The functionality of 0 and 4. +* =3: Only an estimate of Dif[(A,D), (B,E)] is computed. +* (look ahead strategy IJOB = 1 is used). +* =4: Only an estimate of Dif[(A,D), (B,E)] is computed. +* ( DGECON on sub-systems is used ). +* Not referenced if TRANS = 'T'. +* +* M (input) INTEGER +* The order of the matrices A and D, and the row dimension of +* the matrices C, F, R and L. +* +* N (input) INTEGER +* The order of the matrices B and E, and the column dimension +* of the matrices C, F, R and L. +* +* A (input) DOUBLE PRECISION array, dimension (LDA, M) +* The upper quasi triangular matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1, M). +* +* B (input) DOUBLE PRECISION array, dimension (LDB, N) +* The upper quasi triangular matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1, N). +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC, N) +* On entry, C contains the right-hand-side of the first matrix +* equation in (1) or (3). +* On exit, if IJOB = 0, 1 or 2, C has been overwritten by +* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R, +* the solution achieved during the computation of the +* Dif-estimate. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1, M). +* +* D (input) DOUBLE PRECISION array, dimension (LDD, M) +* The upper triangular matrix D. +* +* LDD (input) INTEGER +* The leading dimension of the array D. LDD >= max(1, M). +* +* E (input) DOUBLE PRECISION array, dimension (LDE, N) +* The upper triangular matrix E. +* +* LDE (input) INTEGER +* The leading dimension of the array E. LDE >= max(1, N). +* +* F (input/output) DOUBLE PRECISION array, dimension (LDF, N) +* On entry, F contains the right-hand-side of the second matrix +* equation in (1) or (3). +* On exit, if IJOB = 0, 1 or 2, F has been overwritten by +* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L, +* the solution achieved during the computation of the +* Dif-estimate. +* +* LDF (input) INTEGER +* The leading dimension of the array F. LDF >= max(1, M). +* +* DIF (output) DOUBLE PRECISION +* On exit DIF is the reciprocal of a lower bound of the +* reciprocal of the Dif-function, i.e. DIF is an upper bound of +* Dif[(A,D), (B,E)] = sigma_min(Z), where Z as in (2). +* IF IJOB = 0 or TRANS = 'T', DIF is not touched. +* +* SCALE (output) DOUBLE PRECISION +* On exit SCALE is the scaling factor in (1) or (3). +* If 0 < SCALE < 1, C and F hold the solutions R and L, resp., +* to a slightly perturbed system but the input matrices A, B, D +* and E have not been changed. If SCALE = 0, C and F hold the +* solutions R and L, respectively, to the homogeneous system +* with C = F = 0. Normally, SCALE = 1. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK > = 1. +* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* IWORK (workspace) INTEGER array, dimension (M+N+6) +* +* INFO (output) INTEGER +* =0: successful exit +* <0: If INFO = -i, the i-th argument had an illegal value. +* >0: (A, D) and (B, E) have common or close eigenvalues. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software +* for Solving the Generalized Sylvester Equation and Estimating the +* Separation between Regular Matrix Pairs, Report UMINF - 93.23, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, December 1993, Revised April 1994, Also as LAPACK Working +* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, +* No 1, 1996. +* +* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester +* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal. +* Appl., 15(4):1045-1060, 1994 +* +* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with +* Condition Estimators for Solving the Generalized Sylvester +* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7, +* July 1989, pp 745-751. +* +* ===================================================================== +* Replaced various illegal calls to DCOPY by calls to DLASET. +* Sven Hammarling, 1/5/02. +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, NOTRAN + INTEGER I, IE, IFUNC, IROUND, IS, ISOLVE, J, JE, JS, K, + $ LINFO, LWMIN, MB, NB, P, PPQQ, PQ, Q + DOUBLE PRECISION DSCALE, DSUM, SCALE2, SCALOC +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DGEMM, DLACPY, DLASET, DSCAL, DTGSY2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode and test input parameters +* + INFO = 0 + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) ) THEN + INFO = -1 + ELSE IF( NOTRAN ) THEN + IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.4 ) ) THEN + INFO = -2 + END IF + END IF + IF( INFO.EQ.0 ) THEN + IF( M.LE.0 ) THEN + INFO = -3 + ELSE IF( N.LE.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LDD.LT.MAX( 1, M ) ) THEN + INFO = -12 + ELSE IF( LDE.LT.MAX( 1, N ) ) THEN + INFO = -14 + ELSE IF( LDF.LT.MAX( 1, M ) ) THEN + INFO = -16 + END IF + END IF +* + IF( INFO.EQ.0 ) THEN + IF( NOTRAN ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.2 ) THEN + LWMIN = MAX( 1, 2*M*N ) + ELSE + LWMIN = 1 + END IF + ELSE + LWMIN = 1 + END IF + WORK( 1 ) = LWMIN +* + IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -20 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTGSYL', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + SCALE = 1 + IF( NOTRAN ) THEN + IF( IJOB.NE.0 ) THEN + DIF = 0 + END IF + END IF + RETURN + END IF +* +* Determine optimal block sizes MB and NB +* + MB = ILAENV( 2, 'DTGSYL', TRANS, M, N, -1, -1 ) + NB = ILAENV( 5, 'DTGSYL', TRANS, M, N, -1, -1 ) +* + ISOLVE = 1 + IFUNC = 0 + IF( NOTRAN ) THEN + IF( IJOB.GE.3 ) THEN + IFUNC = IJOB - 2 + CALL DLASET( 'F', M, N, ZERO, ZERO, C, LDC ) + CALL DLASET( 'F', M, N, ZERO, ZERO, F, LDF ) + ELSE IF( IJOB.GE.1 ) THEN + ISOLVE = 2 + END IF + END IF +* + IF( ( MB.LE.1 .AND. NB.LE.1 ) .OR. ( MB.GE.M .AND. NB.GE.N ) ) + $ THEN +* + DO 30 IROUND = 1, ISOLVE +* +* Use unblocked Level 2 solver +* + DSCALE = ZERO + DSUM = ONE + PQ = 0 + CALL DTGSY2( TRANS, IFUNC, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, DSUM, DSCALE, + $ IWORK, PQ, INFO ) + IF( DSCALE.NE.ZERO ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN + DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) ) + ELSE + DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) ) + END IF + END IF +* + IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN + IF( NOTRAN ) THEN + IFUNC = IJOB + END IF + SCALE2 = SCALE + CALL DLACPY( 'F', M, N, C, LDC, WORK, M ) + CALL DLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M ) + CALL DLASET( 'F', M, N, ZERO, ZERO, C, LDC ) + CALL DLASET( 'F', M, N, ZERO, ZERO, F, LDF ) + ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN + CALL DLACPY( 'F', M, N, WORK, M, C, LDC ) + CALL DLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF ) + SCALE = SCALE2 + END IF + 30 CONTINUE +* + RETURN + END IF +* +* Determine block structure of A +* + P = 0 + I = 1 + 40 CONTINUE + IF( I.GT.M ) + $ GO TO 50 + P = P + 1 + IWORK( P ) = I + I = I + MB + IF( I.GE.M ) + $ GO TO 50 + IF( A( I, I-1 ).NE.ZERO ) + $ I = I + 1 + GO TO 40 + 50 CONTINUE +* + IWORK( P+1 ) = M + 1 + IF( IWORK( P ).EQ.IWORK( P+1 ) ) + $ P = P - 1 +* +* Determine block structure of B +* + Q = P + 1 + J = 1 + 60 CONTINUE + IF( J.GT.N ) + $ GO TO 70 + Q = Q + 1 + IWORK( Q ) = J + J = J + NB + IF( J.GE.N ) + $ GO TO 70 + IF( B( J, J-1 ).NE.ZERO ) + $ J = J + 1 + GO TO 60 + 70 CONTINUE +* + IWORK( Q+1 ) = N + 1 + IF( IWORK( Q ).EQ.IWORK( Q+1 ) ) + $ Q = Q - 1 +* + IF( NOTRAN ) THEN +* + DO 150 IROUND = 1, ISOLVE +* +* Solve (I, J)-subsystem +* A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J) +* D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J) +* for I = P, P - 1,..., 1; J = 1, 2,..., Q +* + DSCALE = ZERO + DSUM = ONE + PQ = 0 + SCALE = ONE + DO 130 J = P + 2, Q + JS = IWORK( J ) + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + DO 120 I = P, 1, -1 + IS = IWORK( I ) + IE = IWORK( I+1 ) - 1 + MB = IE - IS + 1 + PPQQ = 0 + CALL DTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA, + $ B( JS, JS ), LDB, C( IS, JS ), LDC, + $ D( IS, IS ), LDD, E( JS, JS ), LDE, + $ F( IS, JS ), LDF, SCALOC, DSUM, DSCALE, + $ IWORK( Q+2 ), PPQQ, LINFO ) + IF( LINFO.GT.0 ) + $ INFO = LINFO +* + PQ = PQ + PPQQ + IF( SCALOC.NE.ONE ) THEN + DO 80 K = 1, JS - 1 + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 80 CONTINUE + DO 90 K = JS, JE + CALL DSCAL( IS-1, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( IS-1, SCALOC, F( 1, K ), 1 ) + 90 CONTINUE + DO 100 K = JS, JE + CALL DSCAL( M-IE, SCALOC, C( IE+1, K ), 1 ) + CALL DSCAL( M-IE, SCALOC, F( IE+1, K ), 1 ) + 100 CONTINUE + DO 110 K = JE + 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 110 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Substitute R(I, J) and L(I, J) into remaining +* equation. +* + IF( I.GT.1 ) THEN + CALL DGEMM( 'N', 'N', IS-1, NB, MB, -ONE, + $ A( 1, IS ), LDA, C( IS, JS ), LDC, ONE, + $ C( 1, JS ), LDC ) + CALL DGEMM( 'N', 'N', IS-1, NB, MB, -ONE, + $ D( 1, IS ), LDD, C( IS, JS ), LDC, ONE, + $ F( 1, JS ), LDF ) + END IF + IF( J.LT.Q ) THEN + CALL DGEMM( 'N', 'N', MB, N-JE, NB, ONE, + $ F( IS, JS ), LDF, B( JS, JE+1 ), LDB, + $ ONE, C( IS, JE+1 ), LDC ) + CALL DGEMM( 'N', 'N', MB, N-JE, NB, ONE, + $ F( IS, JS ), LDF, E( JS, JE+1 ), LDE, + $ ONE, F( IS, JE+1 ), LDF ) + END IF + 120 CONTINUE + 130 CONTINUE + IF( DSCALE.NE.ZERO ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN + DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) ) + ELSE + DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) ) + END IF + END IF + IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN + IF( NOTRAN ) THEN + IFUNC = IJOB + END IF + SCALE2 = SCALE + CALL DLACPY( 'F', M, N, C, LDC, WORK, M ) + CALL DLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M ) + CALL DLASET( 'F', M, N, ZERO, ZERO, C, LDC ) + CALL DLASET( 'F', M, N, ZERO, ZERO, F, LDF ) + ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN + CALL DLACPY( 'F', M, N, WORK, M, C, LDC ) + CALL DLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF ) + SCALE = SCALE2 + END IF + 150 CONTINUE +* + ELSE +* +* Solve transposed (I, J)-subsystem +* A(I, I)' * R(I, J) + D(I, I)' * L(I, J) = C(I, J) +* R(I, J) * B(J, J)' + L(I, J) * E(J, J)' = -F(I, J) +* for I = 1,2,..., P; J = Q, Q-1,..., 1 +* + SCALE = ONE + DO 210 I = 1, P + IS = IWORK( I ) + IE = IWORK( I+1 ) - 1 + MB = IE - IS + 1 + DO 200 J = Q, P + 2, -1 + JS = IWORK( J ) + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + CALL DTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA, + $ B( JS, JS ), LDB, C( IS, JS ), LDC, + $ D( IS, IS ), LDD, E( JS, JS ), LDE, + $ F( IS, JS ), LDF, SCALOC, DSUM, DSCALE, + $ IWORK( Q+2 ), PPQQ, LINFO ) + IF( LINFO.GT.0 ) + $ INFO = LINFO + IF( SCALOC.NE.ONE ) THEN + DO 160 K = 1, JS - 1 + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 160 CONTINUE + DO 170 K = JS, JE + CALL DSCAL( IS-1, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( IS-1, SCALOC, F( 1, K ), 1 ) + 170 CONTINUE + DO 180 K = JS, JE + CALL DSCAL( M-IE, SCALOC, C( IE+1, K ), 1 ) + CALL DSCAL( M-IE, SCALOC, F( IE+1, K ), 1 ) + 180 CONTINUE + DO 190 K = JE + 1, N + CALL DSCAL( M, SCALOC, C( 1, K ), 1 ) + CALL DSCAL( M, SCALOC, F( 1, K ), 1 ) + 190 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Substitute R(I, J) and L(I, J) into remaining equation. +* + IF( J.GT.P+2 ) THEN + CALL DGEMM( 'N', 'T', MB, JS-1, NB, ONE, C( IS, JS ), + $ LDC, B( 1, JS ), LDB, ONE, F( IS, 1 ), + $ LDF ) + CALL DGEMM( 'N', 'T', MB, JS-1, NB, ONE, F( IS, JS ), + $ LDF, E( 1, JS ), LDE, ONE, F( IS, 1 ), + $ LDF ) + END IF + IF( I.LT.P ) THEN + CALL DGEMM( 'T', 'N', M-IE, NB, MB, -ONE, + $ A( IS, IE+1 ), LDA, C( IS, JS ), LDC, ONE, + $ C( IE+1, JS ), LDC ) + CALL DGEMM( 'T', 'N', M-IE, NB, MB, -ONE, + $ D( IS, IE+1 ), LDD, F( IS, JS ), LDF, ONE, + $ C( IE+1, JS ), LDC ) + END IF + 200 CONTINUE + 210 CONTINUE +* + END IF +* + WORK( 1 ) = LWMIN +* + RETURN +* +* End of DTGSYL +* + END diff --git a/2.3-1/src/fortran/lapack/dtrcon.f b/2.3-1/src/fortran/lapack/dtrcon.f new file mode 100644 index 00000000..23da5927 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrcon.f @@ -0,0 +1,197 @@ + SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, + $ IWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call DLACN2 in place of DLACON, 5 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER DIAG, NORM, UPLO + INTEGER INFO, LDA, N + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + DOUBLE PRECISION A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DTRCON estimates the reciprocal of the condition number of a +* triangular matrix A, in either the 1-norm or the infinity-norm. +* +* The norm of A is computed and an estimate is obtained for +* norm(inv(A)), then the reciprocal of the condition number is +* computed as +* RCOND = 1 / ( norm(A) * norm(inv(A)) ). +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies whether the 1-norm condition number or the +* infinity-norm condition number is required: +* = '1' or 'O': 1-norm; +* = 'I': Infinity-norm. +* +* UPLO (input) CHARACTER*1 +* = 'U': A is upper triangular; +* = 'L': A is lower triangular. +* +* DIAG (input) CHARACTER*1 +* = 'N': A is non-unit triangular; +* = 'U': A is unit triangular. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The triangular matrix A. If UPLO = 'U', the leading N-by-N +* upper triangular part of the array A contains the upper +* triangular matrix, and the strictly lower triangular part of +* A is not referenced. If UPLO = 'L', the leading N-by-N lower +* triangular part of the array A contains the lower triangular +* matrix, and the strictly upper triangular part of A is not +* referenced. If DIAG = 'U', the diagonal elements of A are +* also not referenced and are assumed to be 1. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* RCOND (output) DOUBLE PRECISION +* The reciprocal of the condition number of the matrix A, +* computed as RCOND = 1/(norm(A) * norm(inv(A))). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* IWORK (workspace) INTEGER array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT, ONENRM, UPPER + CHARACTER NORMIN + INTEGER IX, KASE, KASE1 + DOUBLE PRECISION AINVNM, ANORM, SCALE, SMLNUM, XNORM +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DLANTR + EXTERNAL LSAME, IDAMAX, DLAMCH, DLANTR +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DLATRS, DRSCL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' ) + NOUNIT = LSAME( DIAG, 'N' ) +* + IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN + INFO = -1 + ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRCON', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + RCOND = ONE + RETURN + END IF +* + RCOND = ZERO + SMLNUM = DLAMCH( 'Safe minimum' )*DBLE( MAX( 1, N ) ) +* +* Compute the norm of the triangular matrix A. +* + ANORM = DLANTR( NORM, UPLO, DIAG, N, N, A, LDA, WORK ) +* +* Continue only if ANORM > 0. +* + IF( ANORM.GT.ZERO ) THEN +* +* Estimate the norm of the inverse of A. +* + AINVNM = ZERO + NORMIN = 'N' + IF( ONENRM ) THEN + KASE1 = 1 + ELSE + KASE1 = 2 + END IF + KASE = 0 + 10 CONTINUE + CALL DLACN2( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.KASE1 ) THEN +* +* Multiply by inv(A). +* + CALL DLATRS( UPLO, 'No transpose', DIAG, NORMIN, N, A, + $ LDA, WORK, SCALE, WORK( 2*N+1 ), INFO ) + ELSE +* +* Multiply by inv(A'). +* + CALL DLATRS( UPLO, 'Transpose', DIAG, NORMIN, N, A, LDA, + $ WORK, SCALE, WORK( 2*N+1 ), INFO ) + END IF + NORMIN = 'Y' +* +* Multiply by 1/SCALE if doing so will not cause overflow. +* + IF( SCALE.NE.ONE ) THEN + IX = IDAMAX( N, WORK, 1 ) + XNORM = ABS( WORK( IX ) ) + IF( SCALE.LT.XNORM*SMLNUM .OR. SCALE.EQ.ZERO ) + $ GO TO 20 + CALL DRSCL( N, SCALE, WORK, 1 ) + END IF + GO TO 10 + END IF +* +* Compute the estimate of the reciprocal condition number. +* + IF( AINVNM.NE.ZERO ) + $ RCOND = ( ONE / ANORM ) / AINVNM + END IF +* + 20 CONTINUE + RETURN +* +* End of DTRCON +* + END diff --git a/2.3-1/src/fortran/lapack/dtrevc.f b/2.3-1/src/fortran/lapack/dtrevc.f new file mode 100644 index 00000000..a0215f02 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrevc.f @@ -0,0 +1,980 @@ + SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, + $ LDVR, MM, M, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER HOWMNY, SIDE + INTEGER INFO, LDT, LDVL, LDVR, M, MM, N +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + DOUBLE PRECISION T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* DTREVC computes some or all of the right and/or left eigenvectors of +* a real upper quasi-triangular matrix T. +* Matrices of this type are produced by the Schur factorization of +* a real general matrix: A = Q*T*Q**T, as computed by DHSEQR. +* +* The right eigenvector x and the left eigenvector y of T corresponding +* to an eigenvalue w are defined by: +* +* T*x = w*x, (y**H)*T = w*(y**H) +* +* where y**H denotes the conjugate transpose of y. +* The eigenvalues are not input to this routine, but are read directly +* from the diagonal blocks of T. +* +* This routine returns the matrices X and/or Y of right and left +* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an +* input matrix. If Q is the orthogonal factor that reduces a matrix +* A to Schur form T, then Q*X and Q*Y are the matrices of right and +* left eigenvectors of A. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'R': compute right eigenvectors only; +* = 'L': compute left eigenvectors only; +* = 'B': compute both right and left eigenvectors. +* +* HOWMNY (input) CHARACTER*1 +* = 'A': compute all right and/or left eigenvectors; +* = 'B': compute all right and/or left eigenvectors, +* backtransformed by the matrices in VR and/or VL; +* = 'S': compute selected right and/or left eigenvectors, +* as indicated by the logical array SELECT. +* +* SELECT (input/output) LOGICAL array, dimension (N) +* If HOWMNY = 'S', SELECT specifies the eigenvectors to be +* computed. +* If w(j) is a real eigenvalue, the corresponding real +* eigenvector is computed if SELECT(j) is .TRUE.. +* If w(j) and w(j+1) are the real and imaginary parts of a +* complex eigenvalue, the corresponding complex eigenvector is +* computed if either SELECT(j) or SELECT(j+1) is .TRUE., and +* on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to +* .FALSE.. +* Not referenced if HOWMNY = 'A' or 'B'. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input) DOUBLE PRECISION array, dimension (LDT,N) +* The upper quasi-triangular matrix T in Schur canonical form. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* VL (input/output) DOUBLE PRECISION array, dimension (LDVL,MM) +* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must +* contain an N-by-N matrix Q (usually the orthogonal matrix Q +* of Schur vectors returned by DHSEQR). +* On exit, if SIDE = 'L' or 'B', VL contains: +* if HOWMNY = 'A', the matrix Y of left eigenvectors of T; +* if HOWMNY = 'B', the matrix Q*Y; +* if HOWMNY = 'S', the left eigenvectors of T specified by +* SELECT, stored consecutively in the columns +* of VL, in the same order as their +* eigenvalues. +* A complex eigenvector corresponding to a complex eigenvalue +* is stored in two consecutive columns, the first holding the +* real part, and the second the imaginary part. +* Not referenced if SIDE = 'R'. +* +* LDVL (input) INTEGER +* The leading dimension of the array VL. LDVL >= 1, and if +* SIDE = 'L' or 'B', LDVL >= N. +* +* VR (input/output) DOUBLE PRECISION array, dimension (LDVR,MM) +* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must +* contain an N-by-N matrix Q (usually the orthogonal matrix Q +* of Schur vectors returned by DHSEQR). +* On exit, if SIDE = 'R' or 'B', VR contains: +* if HOWMNY = 'A', the matrix X of right eigenvectors of T; +* if HOWMNY = 'B', the matrix Q*X; +* if HOWMNY = 'S', the right eigenvectors of T specified by +* SELECT, stored consecutively in the columns +* of VR, in the same order as their +* eigenvalues. +* A complex eigenvector corresponding to a complex eigenvalue +* is stored in two consecutive columns, the first holding the +* real part and the second the imaginary part. +* Not referenced if SIDE = 'L'. +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1, and if +* SIDE = 'R' or 'B', LDVR >= N. +* +* MM (input) INTEGER +* The number of columns in the arrays VL and/or VR. MM >= M. +* +* M (output) INTEGER +* The number of columns in the arrays VL and/or VR actually +* used to store the eigenvectors. +* If HOWMNY = 'A' or 'B', M is set to N. +* Each selected real eigenvector occupies one column and each +* selected complex eigenvector occupies two columns. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (3*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The algorithm used in this program is basically backward (forward) +* substitution, with scaling to make the the code robust against +* possible overflow. +* +* Each eigenvector is normalized so that the element of largest +* magnitude has magnitude 1; here the magnitude of a complex number +* (x,y) is taken to be |x| + |y|. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ALLV, BOTHV, LEFTV, OVER, PAIR, RIGHTV, SOMEV + INTEGER I, IERR, II, IP, IS, J, J1, J2, JNXT, K, KI, N2 + DOUBLE PRECISION BETA, BIGNUM, EMAX, OVFL, REC, REMAX, SCALE, + $ SMIN, SMLNUM, ULP, UNFL, VCRIT, VMAX, WI, WR, + $ XNORM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX + DOUBLE PRECISION DDOT, DLAMCH + EXTERNAL LSAME, IDAMAX, DDOT, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Local Arrays .. + DOUBLE PRECISION X( 2, 2 ) +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters +* + BOTHV = LSAME( SIDE, 'B' ) + RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV + LEFTV = LSAME( SIDE, 'L' ) .OR. BOTHV +* + ALLV = LSAME( HOWMNY, 'A' ) + OVER = LSAME( HOWMNY, 'B' ) + SOMEV = LSAME( HOWMNY, 'S' ) +* + INFO = 0 + IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -1 + ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN + INFO = -8 + ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN + INFO = -10 + ELSE +* +* Set M to the number of columns required to store the selected +* eigenvectors, standardize the array SELECT if necessary, and +* test MM. +* + IF( SOMEV ) THEN + M = 0 + PAIR = .FALSE. + DO 10 J = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + SELECT( J ) = .FALSE. + ELSE + IF( J.LT.N ) THEN + IF( T( J+1, J ).EQ.ZERO ) THEN + IF( SELECT( J ) ) + $ M = M + 1 + ELSE + PAIR = .TRUE. + IF( SELECT( J ) .OR. SELECT( J+1 ) ) THEN + SELECT( J ) = .TRUE. + M = M + 2 + END IF + END IF + ELSE + IF( SELECT( N ) ) + $ M = M + 1 + END IF + END IF + 10 CONTINUE + ELSE + M = N + END IF +* + IF( MM.LT.M ) THEN + INFO = -11 + END IF + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTREVC', -INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* Set the constants to control overflow. +* + UNFL = DLAMCH( 'Safe minimum' ) + OVFL = ONE / UNFL + CALL DLABAD( UNFL, OVFL ) + ULP = DLAMCH( 'Precision' ) + SMLNUM = UNFL*( N / ULP ) + BIGNUM = ( ONE-ULP ) / SMLNUM +* +* Compute 1-norm of each column of strictly upper triangular +* part of T to control overflow in triangular solver. +* + WORK( 1 ) = ZERO + DO 30 J = 2, N + WORK( J ) = ZERO + DO 20 I = 1, J - 1 + WORK( J ) = WORK( J ) + ABS( T( I, J ) ) + 20 CONTINUE + 30 CONTINUE +* +* Index IP is used to specify the real or complex eigenvalue: +* IP = 0, real eigenvalue, +* 1, first of conjugate complex pair: (wr,wi) +* -1, second of conjugate complex pair: (wr,wi) +* + N2 = 2*N +* + IF( RIGHTV ) THEN +* +* Compute right eigenvectors. +* + IP = 0 + IS = M + DO 140 KI = N, 1, -1 +* + IF( IP.EQ.1 ) + $ GO TO 130 + IF( KI.EQ.1 ) + $ GO TO 40 + IF( T( KI, KI-1 ).EQ.ZERO ) + $ GO TO 40 + IP = -1 +* + 40 CONTINUE + IF( SOMEV ) THEN + IF( IP.EQ.0 ) THEN + IF( .NOT.SELECT( KI ) ) + $ GO TO 130 + ELSE + IF( .NOT.SELECT( KI-1 ) ) + $ GO TO 130 + END IF + END IF +* +* Compute the KI-th eigenvalue (WR,WI). +* + WR = T( KI, KI ) + WI = ZERO + IF( IP.NE.0 ) + $ WI = SQRT( ABS( T( KI, KI-1 ) ) )* + $ SQRT( ABS( T( KI-1, KI ) ) ) + SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM ) +* + IF( IP.EQ.0 ) THEN +* +* Real right eigenvector +* + WORK( KI+N ) = ONE +* +* Form right-hand side +* + DO 50 K = 1, KI - 1 + WORK( K+N ) = -T( K, KI ) + 50 CONTINUE +* +* Solve the upper quasi-triangular system: +* (T(1:KI-1,1:KI-1) - WR)*X = SCALE*WORK. +* + JNXT = KI - 1 + DO 60 J = KI - 1, 1, -1 + IF( J.GT.JNXT ) + $ GO TO 60 + J1 = J + J2 = J + JNXT = J - 1 + IF( J.GT.1 ) THEN + IF( T( J, J-1 ).NE.ZERO ) THEN + J1 = J - 1 + JNXT = J - 2 + END IF + END IF +* + IF( J1.EQ.J2 ) THEN +* +* 1-by-1 diagonal block +* + CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, + $ ZERO, X, 2, SCALE, XNORM, IERR ) +* +* Scale X(1,1) to avoid overflow when updating +* the right-hand side. +* + IF( XNORM.GT.ONE ) THEN + IF( WORK( J ).GT.BIGNUM / XNORM ) THEN + X( 1, 1 ) = X( 1, 1 ) / XNORM + SCALE = SCALE / XNORM + END IF + END IF +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) + $ CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) + WORK( J+N ) = X( 1, 1 ) +* +* Update right-hand side +* + CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1, + $ WORK( 1+N ), 1 ) +* + ELSE +* +* 2-by-2 diagonal block +* + CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, + $ T( J-1, J-1 ), LDT, ONE, ONE, + $ WORK( J-1+N ), N, WR, ZERO, X, 2, + $ SCALE, XNORM, IERR ) +* +* Scale X(1,1) and X(2,1) to avoid overflow when +* updating the right-hand side. +* + IF( XNORM.GT.ONE ) THEN + BETA = MAX( WORK( J-1 ), WORK( J ) ) + IF( BETA.GT.BIGNUM / XNORM ) THEN + X( 1, 1 ) = X( 1, 1 ) / XNORM + X( 2, 1 ) = X( 2, 1 ) / XNORM + SCALE = SCALE / XNORM + END IF + END IF +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) + $ CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) + WORK( J-1+N ) = X( 1, 1 ) + WORK( J+N ) = X( 2, 1 ) +* +* Update right-hand side +* + CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1, + $ WORK( 1+N ), 1 ) + CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1, + $ WORK( 1+N ), 1 ) + END IF + 60 CONTINUE +* +* Copy the vector x or Q*x to VR and normalize. +* + IF( .NOT.OVER ) THEN + CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS ), 1 ) +* + II = IDAMAX( KI, VR( 1, IS ), 1 ) + REMAX = ONE / ABS( VR( II, IS ) ) + CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 ) +* + DO 70 K = KI + 1, N + VR( K, IS ) = ZERO + 70 CONTINUE + ELSE + IF( KI.GT.1 ) + $ CALL DGEMV( 'N', N, KI-1, ONE, VR, LDVR, + $ WORK( 1+N ), 1, WORK( KI+N ), + $ VR( 1, KI ), 1 ) +* + II = IDAMAX( N, VR( 1, KI ), 1 ) + REMAX = ONE / ABS( VR( II, KI ) ) + CALL DSCAL( N, REMAX, VR( 1, KI ), 1 ) + END IF +* + ELSE +* +* Complex right eigenvector. +* +* Initial solve +* [ (T(KI-1,KI-1) T(KI-1,KI) ) - (WR + I* WI)]*X = 0. +* [ (T(KI,KI-1) T(KI,KI) ) ] +* + IF( ABS( T( KI-1, KI ) ).GE.ABS( T( KI, KI-1 ) ) ) THEN + WORK( KI-1+N ) = ONE + WORK( KI+N2 ) = WI / T( KI-1, KI ) + ELSE + WORK( KI-1+N ) = -WI / T( KI, KI-1 ) + WORK( KI+N2 ) = ONE + END IF + WORK( KI+N ) = ZERO + WORK( KI-1+N2 ) = ZERO +* +* Form right-hand side +* + DO 80 K = 1, KI - 2 + WORK( K+N ) = -WORK( KI-1+N )*T( K, KI-1 ) + WORK( K+N2 ) = -WORK( KI+N2 )*T( K, KI ) + 80 CONTINUE +* +* Solve upper quasi-triangular system: +* (T(1:KI-2,1:KI-2) - (WR+i*WI))*X = SCALE*(WORK+i*WORK2) +* + JNXT = KI - 2 + DO 90 J = KI - 2, 1, -1 + IF( J.GT.JNXT ) + $ GO TO 90 + J1 = J + J2 = J + JNXT = J - 1 + IF( J.GT.1 ) THEN + IF( T( J, J-1 ).NE.ZERO ) THEN + J1 = J - 1 + JNXT = J - 2 + END IF + END IF +* + IF( J1.EQ.J2 ) THEN +* +* 1-by-1 diagonal block +* + CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, WI, + $ X, 2, SCALE, XNORM, IERR ) +* +* Scale X(1,1) and X(1,2) to avoid overflow when +* updating the right-hand side. +* + IF( XNORM.GT.ONE ) THEN + IF( WORK( J ).GT.BIGNUM / XNORM ) THEN + X( 1, 1 ) = X( 1, 1 ) / XNORM + X( 1, 2 ) = X( 1, 2 ) / XNORM + SCALE = SCALE / XNORM + END IF + END IF +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) THEN + CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) + CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 ) + END IF + WORK( J+N ) = X( 1, 1 ) + WORK( J+N2 ) = X( 1, 2 ) +* +* Update the right-hand side +* + CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1, + $ WORK( 1+N ), 1 ) + CALL DAXPY( J-1, -X( 1, 2 ), T( 1, J ), 1, + $ WORK( 1+N2 ), 1 ) +* + ELSE +* +* 2-by-2 diagonal block +* + CALL DLALN2( .FALSE., 2, 2, SMIN, ONE, + $ T( J-1, J-1 ), LDT, ONE, ONE, + $ WORK( J-1+N ), N, WR, WI, X, 2, SCALE, + $ XNORM, IERR ) +* +* Scale X to avoid overflow when updating +* the right-hand side. +* + IF( XNORM.GT.ONE ) THEN + BETA = MAX( WORK( J-1 ), WORK( J ) ) + IF( BETA.GT.BIGNUM / XNORM ) THEN + REC = ONE / XNORM + X( 1, 1 ) = X( 1, 1 )*REC + X( 1, 2 ) = X( 1, 2 )*REC + X( 2, 1 ) = X( 2, 1 )*REC + X( 2, 2 ) = X( 2, 2 )*REC + SCALE = SCALE*REC + END IF + END IF +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) THEN + CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 ) + CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 ) + END IF + WORK( J-1+N ) = X( 1, 1 ) + WORK( J+N ) = X( 2, 1 ) + WORK( J-1+N2 ) = X( 1, 2 ) + WORK( J+N2 ) = X( 2, 2 ) +* +* Update the right-hand side +* + CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1, + $ WORK( 1+N ), 1 ) + CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1, + $ WORK( 1+N ), 1 ) + CALL DAXPY( J-2, -X( 1, 2 ), T( 1, J-1 ), 1, + $ WORK( 1+N2 ), 1 ) + CALL DAXPY( J-2, -X( 2, 2 ), T( 1, J ), 1, + $ WORK( 1+N2 ), 1 ) + END IF + 90 CONTINUE +* +* Copy the vector x or Q*x to VR and normalize. +* + IF( .NOT.OVER ) THEN + CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS-1 ), 1 ) + CALL DCOPY( KI, WORK( 1+N2 ), 1, VR( 1, IS ), 1 ) +* + EMAX = ZERO + DO 100 K = 1, KI + EMAX = MAX( EMAX, ABS( VR( K, IS-1 ) )+ + $ ABS( VR( K, IS ) ) ) + 100 CONTINUE +* + REMAX = ONE / EMAX + CALL DSCAL( KI, REMAX, VR( 1, IS-1 ), 1 ) + CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 ) +* + DO 110 K = KI + 1, N + VR( K, IS-1 ) = ZERO + VR( K, IS ) = ZERO + 110 CONTINUE +* + ELSE +* + IF( KI.GT.2 ) THEN + CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR, + $ WORK( 1+N ), 1, WORK( KI-1+N ), + $ VR( 1, KI-1 ), 1 ) + CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR, + $ WORK( 1+N2 ), 1, WORK( KI+N2 ), + $ VR( 1, KI ), 1 ) + ELSE + CALL DSCAL( N, WORK( KI-1+N ), VR( 1, KI-1 ), 1 ) + CALL DSCAL( N, WORK( KI+N2 ), VR( 1, KI ), 1 ) + END IF +* + EMAX = ZERO + DO 120 K = 1, N + EMAX = MAX( EMAX, ABS( VR( K, KI-1 ) )+ + $ ABS( VR( K, KI ) ) ) + 120 CONTINUE + REMAX = ONE / EMAX + CALL DSCAL( N, REMAX, VR( 1, KI-1 ), 1 ) + CALL DSCAL( N, REMAX, VR( 1, KI ), 1 ) + END IF + END IF +* + IS = IS - 1 + IF( IP.NE.0 ) + $ IS = IS - 1 + 130 CONTINUE + IF( IP.EQ.1 ) + $ IP = 0 + IF( IP.EQ.-1 ) + $ IP = 1 + 140 CONTINUE + END IF +* + IF( LEFTV ) THEN +* +* Compute left eigenvectors. +* + IP = 0 + IS = 1 + DO 260 KI = 1, N +* + IF( IP.EQ.-1 ) + $ GO TO 250 + IF( KI.EQ.N ) + $ GO TO 150 + IF( T( KI+1, KI ).EQ.ZERO ) + $ GO TO 150 + IP = 1 +* + 150 CONTINUE + IF( SOMEV ) THEN + IF( .NOT.SELECT( KI ) ) + $ GO TO 250 + END IF +* +* Compute the KI-th eigenvalue (WR,WI). +* + WR = T( KI, KI ) + WI = ZERO + IF( IP.NE.0 ) + $ WI = SQRT( ABS( T( KI, KI+1 ) ) )* + $ SQRT( ABS( T( KI+1, KI ) ) ) + SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM ) +* + IF( IP.EQ.0 ) THEN +* +* Real left eigenvector. +* + WORK( KI+N ) = ONE +* +* Form right-hand side +* + DO 160 K = KI + 1, N + WORK( K+N ) = -T( KI, K ) + 160 CONTINUE +* +* Solve the quasi-triangular system: +* (T(KI+1:N,KI+1:N) - WR)'*X = SCALE*WORK +* + VMAX = ONE + VCRIT = BIGNUM +* + JNXT = KI + 1 + DO 170 J = KI + 1, N + IF( J.LT.JNXT ) + $ GO TO 170 + J1 = J + J2 = J + JNXT = J + 1 + IF( J.LT.N ) THEN + IF( T( J+1, J ).NE.ZERO ) THEN + J2 = J + 1 + JNXT = J + 2 + END IF + END IF +* + IF( J1.EQ.J2 ) THEN +* +* 1-by-1 diagonal block +* +* Scale if necessary to avoid overflow when forming +* the right-hand side. +* + IF( WORK( J ).GT.VCRIT ) THEN + REC = ONE / VMAX + CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) + VMAX = ONE + VCRIT = BIGNUM + END IF +* + WORK( J+N ) = WORK( J+N ) - + $ DDOT( J-KI-1, T( KI+1, J ), 1, + $ WORK( KI+1+N ), 1 ) +* +* Solve (T(J,J)-WR)'*X = WORK +* + CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, + $ ZERO, X, 2, SCALE, XNORM, IERR ) +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) + $ CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) + WORK( J+N ) = X( 1, 1 ) + VMAX = MAX( ABS( WORK( J+N ) ), VMAX ) + VCRIT = BIGNUM / VMAX +* + ELSE +* +* 2-by-2 diagonal block +* +* Scale if necessary to avoid overflow when forming +* the right-hand side. +* + BETA = MAX( WORK( J ), WORK( J+1 ) ) + IF( BETA.GT.VCRIT ) THEN + REC = ONE / VMAX + CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) + VMAX = ONE + VCRIT = BIGNUM + END IF +* + WORK( J+N ) = WORK( J+N ) - + $ DDOT( J-KI-1, T( KI+1, J ), 1, + $ WORK( KI+1+N ), 1 ) +* + WORK( J+1+N ) = WORK( J+1+N ) - + $ DDOT( J-KI-1, T( KI+1, J+1 ), 1, + $ WORK( KI+1+N ), 1 ) +* +* Solve +* [T(J,J)-WR T(J,J+1) ]'* X = SCALE*( WORK1 ) +* [T(J+1,J) T(J+1,J+1)-WR] ( WORK2 ) +* + CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, + $ ZERO, X, 2, SCALE, XNORM, IERR ) +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) + $ CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) + WORK( J+N ) = X( 1, 1 ) + WORK( J+1+N ) = X( 2, 1 ) +* + VMAX = MAX( ABS( WORK( J+N ) ), + $ ABS( WORK( J+1+N ) ), VMAX ) + VCRIT = BIGNUM / VMAX +* + END IF + 170 CONTINUE +* +* Copy the vector x or Q*x to VL and normalize. +* + IF( .NOT.OVER ) THEN + CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 ) +* + II = IDAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1 + REMAX = ONE / ABS( VL( II, IS ) ) + CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 ) +* + DO 180 K = 1, KI - 1 + VL( K, IS ) = ZERO + 180 CONTINUE +* + ELSE +* + IF( KI.LT.N ) + $ CALL DGEMV( 'N', N, N-KI, ONE, VL( 1, KI+1 ), LDVL, + $ WORK( KI+1+N ), 1, WORK( KI+N ), + $ VL( 1, KI ), 1 ) +* + II = IDAMAX( N, VL( 1, KI ), 1 ) + REMAX = ONE / ABS( VL( II, KI ) ) + CALL DSCAL( N, REMAX, VL( 1, KI ), 1 ) +* + END IF +* + ELSE +* +* Complex left eigenvector. +* +* Initial solve: +* ((T(KI,KI) T(KI,KI+1) )' - (WR - I* WI))*X = 0. +* ((T(KI+1,KI) T(KI+1,KI+1)) ) +* + IF( ABS( T( KI, KI+1 ) ).GE.ABS( T( KI+1, KI ) ) ) THEN + WORK( KI+N ) = WI / T( KI, KI+1 ) + WORK( KI+1+N2 ) = ONE + ELSE + WORK( KI+N ) = ONE + WORK( KI+1+N2 ) = -WI / T( KI+1, KI ) + END IF + WORK( KI+1+N ) = ZERO + WORK( KI+N2 ) = ZERO +* +* Form right-hand side +* + DO 190 K = KI + 2, N + WORK( K+N ) = -WORK( KI+N )*T( KI, K ) + WORK( K+N2 ) = -WORK( KI+1+N2 )*T( KI+1, K ) + 190 CONTINUE +* +* Solve complex quasi-triangular system: +* ( T(KI+2,N:KI+2,N) - (WR-i*WI) )*X = WORK1+i*WORK2 +* + VMAX = ONE + VCRIT = BIGNUM +* + JNXT = KI + 2 + DO 200 J = KI + 2, N + IF( J.LT.JNXT ) + $ GO TO 200 + J1 = J + J2 = J + JNXT = J + 1 + IF( J.LT.N ) THEN + IF( T( J+1, J ).NE.ZERO ) THEN + J2 = J + 1 + JNXT = J + 2 + END IF + END IF +* + IF( J1.EQ.J2 ) THEN +* +* 1-by-1 diagonal block +* +* Scale if necessary to avoid overflow when +* forming the right-hand side elements. +* + IF( WORK( J ).GT.VCRIT ) THEN + REC = ONE / VMAX + CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) + CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 ) + VMAX = ONE + VCRIT = BIGNUM + END IF +* + WORK( J+N ) = WORK( J+N ) - + $ DDOT( J-KI-2, T( KI+2, J ), 1, + $ WORK( KI+2+N ), 1 ) + WORK( J+N2 ) = WORK( J+N2 ) - + $ DDOT( J-KI-2, T( KI+2, J ), 1, + $ WORK( KI+2+N2 ), 1 ) +* +* Solve (T(J,J)-(WR-i*WI))*(X11+i*X12)= WK+I*WK2 +* + CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, + $ -WI, X, 2, SCALE, XNORM, IERR ) +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) THEN + CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) + CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 ) + END IF + WORK( J+N ) = X( 1, 1 ) + WORK( J+N2 ) = X( 1, 2 ) + VMAX = MAX( ABS( WORK( J+N ) ), + $ ABS( WORK( J+N2 ) ), VMAX ) + VCRIT = BIGNUM / VMAX +* + ELSE +* +* 2-by-2 diagonal block +* +* Scale if necessary to avoid overflow when forming +* the right-hand side elements. +* + BETA = MAX( WORK( J ), WORK( J+1 ) ) + IF( BETA.GT.VCRIT ) THEN + REC = ONE / VMAX + CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 ) + CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 ) + VMAX = ONE + VCRIT = BIGNUM + END IF +* + WORK( J+N ) = WORK( J+N ) - + $ DDOT( J-KI-2, T( KI+2, J ), 1, + $ WORK( KI+2+N ), 1 ) +* + WORK( J+N2 ) = WORK( J+N2 ) - + $ DDOT( J-KI-2, T( KI+2, J ), 1, + $ WORK( KI+2+N2 ), 1 ) +* + WORK( J+1+N ) = WORK( J+1+N ) - + $ DDOT( J-KI-2, T( KI+2, J+1 ), 1, + $ WORK( KI+2+N ), 1 ) +* + WORK( J+1+N2 ) = WORK( J+1+N2 ) - + $ DDOT( J-KI-2, T( KI+2, J+1 ), 1, + $ WORK( KI+2+N2 ), 1 ) +* +* Solve 2-by-2 complex linear equation +* ([T(j,j) T(j,j+1) ]'-(wr-i*wi)*I)*X = SCALE*B +* ([T(j+1,j) T(j+1,j+1)] ) +* + CALL DLALN2( .TRUE., 2, 2, SMIN, ONE, T( J, J ), + $ LDT, ONE, ONE, WORK( J+N ), N, WR, + $ -WI, X, 2, SCALE, XNORM, IERR ) +* +* Scale if necessary +* + IF( SCALE.NE.ONE ) THEN + CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 ) + CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 ) + END IF + WORK( J+N ) = X( 1, 1 ) + WORK( J+N2 ) = X( 1, 2 ) + WORK( J+1+N ) = X( 2, 1 ) + WORK( J+1+N2 ) = X( 2, 2 ) + VMAX = MAX( ABS( X( 1, 1 ) ), ABS( X( 1, 2 ) ), + $ ABS( X( 2, 1 ) ), ABS( X( 2, 2 ) ), VMAX ) + VCRIT = BIGNUM / VMAX +* + END IF + 200 CONTINUE +* +* Copy the vector x or Q*x to VL and normalize. +* + IF( .NOT.OVER ) THEN + CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 ) + CALL DCOPY( N-KI+1, WORK( KI+N2 ), 1, VL( KI, IS+1 ), + $ 1 ) +* + EMAX = ZERO + DO 220 K = KI, N + EMAX = MAX( EMAX, ABS( VL( K, IS ) )+ + $ ABS( VL( K, IS+1 ) ) ) + 220 CONTINUE + REMAX = ONE / EMAX + CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 ) + CALL DSCAL( N-KI+1, REMAX, VL( KI, IS+1 ), 1 ) +* + DO 230 K = 1, KI - 1 + VL( K, IS ) = ZERO + VL( K, IS+1 ) = ZERO + 230 CONTINUE + ELSE + IF( KI.LT.N-1 ) THEN + CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ), + $ LDVL, WORK( KI+2+N ), 1, WORK( KI+N ), + $ VL( 1, KI ), 1 ) + CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ), + $ LDVL, WORK( KI+2+N2 ), 1, + $ WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 ) + ELSE + CALL DSCAL( N, WORK( KI+N ), VL( 1, KI ), 1 ) + CALL DSCAL( N, WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 ) + END IF +* + EMAX = ZERO + DO 240 K = 1, N + EMAX = MAX( EMAX, ABS( VL( K, KI ) )+ + $ ABS( VL( K, KI+1 ) ) ) + 240 CONTINUE + REMAX = ONE / EMAX + CALL DSCAL( N, REMAX, VL( 1, KI ), 1 ) + CALL DSCAL( N, REMAX, VL( 1, KI+1 ), 1 ) +* + END IF +* + END IF +* + IS = IS + 1 + IF( IP.NE.0 ) + $ IS = IS + 1 + 250 CONTINUE + IF( IP.EQ.-1 ) + $ IP = 0 + IF( IP.EQ.1 ) + $ IP = -1 +* + 260 CONTINUE +* + END IF +* + RETURN +* +* End of DTREVC +* + END diff --git a/2.3-1/src/fortran/lapack/dtrexc.f b/2.3-1/src/fortran/lapack/dtrexc.f new file mode 100644 index 00000000..db9be753 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrexc.f @@ -0,0 +1,345 @@ + SUBROUTINE DTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ + INTEGER IFST, ILST, INFO, LDQ, LDT, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DTREXC reorders the real Schur factorization of a real matrix +* A = Q*T*Q**T, so that the diagonal block of T with row index IFST is +* moved to row ILST. +* +* The real Schur form T is reordered by an orthogonal similarity +* transformation Z**T*T*Z, and optionally the matrix Q of Schur vectors +* is updated by postmultiplying it with Z. +* +* T must be in Schur canonical form (as returned by DHSEQR), that is, +* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each +* 2-by-2 diagonal block has its diagonal elements equal and its +* off-diagonal elements of opposite sign. +* +* Arguments +* ========= +* +* COMPQ (input) CHARACTER*1 +* = 'V': update the matrix Q of Schur vectors; +* = 'N': do not update Q. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) DOUBLE PRECISION array, dimension (LDT,N) +* On entry, the upper quasi-triangular matrix T, in Schur +* Schur canonical form. +* On exit, the reordered upper quasi-triangular matrix, again +* in Schur canonical form. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N) +* On entry, if COMPQ = 'V', the matrix Q of Schur vectors. +* On exit, if COMPQ = 'V', Q has been postmultiplied by the +* orthogonal transformation matrix Z which reorders T. +* If COMPQ = 'N', Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= max(1,N). +* +* IFST (input/output) INTEGER +* ILST (input/output) INTEGER +* Specify the reordering of the diagonal blocks of T. +* The block with row index IFST is moved to row ILST, by a +* sequence of transpositions between adjacent blocks. +* On exit, if IFST pointed on entry to the second row of a +* 2-by-2 block, it is changed to point to the first row; ILST +* always points to the first row of the block in its final +* position (which may differ from its input value by +1 or -1). +* 1 <= IFST <= N; 1 <= ILST <= N. +* +* WORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1: two adjacent blocks were too close to swap (the problem +* is very ill-conditioned); T may have been partially +* reordered, and ILST points to the first row of the +* current position of the block being moved. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL WANTQ + INTEGER HERE, NBF, NBL, NBNEXT +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DLAEXC, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Decode and test the input arguments. +* + INFO = 0 + WANTQ = LSAME( COMPQ, 'V' ) + IF( .NOT.WANTQ .AND. .NOT.LSAME( COMPQ, 'N' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.MAX( 1, N ) ) ) THEN + INFO = -6 + ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN + INFO = -7 + ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTREXC', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* +* Determine the first row of specified block +* and find out it is 1 by 1 or 2 by 2. +* + IF( IFST.GT.1 ) THEN + IF( T( IFST, IFST-1 ).NE.ZERO ) + $ IFST = IFST - 1 + END IF + NBF = 1 + IF( IFST.LT.N ) THEN + IF( T( IFST+1, IFST ).NE.ZERO ) + $ NBF = 2 + END IF +* +* Determine the first row of the final block +* and find out it is 1 by 1 or 2 by 2. +* + IF( ILST.GT.1 ) THEN + IF( T( ILST, ILST-1 ).NE.ZERO ) + $ ILST = ILST - 1 + END IF + NBL = 1 + IF( ILST.LT.N ) THEN + IF( T( ILST+1, ILST ).NE.ZERO ) + $ NBL = 2 + END IF +* + IF( IFST.EQ.ILST ) + $ RETURN +* + IF( IFST.LT.ILST ) THEN +* +* Update ILST +* + IF( NBF.EQ.2 .AND. NBL.EQ.1 ) + $ ILST = ILST - 1 + IF( NBF.EQ.1 .AND. NBL.EQ.2 ) + $ ILST = ILST + 1 +* + HERE = IFST +* + 10 CONTINUE +* +* Swap block with next one below +* + IF( NBF.EQ.1 .OR. NBF.EQ.2 ) THEN +* +* Current block either 1 by 1 or 2 by 2 +* + NBNEXT = 1 + IF( HERE+NBF+1.LE.N ) THEN + IF( T( HERE+NBF+1, HERE+NBF ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, NBF, NBNEXT, + $ WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + NBNEXT +* +* Test if 2 by 2 block breaks into two 1 by 1 blocks +* + IF( NBF.EQ.2 ) THEN + IF( T( HERE+1, HERE ).EQ.ZERO ) + $ NBF = 3 + END IF +* + ELSE +* +* Current block consists of two 1 by 1 blocks each of which +* must be swapped individually +* + NBNEXT = 1 + IF( HERE+3.LE.N ) THEN + IF( T( HERE+3, HERE+2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE+1, 1, NBNEXT, + $ WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + IF( NBNEXT.EQ.1 ) THEN +* +* Swap two 1 by 1 blocks, no problems possible +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, 1, NBNEXT, + $ WORK, INFO ) + HERE = HERE + 1 + ELSE +* +* Recompute NBNEXT in case 2 by 2 split +* + IF( T( HERE+2, HERE+1 ).EQ.ZERO ) + $ NBNEXT = 1 + IF( NBNEXT.EQ.2 ) THEN +* +* 2 by 2 Block did not split +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, 1, + $ NBNEXT, WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 2 + ELSE +* +* 2 by 2 Block did split +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, 1, 1, + $ WORK, INFO ) + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE+1, 1, 1, + $ WORK, INFO ) + HERE = HERE + 2 + END IF + END IF + END IF + IF( HERE.LT.ILST ) + $ GO TO 10 +* + ELSE +* + HERE = IFST + 20 CONTINUE +* +* Swap block with next one above +* + IF( NBF.EQ.1 .OR. NBF.EQ.2 ) THEN +* +* Current block either 1 by 1 or 2 by 2 +* + NBNEXT = 1 + IF( HERE.GE.3 ) THEN + IF( T( HERE-1, HERE-2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE-NBNEXT, NBNEXT, + $ NBF, WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - NBNEXT +* +* Test if 2 by 2 block breaks into two 1 by 1 blocks +* + IF( NBF.EQ.2 ) THEN + IF( T( HERE+1, HERE ).EQ.ZERO ) + $ NBF = 3 + END IF +* + ELSE +* +* Current block consists of two 1 by 1 blocks each of which +* must be swapped individually +* + NBNEXT = 1 + IF( HERE.GE.3 ) THEN + IF( T( HERE-1, HERE-2 ).NE.ZERO ) + $ NBNEXT = 2 + END IF + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE-NBNEXT, NBNEXT, + $ 1, WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + IF( NBNEXT.EQ.1 ) THEN +* +* Swap two 1 by 1 blocks, no problems possible +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, NBNEXT, 1, + $ WORK, INFO ) + HERE = HERE - 1 + ELSE +* +* Recompute NBNEXT in case 2 by 2 split +* + IF( T( HERE, HERE-1 ).EQ.ZERO ) + $ NBNEXT = 1 + IF( NBNEXT.EQ.2 ) THEN +* +* 2 by 2 Block did not split +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE-1, 2, 1, + $ WORK, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 2 + ELSE +* +* 2 by 2 Block did split +* + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE, 1, 1, + $ WORK, INFO ) + CALL DLAEXC( WANTQ, N, T, LDT, Q, LDQ, HERE-1, 1, 1, + $ WORK, INFO ) + HERE = HERE - 2 + END IF + END IF + END IF + IF( HERE.GT.ILST ) + $ GO TO 20 + END IF + ILST = HERE +* + RETURN +* +* End of DTREXC +* + END diff --git a/2.3-1/src/fortran/lapack/dtrsen.f b/2.3-1/src/fortran/lapack/dtrsen.f new file mode 100644 index 00000000..1d3ab03a --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrsen.f @@ -0,0 +1,459 @@ + SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI, + $ M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ, JOB + INTEGER INFO, LDQ, LDT, LIWORK, LWORK, M, N + DOUBLE PRECISION S, SEP +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + INTEGER IWORK( * ) + DOUBLE PRECISION Q( LDQ, * ), T( LDT, * ), WI( * ), WORK( * ), + $ WR( * ) +* .. +* +* Purpose +* ======= +* +* DTRSEN reorders the real Schur factorization of a real matrix +* A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in +* the leading diagonal blocks of the upper quasi-triangular matrix T, +* and the leading columns of Q form an orthonormal basis of the +* corresponding right invariant subspace. +* +* Optionally the routine computes the reciprocal condition numbers of +* the cluster of eigenvalues and/or the invariant subspace. +* +* T must be in Schur canonical form (as returned by DHSEQR), that is, +* block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each +* 2-by-2 diagonal block has its diagonal elemnts equal and its +* off-diagonal elements of opposite sign. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies whether condition numbers are required for the +* cluster of eigenvalues (S) or the invariant subspace (SEP): +* = 'N': none; +* = 'E': for eigenvalues only (S); +* = 'V': for invariant subspace only (SEP); +* = 'B': for both eigenvalues and invariant subspace (S and +* SEP). +* +* COMPQ (input) CHARACTER*1 +* = 'V': update the matrix Q of Schur vectors; +* = 'N': do not update Q. +* +* SELECT (input) LOGICAL array, dimension (N) +* SELECT specifies the eigenvalues in the selected cluster. To +* select a real eigenvalue w(j), SELECT(j) must be set to +* .TRUE.. To select a complex conjugate pair of eigenvalues +* w(j) and w(j+1), corresponding to a 2-by-2 diagonal block, +* either SELECT(j) or SELECT(j+1) or both must be set to +* .TRUE.; a complex conjugate pair of eigenvalues must be +* either both included in the cluster or both excluded. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) DOUBLE PRECISION array, dimension (LDT,N) +* On entry, the upper quasi-triangular matrix T, in Schur +* canonical form. +* On exit, T is overwritten by the reordered matrix T, again in +* Schur canonical form, with the selected eigenvalues in the +* leading diagonal blocks. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* Q (input/output) DOUBLE PRECISION array, dimension (LDQ,N) +* On entry, if COMPQ = 'V', the matrix Q of Schur vectors. +* On exit, if COMPQ = 'V', Q has been postmultiplied by the +* orthogonal transformation matrix which reorders T; the +* leading M columns of Q form an orthonormal basis for the +* specified invariant subspace. +* If COMPQ = 'N', Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. +* LDQ >= 1; and if COMPQ = 'V', LDQ >= N. +* +* WR (output) DOUBLE PRECISION array, dimension (N) +* WI (output) DOUBLE PRECISION array, dimension (N) +* The real and imaginary parts, respectively, of the reordered +* eigenvalues of T. The eigenvalues are stored in the same +* order as on the diagonal of T, with WR(i) = T(i,i) and, if +* T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) > 0 and +* WI(i+1) = -WI(i). Note that if a complex eigenvalue is +* sufficiently ill-conditioned, then its value may differ +* significantly from its value before reordering. +* +* M (output) INTEGER +* The dimension of the specified invariant subspace. +* 0 < = M <= N. +* +* S (output) DOUBLE PRECISION +* If JOB = 'E' or 'B', S is a lower bound on the reciprocal +* condition number for the selected cluster of eigenvalues. +* S cannot underestimate the true reciprocal condition number +* by more than a factor of sqrt(N). If M = 0 or N, S = 1. +* If JOB = 'N' or 'V', S is not referenced. +* +* SEP (output) DOUBLE PRECISION +* If JOB = 'V' or 'B', SEP is the estimated reciprocal +* condition number of the specified invariant subspace. If +* M = 0 or N, SEP = norm(T). +* If JOB = 'N' or 'E', SEP is not referenced. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If JOB = 'N', LWORK >= max(1,N); +* if JOB = 'E', LWORK >= max(1,M*(N-M)); +* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK)) +* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. +* +* LIWORK (input) INTEGER +* The dimension of the array IWORK. +* If JOB = 'N' or 'E', LIWORK >= 1; +* if JOB = 'V' or 'B', LIWORK >= max(1,M*(N-M)). +* +* If LIWORK = -1, then a workspace query is assumed; the +* routine only calculates the optimal size of the IWORK array, +* returns this value as the first entry of the IWORK array, and +* no error message related to LIWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1: reordering of T failed because some eigenvalues are too +* close to separate (the problem is very ill-conditioned); +* T may have been partially reordered, and WR and WI +* contain the eigenvalues in the same order as in T; S and +* SEP (if requested) are set to zero. +* +* Further Details +* =============== +* +* DTRSEN first collects the selected eigenvalues by computing an +* orthogonal transformation Z to move them to the top left corner of T. +* In other words, the selected eigenvalues are the eigenvalues of T11 +* in: +* +* Z'*T*Z = ( T11 T12 ) n1 +* ( 0 T22 ) n2 +* n1 n2 +* +* where N = n1+n2 and Z' means the transpose of Z. The first n1 columns +* of Z span the specified invariant subspace of T. +* +* If T has been obtained from the real Schur factorization of a matrix +* A = Q*T*Q', then the reordered real Schur factorization of A is given +* by A = (Q*Z)*(Z'*T*Z)*(Q*Z)', and the first n1 columns of Q*Z span +* the corresponding invariant subspace of A. +* +* The reciprocal condition number of the average of the eigenvalues of +* T11 may be returned in S. S lies between 0 (very badly conditioned) +* and 1 (very well conditioned). It is computed as follows. First we +* compute R so that +* +* P = ( I R ) n1 +* ( 0 0 ) n2 +* n1 n2 +* +* is the projector on the invariant subspace associated with T11. +* R is the solution of the Sylvester equation: +* +* T11*R - R*T22 = T12. +* +* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote +* the two-norm of M. Then S is computed as the lower bound +* +* (1 + F-norm(R)**2)**(-1/2) +* +* on the reciprocal of 2-norm(P), the true reciprocal condition number. +* S cannot underestimate 1 / 2-norm(P) by more than a factor of +* sqrt(N). +* +* An approximate error bound for the computed average of the +* eigenvalues of T11 is +* +* EPS * norm(T) / S +* +* where EPS is the machine precision. +* +* The reciprocal condition number of the right invariant subspace +* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP. +* SEP is defined as the separation of T11 and T22: +* +* sep( T11, T22 ) = sigma-min( C ) +* +* where sigma-min(C) is the smallest singular value of the +* n1*n2-by-n1*n2 matrix +* +* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) ) +* +* I(m) is an m by m identity matrix, and kprod denotes the Kronecker +* product. We estimate sigma-min(C) by the reciprocal of an estimate of +* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C) +* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2). +* +* When SEP is small, small changes in T can cause large changes in +* the invariant subspace. An approximate bound on the maximum angular +* error in the computed right invariant subspace is +* +* EPS * norm(T) / SEP +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, PAIR, SWAP, WANTBH, WANTQ, WANTS, + $ WANTSP + INTEGER IERR, K, KASE, KK, KS, LIWMIN, LWMIN, N1, N2, + $ NN + DOUBLE PRECISION EST, RNORM, SCALE +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLANGE + EXTERNAL LSAME, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DLACN2, DLACPY, DTREXC, DTRSYL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters +* + WANTBH = LSAME( JOB, 'B' ) + WANTS = LSAME( JOB, 'E' ) .OR. WANTBH + WANTSP = LSAME( JOB, 'V' ) .OR. WANTBH + WANTQ = LSAME( COMPQ, 'V' ) +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.WANTS .AND. .NOT.WANTSP ) + $ THEN + INFO = -1 + ELSE IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN + INFO = -8 + ELSE +* +* Set M to the dimension of the specified invariant subspace, +* and test LWORK and LIWORK. +* + M = 0 + PAIR = .FALSE. + DO 10 K = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + ELSE + IF( K.LT.N ) THEN + IF( T( K+1, K ).EQ.ZERO ) THEN + IF( SELECT( K ) ) + $ M = M + 1 + ELSE + PAIR = .TRUE. + IF( SELECT( K ) .OR. SELECT( K+1 ) ) + $ M = M + 2 + END IF + ELSE + IF( SELECT( N ) ) + $ M = M + 1 + END IF + END IF + 10 CONTINUE +* + N1 = M + N2 = N - M + NN = N1*N2 +* + IF( WANTSP ) THEN + LWMIN = MAX( 1, 2*NN ) + LIWMIN = MAX( 1, NN ) + ELSE IF( LSAME( JOB, 'N' ) ) THEN + LWMIN = MAX( 1, N ) + LIWMIN = 1 + ELSE IF( LSAME( JOB, 'E' ) ) THEN + LWMIN = MAX( 1, NN ) + LIWMIN = 1 + END IF +* + IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -15 + ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN + INFO = -17 + END IF + END IF +* + IF( INFO.EQ.0 ) THEN + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRSEN', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible. +* + IF( M.EQ.N .OR. M.EQ.0 ) THEN + IF( WANTS ) + $ S = ONE + IF( WANTSP ) + $ SEP = DLANGE( '1', N, N, T, LDT, WORK ) + GO TO 40 + END IF +* +* Collect the selected blocks at the top-left corner of T. +* + KS = 0 + PAIR = .FALSE. + DO 20 K = 1, N + IF( PAIR ) THEN + PAIR = .FALSE. + ELSE + SWAP = SELECT( K ) + IF( K.LT.N ) THEN + IF( T( K+1, K ).NE.ZERO ) THEN + PAIR = .TRUE. + SWAP = SWAP .OR. SELECT( K+1 ) + END IF + END IF + IF( SWAP ) THEN + KS = KS + 1 +* +* Swap the K-th block to position KS. +* + IERR = 0 + KK = K + IF( K.NE.KS ) + $ CALL DTREXC( COMPQ, N, T, LDT, Q, LDQ, KK, KS, WORK, + $ IERR ) + IF( IERR.EQ.1 .OR. IERR.EQ.2 ) THEN +* +* Blocks too close to swap: exit. +* + INFO = 1 + IF( WANTS ) + $ S = ZERO + IF( WANTSP ) + $ SEP = ZERO + GO TO 40 + END IF + IF( PAIR ) + $ KS = KS + 1 + END IF + END IF + 20 CONTINUE +* + IF( WANTS ) THEN +* +* Solve Sylvester equation for R: +* +* T11*R - R*T22 = scale*T12 +* + CALL DLACPY( 'F', N1, N2, T( 1, N1+1 ), LDT, WORK, N1 ) + CALL DTRSYL( 'N', 'N', -1, N1, N2, T, LDT, T( N1+1, N1+1 ), + $ LDT, WORK, N1, SCALE, IERR ) +* +* Estimate the reciprocal of the condition number of the cluster +* of eigenvalues. +* + RNORM = DLANGE( 'F', N1, N2, WORK, N1, WORK ) + IF( RNORM.EQ.ZERO ) THEN + S = ONE + ELSE + S = SCALE / ( SQRT( SCALE*SCALE / RNORM+RNORM )* + $ SQRT( RNORM ) ) + END IF + END IF +* + IF( WANTSP ) THEN +* +* Estimate sep(T11,T22). +* + EST = ZERO + KASE = 0 + 30 CONTINUE + CALL DLACN2( NN, WORK( NN+1 ), WORK, IWORK, EST, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve T11*R - R*T22 = scale*X. +* + CALL DTRSYL( 'N', 'N', -1, N1, N2, T, LDT, + $ T( N1+1, N1+1 ), LDT, WORK, N1, SCALE, + $ IERR ) + ELSE +* +* Solve T11'*R - R*T22' = scale*X. +* + CALL DTRSYL( 'T', 'T', -1, N1, N2, T, LDT, + $ T( N1+1, N1+1 ), LDT, WORK, N1, SCALE, + $ IERR ) + END IF + GO TO 30 + END IF +* + SEP = SCALE / EST + END IF +* + 40 CONTINUE +* +* Store the output eigenvalues in WR and WI. +* + DO 50 K = 1, N + WR( K ) = T( K, K ) + WI( K ) = ZERO + 50 CONTINUE + DO 60 K = 1, N - 1 + IF( T( K+1, K ).NE.ZERO ) THEN + WI( K ) = SQRT( ABS( T( K, K+1 ) ) )* + $ SQRT( ABS( T( K+1, K ) ) ) + WI( K+1 ) = -WI( K ) + END IF + 60 CONTINUE +* + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN +* + RETURN +* +* End of DTRSEN +* + END diff --git a/2.3-1/src/fortran/lapack/dtrsyl.f b/2.3-1/src/fortran/lapack/dtrsyl.f new file mode 100644 index 00000000..4c6c28e5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrsyl.f @@ -0,0 +1,913 @@ + SUBROUTINE DTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C, + $ LDC, SCALE, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANA, TRANB + INTEGER INFO, ISGN, LDA, LDB, LDC, M, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* DTRSYL solves the real Sylvester matrix equation: +* +* op(A)*X + X*op(B) = scale*C or +* op(A)*X - X*op(B) = scale*C, +* +* where op(A) = A or A**T, and A and B are both upper quasi- +* triangular. A is M-by-M and B is N-by-N; the right hand side C and +* the solution X are M-by-N; and scale is an output scale factor, set +* <= 1 to avoid overflow in X. +* +* A and B must be in Schur canonical form (as returned by DHSEQR), that +* is, block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; +* each 2-by-2 diagonal block has its diagonal elements equal and its +* off-diagonal elements of opposite sign. +* +* Arguments +* ========= +* +* TRANA (input) CHARACTER*1 +* Specifies the option op(A): +* = 'N': op(A) = A (No transpose) +* = 'T': op(A) = A**T (Transpose) +* = 'C': op(A) = A**H (Conjugate transpose = Transpose) +* +* TRANB (input) CHARACTER*1 +* Specifies the option op(B): +* = 'N': op(B) = B (No transpose) +* = 'T': op(B) = B**T (Transpose) +* = 'C': op(B) = B**H (Conjugate transpose = Transpose) +* +* ISGN (input) INTEGER +* Specifies the sign in the equation: +* = +1: solve op(A)*X + X*op(B) = scale*C +* = -1: solve op(A)*X - X*op(B) = scale*C +* +* M (input) INTEGER +* The order of the matrix A, and the number of rows in the +* matrices X and C. M >= 0. +* +* N (input) INTEGER +* The order of the matrix B, and the number of columns in the +* matrices X and C. N >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,M) +* The upper quasi-triangular matrix A, in Schur canonical form. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input) DOUBLE PRECISION array, dimension (LDB,N) +* The upper quasi-triangular matrix B, in Schur canonical form. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* C (input/output) DOUBLE PRECISION array, dimension (LDC,N) +* On entry, the M-by-N right hand side matrix C. +* On exit, C is overwritten by the solution matrix X. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M) +* +* SCALE (output) DOUBLE PRECISION +* The scale factor, scale, set <= 1 to avoid overflow in X. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1: A and B have common or very close eigenvalues; perturbed +* values were used to solve the equation (but the matrices +* A and B are unchanged). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRNA, NOTRNB + INTEGER IERR, J, K, K1, K2, KNEXT, L, L1, L2, LNEXT + DOUBLE PRECISION A11, BIGNUM, DA11, DB, EPS, SCALOC, SGN, SMIN, + $ SMLNUM, SUML, SUMR, XNORM +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ), VEC( 2, 2 ), X( 2, 2 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DDOT, DLAMCH, DLANGE + EXTERNAL LSAME, DDOT, DLAMCH, DLANGE +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, DLALN2, DLASY2, DSCAL, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN +* .. +* .. Executable Statements .. +* +* Decode and Test input parameters +* + NOTRNA = LSAME( TRANA, 'N' ) + NOTRNB = LSAME( TRANB, 'N' ) +* + INFO = 0 + IF( .NOT.NOTRNA .AND. .NOT.LSAME( TRANA, 'T' ) .AND. .NOT. + $ LSAME( TRANA, 'C' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRNB .AND. .NOT.LSAME( TRANB, 'T' ) .AND. .NOT. + $ LSAME( TRANB, 'C' ) ) THEN + INFO = -2 + ELSE IF( ISGN.NE.1 .AND. ISGN.NE.-1 ) THEN + INFO = -3 + ELSE IF( M.LT.0 ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRSYL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Set constants to control overflow +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SMLNUM*DBLE( M*N ) / EPS + BIGNUM = ONE / SMLNUM +* + SMIN = MAX( SMLNUM, EPS*DLANGE( 'M', M, M, A, LDA, DUM ), + $ EPS*DLANGE( 'M', N, N, B, LDB, DUM ) ) +* + SCALE = ONE + SGN = ISGN +* + IF( NOTRNA .AND. NOTRNB ) THEN +* +* Solve A*X + ISGN*X*B = scale*C. +* +* The (K,L)th block of X is determined starting from +* bottom-left corner column by column by +* +* A(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L) +* +* Where +* M L-1 +* R(K,L) = SUM [A(K,I)*X(I,L)] + ISGN*SUM [X(K,J)*B(J,L)]. +* I=K+1 J=1 +* +* Start column loop (index = L) +* L1 (L2) : column index of the first (first) row of X(K,L). +* + LNEXT = 1 + DO 60 L = 1, N + IF( L.LT.LNEXT ) + $ GO TO 60 + IF( L.EQ.N ) THEN + L1 = L + L2 = L + ELSE + IF( B( L+1, L ).NE.ZERO ) THEN + L1 = L + L2 = L + 1 + LNEXT = L + 2 + ELSE + L1 = L + L2 = L + LNEXT = L + 1 + END IF + END IF +* +* Start row loop (index = K) +* K1 (K2): row index of the first (last) row of X(K,L). +* + KNEXT = M + DO 50 K = M, 1, -1 + IF( K.GT.KNEXT ) + $ GO TO 50 + IF( K.EQ.1 ) THEN + K1 = K + K2 = K + ELSE + IF( A( K, K-1 ).NE.ZERO ) THEN + K1 = K - 1 + K2 = K + KNEXT = K - 2 + ELSE + K1 = K + K2 = K + KNEXT = K - 1 + END IF + END IF +* + IF( L1.EQ.L2 .AND. K1.EQ.K2 ) THEN + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) + SCALOC = ONE +* + A11 = A( K1, K1 ) + SGN*B( L1, L1 ) + DA11 = ABS( A11 ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( VEC( 1, 1 ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF + X( 1, 1 ) = ( VEC( 1, 1 )*SCALOC ) / A11 +* + IF( SCALOC.NE.ONE ) THEN + DO 10 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 10 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) +* + ELSE IF( L1.EQ.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, A( K1, K1 ), + $ LDA, ONE, ONE, VEC, 2, -SGN*B( L1, L1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 20 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 20 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K2, L1 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.EQ.K2 ) THEN +* + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = SGN*( C( K1, L1 )-( SUML+SGN*SUMR ) ) +* + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L2 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 2, 1 ) = SGN*( C( K1, L2 )-( SUML+SGN*SUMR ) ) +* + CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, B( L1, L1 ), + $ LDB, ONE, ONE, VEC, 2, -SGN*A( K1, K1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 30 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 30 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L2 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 1, 2 ) = C( K1, L2 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L2 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 2, 2 ) = C( K2, L2 ) - ( SUML+SGN*SUMR ) +* + CALL DLASY2( .FALSE., .FALSE., ISGN, 2, 2, + $ A( K1, K1 ), LDA, B( L1, L1 ), LDB, VEC, + $ 2, SCALOC, X, 2, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 40 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 40 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 1, 2 ) + C( K2, L1 ) = X( 2, 1 ) + C( K2, L2 ) = X( 2, 2 ) + END IF +* + 50 CONTINUE +* + 60 CONTINUE +* + ELSE IF( .NOT.NOTRNA .AND. NOTRNB ) THEN +* +* Solve A' *X + ISGN*X*B = scale*C. +* +* The (K,L)th block of X is determined starting from +* upper-left corner column by column by +* +* A(K,K)'*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L) +* +* Where +* K-1 L-1 +* R(K,L) = SUM [A(I,K)'*X(I,L)] +ISGN*SUM [X(K,J)*B(J,L)] +* I=1 J=1 +* +* Start column loop (index = L) +* L1 (L2): column index of the first (last) row of X(K,L) +* + LNEXT = 1 + DO 120 L = 1, N + IF( L.LT.LNEXT ) + $ GO TO 120 + IF( L.EQ.N ) THEN + L1 = L + L2 = L + ELSE + IF( B( L+1, L ).NE.ZERO ) THEN + L1 = L + L2 = L + 1 + LNEXT = L + 2 + ELSE + L1 = L + L2 = L + LNEXT = L + 1 + END IF + END IF +* +* Start row loop (index = K) +* K1 (K2): row index of the first (last) row of X(K,L) +* + KNEXT = 1 + DO 110 K = 1, M + IF( K.LT.KNEXT ) + $ GO TO 110 + IF( K.EQ.M ) THEN + K1 = K + K2 = K + ELSE + IF( A( K+1, K ).NE.ZERO ) THEN + K1 = K + K2 = K + 1 + KNEXT = K + 2 + ELSE + K1 = K + K2 = K + KNEXT = K + 1 + END IF + END IF +* + IF( L1.EQ.L2 .AND. K1.EQ.K2 ) THEN + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) + SCALOC = ONE +* + A11 = A( K1, K1 ) + SGN*B( L1, L1 ) + DA11 = ABS( A11 ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( VEC( 1, 1 ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF + X( 1, 1 ) = ( VEC( 1, 1 )*SCALOC ) / A11 +* + IF( SCALOC.NE.ONE ) THEN + DO 70 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 70 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) +* + ELSE IF( L1.EQ.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, A( K1, K1 ), + $ LDA, ONE, ONE, VEC, 2, -SGN*B( L1, L1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 80 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 80 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K2, L1 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.EQ.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = SGN*( C( K1, L1 )-( SUML+SGN*SUMR ) ) +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 2, 1 ) = SGN*( C( K1, L2 )-( SUML+SGN*SUMR ) ) +* + CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, B( L1, L1 ), + $ LDB, ONE, ONE, VEC, 2, -SGN*A( K1, K1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 90 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 90 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( L1-1, C( K1, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 1, 2 ) = C( K1, L2 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L1 ), 1 ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( L1-1, C( K2, 1 ), LDC, B( 1, L2 ), 1 ) + VEC( 2, 2 ) = C( K2, L2 ) - ( SUML+SGN*SUMR ) +* + CALL DLASY2( .TRUE., .FALSE., ISGN, 2, 2, A( K1, K1 ), + $ LDA, B( L1, L1 ), LDB, VEC, 2, SCALOC, X, + $ 2, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 100 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 100 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 1, 2 ) + C( K2, L1 ) = X( 2, 1 ) + C( K2, L2 ) = X( 2, 2 ) + END IF +* + 110 CONTINUE + 120 CONTINUE +* + ELSE IF( .NOT.NOTRNA .AND. .NOT.NOTRNB ) THEN +* +* Solve A'*X + ISGN*X*B' = scale*C. +* +* The (K,L)th block of X is determined starting from +* top-right corner column by column by +* +* A(K,K)'*X(K,L) + ISGN*X(K,L)*B(L,L)' = C(K,L) - R(K,L) +* +* Where +* K-1 N +* R(K,L) = SUM [A(I,K)'*X(I,L)] + ISGN*SUM [X(K,J)*B(L,J)']. +* I=1 J=L+1 +* +* Start column loop (index = L) +* L1 (L2): column index of the first (last) row of X(K,L) +* + LNEXT = N + DO 180 L = N, 1, -1 + IF( L.GT.LNEXT ) + $ GO TO 180 + IF( L.EQ.1 ) THEN + L1 = L + L2 = L + ELSE + IF( B( L, L-1 ).NE.ZERO ) THEN + L1 = L - 1 + L2 = L + LNEXT = L - 2 + ELSE + L1 = L + L2 = L + LNEXT = L - 1 + END IF + END IF +* +* Start row loop (index = K) +* K1 (K2): row index of the first (last) row of X(K,L) +* + KNEXT = 1 + DO 170 K = 1, M + IF( K.LT.KNEXT ) + $ GO TO 170 + IF( K.EQ.M ) THEN + K1 = K + K2 = K + ELSE + IF( A( K+1, K ).NE.ZERO ) THEN + K1 = K + K2 = K + 1 + KNEXT = K + 2 + ELSE + K1 = K + K2 = K + KNEXT = K + 1 + END IF + END IF +* + IF( L1.EQ.L2 .AND. K1.EQ.K2 ) THEN + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L1, C( K1, MIN( L1+1, N ) ), LDC, + $ B( L1, MIN( L1+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) + SCALOC = ONE +* + A11 = A( K1, K1 ) + SGN*B( L1, L1 ) + DA11 = ABS( A11 ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( VEC( 1, 1 ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF + X( 1, 1 ) = ( VEC( 1, 1 )*SCALOC ) / A11 +* + IF( SCALOC.NE.ONE ) THEN + DO 130 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 130 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) +* + ELSE IF( L1.EQ.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, A( K1, K1 ), + $ LDA, ONE, ONE, VEC, 2, -SGN*B( L1, L1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 140 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 140 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K2, L1 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.EQ.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = SGN*( C( K1, L1 )-( SUML+SGN*SUMR ) ) +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = SGN*( C( K1, L2 )-( SUML+SGN*SUMR ) ) +* + CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, B( L1, L1 ), + $ LDB, ONE, ONE, VEC, 2, -SGN*A( K1, K1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 150 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 150 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K1 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 1, 2 ) = C( K1, L2 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L1 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( K1-1, A( 1, K2 ), 1, C( 1, L2 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 2, 2 ) = C( K2, L2 ) - ( SUML+SGN*SUMR ) +* + CALL DLASY2( .TRUE., .TRUE., ISGN, 2, 2, A( K1, K1 ), + $ LDA, B( L1, L1 ), LDB, VEC, 2, SCALOC, X, + $ 2, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 160 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 160 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 1, 2 ) + C( K2, L1 ) = X( 2, 1 ) + C( K2, L2 ) = X( 2, 2 ) + END IF +* + 170 CONTINUE + 180 CONTINUE +* + ELSE IF( NOTRNA .AND. .NOT.NOTRNB ) THEN +* +* Solve A*X + ISGN*X*B' = scale*C. +* +* The (K,L)th block of X is determined starting from +* bottom-right corner column by column by +* +* A(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L)' = C(K,L) - R(K,L) +* +* Where +* M N +* R(K,L) = SUM [A(K,I)*X(I,L)] + ISGN*SUM [X(K,J)*B(L,J)']. +* I=K+1 J=L+1 +* +* Start column loop (index = L) +* L1 (L2): column index of the first (last) row of X(K,L) +* + LNEXT = N + DO 240 L = N, 1, -1 + IF( L.GT.LNEXT ) + $ GO TO 240 + IF( L.EQ.1 ) THEN + L1 = L + L2 = L + ELSE + IF( B( L, L-1 ).NE.ZERO ) THEN + L1 = L - 1 + L2 = L + LNEXT = L - 2 + ELSE + L1 = L + L2 = L + LNEXT = L - 1 + END IF + END IF +* +* Start row loop (index = K) +* K1 (K2): row index of the first (last) row of X(K,L) +* + KNEXT = M + DO 230 K = M, 1, -1 + IF( K.GT.KNEXT ) + $ GO TO 230 + IF( K.EQ.1 ) THEN + K1 = K + K2 = K + ELSE + IF( A( K, K-1 ).NE.ZERO ) THEN + K1 = K - 1 + K2 = K + KNEXT = K - 2 + ELSE + K1 = K + K2 = K + KNEXT = K - 1 + END IF + END IF +* + IF( L1.EQ.L2 .AND. K1.EQ.K2 ) THEN + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L1, C( K1, MIN( L1+1, N ) ), LDC, + $ B( L1, MIN( L1+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) + SCALOC = ONE +* + A11 = A( K1, K1 ) + SGN*B( L1, L1 ) + DA11 = ABS( A11 ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( VEC( 1, 1 ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF + X( 1, 1 ) = ( VEC( 1, 1 )*SCALOC ) / A11 +* + IF( SCALOC.NE.ONE ) THEN + DO 190 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 190 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) +* + ELSE IF( L1.EQ.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, A( K1, K1 ), + $ LDA, ONE, ONE, VEC, 2, -SGN*B( L1, L1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 200 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 200 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K2, L1 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.EQ.K2 ) THEN +* + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = SGN*( C( K1, L1 )-( SUML+SGN*SUMR ) ) +* + SUML = DDOT( M-K1, A( K1, MIN( K1+1, M ) ), LDA, + $ C( MIN( K1+1, M ), L2 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = SGN*( C( K1, L2 )-( SUML+SGN*SUMR ) ) +* + CALL DLALN2( .FALSE., 2, 1, SMIN, ONE, B( L1, L1 ), + $ LDB, ONE, ONE, VEC, 2, -SGN*A( K1, K1 ), + $ ZERO, X, 2, SCALOC, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 210 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 210 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 2, 1 ) +* + ELSE IF( L1.NE.L2 .AND. K1.NE.K2 ) THEN +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 1, 1 ) = C( K1, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K1, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L2 ), 1 ) + SUMR = DDOT( N-L2, C( K1, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 1, 2 ) = C( K1, L2 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L1 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L1, MIN( L2+1, N ) ), LDB ) + VEC( 2, 1 ) = C( K2, L1 ) - ( SUML+SGN*SUMR ) +* + SUML = DDOT( M-K2, A( K2, MIN( K2+1, M ) ), LDA, + $ C( MIN( K2+1, M ), L2 ), 1 ) + SUMR = DDOT( N-L2, C( K2, MIN( L2+1, N ) ), LDC, + $ B( L2, MIN( L2+1, N ) ), LDB ) + VEC( 2, 2 ) = C( K2, L2 ) - ( SUML+SGN*SUMR ) +* + CALL DLASY2( .FALSE., .TRUE., ISGN, 2, 2, A( K1, K1 ), + $ LDA, B( L1, L1 ), LDB, VEC, 2, SCALOC, X, + $ 2, XNORM, IERR ) + IF( IERR.NE.0 ) + $ INFO = 1 +* + IF( SCALOC.NE.ONE ) THEN + DO 220 J = 1, N + CALL DSCAL( M, SCALOC, C( 1, J ), 1 ) + 220 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K1, L1 ) = X( 1, 1 ) + C( K1, L2 ) = X( 1, 2 ) + C( K2, L1 ) = X( 2, 1 ) + C( K2, L2 ) = X( 2, 2 ) + END IF +* + 230 CONTINUE + 240 CONTINUE +* + END IF +* + RETURN +* +* End of DTRSYL +* + END diff --git a/2.3-1/src/fortran/lapack/dtrti2.f b/2.3-1/src/fortran/lapack/dtrti2.f new file mode 100644 index 00000000..e7ae764d --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrti2.f @@ -0,0 +1,146 @@ + SUBROUTINE DTRTI2( UPLO, DIAG, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DTRTI2 computes the inverse of a real upper or lower triangular +* matrix. +* +* This is the Level 2 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the matrix A is upper or lower triangular. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* DIAG (input) CHARACTER*1 +* Specifies whether or not the matrix A is unit triangular. +* = 'N': Non-unit triangular +* = 'U': Unit triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the triangular matrix A. If UPLO = 'U', the +* leading n by n upper triangular part of the array A contains +* the upper triangular matrix, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n by n lower triangular part of the array A contains +* the lower triangular matrix, and the strictly upper +* triangular part of A is not referenced. If DIAG = 'U', the +* diagonal elements of A are also not referenced and are +* assumed to be 1. +* +* On exit, the (triangular) inverse of the original matrix, in +* the same storage format. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT, UPPER + INTEGER J + DOUBLE PRECISION AJJ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DTRMV, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOUNIT = LSAME( DIAG, 'N' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRTI2', -INFO ) + RETURN + END IF +* + IF( UPPER ) THEN +* +* Compute inverse of upper triangular matrix. +* + DO 10 J = 1, N + IF( NOUNIT ) THEN + A( J, J ) = ONE / A( J, J ) + AJJ = -A( J, J ) + ELSE + AJJ = -ONE + END IF +* +* Compute elements 1:j-1 of j-th column. +* + CALL DTRMV( 'Upper', 'No transpose', DIAG, J-1, A, LDA, + $ A( 1, J ), 1 ) + CALL DSCAL( J-1, AJJ, A( 1, J ), 1 ) + 10 CONTINUE + ELSE +* +* Compute inverse of lower triangular matrix. +* + DO 20 J = N, 1, -1 + IF( NOUNIT ) THEN + A( J, J ) = ONE / A( J, J ) + AJJ = -A( J, J ) + ELSE + AJJ = -ONE + END IF + IF( J.LT.N ) THEN +* +* Compute elements j+1:n of j-th column. +* + CALL DTRMV( 'Lower', 'No transpose', DIAG, N-J, + $ A( J+1, J+1 ), LDA, A( J+1, J ), 1 ) + CALL DSCAL( N-J, AJJ, A( J+1, J ), 1 ) + END IF + 20 CONTINUE + END IF +* + RETURN +* +* End of DTRTI2 +* + END diff --git a/2.3-1/src/fortran/lapack/dtrtri.f b/2.3-1/src/fortran/lapack/dtrtri.f new file mode 100644 index 00000000..375813c6 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrtri.f @@ -0,0 +1,176 @@ + SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* DTRTRI computes the inverse of a real upper or lower triangular +* matrix A. +* +* This is the Level 3 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': A is upper triangular; +* = 'L': A is lower triangular. +* +* DIAG (input) CHARACTER*1 +* = 'N': A is non-unit triangular; +* = 'U': A is unit triangular. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the triangular matrix A. If UPLO = 'U', the +* leading N-by-N upper triangular part of the array A contains +* the upper triangular matrix, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of the array A contains +* the lower triangular matrix, and the strictly upper +* triangular part of A is not referenced. If DIAG = 'U', the +* diagonal elements of A are also not referenced and are +* assumed to be 1. +* On exit, the (triangular) inverse of the original matrix, in +* the same storage format. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, A(i,i) is exactly zero. The triangular +* matrix is singular and its inverse can not be computed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT, UPPER + INTEGER J, JB, NB, NN +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DTRMM, DTRSM, DTRTI2, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOUNIT = LSAME( DIAG, 'N' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRTRI', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Check for singularity if non-unit. +* + IF( NOUNIT ) THEN + DO 10 INFO = 1, N + IF( A( INFO, INFO ).EQ.ZERO ) + $ RETURN + 10 CONTINUE + INFO = 0 + END IF +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'DTRTRI', UPLO // DIAG, N, -1, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.N ) THEN +* +* Use unblocked code +* + CALL DTRTI2( UPLO, DIAG, N, A, LDA, INFO ) + ELSE +* +* Use blocked code +* + IF( UPPER ) THEN +* +* Compute inverse of upper triangular matrix +* + DO 20 J = 1, N, NB + JB = MIN( NB, N-J+1 ) +* +* Compute rows 1:j-1 of current block column +* + CALL DTRMM( 'Left', 'Upper', 'No transpose', DIAG, J-1, + $ JB, ONE, A, LDA, A( 1, J ), LDA ) + CALL DTRSM( 'Right', 'Upper', 'No transpose', DIAG, J-1, + $ JB, -ONE, A( J, J ), LDA, A( 1, J ), LDA ) +* +* Compute inverse of current diagonal block +* + CALL DTRTI2( 'Upper', DIAG, JB, A( J, J ), LDA, INFO ) + 20 CONTINUE + ELSE +* +* Compute inverse of lower triangular matrix +* + NN = ( ( N-1 ) / NB )*NB + 1 + DO 30 J = NN, 1, -NB + JB = MIN( NB, N-J+1 ) + IF( J+JB.LE.N ) THEN +* +* Compute rows j+jb:n of current block column +* + CALL DTRMM( 'Left', 'Lower', 'No transpose', DIAG, + $ N-J-JB+1, JB, ONE, A( J+JB, J+JB ), LDA, + $ A( J+JB, J ), LDA ) + CALL DTRSM( 'Right', 'Lower', 'No transpose', DIAG, + $ N-J-JB+1, JB, -ONE, A( J, J ), LDA, + $ A( J+JB, J ), LDA ) + END IF +* +* Compute inverse of current diagonal block +* + CALL DTRTI2( 'Lower', DIAG, JB, A( J, J ), LDA, INFO ) + 30 CONTINUE + END IF + END IF +* + RETURN +* +* End of DTRTRI +* + END diff --git a/2.3-1/src/fortran/lapack/dtrtrs.f b/2.3-1/src/fortran/lapack/dtrtrs.f new file mode 100644 index 00000000..139ea6d4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtrtrs.f @@ -0,0 +1,147 @@ + SUBROUTINE DTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, TRANS, UPLO + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* DTRTRS solves a triangular system of the form +* +* A * X = B or A**T * X = B, +* +* where A is a triangular matrix of order N, and B is an N-by-NRHS +* matrix. A check is made to verify that A is nonsingular. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': A is upper triangular; +* = 'L': A is lower triangular. +* +* TRANS (input) CHARACTER*1 +* Specifies the form of the system of equations: +* = 'N': A * X = B (No transpose) +* = 'T': A**T * X = B (Transpose) +* = 'C': A**H * X = B (Conjugate transpose = Transpose) +* +* DIAG (input) CHARACTER*1 +* = 'N': A is non-unit triangular; +* = 'U': A is unit triangular. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input) DOUBLE PRECISION array, dimension (LDA,N) +* The triangular matrix A. If UPLO = 'U', the leading N-by-N +* upper triangular part of the array A contains the upper +* triangular matrix, and the strictly lower triangular part of +* A is not referenced. If UPLO = 'L', the leading N-by-N lower +* triangular part of the array A contains the lower triangular +* matrix, and the strictly upper triangular part of A is not +* referenced. If DIAG = 'U', the diagonal elements of A are +* also not referenced and are assumed to be 1. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) +* On entry, the right hand side matrix B. +* On exit, if INFO = 0, the solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the i-th diagonal element of A is zero, +* indicating that the matrix is singular and the solutions +* X have not been computed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL DTRSM, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NOUNIT = LSAME( DIAG, 'N' ) + IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT. + $ LSAME( TRANS, 'T' ) .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTRTRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Check for singularity. +* + IF( NOUNIT ) THEN + DO 10 INFO = 1, N + IF( A( INFO, INFO ).EQ.ZERO ) + $ RETURN + 10 CONTINUE + END IF + INFO = 0 +* +* Solve A * x = b or A' * x = b. +* + CALL DTRSM( 'Left', UPLO, TRANS, DIAG, N, NRHS, ONE, A, LDA, B, + $ LDB ) +* + RETURN +* +* End of DTRTRS +* + END diff --git a/2.3-1/src/fortran/lapack/dtzrqf.f b/2.3-1/src/fortran/lapack/dtzrqf.f new file mode 100644 index 00000000..5555df38 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtzrqf.f @@ -0,0 +1,164 @@ + SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine DTZRZF. +* +* DTZRQF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A +* to upper triangular form by means of orthogonal transformations. +* +* The upper trapezoidal matrix A is factored as +* +* A = ( R 0 ) * Z, +* +* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper +* triangular matrix. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= M. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the leading M-by-N upper trapezoidal part of the +* array A must contain the matrix to be factorized. +* On exit, the leading M-by-M upper triangular part of A +* contains the upper triangular matrix R, and elements M+1 to +* N of the first M rows of A, with the array TAU, represent the +* orthogonal matrix Z as a product of M elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (M) +* The scalar factors of the elementary reflectors. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The factorization is obtained by Householder's method. The kth +* transformation matrix, Z( k ), which is used to introduce zeros into +* the ( m - k + 1 )th row of A, is given in the form +* +* Z( k ) = ( I 0 ), +* ( 0 T( k ) ) +* +* where +* +* T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ), +* ( 0 ) +* ( z( k ) ) +* +* tau is a scalar and z( k ) is an ( n - m ) element vector. +* tau and z( k ) are chosen to annihilate the elements of the kth row +* of X. +* +* The scalar tau is returned in the kth element of TAU and the vector +* u( k ) in the kth row of A, such that the elements of z( k ) are +* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in +* the upper triangular part of A. +* +* Z is given by +* +* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, K, M1 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DCOPY, DGEMV, DGER, DLARFG, XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTZRQF', -INFO ) + RETURN + END IF +* +* Perform the factorization. +* + IF( M.EQ.0 ) + $ RETURN + IF( M.EQ.N ) THEN + DO 10 I = 1, N + TAU( I ) = ZERO + 10 CONTINUE + ELSE + M1 = MIN( M+1, N ) + DO 20 K = M, 1, -1 +* +* Use a Householder reflection to zero the kth row of A. +* First set up the reflection. +* + CALL DLARFG( N-M+1, A( K, K ), A( K, M1 ), LDA, TAU( K ) ) +* + IF( ( TAU( K ).NE.ZERO ) .AND. ( K.GT.1 ) ) THEN +* +* We now perform the operation A := A*P( k ). +* +* Use the first ( k - 1 ) elements of TAU to store a( k ), +* where a( k ) consists of the first ( k - 1 ) elements of +* the kth column of A. Also let B denote the first +* ( k - 1 ) rows of the last ( n - m ) columns of A. +* + CALL DCOPY( K-1, A( 1, K ), 1, TAU, 1 ) +* +* Form w = a( k ) + B*z( k ) in TAU. +* + CALL DGEMV( 'No transpose', K-1, N-M, ONE, A( 1, M1 ), + $ LDA, A( K, M1 ), LDA, ONE, TAU, 1 ) +* +* Now form a( k ) := a( k ) - tau*w +* and B := B - tau*w*z( k )'. +* + CALL DAXPY( K-1, -TAU( K ), TAU, 1, A( 1, K ), 1 ) + CALL DGER( K-1, N-M, -TAU( K ), TAU, 1, A( K, M1 ), LDA, + $ A( 1, M1 ), LDA ) + END IF + 20 CONTINUE + END IF +* + RETURN +* +* End of DTZRQF +* + END diff --git a/2.3-1/src/fortran/lapack/dtzrzf.f b/2.3-1/src/fortran/lapack/dtzrzf.f new file mode 100644 index 00000000..378eefe1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dtzrzf.f @@ -0,0 +1,244 @@ + SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* DTZRZF reduces the M-by-N ( M<=N ) real upper trapezoidal matrix A +* to upper triangular form by means of orthogonal transformations. +* +* The upper trapezoidal matrix A is factored as +* +* A = ( R 0 ) * Z, +* +* where Z is an N-by-N orthogonal matrix and R is an M-by-M upper +* triangular matrix. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= M. +* +* A (input/output) DOUBLE PRECISION array, dimension (LDA,N) +* On entry, the leading M-by-N upper trapezoidal part of the +* array A must contain the matrix to be factorized. +* On exit, the leading M-by-M upper triangular part of A +* contains the upper triangular matrix R, and elements M+1 to +* N of the first M rows of A, with the array TAU, represent the +* orthogonal matrix Z as a product of M elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) DOUBLE PRECISION array, dimension (M) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The factorization is obtained by Householder's method. The kth +* transformation matrix, Z( k ), which is used to introduce zeros into +* the ( m - k + 1 )th row of A, is given in the form +* +* Z( k ) = ( I 0 ), +* ( 0 T( k ) ) +* +* where +* +* T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ), +* ( 0 ) +* ( z( k ) ) +* +* tau is a scalar and z( k ) is an ( n - m ) element vector. +* tau and z( k ) are chosen to annihilate the elements of the kth row +* of X. +* +* The scalar tau is returned in the kth element of TAU and the vector +* u( k ) in the kth row of A, such that the elements of z( k ) are +* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in +* the upper triangular part of A. +* +* Z is given by +* +* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IWS, KI, KK, LDWORK, LWKOPT, M1, MU, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL DLARZB, DLARZT, DLATRZ, XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. M.EQ.N ) THEN + LWKOPT = 1 + ELSE +* +* Determine the block size. +* + NB = ILAENV( 1, 'DGERQF', ' ', M, N, -1, -1 ) + LWKOPT = M*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'DTZRZF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 ) THEN + RETURN + ELSE IF( M.EQ.N ) THEN + DO 10 I = 1, N + TAU( I ) = ZERO + 10 CONTINUE + RETURN + END IF +* + NBMIN = 2 + NX = 1 + IWS = M + IF( NB.GT.1 .AND. NB.LT.M ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'DGERQF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.M ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'DGERQF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.M .AND. NX.LT.M ) THEN +* +* Use blocked code initially. +* The last kk rows are handled by the block method. +* + M1 = MIN( M+1, N ) + KI = ( ( M-NX-1 ) / NB )*NB + KK = MIN( M, KI+NB ) +* + DO 20 I = M - KK + KI + 1, M - KK + 1, -NB + IB = MIN( M-I+1, NB ) +* +* Compute the TZ factorization of the current block +* A(i:i+ib-1,i:n) +* + CALL DLATRZ( IB, N-I+1, N-M, A( I, I ), LDA, TAU( I ), + $ WORK ) + IF( I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL DLARZT( 'Backward', 'Rowwise', N-M, IB, A( I, M1 ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(1:i-1,i:n) from the right +* + CALL DLARZB( 'Right', 'No transpose', 'Backward', + $ 'Rowwise', I-1, N-I+1, IB, N-M, A( I, M1 ), + $ LDA, WORK, LDWORK, A( 1, I ), LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 20 CONTINUE + MU = I + NB - 1 + ELSE + MU = M + END IF +* +* Use unblocked code to factor the last or only block +* + IF( MU.GT.0 ) + $ CALL DLATRZ( MU, N, N-M, A, LDA, TAU, WORK ) +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of DTZRZF +* + END diff --git a/2.3-1/src/fortran/lapack/dzsum1.f b/2.3-1/src/fortran/lapack/dzsum1.f new file mode 100644 index 00000000..0b6c60e7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/dzsum1.f @@ -0,0 +1,81 @@ + DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N +* .. +* .. Array Arguments .. + COMPLEX*16 CX( * ) +* .. +* +* Purpose +* ======= +* +* DZSUM1 takes the sum of the absolute values of a complex +* vector and returns a double precision result. +* +* Based on DZASUM from the Level 1 BLAS. +* The change is to use the 'genuine' absolute value. +* +* Contributed by Nick Higham for use with ZLACON. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of elements in the vector CX. +* +* CX (input) COMPLEX*16 array, dimension (N) +* The vector whose elements will be summed. +* +* INCX (input) INTEGER +* The spacing between successive values of CX. INCX > 0. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, NINCX + DOUBLE PRECISION STEMP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* + DZSUM1 = 0.0D0 + STEMP = 0.0D0 + IF( N.LE.0 ) + $ RETURN + IF( INCX.EQ.1 ) + $ GO TO 20 +* +* CODE FOR INCREMENT NOT EQUAL TO 1 +* + NINCX = N*INCX + DO 10 I = 1, NINCX, INCX +* +* NEXT LINE MODIFIED. +* + STEMP = STEMP + ABS( CX( I ) ) + 10 CONTINUE + DZSUM1 = STEMP + RETURN +* +* CODE FOR INCREMENT EQUAL TO 1 +* + 20 CONTINUE + DO 30 I = 1, N +* +* NEXT LINE MODIFIED. +* + STEMP = STEMP + ABS( CX( I ) ) + 30 CONTINUE + DZSUM1 = STEMP + RETURN +* +* End of DZSUM1 +* + END diff --git a/2.3-1/src/fortran/lapack/ieeeck.f b/2.3-1/src/fortran/lapack/ieeeck.f new file mode 100644 index 00000000..ac4aff85 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ieeeck.f @@ -0,0 +1,147 @@ + INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER ISPEC + REAL ONE, ZERO +* .. +* +* Purpose +* ======= +* +* IEEECK is called from the ILAENV to verify that Infinity and +* possibly NaN arithmetic is safe (i.e. will not trap). +* +* Arguments +* ========= +* +* ISPEC (input) INTEGER +* Specifies whether to test just for inifinity arithmetic +* or whether to test for infinity and NaN arithmetic. +* = 0: Verify infinity arithmetic only. +* = 1: Verify infinity and NaN arithmetic. +* +* ZERO (input) REAL +* Must contain the value 0.0 +* This is passed to prevent the compiler from optimizing +* away this code. +* +* ONE (input) REAL +* Must contain the value 1.0 +* This is passed to prevent the compiler from optimizing +* away this code. +* +* RETURN VALUE: INTEGER +* = 0: Arithmetic failed to produce the correct answers +* = 1: Arithmetic produced the correct answers +* +* .. Local Scalars .. + REAL NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGINF, + $ NEGZRO, NEWZRO, POSINF +* .. +* .. Executable Statements .. + IEEECK = 1 +* + POSINF = ONE / ZERO + IF( POSINF.LE.ONE ) THEN + IEEECK = 0 + RETURN + END IF +* + NEGINF = -ONE / ZERO + IF( NEGINF.GE.ZERO ) THEN + IEEECK = 0 + RETURN + END IF +* + NEGZRO = ONE / ( NEGINF+ONE ) + IF( NEGZRO.NE.ZERO ) THEN + IEEECK = 0 + RETURN + END IF +* + NEGINF = ONE / NEGZRO + IF( NEGINF.GE.ZERO ) THEN + IEEECK = 0 + RETURN + END IF +* + NEWZRO = NEGZRO + ZERO + IF( NEWZRO.NE.ZERO ) THEN + IEEECK = 0 + RETURN + END IF +* + POSINF = ONE / NEWZRO + IF( POSINF.LE.ONE ) THEN + IEEECK = 0 + RETURN + END IF +* + NEGINF = NEGINF*POSINF + IF( NEGINF.GE.ZERO ) THEN + IEEECK = 0 + RETURN + END IF +* + POSINF = POSINF*POSINF + IF( POSINF.LE.ONE ) THEN + IEEECK = 0 + RETURN + END IF +* +* +* +* +* Return if we were only asked to check infinity arithmetic +* + IF( ISPEC.EQ.0 ) + $ RETURN +* + NAN1 = POSINF + NEGINF +* + NAN2 = POSINF / NEGINF +* + NAN3 = POSINF / POSINF +* + NAN4 = POSINF*ZERO +* + NAN5 = NEGINF*NEGZRO +* + NAN6 = NAN5*0.0 +* + IF( NAN1.EQ.NAN1 ) THEN + IEEECK = 0 + RETURN + END IF +* + IF( NAN2.EQ.NAN2 ) THEN + IEEECK = 0 + RETURN + END IF +* + IF( NAN3.EQ.NAN3 ) THEN + IEEECK = 0 + RETURN + END IF +* + IF( NAN4.EQ.NAN4 ) THEN + IEEECK = 0 + RETURN + END IF +* + IF( NAN5.EQ.NAN5 ) THEN + IEEECK = 0 + RETURN + END IF +* + IF( NAN6.EQ.NAN6 ) THEN + IEEECK = 0 + RETURN + END IF +* + RETURN + END diff --git a/2.3-1/src/fortran/lapack/ilaenv.f b/2.3-1/src/fortran/lapack/ilaenv.f new file mode 100644 index 00000000..c375031b --- /dev/null +++ b/2.3-1/src/fortran/lapack/ilaenv.f @@ -0,0 +1,552 @@ + INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER*( * ) NAME, OPTS + INTEGER ISPEC, N1, N2, N3, N4 +* .. +* +* Purpose +* ======= +* +* ILAENV is called from the LAPACK routines to choose problem-dependent +* parameters for the local environment. See ISPEC for a description of +* the parameters. +* +* This version provides a set of parameters which should give good, +* but not optimal, performance on many of the currently available +* computers. Users are encouraged to modify this subroutine to set +* the tuning parameters for their particular machine using the option +* and problem size information in the arguments. +* +* This routine will not function correctly if it is converted to all +* lower case. Converting it to all upper case is allowed. +* +* Arguments +* ========= +* +* ISPEC (input) INTEGER +* Specifies the parameter to be returned as the value of +* ILAENV. +* = 1: the optimal blocksize; if this value is 1, an unblocked +* algorithm will give the best performance. +* = 2: the minimum block size for which the block routine +* should be used; if the usable block size is less than +* this value, an unblocked routine should be used. +* = 3: the crossover point (in a block routine, for N less +* than this value, an unblocked routine should be used) +* = 4: the number of shifts, used in the nonsymmetric +* eigenvalue routines (DEPRECATED) +* = 5: the minimum column dimension for blocking to be used; +* rectangular blocks must have dimension at least k by m, +* where k is given by ILAENV(2,...) and m by ILAENV(5,...) +* = 6: the crossover point for the SVD (when reducing an m by n +* matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds +* this value, a QR factorization is used first to reduce +* the matrix to a triangular form.) +* = 7: the number of processors +* = 8: the crossover point for the multishift QR method +* for nonsymmetric eigenvalue problems (DEPRECATED) +* = 9: maximum size of the subproblems at the bottom of the +* computation tree in the divide-and-conquer algorithm +* (used by xGELSD and xGESDD) +* =10: ieee NaN arithmetic can be trusted not to trap +* =11: infinity arithmetic can be trusted not to trap +* 12 <= ISPEC <= 16: +* xHSEQR or one of its subroutines, +* see IPARMQ for detailed explanation +* +* NAME (input) CHARACTER*(*) +* The name of the calling subroutine, in either upper case or +* lower case. +* +* OPTS (input) CHARACTER*(*) +* The character options to the subroutine NAME, concatenated +* into a single character string. For example, UPLO = 'U', +* TRANS = 'T', and DIAG = 'N' for a triangular routine would +* be specified as OPTS = 'UTN'. +* +* N1 (input) INTEGER +* N2 (input) INTEGER +* N3 (input) INTEGER +* N4 (input) INTEGER +* Problem dimensions for the subroutine NAME; these may not all +* be required. +* +* (ILAENV) (output) INTEGER +* >= 0: the value of the parameter specified by ISPEC +* < 0: if ILAENV = -k, the k-th argument had an illegal value. +* +* Further Details +* =============== +* +* The following conventions have been used when calling ILAENV from the +* LAPACK routines: +* 1) OPTS is a concatenation of all of the character options to +* subroutine NAME, in the same order that they appear in the +* argument list for NAME, even if they are not used in determining +* the value of the parameter specified by ISPEC. +* 2) The problem dimensions N1, N2, N3, N4 are specified in the order +* that they appear in the argument list for NAME. N1 is used +* first, N2 second, and so on, and unused problem dimensions are +* passed a value of -1. +* 3) The parameter value returned by ILAENV is checked for validity in +* the calling subroutine. For example, ILAENV is used to retrieve +* the optimal blocksize for STRTRI as follows: +* +* NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) +* IF( NB.LE.1 ) NB = MAX( 1, N ) +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, IC, IZ, NB, NBMIN, NX + LOGICAL CNAME, SNAME + CHARACTER C1*1, C2*2, C4*2, C3*3, SUBNAM*6 +* .. +* .. Intrinsic Functions .. + INTRINSIC CHAR, ICHAR, INT, MIN, REAL +* .. +* .. External Functions .. + INTEGER IEEECK, IPARMQ + EXTERNAL IEEECK, IPARMQ +* .. +* .. Executable Statements .. +* + GO TO ( 10, 10, 10, 80, 90, 100, 110, 120, + $ 130, 140, 150, 160, 160, 160, 160, 160 )ISPEC +* +* Invalid value for ISPEC +* + ILAENV = -1 + RETURN +* + 10 CONTINUE +* +* Convert NAME to upper case if the first character is lower case. +* + ILAENV = 1 + SUBNAM = NAME + IC = ICHAR( SUBNAM( 1: 1 ) ) + IZ = ICHAR( 'Z' ) + IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN +* +* ASCII character set +* + IF( IC.GE.97 .AND. IC.LE.122 ) THEN + SUBNAM( 1: 1 ) = CHAR( IC-32 ) + DO 20 I = 2, 6 + IC = ICHAR( SUBNAM( I: I ) ) + IF( IC.GE.97 .AND. IC.LE.122 ) + $ SUBNAM( I: I ) = CHAR( IC-32 ) + 20 CONTINUE + END IF +* + ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN +* +* EBCDIC character set +* + IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. + $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. + $ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN + SUBNAM( 1: 1 ) = CHAR( IC+64 ) + DO 30 I = 2, 6 + IC = ICHAR( SUBNAM( I: I ) ) + IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. + $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. + $ ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I: + $ I ) = CHAR( IC+64 ) + 30 CONTINUE + END IF +* + ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN +* +* Prime machines: ASCII+128 +* + IF( IC.GE.225 .AND. IC.LE.250 ) THEN + SUBNAM( 1: 1 ) = CHAR( IC-32 ) + DO 40 I = 2, 6 + IC = ICHAR( SUBNAM( I: I ) ) + IF( IC.GE.225 .AND. IC.LE.250 ) + $ SUBNAM( I: I ) = CHAR( IC-32 ) + 40 CONTINUE + END IF + END IF +* + C1 = SUBNAM( 1: 1 ) + SNAME = C1.EQ.'S' .OR. C1.EQ.'D' + CNAME = C1.EQ.'C' .OR. C1.EQ.'Z' + IF( .NOT.( CNAME .OR. SNAME ) ) + $ RETURN + C2 = SUBNAM( 2: 3 ) + C3 = SUBNAM( 4: 6 ) + C4 = C3( 2: 3 ) +* + GO TO ( 50, 60, 70 )ISPEC +* + 50 CONTINUE +* +* ISPEC = 1: block size +* +* In these examples, separate code is provided for setting NB for +* real and complex. We assume that NB will take the same value in +* single or double precision. +* + NB = 1 +* + IF( C2.EQ.'GE' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + ELSE IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. + $ C3.EQ.'QLF' ) THEN + IF( SNAME ) THEN + NB = 32 + ELSE + NB = 32 + END IF + ELSE IF( C3.EQ.'HRD' ) THEN + IF( SNAME ) THEN + NB = 32 + ELSE + NB = 32 + END IF + ELSE IF( C3.EQ.'BRD' ) THEN + IF( SNAME ) THEN + NB = 32 + ELSE + NB = 32 + END IF + ELSE IF( C3.EQ.'TRI' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + END IF + ELSE IF( C2.EQ.'PO' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + END IF + ELSE IF( C2.EQ.'SY' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN + NB = 32 + ELSE IF( SNAME .AND. C3.EQ.'GST' ) THEN + NB = 64 + END IF + ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN + IF( C3.EQ.'TRF' ) THEN + NB = 64 + ELSE IF( C3.EQ.'TRD' ) THEN + NB = 32 + ELSE IF( C3.EQ.'GST' ) THEN + NB = 64 + END IF + ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NB = 32 + END IF + ELSE IF( C3( 1: 1 ).EQ.'M' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NB = 32 + END IF + END IF + ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NB = 32 + END IF + ELSE IF( C3( 1: 1 ).EQ.'M' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NB = 32 + END IF + END IF + ELSE IF( C2.EQ.'GB' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + IF( N4.LE.64 ) THEN + NB = 1 + ELSE + NB = 32 + END IF + ELSE + IF( N4.LE.64 ) THEN + NB = 1 + ELSE + NB = 32 + END IF + END IF + END IF + ELSE IF( C2.EQ.'PB' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + IF( N2.LE.64 ) THEN + NB = 1 + ELSE + NB = 32 + END IF + ELSE + IF( N2.LE.64 ) THEN + NB = 1 + ELSE + NB = 32 + END IF + END IF + END IF + ELSE IF( C2.EQ.'TR' ) THEN + IF( C3.EQ.'TRI' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + END IF + ELSE IF( C2.EQ.'LA' ) THEN + IF( C3.EQ.'UUM' ) THEN + IF( SNAME ) THEN + NB = 64 + ELSE + NB = 64 + END IF + END IF + ELSE IF( SNAME .AND. C2.EQ.'ST' ) THEN + IF( C3.EQ.'EBZ' ) THEN + NB = 1 + END IF + END IF + ILAENV = NB + RETURN +* + 60 CONTINUE +* +* ISPEC = 2: minimum block size +* + NBMIN = 2 + IF( C2.EQ.'GE' ) THEN + IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. C3.EQ. + $ 'QLF' ) THEN + IF( SNAME ) THEN + NBMIN = 2 + ELSE + NBMIN = 2 + END IF + ELSE IF( C3.EQ.'HRD' ) THEN + IF( SNAME ) THEN + NBMIN = 2 + ELSE + NBMIN = 2 + END IF + ELSE IF( C3.EQ.'BRD' ) THEN + IF( SNAME ) THEN + NBMIN = 2 + ELSE + NBMIN = 2 + END IF + ELSE IF( C3.EQ.'TRI' ) THEN + IF( SNAME ) THEN + NBMIN = 2 + ELSE + NBMIN = 2 + END IF + END IF + ELSE IF( C2.EQ.'SY' ) THEN + IF( C3.EQ.'TRF' ) THEN + IF( SNAME ) THEN + NBMIN = 8 + ELSE + NBMIN = 8 + END IF + ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN + NBMIN = 2 + END IF + ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN + IF( C3.EQ.'TRD' ) THEN + NBMIN = 2 + END IF + ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NBMIN = 2 + END IF + ELSE IF( C3( 1: 1 ).EQ.'M' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NBMIN = 2 + END IF + END IF + ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NBMIN = 2 + END IF + ELSE IF( C3( 1: 1 ).EQ.'M' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NBMIN = 2 + END IF + END IF + END IF + ILAENV = NBMIN + RETURN +* + 70 CONTINUE +* +* ISPEC = 3: crossover point +* + NX = 0 + IF( C2.EQ.'GE' ) THEN + IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. C3.EQ. + $ 'QLF' ) THEN + IF( SNAME ) THEN + NX = 128 + ELSE + NX = 128 + END IF + ELSE IF( C3.EQ.'HRD' ) THEN + IF( SNAME ) THEN + NX = 128 + ELSE + NX = 128 + END IF + ELSE IF( C3.EQ.'BRD' ) THEN + IF( SNAME ) THEN + NX = 128 + ELSE + NX = 128 + END IF + END IF + ELSE IF( C2.EQ.'SY' ) THEN + IF( SNAME .AND. C3.EQ.'TRD' ) THEN + NX = 32 + END IF + ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN + IF( C3.EQ.'TRD' ) THEN + NX = 32 + END IF + ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NX = 128 + END IF + END IF + ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN + IF( C3( 1: 1 ).EQ.'G' ) THEN + IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. C4.EQ. + $ 'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. C4.EQ.'BR' ) + $ THEN + NX = 128 + END IF + END IF + END IF + ILAENV = NX + RETURN +* + 80 CONTINUE +* +* ISPEC = 4: number of shifts (used by xHSEQR) +* + ILAENV = 6 + RETURN +* + 90 CONTINUE +* +* ISPEC = 5: minimum column dimension (not used) +* + ILAENV = 2 + RETURN +* + 100 CONTINUE +* +* ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD) +* + ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 ) + RETURN +* + 110 CONTINUE +* +* ISPEC = 7: number of processors (not used) +* + ILAENV = 1 + RETURN +* + 120 CONTINUE +* +* ISPEC = 8: crossover point for multishift (used by xHSEQR) +* + ILAENV = 50 + RETURN +* + 130 CONTINUE +* +* ISPEC = 9: maximum size of the subproblems at the bottom of the +* computation tree in the divide-and-conquer algorithm +* (used by xGELSD and xGESDD) +* + ILAENV = 25 + RETURN +* + 140 CONTINUE +* +* ISPEC = 10: ieee NaN arithmetic can be trusted not to trap +* +* ILAENV = 0 + ILAENV = 1 + IF( ILAENV.EQ.1 ) THEN + ILAENV = IEEECK( 0, 0.0, 1.0 ) + END IF + RETURN +* + 150 CONTINUE +* +* ISPEC = 11: infinity arithmetic can be trusted not to trap +* +* ILAENV = 0 + ILAENV = 1 + IF( ILAENV.EQ.1 ) THEN + ILAENV = IEEECK( 1, 0.0, 1.0 ) + END IF + RETURN +* + 160 CONTINUE +* +* 12 <= ISPEC <= 16: xHSEQR or one of its subroutines. +* + ILAENV = IPARMQ( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) + RETURN +* +* End of ILAENV +* + END diff --git a/2.3-1/src/fortran/lapack/iparmq.f b/2.3-1/src/fortran/lapack/iparmq.f new file mode 100644 index 00000000..d9d0af36 --- /dev/null +++ b/2.3-1/src/fortran/lapack/iparmq.f @@ -0,0 +1,253 @@ + INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, ISPEC, LWORK, N + CHARACTER NAME*( * ), OPTS*( * ) +* +* Purpose +* ======= +* +* This program sets problem and machine dependent parameters +* useful for xHSEQR and its subroutines. It is called whenever +* ILAENV is called with 12 <= ISPEC <= 16 +* +* Arguments +* ========= +* +* ISPEC (input) integer scalar +* ISPEC specifies which tunable parameter IPARMQ should +* return. +* +* ISPEC=12: (INMIN) Matrices of order nmin or less +* are sent directly to xLAHQR, the implicit +* double shift QR algorithm. NMIN must be +* at least 11. +* +* ISPEC=13: (INWIN) Size of the deflation window. +* This is best set greater than or equal to +* the number of simultaneous shifts NS. +* Larger matrices benefit from larger deflation +* windows. +* +* ISPEC=14: (INIBL) Determines when to stop nibbling and +* invest in an (expensive) multi-shift QR sweep. +* If the aggressive early deflation subroutine +* finds LD converged eigenvalues from an order +* NW deflation window and LD.GT.(NW*NIBBLE)/100, +* then the next QR sweep is skipped and early +* deflation is applied immediately to the +* remaining active diagonal block. Setting +* IPARMQ(ISPEC=14) = 0 causes TTQRE to skip a +* multi-shift QR sweep whenever early deflation +* finds a converged eigenvalue. Setting +* IPARMQ(ISPEC=14) greater than or equal to 100 +* prevents TTQRE from skipping a multi-shift +* QR sweep. +* +* ISPEC=15: (NSHFTS) The number of simultaneous shifts in +* a multi-shift QR iteration. +* +* ISPEC=16: (IACC22) IPARMQ is set to 0, 1 or 2 with the +* following meanings. +* 0: During the multi-shift QR sweep, +* xLAQR5 does not accumulate reflections and +* does not use matrix-matrix multiply to +* update the far-from-diagonal matrix +* entries. +* 1: During the multi-shift QR sweep, +* xLAQR5 and/or xLAQRaccumulates reflections and uses +* matrix-matrix multiply to update the +* far-from-diagonal matrix entries. +* 2: During the multi-shift QR sweep. +* xLAQR5 accumulates reflections and takes +* advantage of 2-by-2 block structure during +* matrix-matrix multiplies. +* (If xTRMM is slower than xGEMM, then +* IPARMQ(ISPEC=16)=1 may be more efficient than +* IPARMQ(ISPEC=16)=2 despite the greater level of +* arithmetic work implied by the latter choice.) +* +* NAME (input) character string +* Name of the calling subroutine +* +* OPTS (input) character string +* This is a concatenation of the string arguments to +* TTQRE. +* +* N (input) integer scalar +* N is the order of the Hessenberg matrix H. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular +* in rows and columns 1:ILO-1 and IHI+1:N. +* +* LWORK (input) integer scalar +* The amount of workspace available. +* +* Further Details +* =============== +* +* Little is known about how best to choose these parameters. +* It is possible to use different values of the parameters +* for each of CHSEQR, DHSEQR, SHSEQR and ZHSEQR. +* +* It is probably best to choose different parameters for +* different matrices and different parameters at different +* times during the iteration, but this has not been +* implemented --- yet. +* +* +* The best choices of most of the parameters depend +* in an ill-understood way on the relative execution +* rate of xLAQR3 and xLAQR5 and on the nature of each +* particular eigenvalue problem. Experiment may be the +* only practical way to determine which choices are most +* effective. +* +* Following is a list of default values supplied by IPARMQ. +* These defaults may be adjusted in order to attain better +* performance in any particular computational environment. +* +* IPARMQ(ISPEC=12) The xLAHQR vs xLAQR0 crossover point. +* Default: 75. (Must be at least 11.) +* +* IPARMQ(ISPEC=13) Recommended deflation window size. +* This depends on ILO, IHI and NS, the +* number of simultaneous shifts returned +* by IPARMQ(ISPEC=15). The default for +* (IHI-ILO+1).LE.500 is NS. The default +* for (IHI-ILO+1).GT.500 is 3*NS/2. +* +* IPARMQ(ISPEC=14) Nibble crossover point. Default: 14. +* +* IPARMQ(ISPEC=15) Number of simultaneous shifts, NS. +* a multi-shift QR iteration. +* +* If IHI-ILO+1 is ... +* +* greater than ...but less ... the +* or equal to ... than default is +* +* 0 30 NS = 2+ +* 30 60 NS = 4+ +* 60 150 NS = 10 +* 150 590 NS = ** +* 590 3000 NS = 64 +* 3000 6000 NS = 128 +* 6000 infinity NS = 256 +* +* (+) By default matrices of this order are +* passed to the implicit double shift routine +* xLAHQR. See IPARMQ(ISPEC=12) above. These +* values of NS are used only in case of a rare +* xLAHQR failure. +* +* (**) The asterisks (**) indicate an ad-hoc +* function increasing from 10 to 64. +* +* IPARMQ(ISPEC=16) Select structured matrix multiply. +* (See ISPEC=16 above for details.) +* Default: 3. +* +* ================================================================ +* .. Parameters .. + INTEGER INMIN, INWIN, INIBL, ISHFTS, IACC22 + PARAMETER ( INMIN = 12, INWIN = 13, INIBL = 14, + $ ISHFTS = 15, IACC22 = 16 ) + INTEGER NMIN, K22MIN, KACMIN, NIBBLE, KNWSWP + PARAMETER ( NMIN = 75, K22MIN = 14, KACMIN = 14, + $ NIBBLE = 14, KNWSWP = 500 ) + REAL TWO + PARAMETER ( TWO = 2.0 ) +* .. +* .. Local Scalars .. + INTEGER NH, NS +* .. +* .. Intrinsic Functions .. + INTRINSIC LOG, MAX, MOD, NINT, REAL +* .. +* .. Executable Statements .. + IF( ( ISPEC.EQ.ISHFTS ) .OR. ( ISPEC.EQ.INWIN ) .OR. + $ ( ISPEC.EQ.IACC22 ) ) THEN +* +* ==== Set the number simultaneous shifts ==== +* + NH = IHI - ILO + 1 + NS = 2 + IF( NH.GE.30 ) + $ NS = 4 + IF( NH.GE.60 ) + $ NS = 10 + IF( NH.GE.150 ) + $ NS = MAX( 10, NH / NINT( LOG( REAL( NH ) ) / LOG( TWO ) ) ) + IF( NH.GE.590 ) + $ NS = 64 + IF( NH.GE.3000 ) + $ NS = 128 + IF( NH.GE.6000 ) + $ NS = 256 + NS = MAX( 2, NS-MOD( NS, 2 ) ) + END IF +* + IF( ISPEC.EQ.INMIN ) THEN +* +* +* ===== Matrices of order smaller than NMIN get sent +* . to xLAHQR, the classic double shift algorithm. +* . This must be at least 11. ==== +* + IPARMQ = NMIN +* + ELSE IF( ISPEC.EQ.INIBL ) THEN +* +* ==== INIBL: skip a multi-shift qr iteration and +* . whenever aggressive early deflation finds +* . at least (NIBBLE*(window size)/100) deflations. ==== +* + IPARMQ = NIBBLE +* + ELSE IF( ISPEC.EQ.ISHFTS ) THEN +* +* ==== NSHFTS: The number of simultaneous shifts ===== +* + IPARMQ = NS +* + ELSE IF( ISPEC.EQ.INWIN ) THEN +* +* ==== NW: deflation window size. ==== +* + IF( NH.LE.KNWSWP ) THEN + IPARMQ = NS + ELSE + IPARMQ = 3*NS / 2 + END IF +* + ELSE IF( ISPEC.EQ.IACC22 ) THEN +* +* ==== IACC22: Whether to accumulate reflections +* . before updating the far-from-diagonal elements +* . and whether to use 2-by-2 block structure while +* . doing it. A small amount of work could be saved +* . by making this choice dependent also upon the +* . NH=IHI-ILO+1. +* + IPARMQ = 0 + IF( NS.GE.KACMIN ) + $ IPARMQ = 1 + IF( NS.GE.K22MIN ) + $ IPARMQ = 2 +* + ELSE +* ===== invalid value of ispec ===== + IPARMQ = -1 +* + END IF +* +* ==== End of IPARMQ ==== +* + END diff --git a/2.3-1/src/fortran/lapack/izmax1.f b/2.3-1/src/fortran/lapack/izmax1.f new file mode 100644 index 00000000..7ebffee3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/izmax1.f @@ -0,0 +1,95 @@ + INTEGER FUNCTION IZMAX1( N, CX, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N +* .. +* .. Array Arguments .. + COMPLEX*16 CX( * ) +* .. +* +* Purpose +* ======= +* +* IZMAX1 finds the index of the element whose real part has maximum +* absolute value. +* +* Based on IZAMAX from Level 1 BLAS. +* The change is to use the 'genuine' absolute value. +* +* Contributed by Nick Higham for use with ZLACON. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of elements in the vector CX. +* +* CX (input) COMPLEX*16 array, dimension (N) +* The vector whose elements will be summed. +* +* INCX (input) INTEGER +* The spacing between successive values of CX. INCX >= 1. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, IX + DOUBLE PRECISION SMAX + COMPLEX*16 ZDUM +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. +* +* NEXT LINE IS THE ONLY MODIFICATION. + CABS1( ZDUM ) = ABS( ZDUM ) +* .. +* .. Executable Statements .. +* + IZMAX1 = 0 + IF( N.LT.1 ) + $ RETURN + IZMAX1 = 1 + IF( N.EQ.1 ) + $ RETURN + IF( INCX.EQ.1 ) + $ GO TO 30 +* +* CODE FOR INCREMENT NOT EQUAL TO 1 +* + IX = 1 + SMAX = CABS1( CX( 1 ) ) + IX = IX + INCX + DO 20 I = 2, N + IF( CABS1( CX( IX ) ).LE.SMAX ) + $ GO TO 10 + IZMAX1 = I + SMAX = CABS1( CX( IX ) ) + 10 CONTINUE + IX = IX + INCX + 20 CONTINUE + RETURN +* +* CODE FOR INCREMENT EQUAL TO 1 +* + 30 CONTINUE + SMAX = CABS1( CX( 1 ) ) + DO 40 I = 2, N + IF( CABS1( CX( I ) ).LE.SMAX ) + $ GO TO 40 + IZMAX1 = I + SMAX = CABS1( CX( I ) ) + 40 CONTINUE + RETURN +* +* End of IZMAX1 +* + END diff --git a/2.3-1/src/fortran/lapack/lapack_f/lapack.def b/2.3-1/src/fortran/lapack/lapack_f/lapack.def new file mode 100644 index 00000000..a6ce5165 --- /dev/null +++ b/2.3-1/src/fortran/lapack/lapack_f/lapack.def @@ -0,0 +1,306 @@ +LIBRARY lapack.dll + + +EXPORTS + dbdsqr_ + dgebak_ + dgebal_ + dgebd2_ + dgebrd_ + dgecon_ + dgeequ_ + dgees_ + dgeesx_ + dgeev_ + dgegs_ + dgehd2_ + dgehrd_ + dgelq2_ + dgelqf_ + dgels_ + dgelss_ + dgelsx_ + dgelsy_ + dgeql2_ + dgeqlf_ + dgeqp3_ + dgeqpf_ + dgeqr2_ + dgeqrf_ + dgerfs_ + dgerq2_ + dgerqf_ + dgesc2_ + dgesv_ + dgesvd_ + dgesvx_ + dgetc2_ + dgetf2_ + dgetrf_ + dgetri_ + dgetrs_ + dggbak_ + dggbal_ + dgges_ + dggev_ + dgghrd_ + dhgeqz_ + dhseqr_ + disnan_ + dlabad_ + dlabrd_ + dlacn2_ + dlacon_ + dlacpy_ + dladiv_ + dlae2_ + dlaev2_ + dlaexc_ + dlag2_ + dlagv2_ + dlahqr_ + dlahr2_ + dlahrd_ + dlaic1_ + dlaisnan_ + dlaln2_ + dlamch_ + dlamc2_ + dlamc1_ + dlamc3_ + dlamc4_ + dlamc5_ + dlange_ + dlanhs_ + dlansp_ + dlanst_ + dlansy_ + dlantr_ + dlanv2_ + dlapmt_ + dlapy2_ + dlapy3_ + dlaqge_ + dlaqp2_ + dlaqps_ + dlaqr0_ + dlaqr1_ + dlaqr2_ + dlaqr3_ + dlaqr4_ + dlaqr5_ + dlarf_ + dlarfb_ + dlarfg_ + dlarft_ + dlarfx_ + dlartg_ + dlarz_ + dlarzb_ + dlarzt_ + dlas2_ + dlascl_ + dlaset_ + dlasq1_ + dlasq2_ + dlasq3_ + dlasq4_ + dlasq5_ + dlasq6_ + dlasr_ + dlasrt_ + dlassq_ + dlasv2_ + dlaswp_ + dlasy2_ + dlasyf_ + dlatdf_ + dlatrd_ + dlatrs_ + dlatrz_ + dlatzm_ + dlazq3_ + dlazq4_ + dopgtr_ + dorg2l_ + dorg2r_ + dorgbr_ + dorghr_ + dorgl2_ + dorglq_ + dorgql_ + dorgqr_ + dorgr2_ + dorgrq_ + dorgtr_ + dorm2l_ + dorm2r_ + dormbr_ + dormhr_ + dorml2_ + dormlq_ + dormql_ + dormqr_ + dormr2_ + dormr3_ + dormrq_ + dormrz_ + dpocon_ + dpotf2_ + dpotrf_ + dpotrs_ + dpptrf_ + drscl_ + dspev_ + dspgst_ + dspgv_ + dsptrd_ + dsptrf_ + dsteqr_ + dsterf_ + dsycon_ + dsyev_ + dsysv_ + dsytd2_ + dsytf2_ + dsytrd_ + dsytrf_ + dsytri_ + dsytrs_ + dtgevc_ + dtgex2_ + dtgexc_ + dtgsen_ + dtgsy2_ + dtgsyl_ + dtrcon_ + dtrevc_ + dtrexc_ + dtrsen_ + dtrsyl_ + dtrti2_ + dtrtri_ + dtrtrs_ + dtzrqf_ + dtzrzf_ + dzsum1_ + ieeeck_ + ilaenv_ + iparmq_ + izmax1_ + lsame_ + slamch_ + slamc2_ + slamc1_ + slamc3_ + slamc4_ + slamc5_ + zbdsqr_ + zdrot_ + zdrscl_ + zgebak_ + zgebal_ + zgebd2_ + zgebrd_ + zgecon_ + zgees_ + zgeev_ + zgehd2_ + zgehrd_ + zgelq2_ + zgelqf_ + zgelsy_ + zgeqp3_ + zgeqpf_ + zgeqr2_ + zgeqrf_ + zgesc2_ + zgesvd_ + zgetc2_ + zgetf2_ + zgetrf_ + zgetri_ + zgetrs_ + zggbak_ + zggbal_ + zgges_ + zggev_ + zgghrd_ + zheev_ + zhetd2_ + zhetrd_ + zhgeqz_ + zhseqr_ + zlabrd_ + zlacgv_ + zlacn2_ + zlacon_ + zlacpy_ + zladiv_ + zlahqr_ + zlahr2_ + zlahrd_ + zlaic1_ + zlange_ + zlanhe_ + zlanhs_ + zlaqp2_ + zlaqps_ + zlaqr0_ + zlaqr1_ + zlaqr2_ + zlaqr3_ + zlaqr4_ + zlaqr5_ + zlarf_ + zlarfb_ + zlarfg_ + zlarft_ + zlarfx_ + zlartg_ + zlarz_ + zlarzb_ + zlarzt_ + zlascl_ + zlaset_ + zlasr_ + zlassq_ + zlaswp_ + zlatdf_ + zlatrd_ + zlatrs_ + zlatrz_ + zpotf2_ + zpotrf_ + zrot_ + zsteqr_ + ztgevc_ + ztgex2_ + ztgexc_ + ztgsen_ + ztgsy2_ + ztgsyl_ + ztrevc_ + ztrexc_ + ztrsen_ + ztrsyl_ + ztrti2_ + ztrtri_ + ztzrzf_ + zung2l_ + zung2r_ + zungbr_ + zunghr_ + zungl2_ + zunglq_ + zungql_ + zungqr_ + zungtr_ + zunm2r_ + zunmbr_ + zunml2_ + zunmlq_ + zunmqr_ + zunmr3_ + zunmrz_ + \ No newline at end of file diff --git a/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.suo b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.suo new file mode 100644 index 00000000..156fa9f3 Binary files /dev/null and b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.suo differ diff --git a/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.vfproj b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.vfproj new file mode 100644 index 00000000..41c7a411 --- /dev/null +++ b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL.vfproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj new file mode 100644 index 00000000..51d00d60 --- /dev/null +++ b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj @@ -0,0 +1,837 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + lapack_f2c_DLL + {69296D00-0DE1-4F4B-B0CE-FE4F3CB43923} + lapack_f2c_DLL + Win32Proj + + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + DynamicLibrary + MultiByte + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + $(SolutionDir)bin\ + $(ProjectDir)$(Configuration)\ + + + + + + + + Disabled + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + Build Lapack.def file + + + + + /fixed:no %(AdditionalOptions) + $(SolutionDir)bin\lapack.dll + lapack.def + false + + + $(SolutionDir)bin\$(TargetName).lib + true + + + + + + + + + + + + + X64 + + + Disabled + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + true + Default + MultiThreadedDebug + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + Build Lapack.def file + + + + + /fixed:no %(AdditionalOptions) + ../../../bin/lapack.dll + lapack.def + false + + + MachineX64 + true + + + + + + + + + + + + + Speed + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreaded + NotSet + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + Build Lapack.def file + + + + + $(SolutionDir)bin\lapack.dll + lapack.def + false + + + $(SolutionDir)bin\$(TargetName).lib + true + + + + + + + + + + + + + X64 + + + Speed + ../../f2c;%(AdditionalIncludeDirectories) + STRICT;__STDC__;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + MultiThreaded + StreamingSIMDExtensions + + + $(Configuration)/ + $(Configuration)/vc80.pdb + Level3 + ProgramDatabase + + + Build Lapack.def file + + + + + ../../../bin/lapack.dll + lapack.def + false + + + MachineX64 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Disabled + Disabled + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {78bd64ce-181d-4d3f-9254-5c4f55c1edc9} + false + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj.filters b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj.filters new file mode 100644 index 00000000..7a89de81 --- /dev/null +++ b/2.3-1/src/fortran/lapack/lapack_f/lapack_DLL_f2c.vcxproj.filters @@ -0,0 +1,1782 @@ + + + + + {3b906b2b-f90a-45f4-a2ca-d4606665aae9} + cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {2d444260-4b18-4321-b33c-befb73e5eea2} + h;hpp;hxx;hm;inl;inc;xsd + + + {192f4d41-c71c-4794-a1e0-cdf9729470c1} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx + + + {de2dcb15-7a52-47c0-b7de-4fe911ee4029} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + Fortran Files + + + + + + + + + \ No newline at end of file diff --git a/2.3-1/src/fortran/lapack/lsame.f b/2.3-1/src/fortran/lapack/lsame.f new file mode 100644 index 00000000..bf25d86f --- /dev/null +++ b/2.3-1/src/fortran/lapack/lsame.f @@ -0,0 +1,87 @@ + LOGICAL FUNCTION LSAME( CA, CB ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* September 30, 1994 +* +* .. Scalar Arguments .. + CHARACTER CA, CB +* .. +* +* Purpose +* ======= +* +* LSAME returns .TRUE. if CA is the same letter as CB regardless of +* case. +* +* Arguments +* ========= +* +* CA (input) CHARACTER*1 +* CB (input) CHARACTER*1 +* CA and CB specify the single characters to be compared. +* +* ===================================================================== +* +* .. Intrinsic Functions .. + INTRINSIC ICHAR +* .. +* .. Local Scalars .. + INTEGER INTA, INTB, ZCODE +* .. +* .. Executable Statements .. +* +* Test if the characters are equal +* + LSAME = CA.EQ.CB + IF( LSAME ) + $ RETURN +* +* Now test for equivalence if both characters are alphabetic. +* + ZCODE = ICHAR( 'Z' ) +* +* Use 'Z' rather than 'A' so that ASCII can be detected on Prime +* machines, on which ICHAR returns a value with bit 8 set. +* ICHAR('A') on Prime machines returns 193 which is the same as +* ICHAR('A') on an EBCDIC machine. +* + INTA = ICHAR( CA ) + INTB = ICHAR( CB ) +* + IF( ZCODE.EQ.90 .OR. ZCODE.EQ.122 ) THEN +* +* ASCII is assumed - ZCODE is the ASCII code of either lower or +* upper case 'Z'. +* + IF( INTA.GE.97 .AND. INTA.LE.122 ) INTA = INTA - 32 + IF( INTB.GE.97 .AND. INTB.LE.122 ) INTB = INTB - 32 +* + ELSE IF( ZCODE.EQ.233 .OR. ZCODE.EQ.169 ) THEN +* +* EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or +* upper case 'Z'. +* + IF( INTA.GE.129 .AND. INTA.LE.137 .OR. + $ INTA.GE.145 .AND. INTA.LE.153 .OR. + $ INTA.GE.162 .AND. INTA.LE.169 ) INTA = INTA + 64 + IF( INTB.GE.129 .AND. INTB.LE.137 .OR. + $ INTB.GE.145 .AND. INTB.LE.153 .OR. + $ INTB.GE.162 .AND. INTB.LE.169 ) INTB = INTB + 64 +* + ELSE IF( ZCODE.EQ.218 .OR. ZCODE.EQ.250 ) THEN +* +* ASCII is assumed, on Prime machines - ZCODE is the ASCII code +* plus 128 of either lower or upper case 'Z'. +* + IF( INTA.GE.225 .AND. INTA.LE.250 ) INTA = INTA - 32 + IF( INTB.GE.225 .AND. INTB.LE.250 ) INTB = INTB - 32 + END IF + LSAME = INTA.EQ.INTB +* +* RETURN +* +* End of LSAME +* + END diff --git a/2.3-1/src/fortran/lapack/slamch.f b/2.3-1/src/fortran/lapack/slamch.f new file mode 100644 index 00000000..afb4d368 --- /dev/null +++ b/2.3-1/src/fortran/lapack/slamch.f @@ -0,0 +1,857 @@ + REAL FUNCTION SLAMCH( CMACH ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + CHARACTER CMACH +* .. +* +* Purpose +* ======= +* +* SLAMCH determines single precision machine parameters. +* +* Arguments +* ========= +* +* CMACH (input) CHARACTER*1 +* Specifies the value to be returned by SLAMCH: +* = 'E' or 'e', SLAMCH := eps +* = 'S' or 's , SLAMCH := sfmin +* = 'B' or 'b', SLAMCH := base +* = 'P' or 'p', SLAMCH := eps*base +* = 'N' or 'n', SLAMCH := t +* = 'R' or 'r', SLAMCH := rnd +* = 'M' or 'm', SLAMCH := emin +* = 'U' or 'u', SLAMCH := rmin +* = 'L' or 'l', SLAMCH := emax +* = 'O' or 'o', SLAMCH := rmax +* +* where +* +* eps = relative machine precision +* sfmin = safe minimum, such that 1/sfmin does not overflow +* base = base of the machine +* prec = eps*base +* t = number of (base) digits in the mantissa +* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise +* emin = minimum exponent before (gradual) underflow +* rmin = underflow threshold - base**(emin-1) +* emax = largest exponent before overflow +* rmax = overflow threshold - (base**emax)*(1-eps) +* +* ===================================================================== +* +* .. Parameters .. + REAL ONE, ZERO + PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 ) +* .. +* .. Local Scalars .. + LOGICAL FIRST, LRND + INTEGER BETA, IMAX, IMIN, IT + REAL BASE, EMAX, EMIN, EPS, PREC, RMACH, RMAX, RMIN, + $ RND, SFMIN, SMALL, T +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL SLAMC2 +* .. +* .. Save statement .. + SAVE FIRST, EPS, SFMIN, BASE, T, RND, EMIN, RMIN, + $ EMAX, RMAX, PREC +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + CALL SLAMC2( BETA, IT, LRND, EPS, IMIN, RMIN, IMAX, RMAX ) + BASE = BETA + T = IT + IF( LRND ) THEN + RND = ONE + EPS = ( BASE**( 1-IT ) ) / 2 + ELSE + RND = ZERO + EPS = BASE**( 1-IT ) + END IF + PREC = EPS*BASE + EMIN = IMIN + EMAX = IMAX + SFMIN = RMIN + SMALL = ONE / RMAX + IF( SMALL.GE.SFMIN ) THEN +* +* Use SMALL plus a bit, to avoid the possibility of rounding +* causing overflow when computing 1/sfmin. +* + SFMIN = SMALL*( ONE+EPS ) + END IF + END IF +* + IF( LSAME( CMACH, 'E' ) ) THEN + RMACH = EPS + ELSE IF( LSAME( CMACH, 'S' ) ) THEN + RMACH = SFMIN + ELSE IF( LSAME( CMACH, 'B' ) ) THEN + RMACH = BASE + ELSE IF( LSAME( CMACH, 'P' ) ) THEN + RMACH = PREC + ELSE IF( LSAME( CMACH, 'N' ) ) THEN + RMACH = T + ELSE IF( LSAME( CMACH, 'R' ) ) THEN + RMACH = RND + ELSE IF( LSAME( CMACH, 'M' ) ) THEN + RMACH = EMIN + ELSE IF( LSAME( CMACH, 'U' ) ) THEN + RMACH = RMIN + ELSE IF( LSAME( CMACH, 'L' ) ) THEN + RMACH = EMAX + ELSE IF( LSAME( CMACH, 'O' ) ) THEN + RMACH = RMAX + END IF +* + SLAMCH = RMACH + RETURN +* +* End of SLAMCH +* + END +* +************************************************************************ +* + SUBROUTINE SLAMC1( BETA, T, RND, IEEE1 ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL IEEE1, RND + INTEGER BETA, T +* .. +* +* Purpose +* ======= +* +* SLAMC1 determines the machine parameters given by BETA, T, RND, and +* IEEE1. +* +* Arguments +* ========= +* +* BETA (output) INTEGER +* The base of the machine. +* +* T (output) INTEGER +* The number of ( BETA ) digits in the mantissa. +* +* RND (output) LOGICAL +* Specifies whether proper rounding ( RND = .TRUE. ) or +* chopping ( RND = .FALSE. ) occurs in addition. This may not +* be a reliable guide to the way in which the machine performs +* its arithmetic. +* +* IEEE1 (output) LOGICAL +* Specifies whether rounding appears to be done in the IEEE +* 'round to nearest' style. +* +* Further Details +* =============== +* +* The routine is based on the routine ENVRON by Malcolm and +* incorporates suggestions by Gentleman and Marovich. See +* +* Malcolm M. A. (1972) Algorithms to reveal properties of +* floating-point arithmetic. Comms. of the ACM, 15, 949-951. +* +* Gentleman W. M. and Marovich S. B. (1974) More on algorithms +* that reveal properties of floating point arithmetic units. +* Comms. of the ACM, 17, 276-277. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL FIRST, LIEEE1, LRND + INTEGER LBETA, LT + REAL A, B, C, F, ONE, QTR, SAVEC, T1, T2 +* .. +* .. External Functions .. + REAL SLAMC3 + EXTERNAL SLAMC3 +* .. +* .. Save statement .. + SAVE FIRST, LIEEE1, LBETA, LRND, LT +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + ONE = 1 +* +* LBETA, LIEEE1, LT and LRND are the local values of BETA, +* IEEE1, T and RND. +* +* Throughout this routine we use the function SLAMC3 to ensure +* that relevant values are stored and not held in registers, or +* are not affected by optimizers. +* +* Compute a = 2.0**m with the smallest positive integer m such +* that +* +* fl( a + 1.0 ) = a. +* + A = 1 + C = 1 +* +*+ WHILE( C.EQ.ONE )LOOP + 10 CONTINUE + IF( C.EQ.ONE ) THEN + A = 2*A + C = SLAMC3( A, ONE ) + C = SLAMC3( C, -A ) + GO TO 10 + END IF +*+ END WHILE +* +* Now compute b = 2.0**m with the smallest positive integer m +* such that +* +* fl( a + b ) .gt. a. +* + B = 1 + C = SLAMC3( A, B ) +* +*+ WHILE( C.EQ.A )LOOP + 20 CONTINUE + IF( C.EQ.A ) THEN + B = 2*B + C = SLAMC3( A, B ) + GO TO 20 + END IF +*+ END WHILE +* +* Now compute the base. a and c are neighbouring floating point +* numbers in the interval ( beta**t, beta**( t + 1 ) ) and so +* their difference is beta. Adding 0.25 to c is to ensure that it +* is truncated to beta and not ( beta - 1 ). +* + QTR = ONE / 4 + SAVEC = C + C = SLAMC3( C, -A ) + LBETA = C + QTR +* +* Now determine whether rounding or chopping occurs, by adding a +* bit less than beta/2 and a bit more than beta/2 to a. +* + B = LBETA + F = SLAMC3( B / 2, -B / 100 ) + C = SLAMC3( F, A ) + IF( C.EQ.A ) THEN + LRND = .TRUE. + ELSE + LRND = .FALSE. + END IF + F = SLAMC3( B / 2, B / 100 ) + C = SLAMC3( F, A ) + IF( ( LRND ) .AND. ( C.EQ.A ) ) + $ LRND = .FALSE. +* +* Try and decide whether rounding is done in the IEEE 'round to +* nearest' style. B/2 is half a unit in the last place of the two +* numbers A and SAVEC. Furthermore, A is even, i.e. has last bit +* zero, and SAVEC is odd. Thus adding B/2 to A should not change +* A, but adding B/2 to SAVEC should change SAVEC. +* + T1 = SLAMC3( B / 2, A ) + T2 = SLAMC3( B / 2, SAVEC ) + LIEEE1 = ( T1.EQ.A ) .AND. ( T2.GT.SAVEC ) .AND. LRND +* +* Now find the mantissa, t. It should be the integer part of +* log to the base beta of a, however it is safer to determine t +* by powering. So we find t as the smallest positive integer for +* which +* +* fl( beta**t + 1.0 ) = 1.0. +* + LT = 0 + A = 1 + C = 1 +* +*+ WHILE( C.EQ.ONE )LOOP + 30 CONTINUE + IF( C.EQ.ONE ) THEN + LT = LT + 1 + A = A*LBETA + C = SLAMC3( A, ONE ) + C = SLAMC3( C, -A ) + GO TO 30 + END IF +*+ END WHILE +* + END IF +* + BETA = LBETA + T = LT + RND = LRND + IEEE1 = LIEEE1 + RETURN +* +* End of SLAMC1 +* + END +* +************************************************************************ +* + SUBROUTINE SLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL RND + INTEGER BETA, EMAX, EMIN, T + REAL EPS, RMAX, RMIN +* .. +* +* Purpose +* ======= +* +* SLAMC2 determines the machine parameters specified in its argument +* list. +* +* Arguments +* ========= +* +* BETA (output) INTEGER +* The base of the machine. +* +* T (output) INTEGER +* The number of ( BETA ) digits in the mantissa. +* +* RND (output) LOGICAL +* Specifies whether proper rounding ( RND = .TRUE. ) or +* chopping ( RND = .FALSE. ) occurs in addition. This may not +* be a reliable guide to the way in which the machine performs +* its arithmetic. +* +* EPS (output) REAL +* The smallest positive number such that +* +* fl( 1.0 - EPS ) .LT. 1.0, +* +* where fl denotes the computed value. +* +* EMIN (output) INTEGER +* The minimum exponent before (gradual) underflow occurs. +* +* RMIN (output) REAL +* The smallest normalized number for the machine, given by +* BASE**( EMIN - 1 ), where BASE is the floating point value +* of BETA. +* +* EMAX (output) INTEGER +* The maximum exponent before overflow occurs. +* +* RMAX (output) REAL +* The largest positive number for the machine, given by +* BASE**EMAX * ( 1 - EPS ), where BASE is the floating point +* value of BETA. +* +* Further Details +* =============== +* +* The computation of EPS is based on a routine PARANOIA by +* W. Kahan of the University of California at Berkeley. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL FIRST, IEEE, IWARN, LIEEE1, LRND + INTEGER GNMIN, GPMIN, I, LBETA, LEMAX, LEMIN, LT, + $ NGNMIN, NGPMIN + REAL A, B, C, HALF, LEPS, LRMAX, LRMIN, ONE, RBASE, + $ SIXTH, SMALL, THIRD, TWO, ZERO +* .. +* .. External Functions .. + REAL SLAMC3 + EXTERNAL SLAMC3 +* .. +* .. External Subroutines .. + EXTERNAL SLAMC1, SLAMC4, SLAMC5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. Save statement .. + SAVE FIRST, IWARN, LBETA, LEMAX, LEMIN, LEPS, LRMAX, + $ LRMIN, LT +* .. +* .. Data statements .. + DATA FIRST / .TRUE. / , IWARN / .FALSE. / +* .. +* .. Executable Statements .. +* + IF( FIRST ) THEN + FIRST = .FALSE. + ZERO = 0 + ONE = 1 + TWO = 2 +* +* LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values of +* BETA, T, RND, EPS, EMIN and RMIN. +* +* Throughout this routine we use the function SLAMC3 to ensure +* that relevant values are stored and not held in registers, or +* are not affected by optimizers. +* +* SLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1. +* + CALL SLAMC1( LBETA, LT, LRND, LIEEE1 ) +* +* Start to find EPS. +* + B = LBETA + A = B**( -LT ) + LEPS = A +* +* Try some tricks to see whether or not this is the correct EPS. +* + B = TWO / 3 + HALF = ONE / 2 + SIXTH = SLAMC3( B, -HALF ) + THIRD = SLAMC3( SIXTH, SIXTH ) + B = SLAMC3( THIRD, -HALF ) + B = SLAMC3( B, SIXTH ) + B = ABS( B ) + IF( B.LT.LEPS ) + $ B = LEPS +* + LEPS = 1 +* +*+ WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP + 10 CONTINUE + IF( ( LEPS.GT.B ) .AND. ( B.GT.ZERO ) ) THEN + LEPS = B + C = SLAMC3( HALF*LEPS, ( TWO**5 )*( LEPS**2 ) ) + C = SLAMC3( HALF, -C ) + B = SLAMC3( HALF, C ) + C = SLAMC3( HALF, -B ) + B = SLAMC3( HALF, C ) + GO TO 10 + END IF +*+ END WHILE +* + IF( A.LT.LEPS ) + $ LEPS = A +* +* Computation of EPS complete. +* +* Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3)). +* Keep dividing A by BETA until (gradual) underflow occurs. This +* is detected when we cannot recover the previous A. +* + RBASE = ONE / LBETA + SMALL = ONE + DO 20 I = 1, 3 + SMALL = SLAMC3( SMALL*RBASE, ZERO ) + 20 CONTINUE + A = SLAMC3( ONE, SMALL ) + CALL SLAMC4( NGPMIN, ONE, LBETA ) + CALL SLAMC4( NGNMIN, -ONE, LBETA ) + CALL SLAMC4( GPMIN, A, LBETA ) + CALL SLAMC4( GNMIN, -A, LBETA ) + IEEE = .FALSE. +* + IF( ( NGPMIN.EQ.NGNMIN ) .AND. ( GPMIN.EQ.GNMIN ) ) THEN + IF( NGPMIN.EQ.GPMIN ) THEN + LEMIN = NGPMIN +* ( Non twos-complement machines, no gradual underflow; +* e.g., VAX ) + ELSE IF( ( GPMIN-NGPMIN ).EQ.3 ) THEN + LEMIN = NGPMIN - 1 + LT + IEEE = .TRUE. +* ( Non twos-complement machines, with gradual underflow; +* e.g., IEEE standard followers ) + ELSE + LEMIN = MIN( NGPMIN, GPMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE IF( ( NGPMIN.EQ.GPMIN ) .AND. ( NGNMIN.EQ.GNMIN ) ) THEN + IF( ABS( NGPMIN-NGNMIN ).EQ.1 ) THEN + LEMIN = MAX( NGPMIN, NGNMIN ) +* ( Twos-complement machines, no gradual underflow; +* e.g., CYBER 205 ) + ELSE + LEMIN = MIN( NGPMIN, NGNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE IF( ( ABS( NGPMIN-NGNMIN ).EQ.1 ) .AND. + $ ( GPMIN.EQ.GNMIN ) ) THEN + IF( ( GPMIN-MIN( NGPMIN, NGNMIN ) ).EQ.3 ) THEN + LEMIN = MAX( NGPMIN, NGNMIN ) - 1 + LT +* ( Twos-complement machines with gradual underflow; +* no known machine ) + ELSE + LEMIN = MIN( NGPMIN, NGNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +* + ELSE + LEMIN = MIN( NGPMIN, NGNMIN, GPMIN, GNMIN ) +* ( A guess; no known machine ) + IWARN = .TRUE. + END IF +*** +* Comment out this if block if EMIN is ok + IF( IWARN ) THEN + FIRST = .TRUE. + WRITE( 6, FMT = 9999 )LEMIN + END IF +*** +* +* Assume IEEE arithmetic if we found denormalised numbers above, +* or if arithmetic seems to round in the IEEE style, determined +* in routine SLAMC1. A true IEEE machine should have both things +* true; however, faulty machines may have one or the other. +* + IEEE = IEEE .OR. LIEEE1 +* +* Compute RMIN by successive division by BETA. We could compute +* RMIN as BASE**( EMIN - 1 ), but some machines underflow during +* this computation. +* + LRMIN = 1 + DO 30 I = 1, 1 - LEMIN + LRMIN = SLAMC3( LRMIN*RBASE, ZERO ) + 30 CONTINUE +* +* Finally, call SLAMC5 to compute EMAX and RMAX. +* + CALL SLAMC5( LBETA, LT, LEMIN, IEEE, LEMAX, LRMAX ) + END IF +* + BETA = LBETA + T = LT + RND = LRND + EPS = LEPS + EMIN = LEMIN + RMIN = LRMIN + EMAX = LEMAX + RMAX = LRMAX +* + RETURN +* + 9999 FORMAT( / / ' WARNING. The value EMIN may be incorrect:-', + $ ' EMIN = ', I8, / + $ ' If, after inspection, the value EMIN looks', + $ ' acceptable please comment out ', + $ / ' the IF block as marked within the code of routine', + $ ' SLAMC2,', / ' otherwise supply EMIN explicitly.', / ) +* +* End of SLAMC2 +* + END +* +************************************************************************ +* + REAL FUNCTION SLAMC3( A, B ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + REAL A, B +* .. +* +* Purpose +* ======= +* +* SLAMC3 is intended to force A and B to be stored prior to doing +* the addition of A and B , for use in situations where optimizers +* might hold one of these in a register. +* +* Arguments +* ========= +* +* A, B (input) REAL +* The values A and B. +* +* ===================================================================== +* +* .. Executable Statements .. +* + SLAMC3 = A + B +* + RETURN +* +* End of SLAMC3 +* + END +* +************************************************************************ +* + SUBROUTINE SLAMC4( EMIN, START, BASE ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + INTEGER BASE, EMIN + REAL START +* .. +* +* Purpose +* ======= +* +* SLAMC4 is a service routine for SLAMC2. +* +* Arguments +* ========= +* +* EMIN (output) EMIN +* The minimum exponent before (gradual) underflow, computed by +* setting A = START and dividing by BASE until the previous A +* can not be recovered. +* +* START (input) REAL +* The starting point for determining EMIN. +* +* BASE (input) INTEGER +* The base of the machine. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I + REAL A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO +* .. +* .. External Functions .. + REAL SLAMC3 + EXTERNAL SLAMC3 +* .. +* .. Executable Statements .. +* + A = START + ONE = 1 + RBASE = ONE / BASE + ZERO = 0 + EMIN = 1 + B1 = SLAMC3( A*RBASE, ZERO ) + C1 = A + C2 = A + D1 = A + D2 = A +*+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. +* $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP + 10 CONTINUE + IF( ( C1.EQ.A ) .AND. ( C2.EQ.A ) .AND. ( D1.EQ.A ) .AND. + $ ( D2.EQ.A ) ) THEN + EMIN = EMIN - 1 + A = B1 + B1 = SLAMC3( A / BASE, ZERO ) + C1 = SLAMC3( B1*BASE, ZERO ) + D1 = ZERO + DO 20 I = 1, BASE + D1 = D1 + B1 + 20 CONTINUE + B2 = SLAMC3( A*RBASE, ZERO ) + C2 = SLAMC3( B2 / RBASE, ZERO ) + D2 = ZERO + DO 30 I = 1, BASE + D2 = D2 + B2 + 30 CONTINUE + GO TO 10 + END IF +*+ END WHILE +* + RETURN +* +* End of SLAMC4 +* + END +* +************************************************************************ +* + SUBROUTINE SLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX ) +* +* -- LAPACK auxiliary routine (version 3.0) -- +* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +* Courant Institute, Argonne National Lab, and Rice University +* October 31, 1992 +* +* .. Scalar Arguments .. + LOGICAL IEEE + INTEGER BETA, EMAX, EMIN, P + REAL RMAX +* .. +* +* Purpose +* ======= +* +* SLAMC5 attempts to compute RMAX, the largest machine floating-point +* number, without overflow. It assumes that EMAX + abs(EMIN) sum +* approximately to a power of 2. It will fail on machines where this +* assumption does not hold, for example, the Cyber 205 (EMIN = -28625, +* EMAX = 28718). It will also fail if the value supplied for EMIN is +* too large (i.e. too close to zero), probably with overflow. +* +* Arguments +* ========= +* +* BETA (input) INTEGER +* The base of floating-point arithmetic. +* +* P (input) INTEGER +* The number of base BETA digits in the mantissa of a +* floating-point value. +* +* EMIN (input) INTEGER +* The minimum exponent before (gradual) underflow. +* +* IEEE (input) LOGICAL +* A logical flag specifying whether or not the arithmetic +* system is thought to comply with the IEEE standard. +* +* EMAX (output) INTEGER +* The largest exponent before overflow +* +* RMAX (output) REAL +* The largest machine floating-point number. +* +* ===================================================================== +* +* .. Parameters .. + REAL ZERO, ONE + PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 ) +* .. +* .. Local Scalars .. + INTEGER EXBITS, EXPSUM, I, LEXP, NBITS, TRY, UEXP + REAL OLDY, RECBAS, Y, Z +* .. +* .. External Functions .. + REAL SLAMC3 + EXTERNAL SLAMC3 +* .. +* .. Intrinsic Functions .. + INTRINSIC MOD +* .. +* .. Executable Statements .. +* +* First compute LEXP and UEXP, two powers of 2 that bound +* abs(EMIN). We then assume that EMAX + abs(EMIN) will sum +* approximately to the bound that is closest to abs(EMIN). +* (EMAX is the exponent of the required number RMAX). +* + LEXP = 1 + EXBITS = 1 + 10 CONTINUE + TRY = LEXP*2 + IF( TRY.LE.( -EMIN ) ) THEN + LEXP = TRY + EXBITS = EXBITS + 1 + GO TO 10 + END IF + IF( LEXP.EQ.-EMIN ) THEN + UEXP = LEXP + ELSE + UEXP = TRY + EXBITS = EXBITS + 1 + END IF +* +* Now -LEXP is less than or equal to EMIN, and -UEXP is greater +* than or equal to EMIN. EXBITS is the number of bits needed to +* store the exponent. +* + IF( ( UEXP+EMIN ).GT.( -LEXP-EMIN ) ) THEN + EXPSUM = 2*LEXP + ELSE + EXPSUM = 2*UEXP + END IF +* +* EXPSUM is the exponent range, approximately equal to +* EMAX - EMIN + 1 . +* + EMAX = EXPSUM + EMIN - 1 + NBITS = 1 + EXBITS + P +* +* NBITS is the total number of bits needed to store a +* floating-point number. +* + IF( ( MOD( NBITS, 2 ).EQ.1 ) .AND. ( BETA.EQ.2 ) ) THEN +* +* Either there are an odd number of bits used to store a +* floating-point number, which is unlikely, or some bits are +* not used in the representation of numbers, which is possible, +* (e.g. Cray machines) or the mantissa has an implicit bit, +* (e.g. IEEE machines, Dec Vax machines), which is perhaps the +* most likely. We have to assume the last alternative. +* If this is true, then we need to reduce EMAX by one because +* there must be some way of representing zero in an implicit-bit +* system. On machines like Cray, we are reducing EMAX by one +* unnecessarily. +* + EMAX = EMAX - 1 + END IF +* + IF( IEEE ) THEN +* +* Assume we are on an IEEE machine which reserves one exponent +* for infinity and NaN. +* + EMAX = EMAX - 1 + END IF +* +* Now create RMAX, the largest machine number, which should +* be equal to (1.0 - BETA**(-P)) * BETA**EMAX . +* +* First compute 1.0 - BETA**(-P), being careful that the +* result is less than 1.0 . +* + RECBAS = ONE / BETA + Z = BETA - ONE + Y = ZERO + DO 20 I = 1, P + Z = Z*RECBAS + IF( Y.LT.ONE ) + $ OLDY = Y + Y = SLAMC3( Y, Z ) + 20 CONTINUE + IF( Y.GE.ONE ) + $ Y = OLDY +* +* Now multiply by BETA**EMAX to get RMAX. +* + DO 30 I = 1, EMAX + Y = SLAMC3( Y*BETA, ZERO ) + 30 CONTINUE +* + RMAX = Y + RETURN +* +* End of SLAMC5 +* + END diff --git a/2.3-1/src/fortran/lapack/xerbla.f b/2.3-1/src/fortran/lapack/xerbla.f new file mode 100644 index 00000000..c8c9231b --- /dev/null +++ b/2.3-1/src/fortran/lapack/xerbla.f @@ -0,0 +1,45 @@ + SUBROUTINE XERBLA( SRNAME, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER*6 SRNAME + INTEGER INFO +* .. +* +* Purpose +* ======= +* +* XERBLA is an error handler for the LAPACK routines. +* It is called by an LAPACK routine if an input parameter has an +* invalid value. A message is printed and execution stops. +* +* Installers may consider modifying the STOP statement in order to +* call system-specific exception-handling facilities. +* +* Arguments +* ========= +* +* SRNAME (input) CHARACTER*6 +* The name of the routine which called XERBLA. +* +* INFO (input) INTEGER +* The position of the invalid parameter in the parameter list +* of the calling routine. +* +* ===================================================================== +* +* .. Executable Statements .. +* + WRITE( *, FMT = 9999 )SRNAME, INFO +* + STOP +* + 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ', + $ 'an illegal value' ) +* +* End of XERBLA +* + END diff --git a/2.3-1/src/fortran/lapack/zbdsqr.f b/2.3-1/src/fortran/lapack/zbdsqr.f new file mode 100644 index 00000000..f9086be5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zbdsqr.f @@ -0,0 +1,742 @@ + SUBROUTINE ZBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, + $ LDU, C, LDC, RWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ), RWORK( * ) + COMPLEX*16 C( LDC, * ), U( LDU, * ), VT( LDVT, * ) +* .. +* +* Purpose +* ======= +* +* ZBDSQR computes the singular values and, optionally, the right and/or +* left singular vectors from the singular value decomposition (SVD) of +* a real N-by-N (upper or lower) bidiagonal matrix B using the implicit +* zero-shift QR algorithm. The SVD of B has the form +* +* B = Q * S * P**H +* +* where S is the diagonal matrix of singular values, Q is an orthogonal +* matrix of left singular vectors, and P is an orthogonal matrix of +* right singular vectors. If left singular vectors are requested, this +* subroutine actually returns U*Q instead of Q, and, if right singular +* vectors are requested, this subroutine returns P**H*VT instead of +* P**H, for given complex input matrices U and VT. When U and VT are +* the unitary matrices that reduce a general matrix A to bidiagonal +* form: A = U*B*VT, as computed by ZGEBRD, then +* +* A = (U*Q) * S * (P**H*VT) +* +* is the SVD of A. Optionally, the subroutine may also compute Q**H*C +* for a given complex input matrix C. +* +* See "Computing Small Singular Values of Bidiagonal Matrices With +* Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan, +* LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, +* no. 5, pp. 873-912, Sept 1990) and +* "Accurate singular values and differential qd algorithms," by +* B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics +* Department, University of California at Berkeley, July 1992 +* for a detailed description of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': B is upper bidiagonal; +* = 'L': B is lower bidiagonal. +* +* N (input) INTEGER +* The order of the matrix B. N >= 0. +* +* NCVT (input) INTEGER +* The number of columns of the matrix VT. NCVT >= 0. +* +* NRU (input) INTEGER +* The number of rows of the matrix U. NRU >= 0. +* +* NCC (input) INTEGER +* The number of columns of the matrix C. NCC >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the n diagonal elements of the bidiagonal matrix B. +* On exit, if INFO=0, the singular values of B in decreasing +* order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N-1) +* On entry, the N-1 offdiagonal elements of the bidiagonal +* matrix B. +* On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E +* will contain the diagonal and superdiagonal elements of a +* bidiagonal matrix orthogonally equivalent to the one given +* as input. +* +* VT (input/output) COMPLEX*16 array, dimension (LDVT, NCVT) +* On entry, an N-by-NCVT matrix VT. +* On exit, VT is overwritten by P**H * VT. +* Not referenced if NCVT = 0. +* +* LDVT (input) INTEGER +* The leading dimension of the array VT. +* LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0. +* +* U (input/output) COMPLEX*16 array, dimension (LDU, N) +* On entry, an NRU-by-N matrix U. +* On exit, U is overwritten by U * Q. +* Not referenced if NRU = 0. +* +* LDU (input) INTEGER +* The leading dimension of the array U. LDU >= max(1,NRU). +* +* C (input/output) COMPLEX*16 array, dimension (LDC, NCC) +* On entry, an N-by-NCC matrix C. +* On exit, C is overwritten by Q**H * C. +* Not referenced if NCC = 0. +* +* LDC (input) INTEGER +* The leading dimension of the array C. +* LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: If INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm did not converge; D and E contain the +* elements of a bidiagonal matrix which is orthogonally +* similar to the input matrix B; if INFO = i, i +* elements of E have not converged to zero. +* +* Internal Parameters +* =================== +* +* TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8))) +* TOLMUL controls the convergence criterion of the QR loop. +* If it is positive, TOLMUL*EPS is the desired relative +* precision in the computed singular values. +* If it is negative, abs(TOLMUL*EPS*sigma_max) is the +* desired absolute accuracy in the computed singular +* values (corresponds to relative accuracy +* abs(TOLMUL*EPS) in the largest singular value. +* abs(TOLMUL) should be between 1 and 1/EPS, and preferably +* between 10 (for fast convergence) and .1/EPS +* (for there to be some accuracy in the results). +* Default is to lose at either one eighth or 2 of the +* available decimal digits in each computed singular value +* (whichever is smaller). +* +* MAXITR INTEGER, default = 6 +* MAXITR controls the maximum number of passes of the +* algorithm through its inner loop. The algorithms stops +* (and so fails to converge) if the number of passes +* through the inner loop exceeds MAXITR*N**2. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D0 ) + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D0 ) + DOUBLE PRECISION NEGONE + PARAMETER ( NEGONE = -1.0D0 ) + DOUBLE PRECISION HNDRTH + PARAMETER ( HNDRTH = 0.01D0 ) + DOUBLE PRECISION TEN + PARAMETER ( TEN = 10.0D0 ) + DOUBLE PRECISION HNDRD + PARAMETER ( HNDRD = 100.0D0 ) + DOUBLE PRECISION MEIGTH + PARAMETER ( MEIGTH = -0.125D0 ) + INTEGER MAXITR + PARAMETER ( MAXITR = 6 ) +* .. +* .. Local Scalars .. + LOGICAL LOWER, ROTATE + INTEGER I, IDIR, ISUB, ITER, J, LL, LLL, M, MAXIT, NM1, + $ NM12, NM13, OLDLL, OLDM + DOUBLE PRECISION ABSE, ABSS, COSL, COSR, CS, EPS, F, G, H, MU, + $ OLDCS, OLDSN, R, SHIFT, SIGMN, SIGMX, SINL, + $ SINR, SLL, SMAX, SMIN, SMINL, SMINOA, + $ SN, THRESH, TOL, TOLMUL, UNFL +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLARTG, DLAS2, DLASQ1, DLASV2, XERBLA, ZDROT, + $ ZDSCAL, ZLASR, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, MIN, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + LOWER = LSAME( UPLO, 'L' ) + IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LOWER ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NCVT.LT.0 ) THEN + INFO = -3 + ELSE IF( NRU.LT.0 ) THEN + INFO = -4 + ELSE IF( NCC.LT.0 ) THEN + INFO = -5 + ELSE IF( ( NCVT.EQ.0 .AND. LDVT.LT.1 ) .OR. + $ ( NCVT.GT.0 .AND. LDVT.LT.MAX( 1, N ) ) ) THEN + INFO = -9 + ELSE IF( LDU.LT.MAX( 1, NRU ) ) THEN + INFO = -11 + ELSE IF( ( NCC.EQ.0 .AND. LDC.LT.1 ) .OR. + $ ( NCC.GT.0 .AND. LDC.LT.MAX( 1, N ) ) ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZBDSQR', -INFO ) + RETURN + END IF + IF( N.EQ.0 ) + $ RETURN + IF( N.EQ.1 ) + $ GO TO 160 +* +* ROTATE is true if any singular vectors desired, false otherwise +* + ROTATE = ( NCVT.GT.0 ) .OR. ( NRU.GT.0 ) .OR. ( NCC.GT.0 ) +* +* If no singular vectors desired, use qd algorithm +* + IF( .NOT.ROTATE ) THEN + CALL DLASQ1( N, D, E, RWORK, INFO ) + RETURN + END IF +* + NM1 = N - 1 + NM12 = NM1 + NM1 + NM13 = NM12 + NM1 + IDIR = 0 +* +* Get machine constants +* + EPS = DLAMCH( 'Epsilon' ) + UNFL = DLAMCH( 'Safe minimum' ) +* +* If matrix lower bidiagonal, rotate to be upper bidiagonal +* by applying Givens rotations on the left +* + IF( LOWER ) THEN + DO 10 I = 1, N - 1 + CALL DLARTG( D( I ), E( I ), CS, SN, R ) + D( I ) = R + E( I ) = SN*D( I+1 ) + D( I+1 ) = CS*D( I+1 ) + RWORK( I ) = CS + RWORK( NM1+I ) = SN + 10 CONTINUE +* +* Update singular vectors if desired +* + IF( NRU.GT.0 ) + $ CALL ZLASR( 'R', 'V', 'F', NRU, N, RWORK( 1 ), RWORK( N ), + $ U, LDU ) + IF( NCC.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'F', N, NCC, RWORK( 1 ), RWORK( N ), + $ C, LDC ) + END IF +* +* Compute singular values to relative accuracy TOL +* (By setting TOL to be negative, algorithm will compute +* singular values to absolute accuracy ABS(TOL)*norm(input matrix)) +* + TOLMUL = MAX( TEN, MIN( HNDRD, EPS**MEIGTH ) ) + TOL = TOLMUL*EPS +* +* Compute approximate maximum, minimum singular values +* + SMAX = ZERO + DO 20 I = 1, N + SMAX = MAX( SMAX, ABS( D( I ) ) ) + 20 CONTINUE + DO 30 I = 1, N - 1 + SMAX = MAX( SMAX, ABS( E( I ) ) ) + 30 CONTINUE + SMINL = ZERO + IF( TOL.GE.ZERO ) THEN +* +* Relative accuracy desired +* + SMINOA = ABS( D( 1 ) ) + IF( SMINOA.EQ.ZERO ) + $ GO TO 50 + MU = SMINOA + DO 40 I = 2, N + MU = ABS( D( I ) )*( MU / ( MU+ABS( E( I-1 ) ) ) ) + SMINOA = MIN( SMINOA, MU ) + IF( SMINOA.EQ.ZERO ) + $ GO TO 50 + 40 CONTINUE + 50 CONTINUE + SMINOA = SMINOA / SQRT( DBLE( N ) ) + THRESH = MAX( TOL*SMINOA, MAXITR*N*N*UNFL ) + ELSE +* +* Absolute accuracy desired +* + THRESH = MAX( ABS( TOL )*SMAX, MAXITR*N*N*UNFL ) + END IF +* +* Prepare for main iteration loop for the singular values +* (MAXIT is the maximum number of passes through the inner +* loop permitted before nonconvergence signalled.) +* + MAXIT = MAXITR*N*N + ITER = 0 + OLDLL = -1 + OLDM = -1 +* +* M points to last element of unconverged part of matrix +* + M = N +* +* Begin main iteration loop +* + 60 CONTINUE +* +* Check for convergence or exceeding iteration count +* + IF( M.LE.1 ) + $ GO TO 160 + IF( ITER.GT.MAXIT ) + $ GO TO 200 +* +* Find diagonal block of matrix to work on +* + IF( TOL.LT.ZERO .AND. ABS( D( M ) ).LE.THRESH ) + $ D( M ) = ZERO + SMAX = ABS( D( M ) ) + SMIN = SMAX + DO 70 LLL = 1, M - 1 + LL = M - LLL + ABSS = ABS( D( LL ) ) + ABSE = ABS( E( LL ) ) + IF( TOL.LT.ZERO .AND. ABSS.LE.THRESH ) + $ D( LL ) = ZERO + IF( ABSE.LE.THRESH ) + $ GO TO 80 + SMIN = MIN( SMIN, ABSS ) + SMAX = MAX( SMAX, ABSS, ABSE ) + 70 CONTINUE + LL = 0 + GO TO 90 + 80 CONTINUE + E( LL ) = ZERO +* +* Matrix splits since E(LL) = 0 +* + IF( LL.EQ.M-1 ) THEN +* +* Convergence of bottom singular value, return to top of loop +* + M = M - 1 + GO TO 60 + END IF + 90 CONTINUE + LL = LL + 1 +* +* E(LL) through E(M-1) are nonzero, E(LL-1) is zero +* + IF( LL.EQ.M-1 ) THEN +* +* 2 by 2 block, handle separately +* + CALL DLASV2( D( M-1 ), E( M-1 ), D( M ), SIGMN, SIGMX, SINR, + $ COSR, SINL, COSL ) + D( M-1 ) = SIGMX + E( M-1 ) = ZERO + D( M ) = SIGMN +* +* Compute singular vectors, if desired +* + IF( NCVT.GT.0 ) + $ CALL ZDROT( NCVT, VT( M-1, 1 ), LDVT, VT( M, 1 ), LDVT, + $ COSR, SINR ) + IF( NRU.GT.0 ) + $ CALL ZDROT( NRU, U( 1, M-1 ), 1, U( 1, M ), 1, COSL, SINL ) + IF( NCC.GT.0 ) + $ CALL ZDROT( NCC, C( M-1, 1 ), LDC, C( M, 1 ), LDC, COSL, + $ SINL ) + M = M - 2 + GO TO 60 + END IF +* +* If working on new submatrix, choose shift direction +* (from larger end diagonal element towards smaller) +* + IF( LL.GT.OLDM .OR. M.LT.OLDLL ) THEN + IF( ABS( D( LL ) ).GE.ABS( D( M ) ) ) THEN +* +* Chase bulge from top (big end) to bottom (small end) +* + IDIR = 1 + ELSE +* +* Chase bulge from bottom (big end) to top (small end) +* + IDIR = 2 + END IF + END IF +* +* Apply convergence tests +* + IF( IDIR.EQ.1 ) THEN +* +* Run convergence test in forward direction +* First apply standard test to bottom of matrix +* + IF( ABS( E( M-1 ) ).LE.ABS( TOL )*ABS( D( M ) ) .OR. + $ ( TOL.LT.ZERO .AND. ABS( E( M-1 ) ).LE.THRESH ) ) THEN + E( M-1 ) = ZERO + GO TO 60 + END IF +* + IF( TOL.GE.ZERO ) THEN +* +* If relative accuracy desired, +* apply convergence criterion forward +* + MU = ABS( D( LL ) ) + SMINL = MU + DO 100 LLL = LL, M - 1 + IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN + E( LLL ) = ZERO + GO TO 60 + END IF + MU = ABS( D( LLL+1 ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) + SMINL = MIN( SMINL, MU ) + 100 CONTINUE + END IF +* + ELSE +* +* Run convergence test in backward direction +* First apply standard test to top of matrix +* + IF( ABS( E( LL ) ).LE.ABS( TOL )*ABS( D( LL ) ) .OR. + $ ( TOL.LT.ZERO .AND. ABS( E( LL ) ).LE.THRESH ) ) THEN + E( LL ) = ZERO + GO TO 60 + END IF +* + IF( TOL.GE.ZERO ) THEN +* +* If relative accuracy desired, +* apply convergence criterion backward +* + MU = ABS( D( M ) ) + SMINL = MU + DO 110 LLL = M - 1, LL, -1 + IF( ABS( E( LLL ) ).LE.TOL*MU ) THEN + E( LLL ) = ZERO + GO TO 60 + END IF + MU = ABS( D( LLL ) )*( MU / ( MU+ABS( E( LLL ) ) ) ) + SMINL = MIN( SMINL, MU ) + 110 CONTINUE + END IF + END IF + OLDLL = LL + OLDM = M +* +* Compute shift. First, test if shifting would ruin relative +* accuracy, and if so set the shift to zero. +* + IF( TOL.GE.ZERO .AND. N*TOL*( SMINL / SMAX ).LE. + $ MAX( EPS, HNDRTH*TOL ) ) THEN +* +* Use a zero shift to avoid loss of relative accuracy +* + SHIFT = ZERO + ELSE +* +* Compute the shift from 2-by-2 block at end of matrix +* + IF( IDIR.EQ.1 ) THEN + SLL = ABS( D( LL ) ) + CALL DLAS2( D( M-1 ), E( M-1 ), D( M ), SHIFT, R ) + ELSE + SLL = ABS( D( M ) ) + CALL DLAS2( D( LL ), E( LL ), D( LL+1 ), SHIFT, R ) + END IF +* +* Test if shift negligible, and if so set to zero +* + IF( SLL.GT.ZERO ) THEN + IF( ( SHIFT / SLL )**2.LT.EPS ) + $ SHIFT = ZERO + END IF + END IF +* +* Increment iteration count +* + ITER = ITER + M - LL +* +* If SHIFT = 0, do simplified QR iteration +* + IF( SHIFT.EQ.ZERO ) THEN + IF( IDIR.EQ.1 ) THEN +* +* Chase bulge from top to bottom +* Save cosines and sines for later singular vector updates +* + CS = ONE + OLDCS = ONE + DO 120 I = LL, M - 1 + CALL DLARTG( D( I )*CS, E( I ), CS, SN, R ) + IF( I.GT.LL ) + $ E( I-1 ) = OLDSN*R + CALL DLARTG( OLDCS*R, D( I+1 )*SN, OLDCS, OLDSN, D( I ) ) + RWORK( I-LL+1 ) = CS + RWORK( I-LL+1+NM1 ) = SN + RWORK( I-LL+1+NM12 ) = OLDCS + RWORK( I-LL+1+NM13 ) = OLDSN + 120 CONTINUE + H = D( M )*CS + D( M ) = H*OLDCS + E( M-1 ) = H*OLDSN +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'F', M-LL+1, NCVT, RWORK( 1 ), + $ RWORK( N ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL ZLASR( 'R', 'V', 'F', NRU, M-LL+1, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'F', M-LL+1, NCC, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( M-1 ) ).LE.THRESH ) + $ E( M-1 ) = ZERO +* + ELSE +* +* Chase bulge from bottom to top +* Save cosines and sines for later singular vector updates +* + CS = ONE + OLDCS = ONE + DO 130 I = M, LL + 1, -1 + CALL DLARTG( D( I )*CS, E( I-1 ), CS, SN, R ) + IF( I.LT.M ) + $ E( I ) = OLDSN*R + CALL DLARTG( OLDCS*R, D( I-1 )*SN, OLDCS, OLDSN, D( I ) ) + RWORK( I-LL ) = CS + RWORK( I-LL+NM1 ) = -SN + RWORK( I-LL+NM12 ) = OLDCS + RWORK( I-LL+NM13 ) = -OLDSN + 130 CONTINUE + H = D( LL )*CS + D( LL ) = H*OLDCS + E( LL ) = H*OLDSN +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'B', M-LL+1, NCVT, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL ZLASR( 'R', 'V', 'B', NRU, M-LL+1, RWORK( 1 ), + $ RWORK( N ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'B', M-LL+1, NCC, RWORK( 1 ), + $ RWORK( N ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( LL ) ).LE.THRESH ) + $ E( LL ) = ZERO + END IF + ELSE +* +* Use nonzero shift +* + IF( IDIR.EQ.1 ) THEN +* +* Chase bulge from top to bottom +* Save cosines and sines for later singular vector updates +* + F = ( ABS( D( LL ) )-SHIFT )* + $ ( SIGN( ONE, D( LL ) )+SHIFT / D( LL ) ) + G = E( LL ) + DO 140 I = LL, M - 1 + CALL DLARTG( F, G, COSR, SINR, R ) + IF( I.GT.LL ) + $ E( I-1 ) = R + F = COSR*D( I ) + SINR*E( I ) + E( I ) = COSR*E( I ) - SINR*D( I ) + G = SINR*D( I+1 ) + D( I+1 ) = COSR*D( I+1 ) + CALL DLARTG( F, G, COSL, SINL, R ) + D( I ) = R + F = COSL*E( I ) + SINL*D( I+1 ) + D( I+1 ) = COSL*D( I+1 ) - SINL*E( I ) + IF( I.LT.M-1 ) THEN + G = SINL*E( I+1 ) + E( I+1 ) = COSL*E( I+1 ) + END IF + RWORK( I-LL+1 ) = COSR + RWORK( I-LL+1+NM1 ) = SINR + RWORK( I-LL+1+NM12 ) = COSL + RWORK( I-LL+1+NM13 ) = SINL + 140 CONTINUE + E( M-1 ) = F +* +* Update singular vectors +* + IF( NCVT.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'F', M-LL+1, NCVT, RWORK( 1 ), + $ RWORK( N ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL ZLASR( 'R', 'V', 'F', NRU, M-LL+1, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'F', M-LL+1, NCC, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), C( LL, 1 ), LDC ) +* +* Test convergence +* + IF( ABS( E( M-1 ) ).LE.THRESH ) + $ E( M-1 ) = ZERO +* + ELSE +* +* Chase bulge from bottom to top +* Save cosines and sines for later singular vector updates +* + F = ( ABS( D( M ) )-SHIFT )*( SIGN( ONE, D( M ) )+SHIFT / + $ D( M ) ) + G = E( M-1 ) + DO 150 I = M, LL + 1, -1 + CALL DLARTG( F, G, COSR, SINR, R ) + IF( I.LT.M ) + $ E( I ) = R + F = COSR*D( I ) + SINR*E( I-1 ) + E( I-1 ) = COSR*E( I-1 ) - SINR*D( I ) + G = SINR*D( I-1 ) + D( I-1 ) = COSR*D( I-1 ) + CALL DLARTG( F, G, COSL, SINL, R ) + D( I ) = R + F = COSL*E( I-1 ) + SINL*D( I-1 ) + D( I-1 ) = COSL*D( I-1 ) - SINL*E( I-1 ) + IF( I.GT.LL+1 ) THEN + G = SINL*E( I-2 ) + E( I-2 ) = COSL*E( I-2 ) + END IF + RWORK( I-LL ) = COSR + RWORK( I-LL+NM1 ) = -SINR + RWORK( I-LL+NM12 ) = COSL + RWORK( I-LL+NM13 ) = -SINL + 150 CONTINUE + E( LL ) = F +* +* Test convergence +* + IF( ABS( E( LL ) ).LE.THRESH ) + $ E( LL ) = ZERO +* +* Update singular vectors if desired +* + IF( NCVT.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'B', M-LL+1, NCVT, RWORK( NM12+1 ), + $ RWORK( NM13+1 ), VT( LL, 1 ), LDVT ) + IF( NRU.GT.0 ) + $ CALL ZLASR( 'R', 'V', 'B', NRU, M-LL+1, RWORK( 1 ), + $ RWORK( N ), U( 1, LL ), LDU ) + IF( NCC.GT.0 ) + $ CALL ZLASR( 'L', 'V', 'B', M-LL+1, NCC, RWORK( 1 ), + $ RWORK( N ), C( LL, 1 ), LDC ) + END IF + END IF +* +* QR iteration finished, go back and check convergence +* + GO TO 60 +* +* All singular values converged, so make them positive +* + 160 CONTINUE + DO 170 I = 1, N + IF( D( I ).LT.ZERO ) THEN + D( I ) = -D( I ) +* +* Change sign of singular vectors, if desired +* + IF( NCVT.GT.0 ) + $ CALL ZDSCAL( NCVT, NEGONE, VT( I, 1 ), LDVT ) + END IF + 170 CONTINUE +* +* Sort the singular values into decreasing order (insertion sort on +* singular values, but only one transposition per singular vector) +* + DO 190 I = 1, N - 1 +* +* Scan for smallest D(I) +* + ISUB = 1 + SMIN = D( 1 ) + DO 180 J = 2, N + 1 - I + IF( D( J ).LE.SMIN ) THEN + ISUB = J + SMIN = D( J ) + END IF + 180 CONTINUE + IF( ISUB.NE.N+1-I ) THEN +* +* Swap singular values and vectors +* + D( ISUB ) = D( N+1-I ) + D( N+1-I ) = SMIN + IF( NCVT.GT.0 ) + $ CALL ZSWAP( NCVT, VT( ISUB, 1 ), LDVT, VT( N+1-I, 1 ), + $ LDVT ) + IF( NRU.GT.0 ) + $ CALL ZSWAP( NRU, U( 1, ISUB ), 1, U( 1, N+1-I ), 1 ) + IF( NCC.GT.0 ) + $ CALL ZSWAP( NCC, C( ISUB, 1 ), LDC, C( N+1-I, 1 ), LDC ) + END IF + 190 CONTINUE + GO TO 220 +* +* Maximum number of iterations exceeded, failure to converge +* + 200 CONTINUE + INFO = 0 + DO 210 I = 1, N - 1 + IF( E( I ).NE.ZERO ) + $ INFO = INFO + 1 + 210 CONTINUE + 220 CONTINUE + RETURN +* +* End of ZBDSQR +* + END diff --git a/2.3-1/src/fortran/lapack/zdrot.f b/2.3-1/src/fortran/lapack/zdrot.f new file mode 100644 index 00000000..3b946e99 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zdrot.f @@ -0,0 +1,96 @@ + SUBROUTINE ZDROT( N, CX, INCX, CY, INCY, C, S ) +* +* .. Scalar Arguments .. + INTEGER INCX, INCY, N + DOUBLE PRECISION C, S +* .. +* .. Array Arguments .. + COMPLEX*16 CX( * ), CY( * ) +* .. +* +* Purpose +* ======= +* +* Applies a plane rotation, where the cos and sin (c and s) are real +* and the vectors cx and cy are complex. +* jack dongarra, linpack, 3/11/78. +* +* Arguments +* ========== +* +* N (input) INTEGER +* On entry, N specifies the order of the vectors cx and cy. +* N must be at least zero. +* Unchanged on exit. +* +* CX (input) COMPLEX*16 array, dimension at least +* ( 1 + ( N - 1 )*abs( INCX ) ). +* Before entry, the incremented array CX must contain the n +* element vector cx. On exit, CX is overwritten by the updated +* vector cx. +* +* INCX (input) INTEGER +* On entry, INCX specifies the increment for the elements of +* CX. INCX must not be zero. +* Unchanged on exit. +* +* CY (input) COMPLEX*16 array, dimension at least +* ( 1 + ( N - 1 )*abs( INCY ) ). +* Before entry, the incremented array CY must contain the n +* element vector cy. On exit, CY is overwritten by the updated +* vector cy. +* +* INCY (input) INTEGER +* On entry, INCY specifies the increment for the elements of +* CY. INCY must not be zero. +* Unchanged on exit. +* +* C (input) DOUBLE PRECISION +* On entry, C specifies the cosine, cos. +* Unchanged on exit. +* +* S (input) DOUBLE PRECISION +* On entry, S specifies the sine, sin. +* Unchanged on exit. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, IX, IY + COMPLEX*16 CTEMP +* .. +* .. Executable Statements .. +* + IF( N.LE.0 ) + $ RETURN + IF( INCX.EQ.1 .AND. INCY.EQ.1 ) + $ GO TO 20 +* +* code for unequal increments or equal increments not equal +* to 1 +* + IX = 1 + IY = 1 + IF( INCX.LT.0 ) + $ IX = ( -N+1 )*INCX + 1 + IF( INCY.LT.0 ) + $ IY = ( -N+1 )*INCY + 1 + DO 10 I = 1, N + CTEMP = C*CX( IX ) + S*CY( IY ) + CY( IY ) = C*CY( IY ) - S*CX( IX ) + CX( IX ) = CTEMP + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + RETURN +* +* code for both increments equal to 1 +* + 20 CONTINUE + DO 30 I = 1, N + CTEMP = C*CX( I ) + S*CY( I ) + CY( I ) = C*CY( I ) - S*CX( I ) + CX( I ) = CTEMP + 30 CONTINUE + RETURN + END diff --git a/2.3-1/src/fortran/lapack/zdrscl.f b/2.3-1/src/fortran/lapack/zdrscl.f new file mode 100644 index 00000000..11686d0b --- /dev/null +++ b/2.3-1/src/fortran/lapack/zdrscl.f @@ -0,0 +1,114 @@ + SUBROUTINE ZDRSCL( N, SA, SX, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + DOUBLE PRECISION SA +* .. +* .. Array Arguments .. + COMPLEX*16 SX( * ) +* .. +* +* Purpose +* ======= +* +* ZDRSCL multiplies an n-element complex vector x by the real scalar +* 1/a. This is done without overflow or underflow as long as +* the final result x/a does not overflow or underflow. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of components of the vector x. +* +* SA (input) DOUBLE PRECISION +* The scalar a which is used to divide each component of x. +* SA must be >= 0, or the subroutine will divide by zero. +* +* SX (input/output) COMPLEX*16 array, dimension +* (1+(N-1)*abs(INCX)) +* The n-element vector x. +* +* INCX (input) INTEGER +* The increment between successive values of the vector SX. +* > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL DONE + DOUBLE PRECISION BIGNUM, CDEN, CDEN1, CNUM, CNUM1, MUL, SMLNUM +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, ZDSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Initialize the denominator to SA and the numerator to 1. +* + CDEN = SA + CNUM = ONE +* + 10 CONTINUE + CDEN1 = CDEN*SMLNUM + CNUM1 = CNUM / BIGNUM + IF( ABS( CDEN1 ).GT.ABS( CNUM ) .AND. CNUM.NE.ZERO ) THEN +* +* Pre-multiply X by SMLNUM if CDEN is large compared to CNUM. +* + MUL = SMLNUM + DONE = .FALSE. + CDEN = CDEN1 + ELSE IF( ABS( CNUM1 ).GT.ABS( CDEN ) ) THEN +* +* Pre-multiply X by BIGNUM if CDEN is small compared to CNUM. +* + MUL = BIGNUM + DONE = .FALSE. + CNUM = CNUM1 + ELSE +* +* Multiply X by CNUM / CDEN and return. +* + MUL = CNUM / CDEN + DONE = .TRUE. + END IF +* +* Scale the vector X by MUL +* + CALL ZDSCAL( N, MUL, SX, INCX ) +* + IF( .NOT.DONE ) + $ GO TO 10 +* + RETURN +* +* End of ZDRSCL +* + END diff --git a/2.3-1/src/fortran/lapack/zgebak.f b/2.3-1/src/fortran/lapack/zgebak.f new file mode 100644 index 00000000..1023601d --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgebak.f @@ -0,0 +1,189 @@ + SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB, SIDE + INTEGER IHI, ILO, INFO, LDV, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION SCALE( * ) + COMPLEX*16 V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* ZGEBAK forms the right or left eigenvectors of a complex general +* matrix by backward transformation on the computed eigenvectors of the +* balanced matrix output by ZGEBAL. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the type of backward transformation required: +* = 'N', do nothing, return immediately; +* = 'P', do backward transformation for permutation only; +* = 'S', do backward transformation for scaling only; +* = 'B', do backward transformations for both permutation and +* scaling. +* JOB must be the same as the argument JOB supplied to ZGEBAL. +* +* SIDE (input) CHARACTER*1 +* = 'R': V contains right eigenvectors; +* = 'L': V contains left eigenvectors. +* +* N (input) INTEGER +* The number of rows of the matrix V. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* The integers ILO and IHI determined by ZGEBAL. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* SCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutation and scaling factors, as returned +* by ZGEBAL. +* +* M (input) INTEGER +* The number of columns of the matrix V. M >= 0. +* +* V (input/output) COMPLEX*16 array, dimension (LDV,M) +* On entry, the matrix of right or left eigenvectors to be +* transformed, as returned by ZHSEIN or ZTREVC. +* On exit, V is overwritten by the transformed eigenvectors. +* +* LDV (input) INTEGER +* The leading dimension of the array V. LDV >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LEFTV, RIGHTV + INTEGER I, II, K + DOUBLE PRECISION S +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZDSCAL, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Decode and Test the input parameters +* + RIGHTV = LSAME( SIDE, 'R' ) + LEFTV = LSAME( SIDE, 'L' ) +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -5 + ELSE IF( M.LT.0 ) THEN + INFO = -7 + ELSE IF( LDV.LT.MAX( 1, N ) ) THEN + INFO = -9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEBAK', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( M.EQ.0 ) + $ RETURN + IF( LSAME( JOB, 'N' ) ) + $ RETURN +* + IF( ILO.EQ.IHI ) + $ GO TO 30 +* +* Backward balance +* + IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN +* + IF( RIGHTV ) THEN + DO 10 I = ILO, IHI + S = SCALE( I ) + CALL ZDSCAL( M, S, V( I, 1 ), LDV ) + 10 CONTINUE + END IF +* + IF( LEFTV ) THEN + DO 20 I = ILO, IHI + S = ONE / SCALE( I ) + CALL ZDSCAL( M, S, V( I, 1 ), LDV ) + 20 CONTINUE + END IF +* + END IF +* +* Backward permutation +* +* For I = ILO-1 step -1 until 1, +* IHI+1 step 1 until N do -- +* + 30 CONTINUE + IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN + IF( RIGHTV ) THEN + DO 40 II = 1, N + I = II + IF( I.GE.ILO .AND. I.LE.IHI ) + $ GO TO 40 + IF( I.LT.ILO ) + $ I = ILO - II + K = SCALE( I ) + IF( K.EQ.I ) + $ GO TO 40 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 40 CONTINUE + END IF +* + IF( LEFTV ) THEN + DO 50 II = 1, N + I = II + IF( I.GE.ILO .AND. I.LE.IHI ) + $ GO TO 50 + IF( I.LT.ILO ) + $ I = ILO - II + K = SCALE( I ) + IF( K.EQ.I ) + $ GO TO 50 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 50 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZGEBAK +* + END diff --git a/2.3-1/src/fortran/lapack/zgebal.f b/2.3-1/src/fortran/lapack/zgebal.f new file mode 100644 index 00000000..67ac2e14 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgebal.f @@ -0,0 +1,330 @@ + SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB + INTEGER IHI, ILO, INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION SCALE( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZGEBAL balances a general complex matrix A. This involves, first, +* permuting A by a similarity transformation to isolate eigenvalues +* in the first 1 to ILO-1 and last IHI+1 to N elements on the +* diagonal; and second, applying a diagonal similarity transformation +* to rows and columns ILO to IHI to make the rows and columns as +* close in norm as possible. Both steps are optional. +* +* Balancing may reduce the 1-norm of the matrix, and improve the +* accuracy of the computed eigenvalues and/or eigenvectors. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the operations to be performed on A: +* = 'N': none: simply set ILO = 1, IHI = N, SCALE(I) = 1.0 +* for i = 1,...,N; +* = 'P': permute only; +* = 'S': scale only; +* = 'B': both permute and scale. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the input matrix A. +* On exit, A is overwritten by the balanced matrix. +* If JOB = 'N', A is not referenced. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* ILO (output) INTEGER +* IHI (output) INTEGER +* ILO and IHI are set to integers such that on exit +* A(i,j) = 0 if i > j and j = 1,...,ILO-1 or I = IHI+1,...,N. +* If JOB = 'N' or 'S', ILO = 1 and IHI = N. +* +* SCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied to +* A. If P(j) is the index of the row and column interchanged +* with row and column j and D(j) is the scaling factor +* applied to row and column j, then +* SCALE(j) = P(j) for j = 1,...,ILO-1 +* = D(j) for j = ILO,...,IHI +* = P(j) for j = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The permutations consist of row and column interchanges which put +* the matrix in the form +* +* ( T1 X Y ) +* P A P = ( 0 B Z ) +* ( 0 0 T2 ) +* +* where T1 and T2 are upper triangular matrices whose eigenvalues lie +* along the diagonal. The column indices ILO and IHI mark the starting +* and ending columns of the submatrix B. Balancing consists of applying +* a diagonal similarity transformation inv(D) * B * D to make the +* 1-norms of each row of B and its corresponding column nearly equal. +* The output matrix is +* +* ( T1 X*D Y ) +* ( 0 inv(D)*B*D inv(D)*Z ). +* ( 0 0 T2 ) +* +* Information about the permutations P and the diagonal matrix D is +* returned in the vector SCALE. +* +* This subroutine is based on the EISPACK routine CBAL. +* +* Modified by Tzu-Yi Chen, Computer Science Division, University of +* California at Berkeley, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION SCLFAC + PARAMETER ( SCLFAC = 2.0D+0 ) + DOUBLE PRECISION FACTOR + PARAMETER ( FACTOR = 0.95D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOCONV + INTEGER I, ICA, IEXC, IRA, J, K, L, M + DOUBLE PRECISION C, CA, F, G, R, RA, S, SFMAX1, SFMAX2, SFMIN1, + $ SFMIN2 + COMPLEX*16 CDUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IZAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, IZAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZDSCAL, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG, MAX, MIN +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEBAL', -INFO ) + RETURN + END IF +* + K = 1 + L = N +* + IF( N.EQ.0 ) + $ GO TO 210 +* + IF( LSAME( JOB, 'N' ) ) THEN + DO 10 I = 1, N + SCALE( I ) = ONE + 10 CONTINUE + GO TO 210 + END IF +* + IF( LSAME( JOB, 'S' ) ) + $ GO TO 120 +* +* Permutation to isolate eigenvalues if possible +* + GO TO 50 +* +* Row and column exchange. +* + 20 CONTINUE + SCALE( M ) = J + IF( J.EQ.M ) + $ GO TO 30 +* + CALL ZSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) + CALL ZSWAP( N-K+1, A( J, K ), LDA, A( M, K ), LDA ) +* + 30 CONTINUE + GO TO ( 40, 80 )IEXC +* +* Search for rows isolating an eigenvalue and push them down. +* + 40 CONTINUE + IF( L.EQ.1 ) + $ GO TO 210 + L = L - 1 +* + 50 CONTINUE + DO 70 J = L, 1, -1 +* + DO 60 I = 1, L + IF( I.EQ.J ) + $ GO TO 60 + IF( DBLE( A( J, I ) ).NE.ZERO .OR. DIMAG( A( J, I ) ).NE. + $ ZERO )GO TO 70 + 60 CONTINUE +* + M = L + IEXC = 1 + GO TO 20 + 70 CONTINUE +* + GO TO 90 +* +* Search for columns isolating an eigenvalue and push them left. +* + 80 CONTINUE + K = K + 1 +* + 90 CONTINUE + DO 110 J = K, L +* + DO 100 I = K, L + IF( I.EQ.J ) + $ GO TO 100 + IF( DBLE( A( I, J ) ).NE.ZERO .OR. DIMAG( A( I, J ) ).NE. + $ ZERO )GO TO 110 + 100 CONTINUE +* + M = K + IEXC = 2 + GO TO 20 + 110 CONTINUE +* + 120 CONTINUE + DO 130 I = K, L + SCALE( I ) = ONE + 130 CONTINUE +* + IF( LSAME( JOB, 'P' ) ) + $ GO TO 210 +* +* Balance the submatrix in rows K to L. +* +* Iterative loop for norm reduction +* + SFMIN1 = DLAMCH( 'S' ) / DLAMCH( 'P' ) + SFMAX1 = ONE / SFMIN1 + SFMIN2 = SFMIN1*SCLFAC + SFMAX2 = ONE / SFMIN2 + 140 CONTINUE + NOCONV = .FALSE. +* + DO 200 I = K, L + C = ZERO + R = ZERO +* + DO 150 J = K, L + IF( J.EQ.I ) + $ GO TO 150 + C = C + CABS1( A( J, I ) ) + R = R + CABS1( A( I, J ) ) + 150 CONTINUE + ICA = IZAMAX( L, A( 1, I ), 1 ) + CA = ABS( A( ICA, I ) ) + IRA = IZAMAX( N-K+1, A( I, K ), LDA ) + RA = ABS( A( I, IRA+K-1 ) ) +* +* Guard against zero C or R due to underflow. +* + IF( C.EQ.ZERO .OR. R.EQ.ZERO ) + $ GO TO 200 + G = R / SCLFAC + F = ONE + S = C + R + 160 CONTINUE + IF( C.GE.G .OR. MAX( F, C, CA ).GE.SFMAX2 .OR. + $ MIN( R, G, RA ).LE.SFMIN2 )GO TO 170 + F = F*SCLFAC + C = C*SCLFAC + CA = CA*SCLFAC + R = R / SCLFAC + G = G / SCLFAC + RA = RA / SCLFAC + GO TO 160 +* + 170 CONTINUE + G = C / SCLFAC + 180 CONTINUE + IF( G.LT.R .OR. MAX( R, RA ).GE.SFMAX2 .OR. + $ MIN( F, C, G, CA ).LE.SFMIN2 )GO TO 190 + F = F / SCLFAC + C = C / SCLFAC + G = G / SCLFAC + CA = CA / SCLFAC + R = R*SCLFAC + RA = RA*SCLFAC + GO TO 180 +* +* Now balance. +* + 190 CONTINUE + IF( ( C+R ).GE.FACTOR*S ) + $ GO TO 200 + IF( F.LT.ONE .AND. SCALE( I ).LT.ONE ) THEN + IF( F*SCALE( I ).LE.SFMIN1 ) + $ GO TO 200 + END IF + IF( F.GT.ONE .AND. SCALE( I ).GT.ONE ) THEN + IF( SCALE( I ).GE.SFMAX1 / F ) + $ GO TO 200 + END IF + G = ONE / F + SCALE( I ) = SCALE( I )*F + NOCONV = .TRUE. +* + CALL ZDSCAL( N-K+1, G, A( I, K ), LDA ) + CALL ZDSCAL( L, F, A( 1, I ), 1 ) +* + 200 CONTINUE +* + IF( NOCONV ) + $ GO TO 140 +* + 210 CONTINUE + ILO = K + IHI = L +* + RETURN +* +* End of ZGEBAL +* + END diff --git a/2.3-1/src/fortran/lapack/zgebd2.f b/2.3-1/src/fortran/lapack/zgebd2.f new file mode 100644 index 00000000..5ba52e87 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgebd2.f @@ -0,0 +1,250 @@ + SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) + COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEBD2 reduces a complex general m by n matrix A to upper or lower +* real bidiagonal form B by a unitary transformation: Q' * A * P = B. +* +* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns in the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n general matrix to be reduced. +* On exit, +* if m >= n, the diagonal and the first superdiagonal are +* overwritten with the upper bidiagonal matrix B; the +* elements below the diagonal, with the array TAUQ, represent +* the unitary matrix Q as a product of elementary +* reflectors, and the elements above the first superdiagonal, +* with the array TAUP, represent the unitary matrix P as +* a product of elementary reflectors; +* if m < n, the diagonal and the first subdiagonal are +* overwritten with the lower bidiagonal matrix B; the +* elements below the first subdiagonal, with the array TAUQ, +* represent the unitary matrix Q as a product of +* elementary reflectors, and the elements above the diagonal, +* with the array TAUP, represent the unitary matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The diagonal elements of the bidiagonal matrix B: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) +* The off-diagonal elements of the bidiagonal matrix B: +* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; +* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. +* +* TAUQ (output) COMPLEX*16 array dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix Q. See Further Details. +* +* TAUP (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix P. See Further Details. +* +* WORK (workspace) COMPLEX*16 array, dimension (max(M,N)) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* If m >= n, +* +* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are complex scalars, and v and u are complex +* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in +* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in +* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, +* +* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are complex scalars, v and u are complex vectors; +* v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in A(i+2:m,i); +* u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in A(i,i+1:n); +* tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The contents of A on exit are illustrated by the following examples: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) +* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) +* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) +* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) +* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) +* ( v1 v2 v3 v4 v5 ) +* +* where d and e denote diagonal and off-diagonal elements of B, vi +* denotes an element of the vector defining H(i), and ui an element of +* the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACGV, ZLARF, ZLARFG +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.LT.0 ) THEN + CALL XERBLA( 'ZGEBD2', -INFO ) + RETURN + END IF +* + IF( M.GE.N ) THEN +* +* Reduce to upper bidiagonal form +* + DO 10 I = 1, N +* +* Generate elementary reflector H(i) to annihilate A(i+1:m,i) +* + ALPHA = A( I, I ) + CALL ZLARFG( M-I+1, ALPHA, A( MIN( I+1, M ), I ), 1, + $ TAUQ( I ) ) + D( I ) = ALPHA + A( I, I ) = ONE +* +* Apply H(i)' to A(i:m,i+1:n) from the left +* + IF( I.LT.N ) + $ CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, + $ DCONJG( TAUQ( I ) ), A( I, I+1 ), LDA, WORK ) + A( I, I ) = D( I ) +* + IF( I.LT.N ) THEN +* +* Generate elementary reflector G(i) to annihilate +* A(i,i+2:n) +* + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + ALPHA = A( I, I+1 ) + CALL ZLARFG( N-I, ALPHA, A( I, MIN( I+2, N ) ), LDA, + $ TAUP( I ) ) + E( I ) = ALPHA + A( I, I+1 ) = ONE +* +* Apply G(i) to A(i+1:m,i+1:n) from the right +* + CALL ZLARF( 'Right', M-I, N-I, A( I, I+1 ), LDA, + $ TAUP( I ), A( I+1, I+1 ), LDA, WORK ) + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + A( I, I+1 ) = E( I ) + ELSE + TAUP( I ) = ZERO + END IF + 10 CONTINUE + ELSE +* +* Reduce to lower bidiagonal form +* + DO 20 I = 1, M +* +* Generate elementary reflector G(i) to annihilate A(i,i+1:n) +* + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + ALPHA = A( I, I ) + CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA, + $ TAUP( I ) ) + D( I ) = ALPHA + A( I, I ) = ONE +* +* Apply G(i) to A(i+1:m,i:n) from the right +* + IF( I.LT.M ) + $ CALL ZLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, + $ TAUP( I ), A( I+1, I ), LDA, WORK ) + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + A( I, I ) = D( I ) +* + IF( I.LT.M ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(i+2:m,i) +* + ALPHA = A( I+1, I ) + CALL ZLARFG( M-I, ALPHA, A( MIN( I+2, M ), I ), 1, + $ TAUQ( I ) ) + E( I ) = ALPHA + A( I+1, I ) = ONE +* +* Apply H(i)' to A(i+1:m,i+1:n) from the left +* + CALL ZLARF( 'Left', M-I, N-I, A( I+1, I ), 1, + $ DCONJG( TAUQ( I ) ), A( I+1, I+1 ), LDA, + $ WORK ) + A( I+1, I ) = E( I ) + ELSE + TAUQ( I ) = ZERO + END IF + 20 CONTINUE + END IF + RETURN +* +* End of ZGEBD2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgebrd.f b/2.3-1/src/fortran/lapack/zgebrd.f new file mode 100644 index 00000000..4f97bd7e --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgebrd.f @@ -0,0 +1,268 @@ + SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) + COMPLEX*16 A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEBRD reduces a general complex M-by-N matrix A to upper or lower +* bidiagonal form B by a unitary transformation: Q**H * A * P = B. +* +* If m >= n, B is upper bidiagonal; if m < n, B is lower bidiagonal. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns in the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N general matrix to be reduced. +* On exit, +* if m >= n, the diagonal and the first superdiagonal are +* overwritten with the upper bidiagonal matrix B; the +* elements below the diagonal, with the array TAUQ, represent +* the unitary matrix Q as a product of elementary +* reflectors, and the elements above the first superdiagonal, +* with the array TAUP, represent the unitary matrix P as +* a product of elementary reflectors; +* if m < n, the diagonal and the first subdiagonal are +* overwritten with the lower bidiagonal matrix B; the +* elements below the first subdiagonal, with the array TAUQ, +* represent the unitary matrix Q as a product of +* elementary reflectors, and the elements above the diagonal, +* with the array TAUP, represent the unitary matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The diagonal elements of the bidiagonal matrix B: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (min(M,N)-1) +* The off-diagonal elements of the bidiagonal matrix B: +* if m >= n, E(i) = A(i,i+1) for i = 1,2,...,n-1; +* if m < n, E(i) = A(i+1,i) for i = 1,2,...,m-1. +* +* TAUQ (output) COMPLEX*16 array dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix Q. See Further Details. +* +* TAUP (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix P. See Further Details. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,M,N). +* For optimum performance LWORK >= (M+N)*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* If m >= n, +* +* Q = H(1) H(2) . . . H(n) and P = G(1) G(2) . . . G(n-1) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are complex scalars, and v and u are complex +* vectors; v(1:i-1) = 0, v(i) = 1, and v(i+1:m) is stored on exit in +* A(i+1:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+2:n) is stored on exit in +* A(i,i+2:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, +* +* Q = H(1) H(2) . . . H(m-1) and P = G(1) G(2) . . . G(m) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are complex scalars, and v and u are complex +* vectors; v(1:i) = 0, v(i+1) = 1, and v(i+2:m) is stored on exit in +* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i+1:n) is stored on exit in +* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The contents of A on exit are illustrated by the following examples: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( d e u1 u1 u1 ) ( d u1 u1 u1 u1 u1 ) +* ( v1 d e u2 u2 ) ( e d u2 u2 u2 u2 ) +* ( v1 v2 d e u3 ) ( v1 e d u3 u3 u3 ) +* ( v1 v2 v3 d e ) ( v1 v2 e d u4 u4 ) +* ( v1 v2 v3 v4 d ) ( v1 v2 v3 e d u5 ) +* ( v1 v2 v3 v4 v5 ) +* +* where d and e denote diagonal and off-diagonal elements of B, vi +* denotes an element of the vector defining H(i), and ui an element of +* the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB, + $ NBMIN, NX + DOUBLE PRECISION WS +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEBD2, ZGEMM, ZLABRD +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + NB = MAX( 1, ILAENV( 1, 'ZGEBRD', ' ', M, N, -1, -1 ) ) + LWKOPT = ( M+N )*NB + WORK( 1 ) = DBLE( LWKOPT ) + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, M, N ) .AND. .NOT.LQUERY ) THEN + INFO = -10 + END IF + IF( INFO.LT.0 ) THEN + CALL XERBLA( 'ZGEBRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + MINMN = MIN( M, N ) + IF( MINMN.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + WS = MAX( M, N ) + LDWRKX = M + LDWRKY = N +* + IF( NB.GT.1 .AND. NB.LT.MINMN ) THEN +* +* Set the crossover point NX. +* + NX = MAX( NB, ILAENV( 3, 'ZGEBRD', ' ', M, N, -1, -1 ) ) +* +* Determine when to switch from blocked to unblocked code. +* + IF( NX.LT.MINMN ) THEN + WS = ( M+N )*NB + IF( LWORK.LT.WS ) THEN +* +* Not enough work space for the optimal NB, consider using +* a smaller block size. +* + NBMIN = ILAENV( 2, 'ZGEBRD', ' ', M, N, -1, -1 ) + IF( LWORK.GE.( M+N )*NBMIN ) THEN + NB = LWORK / ( M+N ) + ELSE + NB = 1 + NX = MINMN + END IF + END IF + END IF + ELSE + NX = MINMN + END IF +* + DO 30 I = 1, MINMN - NX, NB +* +* Reduce rows and columns i:i+ib-1 to bidiagonal form and return +* the matrices X and Y which are needed to update the unreduced +* part of the matrix +* + CALL ZLABRD( M-I+1, N-I+1, NB, A( I, I ), LDA, D( I ), E( I ), + $ TAUQ( I ), TAUP( I ), WORK, LDWRKX, + $ WORK( LDWRKX*NB+1 ), LDWRKY ) +* +* Update the trailing submatrix A(i+ib:m,i+ib:n), using +* an update of the form A := A - V*Y' - X*U' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M-I-NB+1, + $ N-I-NB+1, NB, -ONE, A( I+NB, I ), LDA, + $ WORK( LDWRKX*NB+NB+1 ), LDWRKY, ONE, + $ A( I+NB, I+NB ), LDA ) + CALL ZGEMM( 'No transpose', 'No transpose', M-I-NB+1, N-I-NB+1, + $ NB, -ONE, WORK( NB+1 ), LDWRKX, A( I, I+NB ), LDA, + $ ONE, A( I+NB, I+NB ), LDA ) +* +* Copy diagonal and off-diagonal elements of B back into A +* + IF( M.GE.N ) THEN + DO 10 J = I, I + NB - 1 + A( J, J ) = D( J ) + A( J, J+1 ) = E( J ) + 10 CONTINUE + ELSE + DO 20 J = I, I + NB - 1 + A( J, J ) = D( J ) + A( J+1, J ) = E( J ) + 20 CONTINUE + END IF + 30 CONTINUE +* +* Use unblocked code to reduce the remainder of the matrix +* + CALL ZGEBD2( M-I+1, N-I+1, A( I, I ), LDA, D( I ), E( I ), + $ TAUQ( I ), TAUP( I ), WORK, IINFO ) + WORK( 1 ) = WS + RETURN +* +* End of ZGEBRD +* + END diff --git a/2.3-1/src/fortran/lapack/zgecon.f b/2.3-1/src/fortran/lapack/zgecon.f new file mode 100644 index 00000000..cfaaca35 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgecon.f @@ -0,0 +1,193 @@ + SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER INFO, LDA, N + DOUBLE PRECISION ANORM, RCOND +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGECON estimates the reciprocal of the condition number of a general +* complex matrix A, in either the 1-norm or the infinity-norm, using +* the LU factorization computed by ZGETRF. +* +* An estimate is obtained for norm(inv(A)), and the reciprocal of the +* condition number is computed as +* RCOND = 1 / ( norm(A) * norm(inv(A)) ). +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies whether the 1-norm condition number or the +* infinity-norm condition number is required: +* = '1' or 'O': 1-norm; +* = 'I': Infinity-norm. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The factors L and U from the factorization A = P*L*U +* as computed by ZGETRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* ANORM (input) DOUBLE PRECISION +* If NORM = '1' or 'O', the 1-norm of the original matrix A. +* If NORM = 'I', the infinity-norm of the original matrix A. +* +* RCOND (output) DOUBLE PRECISION +* The reciprocal of the condition number of the matrix A, +* computed as RCOND = 1/(norm(A) * norm(inv(A))). +* +* WORK (workspace) COMPLEX*16 array, dimension (2*N) +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ONENRM + CHARACTER NORMIN + INTEGER IX, KASE, KASE1 + DOUBLE PRECISION AINVNM, SCALE, SL, SMLNUM, SU + COMPLEX*16 ZDUM +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IZAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, IZAMAX, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZDRSCL, ZLACN2, ZLATRS +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG, MAX +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' ) + IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( ANORM.LT.ZERO ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGECON', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + RCOND = ZERO + IF( N.EQ.0 ) THEN + RCOND = ONE + RETURN + ELSE IF( ANORM.EQ.ZERO ) THEN + RETURN + END IF +* + SMLNUM = DLAMCH( 'Safe minimum' ) +* +* Estimate the norm of inv(A). +* + AINVNM = ZERO + NORMIN = 'N' + IF( ONENRM ) THEN + KASE1 = 1 + ELSE + KASE1 = 2 + END IF + KASE = 0 + 10 CONTINUE + CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.KASE1 ) THEN +* +* Multiply by inv(L). +* + CALL ZLATRS( 'Lower', 'No transpose', 'Unit', NORMIN, N, A, + $ LDA, WORK, SL, RWORK, INFO ) +* +* Multiply by inv(U). +* + CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, + $ A, LDA, WORK, SU, RWORK( N+1 ), INFO ) + ELSE +* +* Multiply by inv(U'). +* + CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit', + $ NORMIN, N, A, LDA, WORK, SU, RWORK( N+1 ), + $ INFO ) +* +* Multiply by inv(L'). +* + CALL ZLATRS( 'Lower', 'Conjugate transpose', 'Unit', NORMIN, + $ N, A, LDA, WORK, SL, RWORK, INFO ) + END IF +* +* Divide X by 1/(SL*SU) if doing so will not cause overflow. +* + SCALE = SL*SU + NORMIN = 'Y' + IF( SCALE.NE.ONE ) THEN + IX = IZAMAX( N, WORK, 1 ) + IF( SCALE.LT.CABS1( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) + $ GO TO 20 + CALL ZDRSCL( N, SCALE, WORK, 1 ) + END IF + GO TO 10 + END IF +* +* Compute the estimate of the reciprocal condition number. +* + IF( AINVNM.NE.ZERO ) + $ RCOND = ( ONE / AINVNM ) / ANORM +* + 20 CONTINUE + RETURN +* +* End of ZGECON +* + END diff --git a/2.3-1/src/fortran/lapack/zgees.f b/2.3-1/src/fortran/lapack/zgees.f new file mode 100644 index 00000000..ade5f9f2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgees.f @@ -0,0 +1,324 @@ + SUBROUTINE ZGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS, + $ LDVS, WORK, LWORK, RWORK, BWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVS, SORT + INTEGER INFO, LDA, LDVS, LWORK, N, SDIM +* .. +* .. Array Arguments .. + LOGICAL BWORK( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * ) +* .. +* .. Function Arguments .. + LOGICAL SELECT + EXTERNAL SELECT +* .. +* +* Purpose +* ======= +* +* ZGEES computes for an N-by-N complex nonsymmetric matrix A, the +* eigenvalues, the Schur form T, and, optionally, the matrix of Schur +* vectors Z. This gives the Schur factorization A = Z*T*(Z**H). +* +* Optionally, it also orders the eigenvalues on the diagonal of the +* Schur form so that selected eigenvalues are at the top left. +* The leading columns of Z then form an orthonormal basis for the +* invariant subspace corresponding to the selected eigenvalues. +* +* A complex matrix is in Schur form if it is upper triangular. +* +* Arguments +* ========= +* +* JOBVS (input) CHARACTER*1 +* = 'N': Schur vectors are not computed; +* = 'V': Schur vectors are computed. +* +* SORT (input) CHARACTER*1 +* Specifies whether or not to order the eigenvalues on the +* diagonal of the Schur form. +* = 'N': Eigenvalues are not ordered: +* = 'S': Eigenvalues are ordered (see SELECT). +* +* SELECT (external procedure) LOGICAL FUNCTION of one COMPLEX*16 argument +* SELECT must be declared EXTERNAL in the calling subroutine. +* If SORT = 'S', SELECT is used to select eigenvalues to order +* to the top left of the Schur form. +* IF SORT = 'N', SELECT is not referenced. +* The eigenvalue W(j) is selected if SELECT(W(j)) is true. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the N-by-N matrix A. +* On exit, A has been overwritten by its Schur form T. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* SDIM (output) INTEGER +* If SORT = 'N', SDIM = 0. +* If SORT = 'S', SDIM = number of eigenvalues for which +* SELECT is true. +* +* W (output) COMPLEX*16 array, dimension (N) +* W contains the computed eigenvalues, in the same order that +* they appear on the diagonal of the output Schur form T. +* +* VS (output) COMPLEX*16 array, dimension (LDVS,N) +* If JOBVS = 'V', VS contains the unitary matrix Z of Schur +* vectors. +* If JOBVS = 'N', VS is not referenced. +* +* LDVS (input) INTEGER +* The leading dimension of the array VS. LDVS >= 1; if +* JOBVS = 'V', LDVS >= N. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,2*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* BWORK (workspace) LOGICAL array, dimension (N) +* Not referenced if SORT = 'N'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, and i is +* <= N: the QR algorithm failed to compute all the +* eigenvalues; elements 1:ILO-1 and i+1:N of W +* contain those eigenvalues which have converged; +* if JOBVS = 'V', VS contains the matrix which +* reduces A to its partially converged Schur form. +* = N+1: the eigenvalues could not be reordered because +* some eigenvalues were too close to separate (the +* problem is very ill-conditioned); +* = N+2: after reordering, roundoff changed values of +* some complex eigenvalues so that leading +* eigenvalues in the Schur form no longer satisfy +* SELECT = .TRUE.. This could also be caused by +* underflow due to scaling. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, SCALEA, WANTST, WANTVS + INTEGER HSWORK, I, IBAL, ICOND, IERR, IEVAL, IHI, ILO, + $ ITAU, IWRK, MAXWRK, MINWRK + DOUBLE PRECISION ANRM, BIGNUM, CSCALE, EPS, S, SEP, SMLNUM +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZCOPY, ZGEBAK, ZGEBAL, ZGEHRD, + $ ZHSEQR, ZLACPY, ZLASCL, ZTRSEN, ZUNGHR +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + WANTVS = LSAME( JOBVS, 'V' ) + WANTST = LSAME( SORT, 'S' ) + IF( ( .NOT.WANTVS ) .AND. ( .NOT.LSAME( JOBVS, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDVS.LT.1 .OR. ( WANTVS .AND. LDVS.LT.N ) ) THEN + INFO = -10 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* CWorkspace refers to complex workspace, and RWorkspace to real +* workspace. NB refers to the optimal block size for the +* immediately following subroutine, as returned by ILAENV. +* HSWORK refers to the workspace preferred by ZHSEQR, as +* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, +* the worst case.) +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + ELSE + MAXWRK = N + N*ILAENV( 1, 'ZGEHRD', ' ', N, 1, N, 0 ) + MINWRK = 2*N +* + CALL ZHSEQR( 'S', JOBVS, N, 1, N, A, LDA, W, VS, LDVS, + $ WORK, -1, IEVAL ) + HSWORK = WORK( 1 ) +* + IF( .NOT.WANTVS ) THEN + MAXWRK = MAX( MAXWRK, HSWORK ) + ELSE + MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR', + $ ' ', N, 1, N, -1 ) ) + MAXWRK = MAX( MAXWRK, HSWORK ) + END IF + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEES ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + SDIM = 0 + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', N, N, A, LDA, DUM ) + SCALEA = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + SCALEA = .TRUE. + CSCALE = SMLNUM + ELSE IF( ANRM.GT.BIGNUM ) THEN + SCALEA = .TRUE. + CSCALE = BIGNUM + END IF + IF( SCALEA ) + $ CALL ZLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) +* +* Permute the matrix to make it more nearly triangular +* (CWorkspace: none) +* (RWorkspace: need N) +* + IBAL = 1 + CALL ZGEBAL( 'P', N, A, LDA, ILO, IHI, RWORK( IBAL ), IERR ) +* +* Reduce to upper Hessenberg form +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: none) +* + ITAU = 1 + IWRK = N + ITAU + CALL ZGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* + IF( WANTVS ) THEN +* +* Copy Householder vectors to VS +* + CALL ZLACPY( 'L', N, N, A, LDA, VS, LDVS ) +* +* Generate unitary matrix in VS +* (CWorkspace: need 2*N-1, prefer N+(N-1)*NB) +* (RWorkspace: none) +* + CALL ZUNGHR( N, ILO, IHI, VS, LDVS, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) + END IF +* + SDIM = 0 +* +* Perform QR iteration, accumulating Schur vectors in VS if desired +* (CWorkspace: need 1, prefer HSWORK (see comments) ) +* (RWorkspace: none) +* + IWRK = ITAU + CALL ZHSEQR( 'S', JOBVS, N, ILO, IHI, A, LDA, W, VS, LDVS, + $ WORK( IWRK ), LWORK-IWRK+1, IEVAL ) + IF( IEVAL.GT.0 ) + $ INFO = IEVAL +* +* Sort eigenvalues if desired +* + IF( WANTST .AND. INFO.EQ.0 ) THEN + IF( SCALEA ) + $ CALL ZLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, W, N, IERR ) + DO 10 I = 1, N + BWORK( I ) = SELECT( W( I ) ) + 10 CONTINUE +* +* Reorder eigenvalues and transform Schur vectors +* (CWorkspace: none) +* (RWorkspace: none) +* + CALL ZTRSEN( 'N', JOBVS, BWORK, N, A, LDA, VS, LDVS, W, SDIM, + $ S, SEP, WORK( IWRK ), LWORK-IWRK+1, ICOND ) + END IF +* + IF( WANTVS ) THEN +* +* Undo balancing +* (CWorkspace: none) +* (RWorkspace: need N) +* + CALL ZGEBAK( 'P', 'R', N, ILO, IHI, RWORK( IBAL ), N, VS, LDVS, + $ IERR ) + END IF +* + IF( SCALEA ) THEN +* +* Undo scaling for the Schur form of A +* + CALL ZLASCL( 'U', 0, 0, CSCALE, ANRM, N, N, A, LDA, IERR ) + CALL ZCOPY( N, A, LDA+1, W, 1 ) + END IF +* + WORK( 1 ) = MAXWRK + RETURN +* +* End of ZGEES +* + END diff --git a/2.3-1/src/fortran/lapack/zgeev.f b/2.3-1/src/fortran/lapack/zgeev.f new file mode 100644 index 00000000..0fa66307 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgeev.f @@ -0,0 +1,396 @@ + SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR, + $ WORK, LWORK, RWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVL, JOBVR + INTEGER INFO, LDA, LDVL, LDVR, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ), + $ W( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the +* eigenvalues and, optionally, the left and/or right eigenvectors. +* +* The right eigenvector v(j) of A satisfies +* A * v(j) = lambda(j) * v(j) +* where lambda(j) is its eigenvalue. +* The left eigenvector u(j) of A satisfies +* u(j)**H * A = lambda(j) * u(j)**H +* where u(j)**H denotes the conjugate transpose of u(j). +* +* The computed eigenvectors are normalized to have Euclidean norm +* equal to 1 and largest component real. +* +* Arguments +* ========= +* +* JOBVL (input) CHARACTER*1 +* = 'N': left eigenvectors of A are not computed; +* = 'V': left eigenvectors of are computed. +* +* JOBVR (input) CHARACTER*1 +* = 'N': right eigenvectors of A are not computed; +* = 'V': right eigenvectors of A are computed. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the N-by-N matrix A. +* On exit, A has been overwritten. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* W (output) COMPLEX*16 array, dimension (N) +* W contains the computed eigenvalues. +* +* VL (output) COMPLEX*16 array, dimension (LDVL,N) +* If JOBVL = 'V', the left eigenvectors u(j) are stored one +* after another in the columns of VL, in the same order +* as their eigenvalues. +* If JOBVL = 'N', VL is not referenced. +* u(j) = VL(:,j), the j-th column of VL. +* +* LDVL (input) INTEGER +* The leading dimension of the array VL. LDVL >= 1; if +* JOBVL = 'V', LDVL >= N. +* +* VR (output) COMPLEX*16 array, dimension (LDVR,N) +* If JOBVR = 'V', the right eigenvectors v(j) are stored one +* after another in the columns of VR, in the same order +* as their eigenvalues. +* If JOBVR = 'N', VR is not referenced. +* v(j) = VR(:,j), the j-th column of VR. +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1; if +* JOBVR = 'V', LDVR >= N. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,2*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if INFO = i, the QR algorithm failed to compute all the +* eigenvalues, and no eigenvectors have been computed; +* elements and i+1:N of W contain eigenvalues which have +* converged. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, SCALEA, WANTVL, WANTVR + CHARACTER SIDE + INTEGER HSWORK, I, IBAL, IERR, IHI, ILO, IRWORK, ITAU, + $ IWRK, K, MAXWRK, MINWRK, NOUT + DOUBLE PRECISION ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM + COMPLEX*16 TMP +* .. +* .. Local Arrays .. + LOGICAL SELECT( 1 ) + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZDSCAL, ZGEBAK, ZGEBAL, ZGEHRD, + $ ZHSEQR, ZLACPY, ZLASCL, ZSCAL, ZTREVC, ZUNGHR +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX, ILAENV + DOUBLE PRECISION DLAMCH, DZNRM2, ZLANGE + EXTERNAL LSAME, IDAMAX, ILAENV, DLAMCH, DZNRM2, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, DCMPLX, DCONJG, DIMAG, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + WANTVL = LSAME( JOBVL, 'V' ) + WANTVR = LSAME( JOBVR, 'V' ) + IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( ( .NOT.WANTVR ) .AND. ( .NOT.LSAME( JOBVR, 'N' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDVL.LT.1 .OR. ( WANTVL .AND. LDVL.LT.N ) ) THEN + INFO = -8 + ELSE IF( LDVR.LT.1 .OR. ( WANTVR .AND. LDVR.LT.N ) ) THEN + INFO = -10 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* CWorkspace refers to complex workspace, and RWorkspace to real +* workspace. NB refers to the optimal block size for the +* immediately following subroutine, as returned by ILAENV. +* HSWORK refers to the workspace preferred by ZHSEQR, as +* calculated below. HSWORK is computed assuming ILO=1 and IHI=N, +* the worst case.) +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + ELSE + MAXWRK = N + N*ILAENV( 1, 'ZGEHRD', ' ', N, 1, N, 0 ) + MINWRK = 2*N + IF( WANTVL ) THEN + MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR', + $ ' ', N, 1, N, -1 ) ) + CALL ZHSEQR( 'S', 'V', N, 1, N, A, LDA, W, VL, LDVL, + $ WORK, -1, INFO ) + ELSE IF( WANTVR ) THEN + MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR', + $ ' ', N, 1, N, -1 ) ) + CALL ZHSEQR( 'S', 'V', N, 1, N, A, LDA, W, VR, LDVR, + $ WORK, -1, INFO ) + ELSE + CALL ZHSEQR( 'E', 'N', N, 1, N, A, LDA, W, VR, LDVR, + $ WORK, -1, INFO ) + END IF + HSWORK = WORK( 1 ) + MAXWRK = MAX( MAXWRK, HSWORK, MINWRK ) + END IF + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', N, N, A, LDA, DUM ) + SCALEA = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + SCALEA = .TRUE. + CSCALE = SMLNUM + ELSE IF( ANRM.GT.BIGNUM ) THEN + SCALEA = .TRUE. + CSCALE = BIGNUM + END IF + IF( SCALEA ) + $ CALL ZLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR ) +* +* Balance the matrix +* (CWorkspace: none) +* (RWorkspace: need N) +* + IBAL = 1 + CALL ZGEBAL( 'B', N, A, LDA, ILO, IHI, RWORK( IBAL ), IERR ) +* +* Reduce to upper Hessenberg form +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: none) +* + ITAU = 1 + IWRK = ITAU + N + CALL ZGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* + IF( WANTVL ) THEN +* +* Want left eigenvectors +* Copy Householder vectors to VL +* + SIDE = 'L' + CALL ZLACPY( 'L', N, N, A, LDA, VL, LDVL ) +* +* Generate unitary matrix in VL +* (CWorkspace: need 2*N-1, prefer N+(N-1)*NB) +* (RWorkspace: none) +* + CALL ZUNGHR( N, ILO, IHI, VL, LDVL, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* +* Perform QR iteration, accumulating Schur vectors in VL +* (CWorkspace: need 1, prefer HSWORK (see comments) ) +* (RWorkspace: none) +* + IWRK = ITAU + CALL ZHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, W, VL, LDVL, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) +* + IF( WANTVR ) THEN +* +* Want left and right eigenvectors +* Copy Schur vectors to VR +* + SIDE = 'B' + CALL ZLACPY( 'F', N, N, VL, LDVL, VR, LDVR ) + END IF +* + ELSE IF( WANTVR ) THEN +* +* Want right eigenvectors +* Copy Householder vectors to VR +* + SIDE = 'R' + CALL ZLACPY( 'L', N, N, A, LDA, VR, LDVR ) +* +* Generate unitary matrix in VR +* (CWorkspace: need 2*N-1, prefer N+(N-1)*NB) +* (RWorkspace: none) +* + CALL ZUNGHR( N, ILO, IHI, VR, LDVR, WORK( ITAU ), WORK( IWRK ), + $ LWORK-IWRK+1, IERR ) +* +* Perform QR iteration, accumulating Schur vectors in VR +* (CWorkspace: need 1, prefer HSWORK (see comments) ) +* (RWorkspace: none) +* + IWRK = ITAU + CALL ZHSEQR( 'S', 'V', N, ILO, IHI, A, LDA, W, VR, LDVR, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) +* + ELSE +* +* Compute eigenvalues only +* (CWorkspace: need 1, prefer HSWORK (see comments) ) +* (RWorkspace: none) +* + IWRK = ITAU + CALL ZHSEQR( 'E', 'N', N, ILO, IHI, A, LDA, W, VR, LDVR, + $ WORK( IWRK ), LWORK-IWRK+1, INFO ) + END IF +* +* If INFO > 0 from ZHSEQR, then quit +* + IF( INFO.GT.0 ) + $ GO TO 50 +* + IF( WANTVL .OR. WANTVR ) THEN +* +* Compute left and/or right eigenvectors +* (CWorkspace: need 2*N) +* (RWorkspace: need 2*N) +* + IRWORK = IBAL + N + CALL ZTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR, + $ N, NOUT, WORK( IWRK ), RWORK( IRWORK ), IERR ) + END IF +* + IF( WANTVL ) THEN +* +* Undo balancing of left eigenvectors +* (CWorkspace: none) +* (RWorkspace: need N) +* + CALL ZGEBAK( 'B', 'L', N, ILO, IHI, RWORK( IBAL ), N, VL, LDVL, + $ IERR ) +* +* Normalize left eigenvectors and make largest component real +* + DO 20 I = 1, N + SCL = ONE / DZNRM2( N, VL( 1, I ), 1 ) + CALL ZDSCAL( N, SCL, VL( 1, I ), 1 ) + DO 10 K = 1, N + RWORK( IRWORK+K-1 ) = DBLE( VL( K, I ) )**2 + + $ DIMAG( VL( K, I ) )**2 + 10 CONTINUE + K = IDAMAX( N, RWORK( IRWORK ), 1 ) + TMP = DCONJG( VL( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) ) + CALL ZSCAL( N, TMP, VL( 1, I ), 1 ) + VL( K, I ) = DCMPLX( DBLE( VL( K, I ) ), ZERO ) + 20 CONTINUE + END IF +* + IF( WANTVR ) THEN +* +* Undo balancing of right eigenvectors +* (CWorkspace: none) +* (RWorkspace: need N) +* + CALL ZGEBAK( 'B', 'R', N, ILO, IHI, RWORK( IBAL ), N, VR, LDVR, + $ IERR ) +* +* Normalize right eigenvectors and make largest component real +* + DO 40 I = 1, N + SCL = ONE / DZNRM2( N, VR( 1, I ), 1 ) + CALL ZDSCAL( N, SCL, VR( 1, I ), 1 ) + DO 30 K = 1, N + RWORK( IRWORK+K-1 ) = DBLE( VR( K, I ) )**2 + + $ DIMAG( VR( K, I ) )**2 + 30 CONTINUE + K = IDAMAX( N, RWORK( IRWORK ), 1 ) + TMP = DCONJG( VR( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) ) + CALL ZSCAL( N, TMP, VR( 1, I ), 1 ) + VR( K, I ) = DCMPLX( DBLE( VR( K, I ) ), ZERO ) + 40 CONTINUE + END IF +* +* Undo scaling if necessary +* + 50 CONTINUE + IF( SCALEA ) THEN + CALL ZLASCL( 'G', 0, 0, CSCALE, ANRM, N-INFO, 1, W( INFO+1 ), + $ MAX( N-INFO, 1 ), IERR ) + IF( INFO.GT.0 ) THEN + CALL ZLASCL( 'G', 0, 0, CSCALE, ANRM, ILO-1, 1, W, N, IERR ) + END IF + END IF +* + WORK( 1 ) = MAXWRK + RETURN +* +* End of ZGEEV +* + END diff --git a/2.3-1/src/fortran/lapack/zgehd2.f b/2.3-1/src/fortran/lapack/zgehd2.f new file mode 100644 index 00000000..c73f4200 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgehd2.f @@ -0,0 +1,148 @@ + SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEHD2 reduces a complex general matrix A to upper Hessenberg form H +* by a unitary similarity transformation: Q' * A * Q = H . +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that A is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally +* set by a previous call to ZGEBAL; otherwise they should be +* set to 1 and N respectively. See Further Details. +* 1 <= ILO <= IHI <= max(1,N). +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the n by n general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* elements below the first subdiagonal, with the array TAU, +* represent the unitary matrix Q as a product of elementary +* reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) COMPLEX*16 array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of (ihi-ilo) elementary +* reflectors +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on +* exit in A(i+2:ihi,i), and tau in TAU(i). +* +* The contents of A are illustrated by the following example, with +* n = 7, ilo = 2 and ihi = 6: +* +* on entry, on exit, +* +* ( a a a a a a a ) ( a a h h h h a ) +* ( a a a a a a ) ( a h h h h a ) +* ( a a a a a a ) ( h h h h h h ) +* ( a a a a a a ) ( v2 h h h h h ) +* ( a a a a a a ) ( v2 v3 h h h h ) +* ( a a a a a a ) ( v2 v3 v4 h h h ) +* ( a ) ( a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARF, ZLARFG +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEHD2', -INFO ) + RETURN + END IF +* + DO 10 I = ILO, IHI - 1 +* +* Compute elementary reflector H(i) to annihilate A(i+2:ihi,i) +* + ALPHA = A( I+1, I ) + CALL ZLARFG( IHI-I, ALPHA, A( MIN( I+2, N ), I ), 1, TAU( I ) ) + A( I+1, I ) = ONE +* +* Apply H(i) to A(1:ihi,i+1:ihi) from the right +* + CALL ZLARF( 'Right', IHI, IHI-I, A( I+1, I ), 1, TAU( I ), + $ A( 1, I+1 ), LDA, WORK ) +* +* Apply H(i)' to A(i+1:ihi,i+1:n) from the left +* + CALL ZLARF( 'Left', IHI-I, N-I, A( I+1, I ), 1, + $ DCONJG( TAU( I ) ), A( I+1, I+1 ), LDA, WORK ) +* + A( I+1, I ) = ALPHA + 10 CONTINUE +* + RETURN +* +* End of ZGEHD2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgehrd.f b/2.3-1/src/fortran/lapack/zgehrd.f new file mode 100644 index 00000000..83c1aa32 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgehrd.f @@ -0,0 +1,273 @@ + SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEHRD reduces a complex general matrix A to upper Hessenberg form H by +* an unitary similarity transformation: Q' * A * Q = H . +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that A is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally +* set by a previous call to ZGEBAL; otherwise they should be +* set to 1 and N respectively. See Further Details. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the N-by-N general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* elements below the first subdiagonal, with the array TAU, +* represent the unitary matrix Q as a product of elementary +* reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) COMPLEX*16 array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to +* zero. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (LWORK) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of (ihi-ilo) elementary +* reflectors +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on +* exit in A(i+2:ihi,i), and tau in TAU(i). +* +* The contents of A are illustrated by the following example, with +* n = 7, ilo = 2 and ihi = 6: +* +* on entry, on exit, +* +* ( a a a a a a a ) ( a a h h h h a ) +* ( a a a a a a ) ( a h h h h a ) +* ( a a a a a a ) ( h h h h h h ) +* ( a a a a a a ) ( v2 h h h h h ) +* ( a a a a a a ) ( v2 v3 h h h h ) +* ( a a a a a a ) ( v2 v3 v4 h h h ) +* ( a ) ( a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* This file is a slight modification of LAPACK-3.0's ZGEHRD +* subroutine incorporating improvements proposed by Quintana-Orti and +* Van de Geijn (2005). +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, LDWORK, LWKOPT, NB, + $ NBMIN, NH, NX + COMPLEX*16 EI +* .. +* .. Local Arrays .. + COMPLEX*16 T( LDT, NBMAX ) +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZGEHD2, ZGEMM, ZLAHR2, ZLARFB, ZTRMM, + $ XERBLA +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + NB = MIN( NBMAX, ILAENV( 1, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEHRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Set elements 1:ILO-1 and IHI:N-1 of TAU to zero +* + DO 10 I = 1, ILO - 1 + TAU( I ) = ZERO + 10 CONTINUE + DO 20 I = MAX( 1, IHI ), N - 1 + TAU( I ) = ZERO + 20 CONTINUE +* +* Quick return if possible +* + NH = IHI - ILO + 1 + IF( NH.LE.1 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* +* Determine the block size +* + NB = MIN( NBMAX, ILAENV( 1, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) ) + NBMIN = 2 + IWS = 1 + IF( NB.GT.1 .AND. NB.LT.NH ) THEN +* +* Determine when to cross over from blocked to unblocked code +* (last block is always handled by unblocked code) +* + NX = MAX( NB, ILAENV( 3, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) ) + IF( NX.LT.NH ) THEN +* +* Determine if workspace is large enough for blocked code +* + IWS = N*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: determine the +* minimum value of NB, and reduce NB or force use of +* unblocked code +* + NBMIN = MAX( 2, ILAENV( 2, 'ZGEHRD', ' ', N, ILO, IHI, + $ -1 ) ) + IF( LWORK.GE.N*NBMIN ) THEN + NB = LWORK / N + ELSE + NB = 1 + END IF + END IF + END IF + END IF + LDWORK = N +* + IF( NB.LT.NBMIN .OR. NB.GE.NH ) THEN +* +* Use unblocked code below +* + I = ILO +* + ELSE +* +* Use blocked code +* + DO 40 I = ILO, IHI - 1 - NX, NB + IB = MIN( NB, IHI-I ) +* +* Reduce columns i:i+ib-1 to Hessenberg form, returning the +* matrices V and T of the block reflector H = I - V*T*V' +* which performs the reduction, and also the matrix Y = A*V*T +* + CALL ZLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ), T, LDT, + $ WORK, LDWORK ) +* +* Apply the block reflector H to A(1:ihi,i+ib:ihi) from the +* right, computing A := A - Y * V'. V(i+ib,ib-1) must be set +* to 1 +* + EI = A( I+IB, I+IB-1 ) + A( I+IB, I+IB-1 ) = ONE + CALL ZGEMM( 'No transpose', 'Conjugate transpose', + $ IHI, IHI-I-IB+1, + $ IB, -ONE, WORK, LDWORK, A( I+IB, I ), LDA, ONE, + $ A( 1, I+IB ), LDA ) + A( I+IB, I+IB-1 ) = EI +* +* Apply the block reflector H to A(1:i,i+1:i+ib-1) from the +* right +* + CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Unit', I, IB-1, + $ ONE, A( I+1, I ), LDA, WORK, LDWORK ) + DO 30 J = 0, IB-2 + CALL ZAXPY( I, -ONE, WORK( LDWORK*J+1 ), 1, + $ A( 1, I+J+1 ), 1 ) + 30 CONTINUE +* +* Apply the block reflector H to A(i+1:ihi,i+ib:n) from the +* left +* + CALL ZLARFB( 'Left', 'Conjugate transpose', 'Forward', + $ 'Columnwise', + $ IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA, T, LDT, + $ A( I+1, I+IB ), LDA, WORK, LDWORK ) + 40 CONTINUE + END IF +* +* Use unblocked code to reduce the rest of the matrix +* + CALL ZGEHD2( N, I, IHI, A, LDA, TAU, WORK, IINFO ) + WORK( 1 ) = IWS +* + RETURN +* +* End of ZGEHRD +* + END diff --git a/2.3-1/src/fortran/lapack/zgelq2.f b/2.3-1/src/fortran/lapack/zgelq2.f new file mode 100644 index 00000000..dc387af0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgelq2.f @@ -0,0 +1,123 @@ + SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGELQ2 computes an LQ factorization of a complex m by n matrix A: +* A = L * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, the elements on and below the diagonal of the array +* contain the m by min(m,n) lower trapezoidal matrix L (L is +* lower triangular if m <= n); the elements above the diagonal, +* with the array TAU, represent the unitary matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) COMPLEX*16 array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k)' . . . H(2)' H(1)', where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in +* A(i,i+1:n), and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, K + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACGV, ZLARF, ZLARFG +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGELQ2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = 1, K +* +* Generate elementary reflector H(i) to annihilate A(i,i+1:n) +* + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + ALPHA = A( I, I ) + CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA, + $ TAU( I ) ) + IF( I.LT.M ) THEN +* +* Apply H(i) to A(i+1:m,i:n) from the right +* + A( I, I ) = ONE + CALL ZLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, TAU( I ), + $ A( I+1, I ), LDA, WORK ) + END IF + A( I, I ) = ALPHA + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + 10 CONTINUE + RETURN +* +* End of ZGELQ2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgelqf.f b/2.3-1/src/fortran/lapack/zgelqf.f new file mode 100644 index 00000000..5dac50dc --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgelqf.f @@ -0,0 +1,195 @@ + SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGELQF computes an LQ factorization of a complex M-by-N matrix A: +* A = L * Q. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the elements on and below the diagonal of the array +* contain the m-by-min(m,n) lower trapezoidal matrix L (L is +* lower triangular if m <= n); the elements above the diagonal, +* with the array TAU, represent the unitary matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(k)' . . . H(2)' H(1)', where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i-1) = 0 and v(i) = 1; conjg(v(i+1:n)) is stored on exit in +* A(i,i+1:n), and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGELQ2, ZLARFB, ZLARFT +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + LWKOPT = M*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGELQF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZGELQF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZGELQF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially +* + DO 10 I = 1, K - NX, NB + IB = MIN( K-I+1, NB ) +* +* Compute the LQ factorization of the current block +* A(i:i+ib-1,i:n) +* + CALL ZGELQ2( IB, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) + IF( I+IB.LE.M ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(i+ib:m,i:n) from the right +* + CALL ZLARFB( 'Right', 'No transpose', 'Forward', + $ 'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ), + $ LDA, WORK, LDWORK, A( I+IB, I ), LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + ELSE + I = 1 + END IF +* +* Use unblocked code to factor the last or only block. +* + IF( I.LE.K ) + $ CALL ZGELQ2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of ZGELQF +* + END diff --git a/2.3-1/src/fortran/lapack/zgelsy.f b/2.3-1/src/fortran/lapack/zgelsy.f new file mode 100644 index 00000000..95aece58 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgelsy.f @@ -0,0 +1,385 @@ + SUBROUTINE ZGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, + $ WORK, LWORK, RWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK + DOUBLE PRECISION RCOND +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGELSY computes the minimum-norm solution to a complex linear least +* squares problem: +* minimize || A * X - B || +* using a complete orthogonal factorization of A. A is an M-by-N +* matrix which may be rank-deficient. +* +* Several right hand side vectors b and solution vectors x can be +* handled in a single call; they are stored as the columns of the +* M-by-NRHS right hand side matrix B and the N-by-NRHS solution +* matrix X. +* +* The routine first computes a QR factorization with column pivoting: +* A * P = Q * [ R11 R12 ] +* [ 0 R22 ] +* with R11 defined as the largest leading submatrix whose estimated +* condition number is less than 1/RCOND. The order of R11, RANK, +* is the effective rank of A. +* +* Then, R22 is considered to be negligible, and R12 is annihilated +* by unitary transformations from the right, arriving at the +* complete orthogonal factorization: +* A * P = Q * [ T11 0 ] * Z +* [ 0 0 ] +* The minimum-norm solution is then +* X = P * Z' [ inv(T11)*Q1'*B ] +* [ 0 ] +* where Q1 consists of the first RANK columns of Q. +* +* This routine is basically identical to the original xGELSX except +* three differences: +* o The permutation of matrix B (the right hand side) is faster and +* more simple. +* o The call to the subroutine xGEQPF has been substituted by the +* the call to the subroutine xGEQP3. This subroutine is a Blas-3 +* version of the QR factorization with column pivoting. +* o Matrix B (the right hand side) is updated with Blas-3. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of +* columns of matrices B and X. NRHS >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, A has been overwritten by details of its +* complete orthogonal factorization. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS) +* On entry, the M-by-NRHS right hand side matrix B. +* On exit, the N-by-NRHS solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,M,N). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of AP, otherwise column i is a free column. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* RCOND (input) DOUBLE PRECISION +* RCOND is used to determine the effective rank of A, which +* is defined as the order of the largest leading triangular +* submatrix R11 in the QR factorization with pivoting of A, +* whose estimated condition number < 1/RCOND. +* +* RANK (output) INTEGER +* The effective rank of A, i.e., the order of the submatrix +* R11. This is the same as the order of the submatrix T11 +* in the complete orthogonal factorization of A. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* The unblocked strategy requires that: +* LWORK >= MN + MAX( 2*MN, N+1, MN+NRHS ) +* where MN = min(M,N). +* The block algorithm requires that: +* LWORK >= MN + MAX( 2*MN, NB*(N+1), MN+MN*NB, MN+NB*NRHS ) +* where NB is an upper bound on the blocksize returned +* by ILAENV for the routines ZGEQP3, ZTZRZF, CTZRQF, ZUNMQR, +* and ZUNMRZ. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* +* ===================================================================== +* +* .. Parameters .. + INTEGER IMAX, IMIN + PARAMETER ( IMAX = 1, IMIN = 2 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ), + $ CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IASCL, IBSCL, ISMAX, ISMIN, J, LWKOPT, MN, + $ NB, NB1, NB2, NB3, NB4 + DOUBLE PRECISION ANRM, BIGNUM, BNRM, SMAX, SMAXPR, SMIN, SMINPR, + $ SMLNUM, WSIZE + COMPLEX*16 C1, C2, S1, S2 +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZCOPY, ZGEQP3, ZLAIC1, ZLASCL, + $ ZLASET, ZTRSM, ZTZRZF, ZUNMQR, ZUNMRZ +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANGE + EXTERNAL ILAENV, DLAMCH, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, MAX, MIN +* .. +* .. Executable Statements .. +* + MN = MIN( M, N ) + ISMIN = MN + 1 + ISMAX = 2*MN + 1 +* +* Test the input arguments. +* + INFO = 0 + NB1 = ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + NB2 = ILAENV( 1, 'ZGERQF', ' ', M, N, -1, -1 ) + NB3 = ILAENV( 1, 'ZUNMQR', ' ', M, N, NRHS, -1 ) + NB4 = ILAENV( 1, 'ZUNMRQ', ' ', M, N, NRHS, -1 ) + NB = MAX( NB1, NB2, NB3, NB4 ) + LWKOPT = MAX( 1, MN+2*N+NB*( N+1 ), 2*MN+NB*NRHS ) + WORK( 1 ) = DCMPLX( LWKOPT ) + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, M, N ) ) THEN + INFO = -7 + ELSE IF( LWORK.LT.( MN+MAX( 2*MN, N+1, MN+NRHS ) ) .AND. .NOT. + $ LQUERY ) THEN + INFO = -12 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGELSY', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( MIN( M, N, NRHS ).EQ.0 ) THEN + RANK = 0 + RETURN + END IF +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) / DLAMCH( 'P' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Scale A, B if max entries outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', M, N, A, LDA, RWORK ) + IASCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO ) + IASCL = 1 + ELSE IF( ANRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO ) + IASCL = 2 + ELSE IF( ANRM.EQ.ZERO ) THEN +* +* Matrix all zero. Return zero solution. +* + CALL ZLASET( 'F', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB ) + RANK = 0 + GO TO 70 + END IF +* + BNRM = ZLANGE( 'M', M, NRHS, B, LDB, RWORK ) + IBSCL = 0 + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN +* +* Scale matrix norm up to SMLNUM +* + CALL ZLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 1 + ELSE IF( BNRM.GT.BIGNUM ) THEN +* +* Scale matrix norm down to BIGNUM +* + CALL ZLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO ) + IBSCL = 2 + END IF +* +* Compute QR factorization with column pivoting of A: +* A * P = Q * R +* + CALL ZGEQP3( M, N, A, LDA, JPVT, WORK( 1 ), WORK( MN+1 ), + $ LWORK-MN, RWORK, INFO ) + WSIZE = MN + DBLE( WORK( MN+1 ) ) +* +* complex workspace: MN+NB*(N+1). real workspace 2*N. +* Details of Householder rotations stored in WORK(1:MN). +* +* Determine RANK using incremental condition estimation +* + WORK( ISMIN ) = CONE + WORK( ISMAX ) = CONE + SMAX = ABS( A( 1, 1 ) ) + SMIN = SMAX + IF( ABS( A( 1, 1 ) ).EQ.ZERO ) THEN + RANK = 0 + CALL ZLASET( 'F', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB ) + GO TO 70 + ELSE + RANK = 1 + END IF +* + 10 CONTINUE + IF( RANK.LT.MN ) THEN + I = RANK + 1 + CALL ZLAIC1( IMIN, RANK, WORK( ISMIN ), SMIN, A( 1, I ), + $ A( I, I ), SMINPR, S1, C1 ) + CALL ZLAIC1( IMAX, RANK, WORK( ISMAX ), SMAX, A( 1, I ), + $ A( I, I ), SMAXPR, S2, C2 ) +* + IF( SMAXPR*RCOND.LE.SMINPR ) THEN + DO 20 I = 1, RANK + WORK( ISMIN+I-1 ) = S1*WORK( ISMIN+I-1 ) + WORK( ISMAX+I-1 ) = S2*WORK( ISMAX+I-1 ) + 20 CONTINUE + WORK( ISMIN+RANK ) = C1 + WORK( ISMAX+RANK ) = C2 + SMIN = SMINPR + SMAX = SMAXPR + RANK = RANK + 1 + GO TO 10 + END IF + END IF +* +* complex workspace: 3*MN. +* +* Logically partition R = [ R11 R12 ] +* [ 0 R22 ] +* where R11 = R(1:RANK,1:RANK) +* +* [R11,R12] = [ T11, 0 ] * Y +* +c IF( RANK.LT.N ) +c $ CALL ZTZRZF( RANK, N, A, LDA, WORK( MN+1 ), WORK( 2*MN+1 ), +c $ LWORK-2*MN, INFO ) +* +* complex workspace: 2*MN. +* Details of Householder rotations stored in WORK(MN+1:2*MN) +* +* B(1:M,1:NRHS) := Q' * B(1:M,1:NRHS) +* + CALL ZUNMQR( 'Left', 'Conjugate transpose', M, NRHS, MN, A, LDA, + $ WORK( 1 ), B, LDB, WORK( 2*MN+1 ), LWORK-2*MN, INFO ) + WSIZE = MAX( WSIZE, 2*MN+DBLE( WORK( 2*MN+1 ) ) ) +* +* complex workspace: 2*MN+NB*NRHS. +* +* B(1:RANK,1:NRHS) := inv(T11) * B(1:RANK,1:NRHS) +* + CALL ZTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', RANK, + $ NRHS, CONE, A, LDA, B, LDB ) +* + DO 40 J = 1, NRHS + DO 30 I = RANK + 1, N + B( I, J ) = CZERO + 30 CONTINUE + 40 CONTINUE +* +* B(1:N,1:NRHS) := Y' * B(1:N,1:NRHS) +* +c IF( RANK.LT.N ) THEN +c CALL ZUNMRZ( 'Left', 'Conjugate transpose', N, NRHS, RANK, +c $ N-RANK, A, LDA, WORK( MN+1 ), B, LDB, +c $ WORK( 2*MN+1 ), LWORK-2*MN, INFO ) +c END IF +* +* complex workspace: 2*MN+NRHS. +* +* B(1:N,1:NRHS) := P * B(1:N,1:NRHS) +* + DO 60 J = 1, NRHS + DO 50 I = 1, N + WORK( JPVT( I ) ) = B( I, J ) + 50 CONTINUE + CALL ZCOPY( N, WORK( 1 ), 1, B( 1, J ), 1 ) + 60 CONTINUE +* +* complex workspace: N. +* +* Undo scaling +* + IF( IASCL.EQ.1 ) THEN + CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO ) + CALL ZLASCL( 'U', 0, 0, SMLNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + ELSE IF( IASCL.EQ.2 ) THEN + CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO ) + CALL ZLASCL( 'U', 0, 0, BIGNUM, ANRM, RANK, RANK, A, LDA, + $ INFO ) + END IF + IF( IBSCL.EQ.1 ) THEN + CALL ZLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO ) + ELSE IF( IBSCL.EQ.2 ) THEN + CALL ZLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO ) + END IF +* + 70 CONTINUE + WORK( 1 ) = DCMPLX( LWKOPT ) +* + RETURN +* +* End of ZGELSY +* + END diff --git a/2.3-1/src/fortran/lapack/zgeqp3.f b/2.3-1/src/fortran/lapack/zgeqp3.f new file mode 100644 index 00000000..32bf3367 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgeqp3.f @@ -0,0 +1,293 @@ + SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK, + $ INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEQP3 computes a QR factorization with column pivoting of a +* matrix A: A*P = Q*R using Level 3 BLAS. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of the array contains the +* min(M,N)-by-N upper trapezoidal matrix R; the elements below +* the diagonal, together with the array TAU, represent the +* unitary matrix Q as a product of min(M,N) elementary +* reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(J).ne.0, the J-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(J)=0, +* the J-th column of A is a free column. +* On exit, if JPVT(J)=K, then the J-th column of A*P was the +* the K-th column of A. +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO=0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= N+1. +* For optimal performance LWORK >= ( N+1 )*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a real/complex scalar, and v is a real/complex vector +* with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in +* A(i+1:m,i), and tau in TAU(i). +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* ===================================================================== +* +* .. Parameters .. + INTEGER INB, INBMIN, IXOVER + PARAMETER ( INB = 1, INBMIN = 2, IXOVER = 3 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER FJB, IWS, J, JB, LWKOPT, MINMN, MINWS, NA, NB, + $ NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEQRF, ZLAQP2, ZLAQPS, ZSWAP, ZUNMQR +* .. +* .. External Functions .. + INTEGER ILAENV + DOUBLE PRECISION DZNRM2 + EXTERNAL ILAENV, DZNRM2 +* .. +* .. Intrinsic Functions .. + INTRINSIC INT, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test input arguments +* ==================== +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + MINMN = MIN( M, N ) + IF( MINMN.EQ.0 ) THEN + IWS = 1 + LWKOPT = 1 + ELSE + IWS = N + 1 + NB = ILAENV( INB, 'ZGEQRF', ' ', M, N, -1, -1 ) + LWKOPT = ( N + 1 )*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( ( LWORK.LT.IWS ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEQP3', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible. +* + IF( MINMN.EQ.0 ) THEN + RETURN + END IF +* +* Move initial columns up front. +* + NFXD = 1 + DO 10 J = 1, N + IF( JPVT( J ).NE.0 ) THEN + IF( J.NE.NFXD ) THEN + CALL ZSWAP( M, A( 1, J ), 1, A( 1, NFXD ), 1 ) + JPVT( J ) = JPVT( NFXD ) + JPVT( NFXD ) = J + ELSE + JPVT( J ) = J + END IF + NFXD = NFXD + 1 + ELSE + JPVT( J ) = J + END IF + 10 CONTINUE + NFXD = NFXD - 1 +* +* Factorize fixed columns +* ======================= +* +* Compute the QR factorization of fixed columns and update +* remaining columns. +* + IF( NFXD.GT.0 ) THEN + NA = MIN( M, NFXD ) +*CC CALL ZGEQR2( M, NA, A, LDA, TAU, WORK, INFO ) + CALL ZGEQRF( M, NA, A, LDA, TAU, WORK, LWORK, INFO ) + IWS = MAX( IWS, INT( WORK( 1 ) ) ) + IF( NA.LT.N ) THEN +*CC CALL ZUNM2R( 'Left', 'Conjugate Transpose', M, N-NA, +*CC $ NA, A, LDA, TAU, A( 1, NA+1 ), LDA, WORK, +*CC $ INFO ) + CALL ZUNMQR( 'Left', 'Conjugate Transpose', M, N-NA, NA, A, + $ LDA, TAU, A( 1, NA+1 ), LDA, WORK, LWORK, + $ INFO ) + IWS = MAX( IWS, INT( WORK( 1 ) ) ) + END IF + END IF +* +* Factorize free columns +* ====================== +* + IF( NFXD.LT.MINMN ) THEN +* + SM = M - NFXD + SN = N - NFXD + SMINMN = MINMN - NFXD +* +* Determine the block size. +* + NB = ILAENV( INB, 'ZGEQRF', ' ', SM, SN, -1, -1 ) + NBMIN = 2 + NX = 0 +* + IF( ( NB.GT.1 ) .AND. ( NB.LT.SMINMN ) ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( IXOVER, 'ZGEQRF', ' ', SM, SN, -1, + $ -1 ) ) +* +* + IF( NX.LT.SMINMN ) THEN +* +* Determine if workspace is large enough for blocked code. +* + MINWS = ( SN+1 )*NB + IWS = MAX( IWS, MINWS ) + IF( LWORK.LT.MINWS ) THEN +* +* Not enough workspace to use optimal NB: Reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / ( SN+1 ) + NBMIN = MAX( 2, ILAENV( INBMIN, 'ZGEQRF', ' ', SM, SN, + $ -1, -1 ) ) +* +* + END IF + END IF + END IF +* +* Initialize partial column norms. The first N elements of work +* store the exact column norms. +* + DO 20 J = NFXD + 1, N + RWORK( J ) = DZNRM2( SM, A( NFXD+1, J ), 1 ) + RWORK( N+J ) = RWORK( J ) + 20 CONTINUE +* + IF( ( NB.GE.NBMIN ) .AND. ( NB.LT.SMINMN ) .AND. + $ ( NX.LT.SMINMN ) ) THEN +* +* Use blocked code initially. +* + J = NFXD + 1 +* +* Compute factorization: while loop. +* +* + TOPBMN = MINMN - NX + 30 CONTINUE + IF( J.LE.TOPBMN ) THEN + JB = MIN( NB, TOPBMN-J+1 ) +* +* Factorize JB columns among columns J:N. +* + CALL ZLAQPS( M, N-J+1, J-1, JB, FJB, A( 1, J ), LDA, + $ JPVT( J ), TAU( J ), RWORK( J ), + $ RWORK( N+J ), WORK( 1 ), WORK( JB+1 ), + $ N-J+1 ) +* + J = J + FJB + GO TO 30 + END IF + ELSE + J = NFXD + 1 + END IF +* +* Use unblocked code to factor the last or only block. +* +* + IF( J.LE.MINMN ) + $ CALL ZLAQP2( M, N-J+1, J-1, A( 1, J ), LDA, JPVT( J ), + $ TAU( J ), RWORK( J ), RWORK( N+J ), WORK( 1 ) ) +* + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of ZGEQP3 +* + END diff --git a/2.3-1/src/fortran/lapack/zgeqpf.f b/2.3-1/src/fortran/lapack/zgeqpf.f new file mode 100644 index 00000000..6d4f86f0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgeqpf.f @@ -0,0 +1,234 @@ + SUBROUTINE ZGEQPF( M, N, A, LDA, JPVT, TAU, WORK, RWORK, INFO ) +* +* -- LAPACK deprecated driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* This routine is deprecated and has been replaced by routine ZGEQP3. +* +* ZGEQPF computes a QR factorization with column pivoting of a +* complex M-by-N matrix A: A*P = Q*R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0 +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of the array contains the +* min(M,N)-by-N upper triangular matrix R; the elements +* below the diagonal, together with the array TAU, +* represent the unitary matrix Q as a product of +* min(m,n) elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(i) = 0, +* the i-th column of A is a free column. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(n) +* +* Each H(i) has the form +* +* H = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i). +* +* The matrix P is represented in jpvt as follows: If +* jpvt(j) = i +* then the jth column of P is the ith canonical unit vector. +* +* Partial column norm updating strategy modified by +* Z. Drmac and Z. Bujanovic, Dept. of Mathematics, +* University of Zagreb, Croatia. +* June 2006. +* For more details see LAPACK Working Note 176. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, ITEMP, J, MA, MN, PVT + DOUBLE PRECISION TEMP, TEMP2, TOL3Z + COMPLEX*16 AII +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEQR2, ZLARF, ZLARFG, ZSWAP, ZUNM2R +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DCMPLX, DCONJG, MAX, MIN, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DZNRM2 + EXTERNAL IDAMAX, DLAMCH, DZNRM2 +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEQPF', -INFO ) + RETURN + END IF +* + MN = MIN( M, N ) + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Move initial columns up front +* + ITEMP = 1 + DO 10 I = 1, N + IF( JPVT( I ).NE.0 ) THEN + IF( I.NE.ITEMP ) THEN + CALL ZSWAP( M, A( 1, I ), 1, A( 1, ITEMP ), 1 ) + JPVT( I ) = JPVT( ITEMP ) + JPVT( ITEMP ) = I + ELSE + JPVT( I ) = I + END IF + ITEMP = ITEMP + 1 + ELSE + JPVT( I ) = I + END IF + 10 CONTINUE + ITEMP = ITEMP - 1 +* +* Compute the QR factorization and update remaining columns +* + IF( ITEMP.GT.0 ) THEN + MA = MIN( ITEMP, M ) + CALL ZGEQR2( M, MA, A, LDA, TAU, WORK, INFO ) + IF( MA.LT.N ) THEN + CALL ZUNM2R( 'Left', 'Conjugate transpose', M, N-MA, MA, A, + $ LDA, TAU, A( 1, MA+1 ), LDA, WORK, INFO ) + END IF + END IF +* + IF( ITEMP.LT.MN ) THEN +* +* Initialize partial column norms. The first n elements of +* work store the exact column norms. +* + DO 20 I = ITEMP + 1, N + RWORK( I ) = DZNRM2( M-ITEMP, A( ITEMP+1, I ), 1 ) + RWORK( N+I ) = RWORK( I ) + 20 CONTINUE +* +* Compute factorization +* + DO 40 I = ITEMP + 1, MN +* +* Determine ith pivot column and swap if necessary +* + PVT = ( I-1 ) + IDAMAX( N-I+1, RWORK( I ), 1 ) +* + IF( PVT.NE.I ) THEN + CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( I ) + JPVT( I ) = ITEMP + RWORK( PVT ) = RWORK( I ) + RWORK( N+PVT ) = RWORK( N+I ) + END IF +* +* Generate elementary reflector H(i) +* + AII = A( I, I ) + CALL ZLARFG( M-I+1, AII, A( MIN( I+1, M ), I ), 1, + $ TAU( I ) ) + A( I, I ) = AII +* + IF( I.LT.N ) THEN +* +* Apply H(i) to A(i:m,i+1:n) from the left +* + AII = A( I, I ) + A( I, I ) = DCMPLX( ONE ) + CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, + $ DCONJG( TAU( I ) ), A( I, I+1 ), LDA, WORK ) + A( I, I ) = AII + END IF +* +* Update partial column norms +* + DO 30 J = I + 1, N + IF( RWORK( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ABS( A( I, J ) ) / RWORK( J ) + TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) ) + TEMP2 = TEMP*( RWORK( J ) / RWORK( N+J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + IF( M-I.GT.0 ) THEN + RWORK( J ) = DZNRM2( M-I, A( I+1, J ), 1 ) + RWORK( N+J ) = RWORK( J ) + ELSE + RWORK( J ) = ZERO + RWORK( N+J ) = ZERO + END IF + ELSE + RWORK( J ) = RWORK( J )*SQRT( TEMP ) + END IF + END IF + 30 CONTINUE +* + 40 CONTINUE + END IF + RETURN +* +* End of ZGEQPF +* + END diff --git a/2.3-1/src/fortran/lapack/zgeqr2.f b/2.3-1/src/fortran/lapack/zgeqr2.f new file mode 100644 index 00000000..962ab588 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgeqr2.f @@ -0,0 +1,121 @@ + SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEQR2 computes a QR factorization of a complex m by n matrix A: +* A = Q * R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, the elements on and above the diagonal of the array +* contain the min(m,n) by n upper trapezoidal matrix R (R is +* upper triangular if m >= n); the elements below the diagonal, +* with the array TAU, represent the unitary matrix Q as a +* product of elementary reflectors (see Further Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, K + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARF, ZLARFG +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEQR2', -INFO ) + RETURN + END IF +* + K = MIN( M, N ) +* + DO 10 I = 1, K +* +* Generate elementary reflector H(i) to annihilate A(i+1:m,i) +* + CALL ZLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1, + $ TAU( I ) ) + IF( I.LT.N ) THEN +* +* Apply H(i)' to A(i:m,i+1:n) from the left +* + ALPHA = A( I, I ) + A( I, I ) = ONE + CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, + $ DCONJG( TAU( I ) ), A( I, I+1 ), LDA, WORK ) + A( I, I ) = ALPHA + END IF + 10 CONTINUE + RETURN +* +* End of ZGEQR2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgeqrf.f b/2.3-1/src/fortran/lapack/zgeqrf.f new file mode 100644 index 00000000..d11c9245 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgeqrf.f @@ -0,0 +1,196 @@ + SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGEQRF computes a QR factorization of a complex M-by-N matrix A: +* A = Q * R. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the elements on and above the diagonal of the array +* contain the min(M,N)-by-N upper trapezoidal matrix R (R is +* upper triangular if m >= n); the elements below the diagonal, +* with the array TAU, represent the unitary matrix Q as a +* product of min(m,n) elementary reflectors (see Further +* Details). +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of elementary reflectors +* +* Q = H(1) H(2) . . . H(k), where k = min(m,n). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), +* and tau in TAU(i). +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEQR2, ZLARFB, ZLARFT +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGEQRF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + K = MIN( M, N ) + IF( K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZGEQRF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZGEQRF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code initially +* + DO 10 I = 1, K - NX, NB + IB = MIN( K-I+1, NB ) +* +* Compute the QR factorization of the current block +* A(i:m,i:i+ib-1) +* + CALL ZGEQR2( M-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) + IF( I+IB.LE.N ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB, + $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(i:m,i+ib:n) from the left +* + CALL ZLARFB( 'Left', 'Conjugate transpose', 'Forward', + $ 'Columnwise', M-I+1, N-I-IB+1, IB, + $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), + $ LDA, WORK( IB+1 ), LDWORK ) + END IF + 10 CONTINUE + ELSE + I = 1 + END IF +* +* Use unblocked code to factor the last or only block. +* + IF( I.LE.K ) + $ CALL ZGEQR2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* + WORK( 1 ) = IWS + RETURN +* +* End of ZGEQRF +* + END diff --git a/2.3-1/src/fortran/lapack/zgesc2.f b/2.3-1/src/fortran/lapack/zgesc2.f new file mode 100644 index 00000000..d4d51337 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgesc2.f @@ -0,0 +1,133 @@ + SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + COMPLEX*16 A( LDA, * ), RHS( * ) +* .. +* +* Purpose +* ======= +* +* ZGESC2 solves a system of linear equations +* +* A * X = scale* RHS +* +* with a general N-by-N matrix A using the LU factorization with +* complete pivoting computed by ZGETC2. +* +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of columns of the matrix A. +* +* A (input) COMPLEX*16 array, dimension (LDA, N) +* On entry, the LU part of the factorization of the n-by-n +* matrix A computed by ZGETC2: A = P * L * U * Q +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1, N). +* +* RHS (input/output) COMPLEX*16 array, dimension N. +* On entry, the right hand side vector b. +* On exit, the solution vector X. +* +* IPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* SCALE (output) DOUBLE PRECISION +* On exit, SCALE contains the scale factor. SCALE is chosen +* 0 <= SCALE <= 1 to prevent owerflow in the solution. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION BIGNUM, EPS, SMLNUM + COMPLEX*16 TEMP +* .. +* .. External Subroutines .. + EXTERNAL ZLASWP, ZSCAL +* .. +* .. External Functions .. + INTEGER IZAMAX + DOUBLE PRECISION DLAMCH + EXTERNAL IZAMAX, DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX +* .. +* .. Executable Statements .. +* +* Set constant to control overflow +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Apply permutations IPIV to RHS +* + CALL ZLASWP( 1, RHS, LDA, 1, N-1, IPIV, 1 ) +* +* Solve for L part +* + DO 20 I = 1, N - 1 + DO 10 J = I + 1, N + RHS( J ) = RHS( J ) - A( J, I )*RHS( I ) + 10 CONTINUE + 20 CONTINUE +* +* Solve for U part +* + SCALE = ONE +* +* Check for scaling +* + I = IZAMAX( N, RHS, 1 ) + IF( TWO*SMLNUM*ABS( RHS( I ) ).GT.ABS( A( N, N ) ) ) THEN + TEMP = DCMPLX( ONE / TWO, ZERO ) / ABS( RHS( I ) ) + CALL ZSCAL( N, TEMP, RHS( 1 ), 1 ) + SCALE = SCALE*DBLE( TEMP ) + END IF + DO 40 I = N, 1, -1 + TEMP = DCMPLX( ONE, ZERO ) / A( I, I ) + RHS( I ) = RHS( I )*TEMP + DO 30 J = I + 1, N + RHS( I ) = RHS( I ) - RHS( J )*( A( I, J )*TEMP ) + 30 CONTINUE + 40 CONTINUE +* +* Apply permutations JPIV to the solution (RHS) +* + CALL ZLASWP( 1, RHS, LDA, 1, N-1, JPIV, -1 ) + RETURN +* +* End of ZGESC2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgesvd.f b/2.3-1/src/fortran/lapack/zgesvd.f new file mode 100644 index 00000000..7b238d8b --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgesvd.f @@ -0,0 +1,3602 @@ + SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, + $ WORK, LWORK, RWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBU, JOBVT + INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ), S( * ) + COMPLEX*16 A( LDA, * ), U( LDU, * ), VT( LDVT, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGESVD computes the singular value decomposition (SVD) of a complex +* M-by-N matrix A, optionally computing the left and/or right singular +* vectors. The SVD is written +* +* A = U * SIGMA * conjugate-transpose(V) +* +* where SIGMA is an M-by-N matrix which is zero except for its +* min(m,n) diagonal elements, U is an M-by-M unitary matrix, and +* V is an N-by-N unitary matrix. The diagonal elements of SIGMA +* are the singular values of A; they are real and non-negative, and +* are returned in descending order. The first min(m,n) columns of +* U and V are the left and right singular vectors of A. +* +* Note that the routine returns V**H, not V. +* +* Arguments +* ========= +* +* JOBU (input) CHARACTER*1 +* Specifies options for computing all or part of the matrix U: +* = 'A': all M columns of U are returned in array U: +* = 'S': the first min(m,n) columns of U (the left singular +* vectors) are returned in the array U; +* = 'O': the first min(m,n) columns of U (the left singular +* vectors) are overwritten on the array A; +* = 'N': no columns of U (no left singular vectors) are +* computed. +* +* JOBVT (input) CHARACTER*1 +* Specifies options for computing all or part of the matrix +* V**H: +* = 'A': all N rows of V**H are returned in the array VT; +* = 'S': the first min(m,n) rows of V**H (the right singular +* vectors) are returned in the array VT; +* = 'O': the first min(m,n) rows of V**H (the right singular +* vectors) are overwritten on the array A; +* = 'N': no rows of V**H (no right singular vectors) are +* computed. +* +* JOBVT and JOBU cannot both be 'O'. +* +* M (input) INTEGER +* The number of rows of the input matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the input matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, +* if JOBU = 'O', A is overwritten with the first min(m,n) +* columns of U (the left singular vectors, +* stored columnwise); +* if JOBVT = 'O', A is overwritten with the first min(m,n) +* rows of V**H (the right singular vectors, +* stored rowwise); +* if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A +* are destroyed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* S (output) DOUBLE PRECISION array, dimension (min(M,N)) +* The singular values of A, sorted so that S(i) >= S(i+1). +* +* U (output) COMPLEX*16 array, dimension (LDU,UCOL) +* (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'. +* If JOBU = 'A', U contains the M-by-M unitary matrix U; +* if JOBU = 'S', U contains the first min(m,n) columns of U +* (the left singular vectors, stored columnwise); +* if JOBU = 'N' or 'O', U is not referenced. +* +* LDU (input) INTEGER +* The leading dimension of the array U. LDU >= 1; if +* JOBU = 'S' or 'A', LDU >= M. +* +* VT (output) COMPLEX*16 array, dimension (LDVT,N) +* If JOBVT = 'A', VT contains the N-by-N unitary matrix +* V**H; +* if JOBVT = 'S', VT contains the first min(m,n) rows of +* V**H (the right singular vectors, stored rowwise); +* if JOBVT = 'N' or 'O', VT is not referenced. +* +* LDVT (input) INTEGER +* The leading dimension of the array VT. LDVT >= 1; if +* JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* LWORK >= MAX(1,2*MIN(M,N)+MAX(M,N)). +* For good performance, LWORK should generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (5*min(M,N)) +* On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the +* unconverged superdiagonal elements of an upper bidiagonal +* matrix B whose diagonal is in S (not necessarily sorted). +* B satisfies A = U * B * VT, so it has the same singular +* values as A, and singular vectors related by U and VT. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* > 0: if ZBDSQR did not converge, INFO specifies how many +* superdiagonals of an intermediate bidiagonal form B +* did not converge to zero. See the description of RWORK +* above for details. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, WNTUA, WNTUAS, WNTUN, WNTUO, WNTUS, + $ WNTVA, WNTVAS, WNTVN, WNTVO, WNTVS + INTEGER BLK, CHUNK, I, IE, IERR, IR, IRWORK, ISCL, + $ ITAU, ITAUP, ITAUQ, IU, IWORK, LDWRKR, LDWRKU, + $ MAXWRK, MINMN, MINWRK, MNTHR, NCU, NCVT, NRU, + $ NRVT, WRKBL + DOUBLE PRECISION ANRM, BIGNUM, EPS, SMLNUM +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ) + COMPLEX*16 CDUM( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLASCL, XERBLA, ZBDSQR, ZGEBRD, ZGELQF, ZGEMM, + $ ZGEQRF, ZLACPY, ZLASCL, ZLASET, ZUNGBR, ZUNGLQ, + $ ZUNGQR, ZUNMBR +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + MINMN = MIN( M, N ) + WNTUA = LSAME( JOBU, 'A' ) + WNTUS = LSAME( JOBU, 'S' ) + WNTUAS = WNTUA .OR. WNTUS + WNTUO = LSAME( JOBU, 'O' ) + WNTUN = LSAME( JOBU, 'N' ) + WNTVA = LSAME( JOBVT, 'A' ) + WNTVS = LSAME( JOBVT, 'S' ) + WNTVAS = WNTVA .OR. WNTVS + WNTVO = LSAME( JOBVT, 'O' ) + WNTVN = LSAME( JOBVT, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* + IF( .NOT.( WNTUA .OR. WNTUS .OR. WNTUO .OR. WNTUN ) ) THEN + INFO = -1 + ELSE IF( .NOT.( WNTVA .OR. WNTVS .OR. WNTVO .OR. WNTVN ) .OR. + $ ( WNTVO .AND. WNTUO ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN + INFO = -9 + ELSE IF( LDVT.LT.1 .OR. ( WNTVA .AND. LDVT.LT.N ) .OR. + $ ( WNTVS .AND. LDVT.LT.MINMN ) ) THEN + INFO = -11 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* CWorkspace refers to complex workspace, and RWorkspace to +* real workspace. NB refers to the optimal block size for the +* immediately following subroutine, as returned by ILAENV.) +* + IF( INFO.EQ.0 ) THEN + MINWRK = 1 + MAXWRK = 1 + IF( M.GE.N .AND. MINMN.GT.0 ) THEN +* +* Space needed for ZBDSQR is BDSPAC = 5*N +* + MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 ) + IF( M.GE.MNTHR ) THEN + IF( WNTUN ) THEN +* +* Path 1 (M much larger than N, JOBU='N') +* + MAXWRK = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, + $ -1 ) + MAXWRK = MAX( MAXWRK, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + IF( WNTVO .OR. WNTVAS ) + $ MAXWRK = MAX( MAXWRK, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MINWRK = 3*N + ELSE IF( WNTUO .AND. WNTVN ) THEN +* +* Path 2 (M much larger than N, JOBU='O', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + MAXWRK = MAX( N*N+WRKBL, N*N+M*N ) + MINWRK = 2*N + M + ELSE IF( WNTUO .AND. WNTVAS ) THEN +* +* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MAXWRK = MAX( N*N+WRKBL, N*N+M*N ) + MINWRK = 2*N + M + ELSE IF( WNTUS .AND. WNTVN ) THEN +* +* Path 4 (M much larger than N, JOBU='S', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + MAXWRK = N*N + WRKBL + MINWRK = 2*N + M + ELSE IF( WNTUS .AND. WNTVO ) THEN +* +* Path 5 (M much larger than N, JOBU='S', JOBVT='O') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MAXWRK = 2*N*N + WRKBL + MINWRK = 2*N + M + ELSE IF( WNTUS .AND. WNTVAS ) THEN +* +* Path 6 (M much larger than N, JOBU='S', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M, + $ N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MAXWRK = N*N + WRKBL + MINWRK = 2*N + M + ELSE IF( WNTUA .AND. WNTVN ) THEN +* +* Path 7 (M much larger than N, JOBU='A', JOBVT='N') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'ZUNGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + MAXWRK = N*N + WRKBL + MINWRK = 2*N + M + ELSE IF( WNTUA .AND. WNTVO ) THEN +* +* Path 8 (M much larger than N, JOBU='A', JOBVT='O') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'ZUNGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MAXWRK = 2*N*N + WRKBL + MINWRK = 2*N + M + ELSE IF( WNTUA .AND. WNTVAS ) THEN +* +* Path 9 (M much larger than N, JOBU='A', JOBVT='S' or +* 'A') +* + WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'ZUNGQR', ' ', M, + $ M, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+2*N* + $ ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', N, N, N, -1 ) ) + WRKBL = MAX( WRKBL, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MAXWRK = N*N + WRKBL + MINWRK = 2*N + M + END IF + ELSE +* +* Path 10 (M at least N, but not much larger) +* + MAXWRK = 2*N + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N, + $ -1, -1 ) + IF( WNTUS .OR. WNTUO ) + $ MAXWRK = MAX( MAXWRK, 2*N+N* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, N, N, -1 ) ) + IF( WNTUA ) + $ MAXWRK = MAX( MAXWRK, 2*N+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, N, -1 ) ) + IF( .NOT.WNTVN ) + $ MAXWRK = MAX( MAXWRK, 2*N+( N-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) ) + MINWRK = 2*N + M + END IF + ELSE IF( MINMN.GT.0 ) THEN +* +* Space needed for ZBDSQR is BDSPAC = 5*M +* + MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 ) + IF( N.GE.MNTHR ) THEN + IF( WNTVN ) THEN +* +* Path 1t(N much larger than M, JOBVT='N') +* + MAXWRK = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, + $ -1 ) + MAXWRK = MAX( MAXWRK, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + IF( WNTUO .OR. WNTUAS ) + $ MAXWRK = MAX( MAXWRK, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MINWRK = 3*M + ELSE IF( WNTVO .AND. WNTUN ) THEN +* +* Path 2t(N much larger than M, JOBU='N', JOBVT='O') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + MAXWRK = MAX( M*M+WRKBL, M*M+M*N ) + MINWRK = 2*M + N + ELSE IF( WNTVO .AND. WNTUAS ) THEN +* +* Path 3t(N much larger than M, JOBU='S' or 'A', +* JOBVT='O') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = MAX( M*M+WRKBL, M*M+M*N ) + MINWRK = 2*M + N + ELSE IF( WNTVS .AND. WNTUN ) THEN +* +* Path 4t(N much larger than M, JOBU='N', JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + MAXWRK = M*M + WRKBL + MINWRK = 2*M + N + ELSE IF( WNTVS .AND. WNTUO ) THEN +* +* Path 5t(N much larger than M, JOBU='O', JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = 2*M*M + WRKBL + MINWRK = 2*M + N + ELSE IF( WNTVS .AND. WNTUAS ) THEN +* +* Path 6t(N much larger than M, JOBU='S' or 'A', +* JOBVT='S') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = M*M + WRKBL + MINWRK = 2*M + N + ELSE IF( WNTVA .AND. WNTUN ) THEN +* +* Path 7t(N much larger than M, JOBU='N', JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'ZUNGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + MAXWRK = M*M + WRKBL + MINWRK = 2*M + N + ELSE IF( WNTVA .AND. WNTUO ) THEN +* +* Path 8t(N much larger than M, JOBU='O', JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'ZUNGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = 2*M*M + WRKBL + MINWRK = 2*M + N + ELSE IF( WNTVA .AND. WNTUAS ) THEN +* +* Path 9t(N much larger than M, JOBU='S' or 'A', +* JOBVT='A') +* + WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 ) + WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'ZUNGLQ', ' ', N, + $ N, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+2*M* + $ ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'P', M, M, M, -1 ) ) + WRKBL = MAX( WRKBL, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MAXWRK = M*M + WRKBL + MINWRK = 2*M + N + END IF + ELSE +* +* Path 10t(N greater than M, but not much larger) +* + MAXWRK = 2*M + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N, + $ -1, -1 ) + IF( WNTVS .OR. WNTVO ) + $ MAXWRK = MAX( MAXWRK, 2*M+M* + $ ILAENV( 1, 'ZUNGBR', 'P', M, N, M, -1 ) ) + IF( WNTVA ) + $ MAXWRK = MAX( MAXWRK, 2*M+N* + $ ILAENV( 1, 'ZUNGBR', 'P', N, N, M, -1 ) ) + IF( .NOT.WNTUN ) + $ MAXWRK = MAX( MAXWRK, 2*M+( M-1 )* + $ ILAENV( 1, 'ZUNGBR', 'Q', M, M, M, -1 ) ) + MINWRK = 2*M + N + END IF + END IF + MAXWRK = MAX( MAXWRK, MINWRK ) + WORK( 1 ) = MAXWRK +* + IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGESVD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', M, N, A, LDA, DUM ) + ISCL = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ISCL = 1 + CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR ) + ELSE IF( ANRM.GT.BIGNUM ) THEN + ISCL = 1 + CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR ) + END IF +* + IF( M.GE.N ) THEN +* +* A has at least as many rows as columns. If A has sufficiently +* more rows than columns, first reduce using the QR +* decomposition (if sufficient workspace available) +* + IF( M.GE.MNTHR ) THEN +* + IF( WNTUN ) THEN +* +* Path 1 (M much larger than N, JOBU='N') +* No left singular vectors to be computed +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: need 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Zero out below R +* + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ), + $ LDA ) + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in A +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + NCVT = 0 + IF( WNTVO .OR. WNTVAS ) THEN +* +* If right singular vectors desired, generate P'. +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + NCVT = N + END IF + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in A if desired +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, NCVT, 0, 0, S, RWORK( IE ), A, LDA, + $ CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO ) +* +* If right singular vectors desired in VT, copy them there +* + IF( WNTVAS ) + $ CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT ) +* + ELSE IF( WNTUO .AND. WNTVN ) THEN +* +* Path 2 (M much larger than N, JOBU='O', JOBVT='N') +* N left singular vectors to be overwritten on A and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+3*N ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN +* +* WORK(IU) is LDA by N, WORK(IR) is LDA by N +* + LDWRKU = LDA + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN +* +* WORK(IU) is LDA by N, WORK(IR) is N by N +* + LDWRKU = LDA + LDWRKR = N + ELSE +* +* WORK(IU) is LDWRKU by N, WORK(IR) is N by N +* + LDWRKU = ( LWORK-N*N ) / N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IR) and zero out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IR+1 ), LDWRKR ) +* +* Generate Q in A +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing R +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: need 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM, 1, + $ WORK( IR ), LDWRKR, CDUM, 1, + $ RWORK( IRWORK ), INFO ) + IU = ITAUQ +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in WORK(IU) and copying to A +* (CWorkspace: need N*N+N, prefer N*N+M*N) +* (RWorkspace: 0) +* + DO 10 I = 1, M, LDWRKU + CHUNK = MIN( M-I+1, LDWRKU ) + CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ), + $ LDA, WORK( IR ), LDWRKR, CZERO, + $ WORK( IU ), LDWRKU ) + CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, + $ A( I, 1 ), LDA ) + 10 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize A +* (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB) +* (RWorkspace: N) +* + CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing A +* (CWorkspace: need 3*N, prefer 2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A +* (CWorkspace: need 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM, 1, + $ A, LDA, CDUM, 1, RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUO .AND. WNTVAS ) THEN +* +* Path 3 (M much larger than N, JOBU='O', JOBVT='S' or 'A') +* N left singular vectors to be overwritten on A and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+3*N ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + LDWRKR = N + ELSE +* +* WORK(IU) is LDWRKU by N and WORK(IR) is N by N +* + LDWRKU = ( LWORK-N*N ) / N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ VT( 2, 1 ), LDVT ) +* +* Generate Q in A +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT, copying result to WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR ) +* +* Generate left vectors bidiagonalizing R in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in VT +* (CWorkspace: need N*N+3*N-1, prefer N*N+2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) and computing right +* singular vectors of R in VT +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT, + $ LDVT, WORK( IR ), LDWRKR, CDUM, 1, + $ RWORK( IRWORK ), INFO ) + IU = ITAUQ +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in WORK(IU) and copying to A +* (CWorkspace: need N*N+N, prefer N*N+M*N) +* (RWorkspace: 0) +* + DO 20 I = 1, M, LDWRKU + CHUNK = MIN( M-I+1, LDWRKU ) + CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ), + $ LDA, WORK( IR ), LDWRKR, CZERO, + $ WORK( IU ), LDWRKU ) + CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU, + $ A( I, 1 ), LDA ) + 20 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ VT( 2, 1 ), LDVT ) +* +* Generate Q in A +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: N) +* + CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in A by left vectors bidiagonalizing R +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), A, LDA, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in VT +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTUS ) THEN +* + IF( WNTVN ) THEN +* +* Path 4 (M much larger than N, JOBU='S', JOBVT='N') +* N left singular vectors to be computed in U and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+3*N ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IR) is LDA by N +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is N by N +* + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IR), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IR+1 ), LDWRKR ) +* +* Generate Q in A +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing R in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM, + $ 1, WORK( IR ), LDWRKR, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IR), storing result in U +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA, + $ WORK( IR ), LDWRKR, CZERO, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ A( 2, 1 ), LDA ) +* +* Bidiagonalize R in A +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left vectors bidiagonalizing R +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM, + $ 1, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVO ) THEN +* +* Path 5 (M much larger than N, JOBU='S', JOBVT='O') +* N left singular vectors to be computed in U and +* N right singular vectors to be overwritten on A +* + IF( LWORK.GE.2*N*N+3*N ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = N + ELSE +* +* WORK(IU) is N by N and WORK(IR) is N by N +* + LDWRKU = N + IR = IU + LDWRKU*N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IU+1 ), LDWRKU ) +* +* Generate Q in A +* (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to +* WORK(IR) +* (CWorkspace: need 2*N*N+3*N, +* prefer 2*N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need 2*N*N+3*N-1, +* prefer 2*N*N+2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in WORK(IR) +* (CWorkspace: need 2*N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, WORK( IU ), + $ LDWRKU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IU), storing result in U +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA, + $ WORK( IU ), LDWRKU, CZERO, U, LDU ) +* +* Copy right singular vectors of R to A +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ A( 2, 1 ), LDA ) +* +* Bidiagonalize R in A +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left vectors bidiagonalizing R +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing R in A +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A, + $ LDA, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVAS ) THEN +* +* Path 6 (M much larger than N, JOBU='S', JOBVT='S' +* or 'A') +* N left singular vectors to be computed in U and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+3*N ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is N by N +* + LDWRKU = N + END IF + ITAU = IU + LDWRKU*N + IWORK = ITAU + N +* +* Compute A=Q*R +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IU+1 ), LDWRKU ) +* +* Generate Q in A +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to VT +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, + $ LDVT ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (CWorkspace: need N*N+3*N-1, +* prefer N*N+2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in VT +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT, + $ LDVT, WORK( IU ), LDWRKU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply Q in A by left singular vectors of R in +* WORK(IU), storing result in U +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA, + $ WORK( IU ), LDWRKU, CZERO, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to VT, zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ VT( 2, 1 ), LDVT ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in VT +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + END IF +* + ELSE IF( WNTUA ) THEN +* + IF( WNTVN ) THEN +* +* Path 7 (M much larger than N, JOBU='A', JOBVT='N') +* M left singular vectors to be computed in U and +* no right singular vectors to be computed +* + IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IR) is LDA by N +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is N by N +* + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Copy R to WORK(IR), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IR+1 ), LDWRKR ) +* +* Generate Q in U +* (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IR) +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM, + $ 1, WORK( IR ), LDWRKR, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IR), storing result in A +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU, + $ WORK( IR ), LDWRKR, CZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL ZLACPY( 'F', M, N, A, LDA, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need N+M, prefer N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ A( 2, 1 ), LDA ) +* +* Bidiagonalize R in A +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in A +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM, + $ 1, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVO ) THEN +* +* Path 8 (M much larger than N, JOBU='A', JOBVT='O') +* M left singular vectors to be computed in U and +* N right singular vectors to be overwritten on A +* + IF( LWORK.GE.2*N*N+MAX( N+M, 3*N ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is N by N +* + LDWRKU = LDA + IR = IU + LDWRKU*N + LDWRKR = N + ELSE +* +* WORK(IU) is N by N and WORK(IR) is N by N +* + LDWRKU = N + IR = IU + LDWRKU*N + LDWRKR = N + END IF + ITAU = IR + LDWRKR*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IU+1 ), LDWRKU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to +* WORK(IR) +* (CWorkspace: need 2*N*N+3*N, +* prefer 2*N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need 2*N*N+3*N-1, +* prefer 2*N*N+2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in WORK(IR) +* (CWorkspace: need 2*N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, WORK( IU ), + $ LDWRKU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IU), storing result in A +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU, + $ WORK( IU ), LDWRKU, CZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL ZLACPY( 'F', M, N, A, LDA, U, LDU ) +* +* Copy right singular vectors of R from WORK(IR) to A +* + CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need N+M, prefer N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Zero out below R in A +* + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ A( 2, 1 ), LDA ) +* +* Bidiagonalize R in A +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in A +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in A +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A, + $ LDA, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* + END IF +* + ELSE IF( WNTVAS ) THEN +* +* Path 9 (M much larger than N, JOBU='A', JOBVT='S' +* or 'A') +* M left singular vectors to be computed in U and +* N right singular vectors to be computed in VT +* + IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*N ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is N by N +* + LDWRKU = N + END IF + ITAU = IU + LDWRKU*N + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R to WORK(IU), zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ WORK( IU+1 ), LDWRKU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in WORK(IU), copying result to VT +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT, + $ LDVT ) +* +* Generate left bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (CWorkspace: need N*N+3*N-1, +* prefer N*N+2*N+(N-1)*NB) +* (RWorkspace: need 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of R in WORK(IU) and computing +* right singular vectors of R in VT +* (CWorkspace: need N*N) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT, + $ LDVT, WORK( IU ), LDWRKU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply Q in U by left singular vectors of R in +* WORK(IU), storing result in A +* (CWorkspace: need N*N) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU, + $ WORK( IU ), LDWRKU, CZERO, A, LDA ) +* +* Copy left singular vectors of A from A to U +* + CALL ZLACPY( 'F', M, N, A, LDA, U, LDU ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + N +* +* Compute A=Q*R, copying result to U +* (CWorkspace: need 2*N, prefer N+N*NB) +* (RWorkspace: 0) +* + CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) +* +* Generate Q in U +* (CWorkspace: need N+M, prefer N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy R from A to VT, zeroing out below it +* + CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT ) + IF( N.GT.1 ) + $ CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, + $ VT( 2, 1 ), LDVT ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize R in VT +* (CWorkspace: need 3*N, prefer 2*N+2*N*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply Q in U by left bidiagonalizing vectors +* in VT +* (CWorkspace: need 2*N+M, prefer 2*N+M*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT, + $ WORK( ITAUQ ), U, LDU, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in VT +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + N +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + END IF +* + END IF +* + ELSE +* +* M .LT. MNTHR +* +* Path 10 (M at least N, but not much larger) +* Reduce to bidiagonal form without QR decomposition +* + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + N + IWORK = ITAUP + N +* +* Bidiagonalize A +* (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB) +* (RWorkspace: need N) +* + CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUAS ) THEN +* +* If left singular vectors desired in U, copy result to U +* and generate left bidiagonalizing vectors in U +* (CWorkspace: need 2*N+NCU, prefer 2*N+NCU*NB) +* (RWorkspace: 0) +* + CALL ZLACPY( 'L', M, N, A, LDA, U, LDU ) + IF( WNTUS ) + $ NCU = N + IF( WNTUA ) + $ NCU = M + CALL ZUNGBR( 'Q', M, NCU, N, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVAS ) THEN +* +* If right singular vectors desired in VT, copy result to +* VT and generate right bidiagonalizing vectors in VT +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT ) + CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTUO ) THEN +* +* If left singular vectors desired in A, generate left +* bidiagonalizing vectors in A +* (CWorkspace: need 3*N, prefer 2*N+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVO ) THEN +* +* If right singular vectors desired in A, generate right +* bidiagonalizing vectors in A +* (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IRWORK = IE + N + IF( WNTUAS .OR. WNTUO ) + $ NRU = M + IF( WNTUN ) + $ NRU = 0 + IF( WNTVAS .OR. WNTVO ) + $ NCVT = N + IF( WNTVN ) + $ NCVT = 0 + IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), A, + $ LDA, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + ELSE +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in A and computing right singular +* vectors in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT, + $ LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + END IF +* + END IF +* + ELSE +* +* A has more columns than rows. If A has sufficiently more +* columns than rows, first reduce using the LQ decomposition (if +* sufficient workspace available) +* + IF( N.GE.MNTHR ) THEN +* + IF( WNTVN ) THEN +* +* Path 1t(N much larger than M, JOBVT='N') +* No right singular vectors to be computed +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Zero out above L +* + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, A( 1, 2 ), + $ LDA ) + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in A +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUO .OR. WNTUAS ) THEN +* +* If left singular vectors desired, generate Q +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IRWORK = IE + M + NRU = 0 + IF( WNTUO .OR. WNTUAS ) + $ NRU = M +* +* Perform bidiagonal QR iteration, computing left singular +* vectors of A in A if desired +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, 0, NRU, 0, S, RWORK( IE ), CDUM, 1, + $ A, LDA, CDUM, 1, RWORK( IRWORK ), INFO ) +* +* If left singular vectors desired in U, copy them there +* + IF( WNTUAS ) + $ CALL ZLACPY( 'F', M, M, A, LDA, U, LDU ) +* + ELSE IF( WNTVO .AND. WNTUN ) THEN +* +* Path 2t(N much larger than M, JOBU='N', JOBVT='O') +* M right singular vectors to be overwritten on A and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+3*M ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is M by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = M + ELSE +* +* WORK(IU) is M by CHUNK and WORK(IR) is M by M +* + LDWRKU = M + CHUNK = ( LWORK-M*M ) / M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IR) and zero out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ), LDWRKR ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in A +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing L +* (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1, + $ RWORK( IRWORK ), INFO ) + IU = ITAUQ +* +* Multiply right singular vectors of L in WORK(IR) by Q +* in A, storing result in WORK(IU) and copying to A +* (CWorkspace: need M*M+M, prefer M*M+M*N) +* (RWorkspace: 0) +* + DO 30 I = 1, N, CHUNK + BLK = MIN( N-I+1, CHUNK ) + CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ), + $ LDWRKR, A( 1, I ), LDA, CZERO, + $ WORK( IU ), LDWRKU ) + CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, + $ A( 1, I ), LDA ) + 30 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize A +* (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing A +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'L', M, N, 0, 0, S, RWORK( IE ), A, LDA, + $ CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTVO .AND. WNTUAS ) THEN +* +* Path 3t(N much larger than M, JOBU='S' or 'A', JOBVT='O') +* M right singular vectors to be overwritten on A and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+3*M ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is LDA by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = LDA + ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN +* +* WORK(IU) is LDA by N and WORK(IR) is M by M +* + LDWRKU = LDA + CHUNK = N + LDWRKR = M + ELSE +* +* WORK(IU) is M by CHUNK and WORK(IR) is M by M +* + LDWRKU = M + CHUNK = ( LWORK-M*M ) / M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing about above it +* + CALL ZLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ), + $ LDU ) +* +* Generate Q in A +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U, copying result to WORK(IR) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR ) +* +* Generate right vectors bidiagonalizing L in WORK(IR) +* (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing L in U +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U, and computing right +* singular vectors of L in WORK(IR) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) + IU = ITAUQ +* +* Multiply right singular vectors of L in WORK(IR) by Q +* in A, storing result in WORK(IU) and copying to A +* (CWorkspace: need M*M+M, prefer M*M+M*N)) +* (RWorkspace: 0) +* + DO 40 I = 1, N, CHUNK + BLK = MIN( N-I+1, CHUNK ) + CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ), + $ LDWRKR, A( 1, I ), LDA, CZERO, + $ WORK( IU ), LDWRKU ) + CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU, + $ A( 1, I ), LDA ) + 40 CONTINUE +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ), + $ LDU ) +* +* Generate Q in A +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in A +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU, + $ WORK( ITAUP ), A, LDA, WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left vectors bidiagonalizing L in U +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), A, LDA, + $ U, LDU, CDUM, 1, RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTVS ) THEN +* + IF( WNTUN ) THEN +* +* Path 4t(N much larger than M, JOBU='N', JOBVT='S') +* M right singular vectors to be computed in VT and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+3*M ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IR) is LDA by M +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is M by M +* + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IR), zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in A +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right vectors bidiagonalizing L in +* WORK(IR) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IR) by +* Q in A, storing result in VT +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ), + $ LDWRKR, A, LDA, CZERO, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy result to VT +* + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ A( 1, 2 ), LDA ) +* +* Bidiagonalize L in A +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT, + $ LDVT, CDUM, 1, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUO ) THEN +* +* Path 5t(N much larger than M, JOBU='O', JOBVT='S') +* M right singular vectors to be computed in VT and +* M left singular vectors to be overwritten on A +* + IF( LWORK.GE.2*M*M+3*M ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is LDA by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is M by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = M + ELSE +* +* WORK(IU) is M by M and WORK(IR) is M by M +* + LDWRKU = M + IR = IU + LDWRKU*M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out below it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) +* +* Generate Q in A +* (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to +* WORK(IR) +* (CWorkspace: need 2*M*M+3*M, +* prefer 2*M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need 2*M*M+3*M-1, +* prefer 2*M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in WORK(IR) and computing +* right singular vectors of L in WORK(IU) +* (CWorkspace: need 2*M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ), + $ WORK( IU ), LDWRKU, WORK( IR ), + $ LDWRKR, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in A, storing result in VT +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ), + $ LDWRKU, A, LDA, CZERO, VT, LDVT ) +* +* Copy left singular vectors of L to A +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ A( 1, 2 ), LDA ) +* +* Bidiagonalize L in A +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right vectors bidiagonalizing L by Q in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors of L in A +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, A, LDA, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUAS ) THEN +* +* Path 6t(N much larger than M, JOBU='S' or 'A', +* JOBVT='S') +* M right singular vectors to be computed in VT and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+3*M ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IU) is LDA by N +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is LDA by M +* + LDWRKU = M + END IF + ITAU = IU + LDWRKU*M + IWORK = ITAU + M +* +* Compute A=L*Q +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) +* +* Generate Q in A +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to U +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, + $ LDU ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need M*M+3*M-1, +* prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U and computing right +* singular vectors of L in WORK(IU) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ), + $ WORK( IU ), LDWRKU, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in A, storing result in VT +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ), + $ LDWRKU, A, LDA, CZERO, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ U( 1, 2 ), LDU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in U by Q +* in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + END IF +* + ELSE IF( WNTVA ) THEN +* + IF( WNTUN ) THEN +* +* Path 7t(N much larger than M, JOBU='N', JOBVT='A') +* N right singular vectors to be computed in VT and +* no left singular vectors to be computed +* + IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IR = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IR) is LDA by M +* + LDWRKR = LDA + ELSE +* +* WORK(IR) is M by M +* + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Copy L to WORK(IR), zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ), + $ LDWRKR ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IR+LDWRKR ), LDWRKR ) +* +* Generate Q in VT +* (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IR) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate right bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need M*M+3*M-1, +* prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of L in WORK(IR) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ), + $ WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IR) by +* Q in VT, storing result in A +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ), + $ LDWRKR, VT, LDVT, CZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need M+N, prefer M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ A( 1, 2 ), LDA ) +* +* Bidiagonalize L in A +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in A by Q +* in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT, + $ LDVT, CDUM, 1, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUO ) THEN +* +* Path 8t(N much larger than M, JOBU='O', JOBVT='A') +* N right singular vectors to be computed in VT and +* M left singular vectors to be overwritten on A +* + IF( LWORK.GE.2*M*M+MAX( N+M, 3*M ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+2*LDA*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is LDA by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = LDA + ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN +* +* WORK(IU) is LDA by M and WORK(IR) is M by M +* + LDWRKU = LDA + IR = IU + LDWRKU*M + LDWRKR = M + ELSE +* +* WORK(IU) is M by M and WORK(IR) is M by M +* + LDWRKU = M + IR = IU + LDWRKU*M + LDWRKR = M + END IF + ITAU = IR + LDWRKR*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to +* WORK(IR) +* (CWorkspace: need 2*M*M+3*M, +* prefer 2*M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, + $ WORK( IR ), LDWRKR ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need 2*M*M+3*M-1, +* prefer 2*M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in WORK(IR) +* (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR, + $ WORK( ITAUQ ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in WORK(IR) and computing +* right singular vectors of L in WORK(IU) +* (CWorkspace: need 2*M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ), + $ WORK( IU ), LDWRKU, WORK( IR ), + $ LDWRKR, CDUM, 1, RWORK( IRWORK ), + $ INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in VT, storing result in A +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ), + $ LDWRKU, VT, LDVT, CZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* +* Copy left singular vectors of A from WORK(IR) to A +* + CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A, + $ LDA ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need M+N, prefer M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Zero out above L in A +* + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ A( 1, 2 ), LDA ) +* +* Bidiagonalize L in A +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in A by Q +* in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in A +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in A and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, A, LDA, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + ELSE IF( WNTUAS ) THEN +* +* Path 9t(N much larger than M, JOBU='S' or 'A', +* JOBVT='A') +* N right singular vectors to be computed in VT and +* M left singular vectors to be computed in U +* + IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN +* +* Sufficient workspace for a fast algorithm +* + IU = 1 + IF( LWORK.GE.WRKBL+LDA*M ) THEN +* +* WORK(IU) is LDA by M +* + LDWRKU = LDA + ELSE +* +* WORK(IU) is M by M +* + LDWRKU = M + END IF + ITAU = IU + LDWRKU*M + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to WORK(IU), zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ), + $ LDWRKU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ WORK( IU+LDWRKU ), LDWRKU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in WORK(IU), copying result to U +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S, + $ RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U, + $ LDU ) +* +* Generate right bidiagonalizing vectors in WORK(IU) +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU, + $ WORK( ITAUP ), WORK( IWORK ), + $ LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of L in U and computing right +* singular vectors of L in WORK(IU) +* (CWorkspace: need M*M) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ), + $ WORK( IU ), LDWRKU, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* +* Multiply right singular vectors of L in WORK(IU) by +* Q in VT, storing result in A +* (CWorkspace: need M*M) +* (RWorkspace: 0) +* + CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ), + $ LDWRKU, VT, LDVT, CZERO, A, LDA ) +* +* Copy right singular vectors of A from A to VT +* + CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT ) +* + ELSE +* +* Insufficient workspace for a fast algorithm +* + ITAU = 1 + IWORK = ITAU + M +* +* Compute A=L*Q, copying result to VT +* (CWorkspace: need 2*M, prefer M+M*NB) +* (RWorkspace: 0) +* + CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) +* +* Generate Q in VT +* (CWorkspace: need M+N, prefer M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Copy L to U, zeroing out above it +* + CALL ZLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, + $ U( 1, 2 ), LDU ) + IE = 1 + ITAUQ = ITAU + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize L in U +* (CWorkspace: need 3*M, prefer 2*M+2*M*NB) +* (RWorkspace: need M) +* + CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ), + $ WORK( ITAUQ ), WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Multiply right bidiagonalizing vectors in U by Q +* in VT +* (CWorkspace: need 2*M+N, prefer 2*M+N*NB) +* (RWorkspace: 0) +* + CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU, + $ WORK( ITAUP ), VT, LDVT, + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) +* +* Generate left bidiagonalizing vectors in U +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + IRWORK = IE + M +* +* Perform bidiagonal QR iteration, computing left +* singular vectors of A in U and computing right +* singular vectors of A in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, + $ RWORK( IRWORK ), INFO ) +* + END IF +* + END IF +* + END IF +* + ELSE +* +* N .LT. MNTHR +* +* Path 10t(N greater than M, but not much larger) +* Reduce to bidiagonal form without LQ decomposition +* + IE = 1 + ITAUQ = 1 + ITAUP = ITAUQ + M + IWORK = ITAUP + M +* +* Bidiagonalize A +* (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB) +* (RWorkspace: M) +* + CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ), + $ WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1, + $ IERR ) + IF( WNTUAS ) THEN +* +* If left singular vectors desired in U, copy result to U +* and generate left bidiagonalizing vectors in U +* (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZLACPY( 'L', M, M, A, LDA, U, LDU ) + CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVAS ) THEN +* +* If right singular vectors desired in VT, copy result to +* VT and generate right bidiagonalizing vectors in VT +* (CWorkspace: need 2*M+NRVT, prefer 2*M+NRVT*NB) +* (RWorkspace: 0) +* + CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT ) + IF( WNTVA ) + $ NRVT = N + IF( WNTVS ) + $ NRVT = M + CALL ZUNGBR( 'P', NRVT, N, M, VT, LDVT, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTUO ) THEN +* +* If left singular vectors desired in A, generate left +* bidiagonalizing vectors in A +* (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IF( WNTVO ) THEN +* +* If right singular vectors desired in A, generate right +* bidiagonalizing vectors in A +* (CWorkspace: need 3*M, prefer 2*M+M*NB) +* (RWorkspace: 0) +* + CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ), + $ WORK( IWORK ), LWORK-IWORK+1, IERR ) + END IF + IRWORK = IE + M + IF( WNTUAS .OR. WNTUO ) + $ NRU = M + IF( WNTUN ) + $ NRU = 0 + IF( WNTVAS .OR. WNTVO ) + $ NCVT = N + IF( WNTVN ) + $ NCVT = 0 + IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT, + $ LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in U and computing right singular +* vectors in A +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), A, + $ LDA, U, LDU, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + ELSE +* +* Perform bidiagonal QR iteration, if desired, computing +* left singular vectors in A and computing right singular +* vectors in VT +* (CWorkspace: 0) +* (RWorkspace: need BDSPAC) +* + CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT, + $ LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ), + $ INFO ) + END IF +* + END IF +* + END IF +* +* Undo scaling if necessary +* + IF( ISCL.EQ.1 ) THEN + IF( ANRM.GT.BIGNUM ) + $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN, + $ IERR ) + IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM ) + $ CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1, + $ RWORK( IE ), MINMN, IERR ) + IF( ANRM.LT.SMLNUM ) + $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN, + $ IERR ) + IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM ) + $ CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1, + $ RWORK( IE ), MINMN, IERR ) + END IF +* +* Return optimal workspace in WORK(1) +* + WORK( 1 ) = MAXWRK +* + RETURN +* +* End of ZGESVD +* + END diff --git a/2.3-1/src/fortran/lapack/zgetc2.f b/2.3-1/src/fortran/lapack/zgetc2.f new file mode 100644 index 00000000..35ac376c --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgetc2.f @@ -0,0 +1,145 @@ + SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZGETC2 computes an LU factorization, using complete pivoting, of the +* n-by-n matrix A. The factorization has the form A = P * L * U * Q, +* where P and Q are permutation matrices, L is lower triangular with +* unit diagonal elements and U is upper triangular. +* +* This is a level 1 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA, N) +* On entry, the n-by-n matrix to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U*Q; the unit diagonal elements of L are not stored. +* If U(k, k) appears to be less than SMIN, U(k, k) is given the +* value of SMIN, giving a nonsingular perturbed system. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1, N). +* +* IPIV (output) INTEGER array, dimension (N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (output) INTEGER array, dimension (N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* INFO (output) INTEGER +* = 0: successful exit +* > 0: if INFO = k, U(k, k) is likely to produce overflow if +* one tries to solve for x in Ax = b. So U is perturbed +* to avoid the overflow. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, IP, IPV, J, JP, JPV + DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX +* .. +* .. External Subroutines .. + EXTERNAL ZGERU, ZSWAP +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DCMPLX, MAX +* .. +* .. Executable Statements .. +* +* Set constants to control overflow +* + INFO = 0 + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) +* +* Factorize A using complete pivoting. +* Set pivots less than SMIN to SMIN +* + DO 40 I = 1, N - 1 +* +* Find max element in matrix A +* + XMAX = ZERO + DO 20 IP = I, N + DO 10 JP = I, N + IF( ABS( A( IP, JP ) ).GE.XMAX ) THEN + XMAX = ABS( A( IP, JP ) ) + IPV = IP + JPV = JP + END IF + 10 CONTINUE + 20 CONTINUE + IF( I.EQ.1 ) + $ SMIN = MAX( EPS*XMAX, SMLNUM ) +* +* Swap rows +* + IF( IPV.NE.I ) + $ CALL ZSWAP( N, A( IPV, 1 ), LDA, A( I, 1 ), LDA ) + IPIV( I ) = IPV +* +* Swap columns +* + IF( JPV.NE.I ) + $ CALL ZSWAP( N, A( 1, JPV ), 1, A( 1, I ), 1 ) + JPIV( I ) = JPV +* +* Check for singularity +* + IF( ABS( A( I, I ) ).LT.SMIN ) THEN + INFO = I + A( I, I ) = DCMPLX( SMIN, ZERO ) + END IF + DO 30 J = I + 1, N + A( J, I ) = A( J, I ) / A( I, I ) + 30 CONTINUE + CALL ZGERU( N-I, N-I, -DCMPLX( ONE ), A( I+1, I ), 1, + $ A( I, I+1 ), LDA, A( I+1, I+1 ), LDA ) + 40 CONTINUE +* + IF( ABS( A( N, N ) ).LT.SMIN ) THEN + INFO = N + A( N, N ) = DCMPLX( SMIN, ZERO ) + END IF + RETURN +* +* End of ZGETC2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgetf2.f b/2.3-1/src/fortran/lapack/zgetf2.f new file mode 100644 index 00000000..a2dc1834 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgetf2.f @@ -0,0 +1,148 @@ + SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZGETF2 computes an LU factorization of a general m-by-n matrix A +* using partial pivoting with row interchanges. +* +* The factorization has the form +* A = P * L * U +* where P is a permutation matrix, L is lower triangular with unit +* diagonal elements (lower trapezoidal if m > n), and U is upper +* triangular (upper trapezoidal if m < n). +* +* This is the right-looking Level 2 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n matrix to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U; the unit diagonal elements of L are not stored. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* IPIV (output) INTEGER array, dimension (min(M,N)) +* The pivot indices; for 1 <= i <= min(M,N), row i of the +* matrix was interchanged with row IPIV(i). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* > 0: if INFO = k, U(k,k) is exactly zero. The factorization +* has been completed, but the factor U is exactly +* singular, and division by zero will occur if it is used +* to solve a system of equations. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION SFMIN + INTEGER I, J, JP +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + INTEGER IZAMAX + EXTERNAL DLAMCH, IZAMAX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGERU, ZSCAL, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGETF2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Compute machine safe minimum +* + SFMIN = DLAMCH('S') +* + DO 10 J = 1, MIN( M, N ) +* +* Find pivot and test for singularity. +* + JP = J - 1 + IZAMAX( M-J+1, A( J, J ), 1 ) + IPIV( J ) = JP + IF( A( JP, J ).NE.ZERO ) THEN +* +* Apply the interchange to columns 1:N. +* + IF( JP.NE.J ) + $ CALL ZSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA ) +* +* Compute elements J+1:M of J-th column. +* + IF( J.LT.M ) THEN + IF( ABS(A( J, J )) .GE. SFMIN ) THEN + CALL ZSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 ) + ELSE + DO 20 I = 1, M-J + A( J+I, J ) = A( J+I, J ) / A( J, J ) + 20 CONTINUE + END IF + END IF +* + ELSE IF( INFO.EQ.0 ) THEN +* + INFO = J + END IF +* + IF( J.LT.MIN( M, N ) ) THEN +* +* Update trailing submatrix. +* + CALL ZGERU( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ), + $ LDA, A( J+1, J+1 ), LDA ) + END IF + 10 CONTINUE + RETURN +* +* End of ZGETF2 +* + END diff --git a/2.3-1/src/fortran/lapack/zgetrf.f b/2.3-1/src/fortran/lapack/zgetrf.f new file mode 100644 index 00000000..9c7bfbbf --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgetrf.f @@ -0,0 +1,159 @@ + SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, M, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZGETRF computes an LU factorization of a general M-by-N matrix A +* using partial pivoting with row interchanges. +* +* The factorization has the form +* A = P * L * U +* where P is a permutation matrix, L is lower triangular with unit +* diagonal elements (lower trapezoidal if m > n), and U is upper +* triangular (upper trapezoidal if m < n). +* +* This is the right-looking Level 3 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix to be factored. +* On exit, the factors L and U from the factorization +* A = P*L*U; the unit diagonal elements of L are not stored. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* IPIV (output) INTEGER array, dimension (min(M,N)) +* The pivot indices; for 1 <= i <= min(M,N), row i of the +* matrix was interchanged with row IPIV(i). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, U(i,i) is exactly zero. The factorization +* has been completed, but the factor U is exactly +* singular, and division by zero will occur if it is used +* to solve a system of equations. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, IINFO, J, JB, NB +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEMM, ZGETF2, ZLASWP, ZTRSM +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGETRF', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'ZGETRF', ' ', M, N, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN +* +* Use unblocked code. +* + CALL ZGETF2( M, N, A, LDA, IPIV, INFO ) + ELSE +* +* Use blocked code. +* + DO 20 J = 1, MIN( M, N ), NB + JB = MIN( MIN( M, N )-J+1, NB ) +* +* Factor diagonal and subdiagonal blocks and test for exact +* singularity. +* + CALL ZGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO ) +* +* Adjust INFO and the pivot indices. +* + IF( INFO.EQ.0 .AND. IINFO.GT.0 ) + $ INFO = IINFO + J - 1 + DO 10 I = J, MIN( M, J+JB-1 ) + IPIV( I ) = J - 1 + IPIV( I ) + 10 CONTINUE +* +* Apply interchanges to columns 1:J-1. +* + CALL ZLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 ) +* + IF( J+JB.LE.N ) THEN +* +* Apply interchanges to columns J+JB:N. +* + CALL ZLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1, + $ IPIV, 1 ) +* +* Compute block row of U. +* + CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB, + $ N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ), + $ LDA ) + IF( J+JB.LE.M ) THEN +* +* Update trailing submatrix. +* + CALL ZGEMM( 'No transpose', 'No transpose', M-J-JB+1, + $ N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA, + $ A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ), + $ LDA ) + END IF + END IF + 20 CONTINUE + END IF + RETURN +* +* End of ZGETRF +* + END diff --git a/2.3-1/src/fortran/lapack/zgetri.f b/2.3-1/src/fortran/lapack/zgetri.f new file mode 100644 index 00000000..685518e6 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgetri.f @@ -0,0 +1,193 @@ + SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + COMPLEX*16 A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGETRI computes the inverse of a matrix using the LU factorization +* computed by ZGETRF. +* +* This method inverts U and then computes inv(A) by solving the system +* inv(A)*L = inv(U) for inv(A). +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the factors L and U from the factorization +* A = P*L*U as computed by ZGETRF. +* On exit, if INFO = 0, the inverse of the original matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* The pivot indices from ZGETRF; for 1<=i<=N, row i of the +* matrix was interchanged with row IPIV(i). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO=0, then WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimal performance LWORK >= N*NB, where NB is +* the optimal blocksize returned by ILAENV. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, U(i,i) is exactly zero; the matrix is +* singular and its inverse could not be computed. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB, + $ NBMIN, NN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEMM, ZGEMV, ZSWAP, ZTRSM, ZTRTRI +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NB = ILAENV( 1, 'ZGETRI', ' ', N, -1, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -3 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGETRI', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Form inv(U). If INFO > 0 from ZTRTRI, then U is singular, +* and the inverse is not computed. +* + CALL ZTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO ) + IF( INFO.GT.0 ) + $ RETURN +* + NBMIN = 2 + LDWORK = N + IF( NB.GT.1 .AND. NB.LT.N ) THEN + IWS = MAX( LDWORK*NB, 1 ) + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZGETRI', ' ', N, -1, -1, -1 ) ) + END IF + ELSE + IWS = N + END IF +* +* Solve the equation inv(A)*L = inv(U) for inv(A). +* + IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN +* +* Use unblocked code. +* + DO 20 J = N, 1, -1 +* +* Copy current column of L to WORK and replace with zeros. +* + DO 10 I = J + 1, N + WORK( I ) = A( I, J ) + A( I, J ) = ZERO + 10 CONTINUE +* +* Compute current column of inv(A). +* + IF( J.LT.N ) + $ CALL ZGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ), + $ LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 ) + 20 CONTINUE + ELSE +* +* Use blocked code. +* + NN = ( ( N-1 ) / NB )*NB + 1 + DO 50 J = NN, 1, -NB + JB = MIN( NB, N-J+1 ) +* +* Copy current block column of L to WORK and replace with +* zeros. +* + DO 40 JJ = J, J + JB - 1 + DO 30 I = JJ + 1, N + WORK( I+( JJ-J )*LDWORK ) = A( I, JJ ) + A( I, JJ ) = ZERO + 30 CONTINUE + 40 CONTINUE +* +* Compute current block column of inv(A). +* + IF( J+JB.LE.N ) + $ CALL ZGEMM( 'No transpose', 'No transpose', N, JB, + $ N-J-JB+1, -ONE, A( 1, J+JB ), LDA, + $ WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA ) + CALL ZTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB, + $ ONE, WORK( J ), LDWORK, A( 1, J ), LDA ) + 50 CONTINUE + END IF +* +* Apply column interchanges. +* + DO 60 J = N - 1, 1, -1 + JP = IPIV( J ) + IF( JP.NE.J ) + $ CALL ZSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 ) + 60 CONTINUE +* + WORK( 1 ) = IWS + RETURN +* +* End of ZGETRI +* + END diff --git a/2.3-1/src/fortran/lapack/zgetrs.f b/2.3-1/src/fortran/lapack/zgetrs.f new file mode 100644 index 00000000..e32549cd --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgetrs.f @@ -0,0 +1,149 @@ + SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER INFO, LDA, LDB, N, NRHS +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + COMPLEX*16 A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* ZGETRS solves a system of linear equations +* A * X = B, A**T * X = B, or A**H * X = B +* with a general N-by-N matrix A using the LU factorization computed +* by ZGETRF. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* Specifies the form of the system of equations: +* = 'N': A * X = B (No transpose) +* = 'T': A**T * X = B (Transpose) +* = 'C': A**H * X = B (Conjugate transpose) +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* NRHS (input) INTEGER +* The number of right hand sides, i.e., the number of columns +* of the matrix B. NRHS >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The factors L and U from the factorization A = P*L*U +* as computed by ZGETRF. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* IPIV (input) INTEGER array, dimension (N) +* The pivot indices from ZGETRF; for 1<=i<=N, row i of the +* matrix was interchanged with row IPIV(i). +* +* B (input/output) COMPLEX*16 array, dimension (LDB,NRHS) +* On entry, the right hand side matrix B. +* On exit, the solution matrix X. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLASWP, ZTRSM +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + NOTRAN = LSAME( TRANS, 'N' ) + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( NRHS.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGETRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. NRHS.EQ.0 ) + $ RETURN +* + IF( NOTRAN ) THEN +* +* Solve A * X = B. +* +* Apply row interchanges to the right hand sides. +* + CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, 1 ) +* +* Solve L*X = B, overwriting B with X. +* + CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', N, NRHS, + $ ONE, A, LDA, B, LDB ) +* +* Solve U*X = B, overwriting B with X. +* + CALL ZTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N, + $ NRHS, ONE, A, LDA, B, LDB ) + ELSE +* +* Solve A**T * X = B or A**H * X = B. +* +* Solve U'*X = B, overwriting B with X. +* + CALL ZTRSM( 'Left', 'Upper', TRANS, 'Non-unit', N, NRHS, ONE, + $ A, LDA, B, LDB ) +* +* Solve L'*X = B, overwriting B with X. +* + CALL ZTRSM( 'Left', 'Lower', TRANS, 'Unit', N, NRHS, ONE, A, + $ LDA, B, LDB ) +* +* Apply row interchanges to the solution vectors. +* + CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, -1 ) + END IF +* + RETURN +* +* End of ZGETRS +* + END diff --git a/2.3-1/src/fortran/lapack/zggbak.f b/2.3-1/src/fortran/lapack/zggbak.f new file mode 100644 index 00000000..ad6dd032 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zggbak.f @@ -0,0 +1,220 @@ + SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V, + $ LDV, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB, SIDE + INTEGER IHI, ILO, INFO, LDV, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION LSCALE( * ), RSCALE( * ) + COMPLEX*16 V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* ZGGBAK forms the right or left eigenvectors of a complex generalized +* eigenvalue problem A*x = lambda*B*x, by backward transformation on +* the computed eigenvectors of the balanced pair of matrices output by +* ZGGBAL. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the type of backward transformation required: +* = 'N': do nothing, return immediately; +* = 'P': do backward transformation for permutation only; +* = 'S': do backward transformation for scaling only; +* = 'B': do backward transformations for both permutation and +* scaling. +* JOB must be the same as the argument JOB supplied to ZGGBAL. +* +* SIDE (input) CHARACTER*1 +* = 'R': V contains right eigenvectors; +* = 'L': V contains left eigenvectors. +* +* N (input) INTEGER +* The number of rows of the matrix V. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* The integers ILO and IHI determined by ZGGBAL. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* LSCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and/or scaling factors applied +* to the left side of A and B, as returned by ZGGBAL. +* +* RSCALE (input) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and/or scaling factors applied +* to the right side of A and B, as returned by ZGGBAL. +* +* M (input) INTEGER +* The number of columns of the matrix V. M >= 0. +* +* V (input/output) COMPLEX*16 array, dimension (LDV,M) +* On entry, the matrix of right or left eigenvectors to be +* transformed, as returned by ZTGEVC. +* On exit, V is overwritten by the transformed eigenvectors. +* +* LDV (input) INTEGER +* The leading dimension of the matrix V. LDV >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* See R.C. Ward, Balancing the generalized eigenvalue problem, +* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152. +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LEFTV, RIGHTV + INTEGER I, K +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZDSCAL, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + RIGHTV = LSAME( SIDE, 'R' ) + LEFTV = LSAME( SIDE, 'L' ) +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 ) THEN + INFO = -4 + ELSE IF( N.EQ.0 .AND. IHI.EQ.0 .AND. ILO.NE.1 ) THEN + INFO = -4 + ELSE IF( N.GT.0 .AND. ( IHI.LT.ILO .OR. IHI.GT.MAX( 1, N ) ) ) + $ THEN + INFO = -5 + ELSE IF( N.EQ.0 .AND. ILO.EQ.1 .AND. IHI.NE.0 ) THEN + INFO = -5 + ELSE IF( M.LT.0 ) THEN + INFO = -8 + ELSE IF( LDV.LT.MAX( 1, N ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGGBAK', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( M.EQ.0 ) + $ RETURN + IF( LSAME( JOB, 'N' ) ) + $ RETURN +* + IF( ILO.EQ.IHI ) + $ GO TO 30 +* +* Backward balance +* + IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN +* +* Backward transformation on right eigenvectors +* + IF( RIGHTV ) THEN + DO 10 I = ILO, IHI + CALL ZDSCAL( M, RSCALE( I ), V( I, 1 ), LDV ) + 10 CONTINUE + END IF +* +* Backward transformation on left eigenvectors +* + IF( LEFTV ) THEN + DO 20 I = ILO, IHI + CALL ZDSCAL( M, LSCALE( I ), V( I, 1 ), LDV ) + 20 CONTINUE + END IF + END IF +* +* Backward permutation +* + 30 CONTINUE + IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN +* +* Backward permutation on right eigenvectors +* + IF( RIGHTV ) THEN + IF( ILO.EQ.1 ) + $ GO TO 50 + DO 40 I = ILO - 1, 1, -1 + K = RSCALE( I ) + IF( K.EQ.I ) + $ GO TO 40 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 40 CONTINUE +* + 50 CONTINUE + IF( IHI.EQ.N ) + $ GO TO 70 + DO 60 I = IHI + 1, N + K = RSCALE( I ) + IF( K.EQ.I ) + $ GO TO 60 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 60 CONTINUE + END IF +* +* Backward permutation on left eigenvectors +* + 70 CONTINUE + IF( LEFTV ) THEN + IF( ILO.EQ.1 ) + $ GO TO 90 + DO 80 I = ILO - 1, 1, -1 + K = LSCALE( I ) + IF( K.EQ.I ) + $ GO TO 80 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 80 CONTINUE +* + 90 CONTINUE + IF( IHI.EQ.N ) + $ GO TO 110 + DO 100 I = IHI + 1, N + K = LSCALE( I ) + IF( K.EQ.I ) + $ GO TO 100 + CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV ) + 100 CONTINUE + END IF + END IF +* + 110 CONTINUE +* + RETURN +* +* End of ZGGBAK +* + END diff --git a/2.3-1/src/fortran/lapack/zggbal.f b/2.3-1/src/fortran/lapack/zggbal.f new file mode 100644 index 00000000..b75ae456 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zggbal.f @@ -0,0 +1,482 @@ + SUBROUTINE ZGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE, + $ RSCALE, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOB + INTEGER IHI, ILO, INFO, LDA, LDB, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION LSCALE( * ), RSCALE( * ), WORK( * ) + COMPLEX*16 A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* ZGGBAL balances a pair of general complex matrices (A,B). This +* involves, first, permuting A and B by similarity transformations to +* isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N +* elements on the diagonal; and second, applying a diagonal similarity +* transformation to rows and columns ILO to IHI to make the rows +* and columns as close in norm as possible. Both steps are optional. +* +* Balancing may reduce the 1-norm of the matrices, and improve the +* accuracy of the computed eigenvalues and/or eigenvectors in the +* generalized eigenvalue problem A*x = lambda*B*x. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies the operations to be performed on A and B: +* = 'N': none: simply set ILO = 1, IHI = N, LSCALE(I) = 1.0 +* and RSCALE(I) = 1.0 for i=1,...,N; +* = 'P': permute only; +* = 'S': scale only; +* = 'B': both permute and scale. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the input matrix A. +* On exit, A is overwritten by the balanced matrix. +* If JOB = 'N', A is not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension (LDB,N) +* On entry, the input matrix B. +* On exit, B is overwritten by the balanced matrix. +* If JOB = 'N', B is not referenced. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* ILO (output) INTEGER +* IHI (output) INTEGER +* ILO and IHI are set to integers such that on exit +* A(i,j) = 0 and B(i,j) = 0 if i > j and +* j = 1,...,ILO-1 or i = IHI+1,...,N. +* If JOB = 'N' or 'S', ILO = 1 and IHI = N. +* +* LSCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied +* to the left side of A and B. If P(j) is the index of the +* row interchanged with row j, and D(j) is the scaling factor +* applied to row j, then +* LSCALE(j) = P(j) for J = 1,...,ILO-1 +* = D(j) for J = ILO,...,IHI +* = P(j) for J = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* RSCALE (output) DOUBLE PRECISION array, dimension (N) +* Details of the permutations and scaling factors applied +* to the right side of A and B. If P(j) is the index of the +* column interchanged with column j, and D(j) is the scaling +* factor applied to column j, then +* RSCALE(j) = P(j) for J = 1,...,ILO-1 +* = D(j) for J = ILO,...,IHI +* = P(j) for J = IHI+1,...,N. +* The order in which the interchanges are made is N to IHI+1, +* then 1 to ILO-1. +* +* WORK (workspace) REAL array, dimension (lwork) +* lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and +* at least 1 when JOB = 'N' or 'P'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* See R.C. WARD, Balancing the generalized eigenvalue problem, +* SIAM J. Sci. Stat. Comp. 2 (1981), 141-152. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, HALF, ONE + PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION THREE, SCLFAC + PARAMETER ( THREE = 3.0D+0, SCLFAC = 1.0D+1 ) + COMPLEX*16 CZERO + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, ICAB, IFLOW, IP1, IR, IRAB, IT, J, JC, JP1, + $ K, KOUNT, L, LCAB, LM1, LRAB, LSFMAX, LSFMIN, + $ M, NR, NRP2 + DOUBLE PRECISION ALPHA, BASL, BETA, CAB, CMAX, COEF, COEF2, + $ COEF5, COR, EW, EWC, GAMMA, PGAMMA, RAB, SFMAX, + $ SFMIN, SUM, T, TA, TB, TC + COMPLEX*16 CDUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IZAMAX + DOUBLE PRECISION DDOT, DLAMCH + EXTERNAL LSAME, IZAMAX, DDOT, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DAXPY, DSCAL, XERBLA, ZDSCAL, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG, INT, LOG10, MAX, MIN, SIGN +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND. + $ .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGGBAL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + ILO = 1 + IHI = N + RETURN + END IF +* + IF( N.EQ.1 ) THEN + ILO = 1 + IHI = N + LSCALE( 1 ) = ONE + RSCALE( 1 ) = ONE + RETURN + END IF +* + IF( LSAME( JOB, 'N' ) ) THEN + ILO = 1 + IHI = N + DO 10 I = 1, N + LSCALE( I ) = ONE + RSCALE( I ) = ONE + 10 CONTINUE + RETURN + END IF +* + K = 1 + L = N + IF( LSAME( JOB, 'S' ) ) + $ GO TO 190 +* + GO TO 30 +* +* Permute the matrices A and B to isolate the eigenvalues. +* +* Find row with one nonzero in columns 1 through L +* + 20 CONTINUE + L = LM1 + IF( L.NE.1 ) + $ GO TO 30 +* + RSCALE( 1 ) = 1 + LSCALE( 1 ) = 1 + GO TO 190 +* + 30 CONTINUE + LM1 = L - 1 + DO 80 I = L, 1, -1 + DO 40 J = 1, LM1 + JP1 = J + 1 + IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO ) + $ GO TO 50 + 40 CONTINUE + J = L + GO TO 70 +* + 50 CONTINUE + DO 60 J = JP1, L + IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO ) + $ GO TO 80 + 60 CONTINUE + J = JP1 - 1 +* + 70 CONTINUE + M = L + IFLOW = 1 + GO TO 160 + 80 CONTINUE + GO TO 100 +* +* Find column with one nonzero in rows K through N +* + 90 CONTINUE + K = K + 1 +* + 100 CONTINUE + DO 150 J = K, L + DO 110 I = K, LM1 + IP1 = I + 1 + IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO ) + $ GO TO 120 + 110 CONTINUE + I = L + GO TO 140 + 120 CONTINUE + DO 130 I = IP1, L + IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO ) + $ GO TO 150 + 130 CONTINUE + I = IP1 - 1 + 140 CONTINUE + M = K + IFLOW = 2 + GO TO 160 + 150 CONTINUE + GO TO 190 +* +* Permute rows M and I +* + 160 CONTINUE + LSCALE( M ) = I + IF( I.EQ.M ) + $ GO TO 170 + CALL ZSWAP( N-K+1, A( I, K ), LDA, A( M, K ), LDA ) + CALL ZSWAP( N-K+1, B( I, K ), LDB, B( M, K ), LDB ) +* +* Permute columns M and J +* + 170 CONTINUE + RSCALE( M ) = J + IF( J.EQ.M ) + $ GO TO 180 + CALL ZSWAP( L, A( 1, J ), 1, A( 1, M ), 1 ) + CALL ZSWAP( L, B( 1, J ), 1, B( 1, M ), 1 ) +* + 180 CONTINUE + GO TO ( 20, 90 )IFLOW +* + 190 CONTINUE + ILO = K + IHI = L +* + IF( LSAME( JOB, 'P' ) ) THEN + DO 195 I = ILO, IHI + LSCALE( I ) = ONE + RSCALE( I ) = ONE + 195 CONTINUE + RETURN + END IF +* + IF( ILO.EQ.IHI ) + $ RETURN +* +* Balance the submatrix in rows ILO to IHI. +* + NR = IHI - ILO + 1 + DO 200 I = ILO, IHI + RSCALE( I ) = ZERO + LSCALE( I ) = ZERO +* + WORK( I ) = ZERO + WORK( I+N ) = ZERO + WORK( I+2*N ) = ZERO + WORK( I+3*N ) = ZERO + WORK( I+4*N ) = ZERO + WORK( I+5*N ) = ZERO + 200 CONTINUE +* +* Compute right side vector in resulting linear equations +* + BASL = LOG10( SCLFAC ) + DO 240 I = ILO, IHI + DO 230 J = ILO, IHI + IF( A( I, J ).EQ.CZERO ) THEN + TA = ZERO + GO TO 210 + END IF + TA = LOG10( CABS1( A( I, J ) ) ) / BASL +* + 210 CONTINUE + IF( B( I, J ).EQ.CZERO ) THEN + TB = ZERO + GO TO 220 + END IF + TB = LOG10( CABS1( B( I, J ) ) ) / BASL +* + 220 CONTINUE + WORK( I+4*N ) = WORK( I+4*N ) - TA - TB + WORK( J+5*N ) = WORK( J+5*N ) - TA - TB + 230 CONTINUE + 240 CONTINUE +* + COEF = ONE / DBLE( 2*NR ) + COEF2 = COEF*COEF + COEF5 = HALF*COEF2 + NRP2 = NR + 2 + BETA = ZERO + IT = 1 +* +* Start generalized conjugate gradient iteration +* + 250 CONTINUE +* + GAMMA = DDOT( NR, WORK( ILO+4*N ), 1, WORK( ILO+4*N ), 1 ) + + $ DDOT( NR, WORK( ILO+5*N ), 1, WORK( ILO+5*N ), 1 ) +* + EW = ZERO + EWC = ZERO + DO 260 I = ILO, IHI + EW = EW + WORK( I+4*N ) + EWC = EWC + WORK( I+5*N ) + 260 CONTINUE +* + GAMMA = COEF*GAMMA - COEF2*( EW**2+EWC**2 ) - COEF5*( EW-EWC )**2 + IF( GAMMA.EQ.ZERO ) + $ GO TO 350 + IF( IT.NE.1 ) + $ BETA = GAMMA / PGAMMA + T = COEF5*( EWC-THREE*EW ) + TC = COEF5*( EW-THREE*EWC ) +* + CALL DSCAL( NR, BETA, WORK( ILO ), 1 ) + CALL DSCAL( NR, BETA, WORK( ILO+N ), 1 ) +* + CALL DAXPY( NR, COEF, WORK( ILO+4*N ), 1, WORK( ILO+N ), 1 ) + CALL DAXPY( NR, COEF, WORK( ILO+5*N ), 1, WORK( ILO ), 1 ) +* + DO 270 I = ILO, IHI + WORK( I ) = WORK( I ) + TC + WORK( I+N ) = WORK( I+N ) + T + 270 CONTINUE +* +* Apply matrix to vector +* + DO 300 I = ILO, IHI + KOUNT = 0 + SUM = ZERO + DO 290 J = ILO, IHI + IF( A( I, J ).EQ.CZERO ) + $ GO TO 280 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( J ) + 280 CONTINUE + IF( B( I, J ).EQ.CZERO ) + $ GO TO 290 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( J ) + 290 CONTINUE + WORK( I+2*N ) = DBLE( KOUNT )*WORK( I+N ) + SUM + 300 CONTINUE +* + DO 330 J = ILO, IHI + KOUNT = 0 + SUM = ZERO + DO 320 I = ILO, IHI + IF( A( I, J ).EQ.CZERO ) + $ GO TO 310 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( I+N ) + 310 CONTINUE + IF( B( I, J ).EQ.CZERO ) + $ GO TO 320 + KOUNT = KOUNT + 1 + SUM = SUM + WORK( I+N ) + 320 CONTINUE + WORK( J+3*N ) = DBLE( KOUNT )*WORK( J ) + SUM + 330 CONTINUE +* + SUM = DDOT( NR, WORK( ILO+N ), 1, WORK( ILO+2*N ), 1 ) + + $ DDOT( NR, WORK( ILO ), 1, WORK( ILO+3*N ), 1 ) + ALPHA = GAMMA / SUM +* +* Determine correction to current iteration +* + CMAX = ZERO + DO 340 I = ILO, IHI + COR = ALPHA*WORK( I+N ) + IF( ABS( COR ).GT.CMAX ) + $ CMAX = ABS( COR ) + LSCALE( I ) = LSCALE( I ) + COR + COR = ALPHA*WORK( I ) + IF( ABS( COR ).GT.CMAX ) + $ CMAX = ABS( COR ) + RSCALE( I ) = RSCALE( I ) + COR + 340 CONTINUE + IF( CMAX.LT.HALF ) + $ GO TO 350 +* + CALL DAXPY( NR, -ALPHA, WORK( ILO+2*N ), 1, WORK( ILO+4*N ), 1 ) + CALL DAXPY( NR, -ALPHA, WORK( ILO+3*N ), 1, WORK( ILO+5*N ), 1 ) +* + PGAMMA = GAMMA + IT = IT + 1 + IF( IT.LE.NRP2 ) + $ GO TO 250 +* +* End generalized conjugate gradient iteration +* + 350 CONTINUE + SFMIN = DLAMCH( 'S' ) + SFMAX = ONE / SFMIN + LSFMIN = INT( LOG10( SFMIN ) / BASL+ONE ) + LSFMAX = INT( LOG10( SFMAX ) / BASL ) + DO 360 I = ILO, IHI + IRAB = IZAMAX( N-ILO+1, A( I, ILO ), LDA ) + RAB = ABS( A( I, IRAB+ILO-1 ) ) + IRAB = IZAMAX( N-ILO+1, B( I, ILO ), LDB ) + RAB = MAX( RAB, ABS( B( I, IRAB+ILO-1 ) ) ) + LRAB = INT( LOG10( RAB+SFMIN ) / BASL+ONE ) + IR = LSCALE( I ) + SIGN( HALF, LSCALE( I ) ) + IR = MIN( MAX( IR, LSFMIN ), LSFMAX, LSFMAX-LRAB ) + LSCALE( I ) = SCLFAC**IR + ICAB = IZAMAX( IHI, A( 1, I ), 1 ) + CAB = ABS( A( ICAB, I ) ) + ICAB = IZAMAX( IHI, B( 1, I ), 1 ) + CAB = MAX( CAB, ABS( B( ICAB, I ) ) ) + LCAB = INT( LOG10( CAB+SFMIN ) / BASL+ONE ) + JC = RSCALE( I ) + SIGN( HALF, RSCALE( I ) ) + JC = MIN( MAX( JC, LSFMIN ), LSFMAX, LSFMAX-LCAB ) + RSCALE( I ) = SCLFAC**JC + 360 CONTINUE +* +* Row scaling of matrices A and B +* + DO 370 I = ILO, IHI + CALL ZDSCAL( N-ILO+1, LSCALE( I ), A( I, ILO ), LDA ) + CALL ZDSCAL( N-ILO+1, LSCALE( I ), B( I, ILO ), LDB ) + 370 CONTINUE +* +* Column scaling of matrices A and B +* + DO 380 J = ILO, IHI + CALL ZDSCAL( IHI, RSCALE( J ), A( 1, J ), 1 ) + CALL ZDSCAL( IHI, RSCALE( J ), B( 1, J ), 1 ) + 380 CONTINUE +* + RETURN +* +* End of ZGGBAL +* + END diff --git a/2.3-1/src/fortran/lapack/zgges.f b/2.3-1/src/fortran/lapack/zgges.f new file mode 100644 index 00000000..c1499003 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgges.f @@ -0,0 +1,477 @@ + SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB, + $ SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK, + $ LWORK, RWORK, BWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVSL, JOBVSR, SORT + INTEGER INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM +* .. +* .. Array Arguments .. + LOGICAL BWORK( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ), + $ BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ), + $ WORK( * ) +* .. +* .. Function Arguments .. + LOGICAL SELCTG + EXTERNAL SELCTG +* .. +* +* Purpose +* ======= +* +* ZGGES computes for a pair of N-by-N complex nonsymmetric matrices +* (A,B), the generalized eigenvalues, the generalized complex Schur +* form (S, T), and optionally left and/or right Schur vectors (VSL +* and VSR). This gives the generalized Schur factorization +* +* (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H ) +* +* where (VSR)**H is the conjugate-transpose of VSR. +* +* Optionally, it also orders the eigenvalues so that a selected cluster +* of eigenvalues appears in the leading diagonal blocks of the upper +* triangular matrix S and the upper triangular matrix T. The leading +* columns of VSL and VSR then form an unitary basis for the +* corresponding left and right eigenspaces (deflating subspaces). +* +* (If only the generalized eigenvalues are needed, use the driver +* ZGGEV instead, which is faster.) +* +* A generalized eigenvalue for a pair of matrices (A,B) is a scalar w +* or a ratio alpha/beta = w, such that A - w*B is singular. It is +* usually represented as the pair (alpha,beta), as there is a +* reasonable interpretation for beta=0, and even for both being zero. +* +* A pair of matrices (S,T) is in generalized complex Schur form if S +* and T are upper triangular and, in addition, the diagonal elements +* of T are non-negative real numbers. +* +* Arguments +* ========= +* +* JOBVSL (input) CHARACTER*1 +* = 'N': do not compute the left Schur vectors; +* = 'V': compute the left Schur vectors. +* +* JOBVSR (input) CHARACTER*1 +* = 'N': do not compute the right Schur vectors; +* = 'V': compute the right Schur vectors. +* +* SORT (input) CHARACTER*1 +* Specifies whether or not to order the eigenvalues on the +* diagonal of the generalized Schur form. +* = 'N': Eigenvalues are not ordered; +* = 'S': Eigenvalues are ordered (see SELCTG). +* +* SELCTG (external procedure) LOGICAL FUNCTION of two COMPLEX*16 arguments +* SELCTG must be declared EXTERNAL in the calling subroutine. +* If SORT = 'N', SELCTG is not referenced. +* If SORT = 'S', SELCTG is used to select eigenvalues to sort +* to the top left of the Schur form. +* An eigenvalue ALPHA(j)/BETA(j) is selected if +* SELCTG(ALPHA(j),BETA(j)) is true. +* +* Note that a selected complex eigenvalue may no longer satisfy +* SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since +* ordering may change the value of complex eigenvalues +* (especially if the eigenvalue is ill-conditioned), in this +* case INFO is set to N+2 (See INFO below). +* +* N (input) INTEGER +* The order of the matrices A, B, VSL, and VSR. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA, N) +* On entry, the first of the pair of matrices. +* On exit, A has been overwritten by its generalized Schur +* form S. +* +* LDA (input) INTEGER +* The leading dimension of A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension (LDB, N) +* On entry, the second of the pair of matrices. +* On exit, B has been overwritten by its generalized Schur +* form T. +* +* LDB (input) INTEGER +* The leading dimension of B. LDB >= max(1,N). +* +* SDIM (output) INTEGER +* If SORT = 'N', SDIM = 0. +* If SORT = 'S', SDIM = number of eigenvalues (after sorting) +* for which SELCTG is true. +* +* ALPHA (output) COMPLEX*16 array, dimension (N) +* BETA (output) COMPLEX*16 array, dimension (N) +* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the +* generalized eigenvalues. ALPHA(j), j=1,...,N and BETA(j), +* j=1,...,N are the diagonals of the complex Schur form (A,B) +* output by ZGGES. The BETA(j) will be non-negative real. +* +* Note: the quotients ALPHA(j)/BETA(j) may easily over- or +* underflow, and BETA(j) may even be zero. Thus, the user +* should avoid naively computing the ratio alpha/beta. +* However, ALPHA will be always less than and usually +* comparable with norm(A) in magnitude, and BETA always less +* than and usually comparable with norm(B). +* +* VSL (output) COMPLEX*16 array, dimension (LDVSL,N) +* If JOBVSL = 'V', VSL will contain the left Schur vectors. +* Not referenced if JOBVSL = 'N'. +* +* LDVSL (input) INTEGER +* The leading dimension of the matrix VSL. LDVSL >= 1, and +* if JOBVSL = 'V', LDVSL >= N. +* +* VSR (output) COMPLEX*16 array, dimension (LDVSR,N) +* If JOBVSR = 'V', VSR will contain the right Schur vectors. +* Not referenced if JOBVSR = 'N'. +* +* LDVSR (input) INTEGER +* The leading dimension of the matrix VSR. LDVSR >= 1, and +* if JOBVSR = 'V', LDVSR >= N. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,2*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (8*N) +* +* BWORK (workspace) LOGICAL array, dimension (N) +* Not referenced if SORT = 'N'. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* =1,...,N: +* The QZ iteration failed. (A,B) are not in Schur +* form, but ALPHA(j) and BETA(j) should be correct for +* j=INFO+1,...,N. +* > N: =N+1: other than QZ iteration failed in ZHGEQZ +* =N+2: after reordering, roundoff changed values of +* some complex eigenvalues so that leading +* eigenvalues in the Generalized Schur form no +* longer satisfy SELCTG=.TRUE. This could also +* be caused due to scaling. +* =N+3: reordering falied in ZTGSEN. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + LOGICAL CURSL, ILASCL, ILBSCL, ILVSL, ILVSR, LASTSL, + $ LQUERY, WANTST + INTEGER I, ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT, + $ ILO, IRIGHT, IROWS, IRWRK, ITAU, IWRK, LWKMIN, + $ LWKOPT + DOUBLE PRECISION ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, PVSL, + $ PVSR, SMLNUM +* .. +* .. Local Arrays .. + INTEGER IDUM( 1 ) + DOUBLE PRECISION DIF( 2 ) +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZGEQRF, ZGGBAK, ZGGBAL, ZGGHRD, + $ ZHGEQZ, ZLACPY, ZLASCL, ZLASET, ZTGSEN, ZUNGQR, + $ ZUNMQR +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode the input arguments +* + IF( LSAME( JOBVSL, 'N' ) ) THEN + IJOBVL = 1 + ILVSL = .FALSE. + ELSE IF( LSAME( JOBVSL, 'V' ) ) THEN + IJOBVL = 2 + ILVSL = .TRUE. + ELSE + IJOBVL = -1 + ILVSL = .FALSE. + END IF +* + IF( LSAME( JOBVSR, 'N' ) ) THEN + IJOBVR = 1 + ILVSR = .FALSE. + ELSE IF( LSAME( JOBVSR, 'V' ) ) THEN + IJOBVR = 2 + ILVSR = .TRUE. + ELSE + IJOBVR = -1 + ILVSR = .FALSE. + END IF +* + WANTST = LSAME( SORT, 'S' ) +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( IJOBVL.LE.0 ) THEN + INFO = -1 + ELSE IF( IJOBVR.LE.0 ) THEN + INFO = -2 + ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDVSL.LT.1 .OR. ( ILVSL .AND. LDVSL.LT.N ) ) THEN + INFO = -14 + ELSE IF( LDVSR.LT.1 .OR. ( ILVSR .AND. LDVSR.LT.N ) ) THEN + INFO = -16 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV.) +* + IF( INFO.EQ.0 ) THEN + LWKMIN = MAX( 1, 2*N ) + LWKOPT = MAX( 1, N + N*ILAENV( 1, 'ZGEQRF', ' ', N, 1, N, 0 ) ) + LWKOPT = MAX( LWKOPT, N + + $ N*ILAENV( 1, 'ZUNMQR', ' ', N, 1, N, -1 ) ) + IF( ILVSL ) THEN + LWKOPT = MAX( LWKOPT, N + + $ N*ILAENV( 1, 'ZUNGQR', ' ', N, 1, N, -1 ) ) + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY ) + $ INFO = -18 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGGES ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + SDIM = 0 + RETURN + END IF +* +* Get machine constants +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', N, N, A, LDA, RWORK ) + ILASCL = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ANRMTO = SMLNUM + ILASCL = .TRUE. + ELSE IF( ANRM.GT.BIGNUM ) THEN + ANRMTO = BIGNUM + ILASCL = .TRUE. + END IF +* + IF( ILASCL ) + $ CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR ) +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = ZLANGE( 'M', N, N, B, LDB, RWORK ) + ILBSCL = .FALSE. + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN + BNRMTO = SMLNUM + ILBSCL = .TRUE. + ELSE IF( BNRM.GT.BIGNUM ) THEN + BNRMTO = BIGNUM + ILBSCL = .TRUE. + END IF +* + IF( ILBSCL ) + $ CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR ) +* +* Permute the matrix to make it more nearly triangular +* (Real Workspace: need 6*N) +* + ILEFT = 1 + IRIGHT = N + 1 + IRWRK = IRIGHT + N + CALL ZGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), RWORK( IRWRK ), IERR ) +* +* Reduce B to triangular form (QR decomposition of B) +* (Complex Workspace: need N, prefer N*NB) +* + IROWS = IHI + 1 - ILO + ICOLS = N + 1 - ILO + ITAU = 1 + IWRK = ITAU + IROWS + CALL ZGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ), + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) +* +* Apply the orthogonal transformation to matrix A +* (Complex Workspace: need N, prefer N*NB) +* + CALL ZUNMQR( 'L', 'C', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB, + $ WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ), + $ LWORK+1-IWRK, IERR ) +* +* Initialize VSL +* (Complex Workspace: need N, prefer N*NB) +* + IF( ILVSL ) THEN + CALL ZLASET( 'Full', N, N, CZERO, CONE, VSL, LDVSL ) + IF( IROWS.GT.1 ) THEN + CALL ZLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB, + $ VSL( ILO+1, ILO ), LDVSL ) + END IF + CALL ZUNGQR( IROWS, IROWS, IROWS, VSL( ILO, ILO ), LDVSL, + $ WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR ) + END IF +* +* Initialize VSR +* + IF( ILVSR ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, VSR, LDVSR ) +* +* Reduce to generalized Hessenberg form +* (Workspace: none needed) +* + CALL ZGGHRD( JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, VSL, + $ LDVSL, VSR, LDVSR, IERR ) +* + SDIM = 0 +* +* Perform QZ algorithm, computing Schur vectors if desired +* (Complex Workspace: need N) +* (Real Workspace: need N) +* + IWRK = ITAU + CALL ZHGEQZ( 'S', JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, + $ ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK( IWRK ), + $ LWORK+1-IWRK, RWORK( IRWRK ), IERR ) + IF( IERR.NE.0 ) THEN + IF( IERR.GT.0 .AND. IERR.LE.N ) THEN + INFO = IERR + ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN + INFO = IERR - N + ELSE + INFO = N + 1 + END IF + GO TO 30 + END IF +* +* Sort eigenvalues ALPHA/BETA if desired +* (Workspace: none needed) +* + IF( WANTST ) THEN +* +* Undo scaling on eigenvalues before selecting +* + IF( ILASCL ) + $ CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, 1, ALPHA, N, IERR ) + IF( ILBSCL ) + $ CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, 1, BETA, N, IERR ) +* +* Select eigenvalues +* + DO 10 I = 1, N + BWORK( I ) = SELCTG( ALPHA( I ), BETA( I ) ) + 10 CONTINUE +* + CALL ZTGSEN( 0, ILVSL, ILVSR, BWORK, N, A, LDA, B, LDB, ALPHA, + $ BETA, VSL, LDVSL, VSR, LDVSR, SDIM, PVSL, PVSR, + $ DIF, WORK( IWRK ), LWORK-IWRK+1, IDUM, 1, IERR ) + IF( IERR.EQ.1 ) + $ INFO = N + 3 +* + END IF +* +* Apply back-permutation to VSL and VSR +* (Workspace: none needed) +* + IF( ILVSL ) + $ CALL ZGGBAK( 'P', 'L', N, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), N, VSL, LDVSL, IERR ) + IF( ILVSR ) + $ CALL ZGGBAK( 'P', 'R', N, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), N, VSR, LDVSR, IERR ) +* +* Undo scaling +* + IF( ILASCL ) THEN + CALL ZLASCL( 'U', 0, 0, ANRMTO, ANRM, N, N, A, LDA, IERR ) + CALL ZLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHA, N, IERR ) + END IF +* + IF( ILBSCL ) THEN + CALL ZLASCL( 'U', 0, 0, BNRMTO, BNRM, N, N, B, LDB, IERR ) + CALL ZLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR ) + END IF +* + IF( WANTST ) THEN +* +* Check if reordering is correct +* + LASTSL = .TRUE. + SDIM = 0 + DO 20 I = 1, N + CURSL = SELCTG( ALPHA( I ), BETA( I ) ) + IF( CURSL ) + $ SDIM = SDIM + 1 + IF( CURSL .AND. .NOT.LASTSL ) + $ INFO = N + 2 + LASTSL = CURSL + 20 CONTINUE +* + END IF +* + 30 CONTINUE +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of ZGGES +* + END diff --git a/2.3-1/src/fortran/lapack/zggev.f b/2.3-1/src/fortran/lapack/zggev.f new file mode 100644 index 00000000..94fb3dc2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zggev.f @@ -0,0 +1,454 @@ + SUBROUTINE ZGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA, + $ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBVL, JOBVR + INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ), + $ BETA( * ), VL( LDVL, * ), VR( LDVR, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZGGEV computes for a pair of N-by-N complex nonsymmetric matrices +* (A,B), the generalized eigenvalues, and optionally, the left and/or +* right generalized eigenvectors. +* +* A generalized eigenvalue for a pair of matrices (A,B) is a scalar +* lambda or a ratio alpha/beta = lambda, such that A - lambda*B is +* singular. It is usually represented as the pair (alpha,beta), as +* there is a reasonable interpretation for beta=0, and even for both +* being zero. +* +* The right generalized eigenvector v(j) corresponding to the +* generalized eigenvalue lambda(j) of (A,B) satisfies +* +* A * v(j) = lambda(j) * B * v(j). +* +* The left generalized eigenvector u(j) corresponding to the +* generalized eigenvalues lambda(j) of (A,B) satisfies +* +* u(j)**H * A = lambda(j) * u(j)**H * B +* +* where u(j)**H is the conjugate-transpose of u(j). +* +* Arguments +* ========= +* +* JOBVL (input) CHARACTER*1 +* = 'N': do not compute the left generalized eigenvectors; +* = 'V': compute the left generalized eigenvectors. +* +* JOBVR (input) CHARACTER*1 +* = 'N': do not compute the right generalized eigenvectors; +* = 'V': compute the right generalized eigenvectors. +* +* N (input) INTEGER +* The order of the matrices A, B, VL, and VR. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA, N) +* On entry, the matrix A in the pair (A,B). +* On exit, A has been overwritten. +* +* LDA (input) INTEGER +* The leading dimension of A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension (LDB, N) +* On entry, the matrix B in the pair (A,B). +* On exit, B has been overwritten. +* +* LDB (input) INTEGER +* The leading dimension of B. LDB >= max(1,N). +* +* ALPHA (output) COMPLEX*16 array, dimension (N) +* BETA (output) COMPLEX*16 array, dimension (N) +* On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the +* generalized eigenvalues. +* +* Note: the quotients ALPHA(j)/BETA(j) may easily over- or +* underflow, and BETA(j) may even be zero. Thus, the user +* should avoid naively computing the ratio alpha/beta. +* However, ALPHA will be always less than and usually +* comparable with norm(A) in magnitude, and BETA always less +* than and usually comparable with norm(B). +* +* VL (output) COMPLEX*16 array, dimension (LDVL,N) +* If JOBVL = 'V', the left generalized eigenvectors u(j) are +* stored one after another in the columns of VL, in the same +* order as their eigenvalues. +* Each eigenvector is scaled so the largest component has +* abs(real part) + abs(imag. part) = 1. +* Not referenced if JOBVL = 'N'. +* +* LDVL (input) INTEGER +* The leading dimension of the matrix VL. LDVL >= 1, and +* if JOBVL = 'V', LDVL >= N. +* +* VR (output) COMPLEX*16 array, dimension (LDVR,N) +* If JOBVR = 'V', the right generalized eigenvectors v(j) are +* stored one after another in the columns of VR, in the same +* order as their eigenvalues. +* Each eigenvector is scaled so the largest component has +* abs(real part) + abs(imag. part) = 1. +* Not referenced if JOBVR = 'N'. +* +* LDVR (input) INTEGER +* The leading dimension of the matrix VR. LDVR >= 1, and +* if JOBVR = 'V', LDVR >= N. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,2*N). +* For good performance, LWORK must generally be larger. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace/output) DOUBLE PRECISION array, dimension (8*N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* =1,...,N: +* The QZ iteration failed. No eigenvectors have been +* calculated, but ALPHA(j) and BETA(j) should be +* correct for j=INFO+1,...,N. +* > N: =N+1: other then QZ iteration failed in DHGEQZ, +* =N+2: error return from DTGEVC. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + LOGICAL ILASCL, ILBSCL, ILV, ILVL, ILVR, LQUERY + CHARACTER CHTEMP + INTEGER ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT, ILO, + $ IN, IRIGHT, IROWS, IRWRK, ITAU, IWRK, JC, JR, + $ LWKMIN, LWKOPT + DOUBLE PRECISION ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, + $ SMLNUM, TEMP + COMPLEX*16 X +* .. +* .. Local Arrays .. + LOGICAL LDUMMA( 1 ) +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZGEQRF, ZGGBAK, ZGGBAL, ZGGHRD, + $ ZHGEQZ, ZLACPY, ZLASCL, ZLASET, ZTGEVC, ZUNGQR, + $ ZUNMQR +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANGE + EXTERNAL LSAME, ILAENV, DLAMCH, ZLANGE +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG, MAX, SQRT +* .. +* .. Statement Functions .. + DOUBLE PRECISION ABS1 +* .. +* .. Statement Function definitions .. + ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) ) +* .. +* .. Executable Statements .. +* +* Decode the input arguments +* + IF( LSAME( JOBVL, 'N' ) ) THEN + IJOBVL = 1 + ILVL = .FALSE. + ELSE IF( LSAME( JOBVL, 'V' ) ) THEN + IJOBVL = 2 + ILVL = .TRUE. + ELSE + IJOBVL = -1 + ILVL = .FALSE. + END IF +* + IF( LSAME( JOBVR, 'N' ) ) THEN + IJOBVR = 1 + ILVR = .FALSE. + ELSE IF( LSAME( JOBVR, 'V' ) ) THEN + IJOBVR = 2 + ILVR = .TRUE. + ELSE + IJOBVR = -1 + ILVR = .FALSE. + END IF + ILV = ILVL .OR. ILVR +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( IJOBVL.LE.0 ) THEN + INFO = -1 + ELSE IF( IJOBVR.LE.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDVL.LT.1 .OR. ( ILVL .AND. LDVL.LT.N ) ) THEN + INFO = -11 + ELSE IF( LDVR.LT.1 .OR. ( ILVR .AND. LDVR.LT.N ) ) THEN + INFO = -13 + END IF +* +* Compute workspace +* (Note: Comments in the code beginning "Workspace:" describe the +* minimal amount of workspace needed at that point in the code, +* as well as the preferred amount for good performance. +* NB refers to the optimal block size for the immediately +* following subroutine, as returned by ILAENV. The workspace is +* computed assuming ILO = 1 and IHI = N, the worst case.) +* + IF( INFO.EQ.0 ) THEN + LWKMIN = MAX( 1, 2*N ) + LWKOPT = MAX( 1, N + N*ILAENV( 1, 'ZGEQRF', ' ', N, 1, N, 0 ) ) + LWKOPT = MAX( LWKOPT, N + + $ N*ILAENV( 1, 'ZUNMQR', ' ', N, 1, N, 0 ) ) + IF( ILVL ) THEN + LWKOPT = MAX( LWKOPT, N + + $ N*ILAENV( 1, 'ZUNGQR', ' ', N, 1, N, -1 ) ) + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY ) + $ INFO = -15 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGGEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Get machine constants +* + EPS = DLAMCH( 'E' )*DLAMCH( 'B' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SQRT( SMLNUM ) / EPS + BIGNUM = ONE / SMLNUM +* +* Scale A if max element outside range [SMLNUM,BIGNUM] +* + ANRM = ZLANGE( 'M', N, N, A, LDA, RWORK ) + ILASCL = .FALSE. + IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN + ANRMTO = SMLNUM + ILASCL = .TRUE. + ELSE IF( ANRM.GT.BIGNUM ) THEN + ANRMTO = BIGNUM + ILASCL = .TRUE. + END IF + IF( ILASCL ) + $ CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR ) +* +* Scale B if max element outside range [SMLNUM,BIGNUM] +* + BNRM = ZLANGE( 'M', N, N, B, LDB, RWORK ) + ILBSCL = .FALSE. + IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN + BNRMTO = SMLNUM + ILBSCL = .TRUE. + ELSE IF( BNRM.GT.BIGNUM ) THEN + BNRMTO = BIGNUM + ILBSCL = .TRUE. + END IF + IF( ILBSCL ) + $ CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR ) +* +* Permute the matrices A, B to isolate eigenvalues if possible +* (Real Workspace: need 6*N) +* + ILEFT = 1 + IRIGHT = N + 1 + IRWRK = IRIGHT + N + CALL ZGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), RWORK( IRWRK ), IERR ) +* +* Reduce B to triangular form (QR decomposition of B) +* (Complex Workspace: need N, prefer N*NB) +* + IROWS = IHI + 1 - ILO + IF( ILV ) THEN + ICOLS = N + 1 - ILO + ELSE + ICOLS = IROWS + END IF + ITAU = 1 + IWRK = ITAU + IROWS + CALL ZGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ), + $ WORK( IWRK ), LWORK+1-IWRK, IERR ) +* +* Apply the orthogonal transformation to matrix A +* (Complex Workspace: need N, prefer N*NB) +* + CALL ZUNMQR( 'L', 'C', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB, + $ WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ), + $ LWORK+1-IWRK, IERR ) +* +* Initialize VL +* (Complex Workspace: need N, prefer N*NB) +* + IF( ILVL ) THEN + CALL ZLASET( 'Full', N, N, CZERO, CONE, VL, LDVL ) + IF( IROWS.GT.1 ) THEN + CALL ZLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB, + $ VL( ILO+1, ILO ), LDVL ) + END IF + CALL ZUNGQR( IROWS, IROWS, IROWS, VL( ILO, ILO ), LDVL, + $ WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR ) + END IF +* +* Initialize VR +* + IF( ILVR ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, VR, LDVR ) +* +* Reduce to generalized Hessenberg form +* + IF( ILV ) THEN +* +* Eigenvectors requested -- work on whole matrix. +* + CALL ZGGHRD( JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, VL, + $ LDVL, VR, LDVR, IERR ) + ELSE + CALL ZGGHRD( 'N', 'N', IROWS, 1, IROWS, A( ILO, ILO ), LDA, + $ B( ILO, ILO ), LDB, VL, LDVL, VR, LDVR, IERR ) + END IF +* +* Perform QZ algorithm (Compute eigenvalues, and optionally, the +* Schur form and Schur vectors) +* (Complex Workspace: need N) +* (Real Workspace: need N) +* + IWRK = ITAU + IF( ILV ) THEN + CHTEMP = 'S' + ELSE + CHTEMP = 'E' + END IF + CALL ZHGEQZ( CHTEMP, JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, + $ ALPHA, BETA, VL, LDVL, VR, LDVR, WORK( IWRK ), + $ LWORK+1-IWRK, RWORK( IRWRK ), IERR ) + IF( IERR.NE.0 ) THEN + IF( IERR.GT.0 .AND. IERR.LE.N ) THEN + INFO = IERR + ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN + INFO = IERR - N + ELSE + INFO = N + 1 + END IF + GO TO 70 + END IF +* +* Compute Eigenvectors +* (Real Workspace: need 2*N) +* (Complex Workspace: need 2*N) +* + IF( ILV ) THEN + IF( ILVL ) THEN + IF( ILVR ) THEN + CHTEMP = 'B' + ELSE + CHTEMP = 'L' + END IF + ELSE + CHTEMP = 'R' + END IF +* + CALL ZTGEVC( CHTEMP, 'B', LDUMMA, N, A, LDA, B, LDB, VL, LDVL, + $ VR, LDVR, N, IN, WORK( IWRK ), RWORK( IRWRK ), + $ IERR ) + IF( IERR.NE.0 ) THEN + INFO = N + 2 + GO TO 70 + END IF +* +* Undo balancing on VL and VR and normalization +* (Workspace: none needed) +* + IF( ILVL ) THEN + CALL ZGGBAK( 'P', 'L', N, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), N, VL, LDVL, IERR ) + DO 30 JC = 1, N + TEMP = ZERO + DO 10 JR = 1, N + TEMP = MAX( TEMP, ABS1( VL( JR, JC ) ) ) + 10 CONTINUE + IF( TEMP.LT.SMLNUM ) + $ GO TO 30 + TEMP = ONE / TEMP + DO 20 JR = 1, N + VL( JR, JC ) = VL( JR, JC )*TEMP + 20 CONTINUE + 30 CONTINUE + END IF + IF( ILVR ) THEN + CALL ZGGBAK( 'P', 'R', N, ILO, IHI, RWORK( ILEFT ), + $ RWORK( IRIGHT ), N, VR, LDVR, IERR ) + DO 60 JC = 1, N + TEMP = ZERO + DO 40 JR = 1, N + TEMP = MAX( TEMP, ABS1( VR( JR, JC ) ) ) + 40 CONTINUE + IF( TEMP.LT.SMLNUM ) + $ GO TO 60 + TEMP = ONE / TEMP + DO 50 JR = 1, N + VR( JR, JC ) = VR( JR, JC )*TEMP + 50 CONTINUE + 60 CONTINUE + END IF + END IF +* +* Undo scaling if necessary +* + IF( ILASCL ) + $ CALL ZLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHA, N, IERR ) +* + IF( ILBSCL ) + $ CALL ZLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR ) +* + 70 CONTINUE + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of ZGGEV +* + END diff --git a/2.3-1/src/fortran/lapack/zgghrd.f b/2.3-1/src/fortran/lapack/zgghrd.f new file mode 100644 index 00000000..652c09d7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zgghrd.f @@ -0,0 +1,264 @@ + SUBROUTINE ZGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q, + $ LDQ, Z, LDZ, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ, COMPZ + INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZGGHRD reduces a pair of complex matrices (A,B) to generalized upper +* Hessenberg form using unitary transformations, where A is a +* general matrix and B is upper triangular. The form of the +* generalized eigenvalue problem is +* A*x = lambda*B*x, +* and B is typically made upper triangular by computing its QR +* factorization and moving the unitary matrix Q to the left side +* of the equation. +* +* This subroutine simultaneously reduces A to a Hessenberg matrix H: +* Q**H*A*Z = H +* and transforms B to another upper triangular matrix T: +* Q**H*B*Z = T +* in order to reduce the problem to its standard form +* H*y = lambda*T*y +* where y = Z**H*x. +* +* The unitary matrices Q and Z are determined as products of Givens +* rotations. They may either be formed explicitly, or they may be +* postmultiplied into input matrices Q1 and Z1, so that +* Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H +* Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H +* If Q1 is the unitary matrix from the QR factorization of B in the +* original equation A*x = lambda*B*x, then ZGGHRD reduces the original +* problem to generalized Hessenberg form. +* +* Arguments +* ========= +* +* COMPQ (input) CHARACTER*1 +* = 'N': do not compute Q; +* = 'I': Q is initialized to the unit matrix, and the +* unitary matrix Q is returned; +* = 'V': Q must contain a unitary matrix Q1 on entry, +* and the product Q1*Q is returned. +* +* COMPZ (input) CHARACTER*1 +* = 'N': do not compute Q; +* = 'I': Q is initialized to the unit matrix, and the +* unitary matrix Q is returned; +* = 'V': Q must contain a unitary matrix Q1 on entry, +* and the product Q1*Q is returned. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI mark the rows and columns of A which are to be +* reduced. It is assumed that A is already upper triangular +* in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are +* normally set by a previous call to ZGGBAL; otherwise they +* should be set to 1 and N respectively. +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA, N) +* On entry, the N-by-N general matrix to be reduced. +* On exit, the upper triangle and the first subdiagonal of A +* are overwritten with the upper Hessenberg matrix H, and the +* rest is set to zero. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension (LDB, N) +* On entry, the N-by-N upper triangular matrix B. +* On exit, the upper triangular matrix T = Q**H B Z. The +* elements below the diagonal are set to zero. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) COMPLEX*16 array, dimension (LDQ, N) +* On entry, if COMPQ = 'V', the unitary matrix Q1, typically +* from the QR factorization of B. +* On exit, if COMPQ='I', the unitary matrix Q, and if +* COMPQ = 'V', the product Q1*Q. +* Not referenced if COMPQ='N'. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. +* LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', the unitary matrix Z1. +* On exit, if COMPZ='I', the unitary matrix Z, and if +* COMPZ = 'V', the product Z1*Z. +* Not referenced if COMPZ='N'. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. +* LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise. +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* This routine reduces A to Hessenberg and B to triangular form by +* an unblocked reduction, as described in _Matrix_Computations_, +* by Golub and van Loan (Johns Hopkins Press). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 CONE, CZERO + PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ), + $ CZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL ILQ, ILZ + INTEGER ICOMPQ, ICOMPZ, JCOL, JROW + DOUBLE PRECISION C + COMPLEX*16 CTEMP, S +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARTG, ZLASET, ZROT +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Decode COMPQ +* + IF( LSAME( COMPQ, 'N' ) ) THEN + ILQ = .FALSE. + ICOMPQ = 1 + ELSE IF( LSAME( COMPQ, 'V' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 2 + ELSE IF( LSAME( COMPQ, 'I' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 3 + ELSE + ICOMPQ = 0 + END IF +* +* Decode COMPZ +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ILZ = .FALSE. + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 2 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 3 + ELSE + ICOMPZ = 0 + END IF +* +* Test the input parameters. +* + INFO = 0 + IF( ICOMPQ.LE.0 ) THEN + INFO = -1 + ELSE IF( ICOMPZ.LE.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( ILO.LT.1 ) THEN + INFO = -4 + ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( ( ILQ .AND. LDQ.LT.N ) .OR. LDQ.LT.1 ) THEN + INFO = -11 + ELSE IF( ( ILZ .AND. LDZ.LT.N ) .OR. LDZ.LT.1 ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZGGHRD', -INFO ) + RETURN + END IF +* +* Initialize Q and Z if desired. +* + IF( ICOMPQ.EQ.3 ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, Q, LDQ ) + IF( ICOMPZ.EQ.3 ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ ) +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* +* Zero out lower triangle of B +* + DO 20 JCOL = 1, N - 1 + DO 10 JROW = JCOL + 1, N + B( JROW, JCOL ) = CZERO + 10 CONTINUE + 20 CONTINUE +* +* Reduce A and B +* + DO 40 JCOL = ILO, IHI - 2 +* + DO 30 JROW = IHI, JCOL + 2, -1 +* +* Step 1: rotate rows JROW-1, JROW to kill A(JROW,JCOL) +* + CTEMP = A( JROW-1, JCOL ) + CALL ZLARTG( CTEMP, A( JROW, JCOL ), C, S, + $ A( JROW-1, JCOL ) ) + A( JROW, JCOL ) = CZERO + CALL ZROT( N-JCOL, A( JROW-1, JCOL+1 ), LDA, + $ A( JROW, JCOL+1 ), LDA, C, S ) + CALL ZROT( N+2-JROW, B( JROW-1, JROW-1 ), LDB, + $ B( JROW, JROW-1 ), LDB, C, S ) + IF( ILQ ) + $ CALL ZROT( N, Q( 1, JROW-1 ), 1, Q( 1, JROW ), 1, C, + $ DCONJG( S ) ) +* +* Step 2: rotate columns JROW, JROW-1 to kill B(JROW,JROW-1) +* + CTEMP = B( JROW, JROW ) + CALL ZLARTG( CTEMP, B( JROW, JROW-1 ), C, S, + $ B( JROW, JROW ) ) + B( JROW, JROW-1 ) = CZERO + CALL ZROT( IHI, A( 1, JROW ), 1, A( 1, JROW-1 ), 1, C, S ) + CALL ZROT( JROW-1, B( 1, JROW ), 1, B( 1, JROW-1 ), 1, C, + $ S ) + IF( ILZ ) + $ CALL ZROT( N, Z( 1, JROW ), 1, Z( 1, JROW-1 ), 1, C, S ) + 30 CONTINUE + 40 CONTINUE +* + RETURN +* +* End of ZGGHRD +* + END diff --git a/2.3-1/src/fortran/lapack/zheev.f b/2.3-1/src/fortran/lapack/zheev.f new file mode 100644 index 00000000..324d1612 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zheev.f @@ -0,0 +1,218 @@ + SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, + $ INFO ) +* +* -- LAPACK driver routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER JOBZ, UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ), W( * ) + COMPLEX*16 A( LDA, * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZHEEV computes all eigenvalues and, optionally, eigenvectors of a +* complex Hermitian matrix A. +* +* Arguments +* ========= +* +* JOBZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only; +* = 'V': Compute eigenvalues and eigenvectors. +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA, N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the +* leading N-by-N upper triangular part of A contains the +* upper triangular part of the matrix A. If UPLO = 'L', +* the leading N-by-N lower triangular part of A contains +* the lower triangular part of the matrix A. +* On exit, if JOBZ = 'V', then if INFO = 0, A contains the +* orthonormal eigenvectors of the matrix A. +* If JOBZ = 'N', then on exit the lower triangle (if UPLO='L') +* or the upper triangle (if UPLO='U') of A, including the +* diagonal, is destroyed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* W (output) DOUBLE PRECISION array, dimension (N) +* If INFO = 0, the eigenvalues in ascending order. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The length of the array WORK. LWORK >= max(1,2*N-1). +* For optimal efficiency, LWORK >= (NB+1)*N, +* where NB is the blocksize for ZHETRD returned by ILAENV. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (max(1, 3*N-2)) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the algorithm failed to converge; i +* off-diagonal elements of an intermediate tridiagonal +* form did not converge to zero. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) + COMPLEX*16 CONE + PARAMETER ( CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LOWER, LQUERY, WANTZ + INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE, + $ LLWORK, LWKOPT, NB + DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, + $ SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + DOUBLE PRECISION DLAMCH, ZLANHE + EXTERNAL LSAME, ILAENV, DLAMCH, ZLANHE +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, DSTERF, XERBLA, ZHETRD, ZLASCL, ZSTEQR, + $ ZUNGTR +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + WANTZ = LSAME( JOBZ, 'V' ) + LOWER = LSAME( UPLO, 'L' ) + LQUERY = ( LWORK.EQ.-1 ) +* + INFO = 0 + IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN + INFO = -1 + ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF +* + IF( INFO.EQ.0 ) THEN + NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 ) + LWKOPT = MAX( 1, ( NB+1 )*N ) + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, 2*N-1 ) .AND. .NOT.LQUERY ) + $ INFO = -8 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHEEV ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + RETURN + END IF +* + IF( N.EQ.1 ) THEN + W( 1 ) = A( 1, 1 ) + WORK( 1 ) = 1 + IF( WANTZ ) + $ A( 1, 1 ) = CONE + RETURN + END IF +* +* Get machine constants. +* + SAFMIN = DLAMCH( 'Safe minimum' ) + EPS = DLAMCH( 'Precision' ) + SMLNUM = SAFMIN / EPS + BIGNUM = ONE / SMLNUM + RMIN = SQRT( SMLNUM ) + RMAX = SQRT( BIGNUM ) +* +* Scale matrix to allowable range, if necessary. +* + ANRM = ZLANHE( 'M', UPLO, N, A, LDA, RWORK ) + ISCALE = 0 + IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN + ISCALE = 1 + SIGMA = RMIN / ANRM + ELSE IF( ANRM.GT.RMAX ) THEN + ISCALE = 1 + SIGMA = RMAX / ANRM + END IF + IF( ISCALE.EQ.1 ) + $ CALL ZLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO ) +* +* Call ZHETRD to reduce Hermitian matrix to tridiagonal form. +* + INDE = 1 + INDTAU = 1 + INDWRK = INDTAU + N + LLWORK = LWORK - INDWRK + 1 + CALL ZHETRD( UPLO, N, A, LDA, W, RWORK( INDE ), WORK( INDTAU ), + $ WORK( INDWRK ), LLWORK, IINFO ) +* +* For eigenvalues only, call DSTERF. For eigenvectors, first call +* ZUNGTR to generate the unitary matrix, then call ZSTEQR. +* + IF( .NOT.WANTZ ) THEN + CALL DSTERF( N, W, RWORK( INDE ), INFO ) + ELSE + CALL ZUNGTR( UPLO, N, A, LDA, WORK( INDTAU ), WORK( INDWRK ), + $ LLWORK, IINFO ) + INDWRK = INDE + N + CALL ZSTEQR( JOBZ, N, W, RWORK( INDE ), A, LDA, + $ RWORK( INDWRK ), INFO ) + END IF +* +* If matrix was scaled, then rescale eigenvalues appropriately. +* + IF( ISCALE.EQ.1 ) THEN + IF( INFO.EQ.0 ) THEN + IMAX = N + ELSE + IMAX = INFO - 1 + END IF + CALL DSCAL( IMAX, ONE / SIGMA, W, 1 ) + END IF +* +* Set WORK(1) to optimal complex workspace size. +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of ZHEEV +* + END diff --git a/2.3-1/src/fortran/lapack/zhetd2.f b/2.3-1/src/fortran/lapack/zhetd2.f new file mode 100644 index 00000000..24b0a1df --- /dev/null +++ b/2.3-1/src/fortran/lapack/zhetd2.f @@ -0,0 +1,258 @@ + SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) + COMPLEX*16 A( LDA, * ), TAU( * ) +* .. +* +* Purpose +* ======= +* +* ZHETD2 reduces a complex Hermitian matrix A to real symmetric +* tridiagonal form T by a unitary similarity transformation: +* Q' * A * Q = T. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* Hermitian matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit, if UPLO = 'U', the diagonal and first superdiagonal +* of A are overwritten by the corresponding elements of the +* tridiagonal matrix T, and the elements above the first +* superdiagonal, with the array TAU, represent the unitary +* matrix Q as a product of elementary reflectors; if UPLO +* = 'L', the diagonal and first subdiagonal of A are over- +* written by the corresponding elements of the tridiagonal +* matrix T, and the elements below the first subdiagonal, with +* the array TAU, represent the unitary matrix Q as a product +* of elementary reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* D (output) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of the tridiagonal matrix T: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* The off-diagonal elements of the tridiagonal matrix T: +* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. +* +* TAU (output) COMPLEX*16 array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n-1) . . . H(2) H(1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in +* A(1:i-1,i+1), and tau in TAU(i). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(n-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), +* and tau in TAU(i). +* +* The contents of A on exit are illustrated by the following examples +* with n = 5: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( d e v2 v3 v4 ) ( d ) +* ( d e v3 v4 ) ( e d ) +* ( d e v4 ) ( v1 e d ) +* ( d e ) ( v1 v2 e d ) +* ( d ) ( v1 v2 v3 e d ) +* +* where d and e denote diagonal and off-diagonal elements of T, and vi +* denotes an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO, HALF + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ), + $ HALF = ( 0.5D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER I + COMPLEX*16 ALPHA, TAUI +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZAXPY, ZHEMV, ZHER2, ZLARFG +* .. +* .. External Functions .. + LOGICAL LSAME + COMPLEX*16 ZDOTC + EXTERNAL LSAME, ZDOTC +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHETD2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Reduce the upper triangle of A +* + A( N, N ) = DBLE( A( N, N ) ) + DO 10 I = N - 1, 1, -1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(1:i-1,i+1) +* + ALPHA = A( I, I+1 ) + CALL ZLARFG( I, ALPHA, A( 1, I+1 ), 1, TAUI ) + E( I ) = ALPHA +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(1:i,1:i) +* + A( I, I+1 ) = ONE +* +* Compute x := tau * A * v storing x in TAU(1:i) +* + CALL ZHEMV( UPLO, I, TAUI, A, LDA, A( 1, I+1 ), 1, ZERO, + $ TAU, 1 ) +* +* Compute w := x - 1/2 * tau * (x'*v) * v +* + ALPHA = -HALF*TAUI*ZDOTC( I, TAU, 1, A( 1, I+1 ), 1 ) + CALL ZAXPY( I, ALPHA, A( 1, I+1 ), 1, TAU, 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL ZHER2( UPLO, I, -ONE, A( 1, I+1 ), 1, TAU, 1, A, + $ LDA ) +* + ELSE + A( I, I ) = DBLE( A( I, I ) ) + END IF + A( I, I+1 ) = E( I ) + D( I+1 ) = A( I+1, I+1 ) + TAU( I ) = TAUI + 10 CONTINUE + D( 1 ) = A( 1, 1 ) + ELSE +* +* Reduce the lower triangle of A +* + A( 1, 1 ) = DBLE( A( 1, 1 ) ) + DO 20 I = 1, N - 1 +* +* Generate elementary reflector H(i) = I - tau * v * v' +* to annihilate A(i+2:n,i) +* + ALPHA = A( I+1, I ) + CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1, TAUI ) + E( I ) = ALPHA +* + IF( TAUI.NE.ZERO ) THEN +* +* Apply H(i) from both sides to A(i+1:n,i+1:n) +* + A( I+1, I ) = ONE +* +* Compute x := tau * A * v storing y in TAU(i:n-1) +* + CALL ZHEMV( UPLO, N-I, TAUI, A( I+1, I+1 ), LDA, + $ A( I+1, I ), 1, ZERO, TAU( I ), 1 ) +* +* Compute w := x - 1/2 * tau * (x'*v) * v +* + ALPHA = -HALF*TAUI*ZDOTC( N-I, TAU( I ), 1, A( I+1, I ), + $ 1 ) + CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, TAU( I ), 1 ) +* +* Apply the transformation as a rank-2 update: +* A := A - v * w' - w * v' +* + CALL ZHER2( UPLO, N-I, -ONE, A( I+1, I ), 1, TAU( I ), 1, + $ A( I+1, I+1 ), LDA ) +* + ELSE + A( I+1, I+1 ) = DBLE( A( I+1, I+1 ) ) + END IF + A( I+1, I ) = E( I ) + D( I ) = A( I, I ) + TAU( I ) = TAUI + 20 CONTINUE + D( N ) = A( N, N ) + END IF +* + RETURN +* +* End of ZHETD2 +* + END diff --git a/2.3-1/src/fortran/lapack/zhetrd.f b/2.3-1/src/fortran/lapack/zhetrd.f new file mode 100644 index 00000000..fb0cd0b2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zhetrd.f @@ -0,0 +1,296 @@ + SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ) + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZHETRD reduces a complex Hermitian matrix A to real symmetric +* tridiagonal form T by a unitary similarity transformation: +* Q**H * A * Q = T. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit, if UPLO = 'U', the diagonal and first superdiagonal +* of A are overwritten by the corresponding elements of the +* tridiagonal matrix T, and the elements above the first +* superdiagonal, with the array TAU, represent the unitary +* matrix Q as a product of elementary reflectors; if UPLO +* = 'L', the diagonal and first subdiagonal of A are over- +* written by the corresponding elements of the tridiagonal +* matrix T, and the elements below the first subdiagonal, with +* the array TAU, represent the unitary matrix Q as a product +* of elementary reflectors. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* D (output) DOUBLE PRECISION array, dimension (N) +* The diagonal elements of the tridiagonal matrix T: +* D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* The off-diagonal elements of the tridiagonal matrix T: +* E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'. +* +* TAU (output) COMPLEX*16 array, dimension (N-1) +* The scalar factors of the elementary reflectors (see Further +* Details). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 1. +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n-1) . . . H(2) H(1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in +* A(1:i-1,i+1), and tau in TAU(i). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(n-1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i), +* and tau in TAU(i). +* +* The contents of A on exit are illustrated by the following examples +* with n = 5: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( d e v2 v3 v4 ) ( d ) +* ( d e v3 v4 ) ( e d ) +* ( d e v4 ) ( v1 e d ) +* ( d e ) ( v1 v2 e d ) +* ( d ) ( v1 v2 v3 e d ) +* +* where d and e denote diagonal and off-diagonal elements of T, and vi +* denotes an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) + COMPLEX*16 CONE + PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, UPPER + INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZHER2K, ZHETD2, ZLATRD +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN + INFO = -9 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. +* + NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 ) + LWKOPT = N*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHETRD', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NX = N + IWS = 1 + IF( NB.GT.1 .AND. NB.LT.N ) THEN +* +* Determine when to cross over from blocked to unblocked code +* (last block is always handled by unblocked code). +* + NX = MAX( NB, ILAENV( 3, 'ZHETRD', UPLO, N, -1, -1, -1 ) ) + IF( NX.LT.N ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: determine the +* minimum value of NB, and reduce NB or force use of +* unblocked code by setting NX = N. +* + NB = MAX( LWORK / LDWORK, 1 ) + NBMIN = ILAENV( 2, 'ZHETRD', UPLO, N, -1, -1, -1 ) + IF( NB.LT.NBMIN ) + $ NX = N + END IF + ELSE + NX = N + END IF + ELSE + NB = 1 + END IF +* + IF( UPPER ) THEN +* +* Reduce the upper triangle of A. +* Columns 1:kk are handled by the unblocked method. +* + KK = N - ( ( N-NX+NB-1 ) / NB )*NB + DO 20 I = N - NB + 1, KK + 1, -NB +* +* Reduce columns i:i+nb-1 to tridiagonal form and form the +* matrix W which is needed to update the unreduced part of +* the matrix +* + CALL ZLATRD( UPLO, I+NB-1, NB, A, LDA, E, TAU, WORK, + $ LDWORK ) +* +* Update the unreduced submatrix A(1:i-1,1:i-1), using an +* update of the form: A := A - V*W' - W*V' +* + CALL ZHER2K( UPLO, 'No transpose', I-1, NB, -CONE, + $ A( 1, I ), LDA, WORK, LDWORK, ONE, A, LDA ) +* +* Copy superdiagonal elements back into A, and diagonal +* elements into D +* + DO 10 J = I, I + NB - 1 + A( J-1, J ) = E( J-1 ) + D( J ) = A( J, J ) + 10 CONTINUE + 20 CONTINUE +* +* Use unblocked code to reduce the last or only block +* + CALL ZHETD2( UPLO, KK, A, LDA, D, E, TAU, IINFO ) + ELSE +* +* Reduce the lower triangle of A +* + DO 40 I = 1, N - NX, NB +* +* Reduce columns i:i+nb-1 to tridiagonal form and form the +* matrix W which is needed to update the unreduced part of +* the matrix +* + CALL ZLATRD( UPLO, N-I+1, NB, A( I, I ), LDA, E( I ), + $ TAU( I ), WORK, LDWORK ) +* +* Update the unreduced submatrix A(i+nb:n,i+nb:n), using +* an update of the form: A := A - V*W' - W*V' +* + CALL ZHER2K( UPLO, 'No transpose', N-I-NB+1, NB, -CONE, + $ A( I+NB, I ), LDA, WORK( NB+1 ), LDWORK, ONE, + $ A( I+NB, I+NB ), LDA ) +* +* Copy subdiagonal elements back into A, and diagonal +* elements into D +* + DO 30 J = I, I + NB - 1 + A( J+1, J ) = E( J ) + D( J ) = A( J, J ) + 30 CONTINUE + 40 CONTINUE +* +* Use unblocked code to reduce the last or only block +* + CALL ZHETD2( UPLO, N-I+1, A( I, I ), LDA, D( I ), E( I ), + $ TAU( I ), IINFO ) + END IF +* + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZHETRD +* + END diff --git a/2.3-1/src/fortran/lapack/zhgeqz.f b/2.3-1/src/fortran/lapack/zhgeqz.f new file mode 100644 index 00000000..6a9403bd --- /dev/null +++ b/2.3-1/src/fortran/lapack/zhgeqz.f @@ -0,0 +1,759 @@ + SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT, + $ ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK, + $ RWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ, COMPZ, JOB + INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 ALPHA( * ), BETA( * ), H( LDH, * ), + $ Q( LDQ, * ), T( LDT, * ), WORK( * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZHGEQZ computes the eigenvalues of a complex matrix pair (H,T), +* where H is an upper Hessenberg matrix and T is upper triangular, +* using the single-shift QZ method. +* Matrix pairs of this type are produced by the reduction to +* generalized upper Hessenberg form of a complex matrix pair (A,B): +* +* A = Q1*H*Z1**H, B = Q1*T*Z1**H, +* +* as computed by ZGGHRD. +* +* If JOB='S', then the Hessenberg-triangular pair (H,T) is +* also reduced to generalized Schur form, +* +* H = Q*S*Z**H, T = Q*P*Z**H, +* +* where Q and Z are unitary matrices and S and P are upper triangular. +* +* Optionally, the unitary matrix Q from the generalized Schur +* factorization may be postmultiplied into an input matrix Q1, and the +* unitary matrix Z may be postmultiplied into an input matrix Z1. +* If Q1 and Z1 are the unitary matrices from ZGGHRD that reduced +* the matrix pair (A,B) to generalized Hessenberg form, then the output +* matrices Q1*Q and Z1*Z are the unitary factors from the generalized +* Schur factorization of (A,B): +* +* A = (Q1*Q)*S*(Z1*Z)**H, B = (Q1*Q)*P*(Z1*Z)**H. +* +* To avoid overflow, eigenvalues of the matrix pair (H,T) +* (equivalently, of (A,B)) are computed as a pair of complex values +* (alpha,beta). If beta is nonzero, lambda = alpha / beta is an +* eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP) +* A*x = lambda*B*x +* and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the +* alternate form of the GNEP +* mu*A*y = B*y. +* The values of alpha and beta for the i-th eigenvalue can be read +* directly from the generalized Schur form: alpha = S(i,i), +* beta = P(i,i). +* +* Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix +* Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973), +* pp. 241--256. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* = 'E': Compute eigenvalues only; +* = 'S': Computer eigenvalues and the Schur form. +* +* COMPQ (input) CHARACTER*1 +* = 'N': Left Schur vectors (Q) are not computed; +* = 'I': Q is initialized to the unit matrix and the matrix Q +* of left Schur vectors of (H,T) is returned; +* = 'V': Q must contain a unitary matrix Q1 on entry and +* the product Q1*Q is returned. +* +* COMPZ (input) CHARACTER*1 +* = 'N': Right Schur vectors (Z) are not computed; +* = 'I': Q is initialized to the unit matrix and the matrix Z +* of right Schur vectors of (H,T) is returned; +* = 'V': Z must contain a unitary matrix Z1 on entry and +* the product Z1*Z is returned. +* +* N (input) INTEGER +* The order of the matrices H, T, Q, and Z. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI mark the rows and columns of H which are in +* Hessenberg form. It is assumed that A is already upper +* triangular in rows and columns 1:ILO-1 and IHI+1:N. +* If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0. +* +* H (input/output) COMPLEX*16 array, dimension (LDH, N) +* On entry, the N-by-N upper Hessenberg matrix H. +* On exit, if JOB = 'S', H contains the upper triangular +* matrix S from the generalized Schur factorization. +* If JOB = 'E', the diagonal of H matches that of S, but +* the rest of H is unspecified. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH >= max( 1, N ). +* +* T (input/output) COMPLEX*16 array, dimension (LDT, N) +* On entry, the N-by-N upper triangular matrix T. +* On exit, if JOB = 'S', T contains the upper triangular +* matrix P from the generalized Schur factorization. +* If JOB = 'E', the diagonal of T matches that of P, but +* the rest of T is unspecified. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max( 1, N ). +* +* ALPHA (output) COMPLEX*16 array, dimension (N) +* The complex scalars alpha that define the eigenvalues of +* GNEP. ALPHA(i) = S(i,i) in the generalized Schur +* factorization. +* +* BETA (output) COMPLEX*16 array, dimension (N) +* The real non-negative scalars beta that define the +* eigenvalues of GNEP. BETA(i) = P(i,i) in the generalized +* Schur factorization. +* +* Together, the quantities alpha = ALPHA(j) and beta = BETA(j) +* represent the j-th eigenvalue of the matrix pair (A,B), in +* one of the forms lambda = alpha/beta or mu = beta/alpha. +* Since either lambda or mu may overflow, they should not, +* in general, be computed. +* +* Q (input/output) COMPLEX*16 array, dimension (LDQ, N) +* On entry, if COMPZ = 'V', the unitary matrix Q1 used in the +* reduction of (A,B) to generalized Hessenberg form. +* On exit, if COMPZ = 'I', the unitary matrix of left Schur +* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of +* left Schur vectors of (A,B). +* Not referenced if COMPZ = 'N'. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1. +* If COMPQ='V' or 'I', then LDQ >= N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', the unitary matrix Z1 used in the +* reduction of (A,B) to generalized Hessenberg form. +* On exit, if COMPZ = 'I', the unitary matrix of right Schur +* vectors of (H,T), and if COMPZ = 'V', the unitary matrix of +* right Schur vectors of (A,B). +* Not referenced if COMPZ = 'N'. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1. +* If COMPZ='V' or 'I', then LDZ >= N. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO >= 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1,...,N: the QZ iteration did not converge. (H,T) is not +* in Schur form, but ALPHA(i) and BETA(i), +* i=INFO+1,...,N should be correct. +* = N+1,...,2*N: the shift calculation failed. (H,T) is not +* in Schur form, but ALPHA(i) and BETA(i), +* i=INFO-N+1,...,N should be correct. +* +* Further Details +* =============== +* +* We assume that complex ABS works as long as its value is less than +* overflow. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ), + $ CONE = ( 1.0D+0, 0.0D+0 ) ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + DOUBLE PRECISION HALF + PARAMETER ( HALF = 0.5D+0 ) +* .. +* .. Local Scalars .. + LOGICAL ILAZR2, ILAZRO, ILQ, ILSCHR, ILZ, LQUERY + INTEGER ICOMPQ, ICOMPZ, IFIRST, IFRSTM, IITER, ILAST, + $ ILASTM, IN, ISCHUR, ISTART, J, JC, JCH, JITER, + $ JR, MAXIT + DOUBLE PRECISION ABSB, ANORM, ASCALE, ATOL, BNORM, BSCALE, BTOL, + $ C, SAFMIN, TEMP, TEMP2, TEMPR, ULP + COMPLEX*16 ABI22, AD11, AD12, AD21, AD22, CTEMP, CTEMP2, + $ CTEMP3, ESHIFT, RTDISC, S, SHIFT, SIGNBC, T1, + $ U12, X +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, ZLANHS + EXTERNAL LSAME, DLAMCH, ZLANHS +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARTG, ZLASET, ZROT, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN, + $ SQRT +* .. +* .. Statement Functions .. + DOUBLE PRECISION ABS1 +* .. +* .. Statement Function definitions .. + ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) ) +* .. +* .. Executable Statements .. +* +* Decode JOB, COMPQ, COMPZ +* + IF( LSAME( JOB, 'E' ) ) THEN + ILSCHR = .FALSE. + ISCHUR = 1 + ELSE IF( LSAME( JOB, 'S' ) ) THEN + ILSCHR = .TRUE. + ISCHUR = 2 + ELSE + ISCHUR = 0 + END IF +* + IF( LSAME( COMPQ, 'N' ) ) THEN + ILQ = .FALSE. + ICOMPQ = 1 + ELSE IF( LSAME( COMPQ, 'V' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 2 + ELSE IF( LSAME( COMPQ, 'I' ) ) THEN + ILQ = .TRUE. + ICOMPQ = 3 + ELSE + ICOMPQ = 0 + END IF +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ILZ = .FALSE. + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 2 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ILZ = .TRUE. + ICOMPZ = 3 + ELSE + ICOMPZ = 0 + END IF +* +* Check Argument Values +* + INFO = 0 + WORK( 1 ) = MAX( 1, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( ISCHUR.EQ.0 ) THEN + INFO = -1 + ELSE IF( ICOMPQ.EQ.0 ) THEN + INFO = -2 + ELSE IF( ICOMPZ.EQ.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( ILO.LT.1 ) THEN + INFO = -5 + ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN + INFO = -6 + ELSE IF( LDH.LT.N ) THEN + INFO = -8 + ELSE IF( LDT.LT.N ) THEN + INFO = -10 + ELSE IF( LDQ.LT.1 .OR. ( ILQ .AND. LDQ.LT.N ) ) THEN + INFO = -14 + ELSE IF( LDZ.LT.1 .OR. ( ILZ .AND. LDZ.LT.N ) ) THEN + INFO = -16 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -18 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZHGEQZ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* +* WORK( 1 ) = CMPLX( 1 ) + IF( N.LE.0 ) THEN + WORK( 1 ) = DCMPLX( 1 ) + RETURN + END IF +* +* Initialize Q and Z +* + IF( ICOMPQ.EQ.3 ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, Q, LDQ ) + IF( ICOMPZ.EQ.3 ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ ) +* +* Machine Constants +* + IN = IHI + 1 - ILO + SAFMIN = DLAMCH( 'S' ) + ULP = DLAMCH( 'E' )*DLAMCH( 'B' ) + ANORM = ZLANHS( 'F', IN, H( ILO, ILO ), LDH, RWORK ) + BNORM = ZLANHS( 'F', IN, T( ILO, ILO ), LDT, RWORK ) + ATOL = MAX( SAFMIN, ULP*ANORM ) + BTOL = MAX( SAFMIN, ULP*BNORM ) + ASCALE = ONE / MAX( SAFMIN, ANORM ) + BSCALE = ONE / MAX( SAFMIN, BNORM ) +* +* +* Set Eigenvalues IHI+1:N +* + DO 10 J = IHI + 1, N + ABSB = ABS( T( J, J ) ) + IF( ABSB.GT.SAFMIN ) THEN + SIGNBC = DCONJG( T( J, J ) / ABSB ) + T( J, J ) = ABSB + IF( ILSCHR ) THEN + CALL ZSCAL( J-1, SIGNBC, T( 1, J ), 1 ) + CALL ZSCAL( J, SIGNBC, H( 1, J ), 1 ) + ELSE + H( J, J ) = H( J, J )*SIGNBC + END IF + IF( ILZ ) + $ CALL ZSCAL( N, SIGNBC, Z( 1, J ), 1 ) + ELSE + T( J, J ) = CZERO + END IF + ALPHA( J ) = H( J, J ) + BETA( J ) = T( J, J ) + 10 CONTINUE +* +* If IHI < ILO, skip QZ steps +* + IF( IHI.LT.ILO ) + $ GO TO 190 +* +* MAIN QZ ITERATION LOOP +* +* Initialize dynamic indices +* +* Eigenvalues ILAST+1:N have been found. +* Column operations modify rows IFRSTM:whatever +* Row operations modify columns whatever:ILASTM +* +* If only eigenvalues are being computed, then +* IFRSTM is the row of the last splitting row above row ILAST; +* this is always at least ILO. +* IITER counts iterations since the last eigenvalue was found, +* to tell when to use an extraordinary shift. +* MAXIT is the maximum number of QZ sweeps allowed. +* + ILAST = IHI + IF( ILSCHR ) THEN + IFRSTM = 1 + ILASTM = N + ELSE + IFRSTM = ILO + ILASTM = IHI + END IF + IITER = 0 + ESHIFT = CZERO + MAXIT = 30*( IHI-ILO+1 ) +* + DO 170 JITER = 1, MAXIT +* +* Check for too many iterations. +* + IF( JITER.GT.MAXIT ) + $ GO TO 180 +* +* Split the matrix if possible. +* +* Two tests: +* 1: H(j,j-1)=0 or j=ILO +* 2: T(j,j)=0 +* +* Special case: j=ILAST +* + IF( ILAST.EQ.ILO ) THEN + GO TO 60 + ELSE + IF( ABS1( H( ILAST, ILAST-1 ) ).LE.ATOL ) THEN + H( ILAST, ILAST-1 ) = CZERO + GO TO 60 + END IF + END IF +* + IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN + T( ILAST, ILAST ) = CZERO + GO TO 50 + END IF +* +* General case: j= n, A is reduced to upper bidiagonal form; if m < n, to lower +* bidiagonal form. +* +* This is an auxiliary routine called by ZGEBRD +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows in the matrix A. +* +* N (input) INTEGER +* The number of columns in the matrix A. +* +* NB (input) INTEGER +* The number of leading rows and columns of A to be reduced. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n general matrix to be reduced. +* On exit, the first NB rows and columns of the matrix are +* overwritten; the rest of the array is unchanged. +* If m >= n, elements on and below the diagonal in the first NB +* columns, with the array TAUQ, represent the unitary +* matrix Q as a product of elementary reflectors; and +* elements above the diagonal in the first NB rows, with the +* array TAUP, represent the unitary matrix P as a product +* of elementary reflectors. +* If m < n, elements below the diagonal in the first NB +* columns, with the array TAUQ, represent the unitary +* matrix Q as a product of elementary reflectors, and +* elements on and above the diagonal in the first NB rows, +* with the array TAUP, represent the unitary matrix P as +* a product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* D (output) DOUBLE PRECISION array, dimension (NB) +* The diagonal elements of the first NB rows and columns of +* the reduced matrix. D(i) = A(i,i). +* +* E (output) DOUBLE PRECISION array, dimension (NB) +* The off-diagonal elements of the first NB rows and columns of +* the reduced matrix. +* +* TAUQ (output) COMPLEX*16 array dimension (NB) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix Q. See Further Details. +* +* TAUP (output) COMPLEX*16 array, dimension (NB) +* The scalar factors of the elementary reflectors which +* represent the unitary matrix P. See Further Details. +* +* X (output) COMPLEX*16 array, dimension (LDX,NB) +* The m-by-nb matrix X required to update the unreduced part +* of A. +* +* LDX (input) INTEGER +* The leading dimension of the array X. LDX >= max(1,M). +* +* Y (output) COMPLEX*16 array, dimension (LDY,NB) +* The n-by-nb matrix Y required to update the unreduced part +* of A. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= max(1,N). +* +* Further Details +* =============== +* +* The matrices Q and P are represented as products of elementary +* reflectors: +* +* Q = H(1) H(2) . . . H(nb) and P = G(1) G(2) . . . G(nb) +* +* Each H(i) and G(i) has the form: +* +* H(i) = I - tauq * v * v' and G(i) = I - taup * u * u' +* +* where tauq and taup are complex scalars, and v and u are complex +* vectors. +* +* If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in +* A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in +* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in +* A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in +* A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i). +* +* The elements of the vectors v and u together form the m-by-nb matrix +* V and the nb-by-n matrix U' which are needed, with X and Y, to apply +* the transformation to the unreduced part of the matrix, using a block +* update of the form: A := A - V*Y' - X*U'. +* +* The contents of A on exit are illustrated by the following examples +* with nb = 2: +* +* m = 6 and n = 5 (m > n): m = 5 and n = 6 (m < n): +* +* ( 1 1 u1 u1 u1 ) ( 1 u1 u1 u1 u1 u1 ) +* ( v1 1 1 u2 u2 ) ( 1 1 u2 u2 u2 u2 ) +* ( v1 v2 a a a ) ( v1 1 a a a a ) +* ( v1 v2 a a a ) ( v1 v2 a a a a ) +* ( v1 v2 a a a ) ( v1 v2 a a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix which is unchanged, +* vi denotes an element of the vector defining H(i), and ui an element +* of the vector defining G(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL ZGEMV, ZLACGV, ZLARFG, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* + IF( M.GE.N ) THEN +* +* Reduce to upper bidiagonal form +* + DO 10 I = 1, NB +* +* Update A(i:m,i) +* + CALL ZLACGV( I-1, Y( I, 1 ), LDY ) + CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ), + $ LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 ) + CALL ZLACGV( I-1, Y( I, 1 ), LDY ) + CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ), + $ LDX, A( 1, I ), 1, ONE, A( I, I ), 1 ) +* +* Generate reflection Q(i) to annihilate A(i+1:m,i) +* + ALPHA = A( I, I ) + CALL ZLARFG( M-I+1, ALPHA, A( MIN( I+1, M ), I ), 1, + $ TAUQ( I ) ) + D( I ) = ALPHA + IF( I.LT.N ) THEN + A( I, I ) = ONE +* +* Compute Y(i+1:n,i) +* + CALL ZGEMV( 'Conjugate transpose', M-I+1, N-I, ONE, + $ A( I, I+1 ), LDA, A( I, I ), 1, ZERO, + $ Y( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE, + $ A( I, 1 ), LDA, A( I, I ), 1, ZERO, + $ Y( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), + $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE, + $ X( I, 1 ), LDX, A( I, I ), 1, ZERO, + $ Y( 1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE, + $ A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE, + $ Y( I+1, I ), 1 ) + CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) +* +* Update A(i,i+1:n) +* + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + CALL ZLACGV( I, A( I, 1 ), LDA ) + CALL ZGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ), + $ LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA ) + CALL ZLACGV( I, A( I, 1 ), LDA ) + CALL ZLACGV( I-1, X( I, 1 ), LDX ) + CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE, + $ A( 1, I+1 ), LDA, X( I, 1 ), LDX, ONE, + $ A( I, I+1 ), LDA ) + CALL ZLACGV( I-1, X( I, 1 ), LDX ) +* +* Generate reflection P(i) to annihilate A(i,i+2:n) +* + ALPHA = A( I, I+1 ) + CALL ZLARFG( N-I, ALPHA, A( I, MIN( I+2, N ) ), LDA, + $ TAUP( I ) ) + E( I ) = ALPHA + A( I, I+1 ) = ONE +* +* Compute X(i+1:m,i) +* + CALL ZGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ), + $ LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-I, I, ONE, + $ Y( I+1, 1 ), LDY, A( I, I+1 ), LDA, ZERO, + $ X( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ), + $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL ZGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ), + $ LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), + $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + END IF + 10 CONTINUE + ELSE +* +* Reduce to lower bidiagonal form +* + DO 20 I = 1, NB +* +* Update A(i,i:n) +* + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + CALL ZLACGV( I-1, A( I, 1 ), LDA ) + CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ), + $ LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA ) + CALL ZLACGV( I-1, A( I, 1 ), LDA ) + CALL ZLACGV( I-1, X( I, 1 ), LDX ) + CALL ZGEMV( 'Conjugate transpose', I-1, N-I+1, -ONE, + $ A( 1, I ), LDA, X( I, 1 ), LDX, ONE, A( I, I ), + $ LDA ) + CALL ZLACGV( I-1, X( I, 1 ), LDX ) +* +* Generate reflection P(i) to annihilate A(i,i+1:n) +* + ALPHA = A( I, I ) + CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA, + $ TAUP( I ) ) + D( I ) = ALPHA + IF( I.LT.M ) THEN + A( I, I ) = ONE +* +* Compute X(i+1:m,i) +* + CALL ZGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ), + $ LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-I+1, I-1, ONE, + $ Y( I, 1 ), LDY, A( I, I ), LDA, ZERO, + $ X( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL ZGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ), + $ LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ), + $ LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 ) + CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 ) + CALL ZLACGV( N-I+1, A( I, I ), LDA ) +* +* Update A(i+1:m,i) +* + CALL ZLACGV( I-1, Y( I, 1 ), LDY ) + CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 ) + CALL ZLACGV( I-1, Y( I, 1 ), LDY ) + CALL ZGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ), + $ LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 ) +* +* Generate reflection Q(i) to annihilate A(i+2:m,i) +* + ALPHA = A( I+1, I ) + CALL ZLARFG( M-I, ALPHA, A( MIN( I+2, M ), I ), 1, + $ TAUQ( I ) ) + E( I ) = ALPHA + A( I+1, I ) = ONE +* +* Compute Y(i+1:n,i) +* + CALL ZGEMV( 'Conjugate transpose', M-I, N-I, ONE, + $ A( I+1, I+1 ), LDA, A( I+1, I ), 1, ZERO, + $ Y( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', M-I, I-1, ONE, + $ A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO, + $ Y( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ), + $ LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', M-I, I, ONE, + $ X( I+1, 1 ), LDX, A( I+1, I ), 1, ZERO, + $ Y( 1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', I, N-I, -ONE, + $ A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE, + $ Y( I+1, I ), 1 ) + CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 ) + ELSE + CALL ZLACGV( N-I+1, A( I, I ), LDA ) + END IF + 20 CONTINUE + END IF + RETURN +* +* End of ZLABRD +* + END diff --git a/2.3-1/src/fortran/lapack/zlacgv.f b/2.3-1/src/fortran/lapack/zlacgv.f new file mode 100644 index 00000000..0033e306 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlacgv.f @@ -0,0 +1,60 @@ + SUBROUTINE ZLACGV( N, X, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N +* .. +* .. Array Arguments .. + COMPLEX*16 X( * ) +* .. +* +* Purpose +* ======= +* +* ZLACGV conjugates a complex vector of length N. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The length of the vector X. N >= 0. +* +* X (input/output) COMPLEX*16 array, dimension +* (1+(N-1)*abs(INCX)) +* On entry, the vector of length N to be conjugated. +* On exit, X is overwritten with conjg(X). +* +* INCX (input) INTEGER +* The spacing between successive elements of X. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, IOFF +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* + IF( INCX.EQ.1 ) THEN + DO 10 I = 1, N + X( I ) = DCONJG( X( I ) ) + 10 CONTINUE + ELSE + IOFF = 1 + IF( INCX.LT.0 ) + $ IOFF = 1 - ( N-1 )*INCX + DO 20 I = 1, N + X( IOFF ) = DCONJG( X( IOFF ) ) + IOFF = IOFF + INCX + 20 CONTINUE + END IF + RETURN +* +* End of ZLACGV +* + END diff --git a/2.3-1/src/fortran/lapack/zlacn2.f b/2.3-1/src/fortran/lapack/zlacn2.f new file mode 100644 index 00000000..99f7ae35 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlacn2.f @@ -0,0 +1,221 @@ + SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KASE, N + DOUBLE PRECISION EST +* .. +* .. Array Arguments .. + INTEGER ISAVE( 3 ) + COMPLEX*16 V( * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZLACN2 estimates the 1-norm of a square, complex matrix A. +* Reverse communication is used for evaluating matrix-vector products. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix. N >= 1. +* +* V (workspace) COMPLEX*16 array, dimension (N) +* On the final return, V = A*W, where EST = norm(V)/norm(W) +* (W is not returned). +* +* X (input/output) COMPLEX*16 array, dimension (N) +* On an intermediate return, X should be overwritten by +* A * X, if KASE=1, +* A' * X, if KASE=2, +* where A' is the conjugate transpose of A, and ZLACN2 must be +* re-called with all the other parameters unchanged. +* +* EST (input/output) DOUBLE PRECISION +* On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be +* unchanged from the previous call to ZLACN2. +* On exit, EST is an estimate (a lower bound) for norm(A). +* +* KASE (input/output) INTEGER +* On the initial call to ZLACN2, KASE should be 0. +* On an intermediate return, KASE will be 1 or 2, indicating +* whether X should be overwritten by A * X or A' * X. +* On the final return from ZLACN2, KASE will again be 0. +* +* ISAVE (input/output) INTEGER array, dimension (3) +* ISAVE is used to save variables between calls to ZLACN2 +* +* Further Details +* ======= ======= +* +* Contributed by Nick Higham, University of Manchester. +* Originally named CONEST, dated March 16, 1988. +* +* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of +* a real or complex matrix, with applications to condition estimation", +* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. +* +* Last modified: April, 1999 +* +* This is a thread safe version of ZLACON, which uses the array ISAVE +* in place of a SAVE statement, as follows: +* +* ZLACON ZLACN2 +* JUMP ISAVE(1) +* J ISAVE(2) +* ITER ISAVE(3) +* +* ===================================================================== +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 5 ) + DOUBLE PRECISION ONE, TWO + PARAMETER ( ONE = 1.0D0, TWO = 2.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, JLAST + DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP +* .. +* .. External Functions .. + INTEGER IZMAX1 + DOUBLE PRECISION DLAMCH, DZSUM1 + EXTERNAL IZMAX1, DLAMCH, DZSUM1 +* .. +* .. External Subroutines .. + EXTERNAL ZCOPY +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DIMAG +* .. +* .. Executable Statements .. +* + SAFMIN = DLAMCH( 'Safe minimum' ) + IF( KASE.EQ.0 ) THEN + DO 10 I = 1, N + X( I ) = DCMPLX( ONE / DBLE( N ) ) + 10 CONTINUE + KASE = 1 + ISAVE( 1 ) = 1 + RETURN + END IF +* + GO TO ( 20, 40, 70, 90, 120 )ISAVE( 1 ) +* +* ................ ENTRY (ISAVE( 1 ) = 1) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. +* + 20 CONTINUE + IF( N.EQ.1 ) THEN + V( 1 ) = X( 1 ) + EST = ABS( V( 1 ) ) +* ... QUIT + GO TO 130 + END IF + EST = DZSUM1( N, X, 1 ) +* + DO 30 I = 1, N + ABSXI = ABS( X( I ) ) + IF( ABSXI.GT.SAFMIN ) THEN + X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, + $ DIMAG( X( I ) ) / ABSXI ) + ELSE + X( I ) = CONE + END IF + 30 CONTINUE + KASE = 2 + ISAVE( 1 ) = 2 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 2) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY CTRANS(A)*X. +* + 40 CONTINUE + ISAVE( 2 ) = IZMAX1( N, X, 1 ) + ISAVE( 3 ) = 2 +* +* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. +* + 50 CONTINUE + DO 60 I = 1, N + X( I ) = CZERO + 60 CONTINUE + X( ISAVE( 2 ) ) = CONE + KASE = 1 + ISAVE( 1 ) = 3 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 3) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 70 CONTINUE + CALL ZCOPY( N, X, 1, V, 1 ) + ESTOLD = EST + EST = DZSUM1( N, V, 1 ) +* +* TEST FOR CYCLING. + IF( EST.LE.ESTOLD ) + $ GO TO 100 +* + DO 80 I = 1, N + ABSXI = ABS( X( I ) ) + IF( ABSXI.GT.SAFMIN ) THEN + X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, + $ DIMAG( X( I ) ) / ABSXI ) + ELSE + X( I ) = CONE + END IF + 80 CONTINUE + KASE = 2 + ISAVE( 1 ) = 4 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 4) +* X HAS BEEN OVERWRITTEN BY CTRANS(A)*X. +* + 90 CONTINUE + JLAST = ISAVE( 2 ) + ISAVE( 2 ) = IZMAX1( N, X, 1 ) + IF( ( ABS( X( JLAST ) ).NE.ABS( X( ISAVE( 2 ) ) ) ) .AND. + $ ( ISAVE( 3 ).LT.ITMAX ) ) THEN + ISAVE( 3 ) = ISAVE( 3 ) + 1 + GO TO 50 + END IF +* +* ITERATION COMPLETE. FINAL STAGE. +* + 100 CONTINUE + ALTSGN = ONE + DO 110 I = 1, N + X( I ) = DCMPLX( ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) ) + ALTSGN = -ALTSGN + 110 CONTINUE + KASE = 1 + ISAVE( 1 ) = 5 + RETURN +* +* ................ ENTRY (ISAVE( 1 ) = 5) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 120 CONTINUE + TEMP = TWO*( DZSUM1( N, X, 1 ) / DBLE( 3*N ) ) + IF( TEMP.GT.EST ) THEN + CALL ZCOPY( N, X, 1, V, 1 ) + EST = TEMP + END IF +* + 130 CONTINUE + KASE = 0 + RETURN +* +* End of ZLACN2 +* + END diff --git a/2.3-1/src/fortran/lapack/zlacon.f b/2.3-1/src/fortran/lapack/zlacon.f new file mode 100644 index 00000000..5773ef92 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlacon.f @@ -0,0 +1,212 @@ + SUBROUTINE ZLACON( N, V, X, EST, KASE ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KASE, N + DOUBLE PRECISION EST +* .. +* .. Array Arguments .. + COMPLEX*16 V( N ), X( N ) +* .. +* +* Purpose +* ======= +* +* ZLACON estimates the 1-norm of a square, complex matrix A. +* Reverse communication is used for evaluating matrix-vector products. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix. N >= 1. +* +* V (workspace) COMPLEX*16 array, dimension (N) +* On the final return, V = A*W, where EST = norm(V)/norm(W) +* (W is not returned). +* +* X (input/output) COMPLEX*16 array, dimension (N) +* On an intermediate return, X should be overwritten by +* A * X, if KASE=1, +* A' * X, if KASE=2, +* where A' is the conjugate transpose of A, and ZLACON must be +* re-called with all the other parameters unchanged. +* +* EST (input/output) DOUBLE PRECISION +* On entry with KASE = 1 or 2 and JUMP = 3, EST should be +* unchanged from the previous call to ZLACON. +* On exit, EST is an estimate (a lower bound) for norm(A). +* +* KASE (input/output) INTEGER +* On the initial call to ZLACON, KASE should be 0. +* On an intermediate return, KASE will be 1 or 2, indicating +* whether X should be overwritten by A * X or A' * X. +* On the final return from ZLACON, KASE will again be 0. +* +* Further Details +* ======= ======= +* +* Contributed by Nick Higham, University of Manchester. +* Originally named CONEST, dated March 16, 1988. +* +* Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of +* a real or complex matrix, with applications to condition estimation", +* ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. +* +* Last modified: April, 1999 +* +* ===================================================================== +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 5 ) + DOUBLE PRECISION ONE, TWO + PARAMETER ( ONE = 1.0D0, TWO = 2.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, ITER, J, JLAST, JUMP + DOUBLE PRECISION ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP +* .. +* .. External Functions .. + INTEGER IZMAX1 + DOUBLE PRECISION DLAMCH, DZSUM1 + EXTERNAL IZMAX1, DLAMCH, DZSUM1 +* .. +* .. External Subroutines .. + EXTERNAL ZCOPY +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DIMAG +* .. +* .. Save statement .. + SAVE +* .. +* .. Executable Statements .. +* + SAFMIN = DLAMCH( 'Safe minimum' ) + IF( KASE.EQ.0 ) THEN + DO 10 I = 1, N + X( I ) = DCMPLX( ONE / DBLE( N ) ) + 10 CONTINUE + KASE = 1 + JUMP = 1 + RETURN + END IF +* + GO TO ( 20, 40, 70, 90, 120 )JUMP +* +* ................ ENTRY (JUMP = 1) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. +* + 20 CONTINUE + IF( N.EQ.1 ) THEN + V( 1 ) = X( 1 ) + EST = ABS( V( 1 ) ) +* ... QUIT + GO TO 130 + END IF + EST = DZSUM1( N, X, 1 ) +* + DO 30 I = 1, N + ABSXI = ABS( X( I ) ) + IF( ABSXI.GT.SAFMIN ) THEN + X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, + $ DIMAG( X( I ) ) / ABSXI ) + ELSE + X( I ) = CONE + END IF + 30 CONTINUE + KASE = 2 + JUMP = 2 + RETURN +* +* ................ ENTRY (JUMP = 2) +* FIRST ITERATION. X HAS BEEN OVERWRITTEN BY CTRANS(A)*X. +* + 40 CONTINUE + J = IZMAX1( N, X, 1 ) + ITER = 2 +* +* MAIN LOOP - ITERATIONS 2,3,...,ITMAX. +* + 50 CONTINUE + DO 60 I = 1, N + X( I ) = CZERO + 60 CONTINUE + X( J ) = CONE + KASE = 1 + JUMP = 3 + RETURN +* +* ................ ENTRY (JUMP = 3) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 70 CONTINUE + CALL ZCOPY( N, X, 1, V, 1 ) + ESTOLD = EST + EST = DZSUM1( N, V, 1 ) +* +* TEST FOR CYCLING. + IF( EST.LE.ESTOLD ) + $ GO TO 100 +* + DO 80 I = 1, N + ABSXI = ABS( X( I ) ) + IF( ABSXI.GT.SAFMIN ) THEN + X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI, + $ DIMAG( X( I ) ) / ABSXI ) + ELSE + X( I ) = CONE + END IF + 80 CONTINUE + KASE = 2 + JUMP = 4 + RETURN +* +* ................ ENTRY (JUMP = 4) +* X HAS BEEN OVERWRITTEN BY CTRANS(A)*X. +* + 90 CONTINUE + JLAST = J + J = IZMAX1( N, X, 1 ) + IF( ( ABS( X( JLAST ) ).NE.ABS( X( J ) ) ) .AND. + $ ( ITER.LT.ITMAX ) ) THEN + ITER = ITER + 1 + GO TO 50 + END IF +* +* ITERATION COMPLETE. FINAL STAGE. +* + 100 CONTINUE + ALTSGN = ONE + DO 110 I = 1, N + X( I ) = DCMPLX( ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) ) + ALTSGN = -ALTSGN + 110 CONTINUE + KASE = 1 + JUMP = 5 + RETURN +* +* ................ ENTRY (JUMP = 5) +* X HAS BEEN OVERWRITTEN BY A*X. +* + 120 CONTINUE + TEMP = TWO*( DZSUM1( N, X, 1 ) / DBLE( 3*N ) ) + IF( TEMP.GT.EST ) THEN + CALL ZCOPY( N, X, 1, V, 1 ) + EST = TEMP + END IF +* + 130 CONTINUE + KASE = 0 + RETURN +* +* End of ZLACON +* + END diff --git a/2.3-1/src/fortran/lapack/zlacpy.f b/2.3-1/src/fortran/lapack/zlacpy.f new file mode 100644 index 00000000..8878311a --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlacpy.f @@ -0,0 +1,90 @@ + SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, LDB, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ) +* .. +* +* Purpose +* ======= +* +* ZLACPY copies all or part of a two-dimensional matrix A to another +* matrix B. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies the part of the matrix A to be copied to B. +* = 'U': Upper triangular part +* = 'L': Lower triangular part +* Otherwise: All of the matrix A +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The m by n matrix A. If UPLO = 'U', only the upper trapezium +* is accessed; if UPLO = 'L', only the lower trapezium is +* accessed. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (output) COMPLEX*16 array, dimension (LDB,N) +* On exit, B = A in the locations specified by UPLO. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,M). +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( LSAME( UPLO, 'U' ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, MIN( J, M ) + B( I, J ) = A( I, J ) + 10 CONTINUE + 20 CONTINUE +* + ELSE IF( LSAME( UPLO, 'L' ) ) THEN + DO 40 J = 1, N + DO 30 I = J, M + B( I, J ) = A( I, J ) + 30 CONTINUE + 40 CONTINUE +* + ELSE + DO 60 J = 1, N + DO 50 I = 1, M + B( I, J ) = A( I, J ) + 50 CONTINUE + 60 CONTINUE + END IF +* + RETURN +* +* End of ZLACPY +* + END diff --git a/2.3-1/src/fortran/lapack/zladiv.f b/2.3-1/src/fortran/lapack/zladiv.f new file mode 100644 index 00000000..4a12055e --- /dev/null +++ b/2.3-1/src/fortran/lapack/zladiv.f @@ -0,0 +1,46 @@ + COMPLEX*16 FUNCTION ZLADIV( X, Y ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + COMPLEX*16 X, Y +* .. +* +* Purpose +* ======= +* +* ZLADIV := X / Y, where X and Y are complex. The computation of X / Y +* will not overflow on an intermediary step unless the results +* overflows. +* +* Arguments +* ========= +* +* X (input) COMPLEX*16 +* Y (input) COMPLEX*16 +* The complex scalars X and Y. +* +* ===================================================================== +* +* .. Local Scalars .. + DOUBLE PRECISION ZI, ZR +* .. +* .. External Subroutines .. + EXTERNAL DLADIV +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, DCMPLX, DIMAG +* .. +* .. Executable Statements .. +* + CALL DLADIV( DBLE( X ), DIMAG( X ), DBLE( Y ), DIMAG( Y ), ZR, + $ ZI ) + ZLADIV = DCMPLX( ZR, ZI ) +* + RETURN +* +* End of ZLADIV +* + END diff --git a/2.3-1/src/fortran/lapack/zlahqr.f b/2.3-1/src/fortran/lapack/zlahqr.f new file mode 100644 index 00000000..9ce9be19 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlahqr.f @@ -0,0 +1,470 @@ + SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, + $ IHIZ, Z, LDZ, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), W( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZLAHQR is an auxiliary routine called by CHSEQR to update the +* eigenvalues and Schur decomposition already computed by CHSEQR, by +* dealing with the Hessenberg submatrix in rows and columns ILO to +* IHI. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows and +* columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1). +* ZLAHQR works primarily with the Hessenberg submatrix in rows +* and columns ILO to IHI, but applies transformations to all of +* H if WANTT is .TRUE.. +* 1 <= ILO <= max(1,IHI); IHI <= N. +* +* H (input/output) COMPLEX*16 array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO is zero and if WANTT is .TRUE., then H +* is upper triangular in rows and columns ILO:IHI. If INFO +* is zero and if WANTT is .FALSE., then the contents of H +* are unspecified on exit. The output state of H in case +* INF is positive is below under the description of INFO. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH >= max(1,N). +* +* W (output) COMPLEX*16 array, dimension (N) +* The computed eigenvalues ILO to IHI are stored in the +* corresponding elements of W. If WANTT is .TRUE., the +* eigenvalues are stored in the same order as on the diagonal +* of the Schur form returned in H, with W(i) = H(i,i). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. +* 1 <= ILOZ <= ILO; IHI <= IHIZ <= N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,N) +* If WANTZ is .TRUE., on entry Z must contain the current +* matrix Z of transformations accumulated by CHSEQR, and on +* exit Z has been updated; transformations are applied only to +* the submatrix Z(ILOZ:IHIZ,ILO:IHI). +* If WANTZ is .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: if INFO = i, ZLAHQR failed to compute all the +* eigenvalues ILO to IHI in a total of 30 iterations +* per eigenvalue; elements i+1:ihi of W contain +* those eigenvalues which have been successfully +* computed. +* +* If INFO .GT. 0 and WANTT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the +* eigenvalues of the upper Hessenberg matrix +* rows and columns ILO thorugh INFO of the final, +* output value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* (*) (initial value of H)*U = U*(final value of H) +* where U is an orthognal matrix. The final +* value of H is upper Hessenberg and triangular in +* rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* (final value of Z) = (initial value of Z)*U +* where U is the orthogonal matrix in (*) +* (regardless of the value of WANTT.) +* +* Further Details +* =============== +* +* 02-96 Based on modifications by +* David Day, Sandia National Laboratory, USA +* +* 12-04 Further modifications by +* Ralph Byers, University of Kansas, USA +* +* This is a modified version of ZLAHQR from LAPACK version 3.0. +* It is (1) more robust against overflow and underflow and +* (2) adopts the more conservative Ahues & Tisseur stopping +* criterion (LAWN 122, 1997). +* +* ========================================================= +* +* .. Parameters .. + INTEGER ITMAX + PARAMETER ( ITMAX = 30 ) + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION RZERO, RONE, HALF + PARAMETER ( RZERO = 0.0d0, RONE = 1.0d0, HALF = 0.5d0 ) + DOUBLE PRECISION DAT1 + PARAMETER ( DAT1 = 3.0d0 / 4.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 CDUM, H11, H11S, H22, SC, SUM, T, T1, TEMP, U, + $ V2, X, Y + DOUBLE PRECISION AA, AB, BA, BB, H10, H21, RTEMP, S, SAFMAX, + $ SAFMIN, SMLNUM, SX, T2, TST, ULP + INTEGER I, I1, I2, ITS, J, JHI, JLO, K, L, M, NH, NZ +* .. +* .. Local Arrays .. + COMPLEX*16 V( 2 ) +* .. +* .. External Functions .. + COMPLEX*16 ZLADIV + DOUBLE PRECISION DLAMCH + EXTERNAL ZLADIV, DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, ZCOPY, ZLARFG, ZSCAL +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCONJG, DIMAG, MAX, MIN, SQRT +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN + IF( ILO.EQ.IHI ) THEN + W( ILO ) = H( ILO, ILO ) + RETURN + END IF +* +* ==== clear out the trash ==== + DO 10 J = ILO, IHI - 3 + H( J+2, J ) = ZERO + H( J+3, J ) = ZERO + 10 CONTINUE + IF( ILO.LE.IHI-2 ) + $ H( IHI, IHI-2 ) = ZERO +* ==== ensure that subdiagonal entries are real ==== + DO 20 I = ILO + 1, IHI + IF( DIMAG( H( I, I-1 ) ).NE.RZERO ) THEN +* ==== The following redundant normalization +* . avoids problems with both gradual and +* . sudden underflow in ABS(H(I,I-1)) ==== + SC = H( I, I-1 ) / CABS1( H( I, I-1 ) ) + SC = DCONJG( SC ) / ABS( SC ) + H( I, I-1 ) = ABS( H( I, I-1 ) ) + IF( WANTT ) THEN + JLO = 1 + JHI = N + ELSE + JLO = ILO + JHI = IHI + END IF + CALL ZSCAL( JHI-I+1, SC, H( I, I ), LDH ) + CALL ZSCAL( MIN( JHI, I+1 )-JLO+1, DCONJG( SC ), + $ H( JLO, I ), 1 ) + IF( WANTZ ) + $ CALL ZSCAL( IHIZ-ILOZ+1, DCONJG( SC ), Z( ILOZ, I ), 1 ) + END IF + 20 CONTINUE +* + NH = IHI - ILO + 1 + NZ = IHIZ - ILOZ + 1 +* +* Set machine-dependent constants for the stopping criterion. +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = RONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( NH ) / ULP ) +* +* I1 and I2 are the indices of the first row and last column of H +* to which transformations must be applied. If eigenvalues only are +* being computed, I1 and I2 are set inside the main loop. +* + IF( WANTT ) THEN + I1 = 1 + I2 = N + END IF +* +* The main loop begins here. I is the loop index and decreases from +* IHI to ILO in steps of 1. Each iteration of the loop works +* with the active submatrix in rows and columns L to I. +* Eigenvalues I+1 to IHI have already converged. Either L = ILO, or +* H(L,L-1) is negligible so that the matrix splits. +* + I = IHI + 30 CONTINUE + IF( I.LT.ILO ) + $ GO TO 150 +* +* Perform QR iterations on rows and columns ILO to I until a +* submatrix of order 1 splits off at the bottom because a +* subdiagonal element has become negligible. +* + L = ILO + DO 130 ITS = 0, ITMAX +* +* Look for a single small subdiagonal element. +* + DO 40 K = I, L + 1, -1 + IF( CABS1( H( K, K-1 ) ).LE.SMLNUM ) + $ GO TO 50 + TST = CABS1( H( K-1, K-1 ) ) + CABS1( H( K, K ) ) + IF( TST.EQ.ZERO ) THEN + IF( K-2.GE.ILO ) + $ TST = TST + ABS( DBLE( H( K-1, K-2 ) ) ) + IF( K+1.LE.IHI ) + $ TST = TST + ABS( DBLE( H( K+1, K ) ) ) + END IF +* ==== The following is a conservative small subdiagonal +* . deflation criterion due to Ahues & Tisseur (LAWN 122, +* . 1997). It has better mathematical foundation and +* . improves accuracy in some examples. ==== + IF( ABS( DBLE( H( K, K-1 ) ) ).LE.ULP*TST ) THEN + AB = MAX( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) ) + BA = MIN( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) ) + AA = MAX( CABS1( H( K, K ) ), + $ CABS1( H( K-1, K-1 )-H( K, K ) ) ) + BB = MIN( CABS1( H( K, K ) ), + $ CABS1( H( K-1, K-1 )-H( K, K ) ) ) + S = AA + AB + IF( BA*( AB / S ).LE.MAX( SMLNUM, + $ ULP*( BB*( AA / S ) ) ) )GO TO 50 + END IF + 40 CONTINUE + 50 CONTINUE + L = K + IF( L.GT.ILO ) THEN +* +* H(L,L-1) is negligible +* + H( L, L-1 ) = ZERO + END IF +* +* Exit from loop if a submatrix of order 1 has split off. +* + IF( L.GE.I ) + $ GO TO 140 +* +* Now the active submatrix is in rows and columns L to I. If +* eigenvalues only are being computed, only the active submatrix +* need be transformed. +* + IF( .NOT.WANTT ) THEN + I1 = L + I2 = I + END IF +* + IF( ITS.EQ.10 .OR. ITS.EQ.20 ) THEN +* +* Exceptional shift. +* + S = DAT1*ABS( DBLE( H( I, I-1 ) ) ) + T = S + H( I, I ) + ELSE +* +* Wilkinson's shift. +* + T = H( I, I ) + U = SQRT( H( I-1, I ) )*SQRT( H( I, I-1 ) ) + S = CABS1( U ) + IF( S.NE.RZERO ) THEN + X = HALF*( H( I-1, I-1 )-T ) + SX = CABS1( X ) + S = MAX( S, CABS1( X ) ) + Y = S*SQRT( ( X / S )**2+( U / S )**2 ) + IF( SX.GT.RZERO ) THEN + IF( DBLE( X / SX )*DBLE( Y )+DIMAG( X / SX )* + $ DIMAG( Y ).LT.RZERO )Y = -Y + END IF + T = T - U*ZLADIV( U, ( X+Y ) ) + END IF + END IF +* +* Look for two consecutive small subdiagonal elements. +* + DO 60 M = I - 1, L + 1, -1 +* +* Determine the effect of starting the single-shift QR +* iteration at row M, and see if this would make H(M,M-1) +* negligible. +* + H11 = H( M, M ) + H22 = H( M+1, M+1 ) + H11S = H11 - T + H21 = H( M+1, M ) + S = CABS1( H11S ) + ABS( H21 ) + H11S = H11S / S + H21 = H21 / S + V( 1 ) = H11S + V( 2 ) = H21 + H10 = H( M, M-1 ) + IF( ABS( H10 )*ABS( H21 ).LE.ULP* + $ ( CABS1( H11S )*( CABS1( H11 )+CABS1( H22 ) ) ) ) + $ GO TO 70 + 60 CONTINUE + H11 = H( L, L ) + H22 = H( L+1, L+1 ) + H11S = H11 - T + H21 = H( L+1, L ) + S = CABS1( H11S ) + ABS( H21 ) + H11S = H11S / S + H21 = H21 / S + V( 1 ) = H11S + V( 2 ) = H21 + 70 CONTINUE +* +* Single-shift QR step +* + DO 120 K = M, I - 1 +* +* The first iteration of this loop determines a reflection G +* from the vector V and applies it from left and right to H, +* thus creating a nonzero bulge below the subdiagonal. +* +* Each subsequent iteration determines a reflection G to +* restore the Hessenberg form in the (K-1)th column, and thus +* chases the bulge one step toward the bottom of the active +* submatrix. +* +* V(2) is always real before the call to ZLARFG, and hence +* after the call T2 ( = T1*V(2) ) is also real. +* + IF( K.GT.M ) + $ CALL ZCOPY( 2, H( K, K-1 ), 1, V, 1 ) + CALL ZLARFG( 2, V( 1 ), V( 2 ), 1, T1 ) + IF( K.GT.M ) THEN + H( K, K-1 ) = V( 1 ) + H( K+1, K-1 ) = ZERO + END IF + V2 = V( 2 ) + T2 = DBLE( T1*V2 ) +* +* Apply G from the left to transform the rows of the matrix +* in columns K to I2. +* + DO 80 J = K, I2 + SUM = DCONJG( T1 )*H( K, J ) + T2*H( K+1, J ) + H( K, J ) = H( K, J ) - SUM + H( K+1, J ) = H( K+1, J ) - SUM*V2 + 80 CONTINUE +* +* Apply G from the right to transform the columns of the +* matrix in rows I1 to min(K+2,I). +* + DO 90 J = I1, MIN( K+2, I ) + SUM = T1*H( J, K ) + T2*H( J, K+1 ) + H( J, K ) = H( J, K ) - SUM + H( J, K+1 ) = H( J, K+1 ) - SUM*DCONJG( V2 ) + 90 CONTINUE +* + IF( WANTZ ) THEN +* +* Accumulate transformations in the matrix Z +* + DO 100 J = ILOZ, IHIZ + SUM = T1*Z( J, K ) + T2*Z( J, K+1 ) + Z( J, K ) = Z( J, K ) - SUM + Z( J, K+1 ) = Z( J, K+1 ) - SUM*DCONJG( V2 ) + 100 CONTINUE + END IF +* + IF( K.EQ.M .AND. M.GT.L ) THEN +* +* If the QR step was started at row M > L because two +* consecutive small subdiagonals were found, then extra +* scaling must be performed to ensure that H(M,M-1) remains +* real. +* + TEMP = ONE - T1 + TEMP = TEMP / ABS( TEMP ) + H( M+1, M ) = H( M+1, M )*DCONJG( TEMP ) + IF( M+2.LE.I ) + $ H( M+2, M+1 ) = H( M+2, M+1 )*TEMP + DO 110 J = M, I + IF( J.NE.M+1 ) THEN + IF( I2.GT.J ) + $ CALL ZSCAL( I2-J, TEMP, H( J, J+1 ), LDH ) + CALL ZSCAL( J-I1, DCONJG( TEMP ), H( I1, J ), 1 ) + IF( WANTZ ) THEN + CALL ZSCAL( NZ, DCONJG( TEMP ), Z( ILOZ, J ), + $ 1 ) + END IF + END IF + 110 CONTINUE + END IF + 120 CONTINUE +* +* Ensure that H(I,I-1) is real. +* + TEMP = H( I, I-1 ) + IF( DIMAG( TEMP ).NE.RZERO ) THEN + RTEMP = ABS( TEMP ) + H( I, I-1 ) = RTEMP + TEMP = TEMP / RTEMP + IF( I2.GT.I ) + $ CALL ZSCAL( I2-I, DCONJG( TEMP ), H( I, I+1 ), LDH ) + CALL ZSCAL( I-I1, TEMP, H( I1, I ), 1 ) + IF( WANTZ ) THEN + CALL ZSCAL( NZ, TEMP, Z( ILOZ, I ), 1 ) + END IF + END IF +* + 130 CONTINUE +* +* Failure to converge in remaining number of iterations +* + INFO = I + RETURN +* + 140 CONTINUE +* +* H(I,I-1) is negligible: one eigenvalue has converged. +* + W( I ) = H( I, I ) +* +* return to start of the main loop with new value of I. +* + I = L - 1 + GO TO 30 +* + 150 CONTINUE + RETURN +* +* End of ZLAHQR +* + END diff --git a/2.3-1/src/fortran/lapack/zlahr2.f b/2.3-1/src/fortran/lapack/zlahr2.f new file mode 100644 index 00000000..f3cb5515 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlahr2.f @@ -0,0 +1,240 @@ + SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER K, LDA, LDT, LDY, N, NB +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ), + $ Y( LDY, NB ) +* .. +* +* Purpose +* ======= +* +* ZLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1) +* matrix A so that elements below the k-th subdiagonal are zero. The +* reduction is performed by an unitary similarity transformation +* Q' * A * Q. The routine returns the matrices V and T which determine +* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. +* +* This is an auxiliary routine called by ZGEHRD. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. +* +* K (input) INTEGER +* The offset for the reduction. Elements below the k-th +* subdiagonal in the first NB columns are reduced to zero. +* K < N. +* +* NB (input) INTEGER +* The number of columns to be reduced. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N-K+1) +* On entry, the n-by-(n-k+1) general matrix A. +* On exit, the elements on and above the k-th subdiagonal in +* the first NB columns are overwritten with the corresponding +* elements of the reduced matrix; the elements below the k-th +* subdiagonal, with the array TAU, represent the matrix Q as a +* product of elementary reflectors. The other columns of A are +* unchanged. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) COMPLEX*16 array, dimension (NB) +* The scalar factors of the elementary reflectors. See Further +* Details. +* +* T (output) COMPLEX*16 array, dimension (LDT,NB) +* The upper triangular matrix T. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= NB. +* +* Y (output) COMPLEX*16 array, dimension (LDY,NB) +* The n-by-nb matrix Y. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= N. +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of nb elementary reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in +* A(i+k+1:n,i), and tau in TAU(i). +* +* The elements of the vectors v together form the (n-k+1)-by-nb matrix +* V which is needed, with T and Y, to apply the transformation to the +* unreduced part of the matrix, using an update of the form: +* A := (I - V*T*V') * (A - Y*V'). +* +* The contents of A on exit are illustrated by the following example +* with n = 7, k = 3 and nb = 2: +* +* ( a a a a a ) +* ( a a a a a ) +* ( a a a a a ) +* ( h h a a a ) +* ( v1 h a a a ) +* ( v1 v2 a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* This file is a slight modification of LAPACK-3.0's ZLAHRD +* incorporating improvements proposed by Quintana-Orti and Van de +* Gejin. Note that the entries of A(1:K,2:NB) differ from those +* returned by the original LAPACK routine. This function is +* not backward compatible with LAPACK3.0. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 EI +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZCOPY, ZGEMM, ZGEMV, ZLACPY, + $ ZLARFG, ZSCAL, ZTRMM, ZTRMV, ZLACGV +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + DO 10 I = 1, NB + IF( I.GT.1 ) THEN +* +* Update A(K+1:N,I) +* +* Update I-th column of A - Y * V' +* + CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) + CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY, + $ A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 ) + CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) +* +* Apply I - V * T' * V' to this column (call it b) from the +* left, using the last column of T as workspace +* +* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) +* ( V2 ) ( b2 ) +* +* where V1 is unit lower triangular +* +* w := V1' * b1 +* + CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) + CALL ZTRMV( 'Lower', 'Conjugate transpose', 'UNIT', + $ I-1, A( K+1, 1 ), + $ LDA, T( 1, NB ), 1 ) +* +* w := w + V2'*b2 +* + CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, + $ ONE, A( K+I, 1 ), + $ LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 ) +* +* w := T'*w +* + CALL ZTRMV( 'Upper', 'Conjugate transpose', 'NON-UNIT', + $ I-1, T, LDT, + $ T( 1, NB ), 1 ) +* +* b2 := b2 - V2*w +* + CALL ZGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, + $ A( K+I, 1 ), + $ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) +* +* b1 := b1 - V1*w +* + CALL ZTRMV( 'Lower', 'NO TRANSPOSE', + $ 'UNIT', I-1, + $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) + CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) +* + A( K+I-1, I-1 ) = EI + END IF +* +* Generate the elementary reflector H(I) to annihilate +* A(K+I+1:N,I) +* + CALL ZLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1, + $ TAU( I ) ) + EI = A( K+I, I ) + A( K+I, I ) = ONE +* +* Compute Y(K+1:N,I) +* + CALL ZGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, + $ ONE, A( K+1, I+1 ), + $ LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, + $ ONE, A( K+I, 1 ), LDA, + $ A( K+I, I ), 1, ZERO, T( 1, I ), 1 ) + CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, + $ Y( K+1, 1 ), LDY, + $ T( 1, I ), 1, ONE, Y( K+1, I ), 1 ) + CALL ZSCAL( N-K, TAU( I ), Y( K+1, I ), 1 ) +* +* Compute T(1:I,I) +* + CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) + CALL ZTRMV( 'Upper', 'No Transpose', 'NON-UNIT', + $ I-1, T, LDT, + $ T( 1, I ), 1 ) + T( I, I ) = TAU( I ) +* + 10 CONTINUE + A( K+NB, NB ) = EI +* +* Compute Y(1:K,1:NB) +* + CALL ZLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY ) + CALL ZTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', + $ 'UNIT', K, NB, + $ ONE, A( K+1, 1 ), LDA, Y, LDY ) + IF( N.GT.K+NB ) + $ CALL ZGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, + $ NB, N-K-NB, ONE, + $ A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y, + $ LDY ) + CALL ZTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', + $ 'NON-UNIT', K, NB, + $ ONE, T, LDT, Y, LDY ) +* + RETURN +* +* End of ZLAHR2 +* + END diff --git a/2.3-1/src/fortran/lapack/zlahrd.f b/2.3-1/src/fortran/lapack/zlahrd.f new file mode 100644 index 00000000..e7eb9de9 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlahrd.f @@ -0,0 +1,213 @@ + SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER K, LDA, LDT, LDY, N, NB +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), T( LDT, NB ), TAU( NB ), + $ Y( LDY, NB ) +* .. +* +* Purpose +* ======= +* +* ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1) +* matrix A so that elements below the k-th subdiagonal are zero. The +* reduction is performed by a unitary similarity transformation +* Q' * A * Q. The routine returns the matrices V and T which determine +* Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T. +* +* This is an OBSOLETE auxiliary routine. +* This routine will be 'deprecated' in a future release. +* Please use the new routine ZLAHR2 instead. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix A. +* +* K (input) INTEGER +* The offset for the reduction. Elements below the k-th +* subdiagonal in the first NB columns are reduced to zero. +* +* NB (input) INTEGER +* The number of columns to be reduced. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N-K+1) +* On entry, the n-by-(n-k+1) general matrix A. +* On exit, the elements on and above the k-th subdiagonal in +* the first NB columns are overwritten with the corresponding +* elements of the reduced matrix; the elements below the k-th +* subdiagonal, with the array TAU, represent the matrix Q as a +* product of elementary reflectors. The other columns of A are +* unchanged. See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (output) COMPLEX*16 array, dimension (NB) +* The scalar factors of the elementary reflectors. See Further +* Details. +* +* T (output) COMPLEX*16 array, dimension (LDT,NB) +* The upper triangular matrix T. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= NB. +* +* Y (output) COMPLEX*16 array, dimension (LDY,NB) +* The n-by-nb matrix Y. +* +* LDY (input) INTEGER +* The leading dimension of the array Y. LDY >= max(1,N). +* +* Further Details +* =============== +* +* The matrix Q is represented as a product of nb elementary reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in +* A(i+k+1:n,i), and tau in TAU(i). +* +* The elements of the vectors v together form the (n-k+1)-by-nb matrix +* V which is needed, with T and Y, to apply the transformation to the +* unreduced part of the matrix, using an update of the form: +* A := (I - V*T*V') * (A - Y*V'). +* +* The contents of A on exit are illustrated by the following example +* with n = 7, k = 3 and nb = 2: +* +* ( a h a a a ) +* ( a h a a a ) +* ( a h a a a ) +* ( h h a a a ) +* ( v1 h a a a ) +* ( v1 v2 a a a ) +* ( v1 v2 a a a ) +* +* where a denotes an element of the original matrix A, h denotes a +* modified element of the upper Hessenberg matrix H, and vi denotes an +* element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 EI +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZCOPY, ZGEMV, ZLACGV, ZLARFG, ZSCAL, + $ ZTRMV +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + DO 10 I = 1, NB + IF( I.GT.1 ) THEN +* +* Update A(1:n,i) +* +* Compute i-th column of A - Y * V' +* + CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) + CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, + $ A( K+I-1, 1 ), LDA, ONE, A( 1, I ), 1 ) + CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) +* +* Apply I - V * T' * V' to this column (call it b) from the +* left, using the last column of T as workspace +* +* Let V = ( V1 ) and b = ( b1 ) (first I-1 rows) +* ( V2 ) ( b2 ) +* +* where V1 is unit lower triangular +* +* w := V1' * b1 +* + CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 ) + CALL ZTRMV( 'Lower', 'Conjugate transpose', 'Unit', I-1, + $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) +* +* w := w + V2'*b2 +* + CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE, + $ A( K+I, 1 ), LDA, A( K+I, I ), 1, ONE, + $ T( 1, NB ), 1 ) +* +* w := T'*w +* + CALL ZTRMV( 'Upper', 'Conjugate transpose', 'Non-unit', I-1, + $ T, LDT, T( 1, NB ), 1 ) +* +* b2 := b2 - V2*w +* + CALL ZGEMV( 'No transpose', N-K-I+1, I-1, -ONE, A( K+I, 1 ), + $ LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 ) +* +* b1 := b1 - V1*w +* + CALL ZTRMV( 'Lower', 'No transpose', 'Unit', I-1, + $ A( K+1, 1 ), LDA, T( 1, NB ), 1 ) + CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 ) +* + A( K+I-1, I-1 ) = EI + END IF +* +* Generate the elementary reflector H(i) to annihilate +* A(k+i+1:n,i) +* + EI = A( K+I, I ) + CALL ZLARFG( N-K-I+1, EI, A( MIN( K+I+1, N ), I ), 1, + $ TAU( I ) ) + A( K+I, I ) = ONE +* +* Compute Y(1:n,i) +* + CALL ZGEMV( 'No transpose', N, N-K-I+1, ONE, A( 1, I+1 ), LDA, + $ A( K+I, I ), 1, ZERO, Y( 1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE, + $ A( K+I, 1 ), LDA, A( K+I, I ), 1, ZERO, T( 1, I ), + $ 1 ) + CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, T( 1, I ), 1, + $ ONE, Y( 1, I ), 1 ) + CALL ZSCAL( N, TAU( I ), Y( 1, I ), 1 ) +* +* Compute T(1:i,i) +* + CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 ) + CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, LDT, + $ T( 1, I ), 1 ) + T( I, I ) = TAU( I ) +* + 10 CONTINUE + A( K+NB, NB ) = EI +* + RETURN +* +* End of ZLAHRD +* + END diff --git a/2.3-1/src/fortran/lapack/zlaic1.f b/2.3-1/src/fortran/lapack/zlaic1.f new file mode 100644 index 00000000..589f0889 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaic1.f @@ -0,0 +1,295 @@ + SUBROUTINE ZLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER J, JOB + DOUBLE PRECISION SEST, SESTPR + COMPLEX*16 C, GAMMA, S +* .. +* .. Array Arguments .. + COMPLEX*16 W( J ), X( J ) +* .. +* +* Purpose +* ======= +* +* ZLAIC1 applies one step of incremental condition estimation in +* its simplest version: +* +* Let x, twonorm(x) = 1, be an approximate singular vector of an j-by-j +* lower triangular matrix L, such that +* twonorm(L*x) = sest +* Then ZLAIC1 computes sestpr, s, c such that +* the vector +* [ s*x ] +* xhat = [ c ] +* is an approximate singular vector of +* [ L 0 ] +* Lhat = [ w' gamma ] +* in the sense that +* twonorm(Lhat*xhat) = sestpr. +* +* Depending on JOB, an estimate for the largest or smallest singular +* value is computed. +* +* Note that [s c]' and sestpr**2 is an eigenpair of the system +* +* diag(sest*sest, 0) + [alpha gamma] * [ conjg(alpha) ] +* [ conjg(gamma) ] +* +* where alpha = conjg(x)'*w. +* +* Arguments +* ========= +* +* JOB (input) INTEGER +* = 1: an estimate for the largest singular value is computed. +* = 2: an estimate for the smallest singular value is computed. +* +* J (input) INTEGER +* Length of X and W +* +* X (input) COMPLEX*16 array, dimension (J) +* The j-vector x. +* +* SEST (input) DOUBLE PRECISION +* Estimated singular value of j by j matrix L +* +* W (input) COMPLEX*16 array, dimension (J) +* The j-vector w. +* +* GAMMA (input) COMPLEX*16 +* The diagonal element gamma. +* +* SESTPR (output) DOUBLE PRECISION +* Estimated singular value of (j+1) by (j+1) matrix Lhat. +* +* S (output) COMPLEX*16 +* Sine needed in forming xhat. +* +* C (output) COMPLEX*16 +* Cosine needed in forming xhat. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 ) + DOUBLE PRECISION HALF, FOUR + PARAMETER ( HALF = 0.5D0, FOUR = 4.0D0 ) +* .. +* .. Local Scalars .. + DOUBLE PRECISION ABSALP, ABSEST, ABSGAM, B, EPS, NORMA, S1, S2, + $ SCL, T, TEST, TMP, ZETA1, ZETA2 + COMPLEX*16 ALPHA, COSINE, SINE +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DCONJG, MAX, SQRT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + COMPLEX*16 ZDOTC + EXTERNAL DLAMCH, ZDOTC +* .. +* .. Executable Statements .. +* + EPS = DLAMCH( 'Epsilon' ) + ALPHA = ZDOTC( J, X, 1, W, 1 ) +* + ABSALP = ABS( ALPHA ) + ABSGAM = ABS( GAMMA ) + ABSEST = ABS( SEST ) +* + IF( JOB.EQ.1 ) THEN +* +* Estimating largest singular value +* +* special cases +* + IF( SEST.EQ.ZERO ) THEN + S1 = MAX( ABSGAM, ABSALP ) + IF( S1.EQ.ZERO ) THEN + S = ZERO + C = ONE + SESTPR = ZERO + ELSE + S = ALPHA / S1 + C = GAMMA / S1 + TMP = SQRT( S*DCONJG( S )+C*DCONJG( C ) ) + S = S / TMP + C = C / TMP + SESTPR = S1*TMP + END IF + RETURN + ELSE IF( ABSGAM.LE.EPS*ABSEST ) THEN + S = ONE + C = ZERO + TMP = MAX( ABSEST, ABSALP ) + S1 = ABSEST / TMP + S2 = ABSALP / TMP + SESTPR = TMP*SQRT( S1*S1+S2*S2 ) + RETURN + ELSE IF( ABSALP.LE.EPS*ABSEST ) THEN + S1 = ABSGAM + S2 = ABSEST + IF( S1.LE.S2 ) THEN + S = ONE + C = ZERO + SESTPR = S2 + ELSE + S = ZERO + C = ONE + SESTPR = S1 + END IF + RETURN + ELSE IF( ABSEST.LE.EPS*ABSALP .OR. ABSEST.LE.EPS*ABSGAM ) THEN + S1 = ABSGAM + S2 = ABSALP + IF( S1.LE.S2 ) THEN + TMP = S1 / S2 + SCL = SQRT( ONE+TMP*TMP ) + SESTPR = S2*SCL + S = ( ALPHA / S2 ) / SCL + C = ( GAMMA / S2 ) / SCL + ELSE + TMP = S2 / S1 + SCL = SQRT( ONE+TMP*TMP ) + SESTPR = S1*SCL + S = ( ALPHA / S1 ) / SCL + C = ( GAMMA / S1 ) / SCL + END IF + RETURN + ELSE +* +* normal case +* + ZETA1 = ABSALP / ABSEST + ZETA2 = ABSGAM / ABSEST +* + B = ( ONE-ZETA1*ZETA1-ZETA2*ZETA2 )*HALF + C = ZETA1*ZETA1 + IF( B.GT.ZERO ) THEN + T = C / ( B+SQRT( B*B+C ) ) + ELSE + T = SQRT( B*B+C ) - B + END IF +* + SINE = -( ALPHA / ABSEST ) / T + COSINE = -( GAMMA / ABSEST ) / ( ONE+T ) + TMP = SQRT( SINE*DCONJG( SINE )+COSINE*DCONJG( COSINE ) ) + S = SINE / TMP + C = COSINE / TMP + SESTPR = SQRT( T+ONE )*ABSEST + RETURN + END IF +* + ELSE IF( JOB.EQ.2 ) THEN +* +* Estimating smallest singular value +* +* special cases +* + IF( SEST.EQ.ZERO ) THEN + SESTPR = ZERO + IF( MAX( ABSGAM, ABSALP ).EQ.ZERO ) THEN + SINE = ONE + COSINE = ZERO + ELSE + SINE = -DCONJG( GAMMA ) + COSINE = DCONJG( ALPHA ) + END IF + S1 = MAX( ABS( SINE ), ABS( COSINE ) ) + S = SINE / S1 + C = COSINE / S1 + TMP = SQRT( S*DCONJG( S )+C*DCONJG( C ) ) + S = S / TMP + C = C / TMP + RETURN + ELSE IF( ABSGAM.LE.EPS*ABSEST ) THEN + S = ZERO + C = ONE + SESTPR = ABSGAM + RETURN + ELSE IF( ABSALP.LE.EPS*ABSEST ) THEN + S1 = ABSGAM + S2 = ABSEST + IF( S1.LE.S2 ) THEN + S = ZERO + C = ONE + SESTPR = S1 + ELSE + S = ONE + C = ZERO + SESTPR = S2 + END IF + RETURN + ELSE IF( ABSEST.LE.EPS*ABSALP .OR. ABSEST.LE.EPS*ABSGAM ) THEN + S1 = ABSGAM + S2 = ABSALP + IF( S1.LE.S2 ) THEN + TMP = S1 / S2 + SCL = SQRT( ONE+TMP*TMP ) + SESTPR = ABSEST*( TMP / SCL ) + S = -( DCONJG( GAMMA ) / S2 ) / SCL + C = ( DCONJG( ALPHA ) / S2 ) / SCL + ELSE + TMP = S2 / S1 + SCL = SQRT( ONE+TMP*TMP ) + SESTPR = ABSEST / SCL + S = -( DCONJG( GAMMA ) / S1 ) / SCL + C = ( DCONJG( ALPHA ) / S1 ) / SCL + END IF + RETURN + ELSE +* +* normal case +* + ZETA1 = ABSALP / ABSEST + ZETA2 = ABSGAM / ABSEST +* + NORMA = MAX( ONE+ZETA1*ZETA1+ZETA1*ZETA2, + $ ZETA1*ZETA2+ZETA2*ZETA2 ) +* +* See if root is closer to zero or to ONE +* + TEST = ONE + TWO*( ZETA1-ZETA2 )*( ZETA1+ZETA2 ) + IF( TEST.GE.ZERO ) THEN +* +* root is close to zero, compute directly +* + B = ( ZETA1*ZETA1+ZETA2*ZETA2+ONE )*HALF + C = ZETA2*ZETA2 + T = C / ( B+SQRT( ABS( B*B-C ) ) ) + SINE = ( ALPHA / ABSEST ) / ( ONE-T ) + COSINE = -( GAMMA / ABSEST ) / T + SESTPR = SQRT( T+FOUR*EPS*EPS*NORMA )*ABSEST + ELSE +* +* root is closer to ONE, shift by that amount +* + B = ( ZETA2*ZETA2+ZETA1*ZETA1-ONE )*HALF + C = ZETA1*ZETA1 + IF( B.GE.ZERO ) THEN + T = -C / ( B+SQRT( B*B+C ) ) + ELSE + T = B - SQRT( B*B+C ) + END IF + SINE = -( ALPHA / ABSEST ) / T + COSINE = -( GAMMA / ABSEST ) / ( ONE+T ) + SESTPR = SQRT( ONE+T+FOUR*EPS*EPS*NORMA )*ABSEST + END IF + TMP = SQRT( SINE*DCONJG( SINE )+COSINE*DCONJG( COSINE ) ) + S = SINE / TMP + C = COSINE / TMP + RETURN +* + END IF + END IF + RETURN +* +* End of ZLAIC1 +* + END diff --git a/2.3-1/src/fortran/lapack/zlange.f b/2.3-1/src/fortran/lapack/zlange.f new file mode 100644 index 00000000..36cecbdc --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlange.f @@ -0,0 +1,145 @@ + DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION WORK( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLANGE returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* complex matrix A. +* +* Description +* =========== +* +* ZLANGE returns the value +* +* ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in ZLANGE as described +* above. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. When M = 0, +* ZLANGE is set to zero. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. When N = 0, +* ZLANGE is set to zero. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The m by n matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(M,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= M when NORM = 'I'; otherwise, WORK is not +* referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION SCALE, SUM, VALUE +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL ZLASSQ +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + IF( MIN( M, N ).EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + DO 20 J = 1, N + DO 10 I = 1, M + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN +* +* Find norm1(A). +* + VALUE = ZERO + DO 40 J = 1, N + SUM = ZERO + DO 30 I = 1, M + SUM = SUM + ABS( A( I, J ) ) + 30 CONTINUE + VALUE = MAX( VALUE, SUM ) + 40 CONTINUE + ELSE IF( LSAME( NORM, 'I' ) ) THEN +* +* Find normI(A). +* + DO 50 I = 1, M + WORK( I ) = ZERO + 50 CONTINUE + DO 70 J = 1, N + DO 60 I = 1, M + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 60 CONTINUE + 70 CONTINUE + VALUE = ZERO + DO 80 I = 1, M + VALUE = MAX( VALUE, WORK( I ) ) + 80 CONTINUE + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + DO 90 J = 1, N + CALL ZLASSQ( M, A( 1, J ), 1, SCALE, SUM ) + 90 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + ZLANGE = VALUE + RETURN +* +* End of ZLANGE +* + END diff --git a/2.3-1/src/fortran/lapack/zlanhe.f b/2.3-1/src/fortran/lapack/zlanhe.f new file mode 100644 index 00000000..86e57fcd --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlanhe.f @@ -0,0 +1,187 @@ + DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM, UPLO + INTEGER LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION WORK( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLANHE returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* complex hermitian matrix A. +* +* Description +* =========== +* +* ZLANHE returns the value +* +* ZLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in ZLANHE as described +* above. +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* hermitian matrix A is to be referenced. +* = 'U': Upper triangular part of A is referenced +* = 'L': Lower triangular part of A is referenced +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, ZLANHE is +* set to zero. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The hermitian matrix A. If UPLO = 'U', the leading n by n +* upper triangular part of A contains the upper triangular part +* of the matrix A, and the strictly lower triangular part of A +* is not referenced. If UPLO = 'L', the leading n by n lower +* triangular part of A contains the lower triangular part of +* the matrix A, and the strictly upper triangular part of A is +* not referenced. Note that the imaginary parts of the diagonal +* elements need not be set and are assumed to be zero. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(N,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise, +* WORK is not referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION ABSA, SCALE, SUM, VALUE +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL ZLASSQ +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, MAX, SQRT +* .. +* .. Executable Statements .. +* + IF( N.EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + DO 20 J = 1, N + DO 10 I = 1, J - 1 + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + VALUE = MAX( VALUE, ABS( DBLE( A( J, J ) ) ) ) + 20 CONTINUE + ELSE + DO 40 J = 1, N + VALUE = MAX( VALUE, ABS( DBLE( A( J, J ) ) ) ) + DO 30 I = J + 1, N + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 30 CONTINUE + 40 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR. + $ ( NORM.EQ.'1' ) ) THEN +* +* Find normI(A) ( = norm1(A), since A is hermitian). +* + VALUE = ZERO + IF( LSAME( UPLO, 'U' ) ) THEN + DO 60 J = 1, N + SUM = ZERO + DO 50 I = 1, J - 1 + ABSA = ABS( A( I, J ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + 50 CONTINUE + WORK( J ) = SUM + ABS( DBLE( A( J, J ) ) ) + 60 CONTINUE + DO 70 I = 1, N + VALUE = MAX( VALUE, WORK( I ) ) + 70 CONTINUE + ELSE + DO 80 I = 1, N + WORK( I ) = ZERO + 80 CONTINUE + DO 100 J = 1, N + SUM = WORK( J ) + ABS( DBLE( A( J, J ) ) ) + DO 90 I = J + 1, N + ABSA = ABS( A( I, J ) ) + SUM = SUM + ABSA + WORK( I ) = WORK( I ) + ABSA + 90 CONTINUE + VALUE = MAX( VALUE, SUM ) + 100 CONTINUE + END IF + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + IF( LSAME( UPLO, 'U' ) ) THEN + DO 110 J = 2, N + CALL ZLASSQ( J-1, A( 1, J ), 1, SCALE, SUM ) + 110 CONTINUE + ELSE + DO 120 J = 1, N - 1 + CALL ZLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM ) + 120 CONTINUE + END IF + SUM = 2*SUM + DO 130 I = 1, N + IF( DBLE( A( I, I ) ).NE.ZERO ) THEN + ABSA = ABS( DBLE( A( I, I ) ) ) + IF( SCALE.LT.ABSA ) THEN + SUM = ONE + SUM*( SCALE / ABSA )**2 + SCALE = ABSA + ELSE + SUM = SUM + ( ABSA / SCALE )**2 + END IF + END IF + 130 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + ZLANHE = VALUE + RETURN +* +* End of ZLANHE +* + END diff --git a/2.3-1/src/fortran/lapack/zlanhs.f b/2.3-1/src/fortran/lapack/zlanhs.f new file mode 100644 index 00000000..d7b187a5 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlanhs.f @@ -0,0 +1,142 @@ + DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER NORM + INTEGER LDA, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION WORK( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLANHS returns the value of the one norm, or the Frobenius norm, or +* the infinity norm, or the element of largest absolute value of a +* Hessenberg matrix A. +* +* Description +* =========== +* +* ZLANHS returns the value +* +* ZLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm' +* ( +* ( norm1(A), NORM = '1', 'O' or 'o' +* ( +* ( normI(A), NORM = 'I' or 'i' +* ( +* ( normF(A), NORM = 'F', 'f', 'E' or 'e' +* +* where norm1 denotes the one norm of a matrix (maximum column sum), +* normI denotes the infinity norm of a matrix (maximum row sum) and +* normF denotes the Frobenius norm of a matrix (square root of sum of +* squares). Note that max(abs(A(i,j))) is not a consistent matrix norm. +* +* Arguments +* ========= +* +* NORM (input) CHARACTER*1 +* Specifies the value to be returned in ZLANHS as described +* above. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. When N = 0, ZLANHS is +* set to zero. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The n by n upper Hessenberg matrix A; the part of A below the +* first sub-diagonal is not referenced. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(N,1). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)), +* where LWORK >= N when NORM = 'I'; otherwise, WORK is not +* referenced. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, J + DOUBLE PRECISION SCALE, SUM, VALUE +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL ZLASSQ +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN, SQRT +* .. +* .. Executable Statements .. +* + IF( N.EQ.0 ) THEN + VALUE = ZERO + ELSE IF( LSAME( NORM, 'M' ) ) THEN +* +* Find max(abs(A(i,j))). +* + VALUE = ZERO + DO 20 J = 1, N + DO 10 I = 1, MIN( N, J+1 ) + VALUE = MAX( VALUE, ABS( A( I, J ) ) ) + 10 CONTINUE + 20 CONTINUE + ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN +* +* Find norm1(A). +* + VALUE = ZERO + DO 40 J = 1, N + SUM = ZERO + DO 30 I = 1, MIN( N, J+1 ) + SUM = SUM + ABS( A( I, J ) ) + 30 CONTINUE + VALUE = MAX( VALUE, SUM ) + 40 CONTINUE + ELSE IF( LSAME( NORM, 'I' ) ) THEN +* +* Find normI(A). +* + DO 50 I = 1, N + WORK( I ) = ZERO + 50 CONTINUE + DO 70 J = 1, N + DO 60 I = 1, MIN( N, J+1 ) + WORK( I ) = WORK( I ) + ABS( A( I, J ) ) + 60 CONTINUE + 70 CONTINUE + VALUE = ZERO + DO 80 I = 1, N + VALUE = MAX( VALUE, WORK( I ) ) + 80 CONTINUE + ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN +* +* Find normF(A). +* + SCALE = ZERO + SUM = ONE + DO 90 J = 1, N + CALL ZLASSQ( MIN( N, J+1 ), A( 1, J ), 1, SCALE, SUM ) + 90 CONTINUE + VALUE = SCALE*SQRT( SUM ) + END IF +* + ZLANHS = VALUE + RETURN +* +* End of ZLANHS +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqp2.f b/2.3-1/src/fortran/lapack/zlaqp2.f new file mode 100644 index 00000000..46f6d95c --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqp2.f @@ -0,0 +1,179 @@ + SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2, + $ WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER LDA, M, N, OFFSET +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION VN1( * ), VN2( * ) + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZLAQP2 computes a QR factorization with column pivoting of +* the block A(OFFSET+1:M,1:N). +* The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* OFFSET (input) INTEGER +* The number of rows of the matrix A that must be pivoted +* but no factorized. OFFSET >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, the upper triangle of block A(OFFSET+1:M,1:N) is +* the triangular factor obtained; the elements in block +* A(OFFSET+1:M,1:N) below the diagonal, together with the +* array TAU, represent the orthogonal matrix Q as a product of +* elementary reflectors. Block A(1:OFFSET,1:N) has been +* accordingly pivoted, but no factorized. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted +* to the front of A*P (a leading column); if JPVT(i) = 0, +* the i-th column of A is a free column. +* On exit, if JPVT(i) = k, then the i-th column of A*P +* was the k-th column of A. +* +* TAU (output) COMPLEX*16 array, dimension (min(M,N)) +* The scalar factors of the elementary reflectors. +* +* VN1 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the partial column norms. +* +* VN2 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the exact column norms. +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* Further Details +* =============== +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* Partial column norm updating strategy modified by +* Z. Drmac and Z. Bujanovic, Dept. of Mathematics, +* University of Zagreb, Croatia. +* June 2006. +* For more details see LAPACK Working Note 176. +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + COMPLEX*16 CONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, + $ CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, ITEMP, J, MN, OFFPI, PVT + DOUBLE PRECISION TEMP, TEMP2, TOL3Z + COMPLEX*16 AII +* .. +* .. External Subroutines .. + EXTERNAL ZLARF, ZLARFG, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DCONJG, MAX, MIN, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DZNRM2 + EXTERNAL IDAMAX, DLAMCH, DZNRM2 +* .. +* .. Executable Statements .. +* + MN = MIN( M-OFFSET, N ) + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Compute factorization. +* + DO 20 I = 1, MN +* + OFFPI = OFFSET + I +* +* Determine ith pivot column and swap if necessary. +* + PVT = ( I-1 ) + IDAMAX( N-I+1, VN1( I ), 1 ) +* + IF( PVT.NE.I ) THEN + CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( I ) + JPVT( I ) = ITEMP + VN1( PVT ) = VN1( I ) + VN2( PVT ) = VN2( I ) + END IF +* +* Generate elementary reflector H(i). +* + IF( OFFPI.LT.M ) THEN + CALL ZLARFG( M-OFFPI+1, A( OFFPI, I ), A( OFFPI+1, I ), 1, + $ TAU( I ) ) + ELSE + CALL ZLARFG( 1, A( M, I ), A( M, I ), 1, TAU( I ) ) + END IF +* + IF( I.LT.N ) THEN +* +* Apply H(i)' to A(offset+i:m,i+1:n) from the left. +* + AII = A( OFFPI, I ) + A( OFFPI, I ) = CONE + CALL ZLARF( 'Left', M-OFFPI+1, N-I, A( OFFPI, I ), 1, + $ DCONJG( TAU( I ) ), A( OFFPI, I+1 ), LDA, + $ WORK( 1 ) ) + A( OFFPI, I ) = AII + END IF +* +* Update partial column norms. +* + DO 10 J = I + 1, N + IF( VN1( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ONE - ( ABS( A( OFFPI, J ) ) / VN1( J ) )**2 + TEMP = MAX( TEMP, ZERO ) + TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + IF( OFFPI.LT.M ) THEN + VN1( J ) = DZNRM2( M-OFFPI, A( OFFPI+1, J ), 1 ) + VN2( J ) = VN1( J ) + ELSE + VN1( J ) = ZERO + VN2( J ) = ZERO + END IF + ELSE + VN1( J ) = VN1( J )*SQRT( TEMP ) + END IF + END IF + 10 CONTINUE +* + 20 CONTINUE +* + RETURN +* +* End of ZLAQP2 +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqps.f b/2.3-1/src/fortran/lapack/zlaqps.f new file mode 100644 index 00000000..40414503 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqps.f @@ -0,0 +1,266 @@ + SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1, + $ VN2, AUXV, F, LDF ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER KB, LDA, LDF, M, N, NB, OFFSET +* .. +* .. Array Arguments .. + INTEGER JPVT( * ) + DOUBLE PRECISION VN1( * ), VN2( * ) + COMPLEX*16 A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ) +* .. +* +* Purpose +* ======= +* +* ZLAQPS computes a step of QR factorization with column pivoting +* of a complex M-by-N matrix A by using Blas-3. It tries to factorize +* NB columns from A starting from the row OFFSET+1, and updates all +* of the matrix with Blas-3 xGEMM. +* +* In some cases, due to catastrophic cancellations, it cannot +* factorize NB columns. Hence, the actual number of factorized +* columns is returned in KB. +* +* Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0 +* +* OFFSET (input) INTEGER +* The number of rows of A that have been factorized in +* previous steps. +* +* NB (input) INTEGER +* The number of columns to factorize. +* +* KB (output) INTEGER +* The number of columns actually factorized. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the M-by-N matrix A. +* On exit, block A(OFFSET+1:M,1:KB) is the triangular +* factor obtained and block A(1:OFFSET,1:N) has been +* accordingly pivoted, but no factorized. +* The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has +* been updated. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* JPVT (input/output) INTEGER array, dimension (N) +* JPVT(I) = K <==> Column K of the full matrix A has been +* permuted into position I in AP. +* +* TAU (output) COMPLEX*16 array, dimension (KB) +* The scalar factors of the elementary reflectors. +* +* VN1 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the partial column norms. +* +* VN2 (input/output) DOUBLE PRECISION array, dimension (N) +* The vector with the exact column norms. +* +* AUXV (input/output) COMPLEX*16 array, dimension (NB) +* Auxiliar vector. +* +* F (input/output) COMPLEX*16 array, dimension (LDF,NB) +* Matrix F' = L*Y'*A. +* +* LDF (input) INTEGER +* The leading dimension of the array F. LDF >= max(1,N). +* +* Further Details +* =============== +* +* Based on contributions by +* G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain +* X. Sun, Computer Science Dept., Duke University, USA +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + COMPLEX*16 CZERO, CONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, + $ CZERO = ( 0.0D+0, 0.0D+0 ), + $ CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER ITEMP, J, K, LASTRK, LSTICC, PVT, RK + DOUBLE PRECISION TEMP, TEMP2, TOL3Z + COMPLEX*16 AKK +* .. +* .. External Subroutines .. + EXTERNAL ZGEMM, ZGEMV, ZLARFG, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCONJG, MAX, MIN, NINT, SQRT +* .. +* .. External Functions .. + INTEGER IDAMAX + DOUBLE PRECISION DLAMCH, DZNRM2 + EXTERNAL IDAMAX, DLAMCH, DZNRM2 +* .. +* .. Executable Statements .. +* + LASTRK = MIN( M, N+OFFSET ) + LSTICC = 0 + K = 0 + TOL3Z = SQRT(DLAMCH('Epsilon')) +* +* Beginning of while loop. +* + 10 CONTINUE + IF( ( K.LT.NB ) .AND. ( LSTICC.EQ.0 ) ) THEN + K = K + 1 + RK = OFFSET + K +* +* Determine ith pivot column and swap if necessary +* + PVT = ( K-1 ) + IDAMAX( N-K+1, VN1( K ), 1 ) + IF( PVT.NE.K ) THEN + CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, K ), 1 ) + CALL ZSWAP( K-1, F( PVT, 1 ), LDF, F( K, 1 ), LDF ) + ITEMP = JPVT( PVT ) + JPVT( PVT ) = JPVT( K ) + JPVT( K ) = ITEMP + VN1( PVT ) = VN1( K ) + VN2( PVT ) = VN2( K ) + END IF +* +* Apply previous Householder reflectors to column K: +* A(RK:M,K) := A(RK:M,K) - A(RK:M,1:K-1)*F(K,1:K-1)'. +* + IF( K.GT.1 ) THEN + DO 20 J = 1, K - 1 + F( K, J ) = DCONJG( F( K, J ) ) + 20 CONTINUE + CALL ZGEMV( 'No transpose', M-RK+1, K-1, -CONE, A( RK, 1 ), + $ LDA, F( K, 1 ), LDF, CONE, A( RK, K ), 1 ) + DO 30 J = 1, K - 1 + F( K, J ) = DCONJG( F( K, J ) ) + 30 CONTINUE + END IF +* +* Generate elementary reflector H(k). +* + IF( RK.LT.M ) THEN + CALL ZLARFG( M-RK+1, A( RK, K ), A( RK+1, K ), 1, TAU( K ) ) + ELSE + CALL ZLARFG( 1, A( RK, K ), A( RK, K ), 1, TAU( K ) ) + END IF +* + AKK = A( RK, K ) + A( RK, K ) = CONE +* +* Compute Kth column of F: +* +* Compute F(K+1:N,K) := tau(K)*A(RK:M,K+1:N)'*A(RK:M,K). +* + IF( K.LT.N ) THEN + CALL ZGEMV( 'Conjugate transpose', M-RK+1, N-K, TAU( K ), + $ A( RK, K+1 ), LDA, A( RK, K ), 1, CZERO, + $ F( K+1, K ), 1 ) + END IF +* +* Padding F(1:K,K) with zeros. +* + DO 40 J = 1, K + F( J, K ) = CZERO + 40 CONTINUE +* +* Incremental updating of F: +* F(1:N,K) := F(1:N,K) - tau(K)*F(1:N,1:K-1)*A(RK:M,1:K-1)' +* *A(RK:M,K). +* + IF( K.GT.1 ) THEN + CALL ZGEMV( 'Conjugate transpose', M-RK+1, K-1, -TAU( K ), + $ A( RK, 1 ), LDA, A( RK, K ), 1, CZERO, + $ AUXV( 1 ), 1 ) +* + CALL ZGEMV( 'No transpose', N, K-1, CONE, F( 1, 1 ), LDF, + $ AUXV( 1 ), 1, CONE, F( 1, K ), 1 ) + END IF +* +* Update the current row of A: +* A(RK,K+1:N) := A(RK,K+1:N) - A(RK,1:K)*F(K+1:N,1:K)'. +* + IF( K.LT.N ) THEN + CALL ZGEMM( 'No transpose', 'Conjugate transpose', 1, N-K, + $ K, -CONE, A( RK, 1 ), LDA, F( K+1, 1 ), LDF, + $ CONE, A( RK, K+1 ), LDA ) + END IF +* +* Update partial column norms. +* + IF( RK.LT.LASTRK ) THEN + DO 50 J = K + 1, N + IF( VN1( J ).NE.ZERO ) THEN +* +* NOTE: The following 4 lines follow from the analysis in +* Lapack Working Note 176. +* + TEMP = ABS( A( RK, J ) ) / VN1( J ) + TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) ) + TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2 + IF( TEMP2 .LE. TOL3Z ) THEN + VN2( J ) = DBLE( LSTICC ) + LSTICC = J + ELSE + VN1( J ) = VN1( J )*SQRT( TEMP ) + END IF + END IF + 50 CONTINUE + END IF +* + A( RK, K ) = AKK +* +* End of while loop. +* + GO TO 10 + END IF + KB = K + RK = OFFSET + KB +* +* Apply the block reflector to the rest of the matrix: +* A(OFFSET+KB+1:M,KB+1:N) := A(OFFSET+KB+1:M,KB+1:N) - +* A(OFFSET+KB+1:M,1:KB)*F(KB+1:N,1:KB)'. +* + IF( KB.LT.MIN( N, M-OFFSET ) ) THEN + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M-RK, N-KB, + $ KB, -CONE, A( RK+1, 1 ), LDA, F( KB+1, 1 ), LDF, + $ CONE, A( RK+1, KB+1 ), LDA ) + END IF +* +* Recomputation of difficult columns. +* + 60 CONTINUE + IF( LSTICC.GT.0 ) THEN + ITEMP = NINT( VN2( LSTICC ) ) + VN1( LSTICC ) = DZNRM2( M-RK, A( RK+1, LSTICC ), 1 ) +* +* NOTE: The computation of VN1( LSTICC ) relies on the fact that +* SNRM2 does not fail on vectors with norm below the value of +* SQRT(DLAMCH('S')) +* + VN2( LSTICC ) = VN1( LSTICC ) + LSTICC = ITEMP + GO TO 60 + END IF +* + RETURN +* +* End of ZLAQPS +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqr0.f b/2.3-1/src/fortran/lapack/zlaqr0.f new file mode 100644 index 00000000..2a35a725 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr0.f @@ -0,0 +1,601 @@ + SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, + $ IHIZ, Z, LDZ, WORK, LWORK, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZLAQR0 computes the eigenvalues of a Hessenberg matrix H +* and, optionally, the matrices T and Z from the Schur decomposition +* H = Z T Z**H, where T is an upper triangular matrix (the +* Schur form), and Z is the unitary matrix of Schur vectors. +* +* Optionally Z may be postmultiplied into an input unitary +* matrix Q so that this routine can give the Schur factorization +* of a matrix A which has been reduced to the Hessenberg form H +* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N .GE. 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1, +* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a +* previous call to ZGEBAL, and then passed to ZGEHRD when the +* matrix output by ZGEBAL is reduced to Hessenberg form. +* Otherwise, ILO and IHI should be set to 1 and N, +* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. +* If N = 0, then ILO = 1 and IHI = 0. +* +* H (input/output) COMPLEX*16 array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO = 0 and WANTT is .TRUE., then H +* contains the upper triangular matrix T from the Schur +* decomposition (the Schur form). If INFO = 0 and WANT is +* .FALSE., then the contents of H are unspecified on exit. +* (The output value of H when INFO.GT.0 is given under the +* description of INFO below.) +* +* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and +* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH .GE. max(1,N). +* +* W (output) COMPLEX*16 array, dimension (N) +* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored +* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are +* stored in the same order as on the diagonal of the Schur +* form returned in H, with W(i) = H(i,i). +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI) +* If WANTZ is .FALSE., then Z is not referenced. +* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is +* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the +* orthogonal Schur factor of H(ILO:IHI,ILO:IHI). +* (The output value of Z when INFO.GT.0 is given under +* the description of INFO below.) +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. if WANTZ is .TRUE. +* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1. +* +* WORK (workspace/output) COMPLEX*16 array, dimension LWORK +* On exit, if LWORK = -1, WORK(1) returns an estimate of +* the optimal value for LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK .GE. max(1,N) +* is sufficient, but LWORK typically as large as 6*N may +* be required for optimal performance. A workspace query +* to determine the optimal workspace size is recommended. +* +* If LWORK = -1, then ZLAQR0 does a workspace query. +* In this case, ZLAQR0 checks the input parameters and +* estimates the optimal workspace size for the given +* values of N, ILO and IHI. The estimate is returned +* in WORK(1). No error message related to LWORK is +* issued by XERBLA. Neither H nor Z are accessed. +* +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: if INFO = i, ZLAQR0 failed to compute all of +* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR +* and WI contain those eigenvalues which have been +* successfully computed. (Failures are rare.) +* +* If INFO .GT. 0 and WANT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the eigen- +* values of the upper Hessenberg matrix rows and +* columns ILO through INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* +* (*) (initial value of H)*U = U*(final value of H) +* +* where U is a unitary matrix. The final +* value of H is upper Hessenberg and triangular in +* rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* +* (final value of Z(ILO:IHI,ILOZ:IHIZ) +* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U +* +* where U is the unitary matrix in (*) (regard- +* less of the value of WANTT.) +* +* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not +* accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* References: +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 +* Performance, SIAM Journal of Matrix Analysis, volume 23, pages +* 929--947, 2002. +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part II: Aggressive Early Deflation, SIAM Journal +* of Matrix Analysis, volume 23, pages 948--973, 2002. +* +* ================================================================ +* .. Parameters .. +* +* ==== Matrices of order NTINY or smaller must be processed by +* . ZLAHQR because of insufficient subdiagonal scratch space. +* . (This is a hard limit.) ==== +* +* ==== Exceptional deflation windows: try to cure rare +* . slow convergence by increasing the size of the +* . deflation window after KEXNW iterations. ===== +* +* ==== Exceptional shifts: try to cure rare slow convergence +* . with ad-hoc exceptional shifts every KEXSH iterations. +* . The constants WILK1 and WILK2 are used to form the +* . exceptional shifts. ==== +* + INTEGER NTINY + PARAMETER ( NTINY = 11 ) + INTEGER KEXNW, KEXSH + PARAMETER ( KEXNW = 5, KEXSH = 6 ) + DOUBLE PRECISION WILK1 + PARAMETER ( WILK1 = 0.75d0 ) + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 AA, BB, CC, CDUM, DD, DET, RTDISC, SWAP, TR2 + DOUBLE PRECISION S + INTEGER I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS, + $ KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS, + $ LWKOPT, NDFL, NH, NHO, NIBBLE, NMIN, NS, NSMAX, + $ NSR, NVE, NW, NWMAX, NWR + LOGICAL NWINC, SORTED + CHARACTER JBCMPZ*2 +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Local Arrays .. + COMPLEX*16 ZDUM( 1, 1 ) +* .. +* .. External Subroutines .. + EXTERNAL ZLACPY, ZLAHQR, ZLAQR3, ZLAQR4, ZLAQR5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DIMAG, INT, MAX, MIN, MOD, + $ SQRT +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. + INFO = 0 +* +* ==== Quick return for N = 0: nothing to do. ==== +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = ONE + RETURN + END IF +* +* ==== Set up job flags for ILAENV. ==== +* + IF( WANTT ) THEN + JBCMPZ( 1: 1 ) = 'S' + ELSE + JBCMPZ( 1: 1 ) = 'E' + END IF + IF( WANTZ ) THEN + JBCMPZ( 2: 2 ) = 'V' + ELSE + JBCMPZ( 2: 2 ) = 'N' + END IF +* +* ==== Tiny matrices must use ZLAHQR. ==== +* + IF( N.LE.NTINY ) THEN +* +* ==== Estimate optimal workspace. ==== +* + LWKOPT = 1 + IF( LWORK.NE.-1 ) + $ CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, + $ IHIZ, Z, LDZ, INFO ) + ELSE +* +* ==== Use small bulge multi-shift QR with aggressive early +* . deflation on larger-than-tiny matrices. ==== +* +* ==== Hope for the best. ==== +* + INFO = 0 +* +* ==== NWR = recommended deflation window size. At this +* . point, N .GT. NTINY = 11, so there is enough +* . subdiagonal workspace for NWR.GE.2 as required. +* . (In fact, there is enough subdiagonal space for +* . NWR.GE.3.) ==== +* + NWR = ILAENV( 13, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NWR = MAX( 2, NWR ) + NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) + NW = NWR +* +* ==== NSR = recommended number of simultaneous shifts. +* . At this point N .GT. NTINY = 11, so there is at +* . enough subdiagonal workspace for NSR to be even +* . and greater than or equal to two as required. ==== +* + NSR = ILAENV( 15, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO ) + NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) +* +* ==== Estimate optimal workspace ==== +* +* ==== Workspace query call to ZLAQR3 ==== +* + CALL ZLAQR3( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, W, H, LDH, N, H, LDH, N, H, + $ LDH, WORK, -1 ) +* +* ==== Optimal workspace = MAX(ZLAQR5, ZLAQR3) ==== +* + LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) ) +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) + RETURN + END IF +* +* ==== ZLAHQR/ZLAQR0 crossover point ==== +* + NMIN = ILAENV( 12, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NMIN = MAX( NTINY, NMIN ) +* +* ==== Nibble crossover point ==== +* + NIBBLE = ILAENV( 14, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + NIBBLE = MAX( 0, NIBBLE ) +* +* ==== Accumulate reflections during ttswp? Use block +* . 2-by-2 structure during matrix-matrix multiply? ==== +* + KACC22 = ILAENV( 16, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK ) + KACC22 = MAX( 0, KACC22 ) + KACC22 = MIN( 2, KACC22 ) +* +* ==== NWMAX = the largest possible deflation window for +* . which there is sufficient workspace. ==== +* + NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 ) +* +* ==== NSMAX = the Largest number of simultaneous shifts +* . for which there is sufficient workspace. ==== +* + NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 ) + NSMAX = NSMAX - MOD( NSMAX, 2 ) +* +* ==== NDFL: an iteration count restarted at deflation. ==== +* + NDFL = 1 +* +* ==== ITMAX = iteration limit ==== +* + ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) ) +* +* ==== Last row and column in the active block ==== +* + KBOT = IHI +* +* ==== Main Loop ==== +* + DO 70 IT = 1, ITMAX +* +* ==== Done when KBOT falls below ILO ==== +* + IF( KBOT.LT.ILO ) + $ GO TO 80 +* +* ==== Locate active block ==== +* + DO 10 K = KBOT, ILO + 1, -1 + IF( H( K, K-1 ).EQ.ZERO ) + $ GO TO 20 + 10 CONTINUE + K = ILO + 20 CONTINUE + KTOP = K +* +* ==== Select deflation window size ==== +* + NH = KBOT - KTOP + 1 + IF( NDFL.LT.KEXNW .OR. NH.LT.NW ) THEN +* +* ==== Typical deflation window. If possible and +* . advisable, nibble the entire active block. +* . If not, use size NWR or NWR+1 depending upon +* . which has the smaller corresponding subdiagonal +* . entry (a heuristic). ==== +* + NWINC = .TRUE. + IF( NH.LE.MIN( NMIN, NWMAX ) ) THEN + NW = NH + ELSE + NW = MIN( NWR, NH, NWMAX ) + IF( NW.LT.NWMAX ) THEN + IF( NW.GE.NH-1 ) THEN + NW = NH + ELSE + KWTOP = KBOT - NW + 1 + IF( CABS1( H( KWTOP, KWTOP-1 ) ).GT. + $ CABS1( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1 + END IF + END IF + END IF + ELSE +* +* ==== Exceptional deflation window. If there have +* . been no deflations in KEXNW or more iterations, +* . then vary the deflation window size. At first, +* . because, larger windows are, in general, more +* . powerful than smaller ones, rapidly increase the +* . window up to the maximum reasonable and possible. +* . Then maybe try a slightly smaller window. ==== +* + IF( NWINC .AND. NW.LT.MIN( NWMAX, NH ) ) THEN + NW = MIN( NWMAX, NH, 2*NW ) + ELSE + NWINC = .FALSE. + IF( NW.EQ.NH .AND. NH.GT.2 ) + $ NW = NH - 1 + END IF + END IF +* +* ==== Aggressive early deflation: +* . split workspace under the subdiagonal into +* . - an nw-by-nw work array V in the lower +* . left-hand-corner, +* . - an NW-by-at-least-NW-but-more-is-better +* . (NW-by-NHO) horizontal work array along +* . the bottom edge, +* . - an at-least-NW-but-more-is-better (NHV-by-NW) +* . vertical work array along the left-hand-edge. +* . ==== +* + KV = N - NW + 1 + KT = NW + 1 + NHO = ( N-NW-1 ) - KT + 1 + KWV = NW + 2 + NVE = ( N-NW ) - KWV + 1 +* +* ==== Aggressive early deflation ==== +* + CALL ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, W, H( KV, 1 ), LDH, NHO, + $ H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, WORK, + $ LWORK ) +* +* ==== Adjust KBOT accounting for new deflations. ==== +* + KBOT = KBOT - LD +* +* ==== KS points to the shifts. ==== +* + KS = KBOT - LS + 1 +* +* ==== Skip an expensive QR sweep if there is a (partly +* . heuristic) reason to expect that many eigenvalues +* . will deflate without it. Here, the QR sweep is +* . skipped if many eigenvalues have just been deflated +* . or if the remaining active block is small. +* + IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT- + $ KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN +* +* ==== NS = nominal number of simultaneous shifts. +* . This may be lowered (slightly) if ZLAQR3 +* . did not provide that many shifts. ==== +* + NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) ) + NS = NS - MOD( NS, 2 ) +* +* ==== If there have been no deflations +* . in a multiple of KEXSH iterations, +* . then try exceptional shifts. +* . Otherwise use shifts provided by +* . ZLAQR3 above or from the eigenvalues +* . of a trailing principal submatrix. ==== +* + IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN + KS = KBOT - NS + 1 + DO 30 I = KBOT, KS + 1, -2 + W( I ) = H( I, I ) + WILK1*CABS1( H( I, I-1 ) ) + W( I-1 ) = W( I ) + 30 CONTINUE + ELSE +* +* ==== Got NS/2 or fewer shifts? Use ZLAQR4 or +* . ZLAHQR on a trailing principal submatrix to +* . get more. (Since NS.LE.NSMAX.LE.(N+6)/9, +* . there is enough space below the subdiagonal +* . to fit an NS-by-NS scratch array.) ==== +* + IF( KBOT-KS+1.LE.NS / 2 ) THEN + KS = KBOT - NS + 1 + KT = N - NS + 1 + CALL ZLACPY( 'A', NS, NS, H( KS, KS ), LDH, + $ H( KT, 1 ), LDH ) + IF( NS.GT.NMIN ) THEN + CALL ZLAQR4( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, W( KS ), 1, 1, + $ ZDUM, 1, WORK, LWORK, INF ) + ELSE + CALL ZLAHQR( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, W( KS ), 1, 1, + $ ZDUM, 1, INF ) + END IF + KS = KS + INF +* +* ==== In case of a rare QR failure use +* . eigenvalues of the trailing 2-by-2 +* . principal submatrix. Scale to avoid +* . overflows, underflows and subnormals. +* . (The scale factor S can not be zero, +* . because H(KBOT,KBOT-1) is nonzero.) ==== +* + IF( KS.GE.KBOT ) THEN + S = CABS1( H( KBOT-1, KBOT-1 ) ) + + $ CABS1( H( KBOT, KBOT-1 ) ) + + $ CABS1( H( KBOT-1, KBOT ) ) + + $ CABS1( H( KBOT, KBOT ) ) + AA = H( KBOT-1, KBOT-1 ) / S + CC = H( KBOT, KBOT-1 ) / S + BB = H( KBOT-1, KBOT ) / S + DD = H( KBOT, KBOT ) / S + TR2 = ( AA+DD ) / TWO + DET = ( AA-TR2 )*( DD-TR2 ) - BB*CC + RTDISC = SQRT( -DET ) + W( KBOT-1 ) = ( TR2+RTDISC )*S + W( KBOT ) = ( TR2-RTDISC )*S +* + KS = KBOT - 1 + END IF + END IF +* + IF( KBOT-KS+1.GT.NS ) THEN +* +* ==== Sort the shifts (Helps a little) ==== +* + SORTED = .false. + DO 50 K = KBOT, KS + 1, -1 + IF( SORTED ) + $ GO TO 60 + SORTED = .true. + DO 40 I = KS, K - 1 + IF( CABS1( W( I ) ).LT.CABS1( W( I+1 ) ) ) + $ THEN + SORTED = .false. + SWAP = W( I ) + W( I ) = W( I+1 ) + W( I+1 ) = SWAP + END IF + 40 CONTINUE + 50 CONTINUE + 60 CONTINUE + END IF + END IF +* +* ==== If there are only two shifts, then use +* . only one. ==== +* + IF( KBOT-KS+1.EQ.2 ) THEN + IF( CABS1( W( KBOT )-H( KBOT, KBOT ) ).LT. + $ CABS1( W( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN + W( KBOT-1 ) = W( KBOT ) + ELSE + W( KBOT ) = W( KBOT-1 ) + END IF + END IF +* +* ==== Use up to NS of the the smallest magnatiude +* . shifts. If there aren't NS shifts available, +* . then use them all, possibly dropping one to +* . make the number of shifts even. ==== +* + NS = MIN( NS, KBOT-KS+1 ) + NS = NS - MOD( NS, 2 ) + KS = KBOT - NS + 1 +* +* ==== Small-bulge multi-shift QR sweep: +* . split workspace under the subdiagonal into +* . - a KDU-by-KDU work array U in the lower +* . left-hand-corner, +* . - a KDU-by-at-least-KDU-but-more-is-better +* . (KDU-by-NHo) horizontal work array WH along +* . the bottom edge, +* . - and an at-least-KDU-but-more-is-better-by-KDU +* . (NVE-by-KDU) vertical work WV arrow along +* . the left-hand-edge. ==== +* + KDU = 3*NS - 3 + KU = N - KDU + 1 + KWH = KDU + 1 + NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 + KWV = KDU + 4 + NVE = N - KDU - KWV + 1 +* +* ==== Small-bulge multi-shift QR sweep ==== +* + CALL ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS, + $ W( KS ), H, LDH, ILOZ, IHIZ, Z, LDZ, WORK, + $ 3, H( KU, 1 ), LDH, NVE, H( KWV, 1 ), LDH, + $ NHO, H( KU, KWH ), LDH ) + END IF +* +* ==== Note progress (or the lack of it). ==== +* + IF( LD.GT.0 ) THEN + NDFL = 1 + ELSE + NDFL = NDFL + 1 + END IF +* +* ==== End of main loop ==== + 70 CONTINUE +* +* ==== Iteration limit exceeded. Set INFO to show where +* . the problem occurred and exit. ==== +* + INFO = KBOT + 80 CONTINUE + END IF +* +* ==== Return the optimal value of LWORK. ==== +* + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) +* +* ==== End of ZLAQR0 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqr1.f b/2.3-1/src/fortran/lapack/zlaqr1.f new file mode 100644 index 00000000..b8c1c3d4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr1.f @@ -0,0 +1,97 @@ + SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + COMPLEX*16 S1, S2 + INTEGER LDH, N +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), V( * ) +* .. +* +* Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a +* scalar multiple of the first column of the product +* +* (*) K = (H - s1*I)*(H - s2*I) +* +* scaling to avoid overflows and most underflows. +* +* This is useful for starting double implicit shift bulges +* in the QR algorithm. +* +* +* N (input) integer +* Order of the matrix H. N must be either 2 or 3. +* +* H (input) COMPLEX*16 array of dimension (LDH,N) +* The 2-by-2 or 3-by-3 matrix H in (*). +* +* LDH (input) integer +* The leading dimension of H as declared in +* the calling procedure. LDH.GE.N +* +* S1 (input) COMPLEX*16 +* S2 S1 and S2 are the shifts defining K in (*) above. +* +* V (output) COMPLEX*16 array of dimension N +* A scalar multiple of the first column of the +* matrix K in (*). +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ) ) + DOUBLE PRECISION RZERO + PARAMETER ( RZERO = 0.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 CDUM + DOUBLE PRECISION H21S, H31S, S +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. + IF( N.EQ.2 ) THEN + S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) + IF( S.EQ.RZERO ) THEN + V( 1 ) = ZERO + V( 2 ) = ZERO + ELSE + H21S = H( 2, 1 ) / S + V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-S1 )* + $ ( ( H( 1, 1 )-S2 ) / S ) + V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 ) + END IF + ELSE + S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) + + $ CABS1( H( 3, 1 ) ) + IF( S.EQ.ZERO ) THEN + V( 1 ) = ZERO + V( 2 ) = ZERO + V( 3 ) = ZERO + ELSE + H21S = H( 2, 1 ) / S + H31S = H( 3, 1 ) / S + V( 1 ) = ( H( 1, 1 )-S1 )*( ( H( 1, 1 )-S2 ) / S ) + + $ H( 1, 2 )*H21S + H( 1, 3 )*H31S + V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 ) + H( 2, 3 )*H31S + V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-S1-S2 ) + H21S*H( 3, 2 ) + END IF + END IF + END diff --git a/2.3-1/src/fortran/lapack/zlaqr2.f b/2.3-1/src/fortran/lapack/zlaqr2.f new file mode 100644 index 00000000..0add51ae --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr2.f @@ -0,0 +1,437 @@ + SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, + $ NV, WV, LDWV, WORK, LWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, + $ LDZ, LWORK, N, ND, NH, NS, NV, NW + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ), + $ WORK( * ), WV( LDWV, * ), Z( LDZ, * ) +* .. +* +* This subroutine is identical to ZLAQR3 except that it avoids +* recursion by calling ZLAHQR instead of ZLAQR4. +* +* +* ****************************************************************** +* Aggressive early deflation: +* +* This subroutine accepts as input an upper Hessenberg matrix +* H and performs an unitary similarity transformation +* designed to detect and deflate fully converged eigenvalues from +* a trailing principal submatrix. On output H has been over- +* written by a new Hessenberg matrix that is a perturbation of +* an unitary similarity transformation of H. It is to be +* hoped that the final version of H has many zero subdiagonal +* entries. +* +* ****************************************************************** +* WANTT (input) LOGICAL +* If .TRUE., then the Hessenberg matrix H is fully updated +* so that the triangular Schur factor may be +* computed (in cooperation with the calling subroutine). +* If .FALSE., then only enough of H is updated to preserve +* the eigenvalues. +* +* WANTZ (input) LOGICAL +* If .TRUE., then the unitary matrix Z is updated so +* so that the unitary Schur factor may be computed +* (in cooperation with the calling subroutine). +* If .FALSE., then Z is not referenced. +* +* N (input) INTEGER +* The order of the matrix H and (if WANTZ is .TRUE.) the +* order of the unitary matrix Z. +* +* KTOP (input) INTEGER +* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0. +* KBOT and KTOP together determine an isolated block +* along the diagonal of the Hessenberg matrix. +* +* KBOT (input) INTEGER +* It is assumed without a check that either +* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together +* determine an isolated block along the diagonal of the +* Hessenberg matrix. +* +* NW (input) INTEGER +* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1). +* +* H (input/output) COMPLEX*16 array, dimension (LDH,N) +* On input the initial N-by-N section of H stores the +* Hessenberg matrix undergoing aggressive early deflation. +* On output H has been transformed by a unitary +* similarity transformation, perturbed, and the returned +* to Hessenberg form that (it is to be hoped) has some +* zero subdiagonal entries. +* +* LDH (input) integer +* Leading dimension of H just as declared in the calling +* subroutine. N .LE. LDH +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI) +* IF WANTZ is .TRUE., then on output, the unitary +* similarity transformation mentioned above has been +* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ is .FALSE., then Z is unreferenced. +* +* LDZ (input) integer +* The leading dimension of Z just as declared in the +* calling subroutine. 1 .LE. LDZ. +* +* NS (output) integer +* The number of unconverged (ie approximate) eigenvalues +* returned in SR and SI that may be used as shifts by the +* calling subroutine. +* +* ND (output) integer +* The number of converged eigenvalues uncovered by this +* subroutine. +* +* SH (output) COMPLEX*16 array, dimension KBOT +* On output, approximate eigenvalues that may +* be used for shifts are stored in SH(KBOT-ND-NS+1) +* through SR(KBOT-ND). Converged eigenvalues are +* stored in SH(KBOT-ND+1) through SH(KBOT). +* +* V (workspace) COMPLEX*16 array, dimension (LDV,NW) +* An NW-by-NW work array. +* +* LDV (input) integer scalar +* The leading dimension of V just as declared in the +* calling subroutine. NW .LE. LDV +* +* NH (input) integer scalar +* The number of columns of T. NH.GE.NW. +* +* T (workspace) COMPLEX*16 array, dimension (LDT,NW) +* +* LDT (input) integer +* The leading dimension of T just as declared in the +* calling subroutine. NW .LE. LDT +* +* NV (input) integer +* The number of rows of work array WV available for +* workspace. NV.GE.NW. +* +* WV (workspace) COMPLEX*16 array, dimension (LDWV,NW) +* +* LDWV (input) integer +* The leading dimension of W just as declared in the +* calling subroutine. NW .LE. LDV +* +* WORK (workspace) COMPLEX*16 array, dimension LWORK. +* On exit, WORK(1) is set to an estimate of the optimal value +* of LWORK for the given values of N, NW, KTOP and KBOT. +* +* LWORK (input) integer +* The dimension of the work array WORK. LWORK = 2*NW +* suffices, but greater efficiency may result from larger +* values of LWORK. +* +* If LWORK = -1, then a workspace query is assumed; ZLAQR2 +* only estimates the optimal workspace size for the given +* values of N, NW, KTOP and KBOT. The estimate is returned +* in WORK(1). No error message related to LWORK is issued +* by XERBLA. Neither H nor Z are accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================== +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION RZERO, RONE + PARAMETER ( RZERO = 0.0d0, RONE = 1.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 BETA, CDUM, S, TAU + DOUBLE PRECISION FOO, SAFMAX, SAFMIN, SMLNUM, ULP + INTEGER I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN, + $ KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWKOPT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR, + $ ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNGHR +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* ==== Estimate optimal workspace. ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + IF( JW.LE.2 ) THEN + LWKOPT = 1 + ELSE +* +* ==== Workspace query call to ZGEHRD ==== +* + CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK1 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to ZUNGHR ==== +* + CALL ZUNGHR( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK2 = INT( WORK( 1 ) ) +* +* ==== Optimal workspace ==== +* + LWKOPT = JW + MAX( LWK1, LWK2 ) + END IF +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) + RETURN + END IF +* +* ==== Nothing to do ... +* ... for an empty active block ... ==== + NS = 0 + ND = 0 + IF( KTOP.GT.KBOT ) + $ RETURN +* ... nor for an empty deflation window. ==== + IF( NW.LT.1 ) + $ RETURN +* +* ==== Machine constants ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = RONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Setup deflation window ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + KWTOP = KBOT - JW + 1 + IF( KWTOP.EQ.KTOP ) THEN + S = ZERO + ELSE + S = H( KWTOP, KWTOP-1 ) + END IF +* + IF( KBOT.EQ.KWTOP ) THEN +* +* ==== 1-by-1 deflation window: not much to do ==== +* + SH( KWTOP ) = H( KWTOP, KWTOP ) + NS = 1 + ND = 0 + IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP, + $ KWTOP ) ) ) ) THEN + NS = 0 + ND = 1 + IF( KWTOP.GT.KTOP ) + $ H( KWTOP, KWTOP-1 ) = ZERO + END IF + RETURN + END IF +* +* ==== Convert to spike-triangular form. (In case of a +* . rare QR failure, this routine continues to do +* . aggressive early deflation using that part of +* . the deflation window that converged using INFQR +* . here and there to keep track.) ==== +* + CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT ) + CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 ) +* + CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV ) + CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1, + $ JW, V, LDV, INFQR ) +* +* ==== Deflation detection loop ==== +* + NS = JW + ILST = INFQR + 1 + DO 10 KNT = INFQR + 1, JW +* +* ==== Small spike tip deflation test ==== +* + FOO = CABS1( T( NS, NS ) ) + IF( FOO.EQ.RZERO ) + $ FOO = CABS1( S ) + IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) ) + $ THEN +* +* ==== One more converged eigenvalue ==== +* + NS = NS - 1 + ELSE +* +* ==== One undflatable eigenvalue. Move it up out of the +* . way. (ZTREXC can not fail in this case.) ==== +* + IFST = NS + CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO ) + ILST = ILST + 1 + END IF + 10 CONTINUE +* +* ==== Return to Hessenberg form ==== +* + IF( NS.EQ.0 ) + $ S = ZERO +* + IF( NS.LT.JW ) THEN +* +* ==== sorting the diagonal of T improves accuracy for +* . graded matrices. ==== +* + DO 30 I = INFQR + 1, NS + IFST = I + DO 20 J = I + 1, NS + IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) ) + $ IFST = J + 20 CONTINUE + ILST = I + IF( IFST.NE.ILST ) + $ CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO ) + 30 CONTINUE + END IF +* +* ==== Restore shift/eigenvalue array from T ==== +* + DO 40 I = INFQR + 1, JW + SH( KWTOP+I-1 ) = T( I, I ) + 40 CONTINUE +* +* + IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN +* +* ==== Reflect spike back into lower triangle ==== +* + CALL ZCOPY( NS, V, LDV, WORK, 1 ) + DO 50 I = 1, NS + WORK( I ) = DCONJG( WORK( I ) ) + 50 CONTINUE + BETA = WORK( 1 ) + CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU ) + WORK( 1 ) = ONE +* + CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT ) +* + CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT, + $ WORK( JW+1 ) ) + CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV, + $ WORK( JW+1 ) ) +* + CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + END IF +* +* ==== Copy updated reduced window into place ==== +* + IF( KWTOP.GT.1 ) + $ H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) ) + CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH ) + CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ), + $ LDH+1 ) +* +* ==== Accumulate orthogonal matrix in order update +* . H and Z, if requested. (A modified version +* . of ZUNGHR that accumulates block Householder +* . transformations into V directly might be +* . marginally more efficient than the following.) ==== +* + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN + CALL ZUNGHR( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + CALL ZGEMM( 'N', 'N', JW, NS, NS, ONE, V, LDV, T, LDT, ZERO, + $ WV, LDWV ) + CALL ZLACPY( 'A', JW, NS, WV, LDWV, V, LDV ) + END IF +* +* ==== Update vertical slab in H ==== +* + IF( WANTT ) THEN + LTOP = 1 + ELSE + LTOP = KTOP + END IF + DO 60 KROW = LTOP, KWTOP - 1, NV + KLN = MIN( NV, KWTOP-KROW ) + CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ), + $ LDH, V, LDV, ZERO, WV, LDWV ) + CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH ) + 60 CONTINUE +* +* ==== Update horizontal slab in H ==== +* + IF( WANTT ) THEN + DO 70 KCOL = KBOT + 1, N, NH + KLN = MIN( NH, N-KCOL+1 ) + CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV, + $ H( KWTOP, KCOL ), LDH, ZERO, T, LDT ) + CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ), + $ LDH ) + 70 CONTINUE + END IF +* +* ==== Update vertical slab in Z ==== +* + IF( WANTZ ) THEN + DO 80 KROW = ILOZ, IHIZ, NV + KLN = MIN( NV, IHIZ-KROW+1 ) + CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ), + $ LDZ, V, LDV, ZERO, WV, LDWV ) + CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ), + $ LDZ ) + 80 CONTINUE + END IF + END IF +* +* ==== Return the number of deflations ... ==== +* + ND = JW - NS +* +* ==== ... and the number of shifts. (Subtracting +* . INFQR from the spike length takes care +* . of the case of a rare QR failure while +* . calculating eigenvalues of the deflation +* . window.) ==== +* + NS = NS - INFQR +* +* ==== Return optimal workspace. ==== +* + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) +* +* ==== End of ZLAQR2 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqr3.f b/2.3-1/src/fortran/lapack/zlaqr3.f new file mode 100644 index 00000000..e9bf393a --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr3.f @@ -0,0 +1,448 @@ + SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT, + $ NV, WV, LDWV, WORK, LWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV, + $ LDZ, LWORK, N, ND, NH, NS, NV, NW + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ), + $ WORK( * ), WV( LDWV, * ), Z( LDZ, * ) +* .. +* +* ****************************************************************** +* Aggressive early deflation: +* +* This subroutine accepts as input an upper Hessenberg matrix +* H and performs an unitary similarity transformation +* designed to detect and deflate fully converged eigenvalues from +* a trailing principal submatrix. On output H has been over- +* written by a new Hessenberg matrix that is a perturbation of +* an unitary similarity transformation of H. It is to be +* hoped that the final version of H has many zero subdiagonal +* entries. +* +* ****************************************************************** +* WANTT (input) LOGICAL +* If .TRUE., then the Hessenberg matrix H is fully updated +* so that the triangular Schur factor may be +* computed (in cooperation with the calling subroutine). +* If .FALSE., then only enough of H is updated to preserve +* the eigenvalues. +* +* WANTZ (input) LOGICAL +* If .TRUE., then the unitary matrix Z is updated so +* so that the unitary Schur factor may be computed +* (in cooperation with the calling subroutine). +* If .FALSE., then Z is not referenced. +* +* N (input) INTEGER +* The order of the matrix H and (if WANTZ is .TRUE.) the +* order of the unitary matrix Z. +* +* KTOP (input) INTEGER +* It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0. +* KBOT and KTOP together determine an isolated block +* along the diagonal of the Hessenberg matrix. +* +* KBOT (input) INTEGER +* It is assumed without a check that either +* KBOT = N or H(KBOT+1,KBOT)=0. KBOT and KTOP together +* determine an isolated block along the diagonal of the +* Hessenberg matrix. +* +* NW (input) INTEGER +* Deflation window size. 1 .LE. NW .LE. (KBOT-KTOP+1). +* +* H (input/output) COMPLEX*16 array, dimension (LDH,N) +* On input the initial N-by-N section of H stores the +* Hessenberg matrix undergoing aggressive early deflation. +* On output H has been transformed by a unitary +* similarity transformation, perturbed, and the returned +* to Hessenberg form that (it is to be hoped) has some +* zero subdiagonal entries. +* +* LDH (input) integer +* Leading dimension of H just as declared in the calling +* subroutine. N .LE. LDH +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI) +* IF WANTZ is .TRUE., then on output, the unitary +* similarity transformation mentioned above has been +* accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ is .FALSE., then Z is unreferenced. +* +* LDZ (input) integer +* The leading dimension of Z just as declared in the +* calling subroutine. 1 .LE. LDZ. +* +* NS (output) integer +* The number of unconverged (ie approximate) eigenvalues +* returned in SR and SI that may be used as shifts by the +* calling subroutine. +* +* ND (output) integer +* The number of converged eigenvalues uncovered by this +* subroutine. +* +* SH (output) COMPLEX*16 array, dimension KBOT +* On output, approximate eigenvalues that may +* be used for shifts are stored in SH(KBOT-ND-NS+1) +* through SR(KBOT-ND). Converged eigenvalues are +* stored in SH(KBOT-ND+1) through SH(KBOT). +* +* V (workspace) COMPLEX*16 array, dimension (LDV,NW) +* An NW-by-NW work array. +* +* LDV (input) integer scalar +* The leading dimension of V just as declared in the +* calling subroutine. NW .LE. LDV +* +* NH (input) integer scalar +* The number of columns of T. NH.GE.NW. +* +* T (workspace) COMPLEX*16 array, dimension (LDT,NW) +* +* LDT (input) integer +* The leading dimension of T just as declared in the +* calling subroutine. NW .LE. LDT +* +* NV (input) integer +* The number of rows of work array WV available for +* workspace. NV.GE.NW. +* +* WV (workspace) COMPLEX*16 array, dimension (LDWV,NW) +* +* LDWV (input) integer +* The leading dimension of W just as declared in the +* calling subroutine. NW .LE. LDV +* +* WORK (workspace) COMPLEX*16 array, dimension LWORK. +* On exit, WORK(1) is set to an estimate of the optimal value +* of LWORK for the given values of N, NW, KTOP and KBOT. +* +* LWORK (input) integer +* The dimension of the work array WORK. LWORK = 2*NW +* suffices, but greater efficiency may result from larger +* values of LWORK. +* +* If LWORK = -1, then a workspace query is assumed; ZLAQR3 +* only estimates the optimal workspace size for the given +* values of N, NW, KTOP and KBOT. The estimate is returned +* in WORK(1). No error message related to LWORK is issued +* by XERBLA. Neither H nor Z are accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================== +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION RZERO, RONE + PARAMETER ( RZERO = 0.0d0, RONE = 1.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 BETA, CDUM, S, TAU + DOUBLE PRECISION FOO, SAFMAX, SAFMIN, SMLNUM, ULP + INTEGER I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN, + $ KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWK3, + $ LWKOPT, NMIN +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + INTEGER ILAENV + EXTERNAL DLAMCH, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR, + $ ZLAQR4, ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNGHR +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* ==== Estimate optimal workspace. ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + IF( JW.LE.2 ) THEN + LWKOPT = 1 + ELSE +* +* ==== Workspace query call to ZGEHRD ==== +* + CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK1 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to ZUNGHR ==== +* + CALL ZUNGHR( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO ) + LWK2 = INT( WORK( 1 ) ) +* +* ==== Workspace query call to ZLAQR4 ==== +* + CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH, 1, JW, V, + $ LDV, WORK, -1, INFQR ) + LWK3 = INT( WORK( 1 ) ) +* +* ==== Optimal workspace ==== +* + LWKOPT = MAX( JW+MAX( LWK1, LWK2 ), LWK3 ) + END IF +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) + RETURN + END IF +* +* ==== Nothing to do ... +* ... for an empty active block ... ==== + NS = 0 + ND = 0 + IF( KTOP.GT.KBOT ) + $ RETURN +* ... nor for an empty deflation window. ==== + IF( NW.LT.1 ) + $ RETURN +* +* ==== Machine constants ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = RONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Setup deflation window ==== +* + JW = MIN( NW, KBOT-KTOP+1 ) + KWTOP = KBOT - JW + 1 + IF( KWTOP.EQ.KTOP ) THEN + S = ZERO + ELSE + S = H( KWTOP, KWTOP-1 ) + END IF +* + IF( KBOT.EQ.KWTOP ) THEN +* +* ==== 1-by-1 deflation window: not much to do ==== +* + SH( KWTOP ) = H( KWTOP, KWTOP ) + NS = 1 + ND = 0 + IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP, + $ KWTOP ) ) ) ) THEN + + NS = 0 + ND = 1 + IF( KWTOP.GT.KTOP ) + $ H( KWTOP, KWTOP-1 ) = ZERO + END IF + RETURN + END IF +* +* ==== Convert to spike-triangular form. (In case of a +* . rare QR failure, this routine continues to do +* . aggressive early deflation using that part of +* . the deflation window that converged using INFQR +* . here and there to keep track.) ==== +* + CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT ) + CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 ) +* + CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV ) + NMIN = ILAENV( 12, 'ZLAQR3', 'SV', JW, 1, JW, LWORK ) + IF( JW.GT.NMIN ) THEN + CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1, + $ JW, V, LDV, WORK, LWORK, INFQR ) + ELSE + CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1, + $ JW, V, LDV, INFQR ) + END IF +* +* ==== Deflation detection loop ==== +* + NS = JW + ILST = INFQR + 1 + DO 10 KNT = INFQR + 1, JW +* +* ==== Small spike tip deflation test ==== +* + FOO = CABS1( T( NS, NS ) ) + IF( FOO.EQ.RZERO ) + $ FOO = CABS1( S ) + IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) ) + $ THEN +* +* ==== One more converged eigenvalue ==== +* + NS = NS - 1 + ELSE +* +* ==== One undflatable eigenvalue. Move it up out of the +* . way. (ZTREXC can not fail in this case.) ==== +* + IFST = NS + CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO ) + ILST = ILST + 1 + END IF + 10 CONTINUE +* +* ==== Return to Hessenberg form ==== +* + IF( NS.EQ.0 ) + $ S = ZERO +* + IF( NS.LT.JW ) THEN +* +* ==== sorting the diagonal of T improves accuracy for +* . graded matrices. ==== +* + DO 30 I = INFQR + 1, NS + IFST = I + DO 20 J = I + 1, NS + IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) ) + $ IFST = J + 20 CONTINUE + ILST = I + IF( IFST.NE.ILST ) + $ CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO ) + 30 CONTINUE + END IF +* +* ==== Restore shift/eigenvalue array from T ==== +* + DO 40 I = INFQR + 1, JW + SH( KWTOP+I-1 ) = T( I, I ) + 40 CONTINUE +* +* + IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN +* +* ==== Reflect spike back into lower triangle ==== +* + CALL ZCOPY( NS, V, LDV, WORK, 1 ) + DO 50 I = 1, NS + WORK( I ) = DCONJG( WORK( I ) ) + 50 CONTINUE + BETA = WORK( 1 ) + CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU ) + WORK( 1 ) = ONE +* + CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT ) +* + CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT, + $ WORK( JW+1 ) ) + CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT, + $ WORK( JW+1 ) ) + CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV, + $ WORK( JW+1 ) ) +* + CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + END IF +* +* ==== Copy updated reduced window into place ==== +* + IF( KWTOP.GT.1 ) + $ H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) ) + CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH ) + CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ), + $ LDH+1 ) +* +* ==== Accumulate orthogonal matrix in order update +* . H and Z, if requested. (A modified version +* . of ZUNGHR that accumulates block Householder +* . transformations into V directly might be +* . marginally more efficient than the following.) ==== +* + IF( NS.GT.1 .AND. S.NE.ZERO ) THEN + CALL ZUNGHR( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ), + $ LWORK-JW, INFO ) + CALL ZGEMM( 'N', 'N', JW, NS, NS, ONE, V, LDV, T, LDT, ZERO, + $ WV, LDWV ) + CALL ZLACPY( 'A', JW, NS, WV, LDWV, V, LDV ) + END IF +* +* ==== Update vertical slab in H ==== +* + IF( WANTT ) THEN + LTOP = 1 + ELSE + LTOP = KTOP + END IF + DO 60 KROW = LTOP, KWTOP - 1, NV + KLN = MIN( NV, KWTOP-KROW ) + CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ), + $ LDH, V, LDV, ZERO, WV, LDWV ) + CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH ) + 60 CONTINUE +* +* ==== Update horizontal slab in H ==== +* + IF( WANTT ) THEN + DO 70 KCOL = KBOT + 1, N, NH + KLN = MIN( NH, N-KCOL+1 ) + CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV, + $ H( KWTOP, KCOL ), LDH, ZERO, T, LDT ) + CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ), + $ LDH ) + 70 CONTINUE + END IF +* +* ==== Update vertical slab in Z ==== +* + IF( WANTZ ) THEN + DO 80 KROW = ILOZ, IHIZ, NV + KLN = MIN( NV, IHIZ-KROW+1 ) + CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ), + $ LDZ, V, LDV, ZERO, WV, LDWV ) + CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ), + $ LDZ ) + 80 CONTINUE + END IF + END IF +* +* ==== Return the number of deflations ... ==== +* + ND = JW - NS +* +* ==== ... and the number of shifts. (Subtracting +* . INFQR from the spike length takes care +* . of the case of a rare QR failure while +* . calculating eigenvalues of the deflation +* . window.) ==== +* + NS = NS - INFQR +* +* ==== Return optimal workspace. ==== +* + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) +* +* ==== End of ZLAQR3 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqr4.f b/2.3-1/src/fortran/lapack/zlaqr4.f new file mode 100644 index 00000000..eef7f00a --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr4.f @@ -0,0 +1,602 @@ + SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, + $ IHIZ, Z, LDZ, WORK, LWORK, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * ) +* .. +* +* This subroutine implements one level of recursion for ZLAQR0. +* It is a complete implementation of the small bulge multi-shift +* QR algorithm. It may be called by ZLAQR0 and, for large enough +* deflation window size, it may be called by ZLAQR3. This +* subroutine is identical to ZLAQR0 except that it calls ZLAQR2 +* instead of ZLAQR3. +* +* Purpose +* ======= +* +* ZLAQR4 computes the eigenvalues of a Hessenberg matrix H +* and, optionally, the matrices T and Z from the Schur decomposition +* H = Z T Z**H, where T is an upper triangular matrix (the +* Schur form), and Z is the unitary matrix of Schur vectors. +* +* Optionally Z may be postmultiplied into an input unitary +* matrix Q so that this routine can give the Schur factorization +* of a matrix A which has been reduced to the Hessenberg form H +* by the unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H. +* +* Arguments +* ========= +* +* WANTT (input) LOGICAL +* = .TRUE. : the full Schur form T is required; +* = .FALSE.: only eigenvalues are required. +* +* WANTZ (input) LOGICAL +* = .TRUE. : the matrix of Schur vectors Z is required; +* = .FALSE.: Schur vectors are not required. +* +* N (input) INTEGER +* The order of the matrix H. N .GE. 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* It is assumed that H is already upper triangular in rows +* and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1, +* H(ILO,ILO-1) is zero. ILO and IHI are normally set by a +* previous call to ZGEBAL, and then passed to ZGEHRD when the +* matrix output by ZGEBAL is reduced to Hessenberg form. +* Otherwise, ILO and IHI should be set to 1 and N, +* respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. +* If N = 0, then ILO = 1 and IHI = 0. +* +* H (input/output) COMPLEX*16 array, dimension (LDH,N) +* On entry, the upper Hessenberg matrix H. +* On exit, if INFO = 0 and WANTT is .TRUE., then H +* contains the upper triangular matrix T from the Schur +* decomposition (the Schur form). If INFO = 0 and WANT is +* .FALSE., then the contents of H are unspecified on exit. +* (The output value of H when INFO.GT.0 is given under the +* description of INFO below.) +* +* This subroutine may explicitly set H(i,j) = 0 for i.GT.j and +* j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N. +* +* LDH (input) INTEGER +* The leading dimension of the array H. LDH .GE. max(1,N). +* +* W (output) COMPLEX*16 array, dimension (N) +* The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored +* in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are +* stored in the same order as on the diagonal of the Schur +* form returned in H, with W(i) = H(i,i). +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,IHI) +* If WANTZ is .FALSE., then Z is not referenced. +* If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is +* replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the +* orthogonal Schur factor of H(ILO:IHI,ILO:IHI). +* (The output value of Z when INFO.GT.0 is given under +* the description of INFO below.) +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. if WANTZ is .TRUE. +* then LDZ.GE.MAX(1,IHIZ). Otherwize, LDZ.GE.1. +* +* WORK (workspace/output) COMPLEX*16 array, dimension LWORK +* On exit, if LWORK = -1, WORK(1) returns an estimate of +* the optimal value for LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK .GE. max(1,N) +* is sufficient, but LWORK typically as large as 6*N may +* be required for optimal performance. A workspace query +* to determine the optimal workspace size is recommended. +* +* If LWORK = -1, then ZLAQR4 does a workspace query. +* In this case, ZLAQR4 checks the input parameters and +* estimates the optimal workspace size for the given +* values of N, ILO and IHI. The estimate is returned +* in WORK(1). No error message related to LWORK is +* issued by XERBLA. Neither H nor Z are accessed. +* +* +* INFO (output) INTEGER +* = 0: successful exit +* .GT. 0: if INFO = i, ZLAQR4 failed to compute all of +* the eigenvalues. Elements 1:ilo-1 and i+1:n of WR +* and WI contain those eigenvalues which have been +* successfully computed. (Failures are rare.) +* +* If INFO .GT. 0 and WANT is .FALSE., then on exit, +* the remaining unconverged eigenvalues are the eigen- +* values of the upper Hessenberg matrix rows and +* columns ILO through INFO of the final, output +* value of H. +* +* If INFO .GT. 0 and WANTT is .TRUE., then on exit +* +* (*) (initial value of H)*U = U*(final value of H) +* +* where U is a unitary matrix. The final +* value of H is upper Hessenberg and triangular in +* rows and columns INFO+1 through IHI. +* +* If INFO .GT. 0 and WANTZ is .TRUE., then on exit +* +* (final value of Z(ILO:IHI,ILOZ:IHIZ) +* = (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U +* +* where U is the unitary matrix in (*) (regard- +* less of the value of WANTT.) +* +* If INFO .GT. 0 and WANTZ is .FALSE., then Z is not +* accessed. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ================================================================ +* References: +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 +* Performance, SIAM Journal of Matrix Analysis, volume 23, pages +* 929--947, 2002. +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part II: Aggressive Early Deflation, SIAM Journal +* of Matrix Analysis, volume 23, pages 948--973, 2002. +* +* ================================================================ +* .. Parameters .. +* +* ==== Matrices of order NTINY or smaller must be processed by +* . ZLAHQR because of insufficient subdiagonal scratch space. +* . (This is a hard limit.) ==== +* +* ==== Exceptional deflation windows: try to cure rare +* . slow convergence by increasing the size of the +* . deflation window after KEXNW iterations. ===== +* +* ==== Exceptional shifts: try to cure rare slow convergence +* . with ad-hoc exceptional shifts every KEXSH iterations. +* . The constants WILK1 and WILK2 are used to form the +* . exceptional shifts. ==== +* + INTEGER NTINY + PARAMETER ( NTINY = 11 ) + INTEGER KEXNW, KEXSH + PARAMETER ( KEXNW = 5, KEXSH = 6 ) + DOUBLE PRECISION WILK1 + PARAMETER ( WILK1 = 0.75d0 ) + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION TWO + PARAMETER ( TWO = 2.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 AA, BB, CC, CDUM, DD, DET, RTDISC, SWAP, TR2 + DOUBLE PRECISION S + INTEGER I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS, + $ KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS, + $ LWKOPT, NDFL, NH, NHO, NIBBLE, NMIN, NS, NSMAX, + $ NSR, NVE, NW, NWMAX, NWR + LOGICAL NWINC, SORTED + CHARACTER JBCMPZ*2 +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Local Arrays .. + COMPLEX*16 ZDUM( 1, 1 ) +* .. +* .. External Subroutines .. + EXTERNAL ZLACPY, ZLAHQR, ZLAQR2, ZLAQR5 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DIMAG, INT, MAX, MIN, MOD, + $ SQRT +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. + INFO = 0 +* +* ==== Quick return for N = 0: nothing to do. ==== +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = ONE + RETURN + END IF +* +* ==== Set up job flags for ILAENV. ==== +* + IF( WANTT ) THEN + JBCMPZ( 1: 1 ) = 'S' + ELSE + JBCMPZ( 1: 1 ) = 'E' + END IF + IF( WANTZ ) THEN + JBCMPZ( 2: 2 ) = 'V' + ELSE + JBCMPZ( 2: 2 ) = 'N' + END IF +* +* ==== Tiny matrices must use ZLAHQR. ==== +* + IF( N.LE.NTINY ) THEN +* +* ==== Estimate optimal workspace. ==== +* + LWKOPT = 1 + IF( LWORK.NE.-1 ) + $ CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ, + $ IHIZ, Z, LDZ, INFO ) + ELSE +* +* ==== Use small bulge multi-shift QR with aggressive early +* . deflation on larger-than-tiny matrices. ==== +* +* ==== Hope for the best. ==== +* + INFO = 0 +* +* ==== NWR = recommended deflation window size. At this +* . point, N .GT. NTINY = 11, so there is enough +* . subdiagonal workspace for NWR.GE.2 as required. +* . (In fact, there is enough subdiagonal space for +* . NWR.GE.3.) ==== +* + NWR = ILAENV( 13, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NWR = MAX( 2, NWR ) + NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR ) + NW = NWR +* +* ==== NSR = recommended number of simultaneous shifts. +* . At this point N .GT. NTINY = 11, so there is at +* . enough subdiagonal workspace for NSR to be even +* . and greater than or equal to two as required. ==== +* + NSR = ILAENV( 15, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO ) + NSR = MAX( 2, NSR-MOD( NSR, 2 ) ) +* +* ==== Estimate optimal workspace ==== +* +* ==== Workspace query call to ZLAQR2 ==== +* + CALL ZLAQR2( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, W, H, LDH, N, H, LDH, N, H, + $ LDH, WORK, -1 ) +* +* ==== Optimal workspace = MAX(ZLAQR5, ZLAQR2) ==== +* + LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) ) +* +* ==== Quick return in case of workspace query. ==== +* + IF( LWORK.EQ.-1 ) THEN + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) + RETURN + END IF +* +* ==== ZLAHQR/ZLAQR0 crossover point ==== +* + NMIN = ILAENV( 12, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NMIN = MAX( NTINY, NMIN ) +* +* ==== Nibble crossover point ==== +* + NIBBLE = ILAENV( 14, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + NIBBLE = MAX( 0, NIBBLE ) +* +* ==== Accumulate reflections during ttswp? Use block +* . 2-by-2 structure during matrix-matrix multiply? ==== +* + KACC22 = ILAENV( 16, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK ) + KACC22 = MAX( 0, KACC22 ) + KACC22 = MIN( 2, KACC22 ) +* +* ==== NWMAX = the largest possible deflation window for +* . which there is sufficient workspace. ==== +* + NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 ) +* +* ==== NSMAX = the Largest number of simultaneous shifts +* . for which there is sufficient workspace. ==== +* + NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 ) + NSMAX = NSMAX - MOD( NSMAX, 2 ) +* +* ==== NDFL: an iteration count restarted at deflation. ==== +* + NDFL = 1 +* +* ==== ITMAX = iteration limit ==== +* + ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) ) +* +* ==== Last row and column in the active block ==== +* + KBOT = IHI +* +* ==== Main Loop ==== +* + DO 70 IT = 1, ITMAX +* +* ==== Done when KBOT falls below ILO ==== +* + IF( KBOT.LT.ILO ) + $ GO TO 80 +* +* ==== Locate active block ==== +* + DO 10 K = KBOT, ILO + 1, -1 + IF( H( K, K-1 ).EQ.ZERO ) + $ GO TO 20 + 10 CONTINUE + K = ILO + 20 CONTINUE + KTOP = K +* +* ==== Select deflation window size ==== +* + NH = KBOT - KTOP + 1 + IF( NDFL.LT.KEXNW .OR. NH.LT.NW ) THEN +* +* ==== Typical deflation window. If possible and +* . advisable, nibble the entire active block. +* . If not, use size NWR or NWR+1 depending upon +* . which has the smaller corresponding subdiagonal +* . entry (a heuristic). ==== +* + NWINC = .TRUE. + IF( NH.LE.MIN( NMIN, NWMAX ) ) THEN + NW = NH + ELSE + NW = MIN( NWR, NH, NWMAX ) + IF( NW.LT.NWMAX ) THEN + IF( NW.GE.NH-1 ) THEN + NW = NH + ELSE + KWTOP = KBOT - NW + 1 + IF( CABS1( H( KWTOP, KWTOP-1 ) ).GT. + $ CABS1( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1 + END IF + END IF + END IF + ELSE +* +* ==== Exceptional deflation window. If there have +* . been no deflations in KEXNW or more iterations, +* . then vary the deflation window size. At first, +* . because, larger windows are, in general, more +* . powerful than smaller ones, rapidly increase the +* . window up to the maximum reasonable and possible. +* . Then maybe try a slightly smaller window. ==== +* + IF( NWINC .AND. NW.LT.MIN( NWMAX, NH ) ) THEN + NW = MIN( NWMAX, NH, 2*NW ) + ELSE + NWINC = .FALSE. + IF( NW.EQ.NH .AND. NH.GT.2 ) + $ NW = NH - 1 + END IF + END IF +* +* ==== Aggressive early deflation: +* . split workspace under the subdiagonal into +* . - an nw-by-nw work array V in the lower +* . left-hand-corner, +* . - an NW-by-at-least-NW-but-more-is-better +* . (NW-by-NHO) horizontal work array along +* . the bottom edge, +* . - an at-least-NW-but-more-is-better (NHV-by-NW) +* . vertical work array along the left-hand-edge. +* . ==== +* + KV = N - NW + 1 + KT = NW + 1 + NHO = ( N-NW-1 ) - KT + 1 + KWV = NW + 2 + NVE = ( N-NW ) - KWV + 1 +* +* ==== Aggressive early deflation ==== +* + CALL ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ, + $ IHIZ, Z, LDZ, LS, LD, W, H( KV, 1 ), LDH, NHO, + $ H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, WORK, + $ LWORK ) +* +* ==== Adjust KBOT accounting for new deflations. ==== +* + KBOT = KBOT - LD +* +* ==== KS points to the shifts. ==== +* + KS = KBOT - LS + 1 +* +* ==== Skip an expensive QR sweep if there is a (partly +* . heuristic) reason to expect that many eigenvalues +* . will deflate without it. Here, the QR sweep is +* . skipped if many eigenvalues have just been deflated +* . or if the remaining active block is small. +* + IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT- + $ KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN +* +* ==== NS = nominal number of simultaneous shifts. +* . This may be lowered (slightly) if ZLAQR2 +* . did not provide that many shifts. ==== +* + NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) ) + NS = NS - MOD( NS, 2 ) +* +* ==== If there have been no deflations +* . in a multiple of KEXSH iterations, +* . then try exceptional shifts. +* . Otherwise use shifts provided by +* . ZLAQR2 above or from the eigenvalues +* . of a trailing principal submatrix. ==== +* + IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN + KS = KBOT - NS + 1 + DO 30 I = KBOT, KS + 1, -2 + W( I ) = H( I, I ) + WILK1*CABS1( H( I, I-1 ) ) + W( I-1 ) = W( I ) + 30 CONTINUE + ELSE +* +* ==== Got NS/2 or fewer shifts? Use ZLAHQR +* . on a trailing principal submatrix to +* . get more. (Since NS.LE.NSMAX.LE.(N+6)/9, +* . there is enough space below the subdiagonal +* . to fit an NS-by-NS scratch array.) ==== +* + IF( KBOT-KS+1.LE.NS / 2 ) THEN + KS = KBOT - NS + 1 + KT = N - NS + 1 + CALL ZLACPY( 'A', NS, NS, H( KS, KS ), LDH, + $ H( KT, 1 ), LDH ) + CALL ZLAHQR( .false., .false., NS, 1, NS, + $ H( KT, 1 ), LDH, W( KS ), 1, 1, ZDUM, + $ 1, INF ) + KS = KS + INF +* +* ==== In case of a rare QR failure use +* . eigenvalues of the trailing 2-by-2 +* . principal submatrix. Scale to avoid +* . overflows, underflows and subnormals. +* . (The scale factor S can not be zero, +* . because H(KBOT,KBOT-1) is nonzero.) ==== +* + IF( KS.GE.KBOT ) THEN + S = CABS1( H( KBOT-1, KBOT-1 ) ) + + $ CABS1( H( KBOT, KBOT-1 ) ) + + $ CABS1( H( KBOT-1, KBOT ) ) + + $ CABS1( H( KBOT, KBOT ) ) + AA = H( KBOT-1, KBOT-1 ) / S + CC = H( KBOT, KBOT-1 ) / S + BB = H( KBOT-1, KBOT ) / S + DD = H( KBOT, KBOT ) / S + TR2 = ( AA+DD ) / TWO + DET = ( AA-TR2 )*( DD-TR2 ) - BB*CC + RTDISC = SQRT( -DET ) + W( KBOT-1 ) = ( TR2+RTDISC )*S + W( KBOT ) = ( TR2-RTDISC )*S +* + KS = KBOT - 1 + END IF + END IF +* + IF( KBOT-KS+1.GT.NS ) THEN +* +* ==== Sort the shifts (Helps a little) ==== +* + SORTED = .false. + DO 50 K = KBOT, KS + 1, -1 + IF( SORTED ) + $ GO TO 60 + SORTED = .true. + DO 40 I = KS, K - 1 + IF( CABS1( W( I ) ).LT.CABS1( W( I+1 ) ) ) + $ THEN + SORTED = .false. + SWAP = W( I ) + W( I ) = W( I+1 ) + W( I+1 ) = SWAP + END IF + 40 CONTINUE + 50 CONTINUE + 60 CONTINUE + END IF + END IF +* +* ==== If there are only two shifts, then use +* . only one. ==== +* + IF( KBOT-KS+1.EQ.2 ) THEN + IF( CABS1( W( KBOT )-H( KBOT, KBOT ) ).LT. + $ CABS1( W( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN + W( KBOT-1 ) = W( KBOT ) + ELSE + W( KBOT ) = W( KBOT-1 ) + END IF + END IF +* +* ==== Use up to NS of the the smallest magnatiude +* . shifts. If there aren't NS shifts available, +* . then use them all, possibly dropping one to +* . make the number of shifts even. ==== +* + NS = MIN( NS, KBOT-KS+1 ) + NS = NS - MOD( NS, 2 ) + KS = KBOT - NS + 1 +* +* ==== Small-bulge multi-shift QR sweep: +* . split workspace under the subdiagonal into +* . - a KDU-by-KDU work array U in the lower +* . left-hand-corner, +* . - a KDU-by-at-least-KDU-but-more-is-better +* . (KDU-by-NHo) horizontal work array WH along +* . the bottom edge, +* . - and an at-least-KDU-but-more-is-better-by-KDU +* . (NVE-by-KDU) vertical work WV arrow along +* . the left-hand-edge. ==== +* + KDU = 3*NS - 3 + KU = N - KDU + 1 + KWH = KDU + 1 + NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1 + KWV = KDU + 4 + NVE = N - KDU - KWV + 1 +* +* ==== Small-bulge multi-shift QR sweep ==== +* + CALL ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS, + $ W( KS ), H, LDH, ILOZ, IHIZ, Z, LDZ, WORK, + $ 3, H( KU, 1 ), LDH, NVE, H( KWV, 1 ), LDH, + $ NHO, H( KU, KWH ), LDH ) + END IF +* +* ==== Note progress (or the lack of it). ==== +* + IF( LD.GT.0 ) THEN + NDFL = 1 + ELSE + NDFL = NDFL + 1 + END IF +* +* ==== End of main loop ==== + 70 CONTINUE +* +* ==== Iteration limit exceeded. Set INFO to show where +* . the problem occurred and exit. ==== +* + INFO = KBOT + 80 CONTINUE + END IF +* +* ==== Return the optimal value of LWORK. ==== +* + WORK( 1 ) = DCMPLX( LWKOPT, 0 ) +* +* ==== End of ZLAQR4 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/zlaqr5.f b/2.3-1/src/fortran/lapack/zlaqr5.f new file mode 100644 index 00000000..fa8de7bb --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaqr5.f @@ -0,0 +1,809 @@ + SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S, + $ H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV, + $ WV, LDWV, NH, WH, LDWH ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV, + $ LDWH, LDWV, LDZ, N, NH, NSHFTS, NV + LOGICAL WANTT, WANTZ +* .. +* .. Array Arguments .. + COMPLEX*16 H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ), + $ WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * ) +* .. +* +* This auxiliary subroutine called by ZLAQR0 performs a +* single small-bulge multi-shift QR sweep. +* +* WANTT (input) logical scalar +* WANTT = .true. if the triangular Schur factor +* is being computed. WANTT is set to .false. otherwise. +* +* WANTZ (input) logical scalar +* WANTZ = .true. if the unitary Schur factor is being +* computed. WANTZ is set to .false. otherwise. +* +* KACC22 (input) integer with value 0, 1, or 2. +* Specifies the computation mode of far-from-diagonal +* orthogonal updates. +* = 0: ZLAQR5 does not accumulate reflections and does not +* use matrix-matrix multiply to update far-from-diagonal +* matrix entries. +* = 1: ZLAQR5 accumulates reflections and uses matrix-matrix +* multiply to update the far-from-diagonal matrix entries. +* = 2: ZLAQR5 accumulates reflections, uses matrix-matrix +* multiply to update the far-from-diagonal matrix entries, +* and takes advantage of 2-by-2 block structure during +* matrix multiplies. +* +* N (input) integer scalar +* N is the order of the Hessenberg matrix H upon which this +* subroutine operates. +* +* KTOP (input) integer scalar +* KBOT (input) integer scalar +* These are the first and last rows and columns of an +* isolated diagonal block upon which the QR sweep is to be +* applied. It is assumed without a check that +* either KTOP = 1 or H(KTOP,KTOP-1) = 0 +* and +* either KBOT = N or H(KBOT+1,KBOT) = 0. +* +* NSHFTS (input) integer scalar +* NSHFTS gives the number of simultaneous shifts. NSHFTS +* must be positive and even. +* +* S (input) COMPLEX*16 array of size (NSHFTS) +* S contains the shifts of origin that define the multi- +* shift QR sweep. +* +* H (input/output) COMPLEX*16 array of size (LDH,N) +* On input H contains a Hessenberg matrix. On output a +* multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied +* to the isolated diagonal block in rows and columns KTOP +* through KBOT. +* +* LDH (input) integer scalar +* LDH is the leading dimension of H just as declared in the +* calling procedure. LDH.GE.MAX(1,N). +* +* ILOZ (input) INTEGER +* IHIZ (input) INTEGER +* Specify the rows of Z to which transformations must be +* applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N +* +* Z (input/output) COMPLEX*16 array of size (LDZ,IHI) +* If WANTZ = .TRUE., then the QR Sweep unitary +* similarity transformation is accumulated into +* Z(ILOZ:IHIZ,ILO:IHI) from the right. +* If WANTZ = .FALSE., then Z is unreferenced. +* +* LDZ (input) integer scalar +* LDA is the leading dimension of Z just as declared in +* the calling procedure. LDZ.GE.N. +* +* V (workspace) COMPLEX*16 array of size (LDV,NSHFTS/2) +* +* LDV (input) integer scalar +* LDV is the leading dimension of V as declared in the +* calling procedure. LDV.GE.3. +* +* U (workspace) COMPLEX*16 array of size +* (LDU,3*NSHFTS-3) +* +* LDU (input) integer scalar +* LDU is the leading dimension of U just as declared in the +* in the calling subroutine. LDU.GE.3*NSHFTS-3. +* +* NH (input) integer scalar +* NH is the number of columns in array WH available for +* workspace. NH.GE.1. +* +* WH (workspace) COMPLEX*16 array of size (LDWH,NH) +* +* LDWH (input) integer scalar +* Leading dimension of WH just as declared in the +* calling procedure. LDWH.GE.3*NSHFTS-3. +* +* NV (input) integer scalar +* NV is the number of rows in WV agailable for workspace. +* NV.GE.1. +* +* WV (workspace) COMPLEX*16 array of size +* (LDWV,3*NSHFTS-3) +* +* LDWV (input) integer scalar +* LDWV is the leading dimension of WV as declared in the +* in the calling subroutine. LDWV.GE.NV. +* +* ================================================================ +* Based on contributions by +* Karen Braman and Ralph Byers, Department of Mathematics, +* University of Kansas, USA +* +* ============================================================ +* Reference: +* +* K. Braman, R. Byers and R. Mathias, The Multi-Shift QR +* Algorithm Part I: Maintaining Well Focused Shifts, and +* Level 3 Performance, SIAM Journal of Matrix Analysis, +* volume 23, pages 929--947, 2002. +* +* ============================================================ +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0d0, 0.0d0 ), + $ ONE = ( 1.0d0, 0.0d0 ) ) + DOUBLE PRECISION RZERO, RONE + PARAMETER ( RZERO = 0.0d0, RONE = 1.0d0 ) +* .. +* .. Local Scalars .. + COMPLEX*16 ALPHA, BETA, CDUM, REFSUM + DOUBLE PRECISION H11, H12, H21, H22, SAFMAX, SAFMIN, SCL, + $ SMLNUM, TST1, TST2, ULP + INTEGER I2, I4, INCOL, J, J2, J4, JBOT, JCOL, JLEN, + $ JROW, JTOP, K, K1, KDU, KMS, KNZ, KRCOL, KZS, + $ M, M22, MBOT, MEND, MSTART, MTOP, NBMPS, NDCOL, + $ NS, NU + LOGICAL ACCUM, BLK22, BMP22 +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Intrinsic Functions .. +* + INTRINSIC ABS, DBLE, DCONJG, DIMAG, MAX, MIN, MOD +* .. +* .. Local Arrays .. + COMPLEX*16 VT( 3 ) +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, ZGEMM, ZLACPY, ZLAQR1, ZLARFG, ZLASET, + $ ZTRMM +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* ==== If there are no shifts, then there is nothing to do. ==== +* + IF( NSHFTS.LT.2 ) + $ RETURN +* +* ==== If the active block is empty or 1-by-1, then there +* . is nothing to do. ==== +* + IF( KTOP.GE.KBOT ) + $ RETURN +* +* ==== NSHFTS is supposed to be even, but if is odd, +* . then simply reduce it by one. ==== +* + NS = NSHFTS - MOD( NSHFTS, 2 ) +* +* ==== Machine constants for deflation ==== +* + SAFMIN = DLAMCH( 'SAFE MINIMUM' ) + SAFMAX = RONE / SAFMIN + CALL DLABAD( SAFMIN, SAFMAX ) + ULP = DLAMCH( 'PRECISION' ) + SMLNUM = SAFMIN*( DBLE( N ) / ULP ) +* +* ==== Use accumulated reflections to update far-from-diagonal +* . entries ? ==== +* + ACCUM = ( KACC22.EQ.1 ) .OR. ( KACC22.EQ.2 ) +* +* ==== If so, exploit the 2-by-2 block structure? ==== +* + BLK22 = ( NS.GT.2 ) .AND. ( KACC22.EQ.2 ) +* +* ==== clear trash ==== +* + IF( KTOP+2.LE.KBOT ) + $ H( KTOP+2, KTOP ) = ZERO +* +* ==== NBMPS = number of 2-shift bulges in the chain ==== +* + NBMPS = NS / 2 +* +* ==== KDU = width of slab ==== +* + KDU = 6*NBMPS - 3 +* +* ==== Create and chase chains of NBMPS bulges ==== +* + DO 210 INCOL = 3*( 1-NBMPS ) + KTOP - 1, KBOT - 2, 3*NBMPS - 2 + NDCOL = INCOL + KDU + IF( ACCUM ) + $ CALL ZLASET( 'ALL', KDU, KDU, ZERO, ONE, U, LDU ) +* +* ==== Near-the-diagonal bulge chase. The following loop +* . performs the near-the-diagonal part of a small bulge +* . multi-shift QR sweep. Each 6*NBMPS-2 column diagonal +* . chunk extends from column INCOL to column NDCOL +* . (including both column INCOL and column NDCOL). The +* . following loop chases a 3*NBMPS column long chain of +* . NBMPS bulges 3*NBMPS-2 columns to the right. (INCOL +* . may be less than KTOP and and NDCOL may be greater than +* . KBOT indicating phantom columns from which to chase +* . bulges before they are actually introduced or to which +* . to chase bulges beyond column KBOT.) ==== +* + DO 140 KRCOL = INCOL, MIN( INCOL+3*NBMPS-3, KBOT-2 ) +* +* ==== Bulges number MTOP to MBOT are active double implicit +* . shift bulges. There may or may not also be small +* . 2-by-2 bulge, if there is room. The inactive bulges +* . (if any) must wait until the active bulges have moved +* . down the diagonal to make room. The phantom matrix +* . paradigm described above helps keep track. ==== +* + MTOP = MAX( 1, ( ( KTOP-1 )-KRCOL+2 ) / 3+1 ) + MBOT = MIN( NBMPS, ( KBOT-KRCOL ) / 3 ) + M22 = MBOT + 1 + BMP22 = ( MBOT.LT.NBMPS ) .AND. ( KRCOL+3*( M22-1 ) ).EQ. + $ ( KBOT-2 ) +* +* ==== Generate reflections to chase the chain right +* . one column. (The minimum value of K is KTOP-1.) ==== +* + DO 10 M = MTOP, MBOT + K = KRCOL + 3*( M-1 ) + IF( K.EQ.KTOP-1 ) THEN + CALL ZLAQR1( 3, H( KTOP, KTOP ), LDH, S( 2*M-1 ), + $ S( 2*M ), V( 1, M ) ) + ALPHA = V( 1, M ) + CALL ZLARFG( 3, ALPHA, V( 2, M ), 1, V( 1, M ) ) + ELSE + BETA = H( K+1, K ) + V( 2, M ) = H( K+2, K ) + V( 3, M ) = H( K+3, K ) + CALL ZLARFG( 3, BETA, V( 2, M ), 1, V( 1, M ) ) +* +* ==== A Bulge may collapse because of vigilant +* . deflation or destructive underflow. (The +* . initial bulge is always collapsed.) Use +* . the two-small-subdiagonals trick to try +* . to get it started again. If V(2,M).NE.0 and +* . V(3,M) = H(K+3,K+1) = H(K+3,K+2) = 0, then +* . this bulge is collapsing into a zero +* . subdiagonal. It will be restarted next +* . trip through the loop.) +* + IF( V( 1, M ).NE.ZERO .AND. + $ ( V( 3, M ).NE.ZERO .OR. ( H( K+3, + $ K+1 ).EQ.ZERO .AND. H( K+3, K+2 ).EQ.ZERO ) ) ) + $ THEN +* +* ==== Typical case: not collapsed (yet). ==== +* + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + ELSE +* +* ==== Atypical case: collapsed. Attempt to +* . reintroduce ignoring H(K+1,K). If the +* . fill resulting from the new reflector +* . is too large, then abandon it. +* . Otherwise, use the new one. ==== +* + CALL ZLAQR1( 3, H( K+1, K+1 ), LDH, S( 2*M-1 ), + $ S( 2*M ), VT ) + SCL = CABS1( VT( 1 ) ) + CABS1( VT( 2 ) ) + + $ CABS1( VT( 3 ) ) + IF( SCL.NE.RZERO ) THEN + VT( 1 ) = VT( 1 ) / SCL + VT( 2 ) = VT( 2 ) / SCL + VT( 3 ) = VT( 3 ) / SCL + END IF +* +* ==== The following is the traditional and +* . conservative two-small-subdiagonals +* . test. ==== +* . + IF( CABS1( H( K+1, K ) )* + $ ( CABS1( VT( 2 ) )+CABS1( VT( 3 ) ) ).GT.ULP* + $ CABS1( VT( 1 ) )*( CABS1( H( K, + $ K ) )+CABS1( H( K+1, K+1 ) )+CABS1( H( K+2, + $ K+2 ) ) ) ) THEN +* +* ==== Starting a new bulge here would +* . create non-negligible fill. If +* . the old reflector is diagonal (only +* . possible with underflows), then +* . change it to I. Otherwise, use +* . it with trepidation. ==== +* + IF( V( 2, M ).EQ.ZERO .AND. V( 3, M ).EQ.ZERO ) + $ THEN + V( 1, M ) = ZERO + ELSE + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + END IF + ELSE +* +* ==== Stating a new bulge here would +* . create only negligible fill. +* . Replace the old reflector with +* . the new one. ==== +* + ALPHA = VT( 1 ) + CALL ZLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) ) + REFSUM = H( K+1, K ) + + $ H( K+2, K )*DCONJG( VT( 2 ) ) + + $ H( K+3, K )*DCONJG( VT( 3 ) ) + H( K+1, K ) = H( K+1, K ) - + $ DCONJG( VT( 1 ) )*REFSUM + H( K+2, K ) = ZERO + H( K+3, K ) = ZERO + V( 1, M ) = VT( 1 ) + V( 2, M ) = VT( 2 ) + V( 3, M ) = VT( 3 ) + END IF + END IF + END IF + 10 CONTINUE +* +* ==== Generate a 2-by-2 reflection, if needed. ==== +* + K = KRCOL + 3*( M22-1 ) + IF( BMP22 ) THEN + IF( K.EQ.KTOP-1 ) THEN + CALL ZLAQR1( 2, H( K+1, K+1 ), LDH, S( 2*M22-1 ), + $ S( 2*M22 ), V( 1, M22 ) ) + BETA = V( 1, M22 ) + CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) ) + ELSE + BETA = H( K+1, K ) + V( 2, M22 ) = H( K+2, K ) + CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) ) + H( K+1, K ) = BETA + H( K+2, K ) = ZERO + END IF + ELSE +* +* ==== Initialize V(1,M22) here to avoid possible undefined +* . variable problems later. ==== +* + V( 1, M22 ) = ZERO + END IF +* +* ==== Multiply H by reflections from the left ==== +* + IF( ACCUM ) THEN + JBOT = MIN( NDCOL, KBOT ) + ELSE IF( WANTT ) THEN + JBOT = N + ELSE + JBOT = KBOT + END IF + DO 30 J = MAX( KTOP, KRCOL ), JBOT + MEND = MIN( MBOT, ( J-KRCOL+2 ) / 3 ) + DO 20 M = MTOP, MEND + K = KRCOL + 3*( M-1 ) + REFSUM = DCONJG( V( 1, M ) )* + $ ( H( K+1, J )+DCONJG( V( 2, M ) )* + $ H( K+2, J )+DCONJG( V( 3, M ) )*H( K+3, J ) ) + H( K+1, J ) = H( K+1, J ) - REFSUM + H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M ) + H( K+3, J ) = H( K+3, J ) - REFSUM*V( 3, M ) + 20 CONTINUE + 30 CONTINUE + IF( BMP22 ) THEN + K = KRCOL + 3*( M22-1 ) + DO 40 J = MAX( K+1, KTOP ), JBOT + REFSUM = DCONJG( V( 1, M22 ) )* + $ ( H( K+1, J )+DCONJG( V( 2, M22 ) )* + $ H( K+2, J ) ) + H( K+1, J ) = H( K+1, J ) - REFSUM + H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M22 ) + 40 CONTINUE + END IF +* +* ==== Multiply H by reflections from the right. +* . Delay filling in the last row until the +* . vigilant deflation check is complete. ==== +* + IF( ACCUM ) THEN + JTOP = MAX( KTOP, INCOL ) + ELSE IF( WANTT ) THEN + JTOP = 1 + ELSE + JTOP = KTOP + END IF + DO 80 M = MTOP, MBOT + IF( V( 1, M ).NE.ZERO ) THEN + K = KRCOL + 3*( M-1 ) + DO 50 J = JTOP, MIN( KBOT, K+3 ) + REFSUM = V( 1, M )*( H( J, K+1 )+V( 2, M )* + $ H( J, K+2 )+V( 3, M )*H( J, K+3 ) ) + H( J, K+1 ) = H( J, K+1 ) - REFSUM + H( J, K+2 ) = H( J, K+2 ) - + $ REFSUM*DCONJG( V( 2, M ) ) + H( J, K+3 ) = H( J, K+3 ) - + $ REFSUM*DCONJG( V( 3, M ) ) + 50 CONTINUE +* + IF( ACCUM ) THEN +* +* ==== Accumulate U. (If necessary, update Z later +* . with with an efficient matrix-matrix +* . multiply.) ==== +* + KMS = K - INCOL + DO 60 J = MAX( 1, KTOP-INCOL ), KDU + REFSUM = V( 1, M )*( U( J, KMS+1 )+V( 2, M )* + $ U( J, KMS+2 )+V( 3, M )*U( J, KMS+3 ) ) + U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM + U( J, KMS+2 ) = U( J, KMS+2 ) - + $ REFSUM*DCONJG( V( 2, M ) ) + U( J, KMS+3 ) = U( J, KMS+3 ) - + $ REFSUM*DCONJG( V( 3, M ) ) + 60 CONTINUE + ELSE IF( WANTZ ) THEN +* +* ==== U is not accumulated, so update Z +* . now by multiplying by reflections +* . from the right. ==== +* + DO 70 J = ILOZ, IHIZ + REFSUM = V( 1, M )*( Z( J, K+1 )+V( 2, M )* + $ Z( J, K+2 )+V( 3, M )*Z( J, K+3 ) ) + Z( J, K+1 ) = Z( J, K+1 ) - REFSUM + Z( J, K+2 ) = Z( J, K+2 ) - + $ REFSUM*DCONJG( V( 2, M ) ) + Z( J, K+3 ) = Z( J, K+3 ) - + $ REFSUM*DCONJG( V( 3, M ) ) + 70 CONTINUE + END IF + END IF + 80 CONTINUE +* +* ==== Special case: 2-by-2 reflection (if needed) ==== +* + K = KRCOL + 3*( M22-1 ) + IF( BMP22 .AND. ( V( 1, M22 ).NE.ZERO ) ) THEN + DO 90 J = JTOP, MIN( KBOT, K+3 ) + REFSUM = V( 1, M22 )*( H( J, K+1 )+V( 2, M22 )* + $ H( J, K+2 ) ) + H( J, K+1 ) = H( J, K+1 ) - REFSUM + H( J, K+2 ) = H( J, K+2 ) - + $ REFSUM*DCONJG( V( 2, M22 ) ) + 90 CONTINUE +* + IF( ACCUM ) THEN + KMS = K - INCOL + DO 100 J = MAX( 1, KTOP-INCOL ), KDU + REFSUM = V( 1, M22 )*( U( J, KMS+1 )+V( 2, M22 )* + $ U( J, KMS+2 ) ) + U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM + U( J, KMS+2 ) = U( J, KMS+2 ) - + $ REFSUM*DCONJG( V( 2, M22 ) ) + 100 CONTINUE + ELSE IF( WANTZ ) THEN + DO 110 J = ILOZ, IHIZ + REFSUM = V( 1, M22 )*( Z( J, K+1 )+V( 2, M22 )* + $ Z( J, K+2 ) ) + Z( J, K+1 ) = Z( J, K+1 ) - REFSUM + Z( J, K+2 ) = Z( J, K+2 ) - + $ REFSUM*DCONJG( V( 2, M22 ) ) + 110 CONTINUE + END IF + END IF +* +* ==== Vigilant deflation check ==== +* + MSTART = MTOP + IF( KRCOL+3*( MSTART-1 ).LT.KTOP ) + $ MSTART = MSTART + 1 + MEND = MBOT + IF( BMP22 ) + $ MEND = MEND + 1 + IF( KRCOL.EQ.KBOT-2 ) + $ MEND = MEND + 1 + DO 120 M = MSTART, MEND + K = MIN( KBOT-1, KRCOL+3*( M-1 ) ) +* +* ==== The following convergence test requires that +* . the tradition small-compared-to-nearby-diagonals +* . criterion and the Ahues & Tisseur (LAWN 122, 1997) +* . criteria both be satisfied. The latter improves +* . accuracy in some examples. Falling back on an +* . alternate convergence criterion when TST1 or TST2 +* . is zero (as done here) is traditional but probably +* . unnecessary. ==== +* + IF( H( K+1, K ).NE.ZERO ) THEN + TST1 = CABS1( H( K, K ) ) + CABS1( H( K+1, K+1 ) ) + IF( TST1.EQ.RZERO ) THEN + IF( K.GE.KTOP+1 ) + $ TST1 = TST1 + CABS1( H( K, K-1 ) ) + IF( K.GE.KTOP+2 ) + $ TST1 = TST1 + CABS1( H( K, K-2 ) ) + IF( K.GE.KTOP+3 ) + $ TST1 = TST1 + CABS1( H( K, K-3 ) ) + IF( K.LE.KBOT-2 ) + $ TST1 = TST1 + CABS1( H( K+2, K+1 ) ) + IF( K.LE.KBOT-3 ) + $ TST1 = TST1 + CABS1( H( K+3, K+1 ) ) + IF( K.LE.KBOT-4 ) + $ TST1 = TST1 + CABS1( H( K+4, K+1 ) ) + END IF + IF( CABS1( H( K+1, K ) ).LE.MAX( SMLNUM, ULP*TST1 ) ) + $ THEN + H12 = MAX( CABS1( H( K+1, K ) ), + $ CABS1( H( K, K+1 ) ) ) + H21 = MIN( CABS1( H( K+1, K ) ), + $ CABS1( H( K, K+1 ) ) ) + H11 = MAX( CABS1( H( K+1, K+1 ) ), + $ CABS1( H( K, K )-H( K+1, K+1 ) ) ) + H22 = MIN( CABS1( H( K+1, K+1 ) ), + $ CABS1( H( K, K )-H( K+1, K+1 ) ) ) + SCL = H11 + H12 + TST2 = H22*( H11 / SCL ) +* + IF( TST2.EQ.RZERO .OR. H21*( H12 / SCL ).LE. + $ MAX( SMLNUM, ULP*TST2 ) )H( K+1, K ) = ZERO + END IF + END IF + 120 CONTINUE +* +* ==== Fill in the last row of each bulge. ==== +* + MEND = MIN( NBMPS, ( KBOT-KRCOL-1 ) / 3 ) + DO 130 M = MTOP, MEND + K = KRCOL + 3*( M-1 ) + REFSUM = V( 1, M )*V( 3, M )*H( K+4, K+3 ) + H( K+4, K+1 ) = -REFSUM + H( K+4, K+2 ) = -REFSUM*DCONJG( V( 2, M ) ) + H( K+4, K+3 ) = H( K+4, K+3 ) - + $ REFSUM*DCONJG( V( 3, M ) ) + 130 CONTINUE +* +* ==== End of near-the-diagonal bulge chase. ==== +* + 140 CONTINUE +* +* ==== Use U (if accumulated) to update far-from-diagonal +* . entries in H. If required, use U to update Z as +* . well. ==== +* + IF( ACCUM ) THEN + IF( WANTT ) THEN + JTOP = 1 + JBOT = N + ELSE + JTOP = KTOP + JBOT = KBOT + END IF + IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR. + $ ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN +* +* ==== Updates not exploiting the 2-by-2 block +* . structure of U. K1 and NU keep track of +* . the location and size of U in the special +* . cases of introducing bulges and chasing +* . bulges off the bottom. In these special +* . cases and in case the number of shifts +* . is NS = 2, there is no 2-by-2 block +* . structure to exploit. ==== +* + K1 = MAX( 1, KTOP-INCOL ) + NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1 +* +* ==== Horizontal Multiply ==== +* + DO 150 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH + JLEN = MIN( NH, JBOT-JCOL+1 ) + CALL ZGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ), + $ LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH, + $ LDWH ) + CALL ZLACPY( 'ALL', NU, JLEN, WH, LDWH, + $ H( INCOL+K1, JCOL ), LDH ) + 150 CONTINUE +* +* ==== Vertical multiply ==== +* + DO 160 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV + JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW ) + CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE, + $ H( JROW, INCOL+K1 ), LDH, U( K1, K1 ), + $ LDU, ZERO, WV, LDWV ) + CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV, + $ H( JROW, INCOL+K1 ), LDH ) + 160 CONTINUE +* +* ==== Z multiply (also vertical) ==== +* + IF( WANTZ ) THEN + DO 170 JROW = ILOZ, IHIZ, NV + JLEN = MIN( NV, IHIZ-JROW+1 ) + CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE, + $ Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ), + $ LDU, ZERO, WV, LDWV ) + CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV, + $ Z( JROW, INCOL+K1 ), LDZ ) + 170 CONTINUE + END IF + ELSE +* +* ==== Updates exploiting U's 2-by-2 block structure. +* . (I2, I4, J2, J4 are the last rows and columns +* . of the blocks.) ==== +* + I2 = ( KDU+1 ) / 2 + I4 = KDU + J2 = I4 - I2 + J4 = KDU +* +* ==== KZS and KNZ deal with the band of zeros +* . along the diagonal of one of the triangular +* . blocks. ==== +* + KZS = ( J4-J2 ) - ( NS+1 ) + KNZ = NS + 1 +* +* ==== Horizontal multiply ==== +* + DO 180 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH + JLEN = MIN( NH, JBOT-JCOL+1 ) +* +* ==== Copy bottom of H to top+KZS of scratch ==== +* (The first KZS rows get multiplied by zero.) ==== +* + CALL ZLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ), + $ LDH, WH( KZS+1, 1 ), LDWH ) +* +* ==== Multiply by U21' ==== +* + CALL ZLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH ) + CALL ZTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE, + $ U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ), + $ LDWH ) +* +* ==== Multiply top of H by U11' ==== +* + CALL ZGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU, + $ H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH ) +* +* ==== Copy top of H bottom of WH ==== +* + CALL ZLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH, + $ WH( I2+1, 1 ), LDWH ) +* +* ==== Multiply by U21' ==== +* + CALL ZTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE, + $ U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH ) +* +* ==== Multiply by U22 ==== +* + CALL ZGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE, + $ U( J2+1, I2+1 ), LDU, + $ H( INCOL+1+J2, JCOL ), LDH, ONE, + $ WH( I2+1, 1 ), LDWH ) +* +* ==== Copy it back ==== +* + CALL ZLACPY( 'ALL', KDU, JLEN, WH, LDWH, + $ H( INCOL+1, JCOL ), LDH ) + 180 CONTINUE +* +* ==== Vertical multiply ==== +* + DO 190 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV + JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW ) +* +* ==== Copy right of H to scratch (the first KZS +* . columns get multiplied by zero) ==== +* + CALL ZLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ), + $ LDH, WV( 1, 1+KZS ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV ) + CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE, + $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ), + $ LDWV ) +* +* ==== Multiply by U11 ==== +* + CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE, + $ H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV, + $ LDWV ) +* +* ==== Copy left of H to right of scratch ==== +* + CALL ZLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH, + $ WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE, + $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U22 ==== +* + CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE, + $ H( JROW, INCOL+1+J2 ), LDH, + $ U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ), + $ LDWV ) +* +* ==== Copy it back ==== +* + CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV, + $ H( JROW, INCOL+1 ), LDH ) + 190 CONTINUE +* +* ==== Multiply Z (also vertical) ==== +* + IF( WANTZ ) THEN + DO 200 JROW = ILOZ, IHIZ, NV + JLEN = MIN( NV, IHIZ-JROW+1 ) +* +* ==== Copy right of Z to left of scratch (first +* . KZS columns get multiplied by zero) ==== +* + CALL ZLACPY( 'ALL', JLEN, KNZ, + $ Z( JROW, INCOL+1+J2 ), LDZ, + $ WV( 1, 1+KZS ), LDWV ) +* +* ==== Multiply by U12 ==== +* + CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, + $ LDWV ) + CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE, + $ U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ), + $ LDWV ) +* +* ==== Multiply by U11 ==== +* + CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE, + $ Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE, + $ WV, LDWV ) +* +* ==== Copy left of Z to right of scratch ==== +* + CALL ZLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ), + $ LDZ, WV( 1, 1+I2 ), LDWV ) +* +* ==== Multiply by U21 ==== +* + CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE, + $ U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), + $ LDWV ) +* +* ==== Multiply by U22 ==== +* + CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE, + $ Z( JROW, INCOL+1+J2 ), LDZ, + $ U( J2+1, I2+1 ), LDU, ONE, + $ WV( 1, 1+I2 ), LDWV ) +* +* ==== Copy the result back to Z ==== +* + CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV, + $ Z( JROW, INCOL+1 ), LDZ ) + 200 CONTINUE + END IF + END IF + END IF + 210 CONTINUE +* +* ==== End of ZLAQR5 ==== +* + END diff --git a/2.3-1/src/fortran/lapack/zlarf.f b/2.3-1/src/fortran/lapack/zlarf.f new file mode 100644 index 00000000..d5233c8c --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarf.f @@ -0,0 +1,120 @@ + SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER INCV, LDC, M, N + COMPLEX*16 TAU +* .. +* .. Array Arguments .. + COMPLEX*16 C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZLARF applies a complex elementary reflector H to a complex M-by-N +* matrix C, from either the left or the right. H is represented in the +* form +* +* H = I - tau * v * v' +* +* where tau is a complex scalar and v is a complex vector. +* +* If tau = 0, then H is taken to be the unit matrix. +* +* To apply H' (the conjugate transpose of H), supply conjg(tau) instead +* tau. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* V (input) COMPLEX*16 array, dimension +* (1 + (M-1)*abs(INCV)) if SIDE = 'L' +* or (1 + (N-1)*abs(INCV)) if SIDE = 'R' +* The vector v in the representation of H. V is not used if +* TAU = 0. +* +* INCV (input) INTEGER +* The increment between elements of v. INCV <> 0. +* +* TAU (input) COMPLEX*16 +* The value tau in the representation of H. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension +* (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. External Subroutines .. + EXTERNAL ZGEMV, ZGERC +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C +* + IF( TAU.NE.ZERO ) THEN +* +* w := C' * v +* + CALL ZGEMV( 'Conjugate transpose', M, N, ONE, C, LDC, V, + $ INCV, ZERO, WORK, 1 ) +* +* C := C - v * w' +* + CALL ZGERC( M, N, -TAU, V, INCV, WORK, 1, C, LDC ) + END IF + ELSE +* +* Form C * H +* + IF( TAU.NE.ZERO ) THEN +* +* w := C * v +* + CALL ZGEMV( 'No transpose', M, N, ONE, C, LDC, V, INCV, + $ ZERO, WORK, 1 ) +* +* C := C - w * v' +* + CALL ZGERC( M, N, -TAU, WORK, 1, V, INCV, C, LDC ) + END IF + END IF + RETURN +* +* End of ZLARF +* + END diff --git a/2.3-1/src/fortran/lapack/zlarfb.f b/2.3-1/src/fortran/lapack/zlarfb.f new file mode 100644 index 00000000..af93ea58 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarfb.f @@ -0,0 +1,608 @@ + SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, + $ T, LDT, C, LDC, WORK, LDWORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, SIDE, STOREV, TRANS + INTEGER K, LDC, LDT, LDV, LDWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ), + $ WORK( LDWORK, * ) +* .. +* +* Purpose +* ======= +* +* ZLARFB applies a complex block reflector H or its transpose H' to a +* complex M-by-N matrix C, from either the left or the right. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply H or H' from the Left +* = 'R': apply H or H' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply H (No transpose) +* = 'C': apply H' (Conjugate transpose) +* +* DIRECT (input) CHARACTER*1 +* Indicates how H is formed from a product of elementary +* reflectors +* = 'F': H = H(1) H(2) . . . H(k) (Forward) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Indicates how the vectors which define the elementary +* reflectors are stored: +* = 'C': Columnwise +* = 'R': Rowwise +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* K (input) INTEGER +* The order of the matrix T (= the number of elementary +* reflectors whose product defines the block reflector). +* +* V (input) COMPLEX*16 array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,M) if STOREV = 'R' and SIDE = 'L' +* (LDV,N) if STOREV = 'R' and SIDE = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M); +* if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N); +* if STOREV = 'R', LDV >= K. +* +* T (input) COMPLEX*16 array, dimension (LDT,K) +* The triangular K-by-K matrix T in the representation of the +* block reflector. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by H*C or H'*C or C*H or C*H'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,K) +* +* LDWORK (input) INTEGER +* The leading dimension of the array WORK. +* If SIDE = 'L', LDWORK >= max(1,N); +* if SIDE = 'R', LDWORK >= max(1,M). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + CHARACTER TRANST + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL ZCOPY, ZGEMM, ZLACGV, ZTRMM +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* + IF( LSAME( TRANS, 'N' ) ) THEN + TRANST = 'C' + ELSE + TRANST = 'N' + END IF +* + IF( LSAME( STOREV, 'C' ) ) THEN +* + IF( LSAME( DIRECT, 'F' ) ) THEN +* +* Let V = ( V1 ) (first K rows) +* ( V2 ) +* where V1 is unit lower triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) +* +* W := C1' +* + DO 10 J = 1, K + CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + CALL ZLACGV( N, WORK( 1, J ), 1 ) + 10 CONTINUE +* +* W := W * V1 +* + CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, + $ K, ONE, V, LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C2'*V2 +* + CALL ZGEMM( 'Conjugate transpose', 'No transpose', N, + $ K, M-K, ONE, C( K+1, 1 ), LDC, + $ V( K+1, 1 ), LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V * W' +* + IF( M.GT.K ) THEN +* +* C2 := C2 - V2 * W' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', + $ M-K, N, K, -ONE, V( K+1, 1 ), LDV, WORK, + $ LDWORK, ONE, C( K+1, 1 ), LDC ) + END IF +* +* W := W * V1' +* + CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Unit', N, K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W' +* + DO 30 J = 1, K + DO 20 I = 1, N + C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) ) + 20 CONTINUE + 30 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V = (C1*V1 + C2*V2) (stored in WORK) +* +* W := C1 +* + DO 40 J = 1, K + CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 40 CONTINUE +* +* W := W * V1 +* + CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, + $ K, ONE, V, LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C2 * V2 +* + CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K, + $ ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV, + $ ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V' +* + IF( N.GT.K ) THEN +* +* C2 := C2 - W * V2' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M, + $ N-K, K, -ONE, WORK, LDWORK, V( K+1, 1 ), + $ LDV, ONE, C( 1, K+1 ), LDC ) + END IF +* +* W := W * V1' +* + CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Unit', M, K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 60 J = 1, K + DO 50 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 50 CONTINUE + 60 CONTINUE + END IF +* + ELSE +* +* Let V = ( V1 ) +* ( V2 ) (last K rows) +* where V2 is unit upper triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V = (C1'*V1 + C2'*V2) (stored in WORK) +* +* W := C2' +* + DO 70 J = 1, K + CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) + CALL ZLACGV( N, WORK( 1, J ), 1 ) + 70 CONTINUE +* +* W := W * V2 +* + CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, + $ K, ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C1'*V1 +* + CALL ZGEMM( 'Conjugate transpose', 'No transpose', N, + $ K, M-K, ONE, C, LDC, V, LDV, ONE, WORK, + $ LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V * W' +* + IF( M.GT.K ) THEN +* +* C1 := C1 - V1 * W' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', + $ M-K, N, K, -ONE, V, LDV, WORK, LDWORK, + $ ONE, C, LDC ) + END IF +* +* W := W * V2' +* + CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose', + $ 'Unit', N, K, ONE, V( M-K+1, 1 ), LDV, WORK, + $ LDWORK ) +* +* C2 := C2 - W' +* + DO 90 J = 1, K + DO 80 I = 1, N + C( M-K+J, I ) = C( M-K+J, I ) - + $ DCONJG( WORK( I, J ) ) + 80 CONTINUE + 90 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V = (C1*V1 + C2*V2) (stored in WORK) +* +* W := C2 +* + DO 100 J = 1, K + CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) + 100 CONTINUE +* +* W := W * V2 +* + CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, + $ K, ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C1 * V1 +* + CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K, + $ ONE, C, LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V' +* + IF( N.GT.K ) THEN +* +* C1 := C1 - W * V1' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M, + $ N-K, K, -ONE, WORK, LDWORK, V, LDV, ONE, + $ C, LDC ) + END IF +* +* W := W * V2' +* + CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose', + $ 'Unit', M, K, ONE, V( N-K+1, 1 ), LDV, WORK, + $ LDWORK ) +* +* C2 := C2 - W +* + DO 120 J = 1, K + DO 110 I = 1, M + C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) + 110 CONTINUE + 120 CONTINUE + END IF + END IF +* + ELSE IF( LSAME( STOREV, 'R' ) ) THEN +* + IF( LSAME( DIRECT, 'F' ) ) THEN +* +* Let V = ( V1 V2 ) (V1: first K columns) +* where V1 is unit upper triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) +* +* W := C1' +* + DO 130 J = 1, K + CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + CALL ZLACGV( N, WORK( 1, J ), 1 ) + 130 CONTINUE +* +* W := W * V1' +* + CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose', + $ 'Unit', N, K, ONE, V, LDV, WORK, LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C2'*V2' +* + CALL ZGEMM( 'Conjugate transpose', + $ 'Conjugate transpose', N, K, M-K, ONE, + $ C( K+1, 1 ), LDC, V( 1, K+1 ), LDV, ONE, + $ WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V' * W' +* + IF( M.GT.K ) THEN +* +* C2 := C2 - V2' * W' +* + CALL ZGEMM( 'Conjugate transpose', + $ 'Conjugate transpose', M-K, N, K, -ONE, + $ V( 1, K+1 ), LDV, WORK, LDWORK, ONE, + $ C( K+1, 1 ), LDC ) + END IF +* +* W := W * V1 +* + CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N, + $ K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W' +* + DO 150 J = 1, K + DO 140 I = 1, N + C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) ) + 140 CONTINUE + 150 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) +* +* W := C1 +* + DO 160 J = 1, K + CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 160 CONTINUE +* +* W := W * V1' +* + CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose', + $ 'Unit', M, K, ONE, V, LDV, WORK, LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C2 * V2' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M, + $ K, N-K, ONE, C( 1, K+1 ), LDC, + $ V( 1, K+1 ), LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V +* + IF( N.GT.K ) THEN +* +* C2 := C2 - W * V2 +* + CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V( 1, K+1 ), LDV, ONE, + $ C( 1, K+1 ), LDC ) + END IF +* +* W := W * V1 +* + CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M, + $ K, ONE, V, LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 180 J = 1, K + DO 170 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 170 CONTINUE + 180 CONTINUE +* + END IF +* + ELSE +* +* Let V = ( V1 V2 ) (V2: last K columns) +* where V2 is unit lower triangular. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C where C = ( C1 ) +* ( C2 ) +* +* W := C' * V' = (C1'*V1' + C2'*V2') (stored in WORK) +* +* W := C2' +* + DO 190 J = 1, K + CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 ) + CALL ZLACGV( N, WORK( 1, J ), 1 ) + 190 CONTINUE +* +* W := W * V2' +* + CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Unit', N, K, ONE, V( 1, M-K+1 ), LDV, WORK, + $ LDWORK ) + IF( M.GT.K ) THEN +* +* W := W + C1'*V1' +* + CALL ZGEMM( 'Conjugate transpose', + $ 'Conjugate transpose', N, K, M-K, ONE, C, + $ LDC, V, LDV, ONE, WORK, LDWORK ) + END IF +* +* W := W * T' or W * T +* + CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - V' * W' +* + IF( M.GT.K ) THEN +* +* C1 := C1 - V1' * W' +* + CALL ZGEMM( 'Conjugate transpose', + $ 'Conjugate transpose', M-K, N, K, -ONE, V, + $ LDV, WORK, LDWORK, ONE, C, LDC ) + END IF +* +* W := W * V2 +* + CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N, + $ K, ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK ) +* +* C2 := C2 - W' +* + DO 210 J = 1, K + DO 200 I = 1, N + C( M-K+J, I ) = C( M-K+J, I ) - + $ DCONJG( WORK( I, J ) ) + 200 CONTINUE + 210 CONTINUE +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' where C = ( C1 C2 ) +* +* W := C * V' = (C1*V1' + C2*V2') (stored in WORK) +* +* W := C2 +* + DO 220 J = 1, K + CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 ) + 220 CONTINUE +* +* W := W * V2' +* + CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Unit', M, K, ONE, V( 1, N-K+1 ), LDV, WORK, + $ LDWORK ) + IF( N.GT.K ) THEN +* +* W := W + C1 * V1' +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', M, + $ K, N-K, ONE, C, LDC, V, LDV, ONE, WORK, + $ LDWORK ) + END IF +* +* W := W * T or W * T' +* + CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, + $ ONE, T, LDT, WORK, LDWORK ) +* +* C := C - W * V +* + IF( N.GT.K ) THEN +* +* C1 := C1 - W * V1 +* + CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K, + $ -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC ) + END IF +* +* W := W * V2 +* + CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M, + $ K, ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK ) +* +* C1 := C1 - W +* + DO 240 J = 1, K + DO 230 I = 1, M + C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J ) + 230 CONTINUE + 240 CONTINUE +* + END IF +* + END IF + END IF +* + RETURN +* +* End of ZLARFB +* + END diff --git a/2.3-1/src/fortran/lapack/zlarfg.f b/2.3-1/src/fortran/lapack/zlarfg.f new file mode 100644 index 00000000..d024f928 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarfg.f @@ -0,0 +1,145 @@ + SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + COMPLEX*16 ALPHA, TAU +* .. +* .. Array Arguments .. + COMPLEX*16 X( * ) +* .. +* +* Purpose +* ======= +* +* ZLARFG generates a complex elementary reflector H of order n, such +* that +* +* H' * ( alpha ) = ( beta ), H' * H = I. +* ( x ) ( 0 ) +* +* where alpha and beta are scalars, with beta real, and x is an +* (n-1)-element complex vector. H is represented in the form +* +* H = I - tau * ( 1 ) * ( 1 v' ) , +* ( v ) +* +* where tau is a complex scalar and v is a complex (n-1)-element +* vector. Note that H is not hermitian. +* +* If the elements of x are all zero and alpha is real, then tau = 0 +* and H is taken to be the unit matrix. +* +* Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 . +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the elementary reflector. +* +* ALPHA (input/output) COMPLEX*16 +* On entry, the value alpha. +* On exit, it is overwritten with the value beta. +* +* X (input/output) COMPLEX*16 array, dimension +* (1+(N-2)*abs(INCX)) +* On entry, the vector x. +* On exit, it is overwritten with the vector v. +* +* INCX (input) INTEGER +* The increment between elements of X. INCX > 0. +* +* TAU (output) COMPLEX*16 +* The value tau. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER J, KNT + DOUBLE PRECISION ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLAPY3, DZNRM2 + COMPLEX*16 ZLADIV + EXTERNAL DLAMCH, DLAPY3, DZNRM2, ZLADIV +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DIMAG, SIGN +* .. +* .. External Subroutines .. + EXTERNAL ZDSCAL, ZSCAL +* .. +* .. Executable Statements .. +* + IF( N.LE.0 ) THEN + TAU = ZERO + RETURN + END IF +* + XNORM = DZNRM2( N-1, X, INCX ) + ALPHR = DBLE( ALPHA ) + ALPHI = DIMAG( ALPHA ) +* + IF( XNORM.EQ.ZERO .AND. ALPHI.EQ.ZERO ) THEN +* +* H = I +* + TAU = ZERO + ELSE +* +* general case +* + BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR ) + SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' ) + RSAFMN = ONE / SAFMIN +* + IF( ABS( BETA ).LT.SAFMIN ) THEN +* +* XNORM, BETA may be inaccurate; scale X and recompute them +* + KNT = 0 + 10 CONTINUE + KNT = KNT + 1 + CALL ZDSCAL( N-1, RSAFMN, X, INCX ) + BETA = BETA*RSAFMN + ALPHI = ALPHI*RSAFMN + ALPHR = ALPHR*RSAFMN + IF( ABS( BETA ).LT.SAFMIN ) + $ GO TO 10 +* +* New BETA is at most 1, at least SAFMIN +* + XNORM = DZNRM2( N-1, X, INCX ) + ALPHA = DCMPLX( ALPHR, ALPHI ) + BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR ) + TAU = DCMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA ) + ALPHA = ZLADIV( DCMPLX( ONE ), ALPHA-BETA ) + CALL ZSCAL( N-1, ALPHA, X, INCX ) +* +* If ALPHA is subnormal, it may lose relative accuracy +* + ALPHA = BETA + DO 20 J = 1, KNT + ALPHA = ALPHA*SAFMIN + 20 CONTINUE + ELSE + TAU = DCMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA ) + ALPHA = ZLADIV( DCMPLX( ONE ), ALPHA-BETA ) + CALL ZSCAL( N-1, ALPHA, X, INCX ) + ALPHA = BETA + END IF + END IF +* + RETURN +* +* End of ZLARFG +* + END diff --git a/2.3-1/src/fortran/lapack/zlarft.f b/2.3-1/src/fortran/lapack/zlarft.f new file mode 100644 index 00000000..412265e3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarft.f @@ -0,0 +1,224 @@ + SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, STOREV + INTEGER K, LDT, LDV, N +* .. +* .. Array Arguments .. + COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* ZLARFT forms the triangular factor T of a complex block reflector H +* of order n, which is defined as a product of k elementary reflectors. +* +* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; +* +* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. +* +* If STOREV = 'C', the vector which defines the elementary reflector +* H(i) is stored in the i-th column of the array V, and +* +* H = I - V * T * V' +* +* If STOREV = 'R', the vector which defines the elementary reflector +* H(i) is stored in the i-th row of the array V, and +* +* H = I - V' * T * V +* +* Arguments +* ========= +* +* DIRECT (input) CHARACTER*1 +* Specifies the order in which the elementary reflectors are +* multiplied to form the block reflector: +* = 'F': H = H(1) H(2) . . . H(k) (Forward) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Specifies how the vectors which define the elementary +* reflectors are stored (see also Further Details): +* = 'C': columnwise +* = 'R': rowwise +* +* N (input) INTEGER +* The order of the block reflector H. N >= 0. +* +* K (input) INTEGER +* The order of the triangular factor T (= the number of +* elementary reflectors). K >= 1. +* +* V (input/output) COMPLEX*16 array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,N) if STOREV = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i). +* +* T (output) COMPLEX*16 array, dimension (LDT,K) +* The k by k triangular factor T of the block reflector. +* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is +* lower triangular. The rest of the array is not used. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* Further Details +* =============== +* +* The shape of the matrix V and the storage of the vectors which define +* the H(i) is best illustrated by the following example with n = 5 and +* k = 3. The elements equal to 1 are not stored; the corresponding +* array elements are modified but restored on exit. The rest of the +* array is not used. +* +* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': +* +* V = ( 1 ) V = ( 1 v1 v1 v1 v1 ) +* ( v1 1 ) ( 1 v2 v2 v2 ) +* ( v1 v2 1 ) ( 1 v3 v3 ) +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* +* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': +* +* V = ( v1 v2 v3 ) V = ( v1 v1 1 ) +* ( v1 v2 v3 ) ( v2 v2 v2 1 ) +* ( 1 v2 v3 ) ( v3 v3 v3 v3 1 ) +* ( 1 v3 ) +* ( 1 ) +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, J + COMPLEX*16 VII +* .. +* .. External Subroutines .. + EXTERNAL ZGEMV, ZLACGV, ZTRMV +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 20 I = 1, K + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 10 J = 1, I + T( J, I ) = ZERO + 10 CONTINUE + ELSE +* +* general case +* + VII = V( I, I ) + V( I, I ) = ONE + IF( LSAME( STOREV, 'C' ) ) THEN +* +* T(1:i-1,i) := - tau(i) * V(i:n,1:i-1)' * V(i:n,i) +* + CALL ZGEMV( 'Conjugate transpose', N-I+1, I-1, + $ -TAU( I ), V( I, 1 ), LDV, V( I, I ), 1, + $ ZERO, T( 1, I ), 1 ) + ELSE +* +* T(1:i-1,i) := - tau(i) * V(1:i-1,i:n) * V(i,i:n)' +* + IF( I.LT.N ) + $ CALL ZLACGV( N-I, V( I, I+1 ), LDV ) + CALL ZGEMV( 'No transpose', I-1, N-I+1, -TAU( I ), + $ V( 1, I ), LDV, V( I, I ), LDV, ZERO, + $ T( 1, I ), 1 ) + IF( I.LT.N ) + $ CALL ZLACGV( N-I, V( I, I+1 ), LDV ) + END IF + V( I, I ) = VII +* +* T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i) +* + CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, + $ LDT, T( 1, I ), 1 ) + T( I, I ) = TAU( I ) + END IF + 20 CONTINUE + ELSE + DO 40 I = K, 1, -1 + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 30 J = I, K + T( J, I ) = ZERO + 30 CONTINUE + ELSE +* +* general case +* + IF( I.LT.K ) THEN + IF( LSAME( STOREV, 'C' ) ) THEN + VII = V( N-K+I, I ) + V( N-K+I, I ) = ONE +* +* T(i+1:k,i) := +* - tau(i) * V(1:n-k+i,i+1:k)' * V(1:n-k+i,i) +* + CALL ZGEMV( 'Conjugate transpose', N-K+I, K-I, + $ -TAU( I ), V( 1, I+1 ), LDV, V( 1, I ), + $ 1, ZERO, T( I+1, I ), 1 ) + V( N-K+I, I ) = VII + ELSE + VII = V( I, N-K+I ) + V( I, N-K+I ) = ONE +* +* T(i+1:k,i) := +* - tau(i) * V(i+1:k,1:n-k+i) * V(i,1:n-k+i)' +* + CALL ZLACGV( N-K+I-1, V( I, 1 ), LDV ) + CALL ZGEMV( 'No transpose', K-I, N-K+I, -TAU( I ), + $ V( I+1, 1 ), LDV, V( I, 1 ), LDV, ZERO, + $ T( I+1, I ), 1 ) + CALL ZLACGV( N-K+I-1, V( I, 1 ), LDV ) + V( I, N-K+I ) = VII + END IF +* +* T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i) +* + CALL ZTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, + $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) + END IF + T( I, I ) = TAU( I ) + END IF + 40 CONTINUE + END IF + RETURN +* +* End of ZLARFT +* + END diff --git a/2.3-1/src/fortran/lapack/zlarfx.f b/2.3-1/src/fortran/lapack/zlarfx.f new file mode 100644 index 00000000..327b9d03 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarfx.f @@ -0,0 +1,641 @@ + SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER LDC, M, N + COMPLEX*16 TAU +* .. +* .. Array Arguments .. + COMPLEX*16 C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZLARFX applies a complex elementary reflector H to a complex m by n +* matrix C, from either the left or the right. H is represented in the +* form +* +* H = I - tau * v * v' +* +* where tau is a complex scalar and v is a complex vector. +* +* If tau = 0, then H is taken to be the unit matrix +* +* This version uses inline code if H has order < 11. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* V (input) COMPLEX*16 array, dimension (M) if SIDE = 'L' +* or (N) if SIDE = 'R' +* The vector v in the representation of H. +* +* TAU (input) COMPLEX*16 +* The value tau in the representation of H. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the m by n matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDA >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* WORK is not referenced if H has order < 11. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER J + COMPLEX*16 SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9, + $ V1, V10, V2, V3, V4, V5, V6, V7, V8, V9 +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL ZGEMV, ZGERC +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* + IF( TAU.EQ.ZERO ) + $ RETURN + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C, where H has order m. +* + GO TO ( 10, 30, 50, 70, 90, 110, 130, 150, + $ 170, 190 )M +* +* Code for general M +* +* w := C'*v +* + CALL ZGEMV( 'Conjugate transpose', M, N, ONE, C, LDC, V, 1, + $ ZERO, WORK, 1 ) +* +* C := C - tau * v * w' +* + CALL ZGERC( M, N, -TAU, V, 1, WORK, 1, C, LDC ) + GO TO 410 + 10 CONTINUE +* +* Special code for 1 x 1 Householder +* + T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) ) + DO 20 J = 1, N + C( 1, J ) = T1*C( 1, J ) + 20 CONTINUE + GO TO 410 + 30 CONTINUE +* +* Special code for 2 x 2 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + DO 40 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + 40 CONTINUE + GO TO 410 + 50 CONTINUE +* +* Special code for 3 x 3 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + DO 60 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + 60 CONTINUE + GO TO 410 + 70 CONTINUE +* +* Special code for 4 x 4 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + DO 80 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + 80 CONTINUE + GO TO 410 + 90 CONTINUE +* +* Special code for 5 x 5 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + DO 100 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + 100 CONTINUE + GO TO 410 + 110 CONTINUE +* +* Special code for 6 x 6 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + V6 = DCONJG( V( 6 ) ) + T6 = TAU*DCONJG( V6 ) + DO 120 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + 120 CONTINUE + GO TO 410 + 130 CONTINUE +* +* Special code for 7 x 7 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + V6 = DCONJG( V( 6 ) ) + T6 = TAU*DCONJG( V6 ) + V7 = DCONJG( V( 7 ) ) + T7 = TAU*DCONJG( V7 ) + DO 140 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + 140 CONTINUE + GO TO 410 + 150 CONTINUE +* +* Special code for 8 x 8 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + V6 = DCONJG( V( 6 ) ) + T6 = TAU*DCONJG( V6 ) + V7 = DCONJG( V( 7 ) ) + T7 = TAU*DCONJG( V7 ) + V8 = DCONJG( V( 8 ) ) + T8 = TAU*DCONJG( V8 ) + DO 160 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + 160 CONTINUE + GO TO 410 + 170 CONTINUE +* +* Special code for 9 x 9 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + V6 = DCONJG( V( 6 ) ) + T6 = TAU*DCONJG( V6 ) + V7 = DCONJG( V( 7 ) ) + T7 = TAU*DCONJG( V7 ) + V8 = DCONJG( V( 8 ) ) + T8 = TAU*DCONJG( V8 ) + V9 = DCONJG( V( 9 ) ) + T9 = TAU*DCONJG( V9 ) + DO 180 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + C( 9, J ) = C( 9, J ) - SUM*T9 + 180 CONTINUE + GO TO 410 + 190 CONTINUE +* +* Special code for 10 x 10 Householder +* + V1 = DCONJG( V( 1 ) ) + T1 = TAU*DCONJG( V1 ) + V2 = DCONJG( V( 2 ) ) + T2 = TAU*DCONJG( V2 ) + V3 = DCONJG( V( 3 ) ) + T3 = TAU*DCONJG( V3 ) + V4 = DCONJG( V( 4 ) ) + T4 = TAU*DCONJG( V4 ) + V5 = DCONJG( V( 5 ) ) + T5 = TAU*DCONJG( V5 ) + V6 = DCONJG( V( 6 ) ) + T6 = TAU*DCONJG( V6 ) + V7 = DCONJG( V( 7 ) ) + T7 = TAU*DCONJG( V7 ) + V8 = DCONJG( V( 8 ) ) + T8 = TAU*DCONJG( V8 ) + V9 = DCONJG( V( 9 ) ) + T9 = TAU*DCONJG( V9 ) + V10 = DCONJG( V( 10 ) ) + T10 = TAU*DCONJG( V10 ) + DO 200 J = 1, N + SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) + + $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) + + $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) + + $ V10*C( 10, J ) + C( 1, J ) = C( 1, J ) - SUM*T1 + C( 2, J ) = C( 2, J ) - SUM*T2 + C( 3, J ) = C( 3, J ) - SUM*T3 + C( 4, J ) = C( 4, J ) - SUM*T4 + C( 5, J ) = C( 5, J ) - SUM*T5 + C( 6, J ) = C( 6, J ) - SUM*T6 + C( 7, J ) = C( 7, J ) - SUM*T7 + C( 8, J ) = C( 8, J ) - SUM*T8 + C( 9, J ) = C( 9, J ) - SUM*T9 + C( 10, J ) = C( 10, J ) - SUM*T10 + 200 CONTINUE + GO TO 410 + ELSE +* +* Form C * H, where H has order n. +* + GO TO ( 210, 230, 250, 270, 290, 310, 330, 350, + $ 370, 390 )N +* +* Code for general N +* +* w := C * v +* + CALL ZGEMV( 'No transpose', M, N, ONE, C, LDC, V, 1, ZERO, + $ WORK, 1 ) +* +* C := C - tau * w * v' +* + CALL ZGERC( M, N, -TAU, WORK, 1, V, 1, C, LDC ) + GO TO 410 + 210 CONTINUE +* +* Special code for 1 x 1 Householder +* + T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) ) + DO 220 J = 1, M + C( J, 1 ) = T1*C( J, 1 ) + 220 CONTINUE + GO TO 410 + 230 CONTINUE +* +* Special code for 2 x 2 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + DO 240 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + 240 CONTINUE + GO TO 410 + 250 CONTINUE +* +* Special code for 3 x 3 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + DO 260 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + 260 CONTINUE + GO TO 410 + 270 CONTINUE +* +* Special code for 4 x 4 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + DO 280 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + 280 CONTINUE + GO TO 410 + 290 CONTINUE +* +* Special code for 5 x 5 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + DO 300 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + 300 CONTINUE + GO TO 410 + 310 CONTINUE +* +* Special code for 6 x 6 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + V6 = V( 6 ) + T6 = TAU*DCONJG( V6 ) + DO 320 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + 320 CONTINUE + GO TO 410 + 330 CONTINUE +* +* Special code for 7 x 7 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + V6 = V( 6 ) + T6 = TAU*DCONJG( V6 ) + V7 = V( 7 ) + T7 = TAU*DCONJG( V7 ) + DO 340 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + 340 CONTINUE + GO TO 410 + 350 CONTINUE +* +* Special code for 8 x 8 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + V6 = V( 6 ) + T6 = TAU*DCONJG( V6 ) + V7 = V( 7 ) + T7 = TAU*DCONJG( V7 ) + V8 = V( 8 ) + T8 = TAU*DCONJG( V8 ) + DO 360 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + 360 CONTINUE + GO TO 410 + 370 CONTINUE +* +* Special code for 9 x 9 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + V6 = V( 6 ) + T6 = TAU*DCONJG( V6 ) + V7 = V( 7 ) + T7 = TAU*DCONJG( V7 ) + V8 = V( 8 ) + T8 = TAU*DCONJG( V8 ) + V9 = V( 9 ) + T9 = TAU*DCONJG( V9 ) + DO 380 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + C( J, 9 ) = C( J, 9 ) - SUM*T9 + 380 CONTINUE + GO TO 410 + 390 CONTINUE +* +* Special code for 10 x 10 Householder +* + V1 = V( 1 ) + T1 = TAU*DCONJG( V1 ) + V2 = V( 2 ) + T2 = TAU*DCONJG( V2 ) + V3 = V( 3 ) + T3 = TAU*DCONJG( V3 ) + V4 = V( 4 ) + T4 = TAU*DCONJG( V4 ) + V5 = V( 5 ) + T5 = TAU*DCONJG( V5 ) + V6 = V( 6 ) + T6 = TAU*DCONJG( V6 ) + V7 = V( 7 ) + T7 = TAU*DCONJG( V7 ) + V8 = V( 8 ) + T8 = TAU*DCONJG( V8 ) + V9 = V( 9 ) + T9 = TAU*DCONJG( V9 ) + V10 = V( 10 ) + T10 = TAU*DCONJG( V10 ) + DO 400 J = 1, M + SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) + + $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) + + $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) + + $ V10*C( J, 10 ) + C( J, 1 ) = C( J, 1 ) - SUM*T1 + C( J, 2 ) = C( J, 2 ) - SUM*T2 + C( J, 3 ) = C( J, 3 ) - SUM*T3 + C( J, 4 ) = C( J, 4 ) - SUM*T4 + C( J, 5 ) = C( J, 5 ) - SUM*T5 + C( J, 6 ) = C( J, 6 ) - SUM*T6 + C( J, 7 ) = C( J, 7 ) - SUM*T7 + C( J, 8 ) = C( J, 8 ) - SUM*T8 + C( J, 9 ) = C( J, 9 ) - SUM*T9 + C( J, 10 ) = C( J, 10 ) - SUM*T10 + 400 CONTINUE + GO TO 410 + END IF + 410 CONTINUE + RETURN +* +* End of ZLARFX +* + END diff --git a/2.3-1/src/fortran/lapack/zlartg.f b/2.3-1/src/fortran/lapack/zlartg.f new file mode 100644 index 00000000..6d3a850e --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlartg.f @@ -0,0 +1,195 @@ + SUBROUTINE ZLARTG( F, G, CS, SN, R ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + DOUBLE PRECISION CS + COMPLEX*16 F, G, R, SN +* .. +* +* Purpose +* ======= +* +* ZLARTG generates a plane rotation so that +* +* [ CS SN ] [ F ] [ R ] +* [ __ ] . [ ] = [ ] where CS**2 + |SN|**2 = 1. +* [ -SN CS ] [ G ] [ 0 ] +* +* This is a faster version of the BLAS1 routine ZROTG, except for +* the following differences: +* F and G are unchanged on return. +* If G=0, then CS=1 and SN=0. +* If F=0, then CS=0 and SN is chosen so that R is real. +* +* Arguments +* ========= +* +* F (input) COMPLEX*16 +* The first component of vector to be rotated. +* +* G (input) COMPLEX*16 +* The second component of vector to be rotated. +* +* CS (output) DOUBLE PRECISION +* The cosine of the rotation. +* +* SN (output) COMPLEX*16 +* The sine of the rotation. +* +* R (output) COMPLEX*16 +* The nonzero component of the rotated vector. +* +* Further Details +* ======= ======= +* +* 3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel +* +* This version has a few statements commented out for thread safety +* (machine parameters are computed on each entry). 10 feb 03, SJH. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION TWO, ONE, ZERO + PARAMETER ( TWO = 2.0D+0, ONE = 1.0D+0, ZERO = 0.0D+0 ) + COMPLEX*16 CZERO + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. +* LOGICAL FIRST + INTEGER COUNT, I + DOUBLE PRECISION D, DI, DR, EPS, F2, F2S, G2, G2S, SAFMIN, + $ SAFMN2, SAFMX2, SCALE + COMPLEX*16 FF, FS, GS +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH, DLAPY2 + EXTERNAL DLAMCH, DLAPY2 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, LOG, + $ MAX, SQRT +* .. +* .. Statement Functions .. + DOUBLE PRECISION ABS1, ABSSQ +* .. +* .. Save statement .. +* SAVE FIRST, SAFMX2, SAFMIN, SAFMN2 +* .. +* .. Data statements .. +* DATA FIRST / .TRUE. / +* .. +* .. Statement Function definitions .. + ABS1( FF ) = MAX( ABS( DBLE( FF ) ), ABS( DIMAG( FF ) ) ) + ABSSQ( FF ) = DBLE( FF )**2 + DIMAG( FF )**2 +* .. +* .. Executable Statements .. +* +* IF( FIRST ) THEN + SAFMIN = DLAMCH( 'S' ) + EPS = DLAMCH( 'E' ) + SAFMN2 = DLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) / + $ LOG( DLAMCH( 'B' ) ) / TWO ) + SAFMX2 = ONE / SAFMN2 +* FIRST = .FALSE. +* END IF + SCALE = MAX( ABS1( F ), ABS1( G ) ) + FS = F + GS = G + COUNT = 0 + IF( SCALE.GE.SAFMX2 ) THEN + 10 CONTINUE + COUNT = COUNT + 1 + FS = FS*SAFMN2 + GS = GS*SAFMN2 + SCALE = SCALE*SAFMN2 + IF( SCALE.GE.SAFMX2 ) + $ GO TO 10 + ELSE IF( SCALE.LE.SAFMN2 ) THEN + IF( G.EQ.CZERO ) THEN + CS = ONE + SN = CZERO + R = F + RETURN + END IF + 20 CONTINUE + COUNT = COUNT - 1 + FS = FS*SAFMX2 + GS = GS*SAFMX2 + SCALE = SCALE*SAFMX2 + IF( SCALE.LE.SAFMN2 ) + $ GO TO 20 + END IF + F2 = ABSSQ( FS ) + G2 = ABSSQ( GS ) + IF( F2.LE.MAX( G2, ONE )*SAFMIN ) THEN +* +* This is a rare case: F is very small. +* + IF( F.EQ.CZERO ) THEN + CS = ZERO + R = DLAPY2( DBLE( G ), DIMAG( G ) ) +* Do complex/real division explicitly with two real divisions + D = DLAPY2( DBLE( GS ), DIMAG( GS ) ) + SN = DCMPLX( DBLE( GS ) / D, -DIMAG( GS ) / D ) + RETURN + END IF + F2S = DLAPY2( DBLE( FS ), DIMAG( FS ) ) +* G2 and G2S are accurate +* G2 is at least SAFMIN, and G2S is at least SAFMN2 + G2S = SQRT( G2 ) +* Error in CS from underflow in F2S is at most +* UNFL / SAFMN2 .lt. sqrt(UNFL*EPS) .lt. EPS +* If MAX(G2,ONE)=G2, then F2 .lt. G2*SAFMIN, +* and so CS .lt. sqrt(SAFMIN) +* If MAX(G2,ONE)=ONE, then F2 .lt. SAFMIN +* and so CS .lt. sqrt(SAFMIN)/SAFMN2 = sqrt(EPS) +* Therefore, CS = F2S/G2S / sqrt( 1 + (F2S/G2S)**2 ) = F2S/G2S + CS = F2S / G2S +* Make sure abs(FF) = 1 +* Do complex/real division explicitly with 2 real divisions + IF( ABS1( F ).GT.ONE ) THEN + D = DLAPY2( DBLE( F ), DIMAG( F ) ) + FF = DCMPLX( DBLE( F ) / D, DIMAG( F ) / D ) + ELSE + DR = SAFMX2*DBLE( F ) + DI = SAFMX2*DIMAG( F ) + D = DLAPY2( DR, DI ) + FF = DCMPLX( DR / D, DI / D ) + END IF + SN = FF*DCMPLX( DBLE( GS ) / G2S, -DIMAG( GS ) / G2S ) + R = CS*F + SN*G + ELSE +* +* This is the most common case. +* Neither F2 nor F2/G2 are less than SAFMIN +* F2S cannot overflow, and it is accurate +* + F2S = SQRT( ONE+G2 / F2 ) +* Do the F2S(real)*FS(complex) multiply with two real multiplies + R = DCMPLX( F2S*DBLE( FS ), F2S*DIMAG( FS ) ) + CS = ONE / F2S + D = F2 + G2 +* Do complex/real division explicitly with two real divisions + SN = DCMPLX( DBLE( R ) / D, DIMAG( R ) / D ) + SN = SN*DCONJG( GS ) + IF( COUNT.NE.0 ) THEN + IF( COUNT.GT.0 ) THEN + DO 30 I = 1, COUNT + R = R*SAFMX2 + 30 CONTINUE + ELSE + DO 40 I = 1, -COUNT + R = R*SAFMN2 + 40 CONTINUE + END IF + END IF + END IF + RETURN +* +* End of ZLARTG +* + END diff --git a/2.3-1/src/fortran/lapack/zlarz.f b/2.3-1/src/fortran/lapack/zlarz.f new file mode 100644 index 00000000..18124672 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarz.f @@ -0,0 +1,157 @@ + SUBROUTINE ZLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE + INTEGER INCV, L, LDC, M, N + COMPLEX*16 TAU +* .. +* .. Array Arguments .. + COMPLEX*16 C( LDC, * ), V( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZLARZ applies a complex elementary reflector H to a complex +* M-by-N matrix C, from either the left or the right. H is represented +* in the form +* +* H = I - tau * v * v' +* +* where tau is a complex scalar and v is a complex vector. +* +* If tau = 0, then H is taken to be the unit matrix. +* +* To apply H' (the conjugate transpose of H), supply conjg(tau) instead +* tau. +* +* H is a product of k elementary reflectors as returned by ZTZRZF. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': form H * C +* = 'R': form C * H +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* L (input) INTEGER +* The number of entries of the vector V containing +* the meaningful part of the Householder vectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* V (input) COMPLEX*16 array, dimension (1+(L-1)*abs(INCV)) +* The vector v in the representation of H as returned by +* ZTZRZF. V is not used if TAU = 0. +* +* INCV (input) INTEGER +* The increment between elements of v. INCV <> 0. +* +* TAU (input) COMPLEX*16 +* The value tau in the representation of H. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by the matrix H * C if SIDE = 'L', +* or C * H if SIDE = 'R'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension +* (N) if SIDE = 'L' +* or (M) if SIDE = 'R' +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZCOPY, ZGEMV, ZGERC, ZGERU, ZLACGV +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C +* + IF( TAU.NE.ZERO ) THEN +* +* w( 1:n ) = conjg( C( 1, 1:n ) ) +* + CALL ZCOPY( N, C, LDC, WORK, 1 ) + CALL ZLACGV( N, WORK, 1 ) +* +* w( 1:n ) = conjg( w( 1:n ) + C( m-l+1:m, 1:n )' * v( 1:l ) ) +* + CALL ZGEMV( 'Conjugate transpose', L, N, ONE, C( M-L+1, 1 ), + $ LDC, V, INCV, ONE, WORK, 1 ) + CALL ZLACGV( N, WORK, 1 ) +* +* C( 1, 1:n ) = C( 1, 1:n ) - tau * w( 1:n ) +* + CALL ZAXPY( N, -TAU, WORK, 1, C, LDC ) +* +* C( m-l+1:m, 1:n ) = C( m-l+1:m, 1:n ) - ... +* tau * v( 1:l ) * conjg( w( 1:n )' ) +* + CALL ZGERU( L, N, -TAU, V, INCV, WORK, 1, C( M-L+1, 1 ), + $ LDC ) + END IF +* + ELSE +* +* Form C * H +* + IF( TAU.NE.ZERO ) THEN +* +* w( 1:m ) = C( 1:m, 1 ) +* + CALL ZCOPY( M, C, 1, WORK, 1 ) +* +* w( 1:m ) = w( 1:m ) + C( 1:m, n-l+1:n, 1:n ) * v( 1:l ) +* + CALL ZGEMV( 'No transpose', M, L, ONE, C( 1, N-L+1 ), LDC, + $ V, INCV, ONE, WORK, 1 ) +* +* C( 1:m, 1 ) = C( 1:m, 1 ) - tau * w( 1:m ) +* + CALL ZAXPY( M, -TAU, WORK, 1, C, 1 ) +* +* C( 1:m, n-l+1:n ) = C( 1:m, n-l+1:n ) - ... +* tau * w( 1:m ) * v( 1:l )' +* + CALL ZGERC( M, L, -TAU, WORK, 1, V, INCV, C( 1, N-L+1 ), + $ LDC ) +* + END IF +* + END IF +* + RETURN +* +* End of ZLARZ +* + END diff --git a/2.3-1/src/fortran/lapack/zlarzb.f b/2.3-1/src/fortran/lapack/zlarzb.f new file mode 100644 index 00000000..05d2a0e3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarzb.f @@ -0,0 +1,234 @@ + SUBROUTINE ZLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V, + $ LDV, T, LDT, C, LDC, WORK, LDWORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, SIDE, STOREV, TRANS + INTEGER K, L, LDC, LDT, LDV, LDWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 C( LDC, * ), T( LDT, * ), V( LDV, * ), + $ WORK( LDWORK, * ) +* .. +* +* Purpose +* ======= +* +* ZLARZB applies a complex block reflector H or its transpose H**H +* to a complex distributed M-by-N C from the left or the right. +* +* Currently, only STOREV = 'R' and DIRECT = 'B' are supported. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply H or H' from the Left +* = 'R': apply H or H' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply H (No transpose) +* = 'C': apply H' (Conjugate transpose) +* +* DIRECT (input) CHARACTER*1 +* Indicates how H is formed from a product of elementary +* reflectors +* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Indicates how the vectors which define the elementary +* reflectors are stored: +* = 'C': Columnwise (not supported yet) +* = 'R': Rowwise +* +* M (input) INTEGER +* The number of rows of the matrix C. +* +* N (input) INTEGER +* The number of columns of the matrix C. +* +* K (input) INTEGER +* The order of the matrix T (= the number of elementary +* reflectors whose product defines the block reflector). +* +* L (input) INTEGER +* The number of columns of the matrix V containing the +* meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* V (input) COMPLEX*16 array, dimension (LDV,NV). +* If STOREV = 'C', NV = K; if STOREV = 'R', NV = L. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= L; if STOREV = 'R', LDV >= K. +* +* T (input) COMPLEX*16 array, dimension (LDT,K) +* The triangular K-by-K matrix T in the representation of the +* block reflector. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by H*C or H'*C or C*H or C*H'. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension (LDWORK,K) +* +* LDWORK (input) INTEGER +* The leading dimension of the array WORK. +* If SIDE = 'L', LDWORK >= max(1,N); +* if SIDE = 'R', LDWORK >= max(1,M). +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + CHARACTER TRANST + INTEGER I, INFO, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZCOPY, ZGEMM, ZLACGV, ZTRMM +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.LE.0 .OR. N.LE.0 ) + $ RETURN +* +* Check for currently supported options +* + INFO = 0 + IF( .NOT.LSAME( DIRECT, 'B' ) ) THEN + INFO = -3 + ELSE IF( .NOT.LSAME( STOREV, 'R' ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZLARZB', -INFO ) + RETURN + END IF +* + IF( LSAME( TRANS, 'N' ) ) THEN + TRANST = 'C' + ELSE + TRANST = 'N' + END IF +* + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form H * C or H' * C +* +* W( 1:n, 1:k ) = conjg( C( 1:k, 1:n )' ) +* + DO 10 J = 1, K + CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 ) + 10 CONTINUE +* +* W( 1:n, 1:k ) = W( 1:n, 1:k ) + ... +* conjg( C( m-l+1:m, 1:n )' ) * V( 1:k, 1:l )' +* + IF( L.GT.0 ) + $ CALL ZGEMM( 'Transpose', 'Conjugate transpose', N, K, L, + $ ONE, C( M-L+1, 1 ), LDC, V, LDV, ONE, WORK, + $ LDWORK ) +* +* W( 1:n, 1:k ) = W( 1:n, 1:k ) * T' or W( 1:m, 1:k ) * T +* + CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K, ONE, T, + $ LDT, WORK, LDWORK ) +* +* C( 1:k, 1:n ) = C( 1:k, 1:n ) - conjg( W( 1:n, 1:k )' ) +* + DO 30 J = 1, N + DO 20 I = 1, K + C( I, J ) = C( I, J ) - WORK( J, I ) + 20 CONTINUE + 30 CONTINUE +* +* C( m-l+1:m, 1:n ) = C( m-l+1:m, 1:n ) - ... +* conjg( V( 1:k, 1:l )' ) * conjg( W( 1:n, 1:k )' ) +* + IF( L.GT.0 ) + $ CALL ZGEMM( 'Transpose', 'Transpose', L, N, K, -ONE, V, LDV, + $ WORK, LDWORK, ONE, C( M-L+1, 1 ), LDC ) +* + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form C * H or C * H' +* +* W( 1:m, 1:k ) = C( 1:m, 1:k ) +* + DO 40 J = 1, K + CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 ) + 40 CONTINUE +* +* W( 1:m, 1:k ) = W( 1:m, 1:k ) + ... +* C( 1:m, n-l+1:n ) * conjg( V( 1:k, 1:l )' ) +* + IF( L.GT.0 ) + $ CALL ZGEMM( 'No transpose', 'Transpose', M, K, L, ONE, + $ C( 1, N-L+1 ), LDC, V, LDV, ONE, WORK, LDWORK ) +* +* W( 1:m, 1:k ) = W( 1:m, 1:k ) * conjg( T ) or +* W( 1:m, 1:k ) * conjg( T' ) +* + DO 50 J = 1, K + CALL ZLACGV( K-J+1, T( J, J ), 1 ) + 50 CONTINUE + CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K, ONE, T, + $ LDT, WORK, LDWORK ) + DO 60 J = 1, K + CALL ZLACGV( K-J+1, T( J, J ), 1 ) + 60 CONTINUE +* +* C( 1:m, 1:k ) = C( 1:m, 1:k ) - W( 1:m, 1:k ) +* + DO 80 J = 1, K + DO 70 I = 1, M + C( I, J ) = C( I, J ) - WORK( I, J ) + 70 CONTINUE + 80 CONTINUE +* +* C( 1:m, n-l+1:n ) = C( 1:m, n-l+1:n ) - ... +* W( 1:m, 1:k ) * conjg( V( 1:k, 1:l ) ) +* + DO 90 J = 1, L + CALL ZLACGV( K, V( 1, J ), 1 ) + 90 CONTINUE + IF( L.GT.0 ) + $ CALL ZGEMM( 'No transpose', 'No transpose', M, L, K, -ONE, + $ WORK, LDWORK, V, LDV, ONE, C( 1, N-L+1 ), LDC ) + DO 100 J = 1, L + CALL ZLACGV( K, V( 1, J ), 1 ) + 100 CONTINUE +* + END IF +* + RETURN +* +* End of ZLARZB +* + END diff --git a/2.3-1/src/fortran/lapack/zlarzt.f b/2.3-1/src/fortran/lapack/zlarzt.f new file mode 100644 index 00000000..9242ed36 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlarzt.f @@ -0,0 +1,186 @@ + SUBROUTINE ZLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, STOREV + INTEGER K, LDT, LDV, N +* .. +* .. Array Arguments .. + COMPLEX*16 T( LDT, * ), TAU( * ), V( LDV, * ) +* .. +* +* Purpose +* ======= +* +* ZLARZT forms the triangular factor T of a complex block reflector +* H of order > n, which is defined as a product of k elementary +* reflectors. +* +* If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; +* +* If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. +* +* If STOREV = 'C', the vector which defines the elementary reflector +* H(i) is stored in the i-th column of the array V, and +* +* H = I - V * T * V' +* +* If STOREV = 'R', the vector which defines the elementary reflector +* H(i) is stored in the i-th row of the array V, and +* +* H = I - V' * T * V +* +* Currently, only STOREV = 'R' and DIRECT = 'B' are supported. +* +* Arguments +* ========= +* +* DIRECT (input) CHARACTER*1 +* Specifies the order in which the elementary reflectors are +* multiplied to form the block reflector: +* = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet) +* = 'B': H = H(k) . . . H(2) H(1) (Backward) +* +* STOREV (input) CHARACTER*1 +* Specifies how the vectors which define the elementary +* reflectors are stored (see also Further Details): +* = 'C': columnwise (not supported yet) +* = 'R': rowwise +* +* N (input) INTEGER +* The order of the block reflector H. N >= 0. +* +* K (input) INTEGER +* The order of the triangular factor T (= the number of +* elementary reflectors). K >= 1. +* +* V (input/output) COMPLEX*16 array, dimension +* (LDV,K) if STOREV = 'C' +* (LDV,N) if STOREV = 'R' +* The matrix V. See further details. +* +* LDV (input) INTEGER +* The leading dimension of the array V. +* If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i). +* +* T (output) COMPLEX*16 array, dimension (LDT,K) +* The k by k triangular factor T of the block reflector. +* If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is +* lower triangular. The rest of the array is not used. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= K. +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The shape of the matrix V and the storage of the vectors which define +* the H(i) is best illustrated by the following example with n = 5 and +* k = 3. The elements equal to 1 are not stored; the corresponding +* array elements are modified but restored on exit. The rest of the +* array is not used. +* +* DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': +* +* ______V_____ +* ( v1 v2 v3 ) / \ +* ( v1 v2 v3 ) ( v1 v1 v1 v1 v1 . . . . 1 ) +* V = ( v1 v2 v3 ) ( v2 v2 v2 v2 v2 . . . 1 ) +* ( v1 v2 v3 ) ( v3 v3 v3 v3 v3 . . 1 ) +* ( v1 v2 v3 ) +* . . . +* . . . +* 1 . . +* 1 . +* 1 +* +* DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': +* +* ______V_____ +* 1 / \ +* . 1 ( 1 . . . . v1 v1 v1 v1 v1 ) +* . . 1 ( . 1 . . . v2 v2 v2 v2 v2 ) +* . . . ( . . 1 . . v3 v3 v3 v3 v3 ) +* . . . +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* V = ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* ( v1 v2 v3 ) +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEMV, ZLACGV, ZTRMV +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Executable Statements .. +* +* Check for currently supported options +* + INFO = 0 + IF( .NOT.LSAME( DIRECT, 'B' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LSAME( STOREV, 'R' ) ) THEN + INFO = -2 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZLARZT', -INFO ) + RETURN + END IF +* + DO 20 I = K, 1, -1 + IF( TAU( I ).EQ.ZERO ) THEN +* +* H(i) = I +* + DO 10 J = I, K + T( J, I ) = ZERO + 10 CONTINUE + ELSE +* +* general case +* + IF( I.LT.K ) THEN +* +* T(i+1:k,i) = - tau(i) * V(i+1:k,1:n) * V(i,1:n)' +* + CALL ZLACGV( N, V( I, 1 ), LDV ) + CALL ZGEMV( 'No transpose', K-I, N, -TAU( I ), + $ V( I+1, 1 ), LDV, V( I, 1 ), LDV, ZERO, + $ T( I+1, I ), 1 ) + CALL ZLACGV( N, V( I, 1 ), LDV ) +* +* T(i+1:k,i) = T(i+1:k,i+1:k) * T(i+1:k,i) +* + CALL ZTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, + $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) + END IF + T( I, I ) = TAU( I ) + END IF + 20 CONTINUE + RETURN +* +* End of ZLARZT +* + END diff --git a/2.3-1/src/fortran/lapack/zlascl.f b/2.3-1/src/fortran/lapack/zlascl.f new file mode 100644 index 00000000..36bb2445 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlascl.f @@ -0,0 +1,267 @@ + SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TYPE + INTEGER INFO, KL, KU, LDA, M, N + DOUBLE PRECISION CFROM, CTO +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLASCL multiplies the M by N complex matrix A by the real scalar +* CTO/CFROM. This is done without over/underflow as long as the final +* result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that +* A may be full, upper triangular, lower triangular, upper Hessenberg, +* or banded. +* +* Arguments +* ========= +* +* TYPE (input) CHARACTER*1 +* TYPE indices the storage type of the input matrix. +* = 'G': A is a full matrix. +* = 'L': A is a lower triangular matrix. +* = 'U': A is an upper triangular matrix. +* = 'H': A is an upper Hessenberg matrix. +* = 'B': A is a symmetric band matrix with lower bandwidth KL +* and upper bandwidth KU and with the only the lower +* half stored. +* = 'Q': A is a symmetric band matrix with lower bandwidth KL +* and upper bandwidth KU and with the only the upper +* half stored. +* = 'Z': A is a band matrix with lower bandwidth KL and upper +* bandwidth KU. +* +* KL (input) INTEGER +* The lower bandwidth of A. Referenced only if TYPE = 'B', +* 'Q' or 'Z'. +* +* KU (input) INTEGER +* The upper bandwidth of A. Referenced only if TYPE = 'B', +* 'Q' or 'Z'. +* +* CFROM (input) DOUBLE PRECISION +* CTO (input) DOUBLE PRECISION +* The matrix A is multiplied by CTO/CFROM. A(I,J) is computed +* without over/underflow if the final result CTO*A(I,J)/CFROM +* can be represented without over/underflow. CFROM must be +* nonzero. +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* The matrix to be multiplied by CTO/CFROM. See TYPE for the +* storage type. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* INFO (output) INTEGER +* 0 - successful exit +* <0 - if INFO = -i, the i-th argument had an illegal value. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) +* .. +* .. Local Scalars .. + LOGICAL DONE + INTEGER I, ITYPE, J, K1, K2, K3, K4 + DOUBLE PRECISION BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + EXTERNAL LSAME, DLAMCH +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, MIN +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 +* + IF( LSAME( TYPE, 'G' ) ) THEN + ITYPE = 0 + ELSE IF( LSAME( TYPE, 'L' ) ) THEN + ITYPE = 1 + ELSE IF( LSAME( TYPE, 'U' ) ) THEN + ITYPE = 2 + ELSE IF( LSAME( TYPE, 'H' ) ) THEN + ITYPE = 3 + ELSE IF( LSAME( TYPE, 'B' ) ) THEN + ITYPE = 4 + ELSE IF( LSAME( TYPE, 'Q' ) ) THEN + ITYPE = 5 + ELSE IF( LSAME( TYPE, 'Z' ) ) THEN + ITYPE = 6 + ELSE + ITYPE = -1 + END IF +* + IF( ITYPE.EQ.-1 ) THEN + INFO = -1 + ELSE IF( CFROM.EQ.ZERO ) THEN + INFO = -4 + ELSE IF( M.LT.0 ) THEN + INFO = -6 + ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR. + $ ( ITYPE.EQ.5 .AND. N.NE.M ) ) THEN + INFO = -7 + ELSE IF( ITYPE.LE.3 .AND. LDA.LT.MAX( 1, M ) ) THEN + INFO = -9 + ELSE IF( ITYPE.GE.4 ) THEN + IF( KL.LT.0 .OR. KL.GT.MAX( M-1, 0 ) ) THEN + INFO = -2 + ELSE IF( KU.LT.0 .OR. KU.GT.MAX( N-1, 0 ) .OR. + $ ( ( ITYPE.EQ.4 .OR. ITYPE.EQ.5 ) .AND. KL.NE.KU ) ) + $ THEN + INFO = -3 + ELSE IF( ( ITYPE.EQ.4 .AND. LDA.LT.KL+1 ) .OR. + $ ( ITYPE.EQ.5 .AND. LDA.LT.KU+1 ) .OR. + $ ( ITYPE.EQ.6 .AND. LDA.LT.2*KL+KU+1 ) ) THEN + INFO = -9 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZLASCL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 .OR. M.EQ.0 ) + $ RETURN +* +* Get machine parameters +* + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM +* + CFROMC = CFROM + CTOC = CTO +* + 10 CONTINUE + CFROM1 = CFROMC*SMLNUM + CTO1 = CTOC / BIGNUM + IF( ABS( CFROM1 ).GT.ABS( CTOC ) .AND. CTOC.NE.ZERO ) THEN + MUL = SMLNUM + DONE = .FALSE. + CFROMC = CFROM1 + ELSE IF( ABS( CTO1 ).GT.ABS( CFROMC ) ) THEN + MUL = BIGNUM + DONE = .FALSE. + CTOC = CTO1 + ELSE + MUL = CTOC / CFROMC + DONE = .TRUE. + END IF +* + IF( ITYPE.EQ.0 ) THEN +* +* Full matrix +* + DO 30 J = 1, N + DO 20 I = 1, M + A( I, J ) = A( I, J )*MUL + 20 CONTINUE + 30 CONTINUE +* + ELSE IF( ITYPE.EQ.1 ) THEN +* +* Lower triangular matrix +* + DO 50 J = 1, N + DO 40 I = J, M + A( I, J ) = A( I, J )*MUL + 40 CONTINUE + 50 CONTINUE +* + ELSE IF( ITYPE.EQ.2 ) THEN +* +* Upper triangular matrix +* + DO 70 J = 1, N + DO 60 I = 1, MIN( J, M ) + A( I, J ) = A( I, J )*MUL + 60 CONTINUE + 70 CONTINUE +* + ELSE IF( ITYPE.EQ.3 ) THEN +* +* Upper Hessenberg matrix +* + DO 90 J = 1, N + DO 80 I = 1, MIN( J+1, M ) + A( I, J ) = A( I, J )*MUL + 80 CONTINUE + 90 CONTINUE +* + ELSE IF( ITYPE.EQ.4 ) THEN +* +* Lower half of a symmetric band matrix +* + K3 = KL + 1 + K4 = N + 1 + DO 110 J = 1, N + DO 100 I = 1, MIN( K3, K4-J ) + A( I, J ) = A( I, J )*MUL + 100 CONTINUE + 110 CONTINUE +* + ELSE IF( ITYPE.EQ.5 ) THEN +* +* Upper half of a symmetric band matrix +* + K1 = KU + 2 + K3 = KU + 1 + DO 130 J = 1, N + DO 120 I = MAX( K1-J, 1 ), K3 + A( I, J ) = A( I, J )*MUL + 120 CONTINUE + 130 CONTINUE +* + ELSE IF( ITYPE.EQ.6 ) THEN +* +* Band matrix +* + K1 = KL + KU + 2 + K2 = KL + 1 + K3 = 2*KL + KU + 1 + K4 = KL + KU + 1 + M + DO 150 J = 1, N + DO 140 I = MAX( K1-J, K2 ), MIN( K3, K4-J ) + A( I, J ) = A( I, J )*MUL + 140 CONTINUE + 150 CONTINUE +* + END IF +* + IF( .NOT.DONE ) + $ GO TO 10 +* + RETURN +* +* End of ZLASCL +* + END diff --git a/2.3-1/src/fortran/lapack/zlaset.f b/2.3-1/src/fortran/lapack/zlaset.f new file mode 100644 index 00000000..88fc21b2 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaset.f @@ -0,0 +1,114 @@ + SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, M, N + COMPLEX*16 ALPHA, BETA +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLASET initializes a 2-D array A to BETA on the diagonal and +* ALPHA on the offdiagonals. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies the part of the matrix A to be set. +* = 'U': Upper triangular part is set. The lower triangle +* is unchanged. +* = 'L': Lower triangular part is set. The upper triangle +* is unchanged. +* Otherwise: All of the matrix A is set. +* +* M (input) INTEGER +* On entry, M specifies the number of rows of A. +* +* N (input) INTEGER +* On entry, N specifies the number of columns of A. +* +* ALPHA (input) COMPLEX*16 +* All the offdiagonal array elements are set to ALPHA. +* +* BETA (input) COMPLEX*16 +* All the diagonal array elements are set to BETA. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the m by n matrix A. +* On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j; +* A(i,i) = BETA , 1 <= i <= min(m,n) +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, J +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. Intrinsic Functions .. + INTRINSIC MIN +* .. +* .. Executable Statements .. +* + IF( LSAME( UPLO, 'U' ) ) THEN +* +* Set the diagonal to BETA and the strictly upper triangular +* part of the array to ALPHA. +* + DO 20 J = 2, N + DO 10 I = 1, MIN( J-1, M ) + A( I, J ) = ALPHA + 10 CONTINUE + 20 CONTINUE + DO 30 I = 1, MIN( N, M ) + A( I, I ) = BETA + 30 CONTINUE +* + ELSE IF( LSAME( UPLO, 'L' ) ) THEN +* +* Set the diagonal to BETA and the strictly lower triangular +* part of the array to ALPHA. +* + DO 50 J = 1, MIN( M, N ) + DO 40 I = J + 1, M + A( I, J ) = ALPHA + 40 CONTINUE + 50 CONTINUE + DO 60 I = 1, MIN( N, M ) + A( I, I ) = BETA + 60 CONTINUE +* + ELSE +* +* Set the array to BETA on the diagonal and ALPHA on the +* offdiagonal. +* + DO 80 J = 1, N + DO 70 I = 1, M + A( I, J ) = ALPHA + 70 CONTINUE + 80 CONTINUE + DO 90 I = 1, MIN( M, N ) + A( I, I ) = BETA + 90 CONTINUE + END IF +* + RETURN +* +* End of ZLASET +* + END diff --git a/2.3-1/src/fortran/lapack/zlasr.f b/2.3-1/src/fortran/lapack/zlasr.f new file mode 100644 index 00000000..507a20c4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlasr.f @@ -0,0 +1,363 @@ + SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIRECT, PIVOT, SIDE + INTEGER LDA, M, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION C( * ), S( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLASR applies a sequence of real plane rotations to a complex matrix +* A, from either the left or the right. +* +* When SIDE = 'L', the transformation takes the form +* +* A := P*A +* +* and when SIDE = 'R', the transformation takes the form +* +* A := A*P**T +* +* where P is an orthogonal matrix consisting of a sequence of z plane +* rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R', +* and P**T is the transpose of P. +* +* When DIRECT = 'F' (Forward sequence), then +* +* P = P(z-1) * ... * P(2) * P(1) +* +* and when DIRECT = 'B' (Backward sequence), then +* +* P = P(1) * P(2) * ... * P(z-1) +* +* where P(k) is a plane rotation matrix defined by the 2-by-2 rotation +* +* R(k) = ( c(k) s(k) ) +* = ( -s(k) c(k) ). +* +* When PIVOT = 'V' (Variable pivot), the rotation is performed +* for the plane (k,k+1), i.e., P(k) has the form +* +* P(k) = ( 1 ) +* ( ... ) +* ( 1 ) +* ( c(k) s(k) ) +* ( -s(k) c(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* +* where R(k) appears as a rank-2 modification to the identity matrix in +* rows and columns k and k+1. +* +* When PIVOT = 'T' (Top pivot), the rotation is performed for the +* plane (1,k+1), so P(k) has the form +* +* P(k) = ( c(k) s(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* ( -s(k) c(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* +* where R(k) appears in rows and columns 1 and k+1. +* +* Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is +* performed for the plane (k,z), giving P(k) the form +* +* P(k) = ( 1 ) +* ( ... ) +* ( 1 ) +* ( c(k) s(k) ) +* ( 1 ) +* ( ... ) +* ( 1 ) +* ( -s(k) c(k) ) +* +* where R(k) appears in rows and columns k and z. The rotations are +* performed without ever forming P(k) explicitly. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* Specifies whether the plane rotation matrix P is applied to +* A on the left or the right. +* = 'L': Left, compute A := P*A +* = 'R': Right, compute A:= A*P**T +* +* PIVOT (input) CHARACTER*1 +* Specifies the plane for which P(k) is a plane rotation +* matrix. +* = 'V': Variable pivot, the plane (k,k+1) +* = 'T': Top pivot, the plane (1,k+1) +* = 'B': Bottom pivot, the plane (k,z) +* +* DIRECT (input) CHARACTER*1 +* Specifies whether P is a forward or backward sequence of +* plane rotations. +* = 'F': Forward, P = P(z-1)*...*P(2)*P(1) +* = 'B': Backward, P = P(1)*P(2)*...*P(z-1) +* +* M (input) INTEGER +* The number of rows of the matrix A. If m <= 1, an immediate +* return is effected. +* +* N (input) INTEGER +* The number of columns of the matrix A. If n <= 1, an +* immediate return is effected. +* +* C (input) DOUBLE PRECISION array, dimension +* (M-1) if SIDE = 'L' +* (N-1) if SIDE = 'R' +* The cosines c(k) of the plane rotations. +* +* S (input) DOUBLE PRECISION array, dimension +* (M-1) if SIDE = 'L' +* (N-1) if SIDE = 'R' +* The sines s(k) of the plane rotations. The 2-by-2 plane +* rotation part of the matrix P(k), R(k), has the form +* R(k) = ( c(k) s(k) ) +* ( -s(k) c(k) ). +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* The M-by-N matrix A. On exit, A is overwritten by P*A if +* SIDE = 'R' or by A*P**T if SIDE = 'L'. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J + DOUBLE PRECISION CTEMP, STEMP + COMPLEX*16 TEMP +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA +* .. +* .. Executable Statements .. +* +* Test the input parameters +* + INFO = 0 + IF( .NOT.( LSAME( SIDE, 'L' ) .OR. LSAME( SIDE, 'R' ) ) ) THEN + INFO = 1 + ELSE IF( .NOT.( LSAME( PIVOT, 'V' ) .OR. LSAME( PIVOT, + $ 'T' ) .OR. LSAME( PIVOT, 'B' ) ) ) THEN + INFO = 2 + ELSE IF( .NOT.( LSAME( DIRECT, 'F' ) .OR. LSAME( DIRECT, 'B' ) ) ) + $ THEN + INFO = 3 + ELSE IF( M.LT.0 ) THEN + INFO = 4 + ELSE IF( N.LT.0 ) THEN + INFO = 5 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = 9 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZLASR ', INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) ) + $ RETURN + IF( LSAME( SIDE, 'L' ) ) THEN +* +* Form P * A +* + IF( LSAME( PIVOT, 'V' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 20 J = 1, M - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 10 I = 1, N + TEMP = A( J+1, I ) + A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) + A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) + 10 CONTINUE + END IF + 20 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 40 J = M - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 30 I = 1, N + TEMP = A( J+1, I ) + A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I ) + A( J, I ) = STEMP*TEMP + CTEMP*A( J, I ) + 30 CONTINUE + END IF + 40 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'T' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 60 J = 2, M + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 50 I = 1, N + TEMP = A( J, I ) + A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) + A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) + 50 CONTINUE + END IF + 60 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 80 J = M, 2, -1 + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 70 I = 1, N + TEMP = A( J, I ) + A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I ) + A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I ) + 70 CONTINUE + END IF + 80 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'B' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 100 J = 1, M - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 90 I = 1, N + TEMP = A( J, I ) + A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP + A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP + 90 CONTINUE + END IF + 100 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 120 J = M - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 110 I = 1, N + TEMP = A( J, I ) + A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP + A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP + 110 CONTINUE + END IF + 120 CONTINUE + END IF + END IF + ELSE IF( LSAME( SIDE, 'R' ) ) THEN +* +* Form A * P' +* + IF( LSAME( PIVOT, 'V' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 140 J = 1, N - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 130 I = 1, M + TEMP = A( I, J+1 ) + A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) + A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) + 130 CONTINUE + END IF + 140 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 160 J = N - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 150 I = 1, M + TEMP = A( I, J+1 ) + A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J ) + A( I, J ) = STEMP*TEMP + CTEMP*A( I, J ) + 150 CONTINUE + END IF + 160 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'T' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 180 J = 2, N + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 170 I = 1, M + TEMP = A( I, J ) + A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) + A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) + 170 CONTINUE + END IF + 180 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 200 J = N, 2, -1 + CTEMP = C( J-1 ) + STEMP = S( J-1 ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 190 I = 1, M + TEMP = A( I, J ) + A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 ) + A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 ) + 190 CONTINUE + END IF + 200 CONTINUE + END IF + ELSE IF( LSAME( PIVOT, 'B' ) ) THEN + IF( LSAME( DIRECT, 'F' ) ) THEN + DO 220 J = 1, N - 1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 210 I = 1, M + TEMP = A( I, J ) + A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP + A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP + 210 CONTINUE + END IF + 220 CONTINUE + ELSE IF( LSAME( DIRECT, 'B' ) ) THEN + DO 240 J = N - 1, 1, -1 + CTEMP = C( J ) + STEMP = S( J ) + IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN + DO 230 I = 1, M + TEMP = A( I, J ) + A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP + A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP + 230 CONTINUE + END IF + 240 CONTINUE + END IF + END IF + END IF +* + RETURN +* +* End of ZLASR +* + END diff --git a/2.3-1/src/fortran/lapack/zlassq.f b/2.3-1/src/fortran/lapack/zlassq.f new file mode 100644 index 00000000..a209984b --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlassq.f @@ -0,0 +1,101 @@ + SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, N + DOUBLE PRECISION SCALE, SUMSQ +* .. +* .. Array Arguments .. + COMPLEX*16 X( * ) +* .. +* +* Purpose +* ======= +* +* ZLASSQ returns the values scl and ssq such that +* +* ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq, +* +* where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is +* assumed to be at least unity and the value of ssq will then satisfy +* +* 1.0 .le. ssq .le. ( sumsq + 2*n ). +* +* scale is assumed to be non-negative and scl returns the value +* +* scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ), +* i +* +* scale and sumsq must be supplied in SCALE and SUMSQ respectively. +* SCALE and SUMSQ are overwritten by scl and ssq respectively. +* +* The routine makes only one pass through the vector X. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of elements to be used from the vector X. +* +* X (input) COMPLEX*16 array, dimension (N) +* The vector x as described above. +* x( i ) = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n. +* +* INCX (input) INTEGER +* The increment between successive values of the vector X. +* INCX > 0. +* +* SCALE (input/output) DOUBLE PRECISION +* On entry, the value scale in the equation above. +* On exit, SCALE is overwritten with the value scl . +* +* SUMSQ (input/output) DOUBLE PRECISION +* On entry, the value sumsq in the equation above. +* On exit, SUMSQ is overwritten with the value ssq . +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO + PARAMETER ( ZERO = 0.0D+0 ) +* .. +* .. Local Scalars .. + INTEGER IX + DOUBLE PRECISION TEMP1 +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DIMAG +* .. +* .. Executable Statements .. +* + IF( N.GT.0 ) THEN + DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX + IF( DBLE( X( IX ) ).NE.ZERO ) THEN + TEMP1 = ABS( DBLE( X( IX ) ) ) + IF( SCALE.LT.TEMP1 ) THEN + SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2 + SCALE = TEMP1 + ELSE + SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2 + END IF + END IF + IF( DIMAG( X( IX ) ).NE.ZERO ) THEN + TEMP1 = ABS( DIMAG( X( IX ) ) ) + IF( SCALE.LT.TEMP1 ) THEN + SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2 + SCALE = TEMP1 + ELSE + SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2 + END IF + END IF + 10 CONTINUE + END IF +* + RETURN +* +* End of ZLASSQ +* + END diff --git a/2.3-1/src/fortran/lapack/zlaswp.f b/2.3-1/src/fortran/lapack/zlaswp.f new file mode 100644 index 00000000..8b07e48b --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlaswp.f @@ -0,0 +1,119 @@ + SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, K1, K2, LDA, N +* .. +* .. Array Arguments .. + INTEGER IPIV( * ) + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZLASWP performs a series of row interchanges on the matrix A. +* One row interchange is initiated for each of rows K1 through K2 of A. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of columns of the matrix A. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the matrix of column dimension N to which the row +* interchanges will be applied. +* On exit, the permuted matrix. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* +* K1 (input) INTEGER +* The first element of IPIV for which a row interchange will +* be done. +* +* K2 (input) INTEGER +* The last element of IPIV for which a row interchange will +* be done. +* +* IPIV (input) INTEGER array, dimension (K2*abs(INCX)) +* The vector of pivot indices. Only the elements in positions +* K1 through K2 of IPIV are accessed. +* IPIV(K) = L implies rows K and L are to be interchanged. +* +* INCX (input) INTEGER +* The increment between successive values of IPIV. If IPIV +* is negative, the pivots are applied in reverse order. +* +* Further Details +* =============== +* +* Modified by +* R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, I1, I2, INC, IP, IX, IX0, J, K, N32 + COMPLEX*16 TEMP +* .. +* .. Executable Statements .. +* +* Interchange row I with row IPIV(I) for each of rows K1 through K2. +* + IF( INCX.GT.0 ) THEN + IX0 = K1 + I1 = K1 + I2 = K2 + INC = 1 + ELSE IF( INCX.LT.0 ) THEN + IX0 = 1 + ( 1-K2 )*INCX + I1 = K2 + I2 = K1 + INC = -1 + ELSE + RETURN + END IF +* + N32 = ( N / 32 )*32 + IF( N32.NE.0 ) THEN + DO 30 J = 1, N32, 32 + IX = IX0 + DO 20 I = I1, I2, INC + IP = IPIV( IX ) + IF( IP.NE.I ) THEN + DO 10 K = J, J + 31 + TEMP = A( I, K ) + A( I, K ) = A( IP, K ) + A( IP, K ) = TEMP + 10 CONTINUE + END IF + IX = IX + INCX + 20 CONTINUE + 30 CONTINUE + END IF + IF( N32.NE.N ) THEN + N32 = N32 + 1 + IX = IX0 + DO 50 I = I1, I2, INC + IP = IPIV( IX ) + IF( IP.NE.I ) THEN + DO 40 K = N32, N + TEMP = A( I, K ) + A( I, K ) = A( IP, K ) + A( IP, K ) = TEMP + 40 CONTINUE + END IF + IX = IX + INCX + 50 CONTINUE + END IF +* + RETURN +* +* End of ZLASWP +* + END diff --git a/2.3-1/src/fortran/lapack/zlatdf.f b/2.3-1/src/fortran/lapack/zlatdf.f new file mode 100644 index 00000000..d637b8f1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlatdf.f @@ -0,0 +1,241 @@ + SUBROUTINE ZLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, + $ JPIV ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IJOB, LDZ, N + DOUBLE PRECISION RDSCAL, RDSUM +* .. +* .. Array Arguments .. + INTEGER IPIV( * ), JPIV( * ) + COMPLEX*16 RHS( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZLATDF computes the contribution to the reciprocal Dif-estimate +* by solving for x in Z * x = b, where b is chosen such that the norm +* of x is as large as possible. It is assumed that LU decomposition +* of Z has been computed by ZGETC2. On entry RHS = f holds the +* contribution from earlier solved sub-systems, and on return RHS = x. +* +* The factorization of Z returned by ZGETC2 has the form +* Z = P * L * U * Q, where P and Q are permutation matrices. L is lower +* triangular with unit diagonal elements and U is upper triangular. +* +* Arguments +* ========= +* +* IJOB (input) INTEGER +* IJOB = 2: First compute an approximative null-vector e +* of Z using ZGECON, e is normalized and solve for +* Zx = +-e - f with the sign giving the greater value of +* 2-norm(x). About 5 times as expensive as Default. +* IJOB .ne. 2: Local look ahead strategy where +* all entries of the r.h.s. b is choosen as either +1 or +* -1. Default. +* +* N (input) INTEGER +* The number of columns of the matrix Z. +* +* Z (input) DOUBLE PRECISION array, dimension (LDZ, N) +* On entry, the LU part of the factorization of the n-by-n +* matrix Z computed by ZGETC2: Z = P * L * U * Q +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDA >= max(1, N). +* +* RHS (input/output) DOUBLE PRECISION array, dimension (N). +* On entry, RHS contains contributions from other subsystems. +* On exit, RHS contains the solution of the subsystem with +* entries according to the value of IJOB (see above). +* +* RDSUM (input/output) DOUBLE PRECISION +* On entry, the sum of squares of computed contributions to +* the Dif-estimate under computation by ZTGSYL, where the +* scaling factor RDSCAL (see below) has been factored out. +* On exit, the corresponding sum of squares updated with the +* contributions from the current sub-system. +* If TRANS = 'T' RDSUM is not touched. +* NOTE: RDSUM only makes sense when ZTGSY2 is called by CTGSYL. +* +* RDSCAL (input/output) DOUBLE PRECISION +* On entry, scaling factor used to prevent overflow in RDSUM. +* On exit, RDSCAL is updated w.r.t. the current contributions +* in RDSUM. +* If TRANS = 'T', RDSCAL is not touched. +* NOTE: RDSCAL only makes sense when ZTGSY2 is called by +* ZTGSYL. +* +* IPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= i <= N, row i of the +* matrix has been interchanged with row IPIV(i). +* +* JPIV (input) INTEGER array, dimension (N). +* The pivot indices; for 1 <= j <= N, column j of the +* matrix has been interchanged with column JPIV(j). +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* This routine is a further developed implementation of algorithm +* BSOLVE in [1] using complete pivoting in the LU factorization. +* +* [1] Bo Kagstrom and Lars Westin, +* Generalized Schur Methods with Condition Estimators for +* Solving the Generalized Sylvester Equation, IEEE Transactions +* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751. +* +* [2] Peter Poromaa, +* On Efficient and Robust Estimators for the Separation +* between two Regular Matrix Pairs with Applications in +* Condition Estimation. Report UMINF-95.05, Department of +* Computing Science, Umea University, S-901 87 Umea, Sweden, +* 1995. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER MAXDIM + PARAMETER ( MAXDIM = 2 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + COMPLEX*16 CONE + PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, INFO, J, K + DOUBLE PRECISION RTEMP, SCALE, SMINU, SPLUS + COMPLEX*16 BM, BP, PMONE, TEMP +* .. +* .. Local Arrays .. + DOUBLE PRECISION RWORK( MAXDIM ) + COMPLEX*16 WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM ) +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZCOPY, ZGECON, ZGESC2, ZLASSQ, ZLASWP, + $ ZSCAL +* .. +* .. External Functions .. + DOUBLE PRECISION DZASUM + COMPLEX*16 ZDOTC + EXTERNAL DZASUM, ZDOTC +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, SQRT +* .. +* .. Executable Statements .. +* + IF( IJOB.NE.2 ) THEN +* +* Apply permutations IPIV to RHS +* + CALL ZLASWP( 1, RHS, LDZ, 1, N-1, IPIV, 1 ) +* +* Solve for L-part choosing RHS either to +1 or -1. +* + PMONE = -CONE + DO 10 J = 1, N - 1 + BP = RHS( J ) + CONE + BM = RHS( J ) - CONE + SPLUS = ONE +* +* Lockahead for L- part RHS(1:N-1) = +-1 +* SPLUS and SMIN computed more efficiently than in BSOLVE[1]. +* + SPLUS = SPLUS + DBLE( ZDOTC( N-J, Z( J+1, J ), 1, Z( J+1, + $ J ), 1 ) ) + SMINU = DBLE( ZDOTC( N-J, Z( J+1, J ), 1, RHS( J+1 ), 1 ) ) + SPLUS = SPLUS*DBLE( RHS( J ) ) + IF( SPLUS.GT.SMINU ) THEN + RHS( J ) = BP + ELSE IF( SMINU.GT.SPLUS ) THEN + RHS( J ) = BM + ELSE +* +* In this case the updating sums are equal and we can +* choose RHS(J) +1 or -1. The first time this happens we +* choose -1, thereafter +1. This is a simple way to get +* good estimates of matrices like Byers well-known example +* (see [1]). (Not done in BSOLVE.) +* + RHS( J ) = RHS( J ) + PMONE + PMONE = CONE + END IF +* +* Compute the remaining r.h.s. +* + TEMP = -RHS( J ) + CALL ZAXPY( N-J, TEMP, Z( J+1, J ), 1, RHS( J+1 ), 1 ) + 10 CONTINUE +* +* Solve for U- part, lockahead for RHS(N) = +-1. This is not done +* In BSOLVE and will hopefully give us a better estimate because +* any ill-conditioning of the original matrix is transfered to U +* and not to L. U(N, N) is an approximation to sigma_min(LU). +* + CALL ZCOPY( N-1, RHS, 1, WORK, 1 ) + WORK( N ) = RHS( N ) + CONE + RHS( N ) = RHS( N ) - CONE + SPLUS = ZERO + SMINU = ZERO + DO 30 I = N, 1, -1 + TEMP = CONE / Z( I, I ) + WORK( I ) = WORK( I )*TEMP + RHS( I ) = RHS( I )*TEMP + DO 20 K = I + 1, N + WORK( I ) = WORK( I ) - WORK( K )*( Z( I, K )*TEMP ) + RHS( I ) = RHS( I ) - RHS( K )*( Z( I, K )*TEMP ) + 20 CONTINUE + SPLUS = SPLUS + ABS( WORK( I ) ) + SMINU = SMINU + ABS( RHS( I ) ) + 30 CONTINUE + IF( SPLUS.GT.SMINU ) + $ CALL ZCOPY( N, WORK, 1, RHS, 1 ) +* +* Apply the permutations JPIV to the computed solution (RHS) +* + CALL ZLASWP( 1, RHS, LDZ, 1, N-1, JPIV, -1 ) +* +* Compute the sum of squares +* + CALL ZLASSQ( N, RHS, 1, RDSCAL, RDSUM ) + RETURN + END IF +* +* ENTRY IJOB = 2 +* +* Compute approximate nullvector XM of Z +* + CALL ZGECON( 'I', N, Z, LDZ, ONE, RTEMP, WORK, RWORK, INFO ) + CALL ZCOPY( N, WORK( N+1 ), 1, XM, 1 ) +* +* Compute RHS +* + CALL ZLASWP( 1, XM, LDZ, 1, N-1, IPIV, -1 ) + TEMP = CONE / SQRT( ZDOTC( N, XM, 1, XM, 1 ) ) + CALL ZSCAL( N, TEMP, XM, 1 ) + CALL ZCOPY( N, XM, 1, XP, 1 ) + CALL ZAXPY( N, CONE, RHS, 1, XP, 1 ) + CALL ZAXPY( N, -CONE, XM, 1, RHS, 1 ) + CALL ZGESC2( N, Z, LDZ, RHS, IPIV, JPIV, SCALE ) + CALL ZGESC2( N, Z, LDZ, XP, IPIV, JPIV, SCALE ) + IF( DZASUM( N, XP, 1 ).GT.DZASUM( N, RHS, 1 ) ) + $ CALL ZCOPY( N, XP, 1, RHS, 1 ) +* +* Compute the sum of squares +* + CALL ZLASSQ( N, RHS, 1, RDSCAL, RDSUM ) + RETURN +* +* End of ZLATDF +* + END diff --git a/2.3-1/src/fortran/lapack/zlatrd.f b/2.3-1/src/fortran/lapack/zlatrd.f new file mode 100644 index 00000000..5fef7b5c --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlatrd.f @@ -0,0 +1,279 @@ + SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER LDA, LDW, N, NB +* .. +* .. Array Arguments .. + DOUBLE PRECISION E( * ) + COMPLEX*16 A( LDA, * ), TAU( * ), W( LDW, * ) +* .. +* +* Purpose +* ======= +* +* ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to +* Hermitian tridiagonal form by a unitary similarity +* transformation Q' * A * Q, and returns the matrices V and W which are +* needed to apply the transformation to the unreduced part of A. +* +* If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a +* matrix, of which the upper triangle is supplied; +* if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a +* matrix, of which the lower triangle is supplied. +* +* This is an auxiliary routine called by ZHETRD. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* Hermitian matrix A is stored: +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. +* +* NB (input) INTEGER +* The number of rows and columns to be reduced. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the leading +* n-by-n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n-by-n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* On exit: +* if UPLO = 'U', the last NB columns have been reduced to +* tridiagonal form, with the diagonal elements overwriting +* the diagonal elements of A; the elements above the diagonal +* with the array TAU, represent the unitary matrix Q as a +* product of elementary reflectors; +* if UPLO = 'L', the first NB columns have been reduced to +* tridiagonal form, with the diagonal elements overwriting +* the diagonal elements of A; the elements below the diagonal +* with the array TAU, represent the unitary matrix Q as a +* product of elementary reflectors. +* See Further Details. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* E (output) DOUBLE PRECISION array, dimension (N-1) +* If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal +* elements of the last NB columns of the reduced matrix; +* if UPLO = 'L', E(1:nb) contains the subdiagonal elements of +* the first NB columns of the reduced matrix. +* +* TAU (output) COMPLEX*16 array, dimension (N-1) +* The scalar factors of the elementary reflectors, stored in +* TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. +* See Further Details. +* +* W (output) COMPLEX*16 array, dimension (LDW,NB) +* The n-by-nb matrix W required to update the unreduced part +* of A. +* +* LDW (input) INTEGER +* The leading dimension of the array W. LDW >= max(1,N). +* +* Further Details +* =============== +* +* If UPLO = 'U', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(n) H(n-1) . . . H(n-nb+1). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), +* and tau in TAU(i-1). +* +* If UPLO = 'L', the matrix Q is represented as a product of elementary +* reflectors +* +* Q = H(1) H(2) . . . H(nb). +* +* Each H(i) has the form +* +* H(i) = I - tau * v * v' +* +* where tau is a complex scalar, and v is a complex vector with +* v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), +* and tau in TAU(i). +* +* The elements of the vectors v together form the n-by-nb matrix V +* which is needed, with W, to apply the transformation to the unreduced +* part of the matrix, using a Hermitian rank-2k update of the form: +* A := A - V*W' - W*V'. +* +* The contents of A on exit are illustrated by the following examples +* with n = 5 and nb = 2: +* +* if UPLO = 'U': if UPLO = 'L': +* +* ( a a a v4 v5 ) ( d ) +* ( a a v4 v5 ) ( 1 d ) +* ( a 1 v5 ) ( v1 1 a ) +* ( d 1 ) ( v1 v2 a a ) +* ( d ) ( v1 v2 a a a ) +* +* where d denotes a diagonal element of the reduced matrix, a denotes +* an element of the original matrix that is unchanged, and vi denotes +* an element of the vector defining H(i). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE, HALF + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ), + $ HALF = ( 0.5D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, IW + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL ZAXPY, ZGEMV, ZHEMV, ZLACGV, ZLARFG, ZSCAL +* .. +* .. External Functions .. + LOGICAL LSAME + COMPLEX*16 ZDOTC + EXTERNAL LSAME, ZDOTC +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MIN +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* + IF( LSAME( UPLO, 'U' ) ) THEN +* +* Reduce last NB columns of upper triangle +* + DO 10 I = N, N - NB + 1, -1 + IW = I - N + NB + IF( I.LT.N ) THEN +* +* Update A(1:i,i) +* + A( I, I ) = DBLE( A( I, I ) ) + CALL ZLACGV( N-I, W( I, IW+1 ), LDW ) + CALL ZGEMV( 'No transpose', I, N-I, -ONE, A( 1, I+1 ), + $ LDA, W( I, IW+1 ), LDW, ONE, A( 1, I ), 1 ) + CALL ZLACGV( N-I, W( I, IW+1 ), LDW ) + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + CALL ZGEMV( 'No transpose', I, N-I, -ONE, W( 1, IW+1 ), + $ LDW, A( I, I+1 ), LDA, ONE, A( 1, I ), 1 ) + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + A( I, I ) = DBLE( A( I, I ) ) + END IF + IF( I.GT.1 ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(1:i-2,i) +* + ALPHA = A( I-1, I ) + CALL ZLARFG( I-1, ALPHA, A( 1, I ), 1, TAU( I-1 ) ) + E( I-1 ) = ALPHA + A( I-1, I ) = ONE +* +* Compute W(1:i-1,i) +* + CALL ZHEMV( 'Upper', I-1, ONE, A, LDA, A( 1, I ), 1, + $ ZERO, W( 1, IW ), 1 ) + IF( I.LT.N ) THEN + CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE, + $ W( 1, IW+1 ), LDW, A( 1, I ), 1, ZERO, + $ W( I+1, IW ), 1 ) + CALL ZGEMV( 'No transpose', I-1, N-I, -ONE, + $ A( 1, I+1 ), LDA, W( I+1, IW ), 1, ONE, + $ W( 1, IW ), 1 ) + CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE, + $ A( 1, I+1 ), LDA, A( 1, I ), 1, ZERO, + $ W( I+1, IW ), 1 ) + CALL ZGEMV( 'No transpose', I-1, N-I, -ONE, + $ W( 1, IW+1 ), LDW, W( I+1, IW ), 1, ONE, + $ W( 1, IW ), 1 ) + END IF + CALL ZSCAL( I-1, TAU( I-1 ), W( 1, IW ), 1 ) + ALPHA = -HALF*TAU( I-1 )*ZDOTC( I-1, W( 1, IW ), 1, + $ A( 1, I ), 1 ) + CALL ZAXPY( I-1, ALPHA, A( 1, I ), 1, W( 1, IW ), 1 ) + END IF +* + 10 CONTINUE + ELSE +* +* Reduce first NB columns of lower triangle +* + DO 20 I = 1, NB +* +* Update A(i:n,i) +* + A( I, I ) = DBLE( A( I, I ) ) + CALL ZLACGV( I-1, W( I, 1 ), LDW ) + CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, A( I, 1 ), + $ LDA, W( I, 1 ), LDW, ONE, A( I, I ), 1 ) + CALL ZLACGV( I-1, W( I, 1 ), LDW ) + CALL ZLACGV( I-1, A( I, 1 ), LDA ) + CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, W( I, 1 ), + $ LDW, A( I, 1 ), LDA, ONE, A( I, I ), 1 ) + CALL ZLACGV( I-1, A( I, 1 ), LDA ) + A( I, I ) = DBLE( A( I, I ) ) + IF( I.LT.N ) THEN +* +* Generate elementary reflector H(i) to annihilate +* A(i+2:n,i) +* + ALPHA = A( I+1, I ) + CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1, + $ TAU( I ) ) + E( I ) = ALPHA + A( I+1, I ) = ONE +* +* Compute W(i+1:n,i) +* + CALL ZHEMV( 'Lower', N-I, ONE, A( I+1, I+1 ), LDA, + $ A( I+1, I ), 1, ZERO, W( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE, + $ W( I+1, 1 ), LDW, A( I+1, I ), 1, ZERO, + $ W( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, A( I+1, 1 ), + $ LDA, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) + CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE, + $ A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO, + $ W( 1, I ), 1 ) + CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, W( I+1, 1 ), + $ LDW, W( 1, I ), 1, ONE, W( I+1, I ), 1 ) + CALL ZSCAL( N-I, TAU( I ), W( I+1, I ), 1 ) + ALPHA = -HALF*TAU( I )*ZDOTC( N-I, W( I+1, I ), 1, + $ A( I+1, I ), 1 ) + CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, W( I+1, I ), 1 ) + END IF +* + 20 CONTINUE + END IF +* + RETURN +* +* End of ZLATRD +* + END diff --git a/2.3-1/src/fortran/lapack/zlatrs.f b/2.3-1/src/fortran/lapack/zlatrs.f new file mode 100644 index 00000000..7466096c --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlatrs.f @@ -0,0 +1,879 @@ + SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, + $ CNORM, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, NORMIN, TRANS, UPLO + INTEGER INFO, LDA, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + DOUBLE PRECISION CNORM( * ) + COMPLEX*16 A( LDA, * ), X( * ) +* .. +* +* Purpose +* ======= +* +* ZLATRS solves one of the triangular systems +* +* A * x = s*b, A**T * x = s*b, or A**H * x = s*b, +* +* with scaling to prevent overflow. Here A is an upper or lower +* triangular matrix, A**T denotes the transpose of A, A**H denotes the +* conjugate transpose of A, x and b are n-element vectors, and s is a +* scaling factor, usually less than or equal to 1, chosen so that the +* components of x will be less than the overflow threshold. If the +* unscaled problem will not cause overflow, the Level 2 BLAS routine +* ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j), +* then s is set to 0 and a non-trivial solution to A*x = 0 is returned. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the matrix A is upper or lower triangular. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* TRANS (input) CHARACTER*1 +* Specifies the operation applied to A. +* = 'N': Solve A * x = s*b (No transpose) +* = 'T': Solve A**T * x = s*b (Transpose) +* = 'C': Solve A**H * x = s*b (Conjugate transpose) +* +* DIAG (input) CHARACTER*1 +* Specifies whether or not the matrix A is unit triangular. +* = 'N': Non-unit triangular +* = 'U': Unit triangular +* +* NORMIN (input) CHARACTER*1 +* Specifies whether CNORM has been set or not. +* = 'Y': CNORM contains the column norms on entry +* = 'N': CNORM is not set on entry. On exit, the norms will +* be computed and stored in CNORM. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,N) +* The triangular matrix A. If UPLO = 'U', the leading n by n +* upper triangular part of the array A contains the upper +* triangular matrix, and the strictly lower triangular part of +* A is not referenced. If UPLO = 'L', the leading n by n lower +* triangular part of the array A contains the lower triangular +* matrix, and the strictly upper triangular part of A is not +* referenced. If DIAG = 'U', the diagonal elements of A are +* also not referenced and are assumed to be 1. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max (1,N). +* +* X (input/output) COMPLEX*16 array, dimension (N) +* On entry, the right hand side b of the triangular system. +* On exit, X is overwritten by the solution vector x. +* +* SCALE (output) DOUBLE PRECISION +* The scaling factor s for the triangular system +* A * x = s*b, A**T * x = s*b, or A**H * x = s*b. +* If SCALE = 0, the matrix A is singular or badly scaled, and +* the vector x is an exact or approximate solution to A*x = 0. +* +* CNORM (input or output) DOUBLE PRECISION array, dimension (N) +* +* If NORMIN = 'Y', CNORM is an input argument and CNORM(j) +* contains the norm of the off-diagonal part of the j-th column +* of A. If TRANS = 'N', CNORM(j) must be greater than or equal +* to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) +* must be greater than or equal to the 1-norm. +* +* If NORMIN = 'N', CNORM is an output argument and CNORM(j) +* returns the 1-norm of the offdiagonal part of the j-th column +* of A. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* +* Further Details +* ======= ======= +* +* A rough bound on x is computed; if that is less than overflow, ZTRSV +* is called, otherwise, specific code is used which checks for possible +* overflow or divide-by-zero at every operation. +* +* A columnwise scheme is used for solving A*x = b. The basic algorithm +* if A is lower triangular is +* +* x[1:n] := b[1:n] +* for j = 1, ..., n +* x(j) := x(j) / A(j,j) +* x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] +* end +* +* Define bounds on the components of x after j iterations of the loop: +* M(j) = bound on x[1:j] +* G(j) = bound on x[j+1:n] +* Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. +* +* Then for iteration j+1 we have +* M(j+1) <= G(j) / | A(j+1,j+1) | +* G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] | +* <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | ) +* +* where CNORM(j+1) is greater than or equal to the infinity-norm of +* column j+1 of A, not counting the diagonal. Hence +* +* G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | ) +* 1<=i<=j +* and +* +* |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| ) +* 1<=i< j +* +* Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the +* reciprocal of the largest M(j), j=1,..,n, is larger than +* max(underflow, 1/overflow). +* +* The bound on x(j) is also used to determine when a step in the +* columnwise method can be performed without fear of overflow. If +* the computed bound is greater than a large constant, x is scaled to +* prevent overflow, but if the bound overflows, x is set to 0, x(j) to +* 1, and scale to 0, and a non-trivial solution to A*x = 0 is found. +* +* Similarly, a row-wise scheme is used to solve A**T *x = b or +* A**H *x = b. The basic algorithm for A upper triangular is +* +* for j = 1, ..., n +* x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j) +* end +* +* We simultaneously compute two bounds +* G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j +* M(j) = bound on x(i), 1<=i<=j +* +* The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we +* add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. +* Then the bound on x(j) is +* +* M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) | +* +* <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| ) +* 1<=i<=j +* +* and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater +* than max(underflow, 1/overflow). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, HALF, ONE, TWO + PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0, + $ TWO = 2.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN, NOUNIT, UPPER + INTEGER I, IMAX, J, JFIRST, JINC, JLAST + DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL, + $ XBND, XJ, XMAX + COMPLEX*16 CSUMJ, TJJS, USCAL, ZDUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IDAMAX, IZAMAX + DOUBLE PRECISION DLAMCH, DZASUM + COMPLEX*16 ZDOTC, ZDOTU, ZLADIV + EXTERNAL LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC, + $ ZDOTU, ZLADIV +* .. +* .. External Subroutines .. + EXTERNAL DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1, CABS2 +* .. +* .. Statement Function definitions .. + CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) ) + CABS2( ZDUM ) = ABS( DBLE( ZDUM ) / 2.D0 ) + + $ ABS( DIMAG( ZDUM ) / 2.D0 ) +* .. +* .. Executable Statements .. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOTRAN = LSAME( TRANS, 'N' ) + NOUNIT = LSAME( DIAG, 'N' ) +* +* Test the input parameters. +* + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. + $ LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -3 + ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT. + $ LSAME( NORMIN, 'N' ) ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZLATRS', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Determine machine dependent parameters to control overflow. +* + SMLNUM = DLAMCH( 'Safe minimum' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SMLNUM / DLAMCH( 'Precision' ) + BIGNUM = ONE / SMLNUM + SCALE = ONE +* + IF( LSAME( NORMIN, 'N' ) ) THEN +* +* Compute the 1-norm of each column, not including the diagonal. +* + IF( UPPER ) THEN +* +* A is upper triangular. +* + DO 10 J = 1, N + CNORM( J ) = DZASUM( J-1, A( 1, J ), 1 ) + 10 CONTINUE + ELSE +* +* A is lower triangular. +* + DO 20 J = 1, N - 1 + CNORM( J ) = DZASUM( N-J, A( J+1, J ), 1 ) + 20 CONTINUE + CNORM( N ) = ZERO + END IF + END IF +* +* Scale the column norms by TSCAL if the maximum element in CNORM is +* greater than BIGNUM/2. +* + IMAX = IDAMAX( N, CNORM, 1 ) + TMAX = CNORM( IMAX ) + IF( TMAX.LE.BIGNUM*HALF ) THEN + TSCAL = ONE + ELSE + TSCAL = HALF / ( SMLNUM*TMAX ) + CALL DSCAL( N, TSCAL, CNORM, 1 ) + END IF +* +* Compute a bound on the computed solution vector to see if the +* Level 2 BLAS routine ZTRSV can be used. +* + XMAX = ZERO + DO 30 J = 1, N + XMAX = MAX( XMAX, CABS2( X( J ) ) ) + 30 CONTINUE + XBND = XMAX +* + IF( NOTRAN ) THEN +* +* Compute the growth in A * x = b. +* + IF( UPPER ) THEN + JFIRST = N + JLAST = 1 + JINC = -1 + ELSE + JFIRST = 1 + JLAST = N + JINC = 1 + END IF +* + IF( TSCAL.NE.ONE ) THEN + GROW = ZERO + GO TO 60 + END IF +* + IF( NOUNIT ) THEN +* +* A is non-unit triangular. +* +* Compute GROW = 1/G(j) and XBND = 1/M(j). +* Initially, G(0) = max{x(i), i=1,...,n}. +* + GROW = HALF / MAX( XBND, SMLNUM ) + XBND = GROW + DO 40 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 60 +* + TJJS = A( J, J ) + TJJ = CABS1( TJJS ) +* + IF( TJJ.GE.SMLNUM ) THEN +* +* M(j) = G(j-1) / abs(A(j,j)) +* + XBND = MIN( XBND, MIN( ONE, TJJ )*GROW ) + ELSE +* +* M(j) could overflow, set XBND to 0. +* + XBND = ZERO + END IF +* + IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN +* +* G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) ) +* + GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) ) + ELSE +* +* G(j) could overflow, set GROW to 0. +* + GROW = ZERO + END IF + 40 CONTINUE + GROW = XBND + ELSE +* +* A is unit triangular. +* +* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. +* + GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) ) + DO 50 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 60 +* +* G(j) = G(j-1)*( 1 + CNORM(j) ) +* + GROW = GROW*( ONE / ( ONE+CNORM( J ) ) ) + 50 CONTINUE + END IF + 60 CONTINUE +* + ELSE +* +* Compute the growth in A**T * x = b or A**H * x = b. +* + IF( UPPER ) THEN + JFIRST = 1 + JLAST = N + JINC = 1 + ELSE + JFIRST = N + JLAST = 1 + JINC = -1 + END IF +* + IF( TSCAL.NE.ONE ) THEN + GROW = ZERO + GO TO 90 + END IF +* + IF( NOUNIT ) THEN +* +* A is non-unit triangular. +* +* Compute GROW = 1/G(j) and XBND = 1/M(j). +* Initially, M(0) = max{x(i), i=1,...,n}. +* + GROW = HALF / MAX( XBND, SMLNUM ) + XBND = GROW + DO 70 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 90 +* +* G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) ) +* + XJ = ONE + CNORM( J ) + GROW = MIN( GROW, XBND / XJ ) +* + TJJS = A( J, J ) + TJJ = CABS1( TJJS ) +* + IF( TJJ.GE.SMLNUM ) THEN +* +* M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j)) +* + IF( XJ.GT.TJJ ) + $ XBND = XBND*( TJJ / XJ ) + ELSE +* +* M(j) could overflow, set XBND to 0. +* + XBND = ZERO + END IF + 70 CONTINUE + GROW = MIN( GROW, XBND ) + ELSE +* +* A is unit triangular. +* +* Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. +* + GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) ) + DO 80 J = JFIRST, JLAST, JINC +* +* Exit the loop if the growth factor is too small. +* + IF( GROW.LE.SMLNUM ) + $ GO TO 90 +* +* G(j) = ( 1 + CNORM(j) )*G(j-1) +* + XJ = ONE + CNORM( J ) + GROW = GROW / XJ + 80 CONTINUE + END IF + 90 CONTINUE + END IF +* + IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN +* +* Use the Level 2 BLAS solve if the reciprocal of the bound on +* elements of X is not too small. +* + CALL ZTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 ) + ELSE +* +* Use a Level 1 BLAS solve, scaling intermediate results. +* + IF( XMAX.GT.BIGNUM*HALF ) THEN +* +* Scale X so that its components are less than or equal to +* BIGNUM in absolute value. +* + SCALE = ( BIGNUM*HALF ) / XMAX + CALL ZDSCAL( N, SCALE, X, 1 ) + XMAX = BIGNUM + ELSE + XMAX = XMAX*TWO + END IF +* + IF( NOTRAN ) THEN +* +* Solve A * x = b +* + DO 120 J = JFIRST, JLAST, JINC +* +* Compute x(j) = b(j) / A(j,j), scaling x if necessary. +* + XJ = CABS1( X( J ) ) + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + IF( TSCAL.EQ.ONE ) + $ GO TO 110 + END IF + TJJ = CABS1( TJJS ) + IF( TJJ.GT.SMLNUM ) THEN +* +* abs(A(j,j)) > SMLNUM: +* + IF( TJJ.LT.ONE ) THEN + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by 1/b(j). +* + REC = ONE / XJ + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + XJ = CABS1( X( J ) ) + ELSE IF( TJJ.GT.ZERO ) THEN +* +* 0 < abs(A(j,j)) <= SMLNUM: +* + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM +* to avoid overflow when dividing by A(j,j). +* + REC = ( TJJ*BIGNUM ) / XJ + IF( CNORM( J ).GT.ONE ) THEN +* +* Scale by 1/CNORM(j) to avoid overflow when +* multiplying x(j) times column j. +* + REC = REC / CNORM( J ) + END IF + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + XJ = CABS1( X( J ) ) + ELSE +* +* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and +* scale = 0, and compute a solution to A*x = 0. +* + DO 100 I = 1, N + X( I ) = ZERO + 100 CONTINUE + X( J ) = ONE + XJ = ONE + SCALE = ZERO + XMAX = ZERO + END IF + 110 CONTINUE +* +* Scale x if necessary to avoid overflow when adding a +* multiple of column j of A. +* + IF( XJ.GT.ONE ) THEN + REC = ONE / XJ + IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN +* +* Scale x by 1/(2*abs(x(j))). +* + REC = REC*HALF + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + END IF + ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN +* +* Scale x by 1/2. +* + CALL ZDSCAL( N, HALF, X, 1 ) + SCALE = SCALE*HALF + END IF +* + IF( UPPER ) THEN + IF( J.GT.1 ) THEN +* +* Compute the update +* x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j) +* + CALL ZAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X, + $ 1 ) + I = IZAMAX( J-1, X, 1 ) + XMAX = CABS1( X( I ) ) + END IF + ELSE + IF( J.LT.N ) THEN +* +* Compute the update +* x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j) +* + CALL ZAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1, + $ X( J+1 ), 1 ) + I = J + IZAMAX( N-J, X( J+1 ), 1 ) + XMAX = CABS1( X( I ) ) + END IF + END IF + 120 CONTINUE +* + ELSE IF( LSAME( TRANS, 'T' ) ) THEN +* +* Solve A**T * x = b +* + DO 170 J = JFIRST, JLAST, JINC +* +* Compute x(j) = b(j) - sum A(k,j)*x(k). +* k<>j +* + XJ = CABS1( X( J ) ) + USCAL = TSCAL + REC = ONE / MAX( XMAX, ONE ) + IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN +* +* If x(j) could overflow, scale x by 1/(2*XMAX). +* + REC = REC*HALF + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + END IF + TJJ = CABS1( TJJS ) + IF( TJJ.GT.ONE ) THEN +* +* Divide by A(j,j) when scaling x if A(j,j) > 1. +* + REC = MIN( ONE, REC*TJJ ) + USCAL = ZLADIV( USCAL, TJJS ) + END IF + IF( REC.LT.ONE ) THEN + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF +* + CSUMJ = ZERO + IF( USCAL.EQ.DCMPLX( ONE ) ) THEN +* +* If the scaling needed for A in the dot product is 1, +* call ZDOTU to perform the dot product. +* + IF( UPPER ) THEN + CSUMJ = ZDOTU( J-1, A( 1, J ), 1, X, 1 ) + ELSE IF( J.LT.N ) THEN + CSUMJ = ZDOTU( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) + END IF + ELSE +* +* Otherwise, use in-line code for the dot product. +* + IF( UPPER ) THEN + DO 130 I = 1, J - 1 + CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I ) + 130 CONTINUE + ELSE IF( J.LT.N ) THEN + DO 140 I = J + 1, N + CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I ) + 140 CONTINUE + END IF + END IF +* + IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN +* +* Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j) +* was not used to scale the dotproduct. +* + X( J ) = X( J ) - CSUMJ + XJ = CABS1( X( J ) ) + IF( NOUNIT ) THEN + TJJS = A( J, J )*TSCAL + ELSE + TJJS = TSCAL + IF( TSCAL.EQ.ONE ) + $ GO TO 160 + END IF +* +* Compute x(j) = x(j) / A(j,j), scaling if necessary. +* + TJJ = CABS1( TJJS ) + IF( TJJ.GT.SMLNUM ) THEN +* +* abs(A(j,j)) > SMLNUM: +* + IF( TJJ.LT.ONE ) THEN + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale X by 1/abs(x(j)). +* + REC = ONE / XJ + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + ELSE IF( TJJ.GT.ZERO ) THEN +* +* 0 < abs(A(j,j)) <= SMLNUM: +* + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. +* + REC = ( TJJ*BIGNUM ) / XJ + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + ELSE +* +* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and +* scale = 0 and compute a solution to A**T *x = 0. +* + DO 150 I = 1, N + X( I ) = ZERO + 150 CONTINUE + X( J ) = ONE + SCALE = ZERO + XMAX = ZERO + END IF + 160 CONTINUE + ELSE +* +* Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot +* product has already been divided by 1/A(j,j). +* + X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ + END IF + XMAX = MAX( XMAX, CABS1( X( J ) ) ) + 170 CONTINUE +* + ELSE +* +* Solve A**H * x = b +* + DO 220 J = JFIRST, JLAST, JINC +* +* Compute x(j) = b(j) - sum A(k,j)*x(k). +* k<>j +* + XJ = CABS1( X( J ) ) + USCAL = TSCAL + REC = ONE / MAX( XMAX, ONE ) + IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN +* +* If x(j) could overflow, scale x by 1/(2*XMAX). +* + REC = REC*HALF + IF( NOUNIT ) THEN + TJJS = DCONJG( A( J, J ) )*TSCAL + ELSE + TJJS = TSCAL + END IF + TJJ = CABS1( TJJS ) + IF( TJJ.GT.ONE ) THEN +* +* Divide by A(j,j) when scaling x if A(j,j) > 1. +* + REC = MIN( ONE, REC*TJJ ) + USCAL = ZLADIV( USCAL, TJJS ) + END IF + IF( REC.LT.ONE ) THEN + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF +* + CSUMJ = ZERO + IF( USCAL.EQ.DCMPLX( ONE ) ) THEN +* +* If the scaling needed for A in the dot product is 1, +* call ZDOTC to perform the dot product. +* + IF( UPPER ) THEN + CSUMJ = ZDOTC( J-1, A( 1, J ), 1, X, 1 ) + ELSE IF( J.LT.N ) THEN + CSUMJ = ZDOTC( N-J, A( J+1, J ), 1, X( J+1 ), 1 ) + END IF + ELSE +* +* Otherwise, use in-line code for the dot product. +* + IF( UPPER ) THEN + DO 180 I = 1, J - 1 + CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )* + $ X( I ) + 180 CONTINUE + ELSE IF( J.LT.N ) THEN + DO 190 I = J + 1, N + CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )* + $ X( I ) + 190 CONTINUE + END IF + END IF +* + IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN +* +* Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j) +* was not used to scale the dotproduct. +* + X( J ) = X( J ) - CSUMJ + XJ = CABS1( X( J ) ) + IF( NOUNIT ) THEN + TJJS = DCONJG( A( J, J ) )*TSCAL + ELSE + TJJS = TSCAL + IF( TSCAL.EQ.ONE ) + $ GO TO 210 + END IF +* +* Compute x(j) = x(j) / A(j,j), scaling if necessary. +* + TJJ = CABS1( TJJS ) + IF( TJJ.GT.SMLNUM ) THEN +* +* abs(A(j,j)) > SMLNUM: +* + IF( TJJ.LT.ONE ) THEN + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale X by 1/abs(x(j)). +* + REC = ONE / XJ + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + ELSE IF( TJJ.GT.ZERO ) THEN +* +* 0 < abs(A(j,j)) <= SMLNUM: +* + IF( XJ.GT.TJJ*BIGNUM ) THEN +* +* Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. +* + REC = ( TJJ*BIGNUM ) / XJ + CALL ZDSCAL( N, REC, X, 1 ) + SCALE = SCALE*REC + XMAX = XMAX*REC + END IF + X( J ) = ZLADIV( X( J ), TJJS ) + ELSE +* +* A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and +* scale = 0 and compute a solution to A**H *x = 0. +* + DO 200 I = 1, N + X( I ) = ZERO + 200 CONTINUE + X( J ) = ONE + SCALE = ZERO + XMAX = ZERO + END IF + 210 CONTINUE + ELSE +* +* Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot +* product has already been divided by 1/A(j,j). +* + X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ + END IF + XMAX = MAX( XMAX, CABS1( X( J ) ) ) + 220 CONTINUE + END IF + SCALE = SCALE / TSCAL + END IF +* +* Scale the column norms by 1/TSCAL for return. +* + IF( TSCAL.NE.ONE ) THEN + CALL DSCAL( N, ONE / TSCAL, CNORM, 1 ) + END IF +* + RETURN +* +* End of ZLATRS +* + END diff --git a/2.3-1/src/fortran/lapack/zlatrz.f b/2.3-1/src/fortran/lapack/zlatrz.f new file mode 100644 index 00000000..c1c7aab3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zlatrz.f @@ -0,0 +1,133 @@ + SUBROUTINE ZLATRZ( M, N, L, A, LDA, TAU, WORK ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER L, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZLATRZ factors the M-by-(M+L) complex upper trapezoidal matrix +* [ A1 A2 ] = [ A(1:M,1:M) A(1:M,N-L+1:N) ] as ( R 0 ) * Z by means +* of unitary transformations, where Z is an (M+L)-by-(M+L) unitary +* matrix and, R and A1 are M-by-M upper triangular matrices. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing the +* meaningful part of the Householder vectors. N-M >= L >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the leading M-by-N upper trapezoidal part of the +* array A must contain the matrix to be factorized. +* On exit, the leading M-by-M upper triangular part of A +* contains the upper triangular matrix R, and elements N-L+1 to +* N of the first M rows of A, with the array TAU, represent the +* unitary matrix Z as a product of M elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (M) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace) COMPLEX*16 array, dimension (M) +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The factorization is obtained by Householder's method. The kth +* transformation matrix, Z( k ), which is used to introduce zeros into +* the ( m - k + 1 )th row of A, is given in the form +* +* Z( k ) = ( I 0 ), +* ( 0 T( k ) ) +* +* where +* +* T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ), +* ( 0 ) +* ( z( k ) ) +* +* tau is a scalar and z( k ) is an l element vector. tau and z( k ) +* are chosen to annihilate the elements of the kth row of A2. +* +* The scalar tau is returned in the kth element of TAU and the vector +* u( k ) in the kth row of A2, such that the elements of z( k ) are +* in a( k, l + 1 ), ..., a( k, n ). The elements of R are returned in +* the upper triangular part of A1. +* +* Z is given by +* +* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I + COMPLEX*16 ALPHA +* .. +* .. External Subroutines .. + EXTERNAL ZLACGV, ZLARFG, ZLARZ +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* +* Quick return if possible +* + IF( M.EQ.0 ) THEN + RETURN + ELSE IF( M.EQ.N ) THEN + DO 10 I = 1, N + TAU( I ) = ZERO + 10 CONTINUE + RETURN + END IF +* + DO 20 I = M, 1, -1 +* +* Generate elementary reflector H(i) to annihilate +* [ A(i,i) A(i,n-l+1:n) ] +* + CALL ZLACGV( L, A( I, N-L+1 ), LDA ) + ALPHA = DCONJG( A( I, I ) ) + CALL ZLARFG( L+1, ALPHA, A( I, N-L+1 ), LDA, TAU( I ) ) + TAU( I ) = DCONJG( TAU( I ) ) +* +* Apply H(i) to A(1:i-1,i:n) from the right +* + CALL ZLARZ( 'Right', I-1, N-I+1, L, A( I, N-L+1 ), LDA, + $ DCONJG( TAU( I ) ), A( 1, I ), LDA, WORK ) + A( I, I ) = DCONJG( ALPHA ) +* + 20 CONTINUE +* + RETURN +* +* End of ZLATRZ +* + END diff --git a/2.3-1/src/fortran/lapack/zpotf2.f b/2.3-1/src/fortran/lapack/zpotf2.f new file mode 100644 index 00000000..ca9df447 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zpotf2.f @@ -0,0 +1,174 @@ + SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZPOTF2 computes the Cholesky factorization of a complex Hermitian +* positive definite matrix A. +* +* The factorization has the form +* A = U' * U , if UPLO = 'U', or +* A = L * L', if UPLO = 'L', +* where U is an upper triangular matrix and L is lower triangular. +* +* This is the unblocked version of the algorithm, calling Level 2 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the upper or lower triangular part of the +* Hermitian matrix A is stored. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the leading +* n by n upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n by n lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, if INFO = 0, the factor U or L from the Cholesky +* factorization A = U'*U or A = L*L'. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* > 0: if INFO = k, the leading minor of order k is not +* positive definite, and the factorization could not be +* completed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE, ZERO + PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) + COMPLEX*16 CONE + PARAMETER ( CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J + DOUBLE PRECISION AJJ +* .. +* .. External Functions .. + LOGICAL LSAME + COMPLEX*16 ZDOTC + EXTERNAL LSAME, ZDOTC +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZDSCAL, ZGEMV, ZLACGV +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZPOTF2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( UPPER ) THEN +* +* Compute the Cholesky factorization A = U'*U. +* + DO 10 J = 1, N +* +* Compute U(J,J) and test for non-positive-definiteness. +* + AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( 1, J ), 1, + $ A( 1, J ), 1 ) + IF( AJJ.LE.ZERO ) THEN + A( J, J ) = AJJ + GO TO 30 + END IF + AJJ = SQRT( AJJ ) + A( J, J ) = AJJ +* +* Compute elements J+1:N of row J. +* + IF( J.LT.N ) THEN + CALL ZLACGV( J-1, A( 1, J ), 1 ) + CALL ZGEMV( 'Transpose', J-1, N-J, -CONE, A( 1, J+1 ), + $ LDA, A( 1, J ), 1, CONE, A( J, J+1 ), LDA ) + CALL ZLACGV( J-1, A( 1, J ), 1 ) + CALL ZDSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA ) + END IF + 10 CONTINUE + ELSE +* +* Compute the Cholesky factorization A = L*L'. +* + DO 20 J = 1, N +* +* Compute L(J,J) and test for non-positive-definiteness. +* + AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( J, 1 ), LDA, + $ A( J, 1 ), LDA ) + IF( AJJ.LE.ZERO ) THEN + A( J, J ) = AJJ + GO TO 30 + END IF + AJJ = SQRT( AJJ ) + A( J, J ) = AJJ +* +* Compute elements J+1:N of column J. +* + IF( J.LT.N ) THEN + CALL ZLACGV( J-1, A( J, 1 ), LDA ) + CALL ZGEMV( 'No transpose', N-J, J-1, -CONE, A( J+1, 1 ), + $ LDA, A( J, 1 ), LDA, CONE, A( J+1, J ), 1 ) + CALL ZLACGV( J-1, A( J, 1 ), LDA ) + CALL ZDSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 ) + END IF + 20 CONTINUE + END IF + GO TO 40 +* + 30 CONTINUE + INFO = J +* + 40 CONTINUE + RETURN +* +* End of ZPOTF2 +* + END diff --git a/2.3-1/src/fortran/lapack/zpotrf.f b/2.3-1/src/fortran/lapack/zpotrf.f new file mode 100644 index 00000000..86772608 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zpotrf.f @@ -0,0 +1,186 @@ + SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZPOTRF computes the Cholesky factorization of a complex Hermitian +* positive definite matrix A. +* +* The factorization has the form +* A = U**H * U, if UPLO = 'U', or +* A = L * L**H, if UPLO = 'L', +* where U is an upper triangular matrix and L is lower triangular. +* +* This is the block version of the algorithm, calling Level 3 BLAS. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A is stored; +* = 'L': Lower triangle of A is stored. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the Hermitian matrix A. If UPLO = 'U', the leading +* N-by-N upper triangular part of A contains the upper +* triangular part of the matrix A, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of A contains the lower +* triangular part of the matrix A, and the strictly upper +* triangular part of A is not referenced. +* +* On exit, if INFO = 0, the factor U or L from the Cholesky +* factorization A = U**H*U or A = L*L**H. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, the leading minor of order i is not +* positive definite, and the factorization could not be +* completed. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + COMPLEX*16 CONE + PARAMETER ( ONE = 1.0D+0, CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL UPPER + INTEGER J, JB, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEMM, ZHERK, ZPOTF2, ZTRSM +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZPOTRF', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'ZPOTRF', UPLO, N, -1, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.N ) THEN +* +* Use unblocked code. +* + CALL ZPOTF2( UPLO, N, A, LDA, INFO ) + ELSE +* +* Use blocked code. +* + IF( UPPER ) THEN +* +* Compute the Cholesky factorization A = U'*U. +* + DO 10 J = 1, N, NB +* +* Update and factorize the current diagonal block and test +* for non-positive-definiteness. +* + JB = MIN( NB, N-J+1 ) + CALL ZHERK( 'Upper', 'Conjugate transpose', JB, J-1, + $ -ONE, A( 1, J ), LDA, ONE, A( J, J ), LDA ) + CALL ZPOTF2( 'Upper', JB, A( J, J ), LDA, INFO ) + IF( INFO.NE.0 ) + $ GO TO 30 + IF( J+JB.LE.N ) THEN +* +* Compute the current block row. +* + CALL ZGEMM( 'Conjugate transpose', 'No transpose', JB, + $ N-J-JB+1, J-1, -CONE, A( 1, J ), LDA, + $ A( 1, J+JB ), LDA, CONE, A( J, J+JB ), + $ LDA ) + CALL ZTRSM( 'Left', 'Upper', 'Conjugate transpose', + $ 'Non-unit', JB, N-J-JB+1, CONE, A( J, J ), + $ LDA, A( J, J+JB ), LDA ) + END IF + 10 CONTINUE +* + ELSE +* +* Compute the Cholesky factorization A = L*L'. +* + DO 20 J = 1, N, NB +* +* Update and factorize the current diagonal block and test +* for non-positive-definiteness. +* + JB = MIN( NB, N-J+1 ) + CALL ZHERK( 'Lower', 'No transpose', JB, J-1, -ONE, + $ A( J, 1 ), LDA, ONE, A( J, J ), LDA ) + CALL ZPOTF2( 'Lower', JB, A( J, J ), LDA, INFO ) + IF( INFO.NE.0 ) + $ GO TO 30 + IF( J+JB.LE.N ) THEN +* +* Compute the current block column. +* + CALL ZGEMM( 'No transpose', 'Conjugate transpose', + $ N-J-JB+1, JB, J-1, -CONE, A( J+JB, 1 ), + $ LDA, A( J, 1 ), LDA, CONE, A( J+JB, J ), + $ LDA ) + CALL ZTRSM( 'Right', 'Lower', 'Conjugate transpose', + $ 'Non-unit', N-J-JB+1, JB, CONE, A( J, J ), + $ LDA, A( J+JB, J ), LDA ) + END IF + 20 CONTINUE + END IF + END IF + GO TO 40 +* + 30 CONTINUE + INFO = INFO + J - 1 +* + 40 CONTINUE + RETURN +* +* End of ZPOTRF +* + END diff --git a/2.3-1/src/fortran/lapack/zrot.f b/2.3-1/src/fortran/lapack/zrot.f new file mode 100644 index 00000000..9c548e23 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zrot.f @@ -0,0 +1,91 @@ + SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INCX, INCY, N + DOUBLE PRECISION C + COMPLEX*16 S +* .. +* .. Array Arguments .. + COMPLEX*16 CX( * ), CY( * ) +* .. +* +* Purpose +* ======= +* +* ZROT applies a plane rotation, where the cos (C) is real and the +* sin (S) is complex, and the vectors CX and CY are complex. +* +* Arguments +* ========= +* +* N (input) INTEGER +* The number of elements in the vectors CX and CY. +* +* CX (input/output) COMPLEX*16 array, dimension (N) +* On input, the vector X. +* On output, CX is overwritten with C*X + S*Y. +* +* INCX (input) INTEGER +* The increment between successive values of CY. INCX <> 0. +* +* CY (input/output) COMPLEX*16 array, dimension (N) +* On input, the vector Y. +* On output, CY is overwritten with -CONJG(S)*X + C*Y. +* +* INCY (input) INTEGER +* The increment between successive values of CY. INCX <> 0. +* +* C (input) DOUBLE PRECISION +* S (input) COMPLEX*16 +* C and S define a rotation +* [ C S ] +* [ -conjg(S) C ] +* where C*C + S*CONJG(S) = 1.0. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER I, IX, IY + COMPLEX*16 STEMP +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG +* .. +* .. Executable Statements .. +* + IF( N.LE.0 ) + $ RETURN + IF( INCX.EQ.1 .AND. INCY.EQ.1 ) + $ GO TO 20 +* +* Code for unequal increments or equal increments not equal to 1 +* + IX = 1 + IY = 1 + IF( INCX.LT.0 ) + $ IX = ( -N+1 )*INCX + 1 + IF( INCY.LT.0 ) + $ IY = ( -N+1 )*INCY + 1 + DO 10 I = 1, N + STEMP = C*CX( IX ) + S*CY( IY ) + CY( IY ) = C*CY( IY ) - DCONJG( S )*CX( IX ) + CX( IX ) = STEMP + IX = IX + INCX + IY = IY + INCY + 10 CONTINUE + RETURN +* +* Code for both increments equal to 1 +* + 20 CONTINUE + DO 30 I = 1, N + STEMP = C*CX( I ) + S*CY( I ) + CY( I ) = C*CY( I ) - DCONJG( S )*CX( I ) + CX( I ) = STEMP + 30 CONTINUE + RETURN + END diff --git a/2.3-1/src/fortran/lapack/zsteqr.f b/2.3-1/src/fortran/lapack/zsteqr.f new file mode 100644 index 00000000..a72fdd96 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zsteqr.f @@ -0,0 +1,503 @@ + SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPZ + INTEGER INFO, LDZ, N +* .. +* .. Array Arguments .. + DOUBLE PRECISION D( * ), E( * ), WORK( * ) + COMPLEX*16 Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZSTEQR computes all eigenvalues and, optionally, eigenvectors of a +* symmetric tridiagonal matrix using the implicit QL or QR method. +* The eigenvectors of a full or band complex Hermitian matrix can also +* be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this +* matrix to tridiagonal form. +* +* Arguments +* ========= +* +* COMPZ (input) CHARACTER*1 +* = 'N': Compute eigenvalues only. +* = 'V': Compute eigenvalues and eigenvectors of the original +* Hermitian matrix. On entry, Z must contain the +* unitary matrix used to reduce the original matrix +* to tridiagonal form. +* = 'I': Compute eigenvalues and eigenvectors of the +* tridiagonal matrix. Z is initialized to the identity +* matrix. +* +* N (input) INTEGER +* The order of the matrix. N >= 0. +* +* D (input/output) DOUBLE PRECISION array, dimension (N) +* On entry, the diagonal elements of the tridiagonal matrix. +* On exit, if INFO = 0, the eigenvalues in ascending order. +* +* E (input/output) DOUBLE PRECISION array, dimension (N-1) +* On entry, the (n-1) subdiagonal elements of the tridiagonal +* matrix. +* On exit, E has been destroyed. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ, N) +* On entry, if COMPZ = 'V', then Z contains the unitary +* matrix used in the reduction to tridiagonal form. +* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the +* orthonormal eigenvectors of the original Hermitian matrix, +* and if COMPZ = 'I', Z contains the orthonormal eigenvectors +* of the symmetric tridiagonal matrix. +* If COMPZ = 'N', then Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1, and if +* eigenvectors are desired, then LDZ >= max(1,N). +* +* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) +* If COMPZ = 'N', then WORK is not referenced. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: the algorithm has failed to find all the eigenvalues in +* a total of 30*N iterations; if INFO = i, then i +* elements of E have not converged to zero; on exit, D +* and E contain the elements of a symmetric tridiagonal +* matrix which is unitarily similar to the original +* matrix. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE, TWO, THREE + PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0, + $ THREE = 3.0D0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D0, 0.0D0 ), + $ CONE = ( 1.0D0, 0.0D0 ) ) + INTEGER MAXIT + PARAMETER ( MAXIT = 30 ) +* .. +* .. Local Scalars .. + INTEGER I, ICOMPZ, II, ISCALE, J, JTOT, K, L, L1, LEND, + $ LENDM1, LENDP1, LENDSV, LM1, LSV, M, MM, MM1, + $ NM1, NMAXIT + DOUBLE PRECISION ANORM, B, C, EPS, EPS2, F, G, P, R, RT1, RT2, + $ S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 + EXTERNAL LSAME, DLAMCH, DLANST, DLAPY2 +* .. +* .. External Subroutines .. + EXTERNAL DLAE2, DLAEV2, DLARTG, DLASCL, DLASRT, XERBLA, + $ ZLASET, ZLASR, ZSWAP +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, MAX, SIGN, SQRT +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 +* + IF( LSAME( COMPZ, 'N' ) ) THEN + ICOMPZ = 0 + ELSE IF( LSAME( COMPZ, 'V' ) ) THEN + ICOMPZ = 1 + ELSE IF( LSAME( COMPZ, 'I' ) ) THEN + ICOMPZ = 2 + ELSE + ICOMPZ = -1 + END IF + IF( ICOMPZ.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1, + $ N ) ) ) THEN + INFO = -6 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZSTEQR', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* + IF( N.EQ.1 ) THEN + IF( ICOMPZ.EQ.2 ) + $ Z( 1, 1 ) = CONE + RETURN + END IF +* +* Determine the unit roundoff and over/underflow thresholds. +* + EPS = DLAMCH( 'E' ) + EPS2 = EPS**2 + SAFMIN = DLAMCH( 'S' ) + SAFMAX = ONE / SAFMIN + SSFMAX = SQRT( SAFMAX ) / THREE + SSFMIN = SQRT( SAFMIN ) / EPS2 +* +* Compute the eigenvalues and eigenvectors of the tridiagonal +* matrix. +* + IF( ICOMPZ.EQ.2 ) + $ CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ ) +* + NMAXIT = N*MAXIT + JTOT = 0 +* +* Determine where the matrix splits and choose QL or QR iteration +* for each block, according to whether top or bottom diagonal +* element is smaller. +* + L1 = 1 + NM1 = N - 1 +* + 10 CONTINUE + IF( L1.GT.N ) + $ GO TO 160 + IF( L1.GT.1 ) + $ E( L1-1 ) = ZERO + IF( L1.LE.NM1 ) THEN + DO 20 M = L1, NM1 + TST = ABS( E( M ) ) + IF( TST.EQ.ZERO ) + $ GO TO 30 + IF( TST.LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+ + $ 1 ) ) ) )*EPS ) THEN + E( M ) = ZERO + GO TO 30 + END IF + 20 CONTINUE + END IF + M = N +* + 30 CONTINUE + L = L1 + LSV = L + LEND = M + LENDSV = LEND + L1 = M + 1 + IF( LEND.EQ.L ) + $ GO TO 10 +* +* Scale submatrix in rows and columns L to LEND +* + ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) + ISCALE = 0 + IF( ANORM.EQ.ZERO ) + $ GO TO 10 + IF( ANORM.GT.SSFMAX ) THEN + ISCALE = 1 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N, + $ INFO ) + ELSE IF( ANORM.LT.SSFMIN ) THEN + ISCALE = 2 + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N, + $ INFO ) + CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N, + $ INFO ) + END IF +* +* Choose between QL and QR iteration +* + IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN + LEND = LSV + L = LENDSV + END IF +* + IF( LEND.GT.L ) THEN +* +* QL Iteration +* +* Look for small subdiagonal element. +* + 40 CONTINUE + IF( L.NE.LEND ) THEN + LENDM1 = LEND - 1 + DO 50 M = L, LENDM1 + TST = ABS( E( M ) )**2 + IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M+1 ) )+ + $ SAFMIN )GO TO 60 + 50 CONTINUE + END IF +* + M = LEND +* + 60 CONTINUE + IF( M.LT.LEND ) + $ E( M ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 80 +* +* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 +* to compute its eigensystem. +* + IF( M.EQ.L+1 ) THEN + IF( ICOMPZ.GT.0 ) THEN + CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S ) + WORK( L ) = C + WORK( N-1+L ) = S + CALL ZLASR( 'R', 'V', 'B', N, 2, WORK( L ), + $ WORK( N-1+L ), Z( 1, L ), LDZ ) + ELSE + CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 ) + END IF + D( L ) = RT1 + D( L+1 ) = RT2 + E( L ) = ZERO + L = L + 2 + IF( L.LE.LEND ) + $ GO TO 40 + GO TO 140 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 140 + JTOT = JTOT + 1 +* +* Form shift. +* + G = ( D( L+1 )-P ) / ( TWO*E( L ) ) + R = DLAPY2( G, ONE ) + G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) ) +* + S = ONE + C = ONE + P = ZERO +* +* Inner loop +* + MM1 = M - 1 + DO 70 I = MM1, L, -1 + F = S*E( I ) + B = C*E( I ) + CALL DLARTG( G, F, C, S, R ) + IF( I.NE.M-1 ) + $ E( I+1 ) = R + G = D( I+1 ) - P + R = ( D( I )-G )*S + TWO*C*B + P = S*R + D( I+1 ) = G + P + G = C*R - B +* +* If eigenvectors are desired, then save rotations. +* + IF( ICOMPZ.GT.0 ) THEN + WORK( I ) = C + WORK( N-1+I ) = -S + END IF +* + 70 CONTINUE +* +* If eigenvectors are desired, then apply saved rotations. +* + IF( ICOMPZ.GT.0 ) THEN + MM = M - L + 1 + CALL ZLASR( 'R', 'V', 'B', N, MM, WORK( L ), WORK( N-1+L ), + $ Z( 1, L ), LDZ ) + END IF +* + D( L ) = D( L ) - P + E( L ) = G + GO TO 40 +* +* Eigenvalue found. +* + 80 CONTINUE + D( L ) = P +* + L = L + 1 + IF( L.LE.LEND ) + $ GO TO 40 + GO TO 140 +* + ELSE +* +* QR Iteration +* +* Look for small superdiagonal element. +* + 90 CONTINUE + IF( L.NE.LEND ) THEN + LENDP1 = LEND + 1 + DO 100 M = L, LENDP1, -1 + TST = ABS( E( M-1 ) )**2 + IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M-1 ) )+ + $ SAFMIN )GO TO 110 + 100 CONTINUE + END IF +* + M = LEND +* + 110 CONTINUE + IF( M.GT.LEND ) + $ E( M-1 ) = ZERO + P = D( L ) + IF( M.EQ.L ) + $ GO TO 130 +* +* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 +* to compute its eigensystem. +* + IF( M.EQ.L-1 ) THEN + IF( ICOMPZ.GT.0 ) THEN + CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S ) + WORK( M ) = C + WORK( N-1+M ) = S + CALL ZLASR( 'R', 'V', 'F', N, 2, WORK( M ), + $ WORK( N-1+M ), Z( 1, L-1 ), LDZ ) + ELSE + CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 ) + END IF + D( L-1 ) = RT1 + D( L ) = RT2 + E( L-1 ) = ZERO + L = L - 2 + IF( L.GE.LEND ) + $ GO TO 90 + GO TO 140 + END IF +* + IF( JTOT.EQ.NMAXIT ) + $ GO TO 140 + JTOT = JTOT + 1 +* +* Form shift. +* + G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) ) + R = DLAPY2( G, ONE ) + G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) ) +* + S = ONE + C = ONE + P = ZERO +* +* Inner loop +* + LM1 = L - 1 + DO 120 I = M, LM1 + F = S*E( I ) + B = C*E( I ) + CALL DLARTG( G, F, C, S, R ) + IF( I.NE.M ) + $ E( I-1 ) = R + G = D( I ) - P + R = ( D( I+1 )-G )*S + TWO*C*B + P = S*R + D( I ) = G + P + G = C*R - B +* +* If eigenvectors are desired, then save rotations. +* + IF( ICOMPZ.GT.0 ) THEN + WORK( I ) = C + WORK( N-1+I ) = S + END IF +* + 120 CONTINUE +* +* If eigenvectors are desired, then apply saved rotations. +* + IF( ICOMPZ.GT.0 ) THEN + MM = L - M + 1 + CALL ZLASR( 'R', 'V', 'F', N, MM, WORK( M ), WORK( N-1+M ), + $ Z( 1, M ), LDZ ) + END IF +* + D( L ) = D( L ) - P + E( LM1 ) = G + GO TO 90 +* +* Eigenvalue found. +* + 130 CONTINUE + D( L ) = P +* + L = L - 1 + IF( L.GE.LEND ) + $ GO TO 90 + GO TO 140 +* + END IF +* +* Undo scaling if necessary +* + 140 CONTINUE + IF( ISCALE.EQ.1 ) THEN + CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) + CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV, 1, E( LSV ), + $ N, INFO ) + ELSE IF( ISCALE.EQ.2 ) THEN + CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1, + $ D( LSV ), N, INFO ) + CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV, 1, E( LSV ), + $ N, INFO ) + END IF +* +* Check for no convergence to an eigenvalue after a total +* of N*MAXIT iterations. +* + IF( JTOT.EQ.NMAXIT ) THEN + DO 150 I = 1, N - 1 + IF( E( I ).NE.ZERO ) + $ INFO = INFO + 1 + 150 CONTINUE + RETURN + END IF + GO TO 10 +* +* Order eigenvalues and eigenvectors. +* + 160 CONTINUE + IF( ICOMPZ.EQ.0 ) THEN +* +* Use Quick Sort +* + CALL DLASRT( 'I', N, D, INFO ) +* + ELSE +* +* Use Selection Sort to minimize swaps of eigenvectors +* + DO 180 II = 2, N + I = II - 1 + K = I + P = D( I ) + DO 170 J = II, N + IF( D( J ).LT.P ) THEN + K = J + P = D( J ) + END IF + 170 CONTINUE + IF( K.NE.I ) THEN + D( K ) = D( I ) + D( I ) = P + CALL ZSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 ) + END IF + 180 CONTINUE + END IF + RETURN +* +* End of ZSTEQR +* + END diff --git a/2.3-1/src/fortran/lapack/ztgevc.f b/2.3-1/src/fortran/lapack/ztgevc.f new file mode 100644 index 00000000..b8da962d --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgevc.f @@ -0,0 +1,633 @@ + SUBROUTINE ZTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL, + $ LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER HOWMNY, SIDE + INTEGER INFO, LDP, LDS, LDVL, LDVR, M, MM, N +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 P( LDP, * ), S( LDS, * ), VL( LDVL, * ), + $ VR( LDVR, * ), WORK( * ) +* .. +* +* +* Purpose +* ======= +* +* ZTGEVC computes some or all of the right and/or left eigenvectors of +* a pair of complex matrices (S,P), where S and P are upper triangular. +* Matrix pairs of this type are produced by the generalized Schur +* factorization of a complex matrix pair (A,B): +* +* A = Q*S*Z**H, B = Q*P*Z**H +* +* as computed by ZGGHRD + ZHGEQZ. +* +* The right eigenvector x and the left eigenvector y of (S,P) +* corresponding to an eigenvalue w are defined by: +* +* S*x = w*P*x, (y**H)*S = w*(y**H)*P, +* +* where y**H denotes the conjugate tranpose of y. +* The eigenvalues are not input to this routine, but are computed +* directly from the diagonal elements of S and P. +* +* This routine returns the matrices X and/or Y of right and left +* eigenvectors of (S,P), or the products Z*X and/or Q*Y, +* where Z and Q are input matrices. +* If Q and Z are the unitary factors from the generalized Schur +* factorization of a matrix pair (A,B), then Z*X and Q*Y +* are the matrices of right and left eigenvectors of (A,B). +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'R': compute right eigenvectors only; +* = 'L': compute left eigenvectors only; +* = 'B': compute both right and left eigenvectors. +* +* HOWMNY (input) CHARACTER*1 +* = 'A': compute all right and/or left eigenvectors; +* = 'B': compute all right and/or left eigenvectors, +* backtransformed by the matrices in VR and/or VL; +* = 'S': compute selected right and/or left eigenvectors, +* specified by the logical array SELECT. +* +* SELECT (input) LOGICAL array, dimension (N) +* If HOWMNY='S', SELECT specifies the eigenvectors to be +* computed. The eigenvector corresponding to the j-th +* eigenvalue is computed if SELECT(j) = .TRUE.. +* Not referenced if HOWMNY = 'A' or 'B'. +* +* N (input) INTEGER +* The order of the matrices S and P. N >= 0. +* +* S (input) COMPLEX*16 array, dimension (LDS,N) +* The upper triangular matrix S from a generalized Schur +* factorization, as computed by ZHGEQZ. +* +* LDS (input) INTEGER +* The leading dimension of array S. LDS >= max(1,N). +* +* P (input) COMPLEX*16 array, dimension (LDP,N) +* The upper triangular matrix P from a generalized Schur +* factorization, as computed by ZHGEQZ. P must have real +* diagonal elements. +* +* LDP (input) INTEGER +* The leading dimension of array P. LDP >= max(1,N). +* +* VL (input/output) COMPLEX*16 array, dimension (LDVL,MM) +* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must +* contain an N-by-N matrix Q (usually the unitary matrix Q +* of left Schur vectors returned by ZHGEQZ). +* On exit, if SIDE = 'L' or 'B', VL contains: +* if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P); +* if HOWMNY = 'B', the matrix Q*Y; +* if HOWMNY = 'S', the left eigenvectors of (S,P) specified by +* SELECT, stored consecutively in the columns of +* VL, in the same order as their eigenvalues. +* Not referenced if SIDE = 'R'. +* +* LDVL (input) INTEGER +* The leading dimension of array VL. LDVL >= 1, and if +* SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N. +* +* VR (input/output) COMPLEX*16 array, dimension (LDVR,MM) +* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must +* contain an N-by-N matrix Q (usually the unitary matrix Z +* of right Schur vectors returned by ZHGEQZ). +* On exit, if SIDE = 'R' or 'B', VR contains: +* if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P); +* if HOWMNY = 'B', the matrix Z*X; +* if HOWMNY = 'S', the right eigenvectors of (S,P) specified by +* SELECT, stored consecutively in the columns of +* VR, in the same order as their eigenvalues. +* Not referenced if SIDE = 'L'. +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1, and if +* SIDE = 'R' or 'B', LDVR >= N. +* +* MM (input) INTEGER +* The number of columns in the arrays VL and/or VR. MM >= M. +* +* M (output) INTEGER +* The number of columns in the arrays VL and/or VR actually +* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M +* is set to N. Each selected eigenvector occupies one column. +* +* WORK (workspace) COMPLEX*16 array, dimension (2*N) +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (2*N) +* +* INFO (output) INTEGER +* = 0: successful exit. +* < 0: if INFO = -i, the i-th argument had an illegal value. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ), + $ CONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL COMPL, COMPR, ILALL, ILBACK, ILBBAD, ILCOMP, + $ LSA, LSB + INTEGER I, IBEG, IEIG, IEND, IHWMNY, IM, ISIDE, ISRC, + $ J, JE, JR + DOUBLE PRECISION ACOEFA, ACOEFF, ANORM, ASCALE, BCOEFA, BIG, + $ BIGNUM, BNORM, BSCALE, DMIN, SAFMIN, SBETA, + $ SCALE, SMALL, TEMP, ULP, XMAX + COMPLEX*16 BCOEFF, CA, CB, D, SALPHA, SUM, SUMA, SUMB, X +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH + COMPLEX*16 ZLADIV + EXTERNAL LSAME, DLAMCH, ZLADIV +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZGEMV +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN +* .. +* .. Statement Functions .. + DOUBLE PRECISION ABS1 +* .. +* .. Statement Function definitions .. + ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) ) +* .. +* .. Executable Statements .. +* +* Decode and Test the input parameters +* + IF( LSAME( HOWMNY, 'A' ) ) THEN + IHWMNY = 1 + ILALL = .TRUE. + ILBACK = .FALSE. + ELSE IF( LSAME( HOWMNY, 'S' ) ) THEN + IHWMNY = 2 + ILALL = .FALSE. + ILBACK = .FALSE. + ELSE IF( LSAME( HOWMNY, 'B' ) ) THEN + IHWMNY = 3 + ILALL = .TRUE. + ILBACK = .TRUE. + ELSE + IHWMNY = -1 + END IF +* + IF( LSAME( SIDE, 'R' ) ) THEN + ISIDE = 1 + COMPL = .FALSE. + COMPR = .TRUE. + ELSE IF( LSAME( SIDE, 'L' ) ) THEN + ISIDE = 2 + COMPL = .TRUE. + COMPR = .FALSE. + ELSE IF( LSAME( SIDE, 'B' ) ) THEN + ISIDE = 3 + COMPL = .TRUE. + COMPR = .TRUE. + ELSE + ISIDE = -1 + END IF +* + INFO = 0 + IF( ISIDE.LT.0 ) THEN + INFO = -1 + ELSE IF( IHWMNY.LT.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDS.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDP.LT.MAX( 1, N ) ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGEVC', -INFO ) + RETURN + END IF +* +* Count the number of eigenvectors +* + IF( .NOT.ILALL ) THEN + IM = 0 + DO 10 J = 1, N + IF( SELECT( J ) ) + $ IM = IM + 1 + 10 CONTINUE + ELSE + IM = N + END IF +* +* Check diagonal of B +* + ILBBAD = .FALSE. + DO 20 J = 1, N + IF( DIMAG( P( J, J ) ).NE.ZERO ) + $ ILBBAD = .TRUE. + 20 CONTINUE +* + IF( ILBBAD ) THEN + INFO = -7 + ELSE IF( COMPL .AND. LDVL.LT.N .OR. LDVL.LT.1 ) THEN + INFO = -10 + ELSE IF( COMPR .AND. LDVR.LT.N .OR. LDVR.LT.1 ) THEN + INFO = -12 + ELSE IF( MM.LT.IM ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGEVC', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + M = IM + IF( N.EQ.0 ) + $ RETURN +* +* Machine Constants +* + SAFMIN = DLAMCH( 'Safe minimum' ) + BIG = ONE / SAFMIN + CALL DLABAD( SAFMIN, BIG ) + ULP = DLAMCH( 'Epsilon' )*DLAMCH( 'Base' ) + SMALL = SAFMIN*N / ULP + BIG = ONE / SMALL + BIGNUM = ONE / ( SAFMIN*N ) +* +* Compute the 1-norm of each column of the strictly upper triangular +* part of A and B to check for possible overflow in the triangular +* solver. +* + ANORM = ABS1( S( 1, 1 ) ) + BNORM = ABS1( P( 1, 1 ) ) + RWORK( 1 ) = ZERO + RWORK( N+1 ) = ZERO + DO 40 J = 2, N + RWORK( J ) = ZERO + RWORK( N+J ) = ZERO + DO 30 I = 1, J - 1 + RWORK( J ) = RWORK( J ) + ABS1( S( I, J ) ) + RWORK( N+J ) = RWORK( N+J ) + ABS1( P( I, J ) ) + 30 CONTINUE + ANORM = MAX( ANORM, RWORK( J )+ABS1( S( J, J ) ) ) + BNORM = MAX( BNORM, RWORK( N+J )+ABS1( P( J, J ) ) ) + 40 CONTINUE +* + ASCALE = ONE / MAX( ANORM, SAFMIN ) + BSCALE = ONE / MAX( BNORM, SAFMIN ) +* +* Left eigenvectors +* + IF( COMPL ) THEN + IEIG = 0 +* +* Main loop over eigenvalues +* + DO 140 JE = 1, N + IF( ILALL ) THEN + ILCOMP = .TRUE. + ELSE + ILCOMP = SELECT( JE ) + END IF + IF( ILCOMP ) THEN + IEIG = IEIG + 1 +* + IF( ABS1( S( JE, JE ) ).LE.SAFMIN .AND. + $ ABS( DBLE( P( JE, JE ) ) ).LE.SAFMIN ) THEN +* +* Singular matrix pencil -- return unit eigenvector +* + DO 50 JR = 1, N + VL( JR, IEIG ) = CZERO + 50 CONTINUE + VL( IEIG, IEIG ) = CONE + GO TO 140 + END IF +* +* Non-singular eigenvalue: +* Compute coefficients a and b in +* H +* y ( a A - b B ) = 0 +* + TEMP = ONE / MAX( ABS1( S( JE, JE ) )*ASCALE, + $ ABS( DBLE( P( JE, JE ) ) )*BSCALE, SAFMIN ) + SALPHA = ( TEMP*S( JE, JE ) )*ASCALE + SBETA = ( TEMP*DBLE( P( JE, JE ) ) )*BSCALE + ACOEFF = SBETA*ASCALE + BCOEFF = SALPHA*BSCALE +* +* Scale to avoid underflow +* + LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEFF ).LT.SMALL + LSB = ABS1( SALPHA ).GE.SAFMIN .AND. ABS1( BCOEFF ).LT. + $ SMALL +* + SCALE = ONE + IF( LSA ) + $ SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG ) + IF( LSB ) + $ SCALE = MAX( SCALE, ( SMALL / ABS1( SALPHA ) )* + $ MIN( BNORM, BIG ) ) + IF( LSA .OR. LSB ) THEN + SCALE = MIN( SCALE, ONE / + $ ( SAFMIN*MAX( ONE, ABS( ACOEFF ), + $ ABS1( BCOEFF ) ) ) ) + IF( LSA ) THEN + ACOEFF = ASCALE*( SCALE*SBETA ) + ELSE + ACOEFF = SCALE*ACOEFF + END IF + IF( LSB ) THEN + BCOEFF = BSCALE*( SCALE*SALPHA ) + ELSE + BCOEFF = SCALE*BCOEFF + END IF + END IF +* + ACOEFA = ABS( ACOEFF ) + BCOEFA = ABS1( BCOEFF ) + XMAX = ONE + DO 60 JR = 1, N + WORK( JR ) = CZERO + 60 CONTINUE + WORK( JE ) = CONE + DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN ) +* +* H +* Triangular solve of (a A - b B) y = 0 +* +* H +* (rowwise in (a A - b B) , or columnwise in a A - b B) +* + DO 100 J = JE + 1, N +* +* Compute +* j-1 +* SUM = sum conjg( a*S(k,j) - b*P(k,j) )*x(k) +* k=je +* (Scale if necessary) +* + TEMP = ONE / XMAX + IF( ACOEFA*RWORK( J )+BCOEFA*RWORK( N+J ).GT.BIGNUM* + $ TEMP ) THEN + DO 70 JR = JE, J - 1 + WORK( JR ) = TEMP*WORK( JR ) + 70 CONTINUE + XMAX = ONE + END IF + SUMA = CZERO + SUMB = CZERO +* + DO 80 JR = JE, J - 1 + SUMA = SUMA + DCONJG( S( JR, J ) )*WORK( JR ) + SUMB = SUMB + DCONJG( P( JR, J ) )*WORK( JR ) + 80 CONTINUE + SUM = ACOEFF*SUMA - DCONJG( BCOEFF )*SUMB +* +* Form x(j) = - SUM / conjg( a*S(j,j) - b*P(j,j) ) +* +* with scaling and perturbation of the denominator +* + D = DCONJG( ACOEFF*S( J, J )-BCOEFF*P( J, J ) ) + IF( ABS1( D ).LE.DMIN ) + $ D = DCMPLX( DMIN ) +* + IF( ABS1( D ).LT.ONE ) THEN + IF( ABS1( SUM ).GE.BIGNUM*ABS1( D ) ) THEN + TEMP = ONE / ABS1( SUM ) + DO 90 JR = JE, J - 1 + WORK( JR ) = TEMP*WORK( JR ) + 90 CONTINUE + XMAX = TEMP*XMAX + SUM = TEMP*SUM + END IF + END IF + WORK( J ) = ZLADIV( -SUM, D ) + XMAX = MAX( XMAX, ABS1( WORK( J ) ) ) + 100 CONTINUE +* +* Back transform eigenvector if HOWMNY='B'. +* + IF( ILBACK ) THEN + CALL ZGEMV( 'N', N, N+1-JE, CONE, VL( 1, JE ), LDVL, + $ WORK( JE ), 1, CZERO, WORK( N+1 ), 1 ) + ISRC = 2 + IBEG = 1 + ELSE + ISRC = 1 + IBEG = JE + END IF +* +* Copy and scale eigenvector into column of VL +* + XMAX = ZERO + DO 110 JR = IBEG, N + XMAX = MAX( XMAX, ABS1( WORK( ( ISRC-1 )*N+JR ) ) ) + 110 CONTINUE +* + IF( XMAX.GT.SAFMIN ) THEN + TEMP = ONE / XMAX + DO 120 JR = IBEG, N + VL( JR, IEIG ) = TEMP*WORK( ( ISRC-1 )*N+JR ) + 120 CONTINUE + ELSE + IBEG = N + 1 + END IF +* + DO 130 JR = 1, IBEG - 1 + VL( JR, IEIG ) = CZERO + 130 CONTINUE +* + END IF + 140 CONTINUE + END IF +* +* Right eigenvectors +* + IF( COMPR ) THEN + IEIG = IM + 1 +* +* Main loop over eigenvalues +* + DO 250 JE = N, 1, -1 + IF( ILALL ) THEN + ILCOMP = .TRUE. + ELSE + ILCOMP = SELECT( JE ) + END IF + IF( ILCOMP ) THEN + IEIG = IEIG - 1 +* + IF( ABS1( S( JE, JE ) ).LE.SAFMIN .AND. + $ ABS( DBLE( P( JE, JE ) ) ).LE.SAFMIN ) THEN +* +* Singular matrix pencil -- return unit eigenvector +* + DO 150 JR = 1, N + VR( JR, IEIG ) = CZERO + 150 CONTINUE + VR( IEIG, IEIG ) = CONE + GO TO 250 + END IF +* +* Non-singular eigenvalue: +* Compute coefficients a and b in +* +* ( a A - b B ) x = 0 +* + TEMP = ONE / MAX( ABS1( S( JE, JE ) )*ASCALE, + $ ABS( DBLE( P( JE, JE ) ) )*BSCALE, SAFMIN ) + SALPHA = ( TEMP*S( JE, JE ) )*ASCALE + SBETA = ( TEMP*DBLE( P( JE, JE ) ) )*BSCALE + ACOEFF = SBETA*ASCALE + BCOEFF = SALPHA*BSCALE +* +* Scale to avoid underflow +* + LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEFF ).LT.SMALL + LSB = ABS1( SALPHA ).GE.SAFMIN .AND. ABS1( BCOEFF ).LT. + $ SMALL +* + SCALE = ONE + IF( LSA ) + $ SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG ) + IF( LSB ) + $ SCALE = MAX( SCALE, ( SMALL / ABS1( SALPHA ) )* + $ MIN( BNORM, BIG ) ) + IF( LSA .OR. LSB ) THEN + SCALE = MIN( SCALE, ONE / + $ ( SAFMIN*MAX( ONE, ABS( ACOEFF ), + $ ABS1( BCOEFF ) ) ) ) + IF( LSA ) THEN + ACOEFF = ASCALE*( SCALE*SBETA ) + ELSE + ACOEFF = SCALE*ACOEFF + END IF + IF( LSB ) THEN + BCOEFF = BSCALE*( SCALE*SALPHA ) + ELSE + BCOEFF = SCALE*BCOEFF + END IF + END IF +* + ACOEFA = ABS( ACOEFF ) + BCOEFA = ABS1( BCOEFF ) + XMAX = ONE + DO 160 JR = 1, N + WORK( JR ) = CZERO + 160 CONTINUE + WORK( JE ) = CONE + DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN ) +* +* Triangular solve of (a A - b B) x = 0 (columnwise) +* +* WORK(1:j-1) contains sums w, +* WORK(j+1:JE) contains x +* + DO 170 JR = 1, JE - 1 + WORK( JR ) = ACOEFF*S( JR, JE ) - BCOEFF*P( JR, JE ) + 170 CONTINUE + WORK( JE ) = CONE +* + DO 210 J = JE - 1, 1, -1 +* +* Form x(j) := - w(j) / d +* with scaling and perturbation of the denominator +* + D = ACOEFF*S( J, J ) - BCOEFF*P( J, J ) + IF( ABS1( D ).LE.DMIN ) + $ D = DCMPLX( DMIN ) +* + IF( ABS1( D ).LT.ONE ) THEN + IF( ABS1( WORK( J ) ).GE.BIGNUM*ABS1( D ) ) THEN + TEMP = ONE / ABS1( WORK( J ) ) + DO 180 JR = 1, JE + WORK( JR ) = TEMP*WORK( JR ) + 180 CONTINUE + END IF + END IF +* + WORK( J ) = ZLADIV( -WORK( J ), D ) +* + IF( J.GT.1 ) THEN +* +* w = w + x(j)*(a S(*,j) - b P(*,j) ) with scaling +* + IF( ABS1( WORK( J ) ).GT.ONE ) THEN + TEMP = ONE / ABS1( WORK( J ) ) + IF( ACOEFA*RWORK( J )+BCOEFA*RWORK( N+J ).GE. + $ BIGNUM*TEMP ) THEN + DO 190 JR = 1, JE + WORK( JR ) = TEMP*WORK( JR ) + 190 CONTINUE + END IF + END IF +* + CA = ACOEFF*WORK( J ) + CB = BCOEFF*WORK( J ) + DO 200 JR = 1, J - 1 + WORK( JR ) = WORK( JR ) + CA*S( JR, J ) - + $ CB*P( JR, J ) + 200 CONTINUE + END IF + 210 CONTINUE +* +* Back transform eigenvector if HOWMNY='B'. +* + IF( ILBACK ) THEN + CALL ZGEMV( 'N', N, JE, CONE, VR, LDVR, WORK, 1, + $ CZERO, WORK( N+1 ), 1 ) + ISRC = 2 + IEND = N + ELSE + ISRC = 1 + IEND = JE + END IF +* +* Copy and scale eigenvector into column of VR +* + XMAX = ZERO + DO 220 JR = 1, IEND + XMAX = MAX( XMAX, ABS1( WORK( ( ISRC-1 )*N+JR ) ) ) + 220 CONTINUE +* + IF( XMAX.GT.SAFMIN ) THEN + TEMP = ONE / XMAX + DO 230 JR = 1, IEND + VR( JR, IEIG ) = TEMP*WORK( ( ISRC-1 )*N+JR ) + 230 CONTINUE + ELSE + IEND = 0 + END IF +* + DO 240 JR = IEND + 1, N + VR( JR, IEIG ) = CZERO + 240 CONTINUE +* + END IF + 250 CONTINUE + END IF +* + RETURN +* +* End of ZTGEVC +* + END diff --git a/2.3-1/src/fortran/lapack/ztgex2.f b/2.3-1/src/fortran/lapack/ztgex2.f new file mode 100644 index 00000000..a0c42aad --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgex2.f @@ -0,0 +1,265 @@ + SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, J1, INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER INFO, J1, LDA, LDB, LDQ, LDZ, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22) +* in an upper triangular matrix pair (A, B) by an unitary equivalence +* transformation. +* +* (A, B) must be in generalized Schur canonical form, that is, A and +* B are both upper triangular. +* +* Optionally, the matrices Q and Z of generalized Schur vectors are +* updated. +* +* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)' +* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)' +* +* +* Arguments +* ========= +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) COMPLEX*16 arrays, dimensions (LDA,N) +* On entry, the matrix A in the pair (A, B). +* On exit, the updated matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 arrays, dimensions (LDB,N) +* On entry, the matrix B in the pair (A, B). +* On exit, the updated matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) COMPLEX*16 array, dimension (LDZ,N) +* If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit, +* the updated matrix Q. +* Not referenced if WANTQ = .FALSE.. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1; +* If WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,N) +* If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit, +* the updated matrix Z. +* Not referenced if WANTZ = .FALSE.. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1; +* If WANTZ = .TRUE., LDZ >= N. +* +* J1 (input) INTEGER +* The index to the first block (A11, B11). +* +* INFO (output) INTEGER +* =0: Successful exit. +* =1: The transformed matrix pair (A, B) would be too far +* from generalized Schur form; the problem is ill- +* conditioned. +* +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* In the current code both weak and strong stability tests are +* performed. The user can omit the strong stability test by changing +* the internal logical parameter WANDS to .FALSE.. See ref. [2] for +* details. +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified +* Eigenvalues of a Regular Matrix Pair (A, B) and Condition +* Estimation: Theory, Algorithms and Software, Report UMINF-94.04, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, 1994. Also as LAPACK Working Note 87. To appear in +* Numerical Algorithms, 1996. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 CZERO, CONE + PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ), + $ CONE = ( 1.0D+0, 0.0D+0 ) ) + DOUBLE PRECISION TEN + PARAMETER ( TEN = 10.0D+0 ) + INTEGER LDST + PARAMETER ( LDST = 2 ) + LOGICAL WANDS + PARAMETER ( WANDS = .TRUE. ) +* .. +* .. Local Scalars .. + LOGICAL DTRONG, WEAK + INTEGER I, M + DOUBLE PRECISION CQ, CZ, EPS, SA, SB, SCALE, SMLNUM, SS, SUM, + $ THRESH, WS + COMPLEX*16 CDUM, F, G, SQ, SZ +* .. +* .. Local Arrays .. + COMPLEX*16 S( LDST, LDST ), T( LDST, LDST ), WORK( 8 ) +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. External Subroutines .. + EXTERNAL ZLACPY, ZLARTG, ZLASSQ, ZROT +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCONJG, MAX, SQRT +* .. +* .. Executable Statements .. +* + INFO = 0 +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN +* + M = LDST + WEAK = .FALSE. + DTRONG = .FALSE. +* +* Make a local copy of selected block in (A, B) +* + CALL ZLACPY( 'Full', M, M, A( J1, J1 ), LDA, S, LDST ) + CALL ZLACPY( 'Full', M, M, B( J1, J1 ), LDB, T, LDST ) +* +* Compute the threshold for testing the acceptance of swapping. +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) / EPS + SCALE = DBLE( CZERO ) + SUM = DBLE( CONE ) + CALL ZLACPY( 'Full', M, M, S, LDST, WORK, M ) + CALL ZLACPY( 'Full', M, M, T, LDST, WORK( M*M+1 ), M ) + CALL ZLASSQ( 2*M*M, WORK, 1, SCALE, SUM ) + SA = SCALE*SQRT( SUM ) + THRESH = MAX( TEN*EPS*SA, SMLNUM ) +* +* Compute unitary QL and RQ that swap 1-by-1 and 1-by-1 blocks +* using Givens rotations and perform the swap tentatively. +* + F = S( 2, 2 )*T( 1, 1 ) - T( 2, 2 )*S( 1, 1 ) + G = S( 2, 2 )*T( 1, 2 ) - T( 2, 2 )*S( 1, 2 ) + SA = ABS( S( 2, 2 ) ) + SB = ABS( T( 2, 2 ) ) + CALL ZLARTG( G, F, CZ, SZ, CDUM ) + SZ = -SZ + CALL ZROT( 2, S( 1, 1 ), 1, S( 1, 2 ), 1, CZ, DCONJG( SZ ) ) + CALL ZROT( 2, T( 1, 1 ), 1, T( 1, 2 ), 1, CZ, DCONJG( SZ ) ) + IF( SA.GE.SB ) THEN + CALL ZLARTG( S( 1, 1 ), S( 2, 1 ), CQ, SQ, CDUM ) + ELSE + CALL ZLARTG( T( 1, 1 ), T( 2, 1 ), CQ, SQ, CDUM ) + END IF + CALL ZROT( 2, S( 1, 1 ), LDST, S( 2, 1 ), LDST, CQ, SQ ) + CALL ZROT( 2, T( 1, 1 ), LDST, T( 2, 1 ), LDST, CQ, SQ ) +* +* Weak stability test: |S21| + |T21| <= O(EPS F-norm((S, T))) +* + WS = ABS( S( 2, 1 ) ) + ABS( T( 2, 1 ) ) + WEAK = WS.LE.THRESH + IF( .NOT.WEAK ) + $ GO TO 20 +* + IF( WANDS ) THEN +* +* Strong stability test: +* F-norm((A-QL'*S*QR, B-QL'*T*QR)) <= O(EPS*F-norm((A, B))) +* + CALL ZLACPY( 'Full', M, M, S, LDST, WORK, M ) + CALL ZLACPY( 'Full', M, M, T, LDST, WORK( M*M+1 ), M ) + CALL ZROT( 2, WORK, 1, WORK( 3 ), 1, CZ, -DCONJG( SZ ) ) + CALL ZROT( 2, WORK( 5 ), 1, WORK( 7 ), 1, CZ, -DCONJG( SZ ) ) + CALL ZROT( 2, WORK, 2, WORK( 2 ), 2, CQ, -SQ ) + CALL ZROT( 2, WORK( 5 ), 2, WORK( 6 ), 2, CQ, -SQ ) + DO 10 I = 1, 2 + WORK( I ) = WORK( I ) - A( J1+I-1, J1 ) + WORK( I+2 ) = WORK( I+2 ) - A( J1+I-1, J1+1 ) + WORK( I+4 ) = WORK( I+4 ) - B( J1+I-1, J1 ) + WORK( I+6 ) = WORK( I+6 ) - B( J1+I-1, J1+1 ) + 10 CONTINUE + SCALE = DBLE( CZERO ) + SUM = DBLE( CONE ) + CALL ZLASSQ( 2*M*M, WORK, 1, SCALE, SUM ) + SS = SCALE*SQRT( SUM ) + DTRONG = SS.LE.THRESH + IF( .NOT.DTRONG ) + $ GO TO 20 + END IF +* +* If the swap is accepted ("weakly" and "strongly"), apply the +* equivalence transformations to the original matrix pair (A,B) +* + CALL ZROT( J1+1, A( 1, J1 ), 1, A( 1, J1+1 ), 1, CZ, + $ DCONJG( SZ ) ) + CALL ZROT( J1+1, B( 1, J1 ), 1, B( 1, J1+1 ), 1, CZ, + $ DCONJG( SZ ) ) + CALL ZROT( N-J1+1, A( J1, J1 ), LDA, A( J1+1, J1 ), LDA, CQ, SQ ) + CALL ZROT( N-J1+1, B( J1, J1 ), LDB, B( J1+1, J1 ), LDB, CQ, SQ ) +* +* Set N1 by N2 (2,1) blocks to 0 +* + A( J1+1, J1 ) = CZERO + B( J1+1, J1 ) = CZERO +* +* Accumulate transformations into Q and Z if requested. +* + IF( WANTZ ) + $ CALL ZROT( N, Z( 1, J1 ), 1, Z( 1, J1+1 ), 1, CZ, + $ DCONJG( SZ ) ) + IF( WANTQ ) + $ CALL ZROT( N, Q( 1, J1 ), 1, Q( 1, J1+1 ), 1, CQ, + $ DCONJG( SQ ) ) +* +* Exit with INFO = 0 if swap was successfully performed. +* + RETURN +* +* Exit with INFO = 1 if swap was rejected. +* + 20 CONTINUE + INFO = 1 + RETURN +* +* End of ZTGEX2 +* + END diff --git a/2.3-1/src/fortran/lapack/ztgexc.f b/2.3-1/src/fortran/lapack/ztgexc.f new file mode 100644 index 00000000..0f57939c --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgexc.f @@ -0,0 +1,206 @@ + SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, IFST, ILST, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ), + $ Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZTGEXC reorders the generalized Schur decomposition of a complex +* matrix pair (A,B), using an unitary equivalence transformation +* (A, B) := Q * (A, B) * Z', so that the diagonal block of (A, B) with +* row index IFST is moved to row ILST. +* +* (A, B) must be in generalized Schur canonical form, that is, A and +* B are both upper triangular. +* +* Optionally, the matrices Q and Z of generalized Schur vectors are +* updated. +* +* Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)' +* Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)' +* +* Arguments +* ========= +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the upper triangular matrix A in the pair (A, B). +* On exit, the updated matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension (LDB,N) +* On entry, the upper triangular matrix B in the pair (A, B). +* On exit, the updated matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* Q (input/output) COMPLEX*16 array, dimension (LDZ,N) +* On entry, if WANTQ = .TRUE., the unitary matrix Q. +* On exit, the updated matrix Q. +* If WANTQ = .FALSE., Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1; +* If WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,N) +* On entry, if WANTZ = .TRUE., the unitary matrix Z. +* On exit, the updated matrix Z. +* If WANTZ = .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1; +* If WANTZ = .TRUE., LDZ >= N. +* +* IFST (input) INTEGER +* ILST (input/output) INTEGER +* Specify the reordering of the diagonal blocks of (A, B). +* The block with row index IFST is moved to row ILST, by a +* sequence of swapping between adjacent blocks. +* +* INFO (output) INTEGER +* =0: Successful exit. +* <0: if INFO = -i, the i-th argument had an illegal value. +* =1: The transformed matrix pair (A, B) would be too far +* from generalized Schur form; the problem is ill- +* conditioned. (A, B) may have been partially reordered, +* and ILST points to the first row of the current +* position of the block being moved. +* +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified +* Eigenvalues of a Regular Matrix Pair (A, B) and Condition +* Estimation: Theory, Algorithms and Software, Report +* UMINF - 94.04, Department of Computing Science, Umea University, +* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87. +* To appear in Numerical Algorithms, 1996. +* +* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software +* for Solving the Generalized Sylvester Equation and Estimating the +* Separation between Regular Matrix Pairs, Report UMINF - 93.23, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, December 1993, Revised April 1994, Also as LAPACK working +* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, +* 1996. +* +* ===================================================================== +* +* .. Local Scalars .. + INTEGER HERE +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZTGEX2 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Decode and test input arguments. + INFO = 0 + IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDQ.LT.1 .OR. WANTQ .AND. ( LDQ.LT.MAX( 1, N ) ) ) THEN + INFO = -9 + ELSE IF( LDZ.LT.1 .OR. WANTZ .AND. ( LDZ.LT.MAX( 1, N ) ) ) THEN + INFO = -11 + ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN + INFO = -12 + ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN + INFO = -13 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGEXC', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.1 ) + $ RETURN + IF( IFST.EQ.ILST ) + $ RETURN +* + IF( IFST.LT.ILST ) THEN +* + HERE = IFST +* + 10 CONTINUE +* +* Swap with next one below +* + CALL ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, + $ HERE, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE + 1 + IF( HERE.LT.ILST ) + $ GO TO 10 + HERE = HERE - 1 + ELSE + HERE = IFST - 1 +* + 20 CONTINUE +* +* Swap with next one above +* + CALL ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, + $ HERE, INFO ) + IF( INFO.NE.0 ) THEN + ILST = HERE + RETURN + END IF + HERE = HERE - 1 + IF( HERE.GE.ILST ) + $ GO TO 20 + HERE = HERE + 1 + END IF + ILST = HERE + RETURN +* +* End of ZTGEXC +* + END diff --git a/2.3-1/src/fortran/lapack/ztgsen.f b/2.3-1/src/fortran/lapack/ztgsen.f new file mode 100644 index 00000000..71ee4cd0 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgsen.f @@ -0,0 +1,652 @@ + SUBROUTINE ZTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB, + $ ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF, + $ WORK, LWORK, IWORK, LIWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH. +* +* .. Scalar Arguments .. + LOGICAL WANTQ, WANTZ + INTEGER IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK, + $ M, N + DOUBLE PRECISION PL, PR +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + INTEGER IWORK( * ) + DOUBLE PRECISION DIF( * ) + COMPLEX*16 A( LDA, * ), ALPHA( * ), B( LDB, * ), + $ BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * ) +* .. +* +* Purpose +* ======= +* +* ZTGSEN reorders the generalized Schur decomposition of a complex +* matrix pair (A, B) (in terms of an unitary equivalence trans- +* formation Q' * (A, B) * Z), so that a selected cluster of eigenvalues +* appears in the leading diagonal blocks of the pair (A,B). The leading +* columns of Q and Z form unitary bases of the corresponding left and +* right eigenspaces (deflating subspaces). (A, B) must be in +* generalized Schur canonical form, that is, A and B are both upper +* triangular. +* +* ZTGSEN also computes the generalized eigenvalues +* +* w(j)= ALPHA(j) / BETA(j) +* +* of the reordered matrix pair (A, B). +* +* Optionally, the routine computes estimates of reciprocal condition +* numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11), +* (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s) +* between the matrix pairs (A11, B11) and (A22,B22) that correspond to +* the selected cluster and the eigenvalues outside the cluster, resp., +* and norms of "projections" onto left and right eigenspaces w.r.t. +* the selected cluster in the (1,1)-block. +* +* +* Arguments +* ========= +* +* IJOB (input) integer +* Specifies whether condition numbers are required for the +* cluster of eigenvalues (PL and PR) or the deflating subspaces +* (Difu and Difl): +* =0: Only reorder w.r.t. SELECT. No extras. +* =1: Reciprocal of norms of "projections" onto left and right +* eigenspaces w.r.t. the selected cluster (PL and PR). +* =2: Upper bounds on Difu and Difl. F-norm-based estimate +* (DIF(1:2)). +* =3: Estimate of Difu and Difl. 1-norm-based estimate +* (DIF(1:2)). +* About 5 times as expensive as IJOB = 2. +* =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic +* version to get it all. +* =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above) +* +* WANTQ (input) LOGICAL +* .TRUE. : update the left transformation matrix Q; +* .FALSE.: do not update Q. +* +* WANTZ (input) LOGICAL +* .TRUE. : update the right transformation matrix Z; +* .FALSE.: do not update Z. +* +* SELECT (input) LOGICAL array, dimension (N) +* SELECT specifies the eigenvalues in the selected cluster. To +* select an eigenvalue w(j), SELECT(j) must be set to +* .TRUE.. +* +* N (input) INTEGER +* The order of the matrices A and B. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension(LDA,N) +* On entry, the upper triangular matrix A, in generalized +* Schur canonical form. +* On exit, A is overwritten by the reordered matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* B (input/output) COMPLEX*16 array, dimension(LDB,N) +* On entry, the upper triangular matrix B, in generalized +* Schur canonical form. +* On exit, B is overwritten by the reordered matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* ALPHA (output) COMPLEX*16 array, dimension (N) +* BETA (output) COMPLEX*16 array, dimension (N) +* The diagonal elements of A and B, respectively, +* when the pair (A,B) has been reduced to generalized Schur +* form. ALPHA(i)/BETA(i) i=1,...,N are the generalized +* eigenvalues. +* +* Q (input/output) COMPLEX*16 array, dimension (LDQ,N) +* On entry, if WANTQ = .TRUE., Q is an N-by-N matrix. +* On exit, Q has been postmultiplied by the left unitary +* transformation matrix which reorder (A, B); The leading M +* columns of Q form orthonormal bases for the specified pair of +* left eigenspaces (deflating subspaces). +* If WANTQ = .FALSE., Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= 1. +* If WANTQ = .TRUE., LDQ >= N. +* +* Z (input/output) COMPLEX*16 array, dimension (LDZ,N) +* On entry, if WANTZ = .TRUE., Z is an N-by-N matrix. +* On exit, Z has been postmultiplied by the left unitary +* transformation matrix which reorder (A, B); The leading M +* columns of Z form orthonormal bases for the specified pair of +* left eigenspaces (deflating subspaces). +* If WANTZ = .FALSE., Z is not referenced. +* +* LDZ (input) INTEGER +* The leading dimension of the array Z. LDZ >= 1. +* If WANTZ = .TRUE., LDZ >= N. +* +* M (output) INTEGER +* The dimension of the specified pair of left and right +* eigenspaces, (deflating subspaces) 0 <= M <= N. +* +* PL (output) DOUBLE PRECISION +* PR (output) DOUBLE PRECISION +* If IJOB = 1, 4 or 5, PL, PR are lower bounds on the +* reciprocal of the norm of "projections" onto left and right +* eigenspace with respect to the selected cluster. +* 0 < PL, PR <= 1. +* If M = 0 or M = N, PL = PR = 1. +* If IJOB = 0, 2 or 3 PL, PR are not referenced. +* +* DIF (output) DOUBLE PRECISION array, dimension (2). +* If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl. +* If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on +* Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based +* estimates of Difu and Difl, computed using reversed +* communication with ZLACN2. +* If M = 0 or N, DIF(1:2) = F-norm([A, B]). +* If IJOB = 0 or 1, DIF is not referenced. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* IF IJOB = 0, WORK is not referenced. Otherwise, +* on exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= 1 +* If IJOB = 1, 2 or 4, LWORK >= 2*M*(N-M) +* If IJOB = 3 or 5, LWORK >= 4*M*(N-M) +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK)) +* IF IJOB = 0, IWORK is not referenced. Otherwise, +* on exit, if INFO = 0, IWORK(1) returns the optimal LIWORK. +* +* LIWORK (input) INTEGER +* The dimension of the array IWORK. LIWORK >= 1. +* If IJOB = 1, 2 or 4, LIWORK >= N+2; +* If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M)); +* +* If LIWORK = -1, then a workspace query is assumed; the +* routine only calculates the optimal size of the IWORK array, +* returns this value as the first entry of the IWORK array, and +* no error message related to LIWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* =0: Successful exit. +* <0: If INFO = -i, the i-th argument had an illegal value. +* =1: Reordering of (A, B) failed because the transformed +* matrix pair (A, B) would be too far from generalized +* Schur form; the problem is very ill-conditioned. +* (A, B) may have been partially reordered. +* If requested, 0 is returned in DIF(*), PL and PR. +* +* +* Further Details +* =============== +* +* ZTGSEN first collects the selected eigenvalues by computing unitary +* U and W that move them to the top left corner of (A, B). In other +* words, the selected eigenvalues are the eigenvalues of (A11, B11) in +* +* U'*(A, B)*W = (A11 A12) (B11 B12) n1 +* ( 0 A22),( 0 B22) n2 +* n1 n2 n1 n2 +* +* where N = n1+n2 and U' means the conjugate transpose of U. The first +* n1 columns of U and W span the specified pair of left and right +* eigenspaces (deflating subspaces) of (A, B). +* +* If (A, B) has been obtained from the generalized real Schur +* decomposition of a matrix pair (C, D) = Q*(A, B)*Z', then the +* reordered generalized Schur form of (C, D) is given by +* +* (C, D) = (Q*U)*(U'*(A, B)*W)*(Z*W)', +* +* and the first n1 columns of Q*U and Z*W span the corresponding +* deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.). +* +* Note that if the selected eigenvalue is sufficiently ill-conditioned, +* then its value may differ significantly from its value before +* reordering. +* +* The reciprocal condition numbers of the left and right eigenspaces +* spanned by the first n1 columns of U and W (or Q*U and Z*W) may +* be returned in DIF(1:2), corresponding to Difu and Difl, resp. +* +* The Difu and Difl are defined as: +* +* Difu[(A11, B11), (A22, B22)] = sigma-min( Zu ) +* and +* Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)], +* +* where sigma-min(Zu) is the smallest singular value of the +* (2*n1*n2)-by-(2*n1*n2) matrix +* +* Zu = [ kron(In2, A11) -kron(A22', In1) ] +* [ kron(In2, B11) -kron(B22', In1) ]. +* +* Here, Inx is the identity matrix of size nx and A22' is the +* transpose of A22. kron(X, Y) is the Kronecker product between +* the matrices X and Y. +* +* When DIF(2) is small, small changes in (A, B) can cause large changes +* in the deflating subspace. An approximate (asymptotic) bound on the +* maximum angular error in the computed deflating subspaces is +* +* EPS * norm((A, B)) / DIF(2), +* +* where EPS is the machine precision. +* +* The reciprocal norm of the projectors on the left and right +* eigenspaces associated with (A11, B11) may be returned in PL and PR. +* They are computed as follows. First we compute L and R so that +* P*(A, B)*Q is block diagonal, where +* +* P = ( I -L ) n1 Q = ( I R ) n1 +* ( 0 I ) n2 and ( 0 I ) n2 +* n1 n2 n1 n2 +* +* and (L, R) is the solution to the generalized Sylvester equation +* +* A11*R - L*A22 = -A12 +* B11*R - L*B22 = -B12 +* +* Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2). +* An approximate (asymptotic) bound on the average absolute error of +* the selected eigenvalues is +* +* EPS * norm((A, B)) / PL. +* +* There are also global error bounds which valid for perturbations up +* to a certain restriction: A lower bound (x) on the smallest +* F-norm(E,F) for which an eigenvalue of (A11, B11) may move and +* coalesce with an eigenvalue of (A22, B22) under perturbation (E,F), +* (i.e. (A + E, B + F), is +* +* x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)). +* +* An approximate bound on x can be computed from DIF(1:2), PL and PR. +* +* If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed +* (L', R') and unperturbed (L, R) left and right deflating subspaces +* associated with the selected cluster in the (1,1)-blocks can be +* bounded as +* +* max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2)) +* max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2)) +* +* See LAPACK User's Guide section 4.11 or the following references +* for more information. +* +* Note that if the default method for computing the Frobenius-norm- +* based estimate DIF is not wanted (see ZLATDF), then the parameter +* IDIFJB (see below) should be changed from 3 to 4 (routine ZLATDF +* (IJOB = 2 will be used)). See ZTGSYL for more details. +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* References +* ========== +* +* [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the +* Generalized Real Schur Form of a Regular Matrix Pair (A, B), in +* M.S. Moonen et al (eds), Linear Algebra for Large Scale and +* Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218. +* +* [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified +* Eigenvalues of a Regular Matrix Pair (A, B) and Condition +* Estimation: Theory, Algorithms and Software, Report +* UMINF - 94.04, Department of Computing Science, Umea University, +* S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87. +* To appear in Numerical Algorithms, 1996. +* +* [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software +* for Solving the Generalized Sylvester Equation and Estimating the +* Separation between Regular Matrix Pairs, Report UMINF - 93.23, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, December 1993, Revised April 1994, Also as LAPACK working +* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1, +* 1996. +* +* ===================================================================== +* +* .. Parameters .. + INTEGER IDIFJB + PARAMETER ( IDIFJB = 3 ) + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, SWAP, WANTD, WANTD1, WANTD2, WANTP + INTEGER I, IERR, IJB, K, KASE, KS, LIWMIN, LWMIN, MN2, + $ N1, N2 + DOUBLE PRECISION DSCALE, DSUM, RDSCAL, SAFMIN +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACN2, ZLACPY, ZLASSQ, ZSCAL, ZTGEXC, + $ ZTGSYL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DCMPLX, DCONJG, MAX, SQRT +* .. +* .. External Functions .. + DOUBLE PRECISION DLAMCH + EXTERNAL DLAMCH +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 .OR. LIWORK.EQ.-1 ) +* + IF( IJOB.LT.0 .OR. IJOB.GT.5 ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN + INFO = -13 + ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN + INFO = -15 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGSEN', -INFO ) + RETURN + END IF +* + IERR = 0 +* + WANTP = IJOB.EQ.1 .OR. IJOB.GE.4 + WANTD1 = IJOB.EQ.2 .OR. IJOB.EQ.4 + WANTD2 = IJOB.EQ.3 .OR. IJOB.EQ.5 + WANTD = WANTD1 .OR. WANTD2 +* +* Set M to the dimension of the specified pair of deflating +* subspaces. +* + M = 0 + DO 10 K = 1, N + ALPHA( K ) = A( K, K ) + BETA( K ) = B( K, K ) + IF( K.LT.N ) THEN + IF( SELECT( K ) ) + $ M = M + 1 + ELSE + IF( SELECT( N ) ) + $ M = M + 1 + END IF + 10 CONTINUE +* + IF( IJOB.EQ.1 .OR. IJOB.EQ.2 .OR. IJOB.EQ.4 ) THEN + LWMIN = MAX( 1, 2*M*( N-M ) ) + LIWMIN = MAX( 1, N+2 ) + ELSE IF( IJOB.EQ.3 .OR. IJOB.EQ.5 ) THEN + LWMIN = MAX( 1, 4*M*( N-M ) ) + LIWMIN = MAX( 1, 2*M*( N-M ), N+2 ) + ELSE + LWMIN = 1 + LIWMIN = 1 + END IF +* + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN +* + IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -21 + ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN + INFO = -23 + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGSEN', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible. +* + IF( M.EQ.N .OR. M.EQ.0 ) THEN + IF( WANTP ) THEN + PL = ONE + PR = ONE + END IF + IF( WANTD ) THEN + DSCALE = ZERO + DSUM = ONE + DO 20 I = 1, N + CALL ZLASSQ( N, A( 1, I ), 1, DSCALE, DSUM ) + CALL ZLASSQ( N, B( 1, I ), 1, DSCALE, DSUM ) + 20 CONTINUE + DIF( 1 ) = DSCALE*SQRT( DSUM ) + DIF( 2 ) = DIF( 1 ) + END IF + GO TO 70 + END IF +* +* Get machine constant +* + SAFMIN = DLAMCH( 'S' ) +* +* Collect the selected blocks at the top-left corner of (A, B). +* + KS = 0 + DO 30 K = 1, N + SWAP = SELECT( K ) + IF( SWAP ) THEN + KS = KS + 1 +* +* Swap the K-th block to position KS. Compute unitary Q +* and Z that will swap adjacent diagonal blocks in (A, B). +* + IF( K.NE.KS ) + $ CALL ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, + $ LDZ, K, KS, IERR ) +* + IF( IERR.GT.0 ) THEN +* +* Swap is rejected: exit. +* + INFO = 1 + IF( WANTP ) THEN + PL = ZERO + PR = ZERO + END IF + IF( WANTD ) THEN + DIF( 1 ) = ZERO + DIF( 2 ) = ZERO + END IF + GO TO 70 + END IF + END IF + 30 CONTINUE + IF( WANTP ) THEN +* +* Solve generalized Sylvester equation for R and L: +* A11 * R - L * A22 = A12 +* B11 * R - L * B22 = B12 +* + N1 = M + N2 = N - M + I = N1 + 1 + CALL ZLACPY( 'Full', N1, N2, A( 1, I ), LDA, WORK, N1 ) + CALL ZLACPY( 'Full', N1, N2, B( 1, I ), LDB, WORK( N1*N2+1 ), + $ N1 ) + IJB = 0 + CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK, + $ N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ), N1, + $ DSCALE, DIF( 1 ), WORK( N1*N2*2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) +* +* Estimate the reciprocal of norms of "projections" onto +* left and right eigenspaces +* + RDSCAL = ZERO + DSUM = ONE + CALL ZLASSQ( N1*N2, WORK, 1, RDSCAL, DSUM ) + PL = RDSCAL*SQRT( DSUM ) + IF( PL.EQ.ZERO ) THEN + PL = ONE + ELSE + PL = DSCALE / ( SQRT( DSCALE*DSCALE / PL+PL )*SQRT( PL ) ) + END IF + RDSCAL = ZERO + DSUM = ONE + CALL ZLASSQ( N1*N2, WORK( N1*N2+1 ), 1, RDSCAL, DSUM ) + PR = RDSCAL*SQRT( DSUM ) + IF( PR.EQ.ZERO ) THEN + PR = ONE + ELSE + PR = DSCALE / ( SQRT( DSCALE*DSCALE / PR+PR )*SQRT( PR ) ) + END IF + END IF + IF( WANTD ) THEN +* +* Compute estimates Difu and Difl. +* + IF( WANTD1 ) THEN + N1 = M + N2 = N - M + I = N1 + 1 + IJB = IDIFJB +* +* Frobenius norm-based Difu estimate. +* + CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK, + $ N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ), + $ N1, DSCALE, DIF( 1 ), WORK( N1*N2*2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) +* +* Frobenius norm-based Difl estimate. +* + CALL ZTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA, WORK, + $ N2, B( I, I ), LDB, B, LDB, WORK( N1*N2+1 ), + $ N2, DSCALE, DIF( 2 ), WORK( N1*N2*2+1 ), + $ LWORK-2*N1*N2, IWORK, IERR ) + ELSE +* +* Compute 1-norm-based estimates of Difu and Difl using +* reversed communication with ZLACN2. In each step a +* generalized Sylvester equation or a transposed variant +* is solved. +* + KASE = 0 + N1 = M + N2 = N - M + I = N1 + 1 + IJB = 0 + MN2 = 2*N1*N2 +* +* 1-norm-based estimate of Difu. +* + 40 CONTINUE + CALL ZLACN2( MN2, WORK( MN2+1 ), WORK, DIF( 1 ), KASE, + $ ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve generalized Sylvester equation +* + CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, + $ WORK, N1, B, LDB, B( I, I ), LDB, + $ WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ), + $ WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + ELSE +* +* Solve the transposed variant. +* + CALL ZTGSYL( 'C', IJB, N1, N2, A, LDA, A( I, I ), LDA, + $ WORK, N1, B, LDB, B( I, I ), LDB, + $ WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ), + $ WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + END IF + GO TO 40 + END IF + DIF( 1 ) = DSCALE / DIF( 1 ) +* +* 1-norm-based estimate of Difl. +* + 50 CONTINUE + CALL ZLACN2( MN2, WORK( MN2+1 ), WORK, DIF( 2 ), KASE, + $ ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve generalized Sylvester equation +* + CALL ZTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA, + $ WORK, N2, B( I, I ), LDB, B, LDB, + $ WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ), + $ WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + ELSE +* +* Solve the transposed variant. +* + CALL ZTGSYL( 'C', IJB, N2, N1, A( I, I ), LDA, A, LDA, + $ WORK, N2, B, LDB, B( I, I ), LDB, + $ WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ), + $ WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK, + $ IERR ) + END IF + GO TO 50 + END IF + DIF( 2 ) = DSCALE / DIF( 2 ) + END IF + END IF +* +* If B(K,K) is complex, make it real and positive (normalization +* of the generalized Schur form) and Store the generalized +* eigenvalues of reordered pair (A, B) +* + DO 60 K = 1, N + DSCALE = ABS( B( K, K ) ) + IF( DSCALE.GT.SAFMIN ) THEN + WORK( 1 ) = DCONJG( B( K, K ) / DSCALE ) + WORK( 2 ) = B( K, K ) / DSCALE + B( K, K ) = DSCALE + CALL ZSCAL( N-K, WORK( 1 ), B( K, K+1 ), LDB ) + CALL ZSCAL( N-K+1, WORK( 1 ), A( K, K ), LDA ) + IF( WANTQ ) + $ CALL ZSCAL( N, WORK( 2 ), Q( 1, K ), 1 ) + ELSE + B( K, K ) = DCMPLX( ZERO, ZERO ) + END IF +* + ALPHA( K ) = A( K, K ) + BETA( K ) = B( K, K ) +* + 60 CONTINUE +* + 70 CONTINUE +* + WORK( 1 ) = LWMIN + IWORK( 1 ) = LIWMIN +* + RETURN +* +* End of ZTGSEN +* + END diff --git a/2.3-1/src/fortran/lapack/ztgsy2.f b/2.3-1/src/fortran/lapack/ztgsy2.f new file mode 100644 index 00000000..82ec5eb1 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgsy2.f @@ -0,0 +1,361 @@ + SUBROUTINE ZTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL, + $ INFO ) +* +* -- LAPACK auxiliary routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N + DOUBLE PRECISION RDSCAL, RDSUM, SCALE +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ), + $ D( LDD, * ), E( LDE, * ), F( LDF, * ) +* .. +* +* Purpose +* ======= +* +* ZTGSY2 solves the generalized Sylvester equation +* +* A * R - L * B = scale * C (1) +* D * R - L * E = scale * F +* +* using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices, +* (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M, +* N-by-N and M-by-N, respectively. A, B, D and E are upper triangular +* (i.e., (A,D) and (B,E) in generalized Schur form). +* +* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output +* scaling factor chosen to avoid overflow. +* +* In matrix notation solving equation (1) corresponds to solve +* Zx = scale * b, where Z is defined as +* +* Z = [ kron(In, A) -kron(B', Im) ] (2) +* [ kron(In, D) -kron(E', Im) ], +* +* Ik is the identity matrix of size k and X' is the transpose of X. +* kron(X, Y) is the Kronecker product between the matrices X and Y. +* +* If TRANS = 'C', y in the conjugate transposed system Z'y = scale*b +* is solved for, which is equivalent to solve for R and L in +* +* A' * R + D' * L = scale * C (3) +* R * B' + L * E' = scale * -F +* +* This case is used to compute an estimate of Dif[(A, D), (B, E)] = +* = sigma_min(Z) using reverse communicaton with ZLACON. +* +* ZTGSY2 also (IJOB >= 1) contributes to the computation in ZTGSYL +* of an upper bound on the separation between to matrix pairs. Then +* the input (A, D), (B, E) are sub-pencils of two matrix pairs in +* ZTGSYL. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* = 'N', solve the generalized Sylvester equation (1). +* = 'T': solve the 'transposed' system (3). +* +* IJOB (input) INTEGER +* Specifies what kind of functionality to be performed. +* =0: solve (1) only. +* =1: A contribution from this subsystem to a Frobenius +* norm-based estimate of the separation between two matrix +* pairs is computed. (look ahead strategy is used). +* =2: A contribution from this subsystem to a Frobenius +* norm-based estimate of the separation between two matrix +* pairs is computed. (DGECON on sub-systems is used.) +* Not referenced if TRANS = 'T'. +* +* M (input) INTEGER +* On entry, M specifies the order of A and D, and the row +* dimension of C, F, R and L. +* +* N (input) INTEGER +* On entry, N specifies the order of B and E, and the column +* dimension of C, F, R and L. +* +* A (input) COMPLEX*16 array, dimension (LDA, M) +* On entry, A contains an upper triangular matrix. +* +* LDA (input) INTEGER +* The leading dimension of the matrix A. LDA >= max(1, M). +* +* B (input) COMPLEX*16 array, dimension (LDB, N) +* On entry, B contains an upper triangular matrix. +* +* LDB (input) INTEGER +* The leading dimension of the matrix B. LDB >= max(1, N). +* +* C (input/output) COMPLEX*16 array, dimension (LDC, N) +* On entry, C contains the right-hand-side of the first matrix +* equation in (1). +* On exit, if IJOB = 0, C has been overwritten by the solution +* R. +* +* LDC (input) INTEGER +* The leading dimension of the matrix C. LDC >= max(1, M). +* +* D (input) COMPLEX*16 array, dimension (LDD, M) +* On entry, D contains an upper triangular matrix. +* +* LDD (input) INTEGER +* The leading dimension of the matrix D. LDD >= max(1, M). +* +* E (input) COMPLEX*16 array, dimension (LDE, N) +* On entry, E contains an upper triangular matrix. +* +* LDE (input) INTEGER +* The leading dimension of the matrix E. LDE >= max(1, N). +* +* F (input/output) COMPLEX*16 array, dimension (LDF, N) +* On entry, F contains the right-hand-side of the second matrix +* equation in (1). +* On exit, if IJOB = 0, F has been overwritten by the solution +* L. +* +* LDF (input) INTEGER +* The leading dimension of the matrix F. LDF >= max(1, M). +* +* SCALE (output) DOUBLE PRECISION +* On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions +* R and L (C and F on entry) will hold the solutions to a +* slightly perturbed system but the input matrices A, B, D and +* E have not been changed. If SCALE = 0, R and L will hold the +* solutions to the homogeneous system with C = F = 0. +* Normally, SCALE = 1. +* +* RDSUM (input/output) DOUBLE PRECISION +* On entry, the sum of squares of computed contributions to +* the Dif-estimate under computation by ZTGSYL, where the +* scaling factor RDSCAL (see below) has been factored out. +* On exit, the corresponding sum of squares updated with the +* contributions from the current sub-system. +* If TRANS = 'T' RDSUM is not touched. +* NOTE: RDSUM only makes sense when ZTGSY2 is called by +* ZTGSYL. +* +* RDSCAL (input/output) DOUBLE PRECISION +* On entry, scaling factor used to prevent overflow in RDSUM. +* On exit, RDSCAL is updated w.r.t. the current contributions +* in RDSUM. +* If TRANS = 'T', RDSCAL is not touched. +* NOTE: RDSCAL only makes sense when ZTGSY2 is called by +* ZTGSYL. +* +* INFO (output) INTEGER +* On exit, if INFO is set to +* =0: Successful exit +* <0: If INFO = -i, input argument number i is illegal. +* >0: The matrix pairs (A, D) and (B, E) have common or very +* close eigenvalues. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + INTEGER LDZ + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, LDZ = 2 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRAN + INTEGER I, IERR, J, K + DOUBLE PRECISION SCALOC + COMPLEX*16 ALPHA +* .. +* .. Local Arrays .. + INTEGER IPIV( LDZ ), JPIV( LDZ ) + COMPLEX*16 RHS( LDZ ), Z( LDZ, LDZ ) +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZAXPY, ZGESC2, ZGETC2, ZLATDF, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC DCMPLX, DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Decode and test input parameters +* + INFO = 0 + IERR = 0 + NOTRAN = LSAME( TRANS, 'N' ) + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -1 + ELSE IF( NOTRAN ) THEN + IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.2 ) ) THEN + INFO = -2 + END IF + END IF + IF( INFO.EQ.0 ) THEN + IF( M.LE.0 ) THEN + INFO = -3 + ELSE IF( N.LE.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LDD.LT.MAX( 1, M ) ) THEN + INFO = -12 + ELSE IF( LDE.LT.MAX( 1, N ) ) THEN + INFO = -14 + ELSE IF( LDF.LT.MAX( 1, M ) ) THEN + INFO = -16 + END IF + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGSY2', -INFO ) + RETURN + END IF +* + IF( NOTRAN ) THEN +* +* Solve (I, J) - system +* A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J) +* D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J) +* for I = M, M - 1, ..., 1; J = 1, 2, ..., N +* + SCALE = ONE + SCALOC = ONE + DO 30 J = 1, N + DO 20 I = M, 1, -1 +* +* Build 2 by 2 system +* + Z( 1, 1 ) = A( I, I ) + Z( 2, 1 ) = D( I, I ) + Z( 1, 2 ) = -B( J, J ) + Z( 2, 2 ) = -E( J, J ) +* +* Set up right hand side(s) +* + RHS( 1 ) = C( I, J ) + RHS( 2 ) = F( I, J ) +* +* Solve Z * x = RHS +* + CALL ZGETC2( LDZ, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR + IF( IJOB.EQ.0 ) THEN + CALL ZGESC2( LDZ, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 10 K = 1, N + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ C( 1, K ), 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ F( 1, K ), 1 ) + 10 CONTINUE + SCALE = SCALE*SCALOC + END IF + ELSE + CALL ZLATDF( IJOB, LDZ, Z, LDZ, RHS, RDSUM, RDSCAL, + $ IPIV, JPIV ) + END IF +* +* Unpack solution vector(s) +* + C( I, J ) = RHS( 1 ) + F( I, J ) = RHS( 2 ) +* +* Substitute R(I, J) and L(I, J) into remaining equation. +* + IF( I.GT.1 ) THEN + ALPHA = -RHS( 1 ) + CALL ZAXPY( I-1, ALPHA, A( 1, I ), 1, C( 1, J ), 1 ) + CALL ZAXPY( I-1, ALPHA, D( 1, I ), 1, F( 1, J ), 1 ) + END IF + IF( J.LT.N ) THEN + CALL ZAXPY( N-J, RHS( 2 ), B( J, J+1 ), LDB, + $ C( I, J+1 ), LDC ) + CALL ZAXPY( N-J, RHS( 2 ), E( J, J+1 ), LDE, + $ F( I, J+1 ), LDF ) + END IF +* + 20 CONTINUE + 30 CONTINUE + ELSE +* +* Solve transposed (I, J) - system: +* A(I, I)' * R(I, J) + D(I, I)' * L(J, J) = C(I, J) +* R(I, I) * B(J, J) + L(I, J) * E(J, J) = -F(I, J) +* for I = 1, 2, ..., M, J = N, N - 1, ..., 1 +* + SCALE = ONE + SCALOC = ONE + DO 80 I = 1, M + DO 70 J = N, 1, -1 +* +* Build 2 by 2 system Z' +* + Z( 1, 1 ) = DCONJG( A( I, I ) ) + Z( 2, 1 ) = -DCONJG( B( J, J ) ) + Z( 1, 2 ) = DCONJG( D( I, I ) ) + Z( 2, 2 ) = -DCONJG( E( J, J ) ) +* +* +* Set up right hand side(s) +* + RHS( 1 ) = C( I, J ) + RHS( 2 ) = F( I, J ) +* +* Solve Z' * x = RHS +* + CALL ZGETC2( LDZ, Z, LDZ, IPIV, JPIV, IERR ) + IF( IERR.GT.0 ) + $ INFO = IERR + CALL ZGESC2( LDZ, Z, LDZ, RHS, IPIV, JPIV, SCALOC ) + IF( SCALOC.NE.ONE ) THEN + DO 40 K = 1, N + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ), + $ 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ), + $ 1 ) + 40 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Unpack solution vector(s) +* + C( I, J ) = RHS( 1 ) + F( I, J ) = RHS( 2 ) +* +* Substitute R(I, J) and L(I, J) into remaining equation. +* + DO 50 K = 1, J - 1 + F( I, K ) = F( I, K ) + RHS( 1 )*DCONJG( B( K, J ) ) + + $ RHS( 2 )*DCONJG( E( K, J ) ) + 50 CONTINUE + DO 60 K = I + 1, M + C( K, J ) = C( K, J ) - DCONJG( A( I, K ) )*RHS( 1 ) - + $ DCONJG( D( I, K ) )*RHS( 2 ) + 60 CONTINUE +* + 70 CONTINUE + 80 CONTINUE + END IF + RETURN +* +* End of ZTGSY2 +* + END diff --git a/2.3-1/src/fortran/lapack/ztgsyl.f b/2.3-1/src/fortran/lapack/ztgsyl.f new file mode 100644 index 00000000..af808a31 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztgsyl.f @@ -0,0 +1,575 @@ + SUBROUTINE ZTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK, + $ IWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANS + INTEGER IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, + $ LWORK, M, N + DOUBLE PRECISION DIF, SCALE +* .. +* .. Array Arguments .. + INTEGER IWORK( * ) + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ), + $ D( LDD, * ), E( LDE, * ), F( LDF, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZTGSYL solves the generalized Sylvester equation: +* +* A * R - L * B = scale * C (1) +* D * R - L * E = scale * F +* +* where R and L are unknown m-by-n matrices, (A, D), (B, E) and +* (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n, +* respectively, with complex entries. A, B, D and E are upper +* triangular (i.e., (A,D) and (B,E) in generalized Schur form). +* +* The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 +* is an output scaling factor chosen to avoid overflow. +* +* In matrix notation (1) is equivalent to solve Zx = scale*b, where Z +* is defined as +* +* Z = [ kron(In, A) -kron(B', Im) ] (2) +* [ kron(In, D) -kron(E', Im) ], +* +* Here Ix is the identity matrix of size x and X' is the conjugate +* transpose of X. Kron(X, Y) is the Kronecker product between the +* matrices X and Y. +* +* If TRANS = 'C', y in the conjugate transposed system Z'*y = scale*b +* is solved for, which is equivalent to solve for R and L in +* +* A' * R + D' * L = scale * C (3) +* R * B' + L * E' = scale * -F +* +* This case (TRANS = 'C') is used to compute an one-norm-based estimate +* of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D) +* and (B,E), using ZLACON. +* +* If IJOB >= 1, ZTGSYL computes a Frobenius norm-based estimate of +* Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the +* reciprocal of the smallest singular value of Z. +* +* This is a level-3 BLAS algorithm. +* +* Arguments +* ========= +* +* TRANS (input) CHARACTER*1 +* = 'N': solve the generalized sylvester equation (1). +* = 'C': solve the "conjugate transposed" system (3). +* +* IJOB (input) INTEGER +* Specifies what kind of functionality to be performed. +* =0: solve (1) only. +* =1: The functionality of 0 and 3. +* =2: The functionality of 0 and 4. +* =3: Only an estimate of Dif[(A,D), (B,E)] is computed. +* (look ahead strategy is used). +* =4: Only an estimate of Dif[(A,D), (B,E)] is computed. +* (ZGECON on sub-systems is used). +* Not referenced if TRANS = 'C'. +* +* M (input) INTEGER +* The order of the matrices A and D, and the row dimension of +* the matrices C, F, R and L. +* +* N (input) INTEGER +* The order of the matrices B and E, and the column dimension +* of the matrices C, F, R and L. +* +* A (input) COMPLEX*16 array, dimension (LDA, M) +* The upper triangular matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1, M). +* +* B (input) COMPLEX*16 array, dimension (LDB, N) +* The upper triangular matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1, N). +* +* C (input/output) COMPLEX*16 array, dimension (LDC, N) +* On entry, C contains the right-hand-side of the first matrix +* equation in (1) or (3). +* On exit, if IJOB = 0, 1 or 2, C has been overwritten by +* the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R, +* the solution achieved during the computation of the +* Dif-estimate. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1, M). +* +* D (input) COMPLEX*16 array, dimension (LDD, M) +* The upper triangular matrix D. +* +* LDD (input) INTEGER +* The leading dimension of the array D. LDD >= max(1, M). +* +* E (input) COMPLEX*16 array, dimension (LDE, N) +* The upper triangular matrix E. +* +* LDE (input) INTEGER +* The leading dimension of the array E. LDE >= max(1, N). +* +* F (input/output) COMPLEX*16 array, dimension (LDF, N) +* On entry, F contains the right-hand-side of the second matrix +* equation in (1) or (3). +* On exit, if IJOB = 0, 1 or 2, F has been overwritten by +* the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L, +* the solution achieved during the computation of the +* Dif-estimate. +* +* LDF (input) INTEGER +* The leading dimension of the array F. LDF >= max(1, M). +* +* DIF (output) DOUBLE PRECISION +* On exit DIF is the reciprocal of a lower bound of the +* reciprocal of the Dif-function, i.e. DIF is an upper bound of +* Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2). +* IF IJOB = 0 or TRANS = 'C', DIF is not referenced. +* +* SCALE (output) DOUBLE PRECISION +* On exit SCALE is the scaling factor in (1) or (3). +* If 0 < SCALE < 1, C and F hold the solutions R and L, resp., +* to a slightly perturbed system but the input matrices A, B, +* D and E have not been changed. If SCALE = 0, R and L will +* hold the solutions to the homogenious system with C = F = 0. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK > = 1. +* If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* IWORK (workspace) INTEGER array, dimension (M+N+2) +* If IJOB = 0, IWORK is not referenced. +* +* INFO (output) INTEGER +* =0: successful exit +* <0: If INFO = -i, the i-th argument had an illegal value. +* >0: (A, D) and (B, E) have common or very close +* eigenvalues. +* +* Further Details +* =============== +* +* Based on contributions by +* Bo Kagstrom and Peter Poromaa, Department of Computing Science, +* Umea University, S-901 87 Umea, Sweden. +* +* [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software +* for Solving the Generalized Sylvester Equation and Estimating the +* Separation between Regular Matrix Pairs, Report UMINF - 93.23, +* Department of Computing Science, Umea University, S-901 87 Umea, +* Sweden, December 1993, Revised April 1994, Also as LAPACK Working +* Note 75. To appear in ACM Trans. on Math. Software, Vol 22, +* No 1, 1996. +* +* [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester +* Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal. +* Appl., 15(4):1045-1060, 1994. +* +* [3] B. Kagstrom and L. Westin, Generalized Schur Methods with +* Condition Estimators for Solving the Generalized Sylvester +* Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7, +* July 1989, pp 745-751. +* +* ===================================================================== +* Replaced various illegal calls to CCOPY by calls to CLASET. +* Sven Hammarling, 1/5/02. +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + COMPLEX*16 CZERO + PARAMETER ( CZERO = (0.0D+0, 0.0D+0) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, NOTRAN + INTEGER I, IE, IFUNC, IROUND, IS, ISOLVE, J, JE, JS, K, + $ LINFO, LWMIN, MB, NB, P, PQ, Q + DOUBLE PRECISION DSCALE, DSUM, SCALE2, SCALOC +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZGEMM, ZLACPY, ZLASET, ZSCAL, ZTGSY2 +* .. +* .. Intrinsic Functions .. + INTRINSIC DBLE, DCMPLX, MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode and test input parameters +* + INFO = 0 + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* + IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -1 + ELSE IF( NOTRAN ) THEN + IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.4 ) ) THEN + INFO = -2 + END IF + END IF + IF( INFO.EQ.0 ) THEN + IF( M.LE.0 ) THEN + INFO = -3 + ELSE IF( N.LE.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LDD.LT.MAX( 1, M ) ) THEN + INFO = -12 + ELSE IF( LDE.LT.MAX( 1, N ) ) THEN + INFO = -14 + ELSE IF( LDF.LT.MAX( 1, M ) ) THEN + INFO = -16 + END IF + END IF +* + IF( INFO.EQ.0 ) THEN + IF( NOTRAN ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.2 ) THEN + LWMIN = MAX( 1, 2*M*N ) + ELSE + LWMIN = 1 + END IF + ELSE + LWMIN = 1 + END IF + WORK( 1 ) = LWMIN +* + IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -20 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTGSYL', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + SCALE = 1 + IF( NOTRAN ) THEN + IF( IJOB.NE.0 ) THEN + DIF = 0 + END IF + END IF + RETURN + END IF +* +* Determine optimal block sizes MB and NB +* + MB = ILAENV( 2, 'ZTGSYL', TRANS, M, N, -1, -1 ) + NB = ILAENV( 5, 'ZTGSYL', TRANS, M, N, -1, -1 ) +* + ISOLVE = 1 + IFUNC = 0 + IF( NOTRAN ) THEN + IF( IJOB.GE.3 ) THEN + IFUNC = IJOB - 2 + CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC ) + CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF ) + ELSE IF( IJOB.GE.1 .AND. NOTRAN ) THEN + ISOLVE = 2 + END IF + END IF +* + IF( ( MB.LE.1 .AND. NB.LE.1 ) .OR. ( MB.GE.M .AND. NB.GE.N ) ) + $ THEN +* +* Use unblocked Level 2 solver +* + DO 30 IROUND = 1, ISOLVE +* + SCALE = ONE + DSCALE = ZERO + DSUM = ONE + PQ = M*N + CALL ZTGSY2( TRANS, IFUNC, M, N, A, LDA, B, LDB, C, LDC, D, + $ LDD, E, LDE, F, LDF, SCALE, DSUM, DSCALE, + $ INFO ) + IF( DSCALE.NE.ZERO ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN + DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) ) + ELSE + DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) ) + END IF + END IF + IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN + IF( NOTRAN ) THEN + IFUNC = IJOB + END IF + SCALE2 = SCALE + CALL ZLACPY( 'F', M, N, C, LDC, WORK, M ) + CALL ZLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M ) + CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC ) + CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF ) + ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN + CALL ZLACPY( 'F', M, N, WORK, M, C, LDC ) + CALL ZLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF ) + SCALE = SCALE2 + END IF + 30 CONTINUE +* + RETURN +* + END IF +* +* Determine block structure of A +* + P = 0 + I = 1 + 40 CONTINUE + IF( I.GT.M ) + $ GO TO 50 + P = P + 1 + IWORK( P ) = I + I = I + MB + IF( I.GE.M ) + $ GO TO 50 + GO TO 40 + 50 CONTINUE + IWORK( P+1 ) = M + 1 + IF( IWORK( P ).EQ.IWORK( P+1 ) ) + $ P = P - 1 +* +* Determine block structure of B +* + Q = P + 1 + J = 1 + 60 CONTINUE + IF( J.GT.N ) + $ GO TO 70 +* + Q = Q + 1 + IWORK( Q ) = J + J = J + NB + IF( J.GE.N ) + $ GO TO 70 + GO TO 60 +* + 70 CONTINUE + IWORK( Q+1 ) = N + 1 + IF( IWORK( Q ).EQ.IWORK( Q+1 ) ) + $ Q = Q - 1 +* + IF( NOTRAN ) THEN + DO 150 IROUND = 1, ISOLVE +* +* Solve (I, J) - subsystem +* A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J) +* D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J) +* for I = P, P - 1, ..., 1; J = 1, 2, ..., Q +* + PQ = 0 + SCALE = ONE + DSCALE = ZERO + DSUM = ONE + DO 130 J = P + 2, Q + JS = IWORK( J ) + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + DO 120 I = P, 1, -1 + IS = IWORK( I ) + IE = IWORK( I+1 ) - 1 + MB = IE - IS + 1 + CALL ZTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA, + $ B( JS, JS ), LDB, C( IS, JS ), LDC, + $ D( IS, IS ), LDD, E( JS, JS ), LDE, + $ F( IS, JS ), LDF, SCALOC, DSUM, DSCALE, + $ LINFO ) + IF( LINFO.GT.0 ) + $ INFO = LINFO + PQ = PQ + MB*NB + IF( SCALOC.NE.ONE ) THEN + DO 80 K = 1, JS - 1 + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ C( 1, K ), 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ F( 1, K ), 1 ) + 80 CONTINUE + DO 90 K = JS, JE + CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ), + $ C( 1, K ), 1 ) + CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ), + $ F( 1, K ), 1 ) + 90 CONTINUE + DO 100 K = JS, JE + CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ), + $ C( IE+1, K ), 1 ) + CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ), + $ F( IE+1, K ), 1 ) + 100 CONTINUE + DO 110 K = JE + 1, N + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ C( 1, K ), 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), + $ F( 1, K ), 1 ) + 110 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Substitute R(I,J) and L(I,J) into remaining equation. +* + IF( I.GT.1 ) THEN + CALL ZGEMM( 'N', 'N', IS-1, NB, MB, + $ DCMPLX( -ONE, ZERO ), A( 1, IS ), LDA, + $ C( IS, JS ), LDC, DCMPLX( ONE, ZERO ), + $ C( 1, JS ), LDC ) + CALL ZGEMM( 'N', 'N', IS-1, NB, MB, + $ DCMPLX( -ONE, ZERO ), D( 1, IS ), LDD, + $ C( IS, JS ), LDC, DCMPLX( ONE, ZERO ), + $ F( 1, JS ), LDF ) + END IF + IF( J.LT.Q ) THEN + CALL ZGEMM( 'N', 'N', MB, N-JE, NB, + $ DCMPLX( ONE, ZERO ), F( IS, JS ), LDF, + $ B( JS, JE+1 ), LDB, + $ DCMPLX( ONE, ZERO ), C( IS, JE+1 ), + $ LDC ) + CALL ZGEMM( 'N', 'N', MB, N-JE, NB, + $ DCMPLX( ONE, ZERO ), F( IS, JS ), LDF, + $ E( JS, JE+1 ), LDE, + $ DCMPLX( ONE, ZERO ), F( IS, JE+1 ), + $ LDF ) + END IF + 120 CONTINUE + 130 CONTINUE + IF( DSCALE.NE.ZERO ) THEN + IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN + DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) ) + ELSE + DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) ) + END IF + END IF + IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN + IF( NOTRAN ) THEN + IFUNC = IJOB + END IF + SCALE2 = SCALE + CALL ZLACPY( 'F', M, N, C, LDC, WORK, M ) + CALL ZLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M ) + CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC ) + CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF ) + ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN + CALL ZLACPY( 'F', M, N, WORK, M, C, LDC ) + CALL ZLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF ) + SCALE = SCALE2 + END IF + 150 CONTINUE + ELSE +* +* Solve transposed (I, J)-subsystem +* A(I, I)' * R(I, J) + D(I, I)' * L(I, J) = C(I, J) +* R(I, J) * B(J, J) + L(I, J) * E(J, J) = -F(I, J) +* for I = 1,2,..., P; J = Q, Q-1,..., 1 +* + SCALE = ONE + DO 210 I = 1, P + IS = IWORK( I ) + IE = IWORK( I+1 ) - 1 + MB = IE - IS + 1 + DO 200 J = Q, P + 2, -1 + JS = IWORK( J ) + JE = IWORK( J+1 ) - 1 + NB = JE - JS + 1 + CALL ZTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA, + $ B( JS, JS ), LDB, C( IS, JS ), LDC, + $ D( IS, IS ), LDD, E( JS, JS ), LDE, + $ F( IS, JS ), LDF, SCALOC, DSUM, DSCALE, + $ LINFO ) + IF( LINFO.GT.0 ) + $ INFO = LINFO + IF( SCALOC.NE.ONE ) THEN + DO 160 K = 1, JS - 1 + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ), + $ 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ), + $ 1 ) + 160 CONTINUE + DO 170 K = JS, JE + CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ), + $ C( 1, K ), 1 ) + CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ), + $ F( 1, K ), 1 ) + 170 CONTINUE + DO 180 K = JS, JE + CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ), + $ C( IE+1, K ), 1 ) + CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ), + $ F( IE+1, K ), 1 ) + 180 CONTINUE + DO 190 K = JE + 1, N + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ), + $ 1 ) + CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ), + $ 1 ) + 190 CONTINUE + SCALE = SCALE*SCALOC + END IF +* +* Substitute R(I,J) and L(I,J) into remaining equation. +* + IF( J.GT.P+2 ) THEN + CALL ZGEMM( 'N', 'C', MB, JS-1, NB, + $ DCMPLX( ONE, ZERO ), C( IS, JS ), LDC, + $ B( 1, JS ), LDB, DCMPLX( ONE, ZERO ), + $ F( IS, 1 ), LDF ) + CALL ZGEMM( 'N', 'C', MB, JS-1, NB, + $ DCMPLX( ONE, ZERO ), F( IS, JS ), LDF, + $ E( 1, JS ), LDE, DCMPLX( ONE, ZERO ), + $ F( IS, 1 ), LDF ) + END IF + IF( I.LT.P ) THEN + CALL ZGEMM( 'C', 'N', M-IE, NB, MB, + $ DCMPLX( -ONE, ZERO ), A( IS, IE+1 ), LDA, + $ C( IS, JS ), LDC, DCMPLX( ONE, ZERO ), + $ C( IE+1, JS ), LDC ) + CALL ZGEMM( 'C', 'N', M-IE, NB, MB, + $ DCMPLX( -ONE, ZERO ), D( IS, IE+1 ), LDD, + $ F( IS, JS ), LDF, DCMPLX( ONE, ZERO ), + $ C( IE+1, JS ), LDC ) + END IF + 200 CONTINUE + 210 CONTINUE + END IF +* + WORK( 1 ) = LWMIN +* + RETURN +* +* End of ZTGSYL +* + END diff --git a/2.3-1/src/fortran/lapack/ztrevc.f b/2.3-1/src/fortran/lapack/ztrevc.f new file mode 100644 index 00000000..21142f42 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrevc.f @@ -0,0 +1,386 @@ + SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, + $ LDVR, MM, M, WORK, RWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER HOWMNY, SIDE + INTEGER INFO, LDT, LDVL, LDVR, M, MM, N +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + DOUBLE PRECISION RWORK( * ) + COMPLEX*16 T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ), + $ WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZTREVC computes some or all of the right and/or left eigenvectors of +* a complex upper triangular matrix T. +* Matrices of this type are produced by the Schur factorization of +* a complex general matrix: A = Q*T*Q**H, as computed by ZHSEQR. +* +* The right eigenvector x and the left eigenvector y of T corresponding +* to an eigenvalue w are defined by: +* +* T*x = w*x, (y**H)*T = w*(y**H) +* +* where y**H denotes the conjugate transpose of the vector y. +* The eigenvalues are not input to this routine, but are read directly +* from the diagonal of T. +* +* This routine returns the matrices X and/or Y of right and left +* eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an +* input matrix. If Q is the unitary factor that reduces a matrix A to +* Schur form T, then Q*X and Q*Y are the matrices of right and left +* eigenvectors of A. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'R': compute right eigenvectors only; +* = 'L': compute left eigenvectors only; +* = 'B': compute both right and left eigenvectors. +* +* HOWMNY (input) CHARACTER*1 +* = 'A': compute all right and/or left eigenvectors; +* = 'B': compute all right and/or left eigenvectors, +* backtransformed using the matrices supplied in +* VR and/or VL; +* = 'S': compute selected right and/or left eigenvectors, +* as indicated by the logical array SELECT. +* +* SELECT (input) LOGICAL array, dimension (N) +* If HOWMNY = 'S', SELECT specifies the eigenvectors to be +* computed. +* The eigenvector corresponding to the j-th eigenvalue is +* computed if SELECT(j) = .TRUE.. +* Not referenced if HOWMNY = 'A' or 'B'. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) COMPLEX*16 array, dimension (LDT,N) +* The upper triangular matrix T. T is modified, but restored +* on exit. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* VL (input/output) COMPLEX*16 array, dimension (LDVL,MM) +* On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must +* contain an N-by-N matrix Q (usually the unitary matrix Q of +* Schur vectors returned by ZHSEQR). +* On exit, if SIDE = 'L' or 'B', VL contains: +* if HOWMNY = 'A', the matrix Y of left eigenvectors of T; +* if HOWMNY = 'B', the matrix Q*Y; +* if HOWMNY = 'S', the left eigenvectors of T specified by +* SELECT, stored consecutively in the columns +* of VL, in the same order as their +* eigenvalues. +* Not referenced if SIDE = 'R'. +* +* LDVL (input) INTEGER +* The leading dimension of the array VL. LDVL >= 1, and if +* SIDE = 'L' or 'B', LDVL >= N. +* +* VR (input/output) COMPLEX*16 array, dimension (LDVR,MM) +* On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must +* contain an N-by-N matrix Q (usually the unitary matrix Q of +* Schur vectors returned by ZHSEQR). +* On exit, if SIDE = 'R' or 'B', VR contains: +* if HOWMNY = 'A', the matrix X of right eigenvectors of T; +* if HOWMNY = 'B', the matrix Q*X; +* if HOWMNY = 'S', the right eigenvectors of T specified by +* SELECT, stored consecutively in the columns +* of VR, in the same order as their +* eigenvalues. +* Not referenced if SIDE = 'L'. +* +* LDVR (input) INTEGER +* The leading dimension of the array VR. LDVR >= 1, and if +* SIDE = 'R' or 'B'; LDVR >= N. +* +* MM (input) INTEGER +* The number of columns in the arrays VL and/or VR. MM >= M. +* +* M (output) INTEGER +* The number of columns in the arrays VL and/or VR actually +* used to store the eigenvectors. If HOWMNY = 'A' or 'B', M +* is set to N. Each selected eigenvector occupies one +* column. +* +* WORK (workspace) COMPLEX*16 array, dimension (2*N) +* +* RWORK (workspace) DOUBLE PRECISION array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* The algorithm used in this program is basically backward (forward) +* substitution, with scaling to make the the code robust against +* possible overflow. +* +* Each eigenvector is normalized so that the element of largest +* magnitude has magnitude 1; here the magnitude of a complex number +* (x,y) is taken to be |x| + |y|. +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) + COMPLEX*16 CMZERO, CMONE + PARAMETER ( CMZERO = ( 0.0D+0, 0.0D+0 ), + $ CMONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL ALLV, BOTHV, LEFTV, OVER, RIGHTV, SOMEV + INTEGER I, II, IS, J, K, KI + DOUBLE PRECISION OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL + COMPLEX*16 CDUM +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER IZAMAX + DOUBLE PRECISION DLAMCH, DZASUM + EXTERNAL LSAME, IZAMAX, DLAMCH, DZASUM +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX +* .. +* .. Statement Functions .. + DOUBLE PRECISION CABS1 +* .. +* .. Statement Function definitions .. + CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) ) +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters +* + BOTHV = LSAME( SIDE, 'B' ) + RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV + LEFTV = LSAME( SIDE, 'L' ) .OR. BOTHV +* + ALLV = LSAME( HOWMNY, 'A' ) + OVER = LSAME( HOWMNY, 'B' ) + SOMEV = LSAME( HOWMNY, 'S' ) +* +* Set M to the number of columns required to store the selected +* eigenvectors. +* + IF( SOMEV ) THEN + M = 0 + DO 10 J = 1, N + IF( SELECT( J ) ) + $ M = M + 1 + 10 CONTINUE + ELSE + M = N + END IF +* + INFO = 0 + IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN + INFO = -1 + ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN + INFO = -8 + ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN + INFO = -10 + ELSE IF( MM.LT.M ) THEN + INFO = -11 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTREVC', -INFO ) + RETURN + END IF +* +* Quick return if possible. +* + IF( N.EQ.0 ) + $ RETURN +* +* Set the constants to control overflow. +* + UNFL = DLAMCH( 'Safe minimum' ) + OVFL = ONE / UNFL + CALL DLABAD( UNFL, OVFL ) + ULP = DLAMCH( 'Precision' ) + SMLNUM = UNFL*( N / ULP ) +* +* Store the diagonal elements of T in working array WORK. +* + DO 20 I = 1, N + WORK( I+N ) = T( I, I ) + 20 CONTINUE +* +* Compute 1-norm of each column of strictly upper triangular +* part of T to control overflow in triangular solver. +* + RWORK( 1 ) = ZERO + DO 30 J = 2, N + RWORK( J ) = DZASUM( J-1, T( 1, J ), 1 ) + 30 CONTINUE +* + IF( RIGHTV ) THEN +* +* Compute right eigenvectors. +* + IS = M + DO 80 KI = N, 1, -1 +* + IF( SOMEV ) THEN + IF( .NOT.SELECT( KI ) ) + $ GO TO 80 + END IF + SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM ) +* + WORK( 1 ) = CMONE +* +* Form right-hand side. +* + DO 40 K = 1, KI - 1 + WORK( K ) = -T( K, KI ) + 40 CONTINUE +* +* Solve the triangular system: +* (T(1:KI-1,1:KI-1) - T(KI,KI))*X = SCALE*WORK. +* + DO 50 K = 1, KI - 1 + T( K, K ) = T( K, K ) - T( KI, KI ) + IF( CABS1( T( K, K ) ).LT.SMIN ) + $ T( K, K ) = SMIN + 50 CONTINUE +* + IF( KI.GT.1 ) THEN + CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', 'Y', + $ KI-1, T, LDT, WORK( 1 ), SCALE, RWORK, + $ INFO ) + WORK( KI ) = SCALE + END IF +* +* Copy the vector x or Q*x to VR and normalize. +* + IF( .NOT.OVER ) THEN + CALL ZCOPY( KI, WORK( 1 ), 1, VR( 1, IS ), 1 ) +* + II = IZAMAX( KI, VR( 1, IS ), 1 ) + REMAX = ONE / CABS1( VR( II, IS ) ) + CALL ZDSCAL( KI, REMAX, VR( 1, IS ), 1 ) +* + DO 60 K = KI + 1, N + VR( K, IS ) = CMZERO + 60 CONTINUE + ELSE + IF( KI.GT.1 ) + $ CALL ZGEMV( 'N', N, KI-1, CMONE, VR, LDVR, WORK( 1 ), + $ 1, DCMPLX( SCALE ), VR( 1, KI ), 1 ) +* + II = IZAMAX( N, VR( 1, KI ), 1 ) + REMAX = ONE / CABS1( VR( II, KI ) ) + CALL ZDSCAL( N, REMAX, VR( 1, KI ), 1 ) + END IF +* +* Set back the original diagonal elements of T. +* + DO 70 K = 1, KI - 1 + T( K, K ) = WORK( K+N ) + 70 CONTINUE +* + IS = IS - 1 + 80 CONTINUE + END IF +* + IF( LEFTV ) THEN +* +* Compute left eigenvectors. +* + IS = 1 + DO 130 KI = 1, N +* + IF( SOMEV ) THEN + IF( .NOT.SELECT( KI ) ) + $ GO TO 130 + END IF + SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM ) +* + WORK( N ) = CMONE +* +* Form right-hand side. +* + DO 90 K = KI + 1, N + WORK( K ) = -DCONJG( T( KI, K ) ) + 90 CONTINUE +* +* Solve the triangular system: +* (T(KI+1:N,KI+1:N) - T(KI,KI))'*X = SCALE*WORK. +* + DO 100 K = KI + 1, N + T( K, K ) = T( K, K ) - T( KI, KI ) + IF( CABS1( T( K, K ) ).LT.SMIN ) + $ T( K, K ) = SMIN + 100 CONTINUE +* + IF( KI.LT.N ) THEN + CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit', + $ 'Y', N-KI, T( KI+1, KI+1 ), LDT, + $ WORK( KI+1 ), SCALE, RWORK, INFO ) + WORK( KI ) = SCALE + END IF +* +* Copy the vector x or Q*x to VL and normalize. +* + IF( .NOT.OVER ) THEN + CALL ZCOPY( N-KI+1, WORK( KI ), 1, VL( KI, IS ), 1 ) +* + II = IZAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1 + REMAX = ONE / CABS1( VL( II, IS ) ) + CALL ZDSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 ) +* + DO 110 K = 1, KI - 1 + VL( K, IS ) = CMZERO + 110 CONTINUE + ELSE + IF( KI.LT.N ) + $ CALL ZGEMV( 'N', N, N-KI, CMONE, VL( 1, KI+1 ), LDVL, + $ WORK( KI+1 ), 1, DCMPLX( SCALE ), + $ VL( 1, KI ), 1 ) +* + II = IZAMAX( N, VL( 1, KI ), 1 ) + REMAX = ONE / CABS1( VL( II, KI ) ) + CALL ZDSCAL( N, REMAX, VL( 1, KI ), 1 ) + END IF +* +* Set back the original diagonal elements of T. +* + DO 120 K = KI + 1, N + T( K, K ) = WORK( K+N ) + 120 CONTINUE +* + IS = IS + 1 + 130 CONTINUE + END IF +* + RETURN +* +* End of ZTREVC +* + END diff --git a/2.3-1/src/fortran/lapack/ztrexc.f b/2.3-1/src/fortran/lapack/ztrexc.f new file mode 100644 index 00000000..69313696 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrexc.f @@ -0,0 +1,162 @@ + SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER COMPQ + INTEGER IFST, ILST, INFO, LDQ, LDT, N +* .. +* .. Array Arguments .. + COMPLEX*16 Q( LDQ, * ), T( LDT, * ) +* .. +* +* Purpose +* ======= +* +* ZTREXC reorders the Schur factorization of a complex matrix +* A = Q*T*Q**H, so that the diagonal element of T with row index IFST +* is moved to row ILST. +* +* The Schur form T is reordered by a unitary similarity transformation +* Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by +* postmultplying it with Z. +* +* Arguments +* ========= +* +* COMPQ (input) CHARACTER*1 +* = 'V': update the matrix Q of Schur vectors; +* = 'N': do not update Q. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) COMPLEX*16 array, dimension (LDT,N) +* On entry, the upper triangular matrix T. +* On exit, the reordered upper triangular matrix. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* Q (input/output) COMPLEX*16 array, dimension (LDQ,N) +* On entry, if COMPQ = 'V', the matrix Q of Schur vectors. +* On exit, if COMPQ = 'V', Q has been postmultiplied by the +* unitary transformation matrix Z which reorders T. +* If COMPQ = 'N', Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. LDQ >= max(1,N). +* +* IFST (input) INTEGER +* ILST (input) INTEGER +* Specify the reordering of the diagonal elements of T: +* The element with row index IFST is moved to row ILST by a +* sequence of transpositions between adjacent elements. +* 1 <= IFST <= N; 1 <= ILST <= N. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL WANTQ + INTEGER K, M1, M2, M3 + DOUBLE PRECISION CS + COMPLEX*16 SN, T11, T22, TEMP +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARTG, ZROT +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters. +* + INFO = 0 + WANTQ = LSAME( COMPQ, 'V' ) + IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.MAX( 1, N ) ) ) THEN + INFO = -6 + ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN + INFO = -7 + ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTREXC', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.1 .OR. IFST.EQ.ILST ) + $ RETURN +* + IF( IFST.LT.ILST ) THEN +* +* Move the IFST-th diagonal element forward down the diagonal. +* + M1 = 0 + M2 = -1 + M3 = 1 + ELSE +* +* Move the IFST-th diagonal element backward up the diagonal. +* + M1 = -1 + M2 = 0 + M3 = -1 + END IF +* + DO 10 K = IFST + M1, ILST + M2, M3 +* +* Interchange the k-th and (k+1)-th diagonal elements. +* + T11 = T( K, K ) + T22 = T( K+1, K+1 ) +* +* Determine the transformation to perform the interchange. +* + CALL ZLARTG( T( K, K+1 ), T22-T11, CS, SN, TEMP ) +* +* Apply transformation to the matrix T. +* + IF( K+2.LE.N ) + $ CALL ZROT( N-K-1, T( K, K+2 ), LDT, T( K+1, K+2 ), LDT, CS, + $ SN ) + CALL ZROT( K-1, T( 1, K ), 1, T( 1, K+1 ), 1, CS, + $ DCONJG( SN ) ) +* + T( K, K ) = T22 + T( K+1, K+1 ) = T11 +* + IF( WANTQ ) THEN +* +* Accumulate transformation in the matrix Q. +* + CALL ZROT( N, Q( 1, K ), 1, Q( 1, K+1 ), 1, CS, + $ DCONJG( SN ) ) + END IF +* + 10 CONTINUE +* + RETURN +* +* End of ZTREXC +* + END diff --git a/2.3-1/src/fortran/lapack/ztrsen.f b/2.3-1/src/fortran/lapack/ztrsen.f new file mode 100644 index 00000000..a07a22f6 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrsen.f @@ -0,0 +1,359 @@ + SUBROUTINE ZTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S, + $ SEP, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* Modified to call ZLACN2 in place of ZLACON, 10 Feb 03, SJH. +* +* .. Scalar Arguments .. + CHARACTER COMPQ, JOB + INTEGER INFO, LDQ, LDT, LWORK, M, N + DOUBLE PRECISION S, SEP +* .. +* .. Array Arguments .. + LOGICAL SELECT( * ) + COMPLEX*16 Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZTRSEN reorders the Schur factorization of a complex matrix +* A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in +* the leading positions on the diagonal of the upper triangular matrix +* T, and the leading columns of Q form an orthonormal basis of the +* corresponding right invariant subspace. +* +* Optionally the routine computes the reciprocal condition numbers of +* the cluster of eigenvalues and/or the invariant subspace. +* +* Arguments +* ========= +* +* JOB (input) CHARACTER*1 +* Specifies whether condition numbers are required for the +* cluster of eigenvalues (S) or the invariant subspace (SEP): +* = 'N': none; +* = 'E': for eigenvalues only (S); +* = 'V': for invariant subspace only (SEP); +* = 'B': for both eigenvalues and invariant subspace (S and +* SEP). +* +* COMPQ (input) CHARACTER*1 +* = 'V': update the matrix Q of Schur vectors; +* = 'N': do not update Q. +* +* SELECT (input) LOGICAL array, dimension (N) +* SELECT specifies the eigenvalues in the selected cluster. To +* select the j-th eigenvalue, SELECT(j) must be set to .TRUE.. +* +* N (input) INTEGER +* The order of the matrix T. N >= 0. +* +* T (input/output) COMPLEX*16 array, dimension (LDT,N) +* On entry, the upper triangular matrix T. +* On exit, T is overwritten by the reordered matrix T, with the +* selected eigenvalues as the leading diagonal elements. +* +* LDT (input) INTEGER +* The leading dimension of the array T. LDT >= max(1,N). +* +* Q (input/output) COMPLEX*16 array, dimension (LDQ,N) +* On entry, if COMPQ = 'V', the matrix Q of Schur vectors. +* On exit, if COMPQ = 'V', Q has been postmultiplied by the +* unitary transformation matrix which reorders T; the leading M +* columns of Q form an orthonormal basis for the specified +* invariant subspace. +* If COMPQ = 'N', Q is not referenced. +* +* LDQ (input) INTEGER +* The leading dimension of the array Q. +* LDQ >= 1; and if COMPQ = 'V', LDQ >= N. +* +* W (output) COMPLEX*16 array, dimension (N) +* The reordered eigenvalues of T, in the same order as they +* appear on the diagonal of T. +* +* M (output) INTEGER +* The dimension of the specified invariant subspace. +* 0 <= M <= N. +* +* S (output) DOUBLE PRECISION +* If JOB = 'E' or 'B', S is a lower bound on the reciprocal +* condition number for the selected cluster of eigenvalues. +* S cannot underestimate the true reciprocal condition number +* by more than a factor of sqrt(N). If M = 0 or N, S = 1. +* If JOB = 'N' or 'V', S is not referenced. +* +* SEP (output) DOUBLE PRECISION +* If JOB = 'V' or 'B', SEP is the estimated reciprocal +* condition number of the specified invariant subspace. If +* M = 0 or N, SEP = norm(T). +* If JOB = 'N' or 'E', SEP is not referenced. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If JOB = 'N', LWORK >= 1; +* if JOB = 'E', LWORK = max(1,M*(N-M)); +* if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)). +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* ZTRSEN first collects the selected eigenvalues by computing a unitary +* transformation Z to move them to the top left corner of T. In other +* words, the selected eigenvalues are the eigenvalues of T11 in: +* +* Z'*T*Z = ( T11 T12 ) n1 +* ( 0 T22 ) n2 +* n1 n2 +* +* where N = n1+n2 and Z' means the conjugate transpose of Z. The first +* n1 columns of Z span the specified invariant subspace of T. +* +* If T has been obtained from the Schur factorization of a matrix +* A = Q*T*Q', then the reordered Schur factorization of A is given by +* A = (Q*Z)*(Z'*T*Z)*(Q*Z)', and the first n1 columns of Q*Z span the +* corresponding invariant subspace of A. +* +* The reciprocal condition number of the average of the eigenvalues of +* T11 may be returned in S. S lies between 0 (very badly conditioned) +* and 1 (very well conditioned). It is computed as follows. First we +* compute R so that +* +* P = ( I R ) n1 +* ( 0 0 ) n2 +* n1 n2 +* +* is the projector on the invariant subspace associated with T11. +* R is the solution of the Sylvester equation: +* +* T11*R - R*T22 = T12. +* +* Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote +* the two-norm of M. Then S is computed as the lower bound +* +* (1 + F-norm(R)**2)**(-1/2) +* +* on the reciprocal of 2-norm(P), the true reciprocal condition number. +* S cannot underestimate 1 / 2-norm(P) by more than a factor of +* sqrt(N). +* +* An approximate error bound for the computed average of the +* eigenvalues of T11 is +* +* EPS * norm(T) / S +* +* where EPS is the machine precision. +* +* The reciprocal condition number of the right invariant subspace +* spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP. +* SEP is defined as the separation of T11 and T22: +* +* sep( T11, T22 ) = sigma-min( C ) +* +* where sigma-min(C) is the smallest singular value of the +* n1*n2-by-n1*n2 matrix +* +* C = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) ) +* +* I(m) is an m by m identity matrix, and kprod denotes the Kronecker +* product. We estimate sigma-min(C) by the reciprocal of an estimate of +* the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C) +* cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2). +* +* When SEP is small, small changes in T can cause large changes in +* the invariant subspace. An approximate bound on the maximum angular +* error in the computed right invariant subspace is +* +* EPS * norm(T) / SEP +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ZERO, ONE + PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, WANTBH, WANTQ, WANTS, WANTSP + INTEGER IERR, K, KASE, KS, LWMIN, N1, N2, NN + DOUBLE PRECISION EST, RNORM, SCALE +* .. +* .. Local Arrays .. + INTEGER ISAVE( 3 ) + DOUBLE PRECISION RWORK( 1 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION ZLANGE + EXTERNAL LSAME, ZLANGE +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACN2, ZLACPY, ZTREXC, ZTRSYL +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, SQRT +* .. +* .. Executable Statements .. +* +* Decode and test the input parameters. +* + WANTBH = LSAME( JOB, 'B' ) + WANTS = LSAME( JOB, 'E' ) .OR. WANTBH + WANTSP = LSAME( JOB, 'V' ) .OR. WANTBH + WANTQ = LSAME( COMPQ, 'V' ) +* +* Set M to the number of selected eigenvalues. +* + M = 0 + DO 10 K = 1, N + IF( SELECT( K ) ) + $ M = M + 1 + 10 CONTINUE +* + N1 = M + N2 = N - M + NN = N1*N2 +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) +* + IF( WANTSP ) THEN + LWMIN = MAX( 1, 2*NN ) + ELSE IF( LSAME( JOB, 'N' ) ) THEN + LWMIN = 1 + ELSE IF( LSAME( JOB, 'E' ) ) THEN + LWMIN = MAX( 1, NN ) + END IF +* + IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.WANTS .AND. .NOT.WANTSP ) + $ THEN + INFO = -1 + ELSE IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( LDT.LT.MAX( 1, N ) ) THEN + INFO = -6 + ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN + INFO = -8 + ELSE IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN + INFO = -14 + END IF +* + IF( INFO.EQ.0 ) THEN + WORK( 1 ) = LWMIN + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTRSEN', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.N .OR. M.EQ.0 ) THEN + IF( WANTS ) + $ S = ONE + IF( WANTSP ) + $ SEP = ZLANGE( '1', N, N, T, LDT, RWORK ) + GO TO 40 + END IF +* +* Collect the selected eigenvalues at the top left corner of T. +* + KS = 0 + DO 20 K = 1, N + IF( SELECT( K ) ) THEN + KS = KS + 1 +* +* Swap the K-th eigenvalue to position KS. +* + IF( K.NE.KS ) + $ CALL ZTREXC( COMPQ, N, T, LDT, Q, LDQ, K, KS, IERR ) + END IF + 20 CONTINUE +* + IF( WANTS ) THEN +* +* Solve the Sylvester equation for R: +* +* T11*R - R*T22 = scale*T12 +* + CALL ZLACPY( 'F', N1, N2, T( 1, N1+1 ), LDT, WORK, N1 ) + CALL ZTRSYL( 'N', 'N', -1, N1, N2, T, LDT, T( N1+1, N1+1 ), + $ LDT, WORK, N1, SCALE, IERR ) +* +* Estimate the reciprocal of the condition number of the cluster +* of eigenvalues. +* + RNORM = ZLANGE( 'F', N1, N2, WORK, N1, RWORK ) + IF( RNORM.EQ.ZERO ) THEN + S = ONE + ELSE + S = SCALE / ( SQRT( SCALE*SCALE / RNORM+RNORM )* + $ SQRT( RNORM ) ) + END IF + END IF +* + IF( WANTSP ) THEN +* +* Estimate sep(T11,T22). +* + EST = ZERO + KASE = 0 + 30 CONTINUE + CALL ZLACN2( NN, WORK( NN+1 ), WORK, EST, KASE, ISAVE ) + IF( KASE.NE.0 ) THEN + IF( KASE.EQ.1 ) THEN +* +* Solve T11*R - R*T22 = scale*X. +* + CALL ZTRSYL( 'N', 'N', -1, N1, N2, T, LDT, + $ T( N1+1, N1+1 ), LDT, WORK, N1, SCALE, + $ IERR ) + ELSE +* +* Solve T11'*R - R*T22' = scale*X. +* + CALL ZTRSYL( 'C', 'C', -1, N1, N2, T, LDT, + $ T( N1+1, N1+1 ), LDT, WORK, N1, SCALE, + $ IERR ) + END IF + GO TO 30 + END IF +* + SEP = SCALE / EST + END IF +* + 40 CONTINUE +* +* Copy reordered eigenvalues to W. +* + DO 50 K = 1, N + W( K ) = T( K, K ) + 50 CONTINUE +* + WORK( 1 ) = LWMIN +* + RETURN +* +* End of ZTRSEN +* + END diff --git a/2.3-1/src/fortran/lapack/ztrsyl.f b/2.3-1/src/fortran/lapack/ztrsyl.f new file mode 100644 index 00000000..d2e0ecc7 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrsyl.f @@ -0,0 +1,365 @@ + SUBROUTINE ZTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C, + $ LDC, SCALE, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER TRANA, TRANB + INTEGER INFO, ISGN, LDA, LDB, LDC, M, N + DOUBLE PRECISION SCALE +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), B( LDB, * ), C( LDC, * ) +* .. +* +* Purpose +* ======= +* +* ZTRSYL solves the complex Sylvester matrix equation: +* +* op(A)*X + X*op(B) = scale*C or +* op(A)*X - X*op(B) = scale*C, +* +* where op(A) = A or A**H, and A and B are both upper triangular. A is +* M-by-M and B is N-by-N; the right hand side C and the solution X are +* M-by-N; and scale is an output scale factor, set <= 1 to avoid +* overflow in X. +* +* Arguments +* ========= +* +* TRANA (input) CHARACTER*1 +* Specifies the option op(A): +* = 'N': op(A) = A (No transpose) +* = 'C': op(A) = A**H (Conjugate transpose) +* +* TRANB (input) CHARACTER*1 +* Specifies the option op(B): +* = 'N': op(B) = B (No transpose) +* = 'C': op(B) = B**H (Conjugate transpose) +* +* ISGN (input) INTEGER +* Specifies the sign in the equation: +* = +1: solve op(A)*X + X*op(B) = scale*C +* = -1: solve op(A)*X - X*op(B) = scale*C +* +* M (input) INTEGER +* The order of the matrix A, and the number of rows in the +* matrices X and C. M >= 0. +* +* N (input) INTEGER +* The order of the matrix B, and the number of columns in the +* matrices X and C. N >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,M) +* The upper triangular matrix A. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* B (input) COMPLEX*16 array, dimension (LDB,N) +* The upper triangular matrix B. +* +* LDB (input) INTEGER +* The leading dimension of the array B. LDB >= max(1,N). +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N right hand side matrix C. +* On exit, C is overwritten by the solution matrix X. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M) +* +* SCALE (output) DOUBLE PRECISION +* The scale factor, scale, set <= 1 to avoid overflow in X. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* = 1: A and B have common or very close eigenvalues; perturbed +* values were used to solve the equation (but the matrices +* A and B are unchanged). +* +* ===================================================================== +* +* .. Parameters .. + DOUBLE PRECISION ONE + PARAMETER ( ONE = 1.0D+0 ) +* .. +* .. Local Scalars .. + LOGICAL NOTRNA, NOTRNB + INTEGER J, K, L + DOUBLE PRECISION BIGNUM, DA11, DB, EPS, SCALOC, SGN, SMIN, + $ SMLNUM + COMPLEX*16 A11, SUML, SUMR, VEC, X11 +* .. +* .. Local Arrays .. + DOUBLE PRECISION DUM( 1 ) +* .. +* .. External Functions .. + LOGICAL LSAME + DOUBLE PRECISION DLAMCH, ZLANGE + COMPLEX*16 ZDOTC, ZDOTU, ZLADIV + EXTERNAL LSAME, DLAMCH, ZLANGE, ZDOTC, ZDOTU, ZLADIV +* .. +* .. External Subroutines .. + EXTERNAL DLABAD, XERBLA, ZDSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN +* .. +* .. Executable Statements .. +* +* Decode and Test input parameters +* + NOTRNA = LSAME( TRANA, 'N' ) + NOTRNB = LSAME( TRANB, 'N' ) +* + INFO = 0 + IF( .NOT.NOTRNA .AND. .NOT.LSAME( TRANA, 'C' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRNB .AND. .NOT.LSAME( TRANB, 'C' ) ) THEN + INFO = -2 + ELSE IF( ISGN.NE.1 .AND. ISGN.NE.-1 ) THEN + INFO = -3 + ELSE IF( M.LT.0 ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -7 + ELSE IF( LDB.LT.MAX( 1, N ) ) THEN + INFO = -9 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTRSYL', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* +* Set constants to control overflow +* + EPS = DLAMCH( 'P' ) + SMLNUM = DLAMCH( 'S' ) + BIGNUM = ONE / SMLNUM + CALL DLABAD( SMLNUM, BIGNUM ) + SMLNUM = SMLNUM*DBLE( M*N ) / EPS + BIGNUM = ONE / SMLNUM + SMIN = MAX( SMLNUM, EPS*ZLANGE( 'M', M, M, A, LDA, DUM ), + $ EPS*ZLANGE( 'M', N, N, B, LDB, DUM ) ) + SCALE = ONE + SGN = ISGN +* + IF( NOTRNA .AND. NOTRNB ) THEN +* +* Solve A*X + ISGN*X*B = scale*C. +* +* The (K,L)th block of X is determined starting from +* bottom-left corner column by column by +* +* A(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L) +* +* Where +* M L-1 +* R(K,L) = SUM [A(K,I)*X(I,L)] +ISGN*SUM [X(K,J)*B(J,L)]. +* I=K+1 J=1 +* + DO 30 L = 1, N + DO 20 K = M, 1, -1 +* + SUML = ZDOTU( M-K, A( K, MIN( K+1, M ) ), LDA, + $ C( MIN( K+1, M ), L ), 1 ) + SUMR = ZDOTU( L-1, C( K, 1 ), LDC, B( 1, L ), 1 ) + VEC = C( K, L ) - ( SUML+SGN*SUMR ) +* + SCALOC = ONE + A11 = A( K, K ) + SGN*B( L, L ) + DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF + X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 ) +* + IF( SCALOC.NE.ONE ) THEN + DO 10 J = 1, N + CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 ) + 10 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K, L ) = X11 +* + 20 CONTINUE + 30 CONTINUE +* + ELSE IF( .NOT.NOTRNA .AND. NOTRNB ) THEN +* +* Solve A' *X + ISGN*X*B = scale*C. +* +* The (K,L)th block of X is determined starting from +* upper-left corner column by column by +* +* A'(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L) +* +* Where +* K-1 L-1 +* R(K,L) = SUM [A'(I,K)*X(I,L)] + ISGN*SUM [X(K,J)*B(J,L)] +* I=1 J=1 +* + DO 60 L = 1, N + DO 50 K = 1, M +* + SUML = ZDOTC( K-1, A( 1, K ), 1, C( 1, L ), 1 ) + SUMR = ZDOTU( L-1, C( K, 1 ), LDC, B( 1, L ), 1 ) + VEC = C( K, L ) - ( SUML+SGN*SUMR ) +* + SCALOC = ONE + A11 = DCONJG( A( K, K ) ) + SGN*B( L, L ) + DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF +* + X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 ) +* + IF( SCALOC.NE.ONE ) THEN + DO 40 J = 1, N + CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 ) + 40 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K, L ) = X11 +* + 50 CONTINUE + 60 CONTINUE +* + ELSE IF( .NOT.NOTRNA .AND. .NOT.NOTRNB ) THEN +* +* Solve A'*X + ISGN*X*B' = C. +* +* The (K,L)th block of X is determined starting from +* upper-right corner column by column by +* +* A'(K,K)*X(K,L) + ISGN*X(K,L)*B'(L,L) = C(K,L) - R(K,L) +* +* Where +* K-1 +* R(K,L) = SUM [A'(I,K)*X(I,L)] + +* I=1 +* N +* ISGN*SUM [X(K,J)*B'(L,J)]. +* J=L+1 +* + DO 90 L = N, 1, -1 + DO 80 K = 1, M +* + SUML = ZDOTC( K-1, A( 1, K ), 1, C( 1, L ), 1 ) + SUMR = ZDOTC( N-L, C( K, MIN( L+1, N ) ), LDC, + $ B( L, MIN( L+1, N ) ), LDB ) + VEC = C( K, L ) - ( SUML+SGN*DCONJG( SUMR ) ) +* + SCALOC = ONE + A11 = DCONJG( A( K, K )+SGN*B( L, L ) ) + DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF +* + X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 ) +* + IF( SCALOC.NE.ONE ) THEN + DO 70 J = 1, N + CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 ) + 70 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K, L ) = X11 +* + 80 CONTINUE + 90 CONTINUE +* + ELSE IF( NOTRNA .AND. .NOT.NOTRNB ) THEN +* +* Solve A*X + ISGN*X*B' = C. +* +* The (K,L)th block of X is determined starting from +* bottom-left corner column by column by +* +* A(K,K)*X(K,L) + ISGN*X(K,L)*B'(L,L) = C(K,L) - R(K,L) +* +* Where +* M N +* R(K,L) = SUM [A(K,I)*X(I,L)] + ISGN*SUM [X(K,J)*B'(L,J)] +* I=K+1 J=L+1 +* + DO 120 L = N, 1, -1 + DO 110 K = M, 1, -1 +* + SUML = ZDOTU( M-K, A( K, MIN( K+1, M ) ), LDA, + $ C( MIN( K+1, M ), L ), 1 ) + SUMR = ZDOTC( N-L, C( K, MIN( L+1, N ) ), LDC, + $ B( L, MIN( L+1, N ) ), LDB ) + VEC = C( K, L ) - ( SUML+SGN*DCONJG( SUMR ) ) +* + SCALOC = ONE + A11 = A( K, K ) + SGN*DCONJG( B( L, L ) ) + DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) ) + IF( DA11.LE.SMIN ) THEN + A11 = SMIN + DA11 = SMIN + INFO = 1 + END IF + DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) ) + IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN + IF( DB.GT.BIGNUM*DA11 ) + $ SCALOC = ONE / DB + END IF +* + X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 ) +* + IF( SCALOC.NE.ONE ) THEN + DO 100 J = 1, N + CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 ) + 100 CONTINUE + SCALE = SCALE*SCALOC + END IF + C( K, L ) = X11 +* + 110 CONTINUE + 120 CONTINUE +* + END IF +* + RETURN +* +* End of ZTRSYL +* + END diff --git a/2.3-1/src/fortran/lapack/ztrti2.f b/2.3-1/src/fortran/lapack/ztrti2.f new file mode 100644 index 00000000..73c7bbc3 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrti2.f @@ -0,0 +1,146 @@ + SUBROUTINE ZTRTI2( UPLO, DIAG, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZTRTI2 computes the inverse of a complex upper or lower triangular +* matrix. +* +* This is the Level 2 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* Specifies whether the matrix A is upper or lower triangular. +* = 'U': Upper triangular +* = 'L': Lower triangular +* +* DIAG (input) CHARACTER*1 +* Specifies whether or not the matrix A is unit triangular. +* = 'N': Non-unit triangular +* = 'U': Unit triangular +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the triangular matrix A. If UPLO = 'U', the +* leading n by n upper triangular part of the array A contains +* the upper triangular matrix, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading n by n lower triangular part of the array A contains +* the lower triangular matrix, and the strictly upper +* triangular part of A is not referenced. If DIAG = 'U', the +* diagonal elements of A are also not referenced and are +* assumed to be 1. +* +* On exit, the (triangular) inverse of the original matrix, in +* the same storage format. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -k, the k-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT, UPPER + INTEGER J + COMPLEX*16 AJJ +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZSCAL, ZTRMV +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOUNIT = LSAME( DIAG, 'N' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTRTI2', -INFO ) + RETURN + END IF +* + IF( UPPER ) THEN +* +* Compute inverse of upper triangular matrix. +* + DO 10 J = 1, N + IF( NOUNIT ) THEN + A( J, J ) = ONE / A( J, J ) + AJJ = -A( J, J ) + ELSE + AJJ = -ONE + END IF +* +* Compute elements 1:j-1 of j-th column. +* + CALL ZTRMV( 'Upper', 'No transpose', DIAG, J-1, A, LDA, + $ A( 1, J ), 1 ) + CALL ZSCAL( J-1, AJJ, A( 1, J ), 1 ) + 10 CONTINUE + ELSE +* +* Compute inverse of lower triangular matrix. +* + DO 20 J = N, 1, -1 + IF( NOUNIT ) THEN + A( J, J ) = ONE / A( J, J ) + AJJ = -A( J, J ) + ELSE + AJJ = -ONE + END IF + IF( J.LT.N ) THEN +* +* Compute elements j+1:n of j-th column. +* + CALL ZTRMV( 'Lower', 'No transpose', DIAG, N-J, + $ A( J+1, J+1 ), LDA, A( J+1, J ), 1 ) + CALL ZSCAL( N-J, AJJ, A( J+1, J ), 1 ) + END IF + 20 CONTINUE + END IF +* + RETURN +* +* End of ZTRTI2 +* + END diff --git a/2.3-1/src/fortran/lapack/ztrtri.f b/2.3-1/src/fortran/lapack/ztrtri.f new file mode 100644 index 00000000..7caa9771 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztrtri.f @@ -0,0 +1,177 @@ + SUBROUTINE ZTRTRI( UPLO, DIAG, N, A, LDA, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER DIAG, UPLO + INTEGER INFO, LDA, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ) +* .. +* +* Purpose +* ======= +* +* ZTRTRI computes the inverse of a complex upper or lower triangular +* matrix A. +* +* This is the Level 3 BLAS version of the algorithm. +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': A is upper triangular; +* = 'L': A is lower triangular. +* +* DIAG (input) CHARACTER*1 +* = 'N': A is non-unit triangular; +* = 'U': A is unit triangular. +* +* N (input) INTEGER +* The order of the matrix A. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the triangular matrix A. If UPLO = 'U', the +* leading N-by-N upper triangular part of the array A contains +* the upper triangular matrix, and the strictly lower +* triangular part of A is not referenced. If UPLO = 'L', the +* leading N-by-N lower triangular part of the array A contains +* the lower triangular matrix, and the strictly upper +* triangular part of A is not referenced. If DIAG = 'U', the +* diagonal elements of A are also not referenced and are +* assumed to be 1. +* On exit, the (triangular) inverse of the original matrix, in +* the same storage format. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* > 0: if INFO = i, A(i,i) is exactly zero. The triangular +* matrix is singular and its inverse can not be computed. +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL NOUNIT, UPPER + INTEGER J, JB, NB, NN +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZTRMM, ZTRSM, ZTRTI2 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input parameters. +* + INFO = 0 + UPPER = LSAME( UPLO, 'U' ) + NOUNIT = LSAME( DIAG, 'N' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN + INFO = -2 + ELSE IF( N.LT.0 ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTRTRI', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) + $ RETURN +* +* Check for singularity if non-unit. +* + IF( NOUNIT ) THEN + DO 10 INFO = 1, N + IF( A( INFO, INFO ).EQ.ZERO ) + $ RETURN + 10 CONTINUE + INFO = 0 + END IF +* +* Determine the block size for this environment. +* + NB = ILAENV( 1, 'ZTRTRI', UPLO // DIAG, N, -1, -1, -1 ) + IF( NB.LE.1 .OR. NB.GE.N ) THEN +* +* Use unblocked code +* + CALL ZTRTI2( UPLO, DIAG, N, A, LDA, INFO ) + ELSE +* +* Use blocked code +* + IF( UPPER ) THEN +* +* Compute inverse of upper triangular matrix +* + DO 20 J = 1, N, NB + JB = MIN( NB, N-J+1 ) +* +* Compute rows 1:j-1 of current block column +* + CALL ZTRMM( 'Left', 'Upper', 'No transpose', DIAG, J-1, + $ JB, ONE, A, LDA, A( 1, J ), LDA ) + CALL ZTRSM( 'Right', 'Upper', 'No transpose', DIAG, J-1, + $ JB, -ONE, A( J, J ), LDA, A( 1, J ), LDA ) +* +* Compute inverse of current diagonal block +* + CALL ZTRTI2( 'Upper', DIAG, JB, A( J, J ), LDA, INFO ) + 20 CONTINUE + ELSE +* +* Compute inverse of lower triangular matrix +* + NN = ( ( N-1 ) / NB )*NB + 1 + DO 30 J = NN, 1, -NB + JB = MIN( NB, N-J+1 ) + IF( J+JB.LE.N ) THEN +* +* Compute rows j+jb:n of current block column +* + CALL ZTRMM( 'Left', 'Lower', 'No transpose', DIAG, + $ N-J-JB+1, JB, ONE, A( J+JB, J+JB ), LDA, + $ A( J+JB, J ), LDA ) + CALL ZTRSM( 'Right', 'Lower', 'No transpose', DIAG, + $ N-J-JB+1, JB, -ONE, A( J, J ), LDA, + $ A( J+JB, J ), LDA ) + END IF +* +* Compute inverse of current diagonal block +* + CALL ZTRTI2( 'Lower', DIAG, JB, A( J, J ), LDA, INFO ) + 30 CONTINUE + END IF + END IF +* + RETURN +* +* End of ZTRTRI +* + END diff --git a/2.3-1/src/fortran/lapack/ztzrzf.f b/2.3-1/src/fortran/lapack/ztzrzf.f new file mode 100644 index 00000000..5c9c6543 --- /dev/null +++ b/2.3-1/src/fortran/lapack/ztzrzf.f @@ -0,0 +1,244 @@ + SUBROUTINE ZTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZTZRZF reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A +* to upper triangular form by means of unitary transformations. +* +* The upper trapezoidal matrix A is factored as +* +* A = ( R 0 ) * Z, +* +* where Z is an N-by-N unitary matrix and R is an M-by-M upper +* triangular matrix. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix A. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix A. N >= M. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the leading M-by-N upper trapezoidal part of the +* array A must contain the matrix to be factorized. +* On exit, the leading M-by-M upper triangular part of A +* contains the upper triangular matrix R, and elements M+1 to +* N of the first M rows of A, with the array TAU, represent the +* unitary matrix Z as a product of M elementary reflectors. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,M). +* +* TAU (output) COMPLEX*16 array, dimension (M) +* The scalar factors of the elementary reflectors. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* The factorization is obtained by Householder's method. The kth +* transformation matrix, Z( k ), which is used to introduce zeros into +* the ( m - k + 1 )th row of A, is given in the form +* +* Z( k ) = ( I 0 ), +* ( 0 T( k ) ) +* +* where +* +* T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ), +* ( 0 ) +* ( z( k ) ) +* +* tau is a scalar and z( k ) is an ( n - m ) element vector. +* tau and z( k ) are chosen to annihilate the elements of the kth row +* of X. +* +* The scalar tau is returned in the kth element of TAU and the vector +* u( k ) in the kth row of A, such that the elements of z( k ) are +* in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in +* the upper triangular part of A. +* +* Z is given by +* +* Z = Z( 1 ) * Z( 2 ) * ... * Z( m ). +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IWS, KI, KK, LDWORK, LWKOPT, M1, MU, NB, + $ NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARZB, ZLARZT, ZLATRZ +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -4 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. M.EQ.N ) THEN + LWKOPT = 1 + ELSE +* +* Determine the block size. +* + NB = ILAENV( 1, 'ZGERQF', ' ', M, N, -1, -1 ) + LWKOPT = M*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZTZRZF', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 ) THEN + RETURN + ELSE IF( M.EQ.N ) THEN + DO 10 I = 1, N + TAU( I ) = ZERO + 10 CONTINUE + RETURN + END IF +* + NBMIN = 2 + NX = 1 + IWS = M + IF( NB.GT.1 .AND. NB.LT.M ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZGERQF', ' ', M, N, -1, -1 ) ) + IF( NX.LT.M ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZGERQF', ' ', M, N, -1, + $ -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.M .AND. NX.LT.M ) THEN +* +* Use blocked code initially. +* The last kk rows are handled by the block method. +* + M1 = MIN( M+1, N ) + KI = ( ( M-NX-1 ) / NB )*NB + KK = MIN( M, KI+NB ) +* + DO 20 I = M - KK + KI + 1, M - KK + 1, -NB + IB = MIN( M-I+1, NB ) +* +* Compute the TZ factorization of the current block +* A(i:i+ib-1,i:n) +* + CALL ZLATRZ( IB, N-I+1, N-M, A( I, I ), LDA, TAU( I ), + $ WORK ) + IF( I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL ZLARZT( 'Backward', 'Rowwise', N-M, IB, A( I, M1 ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(1:i-1,i:n) from the right +* + CALL ZLARZB( 'Right', 'No transpose', 'Backward', + $ 'Rowwise', I-1, N-I+1, IB, N-M, A( I, M1 ), + $ LDA, WORK, LDWORK, A( 1, I ), LDA, + $ WORK( IB+1 ), LDWORK ) + END IF + 20 CONTINUE + MU = I + NB - 1 + ELSE + MU = M + END IF +* +* Use unblocked code to factor the last or only block +* + IF( MU.GT.0 ) + $ CALL ZLATRZ( MU, N, N-M, A, LDA, TAU, WORK ) +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of ZTZRZF +* + END diff --git a/2.3-1/src/fortran/lapack/zung2l.f b/2.3-1/src/fortran/lapack/zung2l.f new file mode 100644 index 00000000..29178b90 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zung2l.f @@ -0,0 +1,128 @@ + SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNG2L generates an m by n complex matrix Q with orthonormal columns, +* which is defined as the last n columns of a product of k elementary +* reflectors of order m +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by ZGEQLF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the (n-k+i)-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by ZGEQLF in the last k columns of its array +* argument A. +* On exit, the m-by-n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQLF. +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, II, J, L +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARF, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNG2L', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Initialise columns 1:n-k to columns of the unit matrix +* + DO 20 J = 1, N - K + DO 10 L = 1, M + A( L, J ) = ZERO + 10 CONTINUE + A( M-N+J, J ) = ONE + 20 CONTINUE +* + DO 40 I = 1, K + II = N - K + I +* +* Apply H(i) to A(1:m-k+i,1:n-k+i) from the left +* + A( M-N+II, II ) = ONE + CALL ZLARF( 'Left', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A, + $ LDA, WORK ) + CALL ZSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 ) + A( M-N+II, II ) = ONE - TAU( I ) +* +* Set A(m-k+i+1:m,n-k+i) to zero +* + DO 30 L = M - N + II + 1, M + A( L, II ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of ZUNG2L +* + END diff --git a/2.3-1/src/fortran/lapack/zung2r.f b/2.3-1/src/fortran/lapack/zung2r.f new file mode 100644 index 00000000..cd89f26e --- /dev/null +++ b/2.3-1/src/fortran/lapack/zung2r.f @@ -0,0 +1,130 @@ + SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNG2R generates an m by n complex matrix Q with orthonormal columns, +* which is defined as the first n columns of a product of k elementary +* reflectors of order m +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZGEQRF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the i-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by ZGEQRF in the first k columns of its array +* argument A. +* On exit, the m by n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQRF. +* +* WORK (workspace) COMPLEX*16 array, dimension (N) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, J, L +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARF, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNG2R', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) + $ RETURN +* +* Initialise columns k+1:n to columns of the unit matrix +* + DO 20 J = K + 1, N + DO 10 L = 1, M + A( L, J ) = ZERO + 10 CONTINUE + A( J, J ) = ONE + 20 CONTINUE +* + DO 40 I = K, 1, -1 +* +* Apply H(i) to A(i:m,i:n) from the left +* + IF( I.LT.N ) THEN + A( I, I ) = ONE + CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ), + $ A( I, I+1 ), LDA, WORK ) + END IF + IF( I.LT.M ) + $ CALL ZSCAL( M-I, -TAU( I ), A( I+1, I ), 1 ) + A( I, I ) = ONE - TAU( I ) +* +* Set A(1:i-1,i) to zero +* + DO 30 L = 1, I - 1 + A( L, I ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of ZUNG2R +* + END diff --git a/2.3-1/src/fortran/lapack/zungbr.f b/2.3-1/src/fortran/lapack/zungbr.f new file mode 100644 index 00000000..94f74820 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zungbr.f @@ -0,0 +1,245 @@ + SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER VECT + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGBR generates one of the complex unitary matrices Q or P**H +* determined by ZGEBRD when reducing a complex matrix A to bidiagonal +* form: A = Q * B * P**H. Q and P**H are defined as products of +* elementary reflectors H(i) or G(i) respectively. +* +* If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q +* is of order M: +* if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n +* columns of Q, where m >= n >= k; +* if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an +* M-by-M matrix. +* +* If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H +* is of order N: +* if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m +* rows of P**H, where n >= m >= k; +* if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as +* an N-by-N matrix. +* +* Arguments +* ========= +* +* VECT (input) CHARACTER*1 +* Specifies whether the matrix Q or the matrix P**H is +* required, as defined in the transformation applied by ZGEBRD: +* = 'Q': generate Q; +* = 'P': generate P**H. +* +* M (input) INTEGER +* The number of rows of the matrix Q or P**H to be returned. +* M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q or P**H to be returned. +* N >= 0. +* If VECT = 'Q', M >= N >= min(M,K); +* if VECT = 'P', N >= M >= min(N,K). +* +* K (input) INTEGER +* If VECT = 'Q', the number of columns in the original M-by-K +* matrix reduced by ZGEBRD. +* If VECT = 'P', the number of rows in the original K-by-N +* matrix reduced by ZGEBRD. +* K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by ZGEBRD. +* On exit, the M-by-N matrix Q or P**H. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= M. +* +* TAU (input) COMPLEX*16 array, dimension +* (min(M,K)) if VECT = 'Q' +* (min(N,K)) if VECT = 'P' +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i) or G(i), which determines Q or P**H, as +* returned by ZGEBRD in its array argument TAUQ or TAUP. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,min(M,N)). +* For optimum performance LWORK >= min(M,N)*NB, where NB +* is the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, WANTQ + INTEGER I, IINFO, J, LWKOPT, MN, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZUNGLQ, ZUNGQR +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + WANTQ = LSAME( VECT, 'Q' ) + MN = MIN( M, N ) + LQUERY = ( LWORK.EQ.-1 ) + IF( .NOT.WANTQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN + INFO = -1 + ELSE IF( M.LT.0 ) THEN + INFO = -2 + ELSE IF( N.LT.0 .OR. ( WANTQ .AND. ( N.GT.M .OR. N.LT.MIN( M, + $ K ) ) ) .OR. ( .NOT.WANTQ .AND. ( M.GT.N .OR. M.LT. + $ MIN( N, K ) ) ) ) THEN + INFO = -3 + ELSE IF( K.LT.0 ) THEN + INFO = -4 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -6 + ELSE IF( LWORK.LT.MAX( 1, MN ) .AND. .NOT.LQUERY ) THEN + INFO = -9 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( WANTQ ) THEN + NB = ILAENV( 1, 'ZUNGQR', ' ', M, N, K, -1 ) + ELSE + NB = ILAENV( 1, 'ZUNGLQ', ' ', M, N, K, -1 ) + END IF + LWKOPT = MAX( 1, MN )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGBR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + IF( WANTQ ) THEN +* +* Form Q, determined by a call to ZGEBRD to reduce an m-by-k +* matrix +* + IF( M.GE.K ) THEN +* +* If m >= k, assume m >= n >= k +* + CALL ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* If m < k, assume m = n +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first row and column of Q +* to those of the unit matrix +* + DO 20 J = M, 2, -1 + A( 1, J ) = ZERO + DO 10 I = J + 1, M + A( I, J ) = A( I, J-1 ) + 10 CONTINUE + 20 CONTINUE + A( 1, 1 ) = ONE + DO 30 I = 2, M + A( I, 1 ) = ZERO + 30 CONTINUE + IF( M.GT.1 ) THEN +* +* Form Q(2:m,2:m) +* + CALL ZUNGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + ELSE +* +* Form P', determined by a call to ZGEBRD to reduce a k-by-n +* matrix +* + IF( K.LT.N ) THEN +* +* If k < n, assume k <= m <= n +* + CALL ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* If k >= n, assume m = n +* +* Shift the vectors which define the elementary reflectors one +* row downward, and set the first row and column of P' to +* those of the unit matrix +* + A( 1, 1 ) = ONE + DO 40 I = 2, N + A( I, 1 ) = ZERO + 40 CONTINUE + DO 60 J = 2, N + DO 50 I = J - 1, 2, -1 + A( I, J ) = A( I-1, J ) + 50 CONTINUE + A( 1, J ) = ZERO + 60 CONTINUE + IF( N.GT.1 ) THEN +* +* Form P'(2:n,2:n) +* + CALL ZUNGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNGBR +* + END diff --git a/2.3-1/src/fortran/lapack/zunghr.f b/2.3-1/src/fortran/lapack/zunghr.f new file mode 100644 index 00000000..fcf32abf --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunghr.f @@ -0,0 +1,165 @@ + SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER IHI, ILO, INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGHR generates a complex unitary matrix Q which is defined as the +* product of IHI-ILO elementary reflectors of order N, as returned by +* ZGEHRD: +* +* Q = H(ilo) H(ilo+1) . . . H(ihi-1). +* +* Arguments +* ========= +* +* N (input) INTEGER +* The order of the matrix Q. N >= 0. +* +* ILO (input) INTEGER +* IHI (input) INTEGER +* ILO and IHI must have the same values as in the previous call +* of ZGEHRD. Q is equal to the unit matrix except in the +* submatrix Q(ilo+1:ihi,ilo+1:ihi). +* 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by ZGEHRD. +* On exit, the N-by-N unitary matrix Q. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,N). +* +* TAU (input) COMPLEX*16 array, dimension (N-1) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEHRD. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= IHI-ILO. +* For optimum performance LWORK >= (IHI-ILO)*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IINFO, J, LWKOPT, NB, NH +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZUNGQR +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NH = IHI - ILO + LQUERY = ( LWORK.EQ.-1 ) + IF( N.LT.0 ) THEN + INFO = -1 + ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN + INFO = -2 + ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, NH ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF +* + IF( INFO.EQ.0 ) THEN + NB = ILAENV( 1, 'ZUNGQR', ' ', NH, NH, NH, -1 ) + LWKOPT = MAX( 1, NH )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGHR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first ilo and the last n-ihi +* rows and columns to those of the unit matrix +* + DO 40 J = IHI, ILO + 1, -1 + DO 10 I = 1, J - 1 + A( I, J ) = ZERO + 10 CONTINUE + DO 20 I = J + 1, IHI + A( I, J ) = A( I, J-1 ) + 20 CONTINUE + DO 30 I = IHI + 1, N + A( I, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + DO 60 J = 1, ILO + DO 50 I = 1, N + A( I, J ) = ZERO + 50 CONTINUE + A( J, J ) = ONE + 60 CONTINUE + DO 80 J = IHI + 1, N + DO 70 I = 1, N + A( I, J ) = ZERO + 70 CONTINUE + A( J, J ) = ONE + 80 CONTINUE +* + IF( NH.GT.0 ) THEN +* +* Generate Q(ilo+1:ihi,ilo+1:ihi) +* + CALL ZUNGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ), + $ WORK, LWORK, IINFO ) + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNGHR +* + END diff --git a/2.3-1/src/fortran/lapack/zungl2.f b/2.3-1/src/fortran/lapack/zungl2.f new file mode 100644 index 00000000..502411b4 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zungl2.f @@ -0,0 +1,136 @@ + SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows, +* which is defined as the first m rows of a product of k elementary +* reflectors of order n +* +* Q = H(k)' . . . H(2)' H(1)' +* +* as returned by ZGELQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the i-th row must contain the vector which defines +* the elementary reflector H(i), for i = 1,2,...,k, as returned +* by ZGELQF in the first k rows of its array argument A. +* On exit, the m by n matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGELQF. +* +* WORK (workspace) COMPLEX*16 array, dimension (M) +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE, ZERO + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ), + $ ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + INTEGER I, J, L +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACGV, ZLARF, ZSCAL +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGL2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) + $ RETURN +* + IF( K.LT.M ) THEN +* +* Initialise rows k+1:m to rows of the unit matrix +* + DO 20 J = 1, N + DO 10 L = K + 1, M + A( L, J ) = ZERO + 10 CONTINUE + IF( J.GT.K .AND. J.LE.M ) + $ A( J, J ) = ONE + 20 CONTINUE + END IF +* + DO 40 I = K, 1, -1 +* +* Apply H(i)' to A(i:m,i:n) from the right +* + IF( I.LT.N ) THEN + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + IF( I.LT.M ) THEN + A( I, I ) = ONE + CALL ZLARF( 'Right', M-I, N-I+1, A( I, I ), LDA, + $ DCONJG( TAU( I ) ), A( I+1, I ), LDA, WORK ) + END IF + CALL ZSCAL( N-I, -TAU( I ), A( I, I+1 ), LDA ) + CALL ZLACGV( N-I, A( I, I+1 ), LDA ) + END IF + A( I, I ) = ONE - DCONJG( TAU( I ) ) +* +* Set A(i,1:i-1) to zero +* + DO 30 L = 1, I - 1 + A( I, L ) = ZERO + 30 CONTINUE + 40 CONTINUE + RETURN +* +* End of ZUNGL2 +* + END diff --git a/2.3-1/src/fortran/lapack/zunglq.f b/2.3-1/src/fortran/lapack/zunglq.f new file mode 100644 index 00000000..ab4a018f --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunglq.f @@ -0,0 +1,215 @@ + SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows, +* which is defined as the first M rows of a product of K elementary +* reflectors of order N +* +* Q = H(k)' . . . H(2)' H(1)' +* +* as returned by ZGELQF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. N >= M. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. M >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the i-th row must contain the vector which defines +* the elementary reflector H(i), for i = 1,2,...,k, as returned +* by ZGELQF in the first k rows of its array argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGELQF. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,M). +* For optimum performance LWORK >= M*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit; +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, + $ LWKOPT, NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARFB, ZLARFT, ZUNGL2 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'ZUNGLQ', ' ', M, N, K, -1 ) + LWKOPT = MAX( 1, M )*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.M ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGLQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.LE.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = M + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZUNGLQ', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = M + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNGLQ', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the last block. +* The first kk rows are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* +* Set A(kk+1:m,1:kk) to zero. +* + DO 20 J = 1, KK + DO 10 I = KK + 1, M + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the last or only block. +* + IF( KK.LT.M ) + $ CALL ZUNGL2( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, + $ TAU( KK+1 ), WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = KI + 1, 1, -NB + IB = MIN( NB, K-I+1 ) + IF( I+IB.LE.M ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ), + $ LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H' to A(i+ib:m,i:n) from the right +* + CALL ZLARFB( 'Right', 'Conjugate transpose', 'Forward', + $ 'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ), + $ LDA, WORK, LDWORK, A( I+IB, I ), LDA, + $ WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H' to columns i:n of current block +* + CALL ZUNGL2( IB, N-I+1, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* +* Set columns 1:i-1 of current block to zero +* + DO 40 J = 1, I - 1 + DO 30 L = I, I + IB - 1 + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of ZUNGLQ +* + END diff --git a/2.3-1/src/fortran/lapack/zungql.f b/2.3-1/src/fortran/lapack/zungql.f new file mode 100644 index 00000000..4232abea --- /dev/null +++ b/2.3-1/src/fortran/lapack/zungql.f @@ -0,0 +1,222 @@ + SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns, +* which is defined as the last N columns of a product of K elementary +* reflectors of order M +* +* Q = H(k) . . . H(2) H(1) +* +* as returned by ZGEQLF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the (n-k+i)-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by ZGEQLF in the last k columns of its array +* argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQLF. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT, + $ NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARFB, ZLARFT, ZUNG2L +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( N.EQ.0 ) THEN + LWKOPT = 1 + ELSE + NB = ILAENV( 1, 'ZUNGQL', ' ', M, N, K, -1 ) + LWKOPT = N*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGQL', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZUNGQL', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQL', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the first block. +* The last kk columns are handled by the block method. +* + KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB ) +* +* Set A(m-kk+1:m,1:n-kk) to zero. +* + DO 20 J = 1, N - KK + DO 10 I = M - KK + 1, M + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the first or only block. +* + CALL ZUNG2L( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = K - KK + 1, K, NB + IB = MIN( NB, K-I+1 ) + IF( N-K+I.GT.1 ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL ZLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB, + $ A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(1:m-k+i+ib-1,1:n-k+i-1) from the left +* + CALL ZLARFB( 'Left', 'No transpose', 'Backward', + $ 'Columnwise', M-K+I+IB-1, N-K+I-1, IB, + $ A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA, + $ WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H to rows 1:m-k+i+ib-1 of current block +* + CALL ZUNG2L( M-K+I+IB-1, IB, IB, A( 1, N-K+I ), LDA, + $ TAU( I ), WORK, IINFO ) +* +* Set rows m-k+i+ib:m of current block to zero +* + DO 40 J = N - K + I, N - K + I + IB - 1 + DO 30 L = M - K + I + IB, M + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of ZUNGQL +* + END diff --git a/2.3-1/src/fortran/lapack/zungqr.f b/2.3-1/src/fortran/lapack/zungqr.f new file mode 100644 index 00000000..bf5c6997 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zungqr.f @@ -0,0 +1,216 @@ + SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + INTEGER INFO, K, LDA, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns, +* which is defined as the first N columns of a product of K elementary +* reflectors of order M +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZGEQRF. +* +* Arguments +* ========= +* +* M (input) INTEGER +* The number of rows of the matrix Q. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix Q. M >= N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines the +* matrix Q. N >= K >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the i-th column must contain the vector which +* defines the elementary reflector H(i), for i = 1,2,...,k, as +* returned by ZGEQRF in the first k columns of its array +* argument A. +* On exit, the M-by-N matrix Q. +* +* LDA (input) INTEGER +* The first dimension of the array A. LDA >= max(1,M). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQRF. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= max(1,N). +* For optimum performance LWORK >= N*NB, where NB is the +* optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument has an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY + INTEGER I, IB, IINFO, IWS, J, KI, KK, L, LDWORK, + $ LWKOPT, NB, NBMIN, NX +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARFB, ZLARFT, ZUNG2R +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. External Functions .. + INTEGER ILAENV + EXTERNAL ILAENV +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + NB = ILAENV( 1, 'ZUNGQR', ' ', M, N, K, -1 ) + LWKOPT = MAX( 1, N )*NB + WORK( 1 ) = LWKOPT + LQUERY = ( LWORK.EQ.-1 ) + IF( M.LT.0 ) THEN + INFO = -1 + ELSE IF( N.LT.0 .OR. N.GT.M ) THEN + INFO = -2 + ELSE IF( K.LT.0 .OR. K.GT.N ) THEN + INFO = -3 + ELSE IF( LDA.LT.MAX( 1, M ) ) THEN + INFO = -5 + ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN + INFO = -8 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGQR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.LE.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + NX = 0 + IWS = N + IF( NB.GT.1 .AND. NB.LT.K ) THEN +* +* Determine when to cross over from blocked to unblocked code. +* + NX = MAX( 0, ILAENV( 3, 'ZUNGQR', ' ', M, N, K, -1 ) ) + IF( NX.LT.K ) THEN +* +* Determine if workspace is large enough for blocked code. +* + LDWORK = N + IWS = LDWORK*NB + IF( LWORK.LT.IWS ) THEN +* +* Not enough workspace to use optimal NB: reduce NB and +* determine the minimum value of NB. +* + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQR', ' ', M, N, K, -1 ) ) + END IF + END IF + END IF +* + IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN +* +* Use blocked code after the last block. +* The first kk columns are handled by the block method. +* + KI = ( ( K-NX-1 ) / NB )*NB + KK = MIN( K, KI+NB ) +* +* Set A(1:kk,kk+1:n) to zero. +* + DO 20 J = KK + 1, N + DO 10 I = 1, KK + A( I, J ) = ZERO + 10 CONTINUE + 20 CONTINUE + ELSE + KK = 0 + END IF +* +* Use unblocked code for the last or only block. +* + IF( KK.LT.N ) + $ CALL ZUNG2R( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA, + $ TAU( KK+1 ), WORK, IINFO ) +* + IF( KK.GT.0 ) THEN +* +* Use blocked code +* + DO 50 I = KI + 1, 1, -NB + IB = MIN( NB, K-I+1 ) + IF( I+IB.LE.N ) THEN +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB, + $ A( I, I ), LDA, TAU( I ), WORK, LDWORK ) +* +* Apply H to A(i:m,i+ib:n) from the left +* + CALL ZLARFB( 'Left', 'No transpose', 'Forward', + $ 'Columnwise', M-I+1, N-I-IB+1, IB, + $ A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ), + $ LDA, WORK( IB+1 ), LDWORK ) + END IF +* +* Apply H to rows i:m of current block +* + CALL ZUNG2R( M-I+1, IB, IB, A( I, I ), LDA, TAU( I ), WORK, + $ IINFO ) +* +* Set rows 1:i-1 of current block to zero +* + DO 40 J = I, I + IB - 1 + DO 30 L = 1, I - 1 + A( L, J ) = ZERO + 30 CONTINUE + 40 CONTINUE + 50 CONTINUE + END IF +* + WORK( 1 ) = IWS + RETURN +* +* End of ZUNGQR +* + END diff --git a/2.3-1/src/fortran/lapack/zungtr.f b/2.3-1/src/fortran/lapack/zungtr.f new file mode 100644 index 00000000..5de7c109 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zungtr.f @@ -0,0 +1,184 @@ + SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER UPLO + INTEGER INFO, LDA, LWORK, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNGTR generates a complex unitary matrix Q which is defined as the +* product of n-1 elementary reflectors of order N, as returned by +* ZHETRD: +* +* if UPLO = 'U', Q = H(n-1) . . . H(2) H(1), +* +* if UPLO = 'L', Q = H(1) H(2) . . . H(n-1). +* +* Arguments +* ========= +* +* UPLO (input) CHARACTER*1 +* = 'U': Upper triangle of A contains elementary reflectors +* from ZHETRD; +* = 'L': Lower triangle of A contains elementary reflectors +* from ZHETRD. +* +* N (input) INTEGER +* The order of the matrix Q. N >= 0. +* +* A (input/output) COMPLEX*16 array, dimension (LDA,N) +* On entry, the vectors which define the elementary reflectors, +* as returned by ZHETRD. +* On exit, the N-by-N unitary matrix Q. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= N. +* +* TAU (input) COMPLEX*16 array, dimension (N-1) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZHETRD. +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. LWORK >= N-1. +* For optimum performance LWORK >= (N-1)*NB, where NB is +* the optimal blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ZERO, ONE + PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ), + $ ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LQUERY, UPPER + INTEGER I, IINFO, J, LWKOPT, NB +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZUNGQL, ZUNGQR +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LQUERY = ( LWORK.EQ.-1 ) + UPPER = LSAME( UPLO, 'U' ) + IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN + INFO = -1 + ELSE IF( N.LT.0 ) THEN + INFO = -2 + ELSE IF( LDA.LT.MAX( 1, N ) ) THEN + INFO = -4 + ELSE IF( LWORK.LT.MAX( 1, N-1 ) .AND. .NOT.LQUERY ) THEN + INFO = -7 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( UPPER ) THEN + NB = ILAENV( 1, 'ZUNGQL', ' ', N-1, N-1, N-1, -1 ) + ELSE + NB = ILAENV( 1, 'ZUNGQR', ' ', N-1, N-1, N-1, -1 ) + END IF + LWKOPT = MAX( 1, N-1 )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNGTR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( N.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + IF( UPPER ) THEN +* +* Q was determined by a call to ZHETRD with UPLO = 'U' +* +* Shift the vectors which define the elementary reflectors one +* column to the left, and set the last row and column of Q to +* those of the unit matrix +* + DO 20 J = 1, N - 1 + DO 10 I = 1, J - 1 + A( I, J ) = A( I, J+1 ) + 10 CONTINUE + A( N, J ) = ZERO + 20 CONTINUE + DO 30 I = 1, N - 1 + A( I, N ) = ZERO + 30 CONTINUE + A( N, N ) = ONE +* +* Generate Q(1:n-1,1:n-1) +* + CALL ZUNGQL( N-1, N-1, N-1, A, LDA, TAU, WORK, LWORK, IINFO ) +* + ELSE +* +* Q was determined by a call to ZHETRD with UPLO = 'L'. +* +* Shift the vectors which define the elementary reflectors one +* column to the right, and set the first row and column of Q to +* those of the unit matrix +* + DO 50 J = N, 2, -1 + A( 1, J ) = ZERO + DO 40 I = J + 1, N + A( I, J ) = A( I, J-1 ) + 40 CONTINUE + 50 CONTINUE + A( 1, 1 ) = ONE + DO 60 I = 2, N + A( I, 1 ) = ZERO + 60 CONTINUE + IF( N.GT.1 ) THEN +* +* Generate Q(2:n,2:n) +* + CALL ZUNGQR( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK, + $ LWORK, IINFO ) + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNGTR +* + END diff --git a/2.3-1/src/fortran/lapack/zunm2r.f b/2.3-1/src/fortran/lapack/zunm2r.f new file mode 100644 index 00000000..7d4c067a --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunm2r.f @@ -0,0 +1,201 @@ + SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNM2R overwrites the general complex m-by-n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'C', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'C', +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'C': apply Q' (Conjugate transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZGEQRF in the first k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQRF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the m-by-n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ + COMPLEX*16 AII, TAUI +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARF +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNM2R', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) or H(i)' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) or H(i)' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) or H(i)' +* + IF( NOTRAN ) THEN + TAUI = TAU( I ) + ELSE + TAUI = DCONJG( TAU( I ) ) + END IF + AII = A( I, I ) + A( I, I ) = ONE + CALL ZLARF( SIDE, MI, NI, A( I, I ), 1, TAUI, C( IC, JC ), LDC, + $ WORK ) + A( I, I ) = AII + 10 CONTINUE + RETURN +* +* End of ZUNM2R +* + END diff --git a/2.3-1/src/fortran/lapack/zunmbr.f b/2.3-1/src/fortran/lapack/zunmbr.f new file mode 100644 index 00000000..b32ce338 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunmbr.f @@ -0,0 +1,288 @@ + SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C, + $ LDC, WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS, VECT + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C +* with +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'C': Q**H * C C * Q**H +* +* If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C +* with +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': P * C C * P +* TRANS = 'C': P**H * C C * P**H +* +* Here Q and P**H are the unitary matrices determined by ZGEBRD when +* reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q +* and P**H are defined as products of elementary reflectors H(i) and +* G(i) respectively. +* +* Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the +* order of the unitary matrix Q or P**H that is applied. +* +* If VECT = 'Q', A is assumed to have been an NQ-by-K matrix: +* if nq >= k, Q = H(1) H(2) . . . H(k); +* if nq < k, Q = H(1) H(2) . . . H(nq-1). +* +* If VECT = 'P', A is assumed to have been a K-by-NQ matrix: +* if k < nq, P = G(1) G(2) . . . G(k); +* if k >= nq, P = G(1) G(2) . . . G(nq-1). +* +* Arguments +* ========= +* +* VECT (input) CHARACTER*1 +* = 'Q': apply Q or Q**H; +* = 'P': apply P or P**H. +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q, Q**H, P or P**H from the Left; +* = 'R': apply Q, Q**H, P or P**H from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q or P; +* = 'C': Conjugate transpose, apply Q**H or P**H. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* If VECT = 'Q', the number of columns in the original +* matrix reduced by ZGEBRD. +* If VECT = 'P', the number of rows in the original +* matrix reduced by ZGEBRD. +* K >= 0. +* +* A (input) COMPLEX*16 array, dimension +* (LDA,min(nq,K)) if VECT = 'Q' +* (LDA,nq) if VECT = 'P' +* The vectors which define the elementary reflectors H(i) and +* G(i), whose products determine the matrices Q and P, as +* returned by ZGEBRD. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If VECT = 'Q', LDA >= max(1,nq); +* if VECT = 'P', LDA >= max(1,min(nq,K)). +* +* TAU (input) COMPLEX*16 array, dimension (min(nq,K)) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i) or G(i) which determines Q or P, as returned +* by ZGEBRD in the array argument TAUQ or TAUP. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q +* or P*C or P**H*C or C*P or C*P**H. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M); +* if N = 0 or M = 0, LWORK >= 1. +* For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L', +* and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the +* optimal blocksize. (NB = 0 if M = 0 or N = 0.) +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL APPLYQ, LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZUNMLQ, ZUNMQR +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + APPLYQ = LSAME( VECT, 'Q' ) + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q or P and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + NW = 0 + END IF + IF( .NOT.APPLYQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN + INFO = -1 + ELSE IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -2 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -3 + ELSE IF( M.LT.0 ) THEN + INFO = -4 + ELSE IF( N.LT.0 ) THEN + INFO = -5 + ELSE IF( K.LT.0 ) THEN + INFO = -6 + ELSE IF( ( APPLYQ .AND. LDA.LT.MAX( 1, NQ ) ) .OR. + $ ( .NOT.APPLYQ .AND. LDA.LT.MAX( 1, MIN( NQ, K ) ) ) ) + $ THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( NW.GT.0 ) THEN + IF( APPLYQ ) THEN + IF( LEFT ) THEN + NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M-1, N, M-1, + $ -1 ) + ELSE + NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N-1, N-1, + $ -1 ) + END IF + ELSE + IF( LEFT ) THEN + NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M-1, N, M-1, + $ -1 ) + ELSE + NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N-1, N-1, + $ -1 ) + END IF + END IF + LWKOPT = MAX( 1, NW*NB ) + ELSE + LWKOPT = 1 + END IF + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNMBR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) + $ RETURN +* + IF( APPLYQ ) THEN +* +* Apply Q +* + IF( NQ.GE.K ) THEN +* +* Q was determined by a call to ZGEBRD with nq >= k +* + CALL ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, IINFO ) + ELSE IF( NQ.GT.1 ) THEN +* +* Q was determined by a call to ZGEBRD with nq < k +* + IF( LEFT ) THEN + MI = M - 1 + NI = N + I1 = 2 + I2 = 1 + ELSE + MI = M + NI = N - 1 + I1 = 1 + I2 = 2 + END IF + CALL ZUNMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU, + $ C( I1, I2 ), LDC, WORK, LWORK, IINFO ) + END IF + ELSE +* +* Apply P +* + IF( NOTRAN ) THEN + TRANST = 'C' + ELSE + TRANST = 'N' + END IF + IF( NQ.GT.K ) THEN +* +* P was determined by a call to ZGEBRD with nq > k +* + CALL ZUNMLQ( SIDE, TRANST, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, IINFO ) + ELSE IF( NQ.GT.1 ) THEN +* +* P was determined by a call to ZGEBRD with nq <= k +* + IF( LEFT ) THEN + MI = M - 1 + NI = N + I1 = 2 + I2 = 1 + ELSE + MI = M + NI = N - 1 + I1 = 1 + I2 = 2 + END IF + CALL ZUNMLQ( SIDE, TRANST, MI, NI, NQ-1, A( 1, 2 ), LDA, + $ TAU, C( I1, I2 ), LDC, WORK, LWORK, IINFO ) + END IF + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNMBR +* + END diff --git a/2.3-1/src/fortran/lapack/zunml2.f b/2.3-1/src/fortran/lapack/zunml2.f new file mode 100644 index 00000000..cced4a77 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunml2.f @@ -0,0 +1,205 @@ + SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNML2 overwrites the general complex m-by-n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'C', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'C', +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(k)' . . . H(2)' H(1)' +* +* as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'C': apply Q' (Conjugate transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) COMPLEX*16 array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZGELQF in the first k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGELQF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the m-by-n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + COMPLEX*16 ONE + PARAMETER ( ONE = ( 1.0D+0, 0.0D+0 ) ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JC, MI, NI, NQ + COMPLEX*16 AII, TAUI +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLACGV, ZLARF +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNML2', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. NOTRAN .OR. .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) or H(i)' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) or H(i)' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) or H(i)' +* + IF( NOTRAN ) THEN + TAUI = DCONJG( TAU( I ) ) + ELSE + TAUI = TAU( I ) + END IF + IF( I.LT.NQ ) + $ CALL ZLACGV( NQ-I, A( I, I+1 ), LDA ) + AII = A( I, I ) + A( I, I ) = ONE + CALL ZLARF( SIDE, MI, NI, A( I, I ), LDA, TAUI, C( IC, JC ), + $ LDC, WORK ) + A( I, I ) = AII + IF( I.LT.NQ ) + $ CALL ZLACGV( NQ-I, A( I, I+1 ), LDA ) + 10 CONTINUE + RETURN +* +* End of ZUNML2 +* + END diff --git a/2.3-1/src/fortran/lapack/zunmlq.f b/2.3-1/src/fortran/lapack/zunmlq.f new file mode 100644 index 00000000..b1708757 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunmlq.f @@ -0,0 +1,267 @@ + SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNMLQ overwrites the general complex M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'C': Q**H * C C * Q**H +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(k)' . . . H(2)' H(1)' +* +* as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**H from the Left; +* = 'R': apply Q or Q**H from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'C': Conjugate transpose, apply Q**H. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) COMPLEX*16 array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZGELQF in the first k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGELQF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, + $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + COMPLEX*16 T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARFB, ZLARFT, ZUNML2 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. NB may be at most NBMAX, where NBMAX +* is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNMLQ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNMLQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + IF( NOTRAN ) THEN + TRANST = 'C' + ELSE + TRANST = 'N' + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ), + $ LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL ZLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB, + $ A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, WORK, + $ LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNMLQ +* + END diff --git a/2.3-1/src/fortran/lapack/zunmqr.f b/2.3-1/src/fortran/lapack/zunmqr.f new file mode 100644 index 00000000..f9b1e98f --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunmqr.f @@ -0,0 +1,260 @@ + SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNMQR overwrites the general complex M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'C': Q**H * C C * Q**H +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**H from the Left; +* = 'R': apply Q or Q**H from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'C': Conjugate transpose, apply Q**H. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* A (input) COMPLEX*16 array, dimension (LDA,K) +* The i-th column must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZGEQRF in the first k columns of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. +* If SIDE = 'L', LDA >= max(1,M); +* if SIDE = 'R', LDA >= max(1,N). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZGEQRF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK, + $ LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + COMPLEX*16 T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARFB, ZLARFT, ZUNM2R +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = N + ELSE + NQ = N + NW = M + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN + INFO = -7 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -10 + ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -12 + END IF +* + IF( INFO.EQ.0 ) THEN +* +* Determine the block size. NB may be at most NBMAX, where NBMAX +* is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N, K, + $ -1 ) ) + LWKOPT = MAX( 1, NW )*NB + WORK( 1 ) = LWKOPT + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNMQR', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN + WORK( 1 ) = 1 + RETURN + END IF +* + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNMQR', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, + $ IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + ELSE + MI = M + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i) H(i+1) . . . H(i+ib-1) +* + CALL ZLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ), + $ LDA, TAU( I ), T, LDT ) + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL ZLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI, + $ IB, A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, + $ WORK, LDWORK ) + 10 CONTINUE + END IF + WORK( 1 ) = LWKOPT + RETURN +* +* End of ZUNMQR +* + END diff --git a/2.3-1/src/fortran/lapack/zunmr3.f b/2.3-1/src/fortran/lapack/zunmr3.f new file mode 100644 index 00000000..111c1c95 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunmr3.f @@ -0,0 +1,212 @@ + SUBROUTINE ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, L, LDA, LDC, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNMR3 overwrites the general complex m by n matrix C with +* +* Q * C if SIDE = 'L' and TRANS = 'N', or +* +* Q'* C if SIDE = 'L' and TRANS = 'C', or +* +* C * Q if SIDE = 'R' and TRANS = 'N', or +* +* C * Q' if SIDE = 'R' and TRANS = 'C', +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZTZRZF. Q is of order m if SIDE = 'L' and of order n +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q' from the Left +* = 'R': apply Q or Q' from the Right +* +* TRANS (input) CHARACTER*1 +* = 'N': apply Q (No transpose) +* = 'C': apply Q' (Conjugate transpose) +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing +* the meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* A (input) COMPLEX*16 array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZTZRZF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZTZRZF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the m-by-n matrix C. +* On exit, C is overwritten by Q*C or Q'*C or C*Q' or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace) COMPLEX*16 array, dimension +* (N) if SIDE = 'L', +* (M) if SIDE = 'R' +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Local Scalars .. + LOGICAL LEFT, NOTRAN + INTEGER I, I1, I2, I3, IC, JA, JC, MI, NI, NQ + COMPLEX*16 TAUI +* .. +* .. External Functions .. + LOGICAL LSAME + EXTERNAL LSAME +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARZ +* .. +* .. Intrinsic Functions .. + INTRINSIC DCONJG, MAX +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) +* +* NQ is the order of Q +* + IF( LEFT ) THEN + NQ = M + ELSE + NQ = N + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( L.LT.0 .OR. ( LEFT .AND. ( L.GT.M ) ) .OR. + $ ( .NOT.LEFT .AND. ( L.GT.N ) ) ) THEN + INFO = -6 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNMR3', -INFO ) + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) + $ RETURN +* + IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = 1 + ELSE + I1 = K + I2 = 1 + I3 = -1 + END IF +* + IF( LEFT ) THEN + NI = N + JA = M - L + 1 + JC = 1 + ELSE + MI = M + JA = N - L + 1 + IC = 1 + END IF +* + DO 10 I = I1, I2, I3 + IF( LEFT ) THEN +* +* H(i) or H(i)' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H(i) or H(i)' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H(i) or H(i)' +* + IF( NOTRAN ) THEN + TAUI = TAU( I ) + ELSE + TAUI = DCONJG( TAU( I ) ) + END IF + CALL ZLARZ( SIDE, MI, NI, L, A( I, JA ), LDA, TAUI, + $ C( IC, JC ), LDC, WORK ) +* + 10 CONTINUE +* + RETURN +* +* End of ZUNMR3 +* + END diff --git a/2.3-1/src/fortran/lapack/zunmrz.f b/2.3-1/src/fortran/lapack/zunmrz.f new file mode 100644 index 00000000..c7637050 --- /dev/null +++ b/2.3-1/src/fortran/lapack/zunmrz.f @@ -0,0 +1,296 @@ + SUBROUTINE ZUNMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, LWORK, INFO ) +* +* -- LAPACK routine (version 3.1) -- +* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. +* November 2006 +* +* .. Scalar Arguments .. + CHARACTER SIDE, TRANS + INTEGER INFO, K, L, LDA, LDC, LWORK, M, N +* .. +* .. Array Arguments .. + COMPLEX*16 A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * ) +* .. +* +* Purpose +* ======= +* +* ZUNMRZ overwrites the general complex M-by-N matrix C with +* +* SIDE = 'L' SIDE = 'R' +* TRANS = 'N': Q * C C * Q +* TRANS = 'C': Q**H * C C * Q**H +* +* where Q is a complex unitary matrix defined as the product of k +* elementary reflectors +* +* Q = H(1) H(2) . . . H(k) +* +* as returned by ZTZRZF. Q is of order M if SIDE = 'L' and of order N +* if SIDE = 'R'. +* +* Arguments +* ========= +* +* SIDE (input) CHARACTER*1 +* = 'L': apply Q or Q**H from the Left; +* = 'R': apply Q or Q**H from the Right. +* +* TRANS (input) CHARACTER*1 +* = 'N': No transpose, apply Q; +* = 'C': Conjugate transpose, apply Q**H. +* +* M (input) INTEGER +* The number of rows of the matrix C. M >= 0. +* +* N (input) INTEGER +* The number of columns of the matrix C. N >= 0. +* +* K (input) INTEGER +* The number of elementary reflectors whose product defines +* the matrix Q. +* If SIDE = 'L', M >= K >= 0; +* if SIDE = 'R', N >= K >= 0. +* +* L (input) INTEGER +* The number of columns of the matrix A containing +* the meaningful part of the Householder reflectors. +* If SIDE = 'L', M >= L >= 0, if SIDE = 'R', N >= L >= 0. +* +* A (input) COMPLEX*16 array, dimension +* (LDA,M) if SIDE = 'L', +* (LDA,N) if SIDE = 'R' +* The i-th row must contain the vector which defines the +* elementary reflector H(i), for i = 1,2,...,k, as returned by +* ZTZRZF in the last k rows of its array argument A. +* A is modified by the routine but restored on exit. +* +* LDA (input) INTEGER +* The leading dimension of the array A. LDA >= max(1,K). +* +* TAU (input) COMPLEX*16 array, dimension (K) +* TAU(i) must contain the scalar factor of the elementary +* reflector H(i), as returned by ZTZRZF. +* +* C (input/output) COMPLEX*16 array, dimension (LDC,N) +* On entry, the M-by-N matrix C. +* On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. +* +* LDC (input) INTEGER +* The leading dimension of the array C. LDC >= max(1,M). +* +* WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK)) +* On exit, if INFO = 0, WORK(1) returns the optimal LWORK. +* +* LWORK (input) INTEGER +* The dimension of the array WORK. +* If SIDE = 'L', LWORK >= max(1,N); +* if SIDE = 'R', LWORK >= max(1,M). +* For optimum performance LWORK >= N*NB if SIDE = 'L', and +* LWORK >= M*NB if SIDE = 'R', where NB is the optimal +* blocksize. +* +* If LWORK = -1, then a workspace query is assumed; the routine +* only calculates the optimal size of the WORK array, returns +* this value as the first entry of the WORK array, and no error +* message related to LWORK is issued by XERBLA. +* +* INFO (output) INTEGER +* = 0: successful exit +* < 0: if INFO = -i, the i-th argument had an illegal value +* +* Further Details +* =============== +* +* Based on contributions by +* A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA +* +* ===================================================================== +* +* .. Parameters .. + INTEGER NBMAX, LDT + PARAMETER ( NBMAX = 64, LDT = NBMAX+1 ) +* .. +* .. Local Scalars .. + LOGICAL LEFT, LQUERY, NOTRAN + CHARACTER TRANST + INTEGER I, I1, I2, I3, IB, IC, IINFO, IWS, JA, JC, + $ LDWORK, LWKOPT, MI, NB, NBMIN, NI, NQ, NW +* .. +* .. Local Arrays .. + COMPLEX*16 T( LDT, NBMAX ) +* .. +* .. External Functions .. + LOGICAL LSAME + INTEGER ILAENV + EXTERNAL LSAME, ILAENV +* .. +* .. External Subroutines .. + EXTERNAL XERBLA, ZLARZB, ZLARZT, ZUNMR3 +* .. +* .. Intrinsic Functions .. + INTRINSIC MAX, MIN +* .. +* .. Executable Statements .. +* +* Test the input arguments +* + INFO = 0 + LEFT = LSAME( SIDE, 'L' ) + NOTRAN = LSAME( TRANS, 'N' ) + LQUERY = ( LWORK.EQ.-1 ) +* +* NQ is the order of Q and NW is the minimum dimension of WORK +* + IF( LEFT ) THEN + NQ = M + NW = MAX( 1, N ) + ELSE + NQ = N + NW = MAX( 1, M ) + END IF + IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN + INFO = -1 + ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN + INFO = -2 + ELSE IF( M.LT.0 ) THEN + INFO = -3 + ELSE IF( N.LT.0 ) THEN + INFO = -4 + ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN + INFO = -5 + ELSE IF( L.LT.0 .OR. ( LEFT .AND. ( L.GT.M ) ) .OR. + $ ( .NOT.LEFT .AND. ( L.GT.N ) ) ) THEN + INFO = -6 + ELSE IF( LDA.LT.MAX( 1, K ) ) THEN + INFO = -8 + ELSE IF( LDC.LT.MAX( 1, M ) ) THEN + INFO = -11 + END IF +* + IF( INFO.EQ.0 ) THEN + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + LWKOPT = 1 +* +* Determine the block size. NB may be at most NBMAX, where +* NBMAX is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'ZUNMRQ', SIDE // TRANS, M, N, + $ K, -1 ) ) + LWKOPT = NW*NB + END IF + WORK( 1 ) = LWKOPT +* + IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN + INFO = -13 + END IF + END IF +* + IF( INFO.NE.0 ) THEN + CALL XERBLA( 'ZUNMRZ', -INFO ) + RETURN + ELSE IF( LQUERY ) THEN + RETURN + END IF +* +* Quick return if possible +* + IF( M.EQ.0 .OR. N.EQ.0 ) THEN + RETURN + END IF +* +* Determine the block size. NB may be at most NBMAX, where NBMAX +* is used to define the local array T. +* + NB = MIN( NBMAX, ILAENV( 1, 'ZUNMRQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + NBMIN = 2 + LDWORK = NW + IF( NB.GT.1 .AND. NB.LT.K ) THEN + IWS = NW*NB + IF( LWORK.LT.IWS ) THEN + NB = LWORK / LDWORK + NBMIN = MAX( 2, ILAENV( 2, 'ZUNMRQ', SIDE // TRANS, M, N, K, + $ -1 ) ) + END IF + ELSE + IWS = NW + END IF +* + IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN +* +* Use unblocked code +* + CALL ZUNMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, + $ WORK, IINFO ) + ELSE +* +* Use blocked code +* + IF( ( LEFT .AND. .NOT.NOTRAN ) .OR. + $ ( .NOT.LEFT .AND. NOTRAN ) ) THEN + I1 = 1 + I2 = K + I3 = NB + ELSE + I1 = ( ( K-1 ) / NB )*NB + 1 + I2 = 1 + I3 = -NB + END IF +* + IF( LEFT ) THEN + NI = N + JC = 1 + JA = M - L + 1 + ELSE + MI = M + IC = 1 + JA = N - L + 1 + END IF +* + IF( NOTRAN ) THEN + TRANST = 'C' + ELSE + TRANST = 'N' + END IF +* + DO 10 I = I1, I2, I3 + IB = MIN( NB, K-I+1 ) +* +* Form the triangular factor of the block reflector +* H = H(i+ib-1) . . . H(i+1) H(i) +* + CALL ZLARZT( 'Backward', 'Rowwise', L, IB, A( I, JA ), LDA, + $ TAU( I ), T, LDT ) +* + IF( LEFT ) THEN +* +* H or H' is applied to C(i:m,1:n) +* + MI = M - I + 1 + IC = I + ELSE +* +* H or H' is applied to C(1:m,i:n) +* + NI = N - I + 1 + JC = I + END IF +* +* Apply H or H' +* + CALL ZLARZB( SIDE, TRANST, 'Backward', 'Rowwise', MI, NI, + $ IB, L, A( I, JA ), LDA, T, LDT, C( IC, JC ), + $ LDC, WORK, LDWORK ) + 10 CONTINUE +* + END IF +* + WORK( 1 ) = LWKOPT +* + RETURN +* +* End of ZUNMRZ +* + END -- cgit